This commit is contained in:
2026-01-24 19:11:47 -05:00
parent 4025850d6f
commit bfabc8afc0
2 changed files with 1748 additions and 10 deletions

View File

@@ -14,10 +14,11 @@ def generic_constructor(loader, tag_suffix, node):
yaml.SafeLoader.add_multi_constructor('!', generic_constructor) yaml.SafeLoader.add_multi_constructor('!', generic_constructor)
def parse_recipes(directory): def parse_recipes(directories):
recipes = [] recipes = []
for directory in directories:
for filename in os.listdir(directory): for filename in os.listdir(directory):
if filename.endswith(".yml"): if filename.endswith(".yml"):
with open(os.path.join(directory, filename), 'r') as f: with open(os.path.join(directory, filename), 'r') as f:
@@ -67,7 +68,7 @@ def process_recipes(raw_recipes):
return processed return processed
if __name__ == "__main__": if __name__ == "__main__":
raw = parse_recipes('./mixingrecipes') raw = parse_recipes(['./mixingrecipes', './Prototypes/_Goobstation/Recipes/Reactions/'])
processed = process_recipes(raw) processed = process_recipes(raw)
with open('recipes.json', 'w') as f: with open('recipes.json', 'w') as f:

File diff suppressed because it is too large Load Diff