2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Lathe;
|
|
|
|
|
using Content.Shared.Research.Prototypes;
|
2020-03-15 17:55:20 +01:00
|
|
|
using Robust.Server.GameObjects;
|
2022-07-06 23:44:31 -04:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2019-04-26 15:51:05 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Lathe.Components
|
2019-04-26 15:51:05 +02:00
|
|
|
{
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2022-04-17 03:34:14 -04:00
|
|
|
public sealed class LatheComponent : SharedLatheComponent
|
2019-04-26 15:51:05 +02:00
|
|
|
{
|
2022-04-17 03:34:14 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// The lathe's construction queue
|
|
|
|
|
/// </summary>
|
2022-08-04 12:38:56 +12:00
|
|
|
[DataField("queue", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
|
|
|
|
|
public List<string> Queue { get; } = new();
|
|
|
|
|
// TODO queue serializer.
|
|
|
|
|
|
2022-04-17 03:34:14 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// How long the inserting animation will play
|
|
|
|
|
/// </summary>
|
2020-09-08 13:30:22 +02:00
|
|
|
[ViewVariables]
|
2022-04-17 03:34:14 -04:00
|
|
|
public float InsertionTime = 0.79f; // 0.01 off for animation timing
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Update accumulator for the insertion time
|
|
|
|
|
/// </suummary>
|
2022-04-23 22:27:19 -04:00
|
|
|
[DataField("insertionAccumulator")]
|
2022-04-17 03:34:14 -04:00
|
|
|
public float InsertionAccumulator = 0f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The sound that plays when the lathe is producing an item, if any
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("producingSound")]
|
|
|
|
|
public SoundSpecifier? ProducingSound;
|
|
|
|
|
|
|
|
|
|
/// <summmary>
|
|
|
|
|
/// The lathe's UI.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables] public BoundUserInterface? UserInterface;
|
2019-04-26 15:51:05 +02:00
|
|
|
}
|
2022-07-06 23:44:31 -04:00
|
|
|
}
|