From 9fc120c1a5afee09dc680ee812875dbb47d25116 Mon Sep 17 00:00:00 2001 From: baxendev Date: Thu, 11 Dec 2025 18:47:40 +0000 Subject: [PATCH 1/2] Added mod preset file check to mod loading --- launch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launch.py b/launch.py index c3db9ae..29a9e41 100644 --- a/launch.py +++ b/launch.py @@ -47,7 +47,8 @@ def env_defined(key): mods = [] -if os.environ["MODS_PRESET"] != "": +mod_preset = os.environ.get("MODS_PRESET", "") +if mod_preset != "" and os.path.exists(mods_preset): if not client: client = api.login(os.environ["STEAM_USER"], os.environ["STEAM_PASSWORD"]) mods.extend(workshop.preset(os.environ["MODS_PRESET"], client)) From 6c224413206bc1e8a29c988c768e14232ed8ba97 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Thu, 18 Dec 2025 20:35:38 -0600 Subject: [PATCH 2/2] Update launch.py --- launch.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/launch.py b/launch.py index 29a9e41..d9ce62a 100644 --- a/launch.py +++ b/launch.py @@ -48,10 +48,13 @@ def env_defined(key): mods = [] mod_preset = os.environ.get("MODS_PRESET", "") -if mod_preset != "" and os.path.exists(mods_preset): - if not client: - client = api.login(os.environ["STEAM_USER"], os.environ["STEAM_PASSWORD"]) - mods.extend(workshop.preset(os.environ["MODS_PRESET"], client)) +if mod_preset != "": + if os.path.exists(mods_preset): + if not client: + client = api.login(os.environ["STEAM_USER"], os.environ["STEAM_PASSWORD"]) + mods.extend(workshop.preset(os.environ["MODS_PRESET"], client)) + else: + print(f"MODS_PRESET {mod_preset} does not exist") if os.environ["MODS_LOCAL"] == "true" and os.path.exists("mods"): mods.extend(local.mods("mods"))