mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 08:17:13 +03:00
EDMC: Provide EDDN Odyssey flag from monitor state
This should have been set from the latest Journal file, and the key/value is in LoadGame in Odyssey. It's only documented as: "Whether the sending Cmdr has an Odyssey expansion." in the current EDDN Journal schema. Thus sending this as False if the Cmdr last logged into Horizons/base game should be OK.
This commit is contained in:
parent
2e27a2ba00
commit
c9d478222a
6
EDMC.py
6
EDMC.py
@ -441,9 +441,9 @@ sys.path: {sys.path}'''
|
||||
try:
|
||||
eddn_sender = eddn.EDDN(None)
|
||||
logger.debug('Sending Market, Outfitting and Shipyard data to EDDN...')
|
||||
eddn_sender.export_commodities(data, monitor.is_beta)
|
||||
eddn_sender.export_outfitting(data, monitor.is_beta)
|
||||
eddn_sender.export_shipyard(data, monitor.is_beta)
|
||||
eddn_sender.export_commodities(data, monitor.is_beta, monitor.state['Odyssey'])
|
||||
eddn_sender.export_outfitting(data, monitor.is_beta, monitor.state['Odyssey'])
|
||||
eddn_sender.export_shipyard(data, monitor.is_beta, monitor.state['Odyssey'])
|
||||
|
||||
except Exception:
|
||||
logger.exception('Failed to send data to EDDN')
|
||||
|
@ -310,6 +310,7 @@ Msg:\n{msg}'''
|
||||
|
||||
:param data: a dict containing the starport data
|
||||
:param is_beta: whether or not we're currently in beta mode
|
||||
:param is_odyssey: whether the account shows as having Odyssey expansion.
|
||||
"""
|
||||
commodities: List[OrderedDictT[str, Any]] = []
|
||||
for commodity in data['lastStarport'].get('commodities') or []:
|
||||
@ -790,7 +791,6 @@ def journal_entry( # noqa: C901, CCR001
|
||||
:param state: `dict` - Current `monitor.state` data.
|
||||
:return: `str` - Error message, or `None` if no errors.
|
||||
"""
|
||||
|
||||
should_return, new_data = killswitch.check_killswitch('plugins.eddn.journal', entry)
|
||||
if should_return:
|
||||
plug.show_error(_('EDDN journal handler disabled. See Log.')) # LANG: Killswitch disabled EDDN
|
||||
|
Loading…
x
Reference in New Issue
Block a user