2015-06-13 17:28:25 -05:00
|
|
|
energy = {}
|
|
|
|
|
|
|
|
dofile(minetest.get_modpath("energy").."/energy.lua")
|
|
|
|
|
|
|
|
hud.register("energy", {
|
|
|
|
hud_elem_type = "statbar",
|
|
|
|
position = {x = 0.5, y = 1},
|
|
|
|
offset = {x=15,y=-113},
|
|
|
|
size = HUD_SB_SIZE,
|
|
|
|
text = "hud_energy_fg.png",
|
|
|
|
number = 20,
|
|
|
|
alignment = {x=-1,y=-1},
|
|
|
|
background = "hud_energy_bg.png",
|
|
|
|
--autohide_bg = true,
|
|
|
|
max = 20,
|
2015-12-03 22:22:04 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
local energy_tick = 5
|
|
|
|
adventuretest.register_pl_hook(energy.update_energy,energy_tick)
|