From 2453d3fa63427bf57e675a154deb7637e38199b4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 11 Mar 2017 03:38:08 +0100 Subject: [PATCH] Help texts: Button, redstone lamp, commandblock --- mods/ITEMS/REDSTONE/mesecons_button/init.lua | 5 +++++ mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua | 13 +++++++++++++ mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua | 1 + 3 files changed, 19 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mesecons_button/init.lua b/mods/ITEMS/REDSTONE/mesecons_button/init.lua index bcb34b44..b5603915 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -20,6 +20,7 @@ end local boxes_off = { -4/16, -2/16, 8/16, 4/16, 2/16, 6/16 } -- The button local boxes_on = { -4/16, -2/16, 8/16, 4/16, 2/16, 7/16 } -- The button +local buttonuse = "Rightclick the button to push it and send a redstone impulse." minetest.register_node("mesecons_button:button_stone_off", { drawtype = "nodebox", tiles = {"default_stone.png"}, @@ -40,6 +41,8 @@ minetest.register_node("mesecons_button:button_stone_off", { }, groups = {handy=1,pickaxey=1, attached_node=1, dig_by_water=1}, description = "Stone Button", + _doc_items_longdesc = "A stone button is a redstone component made out of stone which gives a short impulse to a redstone component behind it when it pushed.", + _doc_items_usagehelp = buttonuse, on_rightclick = function (pos, node) mesecon:swap_node(pos, "mesecons_button:button_stone_on") mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node)) @@ -106,6 +109,8 @@ minetest.register_node("mesecons_button:button_wood_off", { }, groups = {handy=1,axey=1, attached_node=1, dig_by_water=1}, description = "Wooden Button", + _doc_items_longdesc = "A wooden button is a redstone component made out of wood which gives a short impulse to a redstone component behind it when it pushed.", + _doc_items_usagehelp = buttonuse, on_rightclick = function (pos, node) mesecon:swap_node(pos, "mesecons_button:button_wood_on") mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node)) diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua index e74dcac2..4a1aff48 100644 --- a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua @@ -176,6 +176,19 @@ end minetest.register_node("mesecons_commandblock:commandblock_off", { description = "Command Block", + + _doc_items_longdesc = +"Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power.", + _doc_items_usagehelp = +[[Initially, a command block does not have any commands and does nothing. Rightclick the command block to edit its commands. Refer to the help entry about server commands to understand how they work. Each line contains a single command, the commands will be executed from top to bottom. The commands DO NOT require a leading slash. + +You can optionally use the following placeholders in your commands: +• “@nearest” is replaced by the name of the player nearest to the command block +• “@farthest” is replaced by the name of the player farthest away from the command block +• “@random” is replaced by the name of a random player currently connected + +To execute the commands, supply the command block with redstone power once. To execute them again, you have to turn the power off and on again.]], + tiles = {{name="jeija_commandblock_off.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=2}}}, groups = {creative_breakable=1, mesecon_effector_off=1, not_in_creative_inventory=1}, drop = "", diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua index 58fda907..3a76f1bb 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua @@ -4,6 +4,7 @@ minetest.register_node("mesecons_lightstone:lightstone_off", { groups = {handy=1, mesecon_effector_off = 1, mesecon = 2}, is_ground_content = false, description= "Redstone Lamp", + _doc_items_longdesc = "Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.", sounds = mcl_sounds.node_sound_stone_defaults(), mesecons = {effector = { action_on = function (pos, node)