Fix bosses not finding their difficulty files

This commit is contained in:
Chomp 2021-08-17 17:30:06 +01:00
parent b74592e522
commit 01cd594ca2
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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<string, DifficultySettings>();
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<DifficultySettings>(json);