Display armor points properly

This commit is contained in:
Wuzzy 2020-02-17 20:19:07 +01:00
parent 2e6610da42
commit e3b68c4364
8 changed files with 18 additions and 37 deletions

View file

@ -205,7 +205,7 @@ armor.get_armor_points = function(self, player)
for i=1, 6 do
local stack = player_inv:get_stack("armor", i)
if stack:get_count() > 0 then
local p = stack:get_definition().groups.mcl_armor_points
local p = minetest.get_item_group(stack:get_name(), "mcl_armor_points")
if p then
pts = pts + p
end