small food slicing cleanup (#22291)
* 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>
This commit is contained in:
@@ -1,24 +1,31 @@
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Nutrition.Components
|
||||
namespace Content.Server.Nutrition.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(SliceableFoodSystem))]
|
||||
public sealed partial class SliceableFoodComponent : Component
|
||||
{
|
||||
[RegisterComponent, Access(typeof(SliceableFoodSystem))]
|
||||
internal sealed partial class SliceableFoodComponent : Component
|
||||
{
|
||||
[DataField("slice")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string Slice = string.Empty;
|
||||
/// <summary>
|
||||
/// Prototype to spawn after slicing.
|
||||
/// If null then it can't be sliced.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntProtoId? Slice;
|
||||
|
||||
[DataField("sound")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Items/Culinary/chop.ogg");
|
||||
|
||||
[DataField("count")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public ushort TotalCount = 5;
|
||||
/// <summary>
|
||||
/// Number of slices the food starts with.
|
||||
/// </summary>
|
||||
[DataField("count"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public ushort TotalCount = 5;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public ushort Count;
|
||||
}
|
||||
/// <summary>
|
||||
/// Number of slices left.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public ushort Count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user