Fix lizards losing snouts when equipping a head bandana (#29979)

* say goodbye to no-snout lizards

* remove snout from plague doctor hat HideLayerClothing component
This commit is contained in:
Luiz Costa
2024-07-13 23:59:45 -03:00
committed by GitHub
parent a06309b964
commit 87467a358b
5 changed files with 25 additions and 1 deletions

View File

@@ -47,6 +47,10 @@ public sealed class FoldableClothingSystem : EntitySystem
if (ent.Comp.FoldedHeldPrefix != null)
_itemSystem.SetHeldPrefix(ent.Owner, ent.Comp.FoldedHeldPrefix, false, itemComp);
if (TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
hideLayerComp.Slots = ent.Comp.FoldedHideLayers;
}
else
{
@@ -59,6 +63,9 @@ public sealed class FoldableClothingSystem : EntitySystem
if (ent.Comp.FoldedHeldPrefix != null)
_itemSystem.SetHeldPrefix(ent.Owner, null, false, itemComp);
if (TryComp<HideLayerClothingComponent>(ent.Owner, out var hideLayerComp))
hideLayerComp.Slots = ent.Comp.UnfoldedHideLayers;
}
}
}