use voiceId value directly when generating a bot + updated type to use mongoid
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using SPTarkov.Server.Core.Models.Common;
|
||||
using SPTarkov.Server.Core.Models.Eft.Bot.GlobalSettings;
|
||||
@@ -58,7 +57,7 @@ public record Appearance
|
||||
|
||||
[JsonPropertyName("voice")]
|
||||
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
|
||||
public Dictionary<string, double> Voice { get; set; }
|
||||
public Dictionary<MongoId, double> Voice { get; set; }
|
||||
}
|
||||
|
||||
public record Chances
|
||||
|
||||
Reference in New Issue
Block a user