forked from mtcontrib/minetest_mana
Add proper function to initialize HUD bar
This commit is contained in:
parent
d21c370980
commit
cd0c0a51d2
4
init.lua
4
init.lua
@ -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))
|
hud.init_hudbar(player, "mana", mana.get(playername), mana.getmax(playername))
|
||||||
else
|
else
|
||||||
mana.hud_add(playername)
|
mana.hud_add(playername)
|
||||||
end
|
end
|
||||||
@ -243,7 +243,7 @@ if minetest.get_modpath("hudbars") ~= nil then
|
|||||||
|
|
||||||
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))
|
hud.change_hudbar(player, "mana", mana.get(playername), mana.getmax(playername))
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user