forked from mtcontrib/minetest_mana
Fix fallback mana display
This commit is contained in:
parent
8a04e598e7
commit
6f1b549931
6
init.lua
6
init.lua
|
@ -282,13 +282,13 @@ else
|
|||
local player = minetest.get_player_by_name(playername)
|
||||
id = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = { x = 0.5, y=0.9 },
|
||||
position = { x = 0.5, y=1 },
|
||||
text = mana.manastring(playername),
|
||||
scale = { x = 0, y = 0 },
|
||||
alignment = { x = 1, y = 0},
|
||||
direction = 1,
|
||||
number = 0xFFFFFF,
|
||||
offset = { x = -200, y = 15}
|
||||
offset = { x = -262, y = -103}
|
||||
})
|
||||
mana.playerlist[playername].hudid = id
|
||||
return id
|
||||
|
@ -296,7 +296,7 @@ else
|
|||
|
||||
function mana.hud_update(playername)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
player:hud_change(mana.playerlist[playername].hudid, "number", mana.get(playername))
|
||||
player:hud_change(mana.playerlist[playername].hudid, "text", mana.manastring(playername))
|
||||
end
|
||||
|
||||
function mana.hud_remove(playername)
|
||||
|
|
Loading…
Reference in New Issue
Block a user