forked from chomp/BotGenerator
Handle when a bot type is similar to another, e.g. cursedassault vs assault
This commit is contained in:
parent
76a17e6d6a
commit
4dc11acf06
@ -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(), System.StringComparison.InvariantCultureIgnoreCase)))
|
||||
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