diff --git a/Content.Server/Strip/StrippableComponent.cs b/Content.Server/Strip/StrippableComponent.cs index be000b25e0..b96eabb20c 100644 --- a/Content.Server/Strip/StrippableComponent.cs +++ b/Content.Server/Strip/StrippableComponent.cs @@ -8,6 +8,7 @@ using Content.Server.Items; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.DragDrop; +using Content.Shared.Hands.Components; using Content.Shared.Popups; using Content.Shared.Strip.Components; using Content.Shared.Verbs; @@ -26,6 +27,8 @@ namespace Content.Server.Strip { public const float StripDelay = 2f; + // TODO: This component needs localization. + [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(StrippingUiKey.Key); @@ -128,7 +131,15 @@ namespace Content.Server.Strip foreach (var hand in hands.HandNames) { - dictionary[hand] = hands.GetItem(hand)?.Owner.Name ?? "None"; + var owner = hands.GetItem(hand)?.Owner; + + if (owner?.HasComponent() ?? true) + { + dictionary[hand] = "None"; + continue; + } + + dictionary[hand] = owner.Name; } return dictionary; @@ -348,6 +359,9 @@ namespace Content.Server.Strip return false; } + if (heldItem.Owner.HasComponent()) + return false; + if (!hands.CanDrop(hand, false)) { user.PopupMessageCursor(Loc.GetString("strippable-component-cannot-drop-message",("owner", Owner))); diff --git a/Resources/Changelog/Parts/strip.yml b/Resources/Changelog/Parts/strip.yml new file mode 100644 index 0000000000..9461dd4de1 --- /dev/null +++ b/Resources/Changelog/Parts/strip.yml @@ -0,0 +1,4 @@ +author: Your_Name_Here +changes: + - type: Fix # One of the following: Add, Remove, Tweak, Fix + message: Fix mob inventory strip window showing virtual items it shouldn't.