mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix issues w.r.t. custom forced-options config
This commit is contained in:
parent
f8b4c7bcf5
commit
780078fec4
@ -58,9 +58,11 @@ class ForcedOptionsGenerator:
|
||||
|
||||
@staticmethod
|
||||
def load_forced_options() -> dict[str, Any]:
|
||||
with open(forced_options_path(), "r+", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
result = dcs.lua.loads(content).get("forcedOptions", {})
|
||||
result = {}
|
||||
if forced_options_path().exists():
|
||||
with open(forced_options_path(), "r+", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
result = dcs.lua.loads(content).get("forcedOptions", {})
|
||||
return result
|
||||
|
||||
def generate(self) -> None:
|
||||
|
||||
@ -196,7 +196,7 @@ def settings_dir() -> Path:
|
||||
|
||||
|
||||
def forced_options_path() -> Path:
|
||||
return _create_dir_if_needed(base_path() / "Retribution" / "forced_options.lua")
|
||||
return _create_dir_if_needed(base_path() / "Retribution") / "forced_options.lua"
|
||||
|
||||
|
||||
def airwing_dir() -> Path:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user