From 0433d3b06a56c1c12ce1ee30623e463c527e4b17 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:43:01 +1100 Subject: [PATCH] Don't apply toggleclothing in state handling (#22347) Wasn't sure where to put it but this seems least likely to break stuff. --- .../Clothing/EntitySystems/ToggleableClothingSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs index e3110eca35..c9a5c974f9 100644 --- a/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs @@ -152,6 +152,10 @@ public sealed class ToggleableClothingSystem : EntitySystem /// private void OnToggleableUnequip(EntityUid uid, ToggleableClothingComponent component, GotUnequippedEvent args) { + // If it's a part of PVS departure then don't handle it. + if (_timing.ApplyingState) + return; + // If the attached clothing is not currently in the container, this just assumes that it is currently equipped. // This should maybe double check that the entity currently in the slot is actually the attached clothing, but // if its not, then something else has gone wrong already...