1
0
Fork 0

Disable radar mode in survival

This commit is contained in:
Wuzzy 2019-03-08 01:59:45 +01:00
parent 3cfdb85926
commit 2e738a39a4
2 changed files with 12 additions and 7 deletions

View File

@ -430,11 +430,11 @@ S("There are 2 minimap modes and 3 zoom levels.").."\n\n"..
S("Surface mode (image 1) is a top-down view of the world, roughly resembling the colors of the blocks this world is made of. It only shows the topmost blocks, everything below is hidden, like a satellite photo. Surface mode is useful if you got lost.").."\n\n"..
S("Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon.").."\n\n"..
S("Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon. Radar mode is only available in Creative Mode").."\n\n"..
S("There are also two different rotation modes. In “square mode”, the rotation of the minimap is fixed. If you press [Shift]+[F9] to switch to “circle mode”, the minimap will instead rotate with your looking direction, so “up” is always your looking direction.").."\n\n"..
S("In some games, the minimap may be disabled.").."\n\n"..
S("In other games, the minimap may be disabled.").."\n\n"..
S("• Toggle minimap mode: [F9]").."\n"..
S("• Toggle minimap rotation mode: [Shift]+[F9]"),
@ -767,7 +767,7 @@ S("• Mined blocks don't drop items").."\n"..
S("• Items don't get used up").."\n"..
S("• Tools don't wear off").."\n"..
S("• You can eat food whenever you want").."\n"..
S("• You can always use the minimap").."\n\n"..
S("• You can always use the minimap (including radar mode)").."\n\n"..
S("Damage is not affected by Creative Mode, it needs to be disabled seperately.")
}})

View File

@ -34,7 +34,7 @@ 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 = S("Map"),
_doc_items_longdesc = S("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_longdesc = S("Maps show your surroundings as you explore the world."),
_doc_items_usagehelp = S("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."),
groups = { tool = 1 },
inventory_image = "mcl_maps_map_filled.png^(mcl_maps_map_filled_markings.png^[colorize:#000000)",
@ -64,10 +64,15 @@ end
-- Checks if player is still allowed to display the minimap
local function update_minimap(player)
if minetest.settings:get_bool("creative_mode") or has_item_in_hotbar(player, "mcl_maps:filled_map") then
player:hud_set_flags({minimap = true})
local creative = minetest.settings:get_bool("creative_mode")
if creative then
player:hud_set_flags({minimap=true, minimap_radar = true})
else
player:hud_set_flags({minimap = false})
if has_item_in_hotbar(player, "mcl_maps:filled_map") then
player:hud_set_flags({minimap = true, minimap_radar = false})
else
player:hud_set_flags({minimap = false, minimap_radar = false})
end
end
end