Add wear only to spacesuit parts

This commit is contained in:
coil
2019-06-11 14:59:27 -04:00
parent 4b3b497089
commit 9308971cf5
+4 -2
View File
@@ -29,8 +29,10 @@ minetest.register_globalstep(function(dtime)
for i, stack in pairs(armor_inv:get_list("armor")) do for i, stack in pairs(armor_inv:get_list("armor")) do
if not stack:is_empty() then if not stack:is_empty() then
local name = stack:get_name() local name = stack:get_name()
local use = minetest.get_item_group(name, "armor_use") or 0 if name:sub(1, 10) == "spacesuit:" then
armor:damage(player, i, stack, use) local use = minetest.get_item_group(name, "armor_use") or 0
armor:damage(player, i, stack, use)
end
end end
end end