]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix admins not being able to health scan slimes (#33884)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Wed, 18 Dec 2024 00:12:35 +0000 (01:12 +0100)
committerGitHub <noreply@github.com>
Wed, 18 Dec 2024 00:12:35 +0000 (01:12 +0100)
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
Content.Shared/Storage/StorageComponent.cs
Resources/Prototypes/Entities/Mobs/Species/slime.yml

index 183420db9d154e037bbfe6423369d34fa9983c1c..123282fbdbee44d19ff132374144308123c6a242 100644 (file)
@@ -360,7 +360,7 @@ public abstract class SharedStorageSystem : EntitySystem
     /// <returns>true if inserted, false otherwise</returns>
     private void OnInteractUsing(EntityUid uid, StorageComponent storageComp, InteractUsingEvent args)
     {
-        if (args.Handled || !CanInteract(args.User, (uid, storageComp), storageComp.ClickInsert, false))
+        if (args.Handled || !storageComp.ClickInsert || !CanInteract(args.User, (uid, storageComp), silent: false))
             return;
 
         var attemptEv = new StorageInteractUsingAttemptEvent();
@@ -380,7 +380,7 @@ public abstract class SharedStorageSystem : EntitySystem
     /// </summary>
     private void OnActivate(EntityUid uid, StorageComponent storageComp, ActivateInWorldEvent args)
     {
-        if (args.Handled || !args.Complex || !CanInteract(args.User, (uid, storageComp), storageComp.ClickInsert))
+        if (args.Handled || !args.Complex || !storageComp.OpenOnActivate || !CanInteract(args.User, (uid, storageComp)))
             return;
 
         // Toggle
index 5683ae95a719f3cb63a1437b37c835a2ef892f7f..52547454a076dc458fabb5628f5120833a32a1df 100644 (file)
@@ -65,8 +65,18 @@ namespace Content.Shared.Storage
         [DataField]
         public TimeSpan OpenUiCooldown = TimeSpan.Zero;
 
+        /// <summary>
+        /// Can insert stuff by clicking the storage entity with it.
+        /// </summary>
+        [DataField]
+        public bool ClickInsert = true;
+
+        /// <summary>
+        /// Open the storage window when pressing E.
+        /// When false you can still open the inventory using verbs.
+        /// </summary>
         [DataField]
-        public bool ClickInsert = true; // Can insert stuff by clicking the storage entity with it
+        public bool OpenOnActivate = true;
 
         /// <summary>
         /// How many entities area pickup can pickup at once.
index 56acf52fb7178c738aec23d5eae6e9ad2703d28f..469a92092d2291f235d57a4d6d4108631cf440dd 100644 (file)
@@ -15,6 +15,7 @@
   # they like eat it idk lol
   - type: Storage
     clickInsert: false
+    openOnActivate: false
     grid:
     - 0,0,1,2
     maxItemSize: Large