explosion minor rework + fix (#21718)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Explosion;
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Lock;
|
||||
@@ -27,6 +28,7 @@ public sealed partial class StorageSystem : SharedStorageSystem
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<StorageComponent, GetVerbsEvent<ActivationVerb>>(AddUiVerb);
|
||||
SubscribeLocalEvent<StorageComponent, BoundUIClosedEvent>(OnBoundUIClosed);
|
||||
SubscribeLocalEvent<StorageComponent, BeforeExplodeEvent>(OnExploded);
|
||||
|
||||
SubscribeLocalEvent<StorageFillComponent, MapInitEvent>(OnStorageFillMapInit);
|
||||
}
|
||||
@@ -97,6 +99,11 @@ public sealed partial class StorageSystem : SharedStorageSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnExploded(Entity<StorageComponent> ent, ref BeforeExplodeEvent args)
|
||||
{
|
||||
args.Contents.AddRange(ent.Comp.Container.ContainedEntities);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the storage UI for an entity
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user