mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-22 20:43:43 +01:00
Move shields level reduction to shields mod
This commit is contained in:
parent
3aac5c98f4
commit
5911447048
@ -217,13 +217,10 @@ armor.set_player_armor = function(self, player)
|
|||||||
end
|
end
|
||||||
for group, level in pairs(levels) do
|
for group, level in pairs(levels) do
|
||||||
if level > 0 then
|
if level > 0 then
|
||||||
if minetest.get_modpath("shields") then
|
level = level * armor.config.level_multiplier
|
||||||
level = level * 0.9
|
|
||||||
end
|
|
||||||
if material.name and material.count == #self.elements then
|
if material.name and material.count == #self.elements then
|
||||||
level = level * 1.1
|
level = level * 1.1
|
||||||
end
|
end
|
||||||
level = level * armor.config.level_multiplier
|
|
||||||
end
|
end
|
||||||
local base = self.registered_groups[group]
|
local base = self.registered_groups[group]
|
||||||
self.def[name].groups[group] = level
|
self.def[name].groups[group] = level
|
||||||
|
@ -2,6 +2,8 @@ local use_moreores = minetest.get_modpath("moreores")
|
|||||||
|
|
||||||
if minetest.global_exists("armor") and armor.elements then
|
if minetest.global_exists("armor") and armor.elements then
|
||||||
table.insert(armor.elements, "shield")
|
table.insert(armor.elements, "shield")
|
||||||
|
local mult = armor.config.level_multiplier or 1
|
||||||
|
armor.config.level_multiplier = mult * 0.9
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Regisiter Shields
|
-- Regisiter Shields
|
||||||
|
Loading…
Reference in New Issue
Block a user