Skip to content

Commit

Permalink
revert the commit "possible fixed minetest-mods#57 typo on entity on_…
Browse files Browse the repository at this point in the history
…punch" to on_punched

* related to https://codeberg.org/minenux/minetest-mod-3d_armor/issues/57
* related to minetest-mods#57
  • Loading branch information
mckaygerhard committed Feb 8, 2022
1 parent 5cd7854 commit 9cc9ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 3d_armor/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,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
Expand Down

0 comments on commit 9cc9ab9

Please sign in to comment.