Add "count" to stack comp's type handler. (#11917)
This commit is contained in:
committed by
GitHub
parent
321d39e225
commit
f83f16df16
@@ -18,6 +18,7 @@ namespace Content.Shared.Stacks
|
||||
[Dependency] protected readonly SharedHandsSystem HandsSystem = default!;
|
||||
[Dependency] protected readonly SharedTransformSystem Xform = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IViewVariablesManager _vvm = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -28,6 +29,9 @@ namespace Content.Shared.Stacks
|
||||
SubscribeLocalEvent<SharedStackComponent, ComponentStartup>(OnStackStarted);
|
||||
SubscribeLocalEvent<SharedStackComponent, ExaminedEvent>(OnStackExamined);
|
||||
SubscribeLocalEvent<SharedStackComponent, InteractUsingEvent>(OnStackInteractUsing);
|
||||
|
||||
_vvm.GetTypeHandler<SharedStackComponent>()
|
||||
.AddPath(nameof(SharedStackComponent.Count), (_, comp) => comp.Count, SetCount);
|
||||
}
|
||||
|
||||
private void OnStackInteractUsing(EntityUid uid, SharedStackComponent stack, InteractUsingEvent args)
|
||||
|
||||
Reference in New Issue
Block a user