Improve lathe queue performance (#38583)
* Use an actual Queue * Store ProtoIds instead of prototypes * Network as NetListAsArray * Remove Serializable & NetSerializable from LatheRecipePrototype * Convert CurrentlyProducing too * No point using NetListAsArray<T> if you're going to .ToArray() it anyways. --------- Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Content.Shared.Lathe
|
||||
/// The lathe's construction queue
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public List<LatheRecipePrototype> Queue = new();
|
||||
public Queue<ProtoId<LatheRecipePrototype>> Queue = new();
|
||||
|
||||
/// <summary>
|
||||
/// The sound that plays when the lathe is producing an item, if any
|
||||
@@ -64,7 +64,7 @@ namespace Content.Shared.Lathe
|
||||
/// The recipe the lathe is currently producing
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public LatheRecipePrototype? CurrentRecipe;
|
||||
public ProtoId<LatheRecipePrototype>? CurrentRecipe;
|
||||
|
||||
#region MachineUpgrading
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user