mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Bug Bash
This commit is contained in:
@@ -7,9 +7,9 @@ commands.add_command('make-warp', 'Make a warp point at your location', {
|
||||
if not game.player then return end
|
||||
local position = game.player.position
|
||||
local name = args.name
|
||||
if game.player.gui.top[name] then player_return({'warp-system.name-used'},defines.textcolor.med) return commands.error end
|
||||
if warps.warps[name] then player_return({'warp-system.name-used'},defines.textcolor.med) return commands.error end
|
||||
if position.x^2 + position.y^2 < 100 then player_return({'warp-system.too-close'},defines.textcolor.med) return commands.error end
|
||||
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
|
||||
if position.x^2 + position.y^2 < 100 then player_return({'WarpPoints.too-close'},defines.textcolor.med) return commands.error end
|
||||
-- to do add a test for all warps
|
||||
self.make_warp_point(position,game.player.surface,game.player.force,name)
|
||||
end)
|
||||
Reference in New Issue
Block a user