2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Kitchen.Components;
|
2021-09-06 15:49:44 +02:00
|
|
|
using Content.Shared.Chemistry.EntitySystems;
|
2020-08-13 22:17:12 +10:00
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Shared.GameObjects;
|
2020-05-28 15:28:35 -05:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Kitchen.EntitySystems
|
2020-05-28 15:28:35 -05:00
|
|
|
{
|
2020-08-13 22:17:12 +10:00
|
|
|
[UsedImplicitly]
|
|
|
|
|
internal sealed class MicrowaveSystem : EntitySystem
|
2020-05-28 15:28:35 -05:00
|
|
|
{
|
2021-09-06 15:49:44 +02:00
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
SubscribeLocalEvent<MicrowaveComponent, SolutionChangedEvent>(OnSolutionChange);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnSolutionChange(EntityUid uid, MicrowaveComponent component, SolutionChangedEvent args)
|
|
|
|
|
{
|
|
|
|
|
component.DirtyUi();
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-28 15:28:35 -05:00
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
{
|
|
|
|
|
base.Update(frameTime);
|
2021-10-18 14:58:34 +02:00
|
|
|
foreach (var comp in EntityManager.EntityQuery<MicrowaveComponent>())
|
2020-05-28 15:28:35 -05:00
|
|
|
{
|
|
|
|
|
comp.OnUpdate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|