From 7c0eb4d7c829a433c3fa9d19f213c760b7c9c12d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 11 Mar 2017 22:00:06 +0100 Subject: [PATCH] Add torch and redstone torch help --- mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 13 +++++++++++-- mods/ITEMS/mcl_torches/init.lua | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index b08fc5788..34bd8e132 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -41,7 +41,10 @@ minetest.register_craft({ {"mcl_core:stick"},} }) -mcl_torches.register_torch("mesecon_torch_off", "Redstone Torch (off)", "jeija_torches_off.png", +mcl_torches.register_torch("mesecon_torch_off", "Redstone Torch (off)", + nil, + nil, + "jeija_torches_off.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", {"jeija_torches_off.png"}, 0, @@ -57,7 +60,13 @@ mcl_torches.register_torch("mesecon_torch_off", "Redstone Torch (off)", "jeija_t } ) -mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch", "jeija_torches_on_inv.png", +mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch", + "Redstone torches are redstone components which invert the signal of surrounding redstone components. An active component will become inactive, and an inactive component will become active. Redstone torches can be used as a quick and easy way to send a redstone to a redstone trail.", + [[Redstone torches can generally be placed at the side and on the top of full solid opaque blocks. The following exceptions apply: +• Glass, fence, wall, hopper: Can only be placed on top +• Soul sand, monster spawner: Placement possible +• Glowstone and pistons: No placement possible]], + "jeija_torches_on_inv.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", {"jeija_torches_on.png"}, 7, diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index 24bf8c199..ec1fcd23a 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -5,7 +5,7 @@ mcl_torches = {} -mcl_torches.register_torch = function(substring, description, icon, mesh_floor, mesh_wall, tiles, light, groups, sounds, moredef) +mcl_torches.register_torch = function(substring, description, doc_items_longdesc, doc_items_usagehelp, icon, mesh_floor, mesh_wall, tiles, light, groups, sounds, moredef) local itemstring = minetest.get_current_modname()..":"..substring local itemstring_wall = minetest.get_current_modname()..":"..substring.."_wall" @@ -20,6 +20,8 @@ mcl_torches.register_torch = function(substring, description, icon, mesh_floor, local floordef = { description = description, + _doc_items_longdesc = doc_items_longdesc, + _doc_items_usagehelp = doc_items_usagehelp, drawtype = "mesh", mesh = mesh_floor, inventory_image = icon, @@ -156,7 +158,14 @@ mcl_torches.register_torch = function(substring, description, icon, mesh_floor, minetest.register_node(itemstring_wall, walldef) end -mcl_torches.register_torch("torch", "Torch", "default_torch_on_floor.png", +mcl_torches.register_torch("torch", + "Torch", + "Torches are light sources which can be placed at the side or on the top of most blocks.", + [[Torches can generally be placed on full solid opaque blocks. The following exceptions apply: +• Glass, fence, wall, hopper: Can only be placed on top +• Soul sand, monster spawner: Placement possible +• Glowstone and pistons: No placement possible]], + "default_torch_on_floor.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", {{ name = "default_torch_on_floor_animated.png",