From 4f66b3f4ad60b7e824cc222c44f4eef9466965f4 Mon Sep 17 00:00:00 2001 From: Darki255 Date: Tue, 25 Jun 2024 18:25:37 +0300 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B8=D1=82=D1=81=D1=8F?= =?UTF-8?q?=20=D1=81=D0=BF=D0=B0=D1=81=D1=82=D0=B8=D1=81=D1=8C=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=B9=D0=BD=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=85=20=D0=BE=D1=82=20=D1=8F=D0=B4=D0=B5=D1=80=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Disposal/Unit/EntitySystems/DisposalUnitSystem.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 6938792315c..b5d6701e2a0 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Server.Administration.Logs; +using Content.Shared.Explosion; using Content.Server.Atmos.EntitySystems; using Content.Server.Disposal.Tube; using Content.Server.Disposal.Tube.Components; @@ -79,6 +80,7 @@ public override void Initialize() SubscribeLocalEvent(OnAfterInteractUsing); SubscribeLocalEvent(OnDragDropOn); SubscribeLocalEvent(OnDestruction); + SubscribeLocalEvent(OnExploded); SubscribeLocalEvent>(AddInsertVerb); SubscribeLocalEvent>(AddDisposalAltVerbs); @@ -381,6 +383,11 @@ private void OnDestruction(EntityUid uid, SharedDisposalUnitComponent component, TryEjectContents(uid, component); } + private void OnExploded(Entity ent, ref BeforeExplodeEvent args) + { + args.Contents.AddRange(ent.Comp.Container.ContainedEntities); + } + private void OnDragDropOn(EntityUid uid, SharedDisposalUnitComponent component, ref DragDropTargetEvent args) { args.Handled = TryInsert(uid, args.Dragged, args.User);