From b7b033dac1bfdb0c12ce4b574a6f3d6c1edcb242 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 29 Jul 2018 21:16:59 +0300 Subject: [PATCH] Made the traitorlist command usable by clients (assuming they have the permission to use it). Closes #539 --- Barotrauma/BarotraumaShared/Source/DebugConsole.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs index 7ada53b2d..927c61e70 100644 --- a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs @@ -190,6 +190,17 @@ namespace Barotrauma NewMessage("- Traitor " + t.Character.Name + "'s target is " + t.TargetCharacter.Name + ".", Color.Cyan); } NewMessage("The code words are: " + traitorManager.codeWords + ", response: " + traitorManager.codeResponse + ".", Color.Cyan); + }, + null, + (Client client, Vector2 cursorPos, string[] args) => + { + TraitorManager traitorManager = GameMain.Server.TraitorManager; + if (traitorManager == null) return; + foreach (Traitor t in traitorManager.TraitorList) + { + GameMain.Server.SendConsoleMessage("- Traitor " + t.Character.Name + "'s target is " + t.TargetCharacter.Name + ".", client); + } + GameMain.Server.SendConsoleMessage("The code words are: " + traitorManager.codeWords + ", response: " + traitorManager.codeResponse + ".", client); })); commands.Add(new Command("itemlist", "itemlist: List all the item prefabs available for spawning.", (string[] args) =>