mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
added setCommanderTravelLocation from Location event
This commit is contained in:
parent
8a94a57e78
commit
607729b77b
@ -1156,6 +1156,27 @@ def journal_entry( # noqa: C901, CCR001
|
||||
|
||||
new_add_event('updateCommanderSuitLoadout', entry['timestamp'], to_send)
|
||||
|
||||
elif event_name == "Location":
|
||||
to_send = {
|
||||
'starsystemName': entry['StarSystem'],
|
||||
'starsystemCoords': entry['StarPos'],
|
||||
}
|
||||
|
||||
if entry['Docked']:
|
||||
to_send['stationName'] = entry['StationName']
|
||||
to_send['marketID'] = entry['MarketID']
|
||||
|
||||
if entry['Docked'] and entry['BodyType'] == 'Planet':
|
||||
# we're Docked, but we're not on a Station, thus we're docked at a planetary base of some kind
|
||||
# and thus, we SHOULD include starsystemBodyName
|
||||
to_send['starsystemBodyName'] = entry['Body']
|
||||
|
||||
if 'Longitude' in entry and 'Latitude' in entry:
|
||||
# These were included thus we are landed
|
||||
to_send['starsystemBodyCoords'] = [entry['Latitude'], entry['Longitude']]
|
||||
|
||||
new_add_event('setCommanderTravelLocation', entry['timestamp'], to_send)
|
||||
|
||||
# Community Goals
|
||||
if event_name == 'CommunityGoal':
|
||||
# Remove any unsent
|
||||
|
Loading…
x
Reference in New Issue
Block a user