From: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Date: Wed, 18 Dec 2024 00:12:35 +0000 (+0100)
Subject: Fix admins not being able to health scan slimes (#33884)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=908e47664369b7e99f30b6c4c333004500d53d48;p=space-station-14.git
Fix admins not being able to health scan slimes (#33884)
---
diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
index 183420db9d..123282fbdb 100644
--- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
+++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
@@ -360,7 +360,7 @@ public abstract class SharedStorageSystem : EntitySystem
/// true if inserted, false otherwise
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
///
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
diff --git a/Content.Shared/Storage/StorageComponent.cs b/Content.Shared/Storage/StorageComponent.cs
index 5683ae95a7..52547454a0 100644
--- a/Content.Shared/Storage/StorageComponent.cs
+++ b/Content.Shared/Storage/StorageComponent.cs
@@ -65,8 +65,18 @@ namespace Content.Shared.Storage
[DataField]
public TimeSpan OpenUiCooldown = TimeSpan.Zero;
+ ///
+ /// Can insert stuff by clicking the storage entity with it.
+ ///
+ [DataField]
+ public bool ClickInsert = true;
+
+ ///
+ /// Open the storage window when pressing E.
+ /// When false you can still open the inventory using verbs.
+ ///
[DataField]
- public bool ClickInsert = true; // Can insert stuff by clicking the storage entity with it
+ public bool OpenOnActivate = true;
///
/// How many entities area pickup can pickup at once.
diff --git a/Resources/Prototypes/Entities/Mobs/Species/slime.yml b/Resources/Prototypes/Entities/Mobs/Species/slime.yml
index 56acf52fb7..469a92092d 100644
--- a/Resources/Prototypes/Entities/Mobs/Species/slime.yml
+++ b/Resources/Prototypes/Entities/Mobs/Species/slime.yml
@@ -15,6 +15,7 @@
# they like eat it idk lol
- type: Storage
clickInsert: false
+ openOnActivate: false
grid:
- 0,0,1,2
maxItemSize: Large