Beispiel #1
0
        static void Prefix(ref Thing product)
        {
            ThingWithComps twc = product as ThingWithComps;

            if (twc != null)
            {
                CustomThingDef def = twc.def as CustomThingDef;
                if (def != null && !def.followStuffColor)
                {
                    twc.SetColor(Color.white);
                }
            }
        }
Beispiel #2
0
        static void Postfix(ref Thing __result)
        {
            ThingWithComps twc = __result as ThingWithComps;

            if (twc != null)
            {
                CustomThingDef def = twc.def as CustomThingDef;
                if (def != null && !def.followStuffColor)
                {
                    twc.SetColor(Color.white);
                    twc.SetColor(Color.black);
                    twc.SetColor(Color.white);
                }
            }
        }
Beispiel #3
0
 static void Postfix(ref Pawn pawn)
 {
     if (pawn.apparel != null)
     {
         List <Apparel> wornApparel = pawn.apparel.WornApparel;
         for (int i = 0; i < wornApparel.Count; i++)
         {
             CustomThingDef def = wornApparel[i].def as CustomThingDef;
             if (def != null && !def.followStuffColor)
             {
                 wornApparel[i].SetColor(Color.white);
                 wornApparel[i].SetColor(Color.black);
                 wornApparel[i].SetColor(Color.white);
             }
         }
     }
 }