diff options
author | rubenwardy <rubenwardy@gmail.com> | 2014-08-31 17:40:35 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2014-08-31 17:40:35 +0100 |
commit | a574323b568bef6f719c23b552f8c8cb8f33f7ea (patch) | |
tree | 0d9abe9cdc7a615092f068cbb61e3960f26c6f63 /api.lua | |
parent | ba7a432e0511e70d6bfba43de1b7a6fb61fe17a8 (diff) |
Support farming redo
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 |