alestane icon

proximity check

alestane | PRO | 07/10/13 08:28:31 PM UTC | 0 ⭐ | 310 👁️ | Never ⏰ | []
Lua |

250 B

|

None

|

0 👍

/

0 👎

local function performSpotCheck(L1, L2)
    spotCheck = 'BAD'
    if L1.state == "unspent" and L2 then
        local dX, dY = math.abs(L1.x - L2.x), math.abs(L1.y - L2.y)
        if dX <= 112 and dY <= 112 then
            spotCheck = 'OK'
        end
    end
    return spotCheck
end

Comments