Merge pull request #997 from EDCD/fix/996-init-all-monitor-self

monitor.py: Initialise EDLogs self.systempopulation
This commit is contained in:
Athanasius authored and GitHub committed 2021-04-12 12:40:33 +01:00
commit 671db91547
2 files changed
+4

No files matched your search

+3
View File
@@ -563,6 +563,9 @@ running. In this case you won't receive initial events such as "LoadGame",
"Rank", "Location", etc. However the `state` dictionary will reflect the
cumulative effect of these missed events.
**NB: Any of the values in this might be `None` if the Cmdr has loaded into
Arena (CQC) from the Main Menu.**
Similarly, a special "ShutDown" entry is sent when the game stops writing
to the Journal without writing a "Shutdown" event.
This might happen, for example, when the game client crashes.
+1
View File
@@ -105,6 +105,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
self.stationtype: Optional[str] = None
self.coordinates: Optional[Tuple[float, float, float]] = None
self.systemaddress: Optional[int] = None
self.systempopulation: Optional[int] = None
self.started: Optional[int] = None # Timestamp of the LoadGame event
self.__init_state()