Files
tbd-station-14/Content.Server/Nutrition/Components/SliceableFoodComponent.cs
Ed cc180e54e6 Sliceable doAfter (#30824)
* init

* wtf git
2024-08-13 13:53:59 +03:00

38 lines
989 B
C#

using Content.Server.Nutrition.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
namespace Content.Server.Nutrition.Components;
[RegisterComponent, Access(typeof(SliceableFoodSystem))]
public sealed partial class SliceableFoodComponent : Component
{
/// <summary>
/// Prototype to spawn after slicing.
/// If null then it can't be sliced.
/// </summary>
[DataField]
public EntProtoId? Slice;
[DataField]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
/// <summary>
/// Number of slices the food starts with.
/// </summary>
[DataField("count")]
public ushort TotalCount = 5;
/// <summary>
/// how long it takes for this food to be sliced
/// </summary>
[DataField]
public float SliceTime = 1f;
/// <summary>
/// all the pieces will be shifted in random directions.
/// </summary>
[DataField]
public float SpawnOffset = 0.5f;
}