mirror of
https://repo.or.cz/minetest_hbarmor.git
synced 2025-02-08 08:10:24 +01:00
Update legacy code check
This commit is contained in:
parent
71a30b5620
commit
96a796cce7
11
armor.lua
11
armor.lua
@ -1,9 +1,6 @@
|
|||||||
minetest.after(0, function()
|
if (not armor) or (not armor.def) then
|
||||||
if not armor.def then
|
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
|
||||||
minetest.after(2,minetest.chat_send_all,"#Better HUD: Please update your version of 3darmor")
|
end
|
||||||
HUD_SHOW_ARMOR = false
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
function hbarmor.get_armor(player)
|
function hbarmor.get_armor(player)
|
||||||
if not player or not armor.def then
|
if not player or not armor.def then
|
||||||
@ -32,6 +29,4 @@ function hbarmor.set_armor(player_name, ges_state, items)
|
|||||||
end
|
end
|
||||||
|
|
||||||
hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100)
|
hbarmor.armor[player_name] = math.min(lvl* (items * (100 / max_items)), 100)
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user