[boskid][2.0.5] filtering using allowed_module_categories does not remove invalid modules
Posted: Fri Oct 18, 2024 10:09 am
When switching a recipe with a module present in an assembling machine to one with a allowed_module_categories restriction, the game doesn't check if current modules are valid for the new recipes
sample data.lua code:
data.raw.recipe['iron-stick'].allowed_module_categories = {"speed"}
1. place crafting machine 3 and set the crafting recipe to iron gear wheel
2. insert efficiency module
3. switch recipe to iron stick
4. efficiency module stays in
sample data.lua code:
data.raw.recipe['iron-stick'].allowed_module_categories = {"speed"}
1. place crafting machine 3 and set the crafting recipe to iron gear wheel
2. insert efficiency module
3. switch recipe to iron stick
4. efficiency module stays in