diff --git a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs index 177d6ed94..df9a05ad7 100644 --- a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs @@ -107,9 +107,9 @@ namespace Barotrauma if (GameMain.Server == null) return; TraitorManager traitorManager = GameMain.Server.TraitorManager; if (traitorManager == null) return; - foreach (Traitor T in traitorManager.TraitorList) + foreach (Traitor t in traitorManager.TraitorList) { - NewMessage("- Traitor " + T.Character.Name + "'s target is " + T.TargetCharacter.Name + ".", Color.Cyan); + 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); })); diff --git a/Barotrauma/BarotraumaShared/Source/GameSession/GameModes/TraitorManager.cs b/Barotrauma/BarotraumaShared/Source/GameSession/GameModes/TraitorManager.cs index e3d4790c5..027561f23 100644 --- a/Barotrauma/BarotraumaShared/Source/GameSession/GameModes/TraitorManager.cs +++ b/Barotrauma/BarotraumaShared/Source/GameSession/GameModes/TraitorManager.cs @@ -6,7 +6,7 @@ namespace Barotrauma { partial class Traitor { - public Character Character; + public readonly Character Character; public Character TargetCharacter; //TODO: make a modular objective system (similar to crew missions) that allows for things OTHER than assasinations. public Traitor(Character character) @@ -73,17 +73,17 @@ namespace Barotrauma public string codeWords, codeResponse; - public TraitorManager(GameServer server, int TraitorCount) + public TraitorManager(GameServer server, int traitorCount) { - if(TraitorCount < 1) //what why how + if (traitorCount < 1) //what why how { - TraitorCount = 1; + traitorCount = 1; DebugConsole.ThrowError("Traitor Manager: TraitorCount somehow ended up less than 1, setting it to 1."); } - Start(server, TraitorCount); + Start(server, traitorCount); } - private void Start(GameServer server, int TraitorCount) + private void Start(GameServer server, int traitorCount) { if (server == null) return; @@ -112,7 +112,7 @@ namespace Barotrauma codeWords = ToolBox.GetRandomLine(wordsTxt) + ", " + ToolBox.GetRandomLine(wordsTxt); codeResponse = ToolBox.GetRandomLine(wordsTxt) + ", " + ToolBox.GetRandomLine(wordsTxt); - while (TraitorCount-- >= 0) + while (traitorCount-- >= 0) { if (traitorCandidates.Count <= 0) break;