Use item status extension method (#23884)

Just removes some lines of code.
This commit is contained in:
Pieter-Jan Briers
2024-01-12 01:14:13 +01:00
committed by GitHub
parent e2dd30f640
commit e665c2487e
11 changed files with 42 additions and 76 deletions

View File

@@ -12,16 +12,11 @@ public sealed class ImplanterSystem : SharedImplanterSystem
base.Initialize();
SubscribeLocalEvent<ImplanterComponent, AfterAutoHandleStateEvent>(OnHandleImplanterState);
SubscribeLocalEvent<ImplanterComponent, ItemStatusCollectMessage>(OnItemImplanterStatus);
Subs.ItemStatus<ImplanterComponent>(ent => new ImplanterStatusControl(ent));
}
private void OnHandleImplanterState(EntityUid uid, ImplanterComponent component, ref AfterAutoHandleStateEvent args)
{
component.UiUpdateNeeded = true;
}
private void OnItemImplanterStatus(EntityUid uid, ImplanterComponent component, ItemStatusCollectMessage args)
{
args.Controls.Add(new ImplanterStatusControl(component));
}
}