CatStation/Content.Client/Kitchen/EntitySystems/ReagentGrinderSystem.cs
portfiend 5a9fa1ef67
Document Client, Server, and Shared files in folders starting with "K". Except microwaves. (#91)
* document the entire owl

* Apply suggestions from code review

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-06-18 18:41:56 +00:00

29 lines
849 B
C#

using Content.Shared.Kitchen;
using Content.Shared.Kitchen.Components;
using Content.Shared.Kitchen.EntitySystems;
namespace Content.Client.Kitchen.EntitySystems;
/// <inheritdoc />
public sealed partial class ReagentGrinderSystem : SharedReagentGrinderSystem
{
[Dependency] private SharedUserInterfaceSystem _userInterface = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ReagentGrinderComponent, AfterAutoHandleStateEvent>(OnAfterAutoHandleState);
}
private void OnAfterAutoHandleState(Entity<ReagentGrinderComponent> ent, ref AfterAutoHandleStateEvent args)
{
UpdateUi(ent);
}
public override void UpdateUi(EntityUid uid)
{
if (_userInterface.TryGetOpenUi(uid, ReagentGrinderUiKey.Key, out var bui))
bui.Update();
}
}