Simplify XP bar

This commit is contained in:
Wuzzy 2020-10-23 23:30:40 +02:00
parent fe1c8ca758
commit 3236dc0d8e
1 changed files with 7 additions and 11 deletions

View File

@ -69,7 +69,9 @@ hud_manager.add_hud = function(player,hud_name,def)
hud_elem_type = def.hud_elem_type, hud_elem_type = def.hud_elem_type,
position = def.position, position = def.position,
text = def.text, text = def.text,
text2 = def.text2,
number = def.number, number = def.number,
item = def.item,
direction = def.direction, direction = def.direction,
size = def.size, size = def.size,
offset = def.offset, offset = def.offset,
@ -163,20 +165,14 @@ minetest.register_on_joinplayer(function(player)
name = player:get_player_name() name = player:get_player_name()
temp_pool = pool[name] temp_pool = pool[name]
hud_manager.add_hud(player, "experience_bar_background",
{
hud_elem_type = "statbar", position = {x=0.5, y=1},
name = "experience bar background", text = "experience_bar_background.png",
number = 36, direction = 0,
offset = {x = (-8 * 28) - 29, y = -(48 + 24 + 16)},
size = { x=28, y=28 }, z_index = 10,
})
hud_manager.add_hud(player,"experience_bar", hud_manager.add_hud(player,"experience_bar",
{ {
hud_elem_type = "statbar", position = {x=0.5, y=1}, hud_elem_type = "statbar", position = {x=0.5, y=1},
name = "experience bar", text = "experience_bar.png", name = "experience bar",
number = temp_pool.bar, direction = 0, text = "experience_bar.png",
text2 = "experience_bar_background.png",
number = temp_pool.bar, item = 36,
direction = 0,
offset = {x = (-8 * 28) - 29, y = -(48 + 24 + 16)}, offset = {x = (-8 * 28) - 29, y = -(48 + 24 + 16)},
size = { x=28, y=28 }, z_index = 11, size = { x=28, y=28 }, z_index = 11,
}) })