1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-26 10:40:39 +01:00

temporary workaround for #24

This commit is contained in:
Sirrobzeroone 2020-12-11 10:23:05 +01:00 committed by BuckarooBanzay
parent 713b0c81d4
commit 3b97763fdc

View File

@ -356,6 +356,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