From a3a68de34127ca0897265e331f5c899ccbf3c506 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 26 Jun 2021 06:05:38 +0200 Subject: [PATCH] Factorio: only create events for required technologies --- worlds/factorio/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index ec6bf1da..8ca0a51c 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -44,7 +44,7 @@ class Factorio(World): event = Item("Victory", True, None, player) self.world.push_item(location, event, False) location.event = location.locked = True - for ingredient in all_ingredient_names: + for ingredient in self.world.max_science_pack[self.player].get_allowed_packs(): location = Location(player, f"Automate {ingredient}", None, nauvis) nauvis.locations.append(location) event = Item(f"Automated {ingredient}", True, None, player) @@ -60,7 +60,7 @@ class Factorio(World): shapes = get_shapes(self) if world.logic[player] != 'nologic': from worlds.generic import Rules - for ingredient in all_ingredient_names: + for ingredient in self.world.max_science_pack[self.player].get_allowed_packs(): location = world.get_location(f"Automate {ingredient}", player) location.access_rule = lambda state, ingredient=ingredient: \ all(state.has(technology.name, player) for technology in required_technologies[ingredient])