Cardboard box fixes (#13087)
This commit is contained in:
@@ -118,8 +118,6 @@ public sealed class StorageAfterOpenEvent : EventArgs { }
|
||||
public sealed class StorageCloseAttemptEvent : CancellableEntityEventArgs { }
|
||||
public sealed class StorageBeforeCloseEvent : EventArgs
|
||||
{
|
||||
public EntityUid Container;
|
||||
|
||||
public HashSet<EntityUid> Contents;
|
||||
|
||||
/// <summary>
|
||||
@@ -127,9 +125,8 @@ public sealed class StorageBeforeCloseEvent : EventArgs
|
||||
/// </summary>
|
||||
public HashSet<EntityUid> BypassChecks = new();
|
||||
|
||||
public StorageBeforeCloseEvent(EntityUid container, HashSet<EntityUid> contents)
|
||||
public StorageBeforeCloseEvent(HashSet<EntityUid> contents)
|
||||
{
|
||||
Container = container;
|
||||
Contents = contents;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,8 +178,8 @@ public sealed class EntityStorageSystem : EntitySystem
|
||||
|
||||
var entities = _lookup.GetEntitiesInRange(targetCoordinates, component.EnteringRange, LookupFlags.Approximate | LookupFlags.Dynamic | LookupFlags.Sundries);
|
||||
|
||||
var ev = new StorageBeforeCloseEvent(uid, entities);
|
||||
RaiseLocalEvent(uid, ev, true);
|
||||
var ev = new StorageBeforeCloseEvent(entities);
|
||||
RaiseLocalEvent(uid, ev);
|
||||
var count = 0;
|
||||
foreach (var entity in ev.Contents)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user