From ac24d8ee250b615e59d354a99b80868ac2688e5f Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sun, 23 Oct 2022 05:13:25 +1300 Subject: [PATCH] Fix two bugs (#12144) --- Content.Client/Hands/Systems/HandsSystem.cs | 4 +++- Resources/Prototypes/Entities/Structures/Power/chargers.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Client/Hands/Systems/HandsSystem.cs b/Content.Client/Hands/Systems/HandsSystem.cs index 174f932202..daed0371cd 100644 --- a/Content.Client/Hands/Systems/HandsSystem.cs +++ b/Content.Client/Hands/Systems/HandsSystem.cs @@ -285,7 +285,9 @@ namespace Content.Client.Hands.Systems if (!Resolve(uid, ref handComp, ref sprite, false)) return; - OnPlayerItemAdded?.Invoke(hand.Name, held); + // visual update might involve changes to the entity's effective sprite -> need to update hands GUI. + if (uid == _playerManager.LocalPlayer?.ControlledEntity) + OnPlayerItemAdded?.Invoke(hand.Name, held); if (!handComp.ShowInHands) return; diff --git a/Resources/Prototypes/Entities/Structures/Power/chargers.yml b/Resources/Prototypes/Entities/Structures/Power/chargers.yml index 0e40fba97a..d026cdf699 100644 --- a/Resources/Prototypes/Entities/Structures/Power/chargers.yml +++ b/Resources/Prototypes/Entities/Structures/Power/chargers.yml @@ -58,6 +58,7 @@ - type: ItemSlots slots: charger_slot: + ejectOnInteract: true whitelist: components: - HitscanBatteryAmmoProvider