Fixed Aagain forgot the game.player

This commit is contained in:
Cooldude2606
2018-05-26 11:40:43 +01:00
parent 9041006c5a
commit 11f9f098e1

View File

@@ -96,7 +96,7 @@ commands.add_command('make-warp', 'Make a warp point at your location', {'name',
if not game.player then return end
local position = game.player.position
local name = args.name
if player.gui.top[name] then player_return({'warp-system.name-used'},defines.text_color.med) return commands.error end
if game.player.gui.top[name] then player_return({'warp-system.name-used'},defines.text_color.med) return commands.error end
if _warps().warps[name] then player_return({'warp-system.name-used'},defines.text_color.med) return commands.error end
if position.x^2 + position.y^2 < 100 then player_return({'warp-system.too-close'},defines.text_color.med) return commands.error end
-- to do add a test for all warps