]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fix broken layer hiding on clothes with multiple equipment slots (#34080)
authorpaige404 <59348003+paige404@users.noreply.github.com>
Thu, 20 Mar 2025 13:30:47 +0000 (09:30 -0400)
committerGitHub <noreply@github.com>
Thu, 20 Mar 2025 13:30:47 +0000 (00:30 +1100)
commit2e7f01b99e83737c01a65df5ca918baadc19058f
treeb968875acdf2bb161c193eea52636b8f75b32cd1
parent65f393bb14b19e71c93ac64d419f1d77b045e7e6
Fix broken layer hiding on clothes with multiple equipment slots (#34080)

* Fix broken layer hiding on clothes with multiple equipment slots

* Refactor ToggleVisualLayers, HideLayerClothingComponent, and ClothingComponent to allow more
precise layer hide behavior and more CPU efficient layer toggling.

* Adjust HumanoidAppearaceSystem to track which slots are hiding a given layer (e.g. gas mask and welding mask)
Add documentation
Change gas masks to use the new HideLayerClothingComponent structure as an example of its usage

* Fix the delayed snout bug

* Misc cleanup

* Make `bool permanent` implicit from SlotFlags

any non-permanent visibility toggle with `SlotFlags.None` isn't supported with how its set up. And similarly, the slot flags argument does nothing if permanent = true. So IMO it makes more sense to infer it from a nullable arg.

* Split into separate system

Too much pasta

* Remove (hopefully unnecessary) refresh

* Fisk mask networking

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* Keep old behaviour, use clearer names?

I'm just guessing at what this was meant to do

* english

* Separate slot name & flag

* dirty = true

* fix comment

* Improved SetLayerVisibility with dirtying logic suggested by @ElectroJr

* Only set mask toggled if DisableOnFold is true

* FoldableClothingSystem fixes

* fix bandana state

* Better comment

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
20 files changed:
Content.Client/Clothing/ClientClothingSystem.cs
Content.Client/Humanoid/HumanoidAppearanceSystem.cs
Content.Server/Body/Systems/BodySystem.cs
Content.Server/Body/Systems/LungSystem.cs
Content.Server/Nutrition/EntitySystems/IngestionBlockerSystem.cs
Content.Shared/Clothing/ClothingEvents.cs
Content.Shared/Clothing/Components/ClothingComponent.cs
Content.Shared/Clothing/Components/FoldableClothingComponent.cs
Content.Shared/Clothing/Components/HideLayerClothingComponent.cs
Content.Shared/Clothing/Components/MaskComponent.cs
Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Content.Shared/Clothing/EntitySystems/FoldableClothingSystem.cs
Content.Shared/Clothing/EntitySystems/HideLayerClothingSystem.cs [new file with mode: 0644]
Content.Shared/Clothing/EntitySystems/MaskSystem.cs
Content.Shared/Foldable/FoldableSystem.cs
Content.Shared/Humanoid/HumanoidAppearanceComponent.cs
Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
Content.Shared/IdentityManagement/SharedIdentitySystem.cs
Resources/Prototypes/Entities/Clothing/Masks/bandanas.yml
Resources/Prototypes/Entities/Clothing/Masks/masks.yml