1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

eddn: For 'docked' only set entry Body(Type) if latter is 'Planet'

We explicitly must not set this for other BodyType, e.g. 'Station'.
This commit is contained in:
Athanasius 2023-01-09 11:26:35 +00:00
parent 6f3967fb7f
commit 386ea1636e
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -2323,10 +2323,10 @@ def journal_entry( # noqa: C901, CCR001
]
# add planet to Docked event for planetary stations if known
if event_name == 'docked' and this.body_name:
# FIXME - Is this correct if using monitor.py tracking ?
entry['Body'] = this.body_name
entry['BodyType'] = 'Planet'
if event_name == 'docked' and state['Body'] is not None:
if state['BodyType'] == 'Planet':
entry['Body'] = state['Body']
entry['BodyType'] = state['BodyType']
# The generic journal schema is for events:
# Docked, FSDJump, Scan, Location, SAASignalsFound, CarrierJump