From c5a3515322aae7479af1461c6f405424cb9aa827 Mon Sep 17 00:00:00 2001 From: Paul Ritter Date: Fri, 31 Dec 2021 10:41:08 +0100 Subject: [PATCH] fixes stripping of stunned/dead people fixes magboots alert --- Content.Server/Clothing/MagbootsSystem.cs | 4 ++-- Content.Server/Strip/StrippableComponent.cs | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Content.Server/Clothing/MagbootsSystem.cs b/Content.Server/Clothing/MagbootsSystem.cs index c2ce0a1770..8b4ad12210 100644 --- a/Content.Server/Clothing/MagbootsSystem.cs +++ b/Content.Server/Clothing/MagbootsSystem.cs @@ -52,7 +52,7 @@ namespace Content.Server.Clothing { if (args.Slot == "shoes") { - UpdateMagbootEffects(args.Equipee, uid, true, component); + UpdateMagbootEffects(args.Equipee, uid, false, component); } } @@ -60,7 +60,7 @@ namespace Content.Server.Clothing { if (args.Slot == "shoes") { - UpdateMagbootEffects(args.Equipee, uid, false, component); + UpdateMagbootEffects(args.Equipee, uid, true, component); } } diff --git a/Content.Server/Strip/StrippableComponent.cs b/Content.Server/Strip/StrippableComponent.cs index bc1b9ca14d..ad5c423c8a 100644 --- a/Content.Server/Strip/StrippableComponent.cs +++ b/Content.Server/Strip/StrippableComponent.cs @@ -235,7 +235,7 @@ namespace Content.Server.Strip return false; } - if (!invSystem.CanUnequip(Owner, slot, out _)) + if (!invSystem.CanUnequip(user, Owner, slot, out _)) { user.PopupMessageCursor(Loc.GetString("strippable-component-cannot-unequip-message",("owner", Owner))); return false; @@ -258,10 +258,7 @@ namespace Content.Server.Strip var result = await doAfterSystem.WaitDoAfter(doAfterArgs); if (result != DoAfterStatus.Finished) return; - invSystem.TryGetSlotEntity(Owner, slot, out var item); - invSystem.TryUnequip(Owner, slot); - - if (item != null) + if (invSystem.TryGetSlotEntity(Owner, slot, out var item) && invSystem.TryUnequip(Owner, slot)) { userHands.PutInHandOrDrop(item.Value); }