* component cleanup * slice system cleanup * thank you entprotoid * webedit 1 * webedit 2 * bruh this shitcode has sliceable food with no slice * ok no persistence --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
32 lines
936 B
C#
32 lines
936 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, ViewVariables(VVAccess.ReadWrite)]
|
|
public EntProtoId? Slice;
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
|
|
|
|
/// <summary>
|
|
/// Number of slices the food starts with.
|
|
/// </summary>
|
|
[DataField("count"), ViewVariables(VVAccess.ReadWrite)]
|
|
public ushort TotalCount = 5;
|
|
|
|
/// <summary>
|
|
/// Number of slices left.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public ushort Count;
|
|
}
|