From 2af203a0b6f622a71e25e8c885e7de66305ec3ad Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 25 Oct 2018 17:57:10 +0100 Subject: [PATCH] Fixed Warp Points --- modules/WarpPoints/src/commands.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/WarpPoints/src/commands.lua b/modules/WarpPoints/src/commands.lua index 89e4cb2b..b90bb899 100644 --- a/modules/WarpPoints/src/commands.lua +++ b/modules/WarpPoints/src/commands.lua @@ -11,8 +11,8 @@ commands.add_command('make-warp', 'Make a warp point at your location', { if game.player.gui.top[name] then player_return({'WarpPoints.name-used'},defines.textcolor.med) return commands.error end if warps.warps[name] then player_return({'WarpPoints.name-used'},defines.textcolor.med) return commands.error end for name,warp in pairs(warps.warps) do - local dx = position.x-warp.position.x - local dy = position.y-warp.position.y + local dx = position.x-warp.position[1] + local dy = position.y-warp.position[2] if dx^2 + dy^2 < warp_min_distance then player_return({'WarpPoints.too-close'},defines.textcolor.med) return commands.error end end -- to do add a test for all warps