Use item status extension method (#23884)
Just removes some lines of code.
This commit is contained in:
committed by
GitHub
parent
e2dd30f640
commit
e665c2487e
@@ -18,7 +18,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<CrayonComponent, ComponentHandleState>(OnCrayonHandleState);
|
||||
SubscribeLocalEvent<CrayonComponent, ItemStatusCollectMessage>(OnCrayonItemStatus);
|
||||
Subs.ItemStatus<CrayonComponent>(ent => new StatusControl(ent));
|
||||
}
|
||||
|
||||
private static void OnCrayonHandleState(EntityUid uid, CrayonComponent component, ref ComponentHandleState args)
|
||||
@@ -33,11 +33,6 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
component.UIUpdateNeeded = true;
|
||||
}
|
||||
|
||||
private static void OnCrayonItemStatus(EntityUid uid, CrayonComponent component, ItemStatusCollectMessage args)
|
||||
{
|
||||
args.Controls.Add(new StatusControl(component));
|
||||
}
|
||||
|
||||
private sealed class StatusControl : Control
|
||||
{
|
||||
private readonly CrayonComponent _parent;
|
||||
|
||||
Reference in New Issue
Block a user