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
{
///
/// All of the recipes that the lathe has by default
///
[DataField("staticRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public readonly List StaticRecipes = new();
///
/// All of the recipes that the lathe is capable of researching
///
[DataField("dynamicRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer))]
public readonly List? DynamicRecipes;
///
/// The lathe's construction queue
///
[DataField("queue")]
public List Queue = new();
///
/// How long the inserting animation will play
///
[DataField("insertionTime")]
public float InsertionTime = 0.79f; // 0.01 off for animation timing
///
/// The sound that plays when the lathe is producing an item, if any
///
[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
///
/// The recipe the lathe is currently producing
///
[ViewVariables]
public LatheRecipePrototype? CurrentRecipe;
}
public sealed class LatheGetRecipesEvent : EntityEventArgs
{
public readonly EntityUid Lathe;
public List Recipes = new();
public LatheGetRecipesEvent(EntityUid lathe)
{
Lathe = lathe;
}
}
}