mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
28 lines
830 B
C#
28 lines
830 B
C#
using Content.Shared.Kitchen;
|
|
using Content.Shared.Kitchen.Components;
|
|
using Content.Shared.Kitchen.EntitySystems;
|
|
|
|
namespace Content.Client.Kitchen.EntitySystems;
|
|
|
|
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();
|
|
}
|
|
}
|