From 8dfd638f285439a2fb40ce452fe45f94ab28c5c1 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 12 May 2021 17:29:15 +0100 Subject: [PATCH] plugins/eddn: Store Odyssey boolean in This state. This is so we can access it in cmdr_data() as well. --- plugins/eddn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index f3b80ad1..9b404752 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -44,6 +44,10 @@ class This: def __init__(self): # Track if we're on foot self.on_foot = False + + # Running under Odyssey? + self.odyssey = False + # Track location to add to Journal events self.systemaddress: Optional[str] = None self.coordinates: Optional[Tuple] = None @@ -773,7 +777,7 @@ def journal_entry( # noqa: C901, CCR001 # Note if we're under Odyssey # The only event this is already in is `LoadGame` which isn't sent to EDDN. - entry['odyssey'] = state['Odyssey'] + this.odyssey = entry['odyssey'] = state['Odyssey'] # Track location if entry['event'] in ('Location', 'FSDJump', 'Docked', 'CarrierJump'):