1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Merge pull request #1477 from EDCD/fix/1476/approachsettlement-check-for-latlng

EDDN: Handle ApproachSettlement missing planetary coords
This commit is contained in:
Athanasius 2022-02-19 10:44:48 +00:00 committed by GitHub
commit 6a9645d43a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1126,6 +1126,27 @@ class EDDN:
# "event": "ApproachSettlement",
# "timestamp": "2021-10-14T12:37:54Z"
# }
#######################################################################
# Bugs
#######################################################################
# WORKAROUND 3.8.0.404 | 2022-02-18: ApproachSettlement missing coords
# As of Horizons ("gameversion":"3.8.0.404", "build":"r280105/r0 ")
# if you log back in (certainly a game client restart) at a
# Planetary Port, then the ApproachSettlement event written will be
# missing the Latitude and Longitude.
# Ref: https://github.com/EDCD/EDMarketConnector/issues/1476
if any(
k not in entry for k in ('Latitude', 'Longitude')
):
logger.debug(
f'ApproachSettlement without at least one of Latitude or Longitude:\n{entry}\n'
)
# No need to alert the user, it will only annoy them
return ""
# WORKAROUND END
#######################################################################
#######################################################################
# Augmentations
#######################################################################