@@ -96,20 +96,23 @@ public abstract class ClothingSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
if (TryComp(item, out HideLayerClothingComponent? comp))
|
if (TryComp(item, out HideLayerClothingComponent? comp))
|
||||||
{
|
{
|
||||||
//Checks for mask toggling. TODO: Make a generic system for this
|
if (comp.Slots.Contains(layer))
|
||||||
if (comp.HideOnToggle && TryComp(item, out MaskComponent? mask) && TryComp(item, out ClothingComponent? clothing))
|
|
||||||
{
|
{
|
||||||
if (clothing.EquippedPrefix != mask.EquippedPrefix)
|
//Checks for mask toggling. TODO: Make a generic system for this
|
||||||
|
if (comp.HideOnToggle && TryComp(item, out MaskComponent? mask) && TryComp(item, out ClothingComponent? clothing))
|
||||||
|
{
|
||||||
|
if (clothing.EquippedPrefix != mask.EquippedPrefix)
|
||||||
|
{
|
||||||
|
shouldLayerShow = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
shouldLayerShow = false;
|
shouldLayerShow = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
shouldLayerShow = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_humanoidSystem.SetLayerVisibility(equipee, layer, shouldLayerShow);
|
_humanoidSystem.SetLayerVisibility(equipee, layer, shouldLayerShow);
|
||||||
|
|||||||
Reference in New Issue
Block a user