1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

Binoculars / Map mods: Clarify key-activation of items in descriptions

Map mod:
Tune cyclic update interval.
Re-add HUD flags update on item 'use'.
This commit is contained in:
paramat 2017-10-24 04:51:53 +01:00 committed by paramat
parent 3f14d1012d
commit 36df80fc45
3 changed files with 11 additions and 6 deletions

View File

@ -47,7 +47,7 @@ minetest.after(4.7, cyclic_update)
-- Binoculars item -- Binoculars item
minetest.register_craftitem("binoculars:binoculars", { minetest.register_craftitem("binoculars:binoculars", {
description = "Binoculars", description = "Binoculars\nUse with 'Zoom' key",
inventory_image = "binoculars_binoculars.png", inventory_image = "binoculars_binoculars.png",
stack_max = 1, stack_max = 1,

View File

@ -32,8 +32,9 @@ WPD
Usage Usage
----- -----
In survival mode, use of the minimap requires the mapping kit item in your In survival mode, use of the minimap requires the mapping kit item in your
inventory. It can take up to 3 seconds for adding to or removal from inventory inventory. It can take up to 5 seconds for adding to or removal from inventory
to have an effect. to have an effect, however to instantly allow the use of the minimap 'use'
(leftclick) the item.
Minimap radar mode is always disallowed in survival mode. Minimap radar mode is always disallowed in survival mode.
Minimap and minimap radar mode are automatically allowed in creative mode and Minimap and minimap radar mode are automatically allowed in creative mode and

View File

@ -40,19 +40,23 @@ local function cyclic_update()
for _, player in ipairs(minetest.get_connected_players()) do for _, player in ipairs(minetest.get_connected_players()) do
map.update_hud_flags(player) map.update_hud_flags(player)
end end
minetest.after(3.1, cyclic_update) minetest.after(5.3, cyclic_update)
end end
minetest.after(3.1, cyclic_update) minetest.after(5.3, cyclic_update)
-- Mapping kit item -- Mapping kit item
minetest.register_craftitem("map:mapping_kit", { minetest.register_craftitem("map:mapping_kit", {
description = "Mapping Kit", description = "Mapping Kit\nUse with 'Minimap' key",
inventory_image = "map_mapping_kit.png", inventory_image = "map_mapping_kit.png",
stack_max = 1, stack_max = 1,
groups = {flammable = 3}, groups = {flammable = 3},
on_use = function(itemstack, user, pointed_thing)
map.update_hud_flags(user)
end,
}) })