eddn/fsssignaldiscovered: Misc fixups

* Need to remove `event`, `horizons` and `odyssey` per signal.
* It's lower case `horizons` and `odyssey` in a(n augmented) journal event.
* It's `event`, not `entry` that `export_journal_entry()` will look for.
This commit is contained in:
Athanasius committed 2022-06-15 14:34:06 +01:00
1 parent 37c88aeefc
commit 77203c7227
1 file changed
+7 -4
+7 -4
View File
@@ -1387,20 +1387,23 @@ class EDDN:
logger.trace_if("plugin.eddn.fsssignaldiscovered", "USSType is $USS_Type_MissionTarget;, dropping")
continue
# Remove any `TimeRemaining` (USS) or `SystemAddress` keys
# Remove any key/values that shouldn't be there per signal
s.pop('event', None)
s.pop('horizons', None)
s.pop('odyssey', None)
s.pop('TimeRemaining', None)
s.pop('SystemAddress', None)
msg['message']['signals'].append(s)
# `horizons` and `odyssey` augmentations
msg['message']['horizons'] = entry['Horizons']
msg['message']['odyssey'] = entry['Odyssey']
msg['message']['horizons'] = entry['horizons']
msg['message']['odyssey'] = entry['odyssey']
logger.trace_if("plugin.eddn.fsssignaldiscovered", f"FSSSignalDiscovered batch is {json.dumps(msg)}")
# Fake an 'entry' as it's only there for some "should we send replay?" checks in the called function.
this.eddn.export_journal_entry(cmdr, {'entry': 'send_fsssignaldiscovered'}, msg)
this.eddn.export_journal_entry(cmdr, {'event': 'send_fsssignaldiscovered'}, msg)
self.fss_signals = []
return None