mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-06 18:33:13 +03:00
Send credits on LoadGame
This commit is contained in:
parent
43ba88fe8c
commit
99700686c6
@ -499,8 +499,22 @@ class AppWindow:
|
|||||||
if system_changed or station_changed:
|
if system_changed or station_changed:
|
||||||
self.status['text'] = ''
|
self.status['text'] = ''
|
||||||
|
|
||||||
if config.getint('output') & config.OUT_SYS_EDSM and not monitor.is_beta and monitor.ranks and (not entry or entry['event'] in ['Progress', 'Promotion']):
|
if config.getint('output') & config.OUT_SYS_EDSM and not monitor.is_beta:
|
||||||
|
# Send credits to EDSM on startup
|
||||||
|
if monitor.credits and (not entry or entry['event'] == 'LoadGame'):
|
||||||
|
try:
|
||||||
|
self.status['text'] = _('Sending data to EDSM...')
|
||||||
|
self.w.update_idletasks()
|
||||||
|
self.edsm.setcredits(monitor.credits)
|
||||||
|
self.status['text'] = ''
|
||||||
|
except Exception as e:
|
||||||
|
if __debug__: print_exc()
|
||||||
|
self.status['text'] = unicode(e)
|
||||||
|
if not config.getint('hotkey_mute'):
|
||||||
|
hotkeymgr.play_bad()
|
||||||
|
|
||||||
# Send rank info to EDSM on startup or change
|
# Send rank info to EDSM on startup or change
|
||||||
|
if monitor.ranks and (not entry or entry['event'] in ['Progress', 'Promotion']):
|
||||||
try:
|
try:
|
||||||
self.status['text'] = _('Sending data to EDSM...')
|
self.status['text'] = _('Sending data to EDSM...')
|
||||||
self.w.update_idletasks()
|
self.w.update_idletasks()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user