< Summary

Class:DCL.EmotesWheel.EmotesWheelController
Assembly:EmotesWheelHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/EmotesWheelHUD/EmotesWheelController.cs
Covered lines:132
Uncovered lines:103
Coverable lines:235
Total lines:422
Line coverage:56.1% (132 of 235)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
EmotesWheelController(...)0%110100%
SetVisibility(...)0%2100%
OnEmoteVisibleChanged(...)0%110100%
IsStartMenuOpenChanged(...)0%6200%
OnEquippedEmotesSet(...)0%110100%
UpdateEmoteSlots()0%10.378066.67%
OnAnimationAdded(...)0%2100%
RefreshSlotLoadingState(...)0%12300%
SetVisibility_Internal(...)0%10.378066.67%
Dispose()0%220100%
OnEmoteClicked(...)0%2100%
PlayEmote(...)0%2.062075%
ConfigureShortcuts()0%110100%
OnNumericShortcutInputActionTriggered(...)0%52567200%
OnViewClosed()0%2100%
OnAvatarEmoteSet(...)0%110100%
OnCloseWindowPressed(...)0%110100%
OnOpenEmotesCustomizationInputActionTriggered(...)0%6200%
OpenEmotesCustomizationSection()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/EmotesWheelHUD/EmotesWheelController.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using DCL.Emotes;
 4using UnityEngine;
 5using UnityEngine.Pool;
 6
 7namespace DCL.EmotesWheel
 8{
 9    public class EmotesWheelController : IHUD
 10    {
 11        internal EmotesWheelView view;
 1312        private BaseVariable<bool> emotesVisible => DataStore.i.HUDs.emotesVisible;
 513        private BaseVariable<bool> emoteJustTriggeredFromShortcut => DataStore.i.HUDs.emoteJustTriggeredFromShortcut;
 014        private BaseVariable<bool> isAvatarEditorVisible => DataStore.i.HUDs.avatarEditorVisible;
 415        private BaseVariable<bool> isStartMenuOpen => DataStore.i.exploreV2.isOpen;
 516        private BaseVariable<bool> canStartMenuBeOpened => DataStore.i.exploreV2.isSomeModalOpen;
 017        private bool shortcutsCanBeUsed => !isStartMenuOpen.Get();
 1518        private DataStore_EmotesCustomization emotesCustomizationDataStore => DataStore.i.emotesCustomization;
 619        private BaseDictionary<(string bodyshapeId, string emoteId), EmoteClipData> emoteAnimations => DataStore.i.emote
 20
 621        private UserProfile ownUserProfile => UserProfile.GetOwnUserProfile();
 22        private InputAction_Trigger closeWindow;
 23        private InputAction_Hold openEmotesCustomizationInputAction;
 24        private InputAction_Trigger shortcut0InputAction;
 25        private InputAction_Trigger shortcut1InputAction;
 26        private InputAction_Trigger shortcut2InputAction;
 27        private InputAction_Trigger shortcut3InputAction;
 28        private InputAction_Trigger shortcut4InputAction;
 29        private InputAction_Trigger shortcut5InputAction;
 30        private InputAction_Trigger shortcut6InputAction;
 31        private InputAction_Trigger shortcut7InputAction;
 32        private InputAction_Trigger shortcut8InputAction;
 33        private InputAction_Trigger shortcut9InputAction;
 34        private InputAction_Trigger auxShortcut0InputAction;
 35        private InputAction_Trigger auxShortcut1InputAction;
 36        private InputAction_Trigger auxShortcut2InputAction;
 37        private InputAction_Trigger auxShortcut3InputAction;
 38        private InputAction_Trigger auxShortcut4InputAction;
 39        private InputAction_Trigger auxShortcut5InputAction;
 40        private InputAction_Trigger auxShortcut6InputAction;
 41        private InputAction_Trigger auxShortcut7InputAction;
 42        private InputAction_Trigger auxShortcut8InputAction;
 43        private InputAction_Trigger auxShortcut9InputAction;
 44        private UserProfile userProfile;
 45        private BaseDictionary<string, WearableItem> catalog;
 46        private readonly IEmotesCatalogService emoteCatalog;
 47        private bool ownedWearablesAlreadyRequested = false;
 348        private BaseDictionary<string, EmoteWheelSlot> slotsInLoadingState = new BaseDictionary<string, EmoteWheelSlot>(
 49
 350        public EmotesWheelController(UserProfile userProfile, BaseDictionary<string, WearableItem> catalog, IEmotesCatal
 51        {
 352            closeWindow = Resources.Load<InputAction_Trigger>("CloseWindow");
 353            closeWindow.OnTriggered += OnCloseWindowPressed;
 54
 355            view = EmotesWheelView.Create();
 356            view.OnClose += OnViewClosed;
 357            view.onEmoteClicked += OnEmoteClicked;
 358            view.OnCustomizeClicked += OpenEmotesCustomizationSection;
 59
 360            ownUserProfile.OnAvatarEmoteSet += OnAvatarEmoteSet;
 361            emotesVisible.OnChange += OnEmoteVisibleChanged;
 362            OnEmoteVisibleChanged(emotesVisible.Get(), false);
 63
 364            isStartMenuOpen.OnChange += IsStartMenuOpenChanged;
 65
 366            this.userProfile = userProfile;
 367            this.catalog = catalog;
 368            this.emoteCatalog = emoteCatalog;
 369            emotesCustomizationDataStore.equippedEmotes.OnSet += OnEquippedEmotesSet;
 370            OnEquippedEmotesSet(emotesCustomizationDataStore.equippedEmotes.Get());
 371            emoteAnimations.OnAdded += OnAnimationAdded;
 72
 373            ConfigureShortcuts();
 74
 375            emotesCustomizationDataStore.isWheelInitialized.Set(true);
 376        }
 77
 78        public void SetVisibility(bool visible)
 79        {
 80            //TODO once kernel sends visible properly
 81            //expressionsVisible.Set(visible);
 082        }
 83
 1084        private void OnEmoteVisibleChanged(bool current, bool previous) { SetVisibility_Internal(current); }
 85
 86        private void IsStartMenuOpenChanged(bool current, bool previous)
 87        {
 088            if (!current)
 089                return;
 90
 091            emotesVisible.Set(false);
 092        }
 93
 694        private void OnEquippedEmotesSet(IEnumerable<EquippedEmoteData> equippedEmotes) { UpdateEmoteSlots(); }
 95
 96        private void UpdateEmoteSlots()
 97        {
 398            List<EmotesWheelView.EmoteSlotData> emotesToSet = new List<EmotesWheelView.EmoteSlotData>();
 99
 3100            var equippedEmotes = ListPool<EquippedEmoteData>.Get();
 3101            equippedEmotes.AddRange(emotesCustomizationDataStore.equippedEmotes.Get());
 102
 66103            foreach (EquippedEmoteData equippedEmoteData in equippedEmotes)
 104            {
 30105                if (equippedEmoteData != null)
 106                {
 0107                    emoteCatalog.TryGetLoadedEmote(equippedEmoteData.id, out var emoteItem);
 108
 0109                    if (emoteItem != null)
 110                    {
 0111                        emotesToSet.Add(new EmotesWheelView.EmoteSlotData
 112                        {
 113                            emoteItem = emoteItem,
 114                            thumbnailSprite = emoteItem.thumbnailSprite != null ? emoteItem.thumbnailSprite : equippedEm
 115                        });
 116                    }
 117                    else
 118                    {
 0119                        emotesToSet.Add(null);
 120                    }
 121                }
 122                else
 123                {
 30124                    emotesToSet.Add(null);
 125                }
 126            }
 127
 3128            ListPool<EquippedEmoteData>.Release(equippedEmotes);
 129
 3130            List<EmoteWheelSlot> updatedWheelSlots = view.SetEmotes(emotesToSet);
 66131            foreach (EmoteWheelSlot slot in updatedWheelSlots)
 132            {
 30133                slot.SetAsLoading(false);
 30134                if (string.IsNullOrEmpty(slot.emoteId))
 135                    continue;
 136
 0137                slotsInLoadingState.Remove(slot.emoteId);
 138
 139
 0140                slot.SetAsLoading(true);
 0141                slotsInLoadingState.Add(slot.emoteId, slot);
 142
 0143                RefreshSlotLoadingState(slot.emoteId);
 144            }
 3145        }
 146
 0147        private void OnAnimationAdded((string bodyshapeId, string emoteId) values, EmoteClipData emoteClipData) { Refres
 148
 149        private void RefreshSlotLoadingState(string emoteId)
 150        {
 0151            if (emoteAnimations.ContainsKey((userProfile.avatar.bodyShape, emoteId)))
 152            {
 0153                slotsInLoadingState.TryGetValue(emoteId, out EmoteWheelSlot slot);
 0154                if (slot != null)
 155                {
 0156                    slot.SetAsLoading(false);
 0157                    slotsInLoadingState.Remove(emoteId);
 158                }
 159            }
 0160        }
 161
 162        public void SetVisibility_Internal(bool visible)
 163        {
 5164            if (visible && isStartMenuOpen.Get())
 0165                return;
 166
 5167            if (emoteJustTriggeredFromShortcut.Get())
 168            {
 0169                emotesVisible.Set(false);
 0170                return;
 171            }
 172
 5173            view.SetVisiblity(visible);
 174
 5175            if (visible)
 176            {
 1177                DCL.Helpers.Utils.UnlockCursor();
 178
 1179                if (userProfile != null &&
 180                    !string.IsNullOrEmpty(userProfile.userId) &&
 181                    !ownedWearablesAlreadyRequested)
 182                {
 0183                    CatalogController.RequestOwnedWearables(userProfile.userId)
 184                        .Then((ownedWearables) =>
 185                        {
 0186                            ownedWearablesAlreadyRequested = true;
 0187                            userProfile.SetInventory(ownedWearables.Select(x => x.id).ToArray());
 0188                            UpdateEmoteSlots();
 0189                        });
 190                }
 191            }
 192
 5193            canStartMenuBeOpened.Set(visible);
 5194        }
 195
 196        public void Dispose()
 197        {
 3198            view.OnClose -= OnViewClosed;
 3199            view.onEmoteClicked -= OnEmoteClicked;
 3200            view.OnCustomizeClicked -= OpenEmotesCustomizationSection;
 3201            closeWindow.OnTriggered -= OnCloseWindowPressed;
 3202            ownUserProfile.OnAvatarEmoteSet -= OnAvatarEmoteSet;
 3203            emotesVisible.OnChange -= OnEmoteVisibleChanged;
 3204            emotesCustomizationDataStore.equippedEmotes.OnSet -= OnEquippedEmotesSet;
 3205            emoteAnimations.OnAdded -= OnAnimationAdded;
 3206            shortcut0InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3207            shortcut1InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3208            shortcut2InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3209            shortcut3InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3210            shortcut4InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3211            shortcut5InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3212            shortcut6InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3213            shortcut7InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3214            shortcut8InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3215            shortcut9InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3216            auxShortcut0InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3217            auxShortcut1InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3218            auxShortcut2InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3219            auxShortcut3InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3220            auxShortcut4InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3221            auxShortcut5InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3222            auxShortcut6InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3223            auxShortcut7InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3224            auxShortcut8InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 3225            auxShortcut9InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered;
 226
 3227            if (view != null)
 228            {
 3229                view.CleanUp();
 3230                UnityEngine.Object.Destroy(view.gameObject);
 231            }
 3232        }
 233
 0234        public void OnEmoteClicked(string id) { PlayEmote(id, UserProfile.EmoteSource.EmotesWheel); }
 235
 236        public void PlayEmote(string id, UserProfile.EmoteSource source)
 237        {
 1238            if (string.IsNullOrEmpty(id))
 0239                return;
 240
 1241            UserProfile.GetOwnUserProfile().SetAvatarExpression(id, source);
 1242        }
 243
 244        private void ConfigureShortcuts()
 245        {
 3246            closeWindow = Resources.Load<InputAction_Trigger>("CloseWindow");
 3247            closeWindow.OnTriggered += OnCloseWindowPressed;
 248
 3249            openEmotesCustomizationInputAction = Resources.Load<InputAction_Hold>("DefaultConfirmAction");
 3250            openEmotesCustomizationInputAction.OnFinished += OnOpenEmotesCustomizationInputActionTriggered;
 251
 3252            shortcut0InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut0");
 3253            shortcut0InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 254
 3255            shortcut1InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut1");
 3256            shortcut1InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 257
 3258            shortcut2InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut2");
 3259            shortcut2InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 260
 3261            shortcut3InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut3");
 3262            shortcut3InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 263
 3264            shortcut4InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut4");
 3265            shortcut4InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 266
 3267            shortcut5InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut5");
 3268            shortcut5InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 269
 3270            shortcut6InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut6");
 3271            shortcut6InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 272
 3273            shortcut7InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut7");
 3274            shortcut7InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 275
 3276            shortcut8InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut8");
 3277            shortcut8InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 278
 3279            shortcut9InputAction = Resources.Load<InputAction_Trigger>("ToggleEmoteShortcut9");
 3280            shortcut9InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 281
 3282            auxShortcut0InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut0");
 3283            auxShortcut0InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 284
 3285            auxShortcut1InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut1");
 3286            auxShortcut1InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 287
 3288            auxShortcut2InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut2");
 3289            auxShortcut2InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 290
 3291            auxShortcut3InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut3");
 3292            auxShortcut3InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 293
 3294            auxShortcut4InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut4");
 3295            auxShortcut4InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 296
 3297            auxShortcut5InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut5");
 3298            auxShortcut5InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 299
 3300            auxShortcut6InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut6");
 3301            auxShortcut6InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 302
 3303            auxShortcut7InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut7");
 3304            auxShortcut7InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 305
 3306            auxShortcut8InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut8");
 3307            auxShortcut8InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 308
 3309            auxShortcut9InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut9");
 3310            auxShortcut9InputAction.OnTriggered += OnNumericShortcutInputActionTriggered;
 3311        }
 312
 313        private void OnNumericShortcutInputActionTriggered(DCLAction_Trigger action)
 314        {
 0315            if (!shortcutsCanBeUsed)
 0316                return;
 317
 318            switch (action)
 319            {
 320                case DCLAction_Trigger.ToggleEmoteShortcut0:
 0321                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[0]?.id, UserProfile.EmoteSource.Shortcut);
 0322                    emoteJustTriggeredFromShortcut.Set(true);
 0323                    break;
 324                case DCLAction_Trigger.ToggleEmoteShortcut1:
 0325                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[1]?.id, UserProfile.EmoteSource.Shortcut);
 0326                    emoteJustTriggeredFromShortcut.Set(true);
 0327                    break;
 328                case DCLAction_Trigger.ToggleEmoteShortcut2:
 0329                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[2]?.id, UserProfile.EmoteSource.Shortcut);
 0330                    emoteJustTriggeredFromShortcut.Set(true);
 0331                    break;
 332                case DCLAction_Trigger.ToggleEmoteShortcut3:
 0333                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[3]?.id, UserProfile.EmoteSource.Shortcut);
 0334                    emoteJustTriggeredFromShortcut.Set(true);
 0335                    break;
 336                case DCLAction_Trigger.ToggleEmoteShortcut4:
 0337                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[4]?.id, UserProfile.EmoteSource.Shortcut);
 0338                    emoteJustTriggeredFromShortcut.Set(true);
 0339                    break;
 340                case DCLAction_Trigger.ToggleEmoteShortcut5:
 0341                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[5]?.id, UserProfile.EmoteSource.Shortcut);
 0342                    emoteJustTriggeredFromShortcut.Set(true);
 0343                    break;
 344                case DCLAction_Trigger.ToggleEmoteShortcut6:
 0345                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[6]?.id, UserProfile.EmoteSource.Shortcut);
 0346                    emoteJustTriggeredFromShortcut.Set(true);
 0347                    break;
 348                case DCLAction_Trigger.ToggleEmoteShortcut7:
 0349                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[7]?.id, UserProfile.EmoteSource.Shortcut);
 0350                    emoteJustTriggeredFromShortcut.Set(true);
 0351                    break;
 352                case DCLAction_Trigger.ToggleEmoteShortcut8:
 0353                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[8]?.id, UserProfile.EmoteSource.Shortcut);
 0354                    emoteJustTriggeredFromShortcut.Set(true);
 0355                    break;
 356                case DCLAction_Trigger.ToggleEmoteShortcut9:
 0357                    PlayEmote(emotesCustomizationDataStore.equippedEmotes[9]?.id, UserProfile.EmoteSource.Shortcut);
 0358                    emoteJustTriggeredFromShortcut.Set(true);
 0359                    break;
 360                case DCLAction_Trigger.ToggleShortcut0:
 0361                    if (emotesVisible.Get())
 0362                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[0]?.id, UserProfile.EmoteSource.Shortcut);
 0363                    break;
 364                case DCLAction_Trigger.ToggleShortcut1:
 0365                    if (emotesVisible.Get())
 0366                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[1]?.id, UserProfile.EmoteSource.Shortcut);
 0367                    break;
 368                case DCLAction_Trigger.ToggleShortcut2:
 0369                    if (emotesVisible.Get())
 0370                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[2]?.id, UserProfile.EmoteSource.Shortcut);
 0371                    break;
 372                case DCLAction_Trigger.ToggleShortcut3:
 0373                    if (emotesVisible.Get())
 0374                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[3]?.id, UserProfile.EmoteSource.Shortcut);
 0375                    break;
 376                case DCLAction_Trigger.ToggleShortcut4:
 0377                    if (emotesVisible.Get())
 0378                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[4]?.id, UserProfile.EmoteSource.Shortcut);
 0379                    break;
 380                case DCLAction_Trigger.ToggleShortcut5:
 0381                    if (emotesVisible.Get())
 0382                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[5]?.id, UserProfile.EmoteSource.Shortcut);
 0383                    break;
 384                case DCLAction_Trigger.ToggleShortcut6:
 0385                    if (emotesVisible.Get())
 0386                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[6]?.id, UserProfile.EmoteSource.Shortcut);
 0387                    break;
 388                case DCLAction_Trigger.ToggleShortcut7:
 0389                    if (emotesVisible.Get())
 0390                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[7]?.id, UserProfile.EmoteSource.Shortcut);
 0391                    break;
 392                case DCLAction_Trigger.ToggleShortcut8:
 0393                    if (emotesVisible.Get())
 0394                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[8]?.id, UserProfile.EmoteSource.Shortcut);
 0395                    break;
 396                case DCLAction_Trigger.ToggleShortcut9:
 0397                    if (emotesVisible.Get())
 0398                        PlayEmote(emotesCustomizationDataStore.equippedEmotes[9]?.id, UserProfile.EmoteSource.Shortcut);
 399                    break;
 400            }
 0401        }
 402
 0403        private void OnViewClosed() { emotesVisible.Set(false); }
 2404        private void OnAvatarEmoteSet(string id, long timestamp, UserProfile.EmoteSource source) { emotesVisible.Set(fal
 6405        private void OnCloseWindowPressed(DCLAction_Trigger action) { emotesVisible.Set(false); }
 406
 407        private void OnOpenEmotesCustomizationInputActionTriggered(DCLAction_Hold action)
 408        {
 0409            if (!emotesVisible.Get())
 0410                return;
 411
 0412            OpenEmotesCustomizationSection();
 0413        }
 414
 415        private void OpenEmotesCustomizationSection()
 416        {
 0417            emotesVisible.Set(false);
 0418            isAvatarEditorVisible.Set(true);
 0419            emotesCustomizationDataStore.isEmotesCustomizationSelected.Set(true);
 0420        }
 421    }
 422}