Skip to content

Commit 36df80f

Browse files
committed
Binoculars / Map mods: Clarify key-activation of items in descriptions
Map mod: Tune cyclic update interval. Re-add HUD flags update on item 'use'.
1 parent 3f14d10 commit 36df80f

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

mods/binoculars/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ minetest.after(4.7, cyclic_update)
4747
-- Binoculars item
4848

4949
minetest.register_craftitem("binoculars:binoculars", {
50-
description = "Binoculars",
50+
description = "Binoculars\nUse with 'Zoom' key",
5151
inventory_image = "binoculars_binoculars.png",
5252
stack_max = 1,
5353

mods/map/README.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ WPD
3232
Usage
3333
-----
3434
In survival mode, use of the minimap requires the mapping kit item in your
35-
inventory. It can take up to 3 seconds for adding to or removal from inventory
36-
to have an effect.
35+
inventory. It can take up to 5 seconds for adding to or removal from inventory
36+
to have an effect, however to instantly allow the use of the minimap 'use'
37+
(leftclick) the item.
3738
Minimap radar mode is always disallowed in survival mode.
3839

3940
Minimap and minimap radar mode are automatically allowed in creative mode and

mods/map/init.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,23 @@ local function cyclic_update()
4040
for _, player in ipairs(minetest.get_connected_players()) do
4141
map.update_hud_flags(player)
4242
end
43-
minetest.after(3.1, cyclic_update)
43+
minetest.after(5.3, cyclic_update)
4444
end
4545

46-
minetest.after(3.1, cyclic_update)
46+
minetest.after(5.3, cyclic_update)
4747

4848

4949
-- Mapping kit item
5050

5151
minetest.register_craftitem("map:mapping_kit", {
52-
description = "Mapping Kit",
52+
description = "Mapping Kit\nUse with 'Minimap' key",
5353
inventory_image = "map_mapping_kit.png",
5454
stack_max = 1,
5555
groups = {flammable = 3},
56+
57+
on_use = function(itemstack, user, pointed_thing)
58+
map.update_hud_flags(user)
59+
end,
5660
})
5761

5862

0 commit comments

Comments
 (0)