Fix failure to roll seeds with silo: randomize_recipe

This commit is contained in:
CaitSith2
2021-09-21 23:05:14 -07:00
parent df0e8bc027
commit bfb6d44195

View File

@@ -189,6 +189,8 @@ class Factorio(World):
max_energy = remaining_energy * 0.75
min_energy = (remaining_energy - max_energy) / remaining_num_ingredients
ingredient = pool.pop()
if ingredient in ['stone', 'iron-ore', 'copper-ore', 'coal']:
continue
ingredient_recipe = min(all_product_sources[ingredient], key=lambda recipe: recipe.rel_cost)
ingredient_raw = sum((count for ingredient, count in ingredient_recipe.base_cost.items()))
ingredient_energy = ingredient_recipe.total_energy