1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-11-11 13:00:30 +01:00

Display correct heal attribute level, fixes #137

This commit is contained in:
stujones11 2018-05-13 16:52:29 +01:00
parent cc6fff2b04
commit 21716ffd31
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,8 @@ armor.set_player_armor = function(self, player)
change[group] = groups[group] / base change[group] = groups[group] / base
end end
for _, attr in pairs(self.attributes) do for _, attr in pairs(self.attributes) do
self.def[name][attr] = attributes[attr] local mult = attr == "heal" and self.config.heal_multiplier or 1
self.def[name][attr] = attributes[attr] * mult
end end
for _, phys in pairs(self.physics) do for _, phys in pairs(self.physics) do
self.def[name][phys] = physics[phys] self.def[name][phys] = physics[phys]

View File

@ -323,7 +323,6 @@ minetest.register_on_player_hpchange(function(player, hp_change)
local name = player:get_player_name() local name = player:get_player_name()
if name then if name then
local heal = armor.def[name].heal local heal = armor.def[name].heal
heal = heal * armor.config.heal_multiplier
if heal >= math.random(100) then if heal >= math.random(100) then
hp_change = 0 hp_change = 0
end end