From 2a9b3a013c0bce829d94550e47b17da2bb7755cf Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 23 Nov 2021 06:31:21 +1100 Subject: [PATCH] Don't run aghost if already aghost for mapping (#5452) --- Content.Server/GameTicking/Commands/MappingCommand.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameTicking/Commands/MappingCommand.cs b/Content.Server/GameTicking/Commands/MappingCommand.cs index 59fbd7f597..f47dba563b 100644 --- a/Content.Server/GameTicking/Commands/MappingCommand.cs +++ b/Content.Server/GameTicking/Commands/MappingCommand.cs @@ -42,7 +42,7 @@ namespace Content.Server.GameTicking.Commands case 1: if (player.AttachedEntity == null) { - shell.WriteLine("The map name argument cannot be omitted if you have no entity."); + shell.WriteError("The map name argument cannot be omitted if you have no entity."); return; } @@ -52,7 +52,7 @@ namespace Content.Server.GameTicking.Commands case 2: if (!int.TryParse(args[0], out var id)) { - shell.WriteLine($"{args[0]} is not a valid integer."); + shell.WriteError($"{args[0]} is not a valid integer."); return; } @@ -66,7 +66,10 @@ namespace Content.Server.GameTicking.Commands shell.ExecuteCommand($"addmap {mapId} false"); shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true"); - shell.ExecuteCommand("aghost"); + + if (player.AttachedEntity?.Prototype?.ID != "AdminObserver") + shell.ExecuteCommand("aghost"); + shell.ExecuteCommand($"tp 0 0 {mapId}"); var newGrid = mapManager.GetAllGrids().OrderByDescending(g => (int) g.Index).First();