diff options
author | Wuzzy <almikes@aol.com> | 2016-08-05 14:28:19 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-05 14:28:19 +0200 |
commit | be3d491cf8e44ac1943747729cdb90311a08ae87 (patch) | |
tree | 3f5931eabe6e1593977366e443f395f9a59ee2da | |
parent | f028f6c8d823fbb3db9f9177fef8586a8f096d45 (diff) |
Use minetest.override_item
-rw-r--r-- | hunger.lua | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -57,8 +57,7 @@ end local function overwrite(name, hunger_change, replace_with_item, poisen, heal) local tab = minetest.registered_items[name] if tab == nil then return end - tab.on_use = hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal) - minetest.registered_items[name] = tab + minetest.override_item(name, {on_use = hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal) }) end if minetest.get_modpath("default") ~= nil then |