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

Merge pull request #1143 from A-UNDERSCORE-D/fix/inara-no-planet-when-landed

INARA: Be sure to include body with lat/long for setCommanderLocation
This commit is contained in:
Athanasius 2021-06-04 17:21:58 +01:00 committed by GitHub
commit 13a31ba2f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1156,7 +1156,7 @@ def journal_entry( # noqa: C901, CCR001
new_add_event('updateCommanderSuitLoadout', entry['timestamp'], to_send)
elif event_name == "Location":
elif event_name == 'Location':
to_send = {
'starsystemName': entry['StarSystem'],
'starsystemCoords': entry['StarPos'],
@ -1174,6 +1174,8 @@ def journal_entry( # noqa: C901, CCR001
if 'Longitude' in entry and 'Latitude' in entry:
# These were included thus we are landed
to_send['starsystemBodyCoords'] = [entry['Latitude'], entry['Longitude']]
# if we're not Docked, but have these, we're either landed or close enough that it doesn't matter.
to_send['starSystemBodyName'] = entry['Body']
new_add_event('setCommanderTravelLocation', entry['timestamp'], to_send)