diff options
-rw-r--r-- | mesecons_movestones/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons_movestones/init.lua b/mesecons_movestones/init.lua index 52a5605..9e9dce6 100644 --- a/mesecons_movestones/init.lua +++ b/mesecons_movestones/init.lua @@ -26,28 +26,28 @@ function mesecon.get_movestone_direction(pos) lpos = {x=pos.x+1, y=pos.y, z=pos.z} for n = 1, 3 do - if mesecon.is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then + if mesecon.is_power_on(lpos, rules[n]) then return {x=0, y=0, z=-1} end end lpos = {x = pos.x-1, y = pos.y, z = pos.z} for n=4, 6 do - if mesecon.is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then + if mesecon.is_power_on(lpos, rules[n]) then return {x=0, y=0, z=1} end end lpos = {x = pos.x, y = pos.y, z = pos.z+1} for n=7, 9 do - if mesecon.is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then + if mesecon.is_power_on(lpos, rules[n]) then return {x=-1, y=0, z=0} end end lpos = {x = pos.x, y = pos.y, z = pos.z-1} for n=10, 12 do - if mesecon.is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then + if mesecon.is_power_on(lpos, rules[n]) then return {x=1, y=0, z=0} end end |