Dumpable component to use a doafter to empty storage into a disposal unit, placeable surface, or the ground (#7792)
This commit is contained in:
23
Content.Shared/Storage/Components/DumpableComponent.cs
Normal file
23
Content.Shared/Storage/Components/DumpableComponent.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Shared.Storage.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Lets you dump this container on the ground using a verb,
|
||||
/// or when interacting with it on a disposal unit or placeable surface.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class DumpableComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How long each item adds to the doafter.
|
||||
/// </summary>
|
||||
[DataField("delayPerItem")]
|
||||
public TimeSpan DelayPerItem = TimeSpan.FromSeconds(0.2);
|
||||
|
||||
/// <summary>
|
||||
/// Cancellation token for the doafter.
|
||||
/// <summary>
|
||||
public CancellationTokenSource? CancelToken;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user