diff --git a/config/__init__.py b/config/__init__.py index b7437b2d..d57412c4 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -175,7 +175,7 @@ class AbstractConfig(abc.ABC): # OUT_SYS_EDSM = 256 # Now a plugin # OUT_SYS_AUTO = 512 # Now always automatic OUT_MKT_MANUAL = 1024 - OUT_SYS_EDDN = 2048 + OUT_EDDN_SEND_NON_STATION = 2048 OUT_EDDN_DO_NOT_DELAY = 4096 app_dir_path: pathlib.Path diff --git a/plugins/eddn.py b/plugins/eddn.py index f5469c54..ab7e7ef9 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -1824,7 +1824,7 @@ def plugin_prefs(parent, cmdr: str, is_beta: bool) -> Frame: BUTTONX = 12 # noqa: N806 # indent Checkbuttons and Radiobuttons if prefsVersion.shouldSetDefaults('0.0.0.0', not bool(config.get_int('output'))): - output: int = (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN) # default settings + output: int = (config.OUT_MKT_EDDN | config.OUT_EDDN_SEND_NON_STATION) # default settings else: output = config.get_int('output') @@ -1849,7 +1849,7 @@ def plugin_prefs(parent, cmdr: str, is_beta: bool) -> Frame: ) # Output setting this.eddn_station_button.grid(padx=BUTTONX, pady=(5, 0), sticky=tk.W) - this.eddn_system = tk.IntVar(value=(output & config.OUT_SYS_EDDN) and 1) + this.eddn_system = tk.IntVar(value=(output & config.OUT_EDDN_SEND_NON_STATION) and 1) # Output setting new in E:D 2.2 this.eddn_system_button = nb.Checkbutton( eddnframe, @@ -1896,7 +1896,7 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None: (config.get_int('output') & (config.OUT_MKT_TD | config.OUT_MKT_CSV | config.OUT_SHIP | config.OUT_MKT_MANUAL)) + (this.eddn_station.get() and config.OUT_MKT_EDDN) + - (this.eddn_system.get() and config.OUT_SYS_EDDN) + + (this.eddn_system.get() and config.OUT_EDDN_SEND_NON_STATION) + (this.eddn_delay.get() and config.OUT_EDDN_DO_NOT_DELAY) ) @@ -2066,7 +2066,7 @@ def journal_entry( # noqa: C901, CCR001 this.status_body_name = None # Events with their own EDDN schema - if config.get_int('output') & config.OUT_SYS_EDDN and not state['Captain']: + if config.get_int('output') & config.OUT_EDDN_SEND_NON_STATION and not state['Captain']: if event_name == 'fssdiscoveryscan': return this.eddn.export_journal_fssdiscoveryscan(cmdr, system, state['StarPos'], is_beta, entry) @@ -2123,7 +2123,7 @@ def journal_entry( # noqa: C901, CCR001 ) # Send journal schema events to EDDN, but not when on a crew - if (config.get_int('output') & config.OUT_SYS_EDDN and not state['Captain'] and + if (config.get_int('output') & config.OUT_EDDN_SEND_NON_STATION and not state['Captain'] and (event_name in ('location', 'fsdjump', 'docked', 'scan', 'saasignalsfound', 'carrierjump')) and ('StarPos' in entry or this.coordinates)): diff --git a/prefs.py b/prefs.py index acc7f12c..d2fb69b0 100644 --- a/prefs.py +++ b/prefs.py @@ -1221,7 +1221,7 @@ class PreferencesDialog(tk.Toplevel): (self.out_csv.get() and config.OUT_MKT_CSV) + (config.OUT_MKT_MANUAL if not self.out_auto.get() else 0) + (self.out_ship.get() and config.OUT_SHIP) + - (config.get_int('output') & (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN | config.OUT_EDDN_DO_NOT_DELAY)) + (config.get_int('output') & (config.OUT_MKT_EDDN | config.OUT_EDDN_SEND_NON_STATION | config.OUT_EDDN_DO_NOT_DELAY)) ) config.set(