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

[#2157] Add Station and Docking Information When Available

This commit is contained in:
David Sangrey 2024-02-09 13:32:59 -05:00
parent c7a3fd44e7
commit 4a4010ad7b
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC

View File

@ -920,18 +920,24 @@ class EDDN:
# none and that really does need to be recorded over EDDN so that
# tools can update in a timely manner.
if this.commodities != commodities:
self.send_message(cmdr, {
message: dict[str, Any] = { # Yes, this is a broad type hint.
'$schemaRef': f'https://eddn.edcd.io/schemas/commodity/3{"/test" if is_beta else ""}',
'message': {
('timestamp', entry['timestamp']),
('systemName', entry['StarSystem']),
('stationName', entry['StationName']),
('marketId', entry['MarketID']),
('commodities', commodities),
('horizons', this.horizons),
('odyssey', this.odyssey),
},
})
'timestamp': entry['timestamp'],
'systemName': entry['StarSystem'],
'stationName': entry['StationName'],
'marketId': entry['MarketID'],
'commodities': commodities,
'horizons': this.horizons,
'odyssey': this.odyssey,
'stationType': entry['StationType'],
}
}
if entry.get('CarrierDockingAccess'):
message['message']['carrierDockingAccess'] = entry['CarrierDockingAccess']
self.send_message(cmdr, message)
this.commodities = commodities