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:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Research.Prototypes;
|
||||
using NetSerializer;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -9,11 +10,11 @@ public sealed class LatheUpdateState : BoundUserInterfaceState
|
||||
{
|
||||
public List<ProtoId<LatheRecipePrototype>> Recipes;
|
||||
|
||||
public List<LatheRecipePrototype> Queue;
|
||||
public ProtoId<LatheRecipePrototype>[] Queue;
|
||||
|
||||
public LatheRecipePrototype? CurrentlyProducing;
|
||||
public ProtoId<LatheRecipePrototype>? CurrentlyProducing;
|
||||
|
||||
public LatheUpdateState(List<ProtoId<LatheRecipePrototype>> recipes, List<LatheRecipePrototype> queue, LatheRecipePrototype? currentlyProducing = null)
|
||||
public LatheUpdateState(List<ProtoId<LatheRecipePrototype>> recipes, ProtoId<LatheRecipePrototype>[] queue, ProtoId<LatheRecipePrototype>? currentlyProducing = null)
|
||||
{
|
||||
Recipes = recipes;
|
||||
Queue = queue;
|
||||
|
||||
Reference in New Issue
Block a user