mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Fixed /make-warp name
This commit is contained in:
@@ -96,6 +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 _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
|
||||
|
||||
Reference in New Issue
Block a user