mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
plugins/station: *Do* set station from BodyType/Body always
The 'if not this.station' was early paranoia when first getting things working with Odyssey. It prevents a relog from Horizons (i.e. different location) from correctly picking up an Odyssey login station when on-foot in concourse. Also, EDSM was defaulting wrongly for this.station_marketid. Not that the plugin even *uses* that at this time.
This commit is contained in:
parent
b3495df1b6
commit
7f45953012
@ -118,7 +118,7 @@ def journal_entry(cmdr, is_beta, system, station, entry, state):
|
|||||||
|
|
||||||
this.station = entry.get('StationName') or this.station
|
this.station = entry.get('StationName') or this.station
|
||||||
# on_foot station detection
|
# on_foot station detection
|
||||||
if not this.station and entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
if entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
||||||
this.station = entry['Body']
|
this.station = entry['Body']
|
||||||
|
|
||||||
this.station_marketid = entry.get('MarketID') or this.station_marketid
|
this.station_marketid = entry.get('MarketID') or this.station_marketid
|
||||||
|
@ -373,10 +373,10 @@ def journal_entry(
|
|||||||
|
|
||||||
this.station = entry.get('StationName', this.station)
|
this.station = entry.get('StationName', this.station)
|
||||||
# on_foot station detection
|
# on_foot station detection
|
||||||
if not this.station and entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
if entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
||||||
this.station = entry['Body']
|
this.station = entry['Body']
|
||||||
|
|
||||||
this.station_marketid = entry.get('MarketID', this.station)
|
this.station_marketid = entry.get('MarketID', this.station_marketid)
|
||||||
# We might pick up StationName in DockingRequested, make sure we clear it if leaving
|
# We might pick up StationName in DockingRequested, make sure we clear it if leaving
|
||||||
if entry['event'] in ('Undocked', 'FSDJump', 'SupercruiseEntry'):
|
if entry['event'] in ('Undocked', 'FSDJump', 'SupercruiseEntry'):
|
||||||
this.station = None
|
this.station = None
|
||||||
|
@ -386,7 +386,7 @@ def journal_entry( # noqa: C901, CCR001
|
|||||||
|
|
||||||
this.station = entry.get('StationName', this.station)
|
this.station = entry.get('StationName', this.station)
|
||||||
# on_foot station detection
|
# on_foot station detection
|
||||||
if not this.station and entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
if entry['event'] == 'Location' and entry['BodyType'] == 'Station':
|
||||||
this.station = entry['Body']
|
this.station = entry['Body']
|
||||||
|
|
||||||
this.station_marketid = entry.get('MarketID', this.station_marketid) or this.station_marketid
|
this.station_marketid = entry.get('MarketID', this.station_marketid) or this.station_marketid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user