From 0827c475ba695694939b86e25c4cd0b75ea6f4a6 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 25 Feb 2018 18:35:31 +0200 Subject: [PATCH] Fixed "an item with the same key has already been added" exceptions caused by humanhusk.xml being in the same folder as human.xml. Closes #283 --- .../BarotraumaShared/Source/Networking/GameServerSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaShared/Source/Networking/GameServerSettings.cs b/Barotrauma/BarotraumaShared/Source/Networking/GameServerSettings.cs index 4c658ce2b..27403577f 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/GameServerSettings.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/GameServerSettings.cs @@ -358,7 +358,7 @@ namespace Barotrauma.Networking monsterEnabled = new Dictionary(); foreach (string s in monsterNames) { - monsterEnabled.Add(s, true); + if (!monsterEnabled.ContainsKey(s)) monsterEnabled.Add(s, true); } extraCargo = new Dictionary(); }