From 1bb99d391dc6add31043af53d1c045b0fa692395 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 30 Oct 2022 14:34:18 +0100 Subject: [PATCH] Factorio: deterministic locations --- worlds/factorio/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index f1bdce17..b07c21ec 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -91,8 +91,9 @@ class Factorio(World): location_pool = [] - for pack in self.world.max_science_pack[self.player].get_allowed_packs(): + for pack in sorted(self.world.max_science_pack[self.player].get_allowed_packs()): location_pool.extend(location_pools[pack]) + location_names = self.world.random.sample(location_pool, location_count) self.locations = [FactorioScienceLocation(player, loc_name, self.location_name_to_id[loc_name], nauvis) for loc_name in location_names] @@ -107,7 +108,7 @@ class Factorio(World): event = FactorioItem("Victory", ItemClassification.progression, None, player) location.place_locked_item(event) - for ingredient in self.world.max_science_pack[self.player].get_allowed_packs(): + for ingredient in sorted(self.world.max_science_pack[self.player].get_allowed_packs()): location = FactorioLocation(player, f"Automate {ingredient}", None, nauvis) nauvis.locations.append(location) event = FactorioItem(f"Automated {ingredient}", ItemClassification.progression, None, player)