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

This commit is contained in:
Athanasius committed 2023-01-16 19:30:02 +00:00
1 parent 46fd129d3e
commit 2f2ee885c8
1 file changed
+7 -3
+7 -3
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