Removed Voice from profile.info

Added 'voice' to `profile.Customisation`
This commit is contained in:
Chomp
2025-07-09 17:02:31 +01:00
parent a3d8eb2b81
commit d5fc9be339
5 changed files with 20 additions and 18 deletions
@@ -186,7 +186,7 @@ public class ProfileController(
public virtual void ChangeVoice(ProfileChangeVoiceRequestData request, MongoId sessionID)
{
var pmcData = profileHelper.GetPmcProfile(sessionID);
pmcData.Info.Voice = request.Voice;
pmcData.Customization.Voice = request.Voice;
}
/// <summary>
@@ -328,6 +328,7 @@ public class ProfileController(
Feet = profileToViewPmc.Customization.Feet,
Hands = profileToViewPmc.Customization.Hands,
Dogtag = profileToViewPmc.Customization.DogTag,
Voice = profileToViewPmc.Customization.Voice,
},
Skills = profileToViewPmc.Skills,
Equipment = new OtherProfileEquipment
@@ -272,7 +272,9 @@ public class BotGenerator(
);
bot.Info.Settings.UseSimpleAnimator =
botJsonTemplate.BotExperience.UseSimpleAnimator ?? false;
bot.Info.Voice = weightedRandomHelper.GetWeightedValue(botJsonTemplate.BotAppearance.Voice);
bot.Customization.Voice = weightedRandomHelper.GetWeightedValue(
botJsonTemplate.BotAppearance.Voice
);
bot.Health = GenerateHealth(
botJsonTemplate.BotHealth,
botGenerationDetails.IsPlayerScav.GetValueOrDefault(false)
@@ -176,8 +176,6 @@ public record Info
private string? _side;
private string? _voice;
public string? EntryPoint { get; set; }
public string? Nickname { get; set; }
@@ -192,12 +190,6 @@ public record Info
set { _side = string.Intern(value); }
}
public string? Voice
{
get { return _voice; }
set { _voice = value == null ? null : string.Intern(value); }
}
public int? Level { get; set; }
//Experience the bot has gained
@@ -327,14 +319,12 @@ public record Customization
[JsonExtensionData]
public Dictionary<string, object>? ExtensionData { get; set; }
private string? _body;
private string? _dogtag;
private string? _feet;
private string? _hands;
private string? _head;
private string? _body;
private string? _feet;
private string? _dogtag;
private string? _hands;
private string? _voice;
public string? Head
{
@@ -365,6 +355,12 @@ public record Customization
get { return _dogtag; }
set { _dogtag = value == null ? null : string.Intern(value); }
}
public string? Voice
{
get { return _voice; }
set { _voice = value == null ? null : string.Intern(value); }
}
}
public record BotBaseHealth
@@ -98,6 +98,9 @@ public record OtherProfileCustomization
[JsonPropertyName("dogtag")]
public string? Dogtag { get; set; }
[JsonPropertyName("voice")]
public string? Voice { get; set; }
}
public record OtherProfileEquipment
@@ -61,7 +61,7 @@ public class CreateProfileService(
pmcData.Info.Nickname = request.Nickname;
pmcData.Info.LowerNickname = request.Nickname.ToLowerInvariant();
pmcData.Info.RegistrationDate = (int)timeUtil.GetTimeStamp();
pmcData.Info.Voice = databaseService.GetCustomization()[request.VoiceId].Name;
pmcData.Customization.Voice = databaseService.GetCustomization()[request.VoiceId].Name;
pmcData.Stats = profileHelper.GetDefaultCounters();
pmcData.Info.NeedWipeOptions = [];
pmcData.Customization.Head = request.HeadId;