1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-06-29 23:00:55 +02:00

Rename on_punch callback to avoid potential conflict with nodes

This commit is contained in:
stujones11
2017-04-21 18:33:30 +01:00
parent a11b3302e1
commit 1af0bb60f8
3 changed files with 6 additions and 6 deletions

View File

@ -305,8 +305,8 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili
local use = minetest.get_item_group(name, "armor_use") or 0
local damage = use > 0
local def = stack:get_definition() or {}
if type(def.on_punch) == "function" then
damage = def.on_punch(player, hitter, time_from_last_punch,
if type(def.on_punched) == "function" then
damage = def.on_punched(player, hitter, time_from_last_punch,
tool_capabilities) ~= false and damage == true
end
if damage == true and tool_capabilities then