Use item status extension method (#23884)
Just removes some lines of code.
This commit is contained in:
committed by
GitHub
parent
e2dd30f640
commit
e665c2487e
@@ -17,15 +17,10 @@ public sealed class HandheldLightSystem : SharedHandheldLightSystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<HandheldLightComponent, ItemStatusCollectMessage>(OnGetStatusControl);
|
||||
Subs.ItemStatus<HandheldLightComponent>(ent => new HandheldLightStatus(ent));
|
||||
SubscribeLocalEvent<HandheldLightComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
}
|
||||
|
||||
private static void OnGetStatusControl(EntityUid uid, HandheldLightComponent component, ItemStatusCollectMessage args)
|
||||
{
|
||||
args.Controls.Add(new HandheldLightStatus(component));
|
||||
}
|
||||
|
||||
private void OnAppearanceChange(EntityUid uid, HandheldLightComponent? component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
|
||||
Reference in New Issue
Block a user