diff --git a/worlds/factorio/Technologies.py b/worlds/factorio/Technologies.py index 0d32f51c..f89dc53e 100644 --- a/worlds/factorio/Technologies.py +++ b/worlds/factorio/Technologies.py @@ -501,6 +501,7 @@ def get_science_pack_pools() -> Dict[str, Set[str]]: item_stack_sizes: Dict[str, int] = items_future.result() non_stacking_items: Set[str] = {item for item, stack in item_stack_sizes.items() if stack == 1} stacking_items: Set[str] = set(item_stack_sizes) - non_stacking_items +valid_ingredients: Set[str] = stacking_items | fluids # cleanup async helpers pool.shutdown() diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 53c9897c..14304c4b 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -8,7 +8,7 @@ from .Technologies import base_tech_table, recipe_sources, base_technology_table all_ingredient_names, all_product_sources, required_technologies, get_rocket_requirements, \ progressive_technology_table, common_tech_table, tech_to_progressive_lookup, progressive_tech_table, \ get_science_pack_pools, Recipe, recipes, technology_table, tech_table, factorio_base_id, useless_technologies, \ - fluids, stacking_items + fluids, stacking_items, valid_ingredients from .Shapes import get_shapes from .Mod import generate_mod from .Options import factorio_options, MaxSciencePack, Silo, Satellite, TechTreeInformation, Goal @@ -231,7 +231,7 @@ class Factorio(World): """Generate a recipe from pool with time and cost similar to original * factor""" new_ingredients = {} # have to first sort for determinism, while filtering out non-stacking items - pool: typing.List[str] = sorted(pool & stacking_items) + pool: typing.List[str] = sorted(pool & valid_ingredients) # then sort with random data to shuffle self.world.random.shuffle(pool) target_raw = int(sum((count for ingredient, count in original.base_cost.items())) * factor)