forked from Wuzzy/realtest_mt5
Allow minimap and radar in Creative Mode
This commit is contained in:
parent
392c89b88d
commit
611490ef98
|
@ -70,11 +70,6 @@ end
|
||||||
-- Update appearance when the player joins
|
-- Update appearance when the player joins
|
||||||
minetest.register_on_joinplayer(player_update_visuals)
|
minetest.register_on_joinplayer(player_update_visuals)
|
||||||
|
|
||||||
-- Disable minimap to revert to 0.4.5 gameplay
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
|
||||||
player:hud_set_flags({minimap = false, minimap_radar = false})
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Check each player and apply animations
|
-- Check each player and apply animations
|
||||||
function player_step(dtime)
|
function player_step(dtime)
|
||||||
for _, pl in pairs(minetest.get_connected_players()) do
|
for _, pl in pairs(minetest.get_connected_players()) do
|
||||||
|
|
|
@ -3,7 +3,7 @@ hud = {}
|
||||||
--minetest.after(SAVE_INTERVAL, timer, SAVE_INTERVAL)
|
--minetest.after(SAVE_INTERVAL, timer, SAVE_INTERVAL)
|
||||||
|
|
||||||
local function hide_builtin(player)
|
local function hide_builtin(player)
|
||||||
player:hud_set_flags({crosshair = true, hotbar = true, healthbar = true, wielditem = true, breathbar = true})
|
player:hud_set_flags({crosshair = true, hotbar = true, healthbar = true, wielditem = true, breathbar = true})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,11 @@ local function costum_hud(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
-- 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
|
||||||
|
|
||||||
minetest.after(0.5, function(player)
|
minetest.after(0.5, function(player)
|
||||||
if player and player:is_player() then
|
if player and player:is_player() then
|
||||||
hide_builtin(player)
|
hide_builtin(player)
|
||||||
|
|
Loading…
Reference in New Issue