Skip to content

Commit

Permalink
ToggleVisualLayers fix (#1124)
Browse files Browse the repository at this point in the history
* Update ClothingSystem.cs

* add some comments

* Update ClothingSystem.cs

Co-authored-by: Dexler <[email protected]>

---------

Co-authored-by: Dexler <[email protected]>
  • Loading branch information
FunTust and DexlerXD authored Jun 13, 2024
1 parent 39e404f commit f11fffa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ private void ToggleVisualLayers(EntityUid equipee, HashSet<HumanoidVisualLayers>
{
if (comp.Slots.Contains(layer))
{
//ss220-ToggleVisualLayers-Fix begin
//FunTust:Check where the item is placed and if it is not one of the clothing slots then do not touch the visibility
if (_invSystem.TryGetContainingSlot(item, out var currentItemSlot)
&& currentItemSlot.SlotGroup != "Default")
break;
//ss220-ToggleVisualLayers-Fix end

//Checks for mask toggling. TODO: Make a generic system for this
if (comp.HideOnToggle && TryComp(item, out MaskComponent? mask) && TryComp(item, out ClothingComponent? clothing))
{
Expand Down

0 comments on commit f11fffa

Please sign in to comment.