]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix door electronics configurator usage (#26888)
authorJark255 <jaroslav.asanov@gmail.com>
Thu, 11 Apr 2024 12:21:15 +0000 (15:21 +0300)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 12:21:15 +0000 (22:21 +1000)
* allow usage of network configurator for door electronics

* add checks for "allowed" items

Content.Server/UserInterface/ActivatableUISystem.cs
Resources/Prototypes/Entities/Objects/Devices/Electronics/door.yml
Resources/Prototypes/Entities/Objects/Tools/tools.yml
Resources/Prototypes/tags.yml

index e3a11af4295c43ae32c81e1156e7aa885c37ecf0..5f2314df90b596c5d58b337d211d7bccb2914e6c 100644 (file)
@@ -93,6 +93,9 @@ public sealed partial class ActivatableUISystem : EntitySystem
         if (component.InHandsOnly)
             return;
 
+        if (component.AllowedItems != null)
+            return;
+
         args.Handled = InteractUI(args.User, uid, component);
     }
 
@@ -104,6 +107,9 @@ public sealed partial class ActivatableUISystem : EntitySystem
         if (component.RightClickOnly)
             return;
 
+        if (component.AllowedItems != null)
+            return;
+
         args.Handled = InteractUI(args.User, uid, component);
     }
 
index 16713a6692f51d5f47109d9a000d808b6eca2813..670b556e359889ae76c596c9fcb0a9295e797dd1 100644 (file)
@@ -18,7 +18,7 @@
       key: enum.DoorElectronicsConfigurationUiKey.Key
       allowedItems:
         tags:
-        - Multitool
+        - DoorElectronicsConfigurator
     - type: UserInterface
       interfaces:
       - key: enum.DoorElectronicsConfigurationUiKey.Key
index 2b11c211e8ebc585ee44f5abe5a8b26acb340d59..b3103816eb9c3413e121a1818c4866a4062caf51 100644 (file)
   - type: Tag
     tags:
       - Multitool
+      - DoorElectronicsConfigurator
   - type: PhysicalComposition
     materialComposition:
       Steel: 100
     - type: ActivatableUI
       key: enum.NetworkConfiguratorUiKey.List
       inHandsOnly: true
+    - type: Tag
+      tags:
+        - DoorElectronicsConfigurator
     - type: UserInterface
       interfaces:
         - key: enum.NetworkConfiguratorUiKey.List
   description: The rapid construction device can be used to quickly place and remove various station structures and fixtures. Requires compressed matter to function.
   components:
   - type: RCD
-    availablePrototypes:   
+    availablePrototypes:
     - WallSolid
     - FloorSteel
     - Plating
     - Catwalk
     - Grille
-    - Window    
+    - Window
     - WindowDirectional
     - WindowReinforcedDirectional
     - ReinforcedWindow
   - type: LimitedCharges
     charges: 0
   - type: RCD
-    availablePrototypes:   
+    availablePrototypes:
     - WallSolid
     - FloorSteel
     - Plating
index 961912d6092bf97b54c50a13d994a5b8ec344cf5..021427014c3917422bf9765c1004e0115ab002c1 100644 (file)
 - type: Tag
   id: DoorElectronics
 
+- type: Tag
+  id: DoorElectronicsConfigurator
+
 - type: Tag
   id: DrinkBottle
 
 
 - type: Tag
   id: SuitEVA
-  
+
 - type: Tag
   id: Sunglasses