Fix admins not being able to health scan slimes (#33884)
This commit is contained in:
@@ -360,7 +360,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
|||||||
/// <returns>true if inserted, false otherwise</returns>
|
/// <returns>true if inserted, false otherwise</returns>
|
||||||
private void OnInteractUsing(EntityUid uid, StorageComponent storageComp, InteractUsingEvent args)
|
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;
|
return;
|
||||||
|
|
||||||
var attemptEv = new StorageInteractUsingAttemptEvent();
|
var attemptEv = new StorageInteractUsingAttemptEvent();
|
||||||
@@ -380,7 +380,7 @@ public abstract class SharedStorageSystem : EntitySystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnActivate(EntityUid uid, StorageComponent storageComp, ActivateInWorldEvent args)
|
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;
|
return;
|
||||||
|
|
||||||
// Toggle
|
// Toggle
|
||||||
|
|||||||
@@ -65,8 +65,18 @@ namespace Content.Shared.Storage
|
|||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan OpenUiCooldown = TimeSpan.Zero;
|
public TimeSpan OpenUiCooldown = TimeSpan.Zero;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Can insert stuff by clicking the storage entity with it.
|
||||||
|
/// </summary>
|
||||||
[DataField]
|
[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>
|
/// <summary>
|
||||||
/// How many entities area pickup can pickup at once.
|
/// How many entities area pickup can pickup at once.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
# they like eat it idk lol
|
# they like eat it idk lol
|
||||||
- type: Storage
|
- type: Storage
|
||||||
clickInsert: false
|
clickInsert: false
|
||||||
|
openOnActivate: false
|
||||||
grid:
|
grid:
|
||||||
- 0,0,1,2
|
- 0,0,1,2
|
||||||
maxItemSize: Large
|
maxItemSize: Large
|
||||||
|
|||||||
Reference in New Issue
Block a user