EntityStorage empties contents on destroy. (#1074)

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
FL-OZ
2020-06-05 16:48:42 -05:00
committed by GitHub
parent e1df008bce
commit cec86f0533

View File

@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components
[RegisterComponent] [RegisterComponent]
[ComponentReference(typeof(IActivate))] [ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))] [ComponentReference(typeof(IStorageComponent))]
public class EntityStorageComponent : Component, IActivate, IStorageComponent, IInteractUsing public class EntityStorageComponent : Component, IActivate, IStorageComponent, IInteractUsing, IDestroyAct
{ {
public override string Name => "EntityStorage"; public override string Name => "EntityStorage";
@@ -380,5 +380,10 @@ namespace Content.Server.GameObjects.Components
IsWeldedShut ^= true; IsWeldedShut ^= true;
return true; return true;
} }
public void OnDestroy(DestructionEventArgs eventArgs)
{
EmptyContents();
}
} }
} }