Skip to content

Commit

Permalink
Merge pull request #78676 from mqrause/mod_combos
Browse files Browse the repository at this point in the history
Improve test coverage of mod combinations with mod_interactions
  • Loading branch information
Maleclypse authored Dec 21, 2024
2 parents 5ccd156 + d791901 commit 16efaf3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build-scripts/get_all_mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import glob
import json
import os

mods_this_time = []

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 16efaf3

Please sign in to comment.