fix duplication when loading mods

This commit is contained in:
Persephone Bubblegum-Holiday 2025-08-14 21:23:38 -07:00
parent 88f6466f35
commit 1c7a1e18b5

View file

@ -34,10 +34,7 @@ func _ready():
var tempLoadedList = []
for file: String in dir.get_files():
var modManifest = load(dir.get_current_dir() + "/" + file.trim_suffix(".remap")).new()
if (Stages.loaded_mods.get(modManifest.ModInfo["mod_name"]) != null):
if (tempLoadedList.find(modManifest.ModInfo["mod_name"]) == -1):
$ModsScreen/DialogPanel/ModList.add_item(modManifest.ModInfo["mod_name"], null, true)
continue
if (tempLoadedList.find(modManifest.ModInfo["mod_name"]) != -1): continue
Stages.loaded_mods[modManifest.ModInfo["mod_name"]] = modManifest.ModInfo
for stage in modManifest.ModInfo["implements_stages"]:
Stages.stages_info[stage] = modManifest.ModInfo["implements_stages"][stage]