Factorio: inflate location pool (#2422)
This commit is contained in:
parent
5a7d69c8b4
commit
72cb8b7d60
|
@ -3,18 +3,13 @@ from typing import Dict, List
|
||||||
from .Technologies import factorio_base_id
|
from .Technologies import factorio_base_id
|
||||||
from .Options import MaxSciencePack
|
from .Options import MaxSciencePack
|
||||||
|
|
||||||
boundary: int = 0xff
|
|
||||||
total_locations: int = 0xff
|
|
||||||
|
|
||||||
assert total_locations <= boundary
|
|
||||||
|
|
||||||
|
|
||||||
def make_pools() -> Dict[str, List[str]]:
|
def make_pools() -> Dict[str, List[str]]:
|
||||||
pools: Dict[str, List[str]] = {}
|
pools: Dict[str, List[str]] = {}
|
||||||
for i, pack in enumerate(MaxSciencePack.get_ordered_science_packs(), start=1):
|
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}-"
|
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
|
return pools
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -541,7 +541,7 @@ class FactorioScienceLocation(FactorioLocation):
|
||||||
super(FactorioScienceLocation, self).__init__(player, name, address, parent)
|
super(FactorioScienceLocation, self).__init__(player, name, address, parent)
|
||||||
# "AP-{Complexity}-{Cost}"
|
# "AP-{Complexity}-{Cost}"
|
||||||
self.complexity = int(self.name[3]) - 1
|
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}
|
self.ingredients = {Factorio.ordered_science_packs[self.complexity]: 1}
|
||||||
for complexity in range(self.complexity):
|
for complexity in range(self.complexity):
|
||||||
|
|
Loading…
Reference in New Issue