Exclude a module category from default
Posted: Sat May 03, 2025 2:19 am
It feels like allowed_module_categories works backwards to how it ideally should. I'm creating a new module category that I only want used on particular machines. To make this work, I need to set allowed_module_categories on every other machine! As by default, machines can accept every category.
Could a new property be added to ModuleCategory? Something like include_in_default that defaults to true.
The current design makes mod compatibility very difficult when you have multiple mods enabled that add new recipe categories.
Example:
In Angel's, we have Bio Yield Modules. A special type of module that should only be allowed in farms.
Currently in data-updates I have to make a list of all module categories that exist, excluding my new category. Then loop through every beacon, crafting machine, lab, and mining drill and set allowed_module_categories if hasn't already been set.
With my proposed solution, I would no longer need to modify entities other than Angel's farms. I just need to set include_in_default = false on my new module category.
Could a new property be added to ModuleCategory? Something like include_in_default that defaults to true.
The current design makes mod compatibility very difficult when you have multiple mods enabled that add new recipe categories.
Example:
In Angel's, we have Bio Yield Modules. A special type of module that should only be allowed in farms.
Currently in data-updates I have to make a list of all module categories that exist, excluding my new category. Then loop through every beacon, crafting machine, lab, and mining drill and set allowed_module_categories if hasn't already been set.
With my proposed solution, I would no longer need to modify entities other than Angel's farms. I just need to set include_in_default = false on my new module category.