From 77203c72274a411f4ec7532dbe117d9d8d435dee Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 15 Jun 2022 14:34:06 +0100 Subject: [PATCH] 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. --- plugins/eddn.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index 2c8e8916..3b1323fb 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -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