forked from MineClone5/MineClone5
Allow minimap for free in Creative Mode
This commit is contained in:
parent
6f9d8a5663
commit
8dcb015182
|
@ -32,8 +32,8 @@ minetest.register_craftitem("mcl_maps:empty_map", {
|
|||
-- has a very greatly zoomed-out version and even a radar mode
|
||||
minetest.register_craftitem("mcl_maps:filled_map", {
|
||||
description = "Map",
|
||||
_doc_items_longdesc = "Maps show your surroundings as you explore the world. They can even show you the world like a radar. MAGIC!\nNote: Maps are incomplete and subject to change in future versions of MineClone 2.",
|
||||
_doc_items_usagehelp = "Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key ([F9] by default).",
|
||||
_doc_items_longdesc = "Maps show your surroundings as you explore the world. They can even show you the world like a radar. MAGIC!\nNote: Maps are subject to change in future versions of MineClone 2.",
|
||||
_doc_items_usagehelp = "Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key ([F9] by default).\nIn Creative Mode, you don't need this item; the minimap is always available.",
|
||||
inventory_image = "mcl_maps_map_filled.png^(mcl_maps_map_filled_markings.png^[colorize:#000000)",
|
||||
stack_max = 1,
|
||||
})
|
||||
|
@ -61,7 +61,7 @@ end
|
|||
|
||||
-- Checks if player is still allowed to display the minimap
|
||||
local function update_minimap(player)
|
||||
if has_item_in_hotbar(player, "mcl_maps:filled_map") then
|
||||
if minetest.settings:get_bool("creative_mode") or has_item_in_hotbar(player, "mcl_maps:filled_map") then
|
||||
player:hud_set_flags({minimap = true})
|
||||
else
|
||||
player:hud_set_flags({minimap = false})
|
||||
|
@ -73,6 +73,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
end)
|
||||
|
||||
local updatetimer = 0
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
minetest.register_globalstep(function(dtime)
|
||||
updatetimer = updatetimer + dtime
|
||||
if updatetimer > 0.1 then
|
||||
|
@ -83,3 +84,4 @@ minetest.register_globalstep(function(dtime)
|
|||
updatetimer = updatetimer - dtime
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -7,7 +7,6 @@ local wip_items = {
|
|||
"mcl_end:chorus_flower",
|
||||
"mcl_end:chorus_flower_dead",
|
||||
"mcl_fishing:fishing_rod",
|
||||
"mcl_maps:filled_map",
|
||||
"mcl_maps:empty_map",
|
||||
"gemalde:node_1",
|
||||
"mcl_observers:observer",
|
||||
|
|
Loading…
Reference in New Issue