From cec86f053399a58adde3646fb8b066c228baecda Mon Sep 17 00:00:00 2001 From: FL-OZ <58238103+FL-OZ@users.noreply.github.com> Date: Fri, 5 Jun 2020 16:48:42 -0500 Subject: [PATCH] EntityStorage empties contents on destroy. (#1074) Co-authored-by: FL-OZ --- .../Components/Items/Storage/EntityStorageComponent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs index 45447a87a1..fcd72fdbf5 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs @@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components [RegisterComponent] [ComponentReference(typeof(IActivate))] [ComponentReference(typeof(IStorageComponent))] - public class EntityStorageComponent : Component, IActivate, IStorageComponent, IInteractUsing + public class EntityStorageComponent : Component, IActivate, IStorageComponent, IInteractUsing, IDestroyAct { public override string Name => "EntityStorage"; @@ -380,5 +380,10 @@ namespace Content.Server.GameObjects.Components IsWeldedShut ^= true; return true; } + + public void OnDestroy(DestructionEventArgs eventArgs) + { + EmptyContents(); + } } }