mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 09:16:56 +01:00
Fix NOMODS flag clearing the load order
Mods that don't have loadable scripts are forced on
This commit is contained in:
parent
b1719c4b21
commit
a266c9508c
1 changed files with 349 additions and 342 deletions
|
@ -190,6 +190,7 @@ init -999 python:
|
|||
# Contains the mod_name's of previous mods that have successfully loaded, mirroring mod_menu_metadata while in this loop. Only used for ID checking.
|
||||
mod_name_list = []
|
||||
|
||||
if load_metadata:
|
||||
for file in loadable_mod_metadata:
|
||||
mod_data_final = {}
|
||||
mod_jsonfail_list = [] # List of languages that has an associated metadata language file that failed to load.
|
||||
|
@ -548,6 +549,11 @@ init -999 python:
|
|||
if mod["ID"] == saved_mod_id[0]:
|
||||
mod_not_found = False
|
||||
if mod_not_found:
|
||||
# If this mod doesn't have any loadable scripts, treat it as on (Say, if a mod changed something in the base game and the label points there)
|
||||
if not mod["Scripts"]:
|
||||
mod["Enabled"] = True
|
||||
# Otherwise set mods to the default state
|
||||
else:
|
||||
mod["Enabled"] = persistent.newmods_default_state
|
||||
temp_list.append(mod)
|
||||
|
||||
|
@ -555,6 +561,7 @@ init -999 python:
|
|||
|
||||
# Rewrite enabled_mods to reflect the new mod order, and load all the mods
|
||||
persistent.enabled_mods.clear()
|
||||
|
||||
for mod in mod_menu_metadata:
|
||||
persistent.enabled_mods.append( [ mod["ID"], mod["Enabled"] ] )
|
||||
|
||||
|
|
Loading…
Reference in a new issue