ensure the tech enabling chemical plant gets marked as advancement if required.

This commit is contained in:
CaitSith2 2021-11-25 16:56:44 -08:00
parent 4dfa1e3227
commit 383d0f1a66
1 changed files with 3 additions and 0 deletions

View File

@ -343,6 +343,9 @@ class Factorio(World):
if self.world.max_science_pack[self.player].value == MaxSciencePack.option_space_science_pack: if self.world.max_science_pack[self.player].value == MaxSciencePack.option_space_science_pack:
needed_recipes |= {"satellite"} needed_recipes |= {"satellite"}
if any([recipe.category == "chemistry" for _, recipe in self.custom_recipes.items()]):
needed_recipes |= {"chemical-plant"}
for recipe in needed_recipes: for recipe in needed_recipes:
recipe = self.custom_recipes.get(recipe, recipes[recipe]) recipe = self.custom_recipes.get(recipe, recipes[recipe])
self.advancement_technologies |= {tech.name for tech in recipe.unlocking_technologies} self.advancement_technologies |= {tech.name for tech in recipe.unlocking_technologies}