diff --git a/build-scripts/get_all_mods.py b/build-scripts/get_all_mods.py index 6072b78d68031..b9d244f29fdf8 100755 --- a/build-scripts/get_all_mods.py +++ b/build-scripts/get_all_mods.py @@ -7,6 +7,7 @@ import glob import json +import os mods_this_time = [] @@ -62,6 +63,26 @@ def print_modlist(modlist, master_list): if e["category"] == "total_conversion": total_conversions.add(ident) +for r, d, f in os.walk('data/mods'): + if 'mod_interactions' not in d: + continue + if 'modinfo.json' not in f: + continue + ident = "" + info_path = os.path.join(r, 'modinfo.json') + mod_info = json.load(open(info_path, encoding='utf-8')) + for e in mod_info: + if(e["type"] == "MOD_INFO" and + ("obsolete" not in e or not e["obsolete"])): + ident = e["id"] + if ident == "": + continue + add_mods([ident]) + for mod in os.scandir(os.path.join(r, 'mod_interactions')): + mods_this_time.append(os.path.basename(mod.path)) + print(','.join(mods_this_time)) + mods_this_time.clear() + mods_remaining = set(all_mod_dependencies) # Make sure aftershock can load by itself.