-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add forceRenderer
property
#5259
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ac11314
feat: add `forceRenderer` property
Julieta11 6d5201a
chore: undo change in default profile
Julieta11 3c17a61
chore: upgrade schema version
Julieta11 6cc5a0c
fix: correct entity build
Julieta11 cbe0b0a
fix: string as wearable category
Julieta11 3903813
fix: optional property
Julieta11 fb5eba4
Minor changes for forceRender
davidejensen 0fea186
Minor change
davidejensen 8f00429
Fix
davidejensen a39b377
Added DTOs to allow serialization of hashsets
davidejensen 20f7e96
forceRender various fixes
davidejensen 2862ae2
Minor changes
davidejensen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
browser-interface/packages/lib/decentraland/profiles/sceneRuntime/AvatarForUserData.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,7 +221,7 @@ async UniTaskVoid LoadUserProfileAsync(UserProfile userProfile, CancellationToke | |
model.skinColor = userProfile.avatar.skinColor; | ||
model.hairColor = userProfile.avatar.hairColor; | ||
model.eyesColor = userProfile.avatar.eyeColor; | ||
|
||
model.forceRender = new HashSet<string>(userProfile.avatar.forceRender); | ||
model.wearables.Clear(); | ||
previewEquippedWearables.Clear(); | ||
|
||
|
@@ -243,9 +243,10 @@ async UniTaskVoid LoadUserProfileAsync(UserProfile userProfile, CancellationToke | |
} | ||
} | ||
|
||
EquipWearable(wearable, EquipWearableSource.None, false, false); | ||
EquipWearable(wearable, EquipWearableSource.None, false, false, false); | ||
} | ||
|
||
avatarSlotsHUDController.Recalculate(model.forceRender); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sure nothing happens if we pass in a null value to the |
||
view.UpdateAvatarPreview(model.ToAvatarModel()); | ||
} | ||
catch (OperationCanceledException) { } | ||
|
@@ -395,21 +396,23 @@ private void UnEquipWearableFromSlot(string wearableId, UnequipWearableSource so | |
private void EquipWearable(string wearableId, | ||
EquipWearableSource source = EquipWearableSource.None, | ||
bool setAsDirty = true, | ||
bool updateAvatarPreview = true) | ||
bool updateAvatarPreview = true, | ||
bool resetOverride = true) | ||
{ | ||
if (!wearablesCatalogService.WearablesCatalog.TryGetValue(wearableId, out WearableItem wearable)) | ||
{ | ||
Debug.LogError($"Cannot equip wearable {wearableId}"); | ||
return; | ||
} | ||
|
||
EquipWearable(wearable, source, setAsDirty, updateAvatarPreview); | ||
EquipWearable(wearable, source, setAsDirty, updateAvatarPreview, resetOverride); | ||
} | ||
|
||
private void EquipWearable(WearableItem wearable, | ||
EquipWearableSource source = EquipWearableSource.None, | ||
bool setAsDirty = true, | ||
bool updateAvatarPreview = true) | ||
bool updateAvatarPreview = true, | ||
bool resetOverride = true) | ||
{ | ||
string wearableId = wearable.id; | ||
|
||
|
@@ -432,7 +435,8 @@ private void EquipWearable(WearableItem wearable, | |
model.wearables.Add(wearableId, wearable); | ||
previewEquippedWearables.Add(wearableId); | ||
|
||
ResetOverridesOfAffectedCategories(wearable, setAsDirty); | ||
if (resetOverride) | ||
ResetOverridesOfAffectedCategories(wearable, setAsDirty); | ||
|
||
avatarSlotsHUDController.Equip(wearable, ownUserProfile.avatar.bodyShape, model.forceRender); | ||
wearableGridController.Equip(wearableId); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set a null value into the HashSet in case
forceRender
is null? maybe in that case we should asign an empty HashSet, right?