From f7e86b466b1d1f7b25704501360a7642fbdaf20f Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Thu, 28 Oct 2021 09:46:27 -0500 Subject: [PATCH] temporary workaround for #24 * backport https://github.com/minetest-mods/3d_armor/commit/3b97763fdc964581e7989cbf73388ca7918b9bcd * it try to fix the problem of https://github.com/minetest-mods/3d_armor/issues/24 --- 3d_armor/api.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/3d_armor/api.lua b/3d_armor/api.lua index 1a904b40..e3ef1d53 100644 --- a/3d_armor/api.lua +++ b/3d_armor/api.lua @@ -340,6 +340,9 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili local groupcaps = tool_capabilities.groupcaps or {} local uses = 0 damage = false + if next(groupcaps) == nil then + damage = true + end for group, caps in pairs(groupcaps) do local maxlevel = caps.maxlevel or 0 local diff = maxlevel - level