forked from chomp/BotGenerator
Fix bosses not finding their difficulty files
This commit is contained in:
parent
b74592e522
commit
01cd594ca2
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user