mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-27 11:10:39 +01:00
Display correct heal attribute level, fixes #137
This commit is contained in:
parent
cc6fff2b04
commit
21716ffd31
@ -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]
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user