diff --git a/Generator/BaseBotGenerator.cs b/Generator/BaseBotGenerator.cs index a763cdb..c87f04e 100644 --- a/Generator/BaseBotGenerator.cs +++ b/Generator/BaseBotGenerator.cs @@ -97,7 +97,7 @@ namespace Generator { var botFiles = Directory .GetFiles($"{workingPath}//Assets", "*.txt", SearchOption.TopDirectoryOnly) - .Where(x => x.Contains(bot.botType.ToString())) + .Where(x => x.Contains(bot.botType.ToString(), StringComparison.InvariantCultureIgnoreCase)) .ToList(); DifficultyHelper.AddDifficultySettings(bot, botFiles); diff --git a/Generator/Helpers/DifficultyHelper.cs b/Generator/Helpers/DifficultyHelper.cs index 62da0e6..4bd9d7c 100644 --- a/Generator/Helpers/DifficultyHelper.cs +++ b/Generator/Helpers/DifficultyHelper.cs @@ -16,7 +16,7 @@ namespace Generator.Helpers // Read bot setting files from assets folder that match this bots type // Save into dictionary with difficulty as key var difficultySettingsJsons = new Dictionary(); - foreach (var path in difficultyFilePaths.Where(x=>x.Contains(bot.botType.ToString()))) + foreach (var path in difficultyFilePaths.Where(x=>x.Contains(bot.botType.ToString(), System.StringComparison.InvariantCultureIgnoreCase))) { var json = File.ReadAllText(path); var serialisedObject = JsonConvert.DeserializeObject(json);