Skip to content

Conversation

EmoGarbage404
Copy link
Contributor

@EmoGarbage404 EmoGarbage404 commented Jul 28, 2025

About the PR

Fixes a bug where foldable clothing cannot be toggled when worn 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

471327276-e8fc76b0-360e-4b4d-8f12-438e5fc7dc19

Requirements

Breaking changes

FoldableClothingComponent.UnfoldedHideLayers and FoldableClothingComponent.FoldedHideLayers no longer support null values. Use empty sets instead.

Changelog

🆑

  • fix: Fixed being unable to fold certain clothing while worn.

@PJBot PJBot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jul 28, 2025
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-99 lines. label Jul 28, 2025
@K-Dynamic
Copy link
Contributor

K-Dynamic commented Jul 28, 2025

Tested in-game, appears to work
dotnet_Nvkn7nyLH1

Prior to this, the labcoat would display the same message as the bandana and not unfold.

@PJBot PJBot added S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Jul 28, 2025
@slarticodefast slarticodefast merged commit fedc355 into space-wizards:master Jul 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S Denotes a PR that changes 10-99 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants