From: Centronias Date: Wed, 10 Sep 2025 02:20:01 +0000 (-0700) Subject: Make Foldable Clothing Hidden Layers "reset" Hidden Layers when un/Folding (#40251) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=c7406f65abfbd068403130f2da6148e22d2757e2;p=space-station-14.git Make Foldable Clothing Hidden Layers "reset" Hidden Layers when un/Folding (#40251) foldable clothing hidden layers fix --- diff --git a/Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs index 7c6810140c..76de205a7b 100644 --- a/Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs @@ -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(ent.Owner, out var hideLayerComp)) + if ((ent.Comp.FoldedHideLayers.Count != 0 || ent.Comp.UnfoldedHideLayers.Count != 0) && + TryComp(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(ent.Owner, out var hideLayerComp)) + if ((ent.Comp.FoldedHideLayers.Count != 0 || ent.Comp.UnfoldedHideLayers.Count != 0) && + TryComp(ent.Owner, out var hideLayerComp)) hideLayerComp.Slots = ent.Comp.UnfoldedHideLayers; - } } }