From a20637f68ccbda2f97304ff8de6989fc1d79c820 Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Wed, 13 May 2020 21:11:17 +0200 Subject: [PATCH] Fix redstone dust climbing up doors, and fix redstone dust not turning off when redstone torch is destroyed through the destruction of an attached block --- mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 4 ++++ mods/ITEMS/mcl_doors/api_doors.lua | 2 ++ mods/ITEMS/mcl_doors/depends.txt | 1 + 3 files changed, 7 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 20a1ca6d4b..5e68306ff0 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -176,6 +176,10 @@ mcl_torches.register_torch("mesecon_torch_on", S("Redstone Torch"), {dig_immediate=3, dig_by_water=1, redstone_torch=1, mesecon_ignore_opaque_dig=1}, mcl_sounds.node_sound_wood_defaults(), { + on_destruct = function(pos, oldnode) + local node = minetest.get_node(pos) + torch_action_on(pos, node) + end, mesecons = { receptor = { state = mesecon.state.on, diff --git a/mods/ITEMS/mcl_doors/api_doors.lua b/mods/ITEMS/mcl_doors/api_doors.lua index ee2504e9fc..a2685a9169 100644 --- a/mods/ITEMS/mcl_doors/api_doors.lua +++ b/mods/ITEMS/mcl_doors/api_doors.lua @@ -360,6 +360,7 @@ function mcl_doors:register_door(name, def) mesecons = { effector = { action_on = on_mesecons_signal_open_top, + rules = mesecon.rules.flat, }}, on_rotate = function(pos, node, user, mode, param2) @@ -478,6 +479,7 @@ function mcl_doors:register_door(name, def) mesecons = { effector = { action_off = on_mesecons_signal_close_top, + rules = mesecon.rules.flat, }}, on_rotate = function(pos, node, user, mode, param2) diff --git a/mods/ITEMS/mcl_doors/depends.txt b/mods/ITEMS/mcl_doors/depends.txt index 1e75cae160..e2ae3cf4b0 100644 --- a/mods/ITEMS/mcl_doors/depends.txt +++ b/mods/ITEMS/mcl_doors/depends.txt @@ -2,3 +2,4 @@ mcl_core mcl_sounds doc? screwdriver? +mesecons