2020-03-30 22:41:58 +02:00
|
|
|
hud = {}
|
|
|
|
|
|
|
|
--minetest.after(SAVE_INTERVAL, timer, SAVE_INTERVAL)
|
|
|
|
|
|
|
|
local function hide_builtin(player)
|
2020-03-31 02:10:09 +02:00
|
|
|
player:hud_set_flags({crosshair = true, hotbar = true, healthbar = true, wielditem = true, breathbar = true})
|
2020-03-30 22:41:58 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local function costum_hud(player)
|
|
|
|
|
|
|
|
--fancy hotbar
|
|
|
|
player:hud_set_hotbar_image("hud_hotbar.png")
|
|
|
|
player:hud_set_hotbar_selected_image("hud_hotbar_selected.png")
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.register_on_joinplayer(function(player)
|
2020-03-31 02:10:09 +02:00
|
|
|
-- Disable minimap to revert to 0.4.5 gameplay
|
|
|
|
if not minetest.settings:get_bool("creative_mode") then
|
|
|
|
player:hud_set_flags({minimap = false, minimap_radar = false})
|
|
|
|
end
|
|
|
|
|
2020-03-31 02:08:25 +02:00
|
|
|
minetest.after(0.5, function(player)
|
|
|
|
if player and player:is_player() then
|
|
|
|
hide_builtin(player)
|
|
|
|
costum_hud(player)
|
|
|
|
end
|
|
|
|
end, player)
|
2020-03-30 22:41:58 +02:00
|
|
|
end)
|