Fix prestige menu rewards in a generic way

Add new CustomisationTypeId enum
This commit is contained in:
Chomp
2025-03-19 17:05:36 +00:00
parent aa2feff542
commit 054e75048b
2 changed files with 37 additions and 14 deletions
@@ -674,10 +674,10 @@ public class ProfileHelper(
{
if (fullProfile?.CustomisationUnlocks == null)
{
fullProfile.CustomisationUnlocks = new List<CustomisationStorage>();
fullProfile.CustomisationUnlocks = [];
}
if (fullProfile?.CustomisationUnlocks?.Any(u => u.Id == (string) reward.Target) ?? false)
if (fullProfile?.CustomisationUnlocks?.Any(u => u.Id == reward.Target) ?? false)
{
_logger.Warning($"Profile: {fullProfile.ProfileInfo.ProfileId} already has hideout customisaiton reward: {reward.Target}, skipping");
return;
@@ -697,30 +697,27 @@ public class ProfileHelper(
switch (matchingCustomisation.Parent)
{
case "675ff48ce8d2356707079617":
// MannequinPose
case CustomisationTypeId.MANNEQUIN_POSE:
rewardToStore.Type = CustomisationType.MANNEQUIN_POSE;
break;
case "6751848eba5968fd800a01d6":
// Gestures
case CustomisationTypeId.GESTURES:
rewardToStore.Type = CustomisationType.GESTURE;
break;
case "67373f170eca6e03ab0d5391":
// Floor
case CustomisationTypeId.FLOOR:
rewardToStore.Type = CustomisationType.FLOOR;
break;
case "6746fafabafff8500804880e":
// DogTags
case CustomisationTypeId.DOG_TAGS:
rewardToStore.Type = CustomisationType.DOG_TAG;
break;
case "673b3f595bf6b605c90fcdc2":
// Ceiling
case CustomisationTypeId.CEILING:
rewardToStore.Type = CustomisationType.CEILING;
break;
case "67373f1e5a5ee73f2a081baf":
// Wall
case CustomisationTypeId.WALL:
rewardToStore.Type = CustomisationType.WALL;
break;
case CustomisationTypeId.ENVIRONMENT_UI:
rewardToStore.Type = CustomisationType.ENVIRONMENT;
break;
default:
_logger.Error($"Unhandled customisation unlock type: {matchingCustomisation.Parent} not added to profile");
return;
@@ -44,6 +44,32 @@ public record CustomisationType
public const string MANNEQUIN_POSE = "mannequinPose";
}
public record CustomisationTypeId
{
public const string CUSTOMIZATION = "5cbdb4a2e2b501000d352ae2";
public const string BODY_PARTS = "5cd943c31388ce000a659df5";
public const string BODY = "5cc0868e14c02e000c6bea68";
public const string FEET = "5cc0869814c02e000a4cad94";
public const string HANDS = "5cc086a314c02e000c6bea69";
public const string HEAD = "5cc085e214c02e000c6bea67";
public const string SUITS = "5cd943b21388ce03a44dc2a2";
public const string LOWER = "5cd944d01388ce000a659df9";
public const string UPPER = "5cd944ca1388ce03a44dc2a4";
public const string DOG_TAGS = "6746fafabafff8500804880e";
public const string VOICE = "5fc100cf95572123ae738483";
public const string GESTURES = "6751848eba5968fd800a01d6";
public const string ENVIRONMENT_UI = "67584ea0ff58ff0e7909e435";
public const string FLOOR = "67373f170eca6e03ab0d5391";
public const string ITEM_SLOT = "67373f520eca6e03ab0d5397";
public const string LIGHT = "67373f286cadad262309e862";
public const string POSTER_SLOT = "67373f4b5a5ee73f2a081bb3";
public const string SHOOTING_RANGE_MARK = "67373f330eca6e03ab0d5394";
public const string WALL = "67373f1e5a5ee73f2a081baf";
public const string HIDEOUT = "67373ef90eca6e03ab0d538c";
public const string CEILING = "673b3f595bf6b605c90fcdc2";
public const string MANNEQUIN_POSE = "675ff48ce8d2356707079617";
}
public record CustomisationSource
{
public const string QUEST = "quest";