From: paramat Date: Tue, 24 Oct 2017 03:51:53 +0000 (+0100) Subject: Binoculars / Map mods: Clarify key-activation of items in descriptions X-Git-Tag: 5.0.0~157 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=36df80fc45c4797a7b917c494f9dc9689d4e729e;p=oweals%2Fminetest_game.git Binoculars / Map mods: Clarify key-activation of items in descriptions Map mod: Tune cyclic update interval. Re-add HUD flags update on item 'use'. --- diff --git a/mods/binoculars/init.lua b/mods/binoculars/init.lua index 050605c1..cd07ef9b 100644 --- a/mods/binoculars/init.lua +++ b/mods/binoculars/init.lua @@ -47,7 +47,7 @@ minetest.after(4.7, cyclic_update) -- Binoculars item minetest.register_craftitem("binoculars:binoculars", { - description = "Binoculars", + description = "Binoculars\nUse with 'Zoom' key", inventory_image = "binoculars_binoculars.png", stack_max = 1, diff --git a/mods/map/README.txt b/mods/map/README.txt index c6f413ba..8f35f696 100644 --- a/mods/map/README.txt +++ b/mods/map/README.txt @@ -32,8 +32,9 @@ WPD Usage ----- 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 -to have an effect. +inventory. It can take up to 5 seconds for adding to or removal from inventory +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 and minimap radar mode are automatically allowed in creative mode and diff --git a/mods/map/init.lua b/mods/map/init.lua index 412f76d9..03024fa0 100644 --- a/mods/map/init.lua +++ b/mods/map/init.lua @@ -40,19 +40,23 @@ local function cyclic_update() for _, player in ipairs(minetest.get_connected_players()) do map.update_hud_flags(player) end - minetest.after(3.1, cyclic_update) + minetest.after(5.3, cyclic_update) end -minetest.after(3.1, cyclic_update) +minetest.after(5.3, cyclic_update) -- Mapping kit item minetest.register_craftitem("map:mapping_kit", { - description = "Mapping Kit", + description = "Mapping Kit\nUse with 'Minimap' key", inventory_image = "map_mapping_kit.png", stack_max = 1, groups = {flammable = 3}, + + on_use = function(itemstack, user, pointed_thing) + map.update_hud_flags(user) + end, })