you mean these 2 in the library mod?TheSAguy wrote:I can't figure out how your productivity-limitations function works
function bobmods.lib.add_productivity_limitation(intermediate)
function bobmods.lib.add_productivity_limitations(intermediates)
Are you trying to use them yourself in your own mod?
Basically, what they do, when run, is search for all modules that include both the limitation= tag, and productivity= tag in the effect table.
if both these conditions are met, it will attempt to add the items
add_productivity_limitation will take a single recipe name, and add it to the limitation list.
add_productivity_limitations takes a table of recipe names, and does the same for each.
EG:
bobmods.lib.add_productivity_limitation("gunmetal-alloy") would add gunmetal's recipe to the list.
bobmods.lib.add_productivity_limitations({"gunmetal-alloy", "bob-lead-plate"}) would add the gunmetal recipe and the lead plate from lead oxide and carbon recipe to the limitation list.
It's best to use them in the data-updates phase, or even the data-final-fixes phase to make sure the recipe is actually loaded before you try to add it to the list.