This commit is contained in:
2025-02-12 20:50:38 +09:00
parent 6ed3a8bd49
commit 2a0b4f2bfb

View File

@@ -119,10 +119,7 @@ local function miner_check(entity)
-- Get relative connection position vector -- Get relative connection position vector
local vec = connection.target_position local vec = connection.target_position
-- Normalize to cardinal direction -- Normalize to cardinal direction
local direction = { local direction = { x = (((vec.x > 0.5 and 1) or (vec.x < -0.5 and -1)) or 0), y = (((vec.y > 0.5 and 1) or (vec.y < -0.5 and -1)) or 0) }
x = (((vec.x > 0.5 and 1) or (vec.x < -0.5 and -1)) or 0),
y = (((vec.y > 0.5 and 1) or (vec.y < -0.5 and -1)) or 0)
}
-- Convert to string key to prevent duplicates -- Convert to string key to prevent duplicates
local key = direction.x .. "," .. direction.y local key = direction.x .. "," .. direction.y