]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix error when deleting a toggled `ToggleableClothingComponent` (#39191)
authorTayrtahn <tayrtahn@gmail.com>
Sun, 17 Aug 2025 19:34:47 +0000 (15:34 -0400)
committerGitHub <noreply@github.com>
Sun, 17 Aug 2025 19:34:47 +0000 (12:34 -0700)
Content.Shared/Clothing/EntitySystems/ToggleableClothingSystem.cs

index 334f88af6d55573ad7828d975d70d5931a8edf3e..a2b7d016410e9f7e2cb4700e75631d520618b405 100644 (file)
@@ -213,7 +213,7 @@ public sealed class ToggleableClothingSystem : EntitySystem
         if (!TryComp(component.AttachedUid, out ToggleableClothingComponent? toggleComp))
             return;
 
-        if (toggleComp.LifeStage > ComponentLifeStage.Running)
+        if (LifeStage(component.AttachedUid) > EntityLifeStage.MapInitialized)
             return;
 
         // As unequipped gets called in the middle of container removal, we cannot call a container-insert without causing issues.