summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <jeija@mesecons.net>2014-03-23 09:28:20 +0100
committerJeija <jeija@mesecons.net>2014-03-23 09:28:22 +0100
commit1f666875807c3c8e6c1771e4fb46c374d2e40ccb (patch)
tree98cf6c6fd4b2ac9102dd0c1f18ab4849ee820e73
parent1852e967a93f79c75a883e90e8fb3e672aa070d8 (diff)
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.
-rw-r--r--mesecons_delayer/init.lua4
1 files 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