From 67cd17aa799dd4d168e95f2c3ea80076371da26e Mon Sep 17 00:00:00 2001 From: Yutao Yuan Date: Sun, 4 Dec 2016 19:37:31 +0800 Subject: Fix crash with movestones --- mesecons_movestones/init.lua | 8 ++++---- 1 file 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 -- cgit v1.2.3