Dumpable component to use a doafter to empty storage into a disposal unit, placeable surface, or the ground (#7792)

This commit is contained in:
Rane
2022-05-03 23:00:22 -04:00
committed by GitHub
parent 40ae7cc285
commit cfd00e74ca
11 changed files with 240 additions and 72 deletions

View 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;
}
}