1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Server Lagging check now works again.

Well, it doesn't now raise ServerLagging for a last Journal with a
LoadGame on-foot and in-station.

It does then cause "You're not docked at a station!" to show up.
This commit is contained in:
Athanasius 2021-03-30 15:11:12 +01:00
parent b44320f47c
commit b3cef1e29b

View File

@ -784,12 +784,18 @@ class AppWindow(object):
# CAPI system must match last journal one
raise companion.ServerLagging()
elif (monitor.on_foot and monitor.station
and data['lastStarport']['name'] != monitor.station # On foot station must match if set
or ((data['commander']['docked'] and data['lastStarport']['name'] or None)
!= monitor.station) # CAPI lastStarport must match
):
raise companion.ServerLagging()
elif data['lastStarport']['name'] != monitor.station:
if monitor.on_foot and monitor.station:
raise companion.ServerLagging()
else:
last_station = None
if data['commander']['docked']:
last_station = data['lastStarport']['name']
if last_station != monitor.station:
# CAPI lastStarport must match
raise companion.ServerLagging()
elif not monitor.on_foot and data['ship']['id'] != monitor.state['ShipID']:
# CAPI ship must match