Fix admins not being able to health scan slimes (#33884)

This commit is contained in:
slarticodefast
2024-12-18 01:12:35 +01:00
committed by GitHub
parent aaec1e684e
commit 908e476643
3 changed files with 14 additions and 3 deletions

View 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

View 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; // Can insert stuff by clicking the storage entity with it
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 OpenOnActivate = true;
/// <summary>
/// How many entities area pickup can pickup at once.

View File

@@ -15,6 +15,7 @@
# they like eat it idk lol
- type: Storage
clickInsert: false
openOnActivate: false
grid:
- 0,0,1,2
maxItemSize: Large