Refactoring the data extraction for factorio

Extracted more information with a modified version of Archipelago extractor.   Matching PR for the extractor on its respective github.
This commit is contained in:
CaitSith2
2022-09-21 02:42:59 -07:00
parent 6d5ddf3cad
commit de8eff39b3
10 changed files with 504 additions and 72 deletions

View File

@@ -14,7 +14,7 @@ import Patch
from . import Options
from .Technologies import tech_table, recipes, free_sample_exclusions, progressive_technology_table, \
base_tech_table, tech_to_progressive_lookup, fluids
base_tech_table, tech_to_progressive_lookup, fluids, mods
template_env: Optional[jinja2.Environment] = None
@@ -34,7 +34,8 @@ base_info = {
"factorio_version": "1.1",
"dependencies": [
"base >= 1.1.0",
"? science-not-invited"
"? science-not-invited",
"! archipelago-extractor"
]
}
@@ -191,6 +192,8 @@ def generate_mod(world, output_directory: str):
f.write(locale_content)
info = base_info.copy()
info["name"] = mod_name
for mod in mods.values():
info["dependencies"].append(f"{mod.name} >= {mod.version}")
with open(os.path.join(mod_dir, "info.json"), "wt") as f:
json.dump(info, f, indent=4)