]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make Foldable Clothing Hidden Layers "reset" Hidden Layers when un/Folding (#40251)
authorCentronias <me@centronias.com>
Wed, 10 Sep 2025 02:20:01 +0000 (19:20 -0700)
committerGitHub <noreply@github.com>
Wed, 10 Sep 2025 02:20:01 +0000 (12:20 +1000)
foldable clothing hidden layers fix

Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs

index 7c6810140cc3698fc6e5a50e75bc2f6ebd016433..76de205a7b5f085702921eb40683c8382d1926bb 100644 (file)
@@ -65,9 +65,9 @@ public sealed class FoldableClothingSystem : EntitySystem
             // This should instead work via an event or something that gets raised to optionally modify the currently hidden layers.
             // Or at the very least it should stash the old layers and restore them when unfolded.
             // TODO CLOTHING fix this.
-            if (ent.Comp.FoldedHideLayers.Count != 0 && TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
+            if ((ent.Comp.FoldedHideLayers.Count != 0 || ent.Comp.UnfoldedHideLayers.Count != 0) &&
+                TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
                 hideLayerComp.Slots = ent.Comp.FoldedHideLayers;
-
         }
         else
         {
@@ -81,9 +81,9 @@ public sealed class FoldableClothingSystem : EntitySystem
                 _itemSystem.SetHeldPrefix(ent.Owner, null, false, itemComp);
 
             // TODO CLOTHING fix this.
-            if (ent.Comp.UnfoldedHideLayers.Count != 0 && TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
+            if ((ent.Comp.FoldedHideLayers.Count != 0 || ent.Comp.UnfoldedHideLayers.Count != 0) &&
+                TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
                 hideLayerComp.Slots = ent.Comp.UnfoldedHideLayers;
-
         }
     }
 }