Fix lathe unanchor interaction & general cleanup (#10156)
This commit is contained in:
@@ -29,13 +29,10 @@ namespace Content.Server.Lathe.Components
|
||||
/// <summary>
|
||||
/// The lathe's construction queue
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public Queue<LatheRecipePrototype> Queue { get; } = new();
|
||||
/// <summary>
|
||||
/// The recipe the lathe is currently producing
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public LatheRecipePrototype? ProducingRecipe;
|
||||
[DataField("queue", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
|
||||
public List<string> Queue { get; } = new();
|
||||
// TODO queue serializer.
|
||||
|
||||
/// <summary>
|
||||
/// How long the inserting animation will play
|
||||
/// </summary>
|
||||
@@ -46,12 +43,6 @@ namespace Content.Server.Lathe.Components
|
||||
/// </suummary>
|
||||
[DataField("insertionAccumulator")]
|
||||
public float InsertionAccumulator = 0f;
|
||||
/// <summary>
|
||||
/// Production accumulator for the production time.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("producingAccumulator")]
|
||||
public float ProducingAccumulator = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// The sound that plays when the lathe is producing an item, if any
|
||||
|
||||
@@ -5,5 +5,11 @@ namespace Content.Server.Lathe.Components
|
||||
/// <summary>
|
||||
[RegisterComponent]
|
||||
public sealed class LatheInsertingComponent : Component
|
||||
{}
|
||||
{
|
||||
/// <summary>
|
||||
/// Remaining insertion time, in seconds.
|
||||
/// </summary>
|
||||
[DataField("timeRemaining", required: true)]
|
||||
public float TimeRemaining;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
using Content.Shared.Research.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Lathe.Components
|
||||
{
|
||||
/// <summary>
|
||||
@@ -5,5 +8,17 @@ namespace Content.Server.Lathe.Components
|
||||
/// <summary>
|
||||
[RegisterComponent]
|
||||
public sealed class LatheProducingComponent : Component
|
||||
{}
|
||||
{
|
||||
/// <summary>
|
||||
/// The recipe the lathe is currently producing
|
||||
/// </summary>
|
||||
[DataField("recipe", required:true, customTypeSerializer:typeof(PrototypeIdSerializer<LatheRecipePrototype>))]
|
||||
public string? Recipe;
|
||||
|
||||
/// <summary>
|
||||
/// Remaining production time, in seconds.
|
||||
/// </summary>
|
||||
[DataField("timeRemaining", required: true)]
|
||||
public float TimeRemaining;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user