Allow minimap and radar in Creative Mode

This commit is contained in:
Wuzzy 2020-03-31 02:10:09 +02:00
parent 392c89b88d
commit 611490ef98
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)