Skip to content

Commit

Permalink
Merge pull request #6122 from decentraland/chore/sync
Browse files Browse the repository at this point in the history
chore: sync main to dev
  • Loading branch information
lorux0 authored Mar 6, 2024
2 parents 181d00d + 73c9e03 commit 9131e60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ private void SetAllColors(Color eyesColor, Color hairColor, Color bodyColor)
private void UpdateAvatarModel(AvatarModel avatarModel)
{
view.UpdateAvatarPreview(avatarModel);
outfitsController.UpdateAvatarPreview(model.ToAvatarModel());
outfitsController.UpdateAvatarPreview(model.ToAvatarModel(extendedWearableUrns));
}

private void OnColorPickerToggled() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,25 @@ public record BackpackEditorHUDModel
public Color eyesColor;
public HashSet<string> forceRender = new ();

public AvatarModel ToAvatarModel()
public AvatarModel ToAvatarModel(Dictionary<string, string> extendedWearableUrns = null)
{
List<string> wearables;

if (extendedWearableUrns != null)
{
wearables = new List<string>();

foreach (string w in this.wearables.Keys)
wearables.Add(extendedWearableUrns.TryGetValue(w, out string extendedUrn)
? extendedUrn : w);
}
else
wearables = this.wearables.Keys.ToList();

return new AvatarModel
{
bodyShape = bodyShape.id,
wearables = wearables.Keys.ToList(),
wearables = wearables,
hairColor = hairColor,
skinColor = skinColor,
eyeColor = eyesColor,
Expand Down

0 comments on commit 9131e60

Please sign in to comment.