22 lines
563 B
C#
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());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|