From 2f5f0de68870f56c5d2e0067779f506926534d5e Mon Sep 17 00:00:00 2001 From: fox Date: Tue, 2 Jul 2024 19:36:34 +0300 Subject: [PATCH 1/2] Return true when starting a do-after --- Content.Shared/Inventory/InventorySystem.Equip.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 24006b0c9f9..7bdd17ee6fa 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -176,7 +176,7 @@ public bool TryEquip(EntityUid actor, EntityUid target, EntityUid itemUid, strin }; _doAfter.TryStartDoAfter(args); - return false; + return true; // Changed to return true even if the item wasn't equipped instantly } if (!_containerSystem.Insert(itemUid, slotContainer)) From 9f346ca329b316d33c895dd11d015dd5cc40a42c Mon Sep 17 00:00:00 2001 From: fox Date: Tue, 2 Jul 2024 20:05:45 +0300 Subject: [PATCH 2/2] Skip pocket slots when quick-equipping --- Content.Shared/Clothing/EntitySystems/ClothingSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs index f189db005bc..976682c9903 100644 --- a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs @@ -62,6 +62,11 @@ private void QuickEquip( { foreach (var slotDef in userEnt.Comp1.Slots) { + // Do not attempt to quick-equip clothing in pocket slots. + // We should probably add a special flag to SlotDefinition to skip quick equip if more similar slots get added. + if (slotDef.SlotFlags.HasFlag(SlotFlags.POCKET)) + continue; + if (!_invSystem.CanEquip(userEnt, toEquipEnt, slotDef.Name, out _, slotDef, userEnt, toEquipEnt)) continue;