Skip to content

Commit

Permalink
monitor: Gate Commander/LoadGame TRACE on trace_on 'startup'
Browse files Browse the repository at this point in the history
  • Loading branch information
Athanasius committed Aug 5, 2021
1 parent 40b76d4 commit ea88a57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import tkinter

import util_ships
from config import config
from config import config, trace_on
from edmc_data import edmc_suit_shortnames, edmc_suit_symbol_localised
from EDMCLogging import get_main_logger

Expand Down Expand Up @@ -518,6 +518,8 @@ def parse_entry(self, line: bytes) -> MutableMapping[str, Any]: # noqa: C901, C
self.live = True # First event in 3.0
self.cmdr = entry['Name']
self.state['FID'] = entry['FID']
if 'startup' in trace_on:
logger.trace(f'"Commander" event, {monitor.cmdr=}, {monitor.state["FID"]=}')

elif event_type == 'loadgame':
# Odyssey Release Update 5 -- This contains data that doesn't match the format used in FileHeader above
Expand Down Expand Up @@ -559,6 +561,9 @@ def parse_entry(self, line: bytes) -> MutableMapping[str, Any]: # noqa: C901, C
if entry.get('Ship') is not None and self._RE_SHIP_ONFOOT.search(entry['Ship']):
self.state['OnFoot'] = True

if 'startup' in trace_on:
logger.trace(f'"LoadGame" event, {monitor.cmdr=}, {monitor.state["FID"]=}')

elif event_type == 'newcommander':
self.cmdr = entry['Name']
self.group = None
Expand Down

0 comments on commit ea88a57

Please sign in to comment.