make Factorio rocket silo a static (and therefore local) node

This commit is contained in:
Fabian Dill
2021-06-15 15:32:40 +02:00
parent 8d08b55e69
commit d9824d26d2
4 changed files with 13 additions and 11 deletions

View File

@@ -66,7 +66,7 @@ class CustomTechnology(Technology):
def __init__(self, origin: Technology, world, allowed_packs: Set[str], player: int):
ingredients = origin.ingredients & allowed_packs
self.player = player
if world.random_tech_ingredients[player]:
if world.random_tech_ingredients[player] and origin.name not in world.worlds[player].static_nodes:
ingredients = list(ingredients)
ingredients.sort() # deterministic sample
ingredients = world.random.sample(ingredients, world.random.randint(1, len(ingredients)))