]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
ActivatableUI tweaks (#27448)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Mon, 29 Apr 2024 04:06:43 +0000 (16:06 +1200)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2024 04:06:43 +0000 (14:06 +1000)
* ActivatableUI tweaks

* EntGotRemovedFromContainerMessage

* A

17 files changed:
Content.Shared/Hands/EntitySystems/SharedHandsSystem.cs
Content.Shared/UserInterface/ActivatableUIComponent.cs
Content.Shared/UserInterface/ActivatableUISystem.Power.cs
Content.Shared/UserInterface/ActivatableUISystem.cs
Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml
Resources/Prototypes/Entities/Objects/Devices/Syndicate_Gadgets/war_declarator.yml
Resources/Prototypes/Entities/Objects/Devices/forensic_scanner.yml
Resources/Prototypes/Entities/Objects/Devices/pda.yml
Resources/Prototypes/Entities/Objects/Misc/books.yml
Resources/Prototypes/Entities/Objects/Misc/paper.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/handheld_crew_monitor.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/healthanalyzer.yml
Resources/Prototypes/Entities/Objects/Specific/Research/anomaly.yml
Resources/Prototypes/Entities/Objects/Specific/Service/barber.yml
Resources/Prototypes/Entities/Objects/Specific/atmos.yml
Resources/Prototypes/Entities/Objects/Tools/access_configurator.yml

index b72a7c4eb3c5e5c4e2f0b8c5c451482f07783262..fd732009e9a2f6b6777f69681d4ef7050ba15ed3 100644 (file)
@@ -87,7 +87,6 @@ public abstract partial class SharedHandsSystem
     /// </summary>
     /// <param name="uid"></param>
     /// <param name="handsComp"></param>
-
     public void RemoveHands(EntityUid uid, HandsComponent? handsComp = null)
     {
         if (!Resolve(uid, ref handsComp))
@@ -137,6 +136,43 @@ public abstract partial class SharedHandsSystem
         return false;
     }
 
+    public bool TryGetActiveHand(Entity<HandsComponent?> entity, [NotNullWhen(true)] out Hand? hand)
+    {
+        if (!Resolve(entity, ref entity.Comp, false))
+        {
+            hand = null;
+            return false;
+        }
+
+        hand = entity.Comp.ActiveHand;
+        return hand != null;
+    }
+
+    public bool TryGetActiveItem(Entity<HandsComponent?> entity, [NotNullWhen(true)] out EntityUid? item)
+    {
+        if (!TryGetActiveHand(entity, out var hand))
+        {
+            item = null;
+            return false;
+        }
+
+        item = hand.HeldEntity;
+        return item != null;
+    }
+
+    public Hand? GetActiveHand(Entity<HandsComponent?> entity)
+    {
+        if (!Resolve(entity, ref entity.Comp))
+            return null;
+
+        return entity.Comp.ActiveHand;
+    }
+
+    public EntityUid? GetActiveItem(Entity<HandsComponent?> entity)
+    {
+        return GetActiveHand(entity)?.HeldEntity;
+    }
+
     /// <summary>
     ///     Enumerate over hands, starting with the currently active hand.
     /// </summary>
@@ -227,9 +263,17 @@ public abstract partial class SharedHandsSystem
         return true;
     }
 
-    public bool IsHolding(EntityUid uid, EntityUid? entity, [NotNullWhen(true)] out Hand? inHand, HandsComponent? handsComp = null)
+    public bool IsHolding(Entity<HandsComponent?> entity, [NotNullWhen(true)] EntityUid? item)
+    {
+        return IsHolding(entity, item, out _, entity);
+    }
+
+    public bool IsHolding(EntityUid uid, [NotNullWhen(true)] EntityUid? entity, [NotNullWhen(true)] out Hand? inHand, HandsComponent? handsComp = null)
     {
         inHand = null;
+        if (entity == null)
+            return false;
+
         if (!Resolve(uid, ref handsComp, false))
             return false;
 
index 136a1f82cff3aecfe0b7492293618f6c839f74f0..3f83816b7dea9ec2f876eb253d0d0984beefe621 100644 (file)
@@ -4,22 +4,26 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations;
 
 namespace Content.Shared.UserInterface
 {
-    [RegisterComponent, NetworkedComponent]
+    [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
     public sealed partial class ActivatableUIComponent : Component
     {
         [DataField(required: true, customTypeSerializer: typeof(EnumSerializer))]
-        public Enum? Key { get; set; } = default!;
+        public Enum? Key;
 
+        /// <summary>
+        /// Whether the item must be held in one of the user's hands to work.
+        /// This is ignored unless <see cref="RequireHands"/> is true.
+        /// </summary>
         [ViewVariables(VVAccess.ReadWrite)]
         [DataField]
-        public bool InHandsOnly { get; set; } = false;
+        public bool InHandsOnly;
 
         [DataField]
-        public bool SingleUser { get; set; } = false;
+        public bool SingleUser;
 
         [ViewVariables(VVAccess.ReadWrite)]
         [DataField]
-        public bool AdminOnly { get; set; } = false;
+        public bool AdminOnly;
 
         [DataField]
         public LocId VerbText = "ui-verb-toggle-open";
@@ -38,16 +42,15 @@ namespace Content.Shared.UserInterface
         /// <summary>
         ///     Entities that are required to open this UI.
         /// </summary>
-        [DataField("allowedItems")]
-        [ViewVariables(VVAccess.ReadWrite)]
-        public EntityWhitelist? AllowedItems = null;
+        [DataField, ViewVariables(VVAccess.ReadWrite)]
+        public EntityWhitelist? RequiredItems;
 
         /// <summary>
-        ///     Whether you can activate this ui with activateinhand or not
+        ///     If true, then this UI can only be opened via verbs. I.e., normal interactions/activations will not open
+        ///     the UI.
         /// </summary>
-        [ViewVariables(VVAccess.ReadWrite)]
-        [DataField]
-        public bool RightClickOnly;
+        [DataField, ViewVariables(VVAccess.ReadWrite)]
+        public bool VerbOnly;
 
         /// <summary>
         ///     Whether spectators (non-admin ghosts) should be allowed to view this UI.
@@ -57,17 +60,18 @@ namespace Content.Shared.UserInterface
         public bool AllowSpectator = true;
 
         /// <summary>
-        ///     Whether the UI should close when the item is deselected due to a hand swap or drop
+        ///     Whether the item must be in the user's currently selected/active hand.
+        ///     This is ignored unless <see cref="InHandsOnly"/> is true.
         /// </summary>
         [ViewVariables(VVAccess.ReadWrite)]
         [DataField]
-        public bool CloseOnHandDeselect = true;
+        public bool RequireActiveHand = true;
 
         /// <summary>
         ///     The client channel currently using the object, or null if there's none/not single user.
         ///     NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
         /// </summary>
-        [ViewVariables]
+        [DataField, AutoNetworkedField]
         public EntityUid? CurrentSingleUser;
     }
 }
index 64099c9573edd240947ac88463815436b31b69dd..b8a815c7a8105d21852c163d987f909a0f9ee928 100644 (file)
@@ -20,12 +20,19 @@ public sealed partial class ActivatableUISystem
     {
         _cell.SetPowerCellDrawEnabled(uid, false);
 
-        if (HasComp<ActivatableUIRequiresPowerCellComponent>(uid) &&
-            TryComp<ActivatableUIComponent>(uid, out var activatable) &&
-            activatable.Key != null)
+        if (!HasComp<ActivatableUIRequiresPowerCellComponent>(uid) ||
+            !TryComp(uid, out ActivatableUIComponent? activatable))
         {
-            _uiSystem.CloseUi(uid, activatable.Key);
+            return;
+        }
+
+        if (activatable.Key == null)
+        {
+            Log.Error($"Encountered null key in activatable ui on entity {ToPrettyString(uid)}");
+            return;
         }
+
+        _uiSystem.CloseUi(uid, activatable.Key);
     }
 
     private void OnBatteryOpened(EntityUid uid, ActivatableUIRequiresPowerCellComponent component, BoundUIOpenedEvent args)
@@ -55,9 +62,15 @@ public sealed partial class ActivatableUISystem
     /// </summary>
     public void CheckUsage(EntityUid uid, ActivatableUIComponent? active = null, ActivatableUIRequiresPowerCellComponent? component = null, PowerCellDrawComponent? draw = null)
     {
-        if (!Resolve(uid, ref component, ref draw, ref active, false) || active.Key == null)
+        if (!Resolve(uid, ref component, ref draw, ref active, false))
             return;
 
+        if (active.Key == null)
+        {
+            Log.Error($"Encountered null key in activatable ui on entity {ToPrettyString(uid)}");
+            return;
+        }
+
         if (_cell.HasActivatableCharge(uid))
             return;
 
index 94271cc681200079fc44f66f5cb0f10e54195cd7..5d408012bd0292d9f656e8c559d4f26e983cd33a 100644 (file)
@@ -3,11 +3,11 @@ using Content.Shared.Administration.Managers;
 using Content.Shared.Ghost;
 using Content.Shared.Hands;
 using Content.Shared.Hands.Components;
+using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
-using Content.Shared.Interaction.Events;
 using Content.Shared.Popups;
 using Content.Shared.Verbs;
-using Robust.Shared.Player;
+using Robust.Shared.Containers;
 
 namespace Content.Shared.UserInterface;
 
@@ -17,23 +17,31 @@ public sealed partial class ActivatableUISystem : EntitySystem
     [Dependency] private readonly ActionBlockerSystem _blockerSystem = default!;
     [Dependency] private readonly SharedUserInterfaceSystem _uiSystem = default!;
     [Dependency] private readonly SharedPopupSystem _popupSystem = default!;
+    [Dependency] private readonly SharedHandsSystem _hands = default!;
+    [Dependency] private readonly SharedContainerSystem _container = default!;
+    [Dependency] private readonly SharedInteractionSystem _interaction = default!;
+
+    private readonly List<EntityUid> _toClose = new();
 
     public override void Initialize()
     {
         base.Initialize();
 
         SubscribeLocalEvent<ActivatableUIComponent, ActivateInWorldEvent>(OnActivate);
-        SubscribeLocalEvent<ActivatableUIComponent, UseInHandEvent>(OnUseInHand);
         SubscribeLocalEvent<ActivatableUIComponent, InteractUsingEvent>(OnInteractUsing);
         SubscribeLocalEvent<ActivatableUIComponent, HandDeselectedEvent>(OnHandDeselected);
-        SubscribeLocalEvent<ActivatableUIComponent, GotUnequippedHandEvent>((uid, aui, _) => CloseAll(uid, aui));
-        // *THIS IS A BLATANT WORKAROUND!* RATIONALE: Microwaves need it
-        SubscribeLocalEvent<ActivatableUIComponent, EntParentChangedMessage>(OnParentChanged);
+        SubscribeLocalEvent<ActivatableUIComponent, GotUnequippedHandEvent>(OnHandUnequipped);
         SubscribeLocalEvent<ActivatableUIComponent, BoundUIClosedEvent>(OnUIClose);
-        SubscribeLocalEvent<BoundUserInterfaceMessageAttempt>(OnBoundInterfaceInteractAttempt);
+        SubscribeLocalEvent<ActivatableUIComponent, GetVerbsEvent<ActivationVerb>>(GetActivationVerb);
+        SubscribeLocalEvent<ActivatableUIComponent, GetVerbsEvent<Verb>>(GetVerb);
 
-        SubscribeLocalEvent<ActivatableUIComponent, GetVerbsEvent<ActivationVerb>>(AddOpenUiVerb);
+        // TODO ActivatableUI
+        // Add UI-user component, and listen for user container changes.
+        // I.e., should lose a computer UI if a player gets shut into a locker.
+        SubscribeLocalEvent<ActivatableUIComponent, EntGotInsertedIntoContainerMessage>(OnGotInserted);
+        SubscribeLocalEvent<ActivatableUIComponent, EntGotRemovedFromContainerMessage>(OnGotRemoved);
 
+        SubscribeLocalEvent<BoundUserInterfaceMessageAttempt>(OnBoundInterfaceInteractAttempt);
         SubscribeLocalEvent<UserInterfaceComponent, OpenUiActionEvent>(OnActionPerform);
 
         InitializePower();
@@ -59,25 +67,54 @@ public sealed partial class ActivatableUISystem : EntitySystem
         args.Handled = _uiSystem.TryToggleUi(uid, args.Key, args.Performer);
     }
 
-    private void AddOpenUiVerb(EntityUid uid, ActivatableUIComponent component, GetVerbsEvent<ActivationVerb> args)
+
+    private void GetActivationVerb(EntityUid uid, ActivatableUIComponent component, GetVerbsEvent<ActivationVerb> args)
     {
-        if (!args.CanAccess)
+        if (component.VerbOnly || !ShouldAddVerb(uid, component, args))
             return;
 
-        if (component.RequireHands && args.Hands == null)
-            return;
+        args.Verbs.Add(new ActivationVerb
+        {
+            // TODO VERBS add "open UI" icon
+            Act = () => InteractUI(args.User, uid, component),
+            Text = Loc.GetString(component.VerbText)
+        });
+    }
 
-        if (component.InHandsOnly && args.Using != uid)
+    private void GetVerb(EntityUid uid, ActivatableUIComponent component, GetVerbsEvent<Verb> args)
+    {
+        if (!component.VerbOnly || !ShouldAddVerb(uid, component, args))
             return;
 
-        if (!args.CanInteract && (!component.AllowSpectator || !HasComp<GhostComponent>(args.User)))
-            return;
+        args.Verbs.Add(new Verb
+        {
+            // TODO VERBS add "open UI" icon
+            Act = () => InteractUI(args.User, uid, component),
+            Text = Loc.GetString(component.VerbText)
+        });
+    }
+
+    private bool ShouldAddVerb<T>(EntityUid uid, ActivatableUIComponent component, GetVerbsEvent<T> args) where T : Verb
+    {
+        if (!args.CanAccess)
+            return false;
+
+        if (component.RequireHands)
+        {
+            if (args.Hands == null)
+                return false;
+
+            if (component.InHandsOnly)
+            {
+                if (!_hands.IsHolding(args.User, uid, out var hand, args.Hands))
+                    return false;
+
+                if (component.RequireActiveHand && args.Hands.ActiveHand != hand)
+                    return false;
+            }
+        }
 
-        ActivationVerb verb = new();
-        verb.Act = () => InteractUI(args.User, uid, component);
-        verb.Text = Loc.GetString(component.VerbText);
-        // TODO VERBS add "open UI" icon?
-        args.Verbs.Add(verb);
+        return args.CanInteract || component.AllowSpectator && HasComp<GhostComponent>(args.User);
     }
 
     private void OnActivate(EntityUid uid, ActivatableUIComponent component, ActivateInWorldEvent args)
@@ -85,42 +122,32 @@ public sealed partial class ActivatableUISystem : EntitySystem
         if (args.Handled)
             return;
 
-        if (component.InHandsOnly)
+        if (component.VerbOnly)
             return;
 
-        if (component.AllowedItems != null)
+        if (component.RequiredItems != null)
             return;
 
         args.Handled = InteractUI(args.User, uid, component);
     }
 
-    private void OnUseInHand(EntityUid uid, ActivatableUIComponent component, UseInHandEvent args)
+    private void OnInteractUsing(EntityUid uid, ActivatableUIComponent component, InteractUsingEvent args)
     {
         if (args.Handled)
             return;
 
-        if (component.RightClickOnly)
+        if (component.VerbOnly)
             return;
 
-        if (component.AllowedItems != null)
+        if (component.RequiredItems == null)
             return;
 
-        args.Handled = InteractUI(args.User, uid, component);
-    }
+        if (!component.RequiredItems.IsValid(args.Used, EntityManager))
+            return;
 
-    private void OnInteractUsing(EntityUid uid, ActivatableUIComponent component, InteractUsingEvent args)
-    {
-        if (args.Handled) return;
-        if (component.AllowedItems == null) return;
-        if (!component.AllowedItems.IsValid(args.Used, EntityManager)) return;
         args.Handled = InteractUI(args.User, uid, component);
     }
 
-    private void OnParentChanged(EntityUid uid, ActivatableUIComponent aui, ref EntParentChangedMessage args)
-    {
-        CloseAll(uid, aui);
-    }
-
     private void OnUIClose(EntityUid uid, ActivatableUIComponent component, BoundUIClosedEvent args)
     {
         var user = args.Actor;
@@ -148,22 +175,33 @@ public sealed partial class ActivatableUISystem : EntitySystem
         if (!_blockerSystem.CanInteract(user, uiEntity) && (!aui.AllowSpectator || !HasComp<GhostComponent>(user)))
             return false;
 
-        if (aui.RequireHands && !HasComp<HandsComponent>(user))
-            return false;
+        if (aui.RequireHands)
+        {
+            if (!TryComp(user, out HandsComponent? hands))
+                return false;
+
+            if (aui.InHandsOnly)
+            {
+                if (!_hands.IsHolding(user, uiEntity, out var hand, hands))
+                    return false;
+
+                if (aui.RequireActiveHand && hands.ActiveHand != hand)
+                    return false;
+            }
+        }
 
         if (aui.AdminOnly && !_adminManager.IsAdmin(user))
             return false;
 
         if (aui.SingleUser && aui.CurrentSingleUser != null && user != aui.CurrentSingleUser)
         {
-            string message = Loc.GetString("machine-already-in-use", ("machine", uiEntity));
+            var message = Loc.GetString("machine-already-in-use", ("machine", uiEntity));
             _popupSystem.PopupEntity(message, uiEntity, user);
 
-            // If we get here, supposedly, the object is in use.
-            // Check with BUI that it's ACTUALLY in use just in case.
-            // Since this could brick the object if it goes wrong.
             if (_uiSystem.IsUiOpen(uiEntity, aui.Key))
-                return false;
+                return true;
+
+            Log.Error($"Activatable UI has user without being opened? Entity: {ToPrettyString(uiEntity)}. User: {aui.CurrentSingleUser}, Key: {aui.Key}");
         }
 
         // If we've gotten this far, fire a cancellable event that indicates someone is about to activate this.
@@ -199,26 +237,77 @@ public sealed partial class ActivatableUISystem : EntitySystem
             return;
 
         aui.CurrentSingleUser = user;
+        Dirty(uid, aui);
 
         RaiseLocalEvent(uid, new ActivatableUIPlayerChangedEvent());
     }
 
     public void CloseAll(EntityUid uid, ActivatableUIComponent? aui = null)
     {
-        if (!Resolve(uid, ref aui, false) || aui.Key == null)
+        if (!Resolve(uid, ref aui, false))
             return;
 
+        if (aui.Key == null)
+        {
+            Log.Error($"Encountered null key in activatable ui on entity {ToPrettyString(uid)}");
+            return;
+        }
+
         _uiSystem.CloseUi(uid, aui.Key);
     }
 
-    private void OnHandDeselected(EntityUid uid, ActivatableUIComponent? aui, HandDeselectedEvent args)
+    private void OnHandDeselected(Entity<ActivatableUIComponent> ent, ref HandDeselectedEvent args)
     {
-        if (!Resolve(uid, ref aui, false))
+        if (ent.Comp.RequireHands && ent.Comp.InHandsOnly && ent.Comp.RequireActiveHand)
+            CloseAll(ent, ent);
+    }
+
+    private void OnHandUnequipped(Entity<ActivatableUIComponent> ent, ref GotUnequippedHandEvent args)
+    {
+        if (ent.Comp.RequireHands && ent.Comp.InHandsOnly)
+            CloseAll(ent, ent);
+    }
+
+    private void OnGotInserted(Entity<ActivatableUIComponent> ent, ref EntGotInsertedIntoContainerMessage args)
+    {
+        CheckAccess((ent, ent));
+    }
+
+    private void OnGotRemoved(Entity<ActivatableUIComponent> ent, ref EntGotRemovedFromContainerMessage args)
+    {
+        CheckAccess((ent, ent));
+    }
+
+    public void CheckAccess(Entity<ActivatableUIComponent?> ent)
+    {
+        if (!Resolve(ent, ref ent.Comp))
             return;
 
-        if (!aui.CloseOnHandDeselect)
+        if (ent.Comp.Key == null)
+        {
+            Log.Error($"Encountered null key in activatable ui on entity {ToPrettyString(ent)}");
             return;
+        }
+
+        foreach (var user in _uiSystem.GetActors(ent.Owner, ent.Comp.Key))
+        {
+            if (!_container.IsInSameOrParentContainer(user, ent)
+                && !_interaction.CanAccessViaStorage(user, ent))
+            {
+                _toClose.Add(user);
+                continue;
+
+            }
+
+            if (!_interaction.InRangeUnobstructed(user, ent))
+                _toClose.Add(user);
+        }
+
+        foreach (var user in _toClose)
+        {
+            _uiSystem.CloseUi(ent.Owner, ent.Comp.Key, user);
+        }
 
-        CloseAll(uid, aui);
+        _toClose.Clear();
     }
 }
index 02ec58bd67e39a85d605db0c609cc1663e1c03b8..0c2ded620eb1611df0d0e2ccc9a2efa432d9147c 100644 (file)
   - type: MeleeSpeech
   - type: ActivatableUI
     key: enum.MeleeSpeechUiKey.Key
-    closeOnHandDeselect: false
-    rightClickOnly: true
+    verbOnly: true
   - type: Actions
   - type: UserInterface
     interfaces:
index ada46c5d02e329a844c8d8fc55af473ecff672b3..a832bea741448bbc7d390550abf31c4486a51eed 100644 (file)
@@ -16,7 +16,7 @@
     - type: AccessReader
     - type: ActivatableUI
       key: enum.DoorElectronicsConfigurationUiKey.Key
-      allowedItems:
+      requiredItems:
         tags:
         - DoorElectronicsConfigurator
     - type: UserInterface
index c0ce4cba18130a9ce38204fae4a5b1ba4676b640..78009f10422ee5db513558a4e3bddec98e85741d 100644 (file)
@@ -14,7 +14,7 @@
     - type: ActivatableUI
       inHandsOnly: true
       singleUser: true
-      closeOnHandDeselect: false
+      requireActiveHand: false
       key: enum.WarDeclaratorUiKey.Key
     - type: UserInterface
       interfaces:
index e7c0b14beb0cd408556babc9916fba163c47adf4..170751766bed4bb05fe3e415f3b769a4e81ed457 100644 (file)
@@ -17,7 +17,7 @@
   - type: ActivatableUI
     key: enum.ForensicScannerUiKey.Key
     inHandsOnly: true
-    closeOnHandDeselect: false
+    requireActiveHand: false
   - type: UserInterface
     interfaces:
       enum.ForensicScannerUiKey.Key:
index e1efc0399304769ef0647a6cef8bd8fa87d0018b..472d0ecbe1e19958cdb19f8c6c7f2547d19b1036 100644 (file)
@@ -86,7 +86,6 @@
   - type: ActivatableUI
     key: enum.PdaUiKey.Key
     singleUser: true
-    closeOnHandDeselect: false
   - type: UserInterface
     interfaces:
       enum.PdaUiKey.Key:
index e44e981a6cf99d96ad6780a1ed7562057dcc0c8e..25e6bb9f943f2f4a2f3d984a46beb440c82313c0 100644 (file)
@@ -22,7 +22,6 @@
     contentSize: 12000
   - type: ActivatableUI
     key: enum.PaperUiKey.Key
-    closeOnHandDeselect: false
   - type: UserInterface
     interfaces:
       enum.PaperUiKey.Key:
index 0c87459164a54519e42059223af9f6d81dee05a5..5fa341c976b3e08e315738f0abf0985dcb94e1e7 100644 (file)
@@ -18,7 +18,6 @@
   - type: PaperLabelType
   - type: ActivatableUI
     key: enum.PaperUiKey.Key
-    closeOnHandDeselect: false
     requireHands: false
   - type: UserInterface
     interfaces:
index f30e1cf633a1ff450ba4caddc76ab0bfde779b71..19a0b36ee9f9797c21aa0db109d88b9ab10bbf11 100644 (file)
@@ -17,7 +17,6 @@
   - type: ActivatableUIRequiresPowerCell
   - type: ActivatableUI
     key: enum.CrewMonitoringUIKey.Key
-    closeOnHandDeselect: false
   - type: UserInterface
     interfaces:
       enum.CrewMonitoringUIKey.Key:
index 4f8b6f29361fa52f1da274f5b022af719199727a..c01aaa84a9d76b33734364ee0fa7a78f5d7a825c 100644 (file)
@@ -17,7 +17,6 @@
     storedRotation: -90
   - type: ActivatableUI
     key: enum.HealthAnalyzerUiKey.Key
-    closeOnHandDeselect: false
   - type: UserInterface
     interfaces:
       enum.HealthAnalyzerUiKey.Key:
index 4250d9ccdd6511a3143c6f68252fbb259dc017c6..bf0a3be4e51d63a2c092c505df7c075a940fed4a 100644 (file)
@@ -9,7 +9,7 @@
     state: icon
   - type: ActivatableUI
     key: enum.AnomalyScannerUiKey.Key
-    closeOnHandDeselect: false
+    requireActiveHand: false
     inHandsOnly: true
   - type: UserInterface
     interfaces:
index d7b0a566e1bdbee7ad48ce3a0c1d601b7215f828..251331919eb5cdea2c01d2e9f8bdd510a0222637 100644 (file)
@@ -10,7 +10,8 @@
   - type: MagicMirror
   - type: ActivatableUI
     key: enum.MagicMirrorUiKey.Key
-    closeOnHandDeselect: true
+    inHandsOnly: true
+    requireActiveHand: true
   - type: UserInterface
     interfaces:
       enum.MagicMirrorUiKey.Key:
index acf5f6f24044fc45317c788485b18df8ded30919..c67e7ff8c316cdf58393ab8118998fdd523a55ab 100644 (file)
@@ -13,7 +13,7 @@
   - type: ActivatableUI
     inHandsOnly: true
     singleUser: true
-    closeOnHandDeselect: false
+    requireActiveHand: false
     key: enum.GasAnalyzerUiKey.Key
   - type: UserInterface
     interfaces:
index b6c7c498554c0420e2da7e7691b22ff92ed01ff2..d63e1f0aa9f462bb673b96e8f174ee50fe0b228b 100644 (file)
@@ -67,7 +67,7 @@
     - type: ActivatableUI
       key: enum.AccessOverriderUiKey.Key
       requireHands: true
-      closeOnHandDeselect: false
+      requireActiveHand: false
       singleUser: true
     - type: ItemSlots
     - type: ContainerContainer