mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-31 23:59:38 +03:00
Don't send shipyard messages for unknown stations.
This commit is contained in:
parent
7065ea17c6
commit
75204f4c2d
@ -313,12 +313,12 @@ class AppWindow:
|
||||
|
||||
|
||||
# No EDDN output at known station?
|
||||
if (config.getint('output') & config.OUT_EDDN) and station_id and not has_market and not has_outfitting and not has_shipyard:
|
||||
if (config.getint('output') & config.OUT_EDDN) and station_id and not (has_market or has_outfitting or has_shipyard):
|
||||
if not self.status['text']:
|
||||
self.status['text'] = _("Station doesn't have anything!")
|
||||
|
||||
# No EDDN output at unknown station?
|
||||
elif (config.getint('output') & config.OUT_EDDN) and not station_id and not data['lastStarport'].get('commodities') and not data['lastStarport'].get('modules') and not data['lastStarport'].get('ships'):
|
||||
elif (config.getint('output') & config.OUT_EDDN) and not station_id and not (data['lastStarport'].get('commodities') or data['lastStarport'].get('modules')): # Ignore usually spurious shipyard at unknown stations
|
||||
if not self.status['text']:
|
||||
self.status['text'] = _("Station doesn't have anything!")
|
||||
|
||||
@ -355,11 +355,11 @@ class AppWindow:
|
||||
self.w.update_idletasks()
|
||||
eddn.export_commodities(data)
|
||||
if has_outfitting or not station_id:
|
||||
# Only send if eddb says that the station provides outfitting
|
||||
# Only send if eddb says that the station provides outfitting, or unknown station
|
||||
eddn.export_outfitting(data)
|
||||
elif __debug__ and data['lastStarport'].get('modules'):
|
||||
print 'Spurious outfitting!'
|
||||
if has_shipyard or not station_id:
|
||||
if has_shipyard:
|
||||
# Only send if eddb says that the station has a shipyard -
|
||||
# https://github.com/Marginal/EDMarketConnector/issues/16
|
||||
if data['lastStarport'].get('ships'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user