From 3e9bc280588136fdaf7863fdfc1ced9727e135cc Mon Sep 17 00:00:00 2001 From: klebold <76481827+hafometh88@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:11:41 +0100 Subject: [PATCH] [Fix] Remove mod IDs when GAME_MODS_IDS_LIST is empty (#34) --- launch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launch.py b/launch.py index 1090733..f6bca78 100644 --- a/launch.py +++ b/launch.py @@ -118,11 +118,11 @@ def bool_str(text): os.environ["GAME_PROPS_NETWORK_VIEW_DISTANCE"] ) - if env_defined("GAME_MODS_IDS_LIST") or env_defined("GAME_MODS_JSON_FILE_PATH"): - # Since we want to keep ENVs as a single source of truth - # we will regenerate the mod list in case any manual changes were made - config["game"]["mods"] = [] - config_mod_ids = [] + # Since we want to keep ENVs as a single source of truth + # we will regenerate the mod list in case any manual changes were made + # also deletes the mod entries when GAME_MODS_IDS_LIST is empty + config["game"]["mods"] = [] + config_mod_ids = [] if env_defined("GAME_MODS_IDS_LIST"): reg = re.compile(r"^[A-Z\d,=.]+$") assert reg.match(