mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-22 20:43:43 +01:00
Fix registered group level display
This commit is contained in:
parent
291b34bfc6
commit
4fc51971d1
@ -218,6 +218,7 @@ armor.set_player_armor = function(self, player)
|
|||||||
local level = def.groups["armor_"..element]
|
local level = def.groups["armor_"..element]
|
||||||
levels["fleshy"] = levels["fleshy"] + level
|
levels["fleshy"] = levels["fleshy"] + level
|
||||||
end
|
end
|
||||||
|
break
|
||||||
end
|
end
|
||||||
-- DEPRECATED, use armor_groups instead
|
-- DEPRECATED, use armor_groups instead
|
||||||
if def.groups["armor_radiation"] and levels["radiation"] then
|
if def.groups["armor_radiation"] and levels["radiation"] then
|
||||||
@ -419,8 +420,9 @@ armor.get_armor_formspec = function(self, name, listring)
|
|||||||
for _, attr in pairs(self.attributes) do
|
for _, attr in pairs(self.attributes) do
|
||||||
formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr])
|
formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr])
|
||||||
end
|
end
|
||||||
for _, group in pairs(self.attributes) do
|
for group, _ in pairs(self.registered_groups) do
|
||||||
formspec = formspec:gsub("armor_group_"..group, armor.def[name][group])
|
formspec = formspec:gsub("armor_group_"..group,
|
||||||
|
armor.def[name].groups[group])
|
||||||
end
|
end
|
||||||
return formspec
|
return formspec
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user