Files
tbd-station-14/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs
2021-09-28 13:35:29 +02:00

33 lines
899 B
C#

using Content.Server.Kitchen.Components;
using Content.Shared.Chemistry.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Kitchen.EntitySystems
{
[UsedImplicitly]
internal sealed class MicrowaveSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MicrowaveComponent, SolutionChangedEvent>(OnSolutionChange);
}
private void OnSolutionChange(EntityUid uid, MicrowaveComponent component, SolutionChangedEvent args)
{
component.DirtyUi();
}
public override void Update(float frameTime)
{
base.Update(frameTime);
foreach (var comp in EntityManager.EntityQuery<MicrowaveComponent>(true))
{
comp.OnUpdate();
}
}
}
}