mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-27 01:16:06 +03:00
Revert "Synthesize Loadout event for plugins after catch-up replay"
This reverts commit f4245a0669.
This commit is contained in:
1 parent
f4245a0669
commit
64e5dcf0cb
1 file changed
-11
-11
@@ -409,17 +409,6 @@ class EDLogs(FileSystemEventHandler):
|
||||
|
||||
self.event_queue.put(json.dumps(entry, separators=(', ', ':')))
|
||||
|
||||
# If state['Modules'] is populated from catch-up replay (e.g. a
|
||||
# Loadout event was in the journal), synthesize a Loadout event so
|
||||
# plugins see the current ship loadout on startup. Without this,
|
||||
# plugins that wait for a Loadout event (like Inara's shipswap
|
||||
# handler) will never receive one after an EDMC restart.
|
||||
if self.state['Modules']:
|
||||
loadout_entry = self.ship(timestamped=True)
|
||||
if loadout_entry:
|
||||
logger.info("Synthesizing Loadout event for plugins (state has modules from catch-up)")
|
||||
self.event_queue.put(json.dumps(loadout_entry, separators=(', ', ':')))
|
||||
|
||||
else:
|
||||
# Generate null event to update the display (with possibly out-of-date info)
|
||||
self.event_queue.put(None)
|
||||
|
||||
Reference in new issue
Block a user