better handle parsing a bot type where no raw bots were found

This commit is contained in:
Chomp 2021-08-17 17:32:27 +01:00
parent 58b4e59bfa
commit 9d53d15302

View File

@ -54,6 +54,12 @@ namespace Generator
var rawBotsOfSameType = _rawParsedBots
.Where(x => string.Equals(x.Info.Settings.Role, botToUpdate.botType.ToString(), StringComparison.OrdinalIgnoreCase)).ToList();
if (rawBotsOfSameType.Count == 0)
{
Console.WriteLine($"no bots of type {botToUpdate.botType.ToString()}");
break;
}
UpdateBodyPartHealth(botToUpdate, rawBotsOfSameType);
AddDifficulties(botToUpdate, _workingPath);
AddExperience(botToUpdate, rawBotsOfSameType);