Use item status extension method (#23884)

Just removes some lines of code.

(cherry picked from commit e665c2487e2f248bdc6b435bdcdb3060c69b546c)
This commit is contained in:
Pieter-Jan Briers
2024-01-12 01:14:13 +01:00
committed by Debug
parent 4f2b2a5ae3
commit 973d06aea5
11 changed files with 42 additions and 76 deletions

View File

@@ -16,13 +16,8 @@ namespace Content.Client.Stack
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<StackComponent, ItemStatusCollectMessage>(OnItemStatus);
SubscribeLocalEvent<StackComponent, AppearanceChangeEvent>(OnAppearanceChange);
}
private void OnItemStatus(EntityUid uid, StackComponent component, ItemStatusCollectMessage args)
{
args.Controls.Add(new StackStatusControl(component));
Subs.ItemStatus<StackComponent>(ent => new StackStatusControl(ent));
}
public override void SetCount(EntityUid uid, int amount, StackComponent? component = null)