Improve stripping UI (#9768)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Client.Animations;
|
||||
using Content.Client.Examine;
|
||||
using Content.Client.Strip;
|
||||
using Content.Client.Verbs;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Hands.Components;
|
||||
@@ -13,6 +13,7 @@ using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Timing;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Content.Client.Hands.Systems
|
||||
{
|
||||
@@ -23,6 +24,7 @@ namespace Content.Client.Hands.Systems
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
[Dependency] private readonly StrippableSystem _stripSys = default!;
|
||||
[Dependency] private readonly ExamineSystem _examine = default!;
|
||||
[Dependency] private readonly VerbSystem _verbs = default!;
|
||||
|
||||
@@ -92,6 +94,8 @@ namespace Content.Client.Hands.Systems
|
||||
component.SortedHands = new(state.HandNames);
|
||||
}
|
||||
|
||||
_stripSys.UpdateUi(uid);
|
||||
|
||||
if (component.ActiveHand == null && state.ActiveHand == null)
|
||||
return; //edge case
|
||||
|
||||
@@ -236,6 +240,7 @@ namespace Content.Client.Hands.Systems
|
||||
if (!handComp.Hands.TryGetValue(args.Container.ID, out var hand))
|
||||
return;
|
||||
UpdateHandVisuals(uid, args.Entity, hand);
|
||||
_stripSys.UpdateUi(uid);
|
||||
|
||||
if (uid != _playerManager.LocalPlayer?.ControlledEntity)
|
||||
return;
|
||||
@@ -251,6 +256,7 @@ namespace Content.Client.Hands.Systems
|
||||
if (!handComp.Hands.TryGetValue(args.Container.ID, out var hand))
|
||||
return;
|
||||
UpdateHandVisuals(uid, args.Entity, hand);
|
||||
_stripSys.UpdateUi(uid);
|
||||
|
||||
if (uid != _playerManager.LocalPlayer?.ControlledEntity)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user