1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 00:30:33 +03:00

Update eddb.station_marketid from CarrierJump as well

This shouldn't actually be necessary, the marketid shouln't change
because of a jump, and would have been picked up from the other events
anyway, but it should do no harm to set it again from this.
This commit is contained in:
Athanasius 2020-06-27 10:39:32 +01:00
parent 2df8610e42
commit 6ed7590ba9

View File

@ -70,7 +70,7 @@ def journal_entry(cmdr, is_beta, system, station, entry, state):
this.system_link['url'] = system_url(system) # Override standard URL function
if config.get('station_provider') == 'eddb':
if entry['event'] in ['Location', 'Docked', 'StartUp']:
if entry['event'] in ['StartUp', 'Location', 'Docked', 'CarrierJump']:
this.station_marketid = entry.get('MarketID')
elif entry['event'] in ['Undocked']:
this.station_marketid = None
@ -80,7 +80,7 @@ def journal_entry(cmdr, is_beta, system, station, entry, state):
def cmdr_data(data, is_beta):
if config.get('system_provider') == 'eddb':
this.system_link['url'] = system_url(data['lastSystem']['name']) # Override standard URL function
this.system_link['url'] = system_url(data['lastSystem']['name']) # Override standard URL function
if config.get('station_provider') == 'eddb':
this.station_marketid = data['commander']['docked'] and data['lastStarport']['id']