use voiceId value directly when generating a bot + updated type to use mongoid

This commit is contained in:
Chomp
2025-08-23 18:23:17 +01:00
parent aa6d3068fc
commit fd7a576b0c
2 changed files with 2 additions and 7 deletions
@@ -235,11 +235,7 @@ public class BotGenerator(
botGenerationDetails.Role
);
bot.Info.Settings.UseSimpleAnimator = botJsonTemplate.BotExperience.UseSimpleAnimator;
var chosenVoiceName = weightedRandomHelper.GetWeightedValue(botJsonTemplate.BotAppearance.Voice);
bot.Customization.Voice = databaseService
.GetCustomization()
.FirstOrDefault(customisation => customisation.Value.Name.Equals(chosenVoiceName, StringComparison.OrdinalIgnoreCase))
.Key;
bot.Customization.Voice = weightedRandomHelper.GetWeightedValue(botJsonTemplate.BotAppearance.Voice);
bot.Health = GenerateHealth(botJsonTemplate.BotHealth, botGenerationDetails.IsPlayerScav);
bot.Skills = GenerateSkills(botJsonTemplate.BotSkills);
bot.Info.PrestigeLevel = 0;