Esempio n. 1
0
    protected bool IsUncomfortable()
    {
        ClothingWearer component = GetComponent <ClothingWearer>();

        if ((Object)component != (Object)null)
        {
            return(component.currentClothing.decorMod <= 0);
        }
        return(false);
    }
 public static void OnUnequipVest(Equippable eq)
 {
     if ((UnityEngine.Object)eq != (UnityEngine.Object)null && eq.assignee != null)
     {
         Ownables soleOwner = eq.assignee.GetSoleOwner();
         if ((UnityEngine.Object)soleOwner != (UnityEngine.Object)null)
         {
             ClothingWearer component = soleOwner.GetComponent <ClothingWearer>();
             if ((UnityEngine.Object)component != (UnityEngine.Object)null)
             {
                 component.ChangeToDefaultClothes();
             }
         }
     }
 }
 public static void OnEquipVest(Equippable eq,ClothingWearer.ClothingInfo clothingInfo)
 {
     if (!((UnityEngine.Object)eq == (UnityEngine.Object)null) && eq.assignee != null)
     {
         Ownables soleOwner = eq.assignee.GetSoleOwner();
         if (!((UnityEngine.Object)soleOwner == (UnityEngine.Object)null))
         {
             MinionAssignablesProxy component  = soleOwner.GetComponent <MinionAssignablesProxy>();
             ClothingWearer         component2 = (component.target as KMonoBehaviour).GetComponent <ClothingWearer>();
             if ((UnityEngine.Object)component2 != (UnityEngine.Object)null)
             {
                 component2.ChangeClothes(clothingInfo);
             }
             else
             {
                 Debug.LogWarning("Clothing item cannot be equipped to assignee because they lack ClothingWearer component");
             }
         }
     }
 }