using Content.Shared.Construction.Prototypes; using Content.Shared.Research.Prototypes; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Lathe { [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class LatheComponent : Component { /// /// All of the recipes that the lathe has by default /// [DataField] public List> StaticRecipes = new(); /// /// All of the recipes that the lathe is capable of researching /// [DataField] public List> DynamicRecipes = new(); /// /// The lathe's construction queue /// [DataField] public List Queue = new(); /// /// The sound that plays when the lathe is producing an item, if any /// [DataField] public SoundSpecifier? ProducingSound; #region Visualizer info [DataField(required: true)] public string IdleState = default!; [DataField(required: true)] public string RunningState = default!; #endregion /// /// The recipe the lathe is currently producing /// [ViewVariables] public LatheRecipePrototype? CurrentRecipe; /// /// Whether the lathe can eject the materials stored within it /// [DataField] public bool CanEjectStoredMaterials = true; #region MachineUpgrading /// /// A modifier that changes how long it takes to print a recipe /// [ViewVariables(VVAccess.ReadWrite)] public float TimeMultiplier = 1; /// /// The machine part that reduces how long it takes to print a recipe. /// [DataField] public ProtoId MachinePartPrintSpeed = "Manipulator"; /// /// The value that is used to calculate the modified /// [DataField] public float PartRatingPrintTimeMultiplier = 0.5f; /// /// A modifier that changes how much of a material is needed to print a recipe /// [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public float MaterialUseMultiplier = 1; /// /// The machine part that reduces how much material it takes to print a recipe. /// [DataField] public ProtoId MachinePartMaterialUse = "MatterBin"; /// /// The value that is used to calculate the modifier /// [DataField] public float PartRatingMaterialUseMultiplier = DefaultPartRatingMaterialUseMultiplier; public const float DefaultPartRatingMaterialUseMultiplier = 0.85f; #endregion } public sealed class LatheGetRecipesEvent : EntityEventArgs { public readonly EntityUid Lathe; public List> Recipes = new(); public LatheGetRecipesEvent(EntityUid lathe) { Lathe = lathe; } } }