using Content.Shared.Lathe; using Content.Shared.Research.Prototypes; using Robust.Server.GameObjects; using Content.Shared.Sound; using Content.Shared.Whitelist; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Content.Shared.Materials; namespace Content.Server.Lathe.Components { [RegisterComponent] public sealed class LatheComponent : SharedLatheComponent { /// /// Whitelist for specifying the kind of materials that can be insert into the lathe /// [ViewVariables] [DataField("whitelist")] public EntityWhitelist? LatheWhitelist; /// /// Whitelist generated on runtime for what items are specifically used for the lathe's recipes. /// [ViewVariables] [DataField("materialWhiteList", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List MaterialWhiteList = new(); /// /// The lathe's construction queue /// [ViewVariables] public Queue Queue { get; } = new(); /// /// The recipe the lathe is currently producing /// [ViewVariables] public LatheRecipePrototype? ProducingRecipe; /// /// How long the inserting animation will play /// [ViewVariables] public float InsertionTime = 0.79f; // 0.01 off for animation timing /// /// Update accumulator for the insertion time /// [DataField("insertionAccumulator")] public float InsertionAccumulator = 0f; /// /// Production accumulator for the production time. /// [ViewVariables] [DataField("producingAccumulator")] public float ProducingAccumulator = 0f; /// /// The sound that plays when the lathe is producing an item, if any /// [DataField("producingSound")] public SoundSpecifier? ProducingSound; /// /// The sound that plays when inserting an item into the lathe, if any /// [DataField("insertingSound")] public SoundSpecifier? InsertingSound; /// /// The lathe's UI. /// [ViewVariables] public BoundUserInterface? UserInterface; } }