From 72cb8b7d6080a088a3f129f1f3e7cf09e4949daf Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 7 Nov 2023 21:02:28 +0100 Subject: [PATCH] Factorio: inflate location pool (#2422) --- worlds/factorio/Locations.py | 9 ++------- worlds/factorio/__init__.py | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/worlds/factorio/Locations.py b/worlds/factorio/Locations.py index f9db5f4a..52f0954c 100644 --- a/worlds/factorio/Locations.py +++ b/worlds/factorio/Locations.py @@ -3,18 +3,13 @@ from typing import Dict, List from .Technologies import factorio_base_id from .Options import MaxSciencePack -boundary: int = 0xff -total_locations: int = 0xff - -assert total_locations <= boundary - def make_pools() -> Dict[str, List[str]]: pools: Dict[str, List[str]] = {} for i, pack in enumerate(MaxSciencePack.get_ordered_science_packs(), start=1): - max_needed: int = 0xff + max_needed: int = 999 prefix: str = f"AP-{i}-" - pools[pack] = [prefix + hex(x)[2:].upper().zfill(2) for x in range(1, max_needed + 1)] + pools[pack] = [prefix + str(x).upper().zfill(3) for x in range(1, max_needed + 1)] return pools diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 8308bb2d..eb078720 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -541,7 +541,7 @@ class FactorioScienceLocation(FactorioLocation): super(FactorioScienceLocation, self).__init__(player, name, address, parent) # "AP-{Complexity}-{Cost}" self.complexity = int(self.name[3]) - 1 - self.rel_cost = int(self.name[5:], 16) + self.rel_cost = int(self.name[5:]) self.ingredients = {Factorio.ordered_science_packs[self.complexity]: 1} for complexity in range(self.complexity):