diff options
author | khonkhortisan <khonkhortisan@gmail.com> | 2013-08-27 22:22:30 -0700 |
---|---|---|
committer | khonkhortisan <khonkhortisan@gmail.com> | 2013-08-27 22:22:30 -0700 |
commit | 913e355a718c41551fe0e29ff1356e11d669ac73 (patch) | |
tree | a1ae8ead16928c75e5d27c7b1191e3bb033b24a5 /mesecons_luacontroller/init.lua | |
parent | 96011bc71816b5e9eb2cc6c86f009198dfb1146c (diff) | |
parent | 885899cbaf6ccb2d22a3495131204ea0d01131ed (diff) |
Merge pull request #112 from khonkhortisan/multi_rules
Multi rules
Merged for near-future textures to be merged cleanly.
Diffstat (limited to 'mesecons_luacontroller/init.lua')
-rw-r--r-- | mesecons_luacontroller/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index c8cb6ca..0884244 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -33,13 +33,13 @@ rules.d = {x = 0, y = 0, z = -1, name="D"} local get_real_portstates = function(pos) -- determine if ports are powered (by itself or from outside) ports = { - a = mesecon:is_power_on(mesecon:addPosRule(pos, rules.a)) + a = mesecon:is_power_on(mesecon:addPosRule(pos, rules.a), mesecon:invertRule(rules.a)) and mesecon:rules_link(mesecon:addPosRule(pos, rules.a), pos), - b = mesecon:is_power_on(mesecon:addPosRule(pos, rules.b)) + b = mesecon:is_power_on(mesecon:addPosRule(pos, rules.b), mesecon:invertRule(rules.b)) and mesecon:rules_link(mesecon:addPosRule(pos, rules.b), pos), - c = mesecon:is_power_on(mesecon:addPosRule(pos, rules.c)) + c = mesecon:is_power_on(mesecon:addPosRule(pos, rules.c), mesecon:invertRule(rules.c)) and mesecon:rules_link(mesecon:addPosRule(pos, rules.c), pos), - d = mesecon:is_power_on(mesecon:addPosRule(pos, rules.d)) + d = mesecon:is_power_on(mesecon:addPosRule(pos, rules.d), mesecon:invertRule(rules.d)) and mesecon:rules_link(mesecon:addPosRule(pos, rules.d), pos), } return ports |