Factorio: add silo 'spawn' option

This commit is contained in:
black-sliver
2021-07-25 22:12:03 +02:00
committed by Fabian Dill
parent 08beb5fbe6
commit db0604f585
6 changed files with 177 additions and 10 deletions

View File

@@ -278,8 +278,9 @@ for ingredient_name in all_ingredient_names:
@functools.lru_cache(10)
def get_rocket_requirements(silo_recipe: Recipe, part_recipe: Recipe) -> Set[str]:
techs = set()
for ingredient in silo_recipe.ingredients:
techs |= recursively_get_unlocking_technologies(ingredient)
if silo_recipe:
for ingredient in silo_recipe.ingredients:
techs |= recursively_get_unlocking_technologies(ingredient)
for ingredient in part_recipe.ingredients:
techs |= recursively_get_unlocking_technologies(ingredient)
return {tech.name for tech in techs}