Adopt HUD bars mod 0.3.0

This commit is contained in:
Wuzzy 2015-02-10 02:49:01 +01:00
parent 4275a72189
commit f92470121f

View File

@ -226,7 +226,7 @@ minetest.register_on_joinplayer(function(player)
end end
if minetest.get_modpath("hudbars") ~= nil then 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 else
mana.hud_add(playername) mana.hud_add(playername)
end end
@ -239,11 +239,11 @@ end)
]===] ]===]
if minetest.get_modpath("hudbars") ~= nil then 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) function mana.hud_update(playername)
local player = minetest.get_player_by_name(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 end
else else