mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 08:17:13 +03:00
on_foot: Attempt to set correctly when state changes.
* For taxi-usage you 'Embark' on it to take the trip and 'Disembark' onto foot at the other end. * Joining a multi-crew session will mean no longer being on foot. * When quitting a multi-crew session we might miss that you're back on-foot. Need to test.
This commit is contained in:
parent
b3cef1e29b
commit
6fe86cd719
10
monitor.py
10
monitor.py
@ -234,6 +234,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
self.coordinates = None
|
||||
self.systemaddress = None
|
||||
self.is_beta = False
|
||||
self.on_foot = False
|
||||
|
||||
if self.observed:
|
||||
logger.debug('self.observed: Calling unschedule_all()')
|
||||
@ -496,6 +497,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
'Modules': None,
|
||||
'Route': None,
|
||||
}
|
||||
self.on_foot = False
|
||||
|
||||
elif event_type == 'Commander':
|
||||
self.live = True # First event in 3.0
|
||||
@ -623,6 +625,12 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
self.stationtype = None
|
||||
self.stationservices = None
|
||||
|
||||
elif event_type == 'Embark':
|
||||
self.on_foot = False
|
||||
|
||||
elif event_type == 'Disembark':
|
||||
self.on_foot = True
|
||||
|
||||
elif event_type in ('Location', 'FSDJump', 'Docked', 'CarrierJump'):
|
||||
if event_type in ('Location', 'CarrierJump'):
|
||||
self.planet = entry.get('Body') if entry.get('BodyType') == 'Planet' else None
|
||||
@ -884,6 +892,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
self.stationservices = None
|
||||
self.coordinates = None
|
||||
self.systemaddress = None
|
||||
self.on_foot = False
|
||||
|
||||
elif event_type == 'ChangeCrewRole':
|
||||
self.state['Role'] = entry['Role']
|
||||
@ -899,6 +908,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
self.stationservices = None
|
||||
self.coordinates = None
|
||||
self.systemaddress = None
|
||||
# TODO: on_foot: Will we get an event after this to know ?
|
||||
|
||||
elif event_type == 'Friends':
|
||||
if entry['Status'] in ('Online', 'Added'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user