Predicted lock popups (#16692)

This commit is contained in:
metalgearsloth
2023-05-22 23:18:51 +10:00
committed by GitHub
parent 20faa3169e
commit 3ed2650e8b
3 changed files with 13 additions and 17 deletions

View File

@@ -159,7 +159,7 @@ public record struct InsertIntoEntityStorageAttemptEvent(bool Cancelled = false)
public record struct StoreMobInItemContainerAttemptEvent(bool Handled, bool Cancelled = false);
[ByRefEvent]
public record struct StorageOpenAttemptEvent(bool Silent, bool Cancelled = false);
public record struct StorageOpenAttemptEvent(EntityUid User, bool Silent, bool Cancelled = false);
[ByRefEvent]
public readonly record struct StorageBeforeOpenEvent;

View File

@@ -340,7 +340,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
}
}
var ev = new StorageOpenAttemptEvent(silent);
var ev = new StorageOpenAttemptEvent(user, silent);
RaiseLocalEvent(target, ref ev, true);
return !ev.Cancelled;