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 authored and GitHub committed 2021-06-04 17:21:58 +01:00
commit 13a31ba2f7
1 file changed
+3 -1
+3 -1
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)