Change ItemPrototype.limitations to be string -> boolean format
Posted: Sun Jun 30, 2019 2:47 pm
Module prototypes have the property .limitations that is currently an array containing all recipes compatible with the module. If you want to find out if a given recipe is compatible, you have to iterate through the array.
It would make sense, for performance, for that attribute to be of the format [recipe_name] -> true, so you can find out whether a recipe is compatible through a single indexing operation. This is similar to how .allowed_effects works, among others.
It would make sense, for performance, for that attribute to be of the format [recipe_name] -> true, so you can find out whether a recipe is compatible through a single indexing operation. This is similar to how .allowed_effects works, among others.