EntityStorage empties contents on destroy. (#1074)
Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user