2021-11-30 13:20:13 +03:00
|
|
|
using Content.Server.Nutrition.EntitySystems;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2023-12-10 21:13:48 +00:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-01-06 18:48:08 -07:00
|
|
|
|
2023-12-10 21:13:48 +00:00
|
|
|
namespace Content.Server.Nutrition.Components;
|
|
|
|
|
|
|
|
|
|
[RegisterComponent, Access(typeof(SliceableFoodSystem))]
|
|
|
|
|
public sealed partial class SliceableFoodComponent : Component
|
2021-01-06 18:48:08 -07:00
|
|
|
{
|
2023-12-10 21:13:48 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Prototype to spawn after slicing.
|
|
|
|
|
/// If null then it can't be sliced.
|
|
|
|
|
/// </summary>
|
2024-08-13 13:53:59 +03:00
|
|
|
[DataField]
|
2023-12-10 21:13:48 +00:00
|
|
|
public EntProtoId? Slice;
|
2021-01-06 18:48:08 -07:00
|
|
|
|
2024-08-13 13:53:59 +03:00
|
|
|
[DataField]
|
2023-12-10 21:13:48 +00:00
|
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
|
2021-01-06 18:48:08 -07:00
|
|
|
|
2023-12-10 21:13:48 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Number of slices the food starts with.
|
|
|
|
|
/// </summary>
|
2024-08-13 13:53:59 +03:00
|
|
|
[DataField("count")]
|
2023-12-10 21:13:48 +00:00
|
|
|
public ushort TotalCount = 5;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2023-12-10 21:13:48 +00:00
|
|
|
/// <summary>
|
2024-08-13 13:53:59 +03:00
|
|
|
/// how long it takes for this food to be sliced
|
2023-12-10 21:13:48 +00:00
|
|
|
/// </summary>
|
2024-08-13 13:53:59 +03:00
|
|
|
[DataField]
|
|
|
|
|
public float SliceTime = 1f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// all the pieces will be shifted in random directions.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public float SpawnOffset = 0.5f;
|
2021-01-06 18:48:08 -07:00
|
|
|
}
|