1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 07:47:14 +03:00

monitor/tracking: *Do* clear supercruisentry/body state if Station type

This commit is contained in:
Athanasius 2023-01-16 19:30:02 +00:00
parent 46fd129d3e
commit 2f2ee885c8
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -1000,9 +1000,13 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
self.state['BodyType'] = None
elif event_type == 'supercruiseentry':
# NB: Do **NOT** clear Body state, because we won't get a fresh
# ApproachBody if we don't leave Orbital Cruise but land
# again.
# We only clear Body state if the Type is Station. This is
# because we won't get a fresh ApproachBody if we don't leave
# Orbital Cruise but land again.
if self.state['BodyType'] == 'Station':
self.state['Body'] = None
self.state['BodyID'] = None
self.state['BodyType'] = None
###############################################################
# Track: Current station, if applicable