Better Module Limitations
Posted: Mon Feb 18, 2019 1:34 pm
What?
Add more data to a module limitation that determines if the module is allowed inside each type of entity.This would be for each individual machine (for example, allowed_machines = {"electric-mining-drill", "assembling-machine-2", "assembling-machine-3"}) so I could whitelist machines I wanted the module to work with.
Why?
As of version 0.16, modules can be added to assembling machines, mining drills, labs, rocket silos, furnaces, and beacons.Right now the only limitations are that entities can set allowed effects (like beacons can't handle productivity), and that there is a recipe limitation (a whitelist like the productivity module has), but the recipe limitation only applies to assembling machines, rocket silos, and furnaces that are currently smelting something. The recipe limitation has no effect on modules in labs, mining drills, beacons, and furnaces that are idle.
I would like to create a module that is allowed in some types of machines but not others, but the recipe limitations cannot disallow it from certain machines, and if I messed around with the allowed effects I might prevent certain types of base-game modules from being used in machines.
See also:
Allowed/forbidden module list
Allow module only in mining drills