1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Add mandatory StarSystem property to EDDN journal messages

This commit is contained in:
Jonathan Harris 2016-09-07 15:02:02 +01:00
parent b21e181ab1
commit 9fdc5fb947

View File

@ -529,7 +529,7 @@ class AppWindow:
if (config.getint('output') & config.OUT_SYS_EDDN and monitor.cmdr and
(entry['event'] == 'FSDJump' and system_changed or
entry['event'] == 'Docked' and station_changed or
entry['event'] == 'Scan')):
entry['event'] == 'Scan' and monitor.system)):
try:
self.status['text'] = _('Sending data to EDDN...')
@ -540,6 +540,10 @@ class AppWindow:
if thing.endswith('_Localised'):
entry.pop(thing, None)
# add mandatory StarSystem property to Scan events
if 'StarSystem' not in entry:
entry['StarSystem'] = monitor.system
eddn.export_journal_entry(monitor.cmdr, monitor.is_beta, entry)
self.status['text'] = ''