mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-22 03:06:59 +03:00
Merge pull request #1028 from EDCD/enhancement/odyssey-dropshipdeploy
Set OnFoot for DropshipDeploy, but ignore BookDropship
This commit is contained in:
1 file changed
+18
-5
+18
-5
@@ -661,8 +661,6 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
self.state['OnFoot'] = False
|
||||
|
||||
elif event_type == 'Disembark':
|
||||
# We don't yet have a way, other than LoadGame+Location, to detect if we *are* on a station on-foot.
|
||||
# alpha4
|
||||
# This event is logged when the player steps out of a ship or SRV
|
||||
#
|
||||
# Parameters:
|
||||
@@ -680,13 +678,18 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
# • StationType
|
||||
# • MarketID
|
||||
|
||||
# If we're not exiting one of these then it's from our own ship, and then we should already have
|
||||
# self.station set correctly.
|
||||
if entry['SRV'] or entry['Taxi'] or entry['Multicrew']:
|
||||
if entry.get('OnStation', False):
|
||||
self.station = entry.get('StationName', '')
|
||||
|
||||
else:
|
||||
self.station = None
|
||||
|
||||
self.state['OnFoot'] = True
|
||||
|
||||
elif event_type == 'DropshipDeploy':
|
||||
# We're definitely on-foot now
|
||||
self.state['OnFoot'] = True
|
||||
|
||||
elif event_type in ('Location', 'FSDJump', 'Docked', 'CarrierJump'):
|
||||
# alpha4 - any changes ?
|
||||
# Location:
|
||||
@@ -1196,6 +1199,16 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
|
||||
elif event_type == 'BookDropship':
|
||||
self.state['Credits'] -= entry['Cost']
|
||||
# Technically we *might* now not be OnFoot.
|
||||
# The problem is that this event is recorded both for signing up for
|
||||
# an on-foot CZ, and when you use the Dropship to return after the
|
||||
# CZ completes.
|
||||
#
|
||||
# In the first case we're still in-station and thus still on-foot.
|
||||
#
|
||||
# In the second case we should instantly be in the Dropship and thus
|
||||
# not still on-foot, BUT it doesn't really matter as the next significant
|
||||
# event is going to be Disembark to on-foot anyway.
|
||||
|
||||
elif event_type == 'BookTaxi':
|
||||
self.state['Credits'] -= entry['Cost']
|
||||
|
||||
Reference in new issue
Block a user