From f22411656b89dc2b6e444c2d16445701d5f37f7f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 5 Jun 2017 21:44:44 +0200 Subject: [PATCH] Can place torch on upside-down stair; update help --- mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 1 + mods/ITEMS/mcl_torches/init.lua | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 55692de6b..13108901e 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -64,6 +64,7 @@ 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 +• Upside-down slab/stair: Can only be placed on top • Soul sand, monster spawner: Placement possible • Glowstone and pistons: No placement possible]], "jeija_torches_on_inv.png", diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index d14c4dc72..6723203e7 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -73,7 +73,7 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc -- * Fence, wall, glass, hopper: Only on top -- * Monster spawner -- * Slab: Only on top if upside down - -- * Stairs: Only on top if upside down (TODO) + -- * Stairs: Only on top if upside down -- Special forbidden nodes: -- * Piston @@ -82,7 +82,7 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc if node.name ~= "mcl_nether:soul_sand" and node.name ~= "mcl_mobspawners:spawner" and ((not def.groups.solid) or (not def.groups.opaque)) then -- Only allow top placement on these nodes - if def.groups.glass or node.name == "mcl_hoppers:hopper" or node.name == "mcl_hoppers:hopper_side" or def.groups.fence == 1 or def.groups.wall or def.groups.slab_top == 1 then + if def.groups.glass or node.name == "mcl_hoppers:hopper" or node.name == "mcl_hoppers:hopper_side" or def.groups.fence == 1 or def.groups.wall or def.groups.slab_top == 1 or (def.groups.stair == 1 and minetest.facedir_to_dir(node.param2).y ~= 0) then if wdir ~= 1 then return itemstack end @@ -173,6 +173,7 @@ mcl_torches.register_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 +• Upside-down slab/stair: Can only be placed on top • Soul sand, monster spawner: Placement possible • Glowstone and pistons: No placement possible]], "default_torch_on_floor.png",