diff options
author | Jeija <norrepli@gmail.com> | 2012-12-31 18:32:46 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-31 18:32:46 +0100 |
commit | ec07fc27d7ef76114fd977283c36a20afe26f13f (patch) | |
tree | e8eab0fd457abdd33adaebbd46c4cf77e2fefd1c /mesecons_microcontroller | |
parent | 5921f6d46caa18310435046a22d5aa0f529998f0 (diff) | |
parent | 52ddd4bdc931a1f806ea581002b0f39ba83158bc (diff) | |
download | mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.gz mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.bz2 mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.xz mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.zip |
Merge branch 'nextgen'
Conflicts:
mesecons/wires.lua
Diffstat (limited to 'mesecons_microcontroller')
-rw-r--r-- | mesecons_microcontroller/init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua index 3117880..6120ade 100644 --- a/mesecons_microcontroller/init.lua +++ b/mesecons_microcontroller/init.lua @@ -30,16 +30,16 @@ if (c == 1) then table.insert(rules, {x = 1, y = 0, z = 0}) end if (d == 1) then table.insert(rules, {x = 0, y = 0, z = -1}) end local input_rules={} -if (a == 0) then table.insert(input_rules, {x = -1, y = 0, z = 0}) end -if (b == 0) then table.insert(input_rules, {x = 0, y = 0, z = 1}) end -if (c == 0) then table.insert(input_rules, {x = 1, y = 0, z = 0}) end -if (d == 0) then table.insert(input_rules, {x = 0, y = 0, z = -1}) end +if (a == 0) then table.insert(input_rules, {x = -1, y = 0, z = 0, name = "A"}) end +if (b == 0) then table.insert(input_rules, {x = 0, y = 0, z = 1, name = "B"}) end +if (c == 0) then table.insert(input_rules, {x = 1, y = 0, z = 0, name = "C"}) end +if (d == 0) then table.insert(input_rules, {x = 0, y = 0, z = -1, name = "D"}) end mesecon:add_rules(nodename, rules) local mesecons = {effector = { rules = input_rules, - action_change = function (pos, node) + action_change = function (pos, node, rulename) update_yc(pos) end }} |