master
← EmoGarbage404:bug/fix-foldable-clothing
opened 04:11AM - 28 Jul 25 UTC
## About the PR
Fixes a bug where foldable clothing cannot be toggled when wo… rn by a player.
## Technical details
Previous changes to this code introduced a strange regression. The UnfoldedHideLayers and FoldedHideLayers were made nullable so that the default null value could be used to check for nothing being there and certain buggy interactions could be blocked.
The issue, however, is that the component's default value is an empty hashset, which is not null. Despite this not causing the buggy behavior being guarded against, it was still getting blocked, preventing any foldable clothing from being folded while worn.
To fix this, we simply make the hashset non-nullable and use the empty list to check rather than a null value.
## Media

## Requirements
- [x] I have read and am following the [Pull Request and Changelog Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html).
- [x] I have added media to this PR or it does not require an ingame showcase.
## Breaking changes
`FoldableClothingComponent.UnfoldedHideLayers` and `FoldableClothingComponent.FoldedHideLayers` no longer support null values. Use empty sets instead.
**Changelog**
:cl:
- fix: Fixed being unable to fold certain clothing while worn.
[Breaking Changes]
FoldableClothingComponent.UnfoldedHideLayers
and FoldableClothingComponent.FoldedHideLayers
no longer support null values. Use empty sets instead.