Fix error when deleting a toggled ToggleableClothingComponent (#39191)

This commit is contained in:
Tayrtahn
2025-08-17 15:34:47 -04:00
committed by GitHub
parent 79072d7d6a
commit 8034cabbae

View 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.