Skip to content

Factorio: inflate location pool #2422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions worlds/factorio/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
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


Expand Down
2 changes: 1 addition & 1 deletion worlds/factorio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def __init__(self, player: int, name: str, address: int, parent: Region):
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):
Expand Down