public static int GetDefaultDrawLayer(ClothingRegion clothingRegion, ClothingLayer clothingLayer) { switch (clothingRegion) { case ClothingRegion.Head: return(GetDefaultHeadDrawLayer(clothingLayer)); case ClothingRegion.Accessory: return(40); case ClothingRegion.Hands: return(25); case ClothingRegion.Chest: return(GetDefaultChestDrawLayer(clothingLayer)); case ClothingRegion.Legs: return(GetDefaultLegsDrawLayer(clothingLayer)); case ClothingRegion.Feet: return(GetDefaultFeetDrawLayer(clothingLayer)); default: return(60); } }
public static int MaybeGetDefaultDrawLayer(int drawLayer, ClothingRegion clothingRegion, ClothingLayer clothingLayer) { if (drawLayer > 0) { return(drawLayer); } else { return(GetDefaultDrawLayer(clothingRegion, clothingLayer)); } }
private static void Prefix(PlayerManager __instance, GearItem gi, ClothingLayer layerToPutOn) { //Logger.Log("Clothing Layer {0}", layerToPutOn); if (gi?.m_ClothingItem is null || layerToPutOn == ClothingLayer.NumLayers) { return; } ClothingRegion region = gi.m_ClothingItem.m_Region; GearItem itemInSlot = __instance.GetClothingInSlot(region, layerToPutOn); if (itemInSlot) { __instance.TakeOffClothingItem(itemInSlot); } }