diff options
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -70,10 +70,22 @@ function food.support(group, item) minetest.override_item(item, {groups = g}) end -function food.disable(name) +function food.disable(name) + if type(name) == "table" then + for i = 1, #name do + food.disable(name[i]) + end + return + end food.disabled_modules[name] = true end +function food.disable_if(mod, name) + if minetest.get_modpath(mod) then + food.disable(name) + end +end + -- Adds a module function food.module(name, func, ingred) if food.disabled_modules[name] then |