From 1f666875807c3c8e6c1771e4fb46c374d2e40ccb Mon Sep 17 00:00:00 2001 From: Jeija Date: Sun, 23 Mar 2014 09:28:20 +0100 Subject: [PATCH] Fix bug that made delayers oscillate their input port when powering off the delayer faster than the delay time. Actually, delayers should have never worked since the ActionQueue update as they always used the default rules for their output, which is obviously nonsense. --- mesecons_delayer/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesecons_delayer/init.lua b/mesecons_delayer/init.lua index 4ec0ebc..239d378 100644 --- a/mesecons_delayer/init.lua +++ b/mesecons_delayer/init.lua @@ -21,14 +21,14 @@ local delayer_activate = function(pos, node) local def = minetest.registered_nodes[node.name] local time = def.delayer_time minetest.swap_node(pos, {name = def.delayer_onstate, param2=node.param2}) - mesecon.queue:add_action(pos, "receptor_on", {rules=delayer_get_output_rules(node)}, time, nil) + mesecon.queue:add_action(pos, "receptor_on", {delayer_get_output_rules(node)}, time, nil) end local delayer_deactivate = function(pos, node) local def = minetest.registered_nodes[node.name] local time = def.delayer_time minetest.swap_node(pos, {name = def.delayer_offstate, param2=node.param2}) - mesecon.queue:add_action(pos, "receptor_off", {rules=delayer_get_output_rules(node)}, time, nil) + mesecon.queue:add_action(pos, "receptor_off", {delayer_get_output_rules(node)}, time, nil) end -- Register the 2 (states) x 4 (delay times) delayers