mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-02 00:21:05 +03:00
monitor/NavRoute: Load NavRoute after catching_up ends.
This is to allow restart of EDMarketConnector whilst the game is running to have `state['NavRoute']` hold data when the synthetic `StartUp` event is passed to plugins. NB: Probably need to note this in PLUGINS.md
This commit is contained in:
parent
36f54ba120
commit
25ed649b7a
@ -397,6 +397,12 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logger.debug(f'Invalid journal entry:\n{line!r}\n', exc_info=ex)
|
logger.debug(f'Invalid journal entry:\n{line!r}\n', exc_info=ex)
|
||||||
|
|
||||||
|
# One-shot attempt to read in latest NavRoute, if present
|
||||||
|
navroute_data = self._parse_navroute_file()
|
||||||
|
if navroute_data is not None:
|
||||||
|
# If it's NavRouteClear contents, just keep those anyway.
|
||||||
|
self.state['NavRoute'] = navroute_data
|
||||||
|
|
||||||
self.catching_up = False
|
self.catching_up = False
|
||||||
log_pos = loghandle.tell()
|
log_pos = loghandle.tell()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user