* lathe and material storage refactor * materialStorage ECS it kinda sus tho * beginning the lathe shitcode dive * couple lathe visuals and lathe system * lathe changes and such * dynamic lathe databases * rewrote internal logic on to ui * da newI * material display clientside * misc ui changes * component state handling and various other things * moar * Update Content.Shared/Lathe/LatheComponent.cs Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * first volley of sloth review * more fixes * losin' my mind * all da changes * test fix and other review Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
using Content.Shared.Research.Prototypes;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
|
|
|
namespace Content.Shared.Lathe
|
|
{
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed class LatheComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// All of the recipes that the lathe has by default
|
|
/// </summary>
|
|
[DataField("staticRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
|
|
public readonly List<string> StaticRecipes = new();
|
|
|
|
/// <summary>
|
|
/// All of the recipes that the lathe is capable of researching
|
|
/// </summary>
|
|
[DataField("dynamicRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
|
|
public readonly List<string>? DynamicRecipes;
|
|
|
|
/// <summary>
|
|
/// The lathe's construction queue
|
|
/// </summary>
|
|
[DataField("queue")]
|
|
public List<LatheRecipePrototype> Queue = new();
|
|
|
|
/// <summary>
|
|
/// How long the inserting animation will play
|
|
/// </summary>
|
|
[DataField("insertionTime")]
|
|
public float InsertionTime = 0.79f; // 0.01 off for animation timing
|
|
|
|
/// <summary>
|
|
/// The sound that plays when the lathe is producing an item, if any
|
|
/// </summary>
|
|
[DataField("producingSound")]
|
|
public SoundSpecifier? ProducingSound;
|
|
|
|
#region Visualizer info
|
|
[DataField("idleState", required: true)]
|
|
public string IdleState = default!;
|
|
|
|
[DataField("runningState", required: true)]
|
|
public string RunningState = default!;
|
|
|
|
[ViewVariables]
|
|
[DataField("ignoreColor")]
|
|
public bool IgnoreColor;
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// The recipe the lathe is currently producing
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public LatheRecipePrototype? CurrentRecipe;
|
|
|
|
|
|
}
|
|
|
|
public sealed class LatheGetRecipesEvent : EntityEventArgs
|
|
{
|
|
public readonly EntityUid Lathe;
|
|
|
|
public List<string> Recipes = new();
|
|
|
|
public LatheGetRecipesEvent(EntityUid lathe)
|
|
{
|
|
Lathe = lathe;
|
|
}
|
|
}
|
|
}
|