From 441325347c836f400970b301df05e13835f07e18 Mon Sep 17 00:00:00 2001 From: Doomsdrayk Date: Wed, 26 Jun 2024 08:25:42 -0600 Subject: [PATCH] Fix disposals being effective nuclear bunkers (#29438) Make disposals report their contents to the explosion system --- .../Disposal/Unit/EntitySystems/DisposalUnitSystem.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index e63c03bd5e..aa1ab3dacc 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Disposal.Components; using Content.Shared.DoAfter; using Content.Shared.DragDrop; using Content.Shared.Emag.Systems; +using Content.Shared.Explosion; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.IdentityManagement; @@ -76,6 +77,7 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem SubscribeLocalEvent(OnAfterInteractUsing); SubscribeLocalEvent(OnDragDropOn); SubscribeLocalEvent(OnDestruction); + SubscribeLocalEvent(OnExploded); SubscribeLocalEvent>(AddInsertVerb); SubscribeLocalEvent>(AddDisposalAltVerbs); @@ -778,6 +780,12 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem Joints.RecursiveClearJoints(inserted); UpdateVisualState(uid, component); } + + private void OnExploded(Entity ent, ref BeforeExplodeEvent args) + { + args.Contents.AddRange(ent.Comp.Container.ContainedEntities); + } + } /// -- 2.51.2