Factorio: fix automation-level tech costs before automation (#1402)
* Factorio: fix automation-level tech costs before automation * Factorio: remove double-rolling of science cost
This commit is contained in:
parent
847582ff5f
commit
e7f8f40464
|
@ -198,6 +198,10 @@ class Factorio(World):
|
|||
self.multiworld.itempool.append(tech_item)
|
||||
else:
|
||||
loc = cost_sorted_locations[index]
|
||||
if index >= 0:
|
||||
# beginning techs - limit cost to 10
|
||||
# as automation is not achievable yet and hand-crafting for hours is not fun gameplay
|
||||
loc.count = min(loc.count, 10)
|
||||
loc.place_locked_item(tech_item)
|
||||
loc.revealed = True
|
||||
|
||||
|
@ -448,7 +452,7 @@ class FactorioScienceLocation(FactorioLocation):
|
|||
|
||||
# Factorio technology properties:
|
||||
ingredients: typing.Dict[str, int]
|
||||
count: int
|
||||
count: int = 0
|
||||
|
||||
def __init__(self, player: int, name: str, address: int, parent: Region):
|
||||
super(FactorioScienceLocation, self).__init__(player, name, address, parent)
|
||||
|
@ -460,8 +464,6 @@ class FactorioScienceLocation(FactorioLocation):
|
|||
for complexity in range(self.complexity):
|
||||
if parent.multiworld.tech_cost_mix[self.player] > parent.multiworld.random.randint(0, 99):
|
||||
self.ingredients[Factorio.ordered_science_packs[complexity]] = 1
|
||||
self.count = parent.multiworld.random.randint(parent.multiworld.min_tech_cost[self.player],
|
||||
parent.multiworld.max_tech_cost[self.player])
|
||||
|
||||
@property
|
||||
def factorio_ingredients(self) -> typing.List[typing.Tuple[str, int]]:
|
||||
|
|
Loading…
Reference in New Issue