Skip to content

Commit ab6d0fd

Browse files
Berserker66FlySniper
authored andcommitted
Factorio: inflate location pool (ArchipelagoMW#2422)
1 parent 83cae99 commit ab6d0fd

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

worlds/factorio/Locations.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@
33
from .Technologies import factorio_base_id
44
from .Options import MaxSciencePack
55

6-
boundary: int = 0xff
7-
total_locations: int = 0xff
8-
9-
assert total_locations <= boundary
10-
116

127
def make_pools() -> Dict[str, List[str]]:
138
pools: Dict[str, List[str]] = {}
149
for i, pack in enumerate(MaxSciencePack.get_ordered_science_packs(), start=1):
15-
max_needed: int = 0xff
10+
max_needed: int = 999
1611
prefix: str = f"AP-{i}-"
17-
pools[pack] = [prefix + hex(x)[2:].upper().zfill(2) for x in range(1, max_needed + 1)]
12+
pools[pack] = [prefix + str(x).upper().zfill(3) for x in range(1, max_needed + 1)]
1813
return pools
1914

2015

worlds/factorio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def __init__(self, player: int, name: str, address: int, parent: Region):
541541
super(FactorioScienceLocation, self).__init__(player, name, address, parent)
542542
# "AP-{Complexity}-{Cost}"
543543
self.complexity = int(self.name[3]) - 1
544-
self.rel_cost = int(self.name[5:], 16)
544+
self.rel_cost = int(self.name[5:])
545545

546546
self.ingredients = {Factorio.ordered_science_packs[self.complexity]: 1}
547547
for complexity in range(self.complexity):

0 commit comments

Comments
 (0)