From: Doomsdrayk Date: Wed, 26 Jun 2024 14:25:42 +0000 (-0600) Subject: Fix disposals being effective nuclear bunkers (#29438) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=441325347c836f400970b301df05e13835f07e18;p=space-station-14.git Fix disposals being effective nuclear bunkers (#29438) Make disposals report their contents to the explosion system --- 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); + } + } ///