]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't apply toggleclothing in state handling (#22347)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Mon, 11 Dec 2023 22:43:01 +0000 (09:43 +1100)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2023 22:43:01 +0000 (15:43 -0700)
Wasn't sure where to put it but this seems least likely to break stuff.

Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs

index e3110eca356c3f7508bbca56e5630ff52b281b69..c9a5c974f99e6fe18916d31a8a7f919f3191b2c1 100644 (file)
@@ -152,6 +152,10 @@ public sealed class ToggleableClothingSystem : EntitySystem
     /// </summary>
     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...