From e7f8f40464fac55bc425b9b13d93af16f9b3d99e Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 24 Jan 2023 03:36:50 +0100 Subject: [PATCH] Factorio: fix automation-level tech costs before automation (#1402) * Factorio: fix automation-level tech costs before automation * Factorio: remove double-rolling of science cost --- worlds/factorio/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 0053a016..13603d16 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -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]]: