mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-10 04:12:15 +03:00
Started updating existing events with taxi info
This commit is contained in:
parent
a7a9de77d7
commit
0322fd37b1
@ -567,15 +567,32 @@ def journal_entry( # noqa: C901, CCR001
|
|||||||
this.suppress_docked = False
|
this.suppress_docked = False
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
to_send = {
|
||||||
|
'starsystemName': system,
|
||||||
|
'stationName': station,
|
||||||
|
'shipType': state['ShipType'],
|
||||||
|
'shipGameID': state['ShipID'],
|
||||||
|
}
|
||||||
|
|
||||||
|
if entry.get('Taxi'):
|
||||||
|
# we're in a taxi, dont store ShipType or shipGameID
|
||||||
|
del to_send['shipType']
|
||||||
|
del to_send['shipGameID']
|
||||||
|
|
||||||
|
# We were in a taxi. What kind?
|
||||||
|
if state['Dropship'] is not None and state['Dropship']:
|
||||||
|
to_send['isTaxiDropship'] = True
|
||||||
|
|
||||||
|
elif state['Taxi'] is not None and state['Taxi']:
|
||||||
|
to_send['isTaxiShuttle'] = True
|
||||||
|
|
||||||
|
else: # we dont know one way or another. Given we were told it IS a taxi, assume its a shuttle.
|
||||||
|
to_send['isTaxiShuttle'] = True
|
||||||
|
|
||||||
new_add_event(
|
new_add_event(
|
||||||
'addCommanderTravelDock',
|
'addCommanderTravelDock',
|
||||||
entry['timestamp'],
|
entry['timestamp'],
|
||||||
{
|
to_send
|
||||||
'starsystemName': system,
|
|
||||||
'stationName': station,
|
|
||||||
'shipType': state['ShipType'],
|
|
||||||
'shipGameID': state['ShipID'],
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
elif event_name == 'Undocked':
|
elif event_name == 'Undocked':
|
||||||
@ -599,15 +616,29 @@ def journal_entry( # noqa: C901, CCR001
|
|||||||
|
|
||||||
elif event_name == 'FSDJump':
|
elif event_name == 'FSDJump':
|
||||||
this.undocked = False
|
this.undocked = False
|
||||||
|
to_send = {
|
||||||
|
'starsystemName': entry['StarSystem'],
|
||||||
|
'jumpDistance': entry['JumpDist'],
|
||||||
|
'shipType': state['ShipType'],
|
||||||
|
'shipGameID': state['ShipID'],
|
||||||
|
# TODO: coords for the starsystem
|
||||||
|
}
|
||||||
|
|
||||||
|
if state['Taxi'] is not None and state['Taxi']:
|
||||||
|
del to_send['shipType']
|
||||||
|
del to_send['shipGameID']
|
||||||
|
|
||||||
|
# taxi. What kind?
|
||||||
|
if state['Dropship'] is not None and state['Dropship']:
|
||||||
|
to_send['isTaxiDropship'] = True
|
||||||
|
|
||||||
|
else:
|
||||||
|
to_send['isTaxiShuttle'] = True
|
||||||
|
|
||||||
new_add_event(
|
new_add_event(
|
||||||
'addCommanderTravelFSDJump',
|
'addCommanderTravelFSDJump',
|
||||||
entry['timestamp'],
|
entry['timestamp'],
|
||||||
{
|
to_send
|
||||||
'starsystemName': entry['StarSystem'],
|
|
||||||
'jumpDistance': entry['JumpDist'],
|
|
||||||
'shipType': state['ShipType'],
|
|
||||||
'shipGameID': state['ShipID'],
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if entry.get('Factions'):
|
if entry.get('Factions'):
|
||||||
@ -1040,13 +1071,12 @@ def journal_entry( # noqa: C901, CCR001
|
|||||||
if state.get('ShipType') is not None:
|
if state.get('ShipType') is not None:
|
||||||
to_send_data['shipType'] = state['ShipType']
|
to_send_data['shipType'] = state['ShipType']
|
||||||
|
|
||||||
# TODO: Can Touchdown ever show for either of these? I dont think so
|
|
||||||
to_send_data['isTaxiShuttle'] = False
|
to_send_data['isTaxiShuttle'] = False
|
||||||
to_send_data['isTaxiDropShip'] = False
|
to_send_data['isTaxiDropShip'] = False
|
||||||
|
|
||||||
new_add_event('addCommanderTravelLand', entry['timestamp'], to_send_data)
|
new_add_event('addCommanderTravelLand', entry['timestamp'], to_send_data)
|
||||||
|
|
||||||
# Community Goals
|
# Community Goals
|
||||||
if event_name == 'CommunityGoal':
|
if event_name == 'CommunityGoal':
|
||||||
# Remove any unsent
|
# Remove any unsent
|
||||||
this.filter_events(
|
this.filter_events(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user