Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Clothing Quick-Equip #507

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Inventory/InventorySystem.Equip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading