Files
tbd-station-14/Content.Server/Lathe/LatheSystem.cs
2021-10-18 23:58:34 +11:00

22 lines
563 B
C#

using Content.Server.Lathe.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Lathe
{
[UsedImplicitly]
internal sealed class LatheSystem : EntitySystem
{
public override void Update(float frameTime)
{
foreach (var comp in EntityManager.EntityQuery<LatheComponent>())
{
if (comp.Producing == false && comp.Queue.Count > 0)
{
comp.Produce(comp.Queue.Dequeue());
}
}
}
}
}