forked from mtcontrib/minetest_mana
Adopt HUD bars mod 0.3.0
This commit is contained in:
parent
4275a72189
commit
f92470121f
6
init.lua
6
init.lua
@ -226,7 +226,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("hudbars") ~= nil then
|
||||
hud.hudtables.mana.add_all(player, mana.get(playername), mana.getmax(playername))
|
||||
hb.init_hudbar(player, "mana", mana.get(playername), mana.getmax(playername))
|
||||
else
|
||||
mana.hud_add(playername)
|
||||
end
|
||||
@ -239,11 +239,11 @@ end)
|
||||
]===]
|
||||
|
||||
if minetest.get_modpath("hudbars") ~= nil then
|
||||
hud.register_hudbar("mana", 0xFFFFFF, "Mana", { bar = "mana_bar.png", icon = "mana_icon.png" }, 0, 100, false)
|
||||
hb.register_hudbar("mana", 0xFFFFFF, "Mana", { bar = "mana_bar.png", icon = "mana_icon.png" }, 0, 100, false)
|
||||
|
||||
function mana.hud_update(playername)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
hud.change_hudbar(player, hud.hudtables.mana, mana.get(playername), mana.getmax(playername))
|
||||
hb.change_hudbar(player, "mana", mana.get(playername), mana.getmax(playername))
|
||||
end
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user