summaryrefslogtreecommitdiff
path: root/mesecons/legacy.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons/legacy.lua')
-rw-r--r--mesecons/legacy.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesecons/legacy.lua b/mesecons/legacy.lua
new file mode 100644
index 0000000..4fd73dd
--- /dev/null
+++ b/mesecons/legacy.lua
@@ -0,0 +1,13 @@
+function mesecon:add_receptor_node(name, rules, get_rules)
+ if get_rules==nil and rules==nil then
+ rules=mesecon:get_rules("default")
+ end
+ table.insert(mesecon.receptors, {onstate = name, rules = rules, get_rules = get_rules})
+end
+
+function mesecon:add_receptor_node_off(name, rules, get_rules)
+ if get_rules==nil and rules==nil then
+ rules=mesecon:get_rules("default")
+ end
+ table.insert(mesecon.receptors, {offstate = name, rules = rules, get_rules = get_rules})
+end