Exemple #1
0
 public override void PostDraw()
 {
     if (cpawn.needs.TryGetNeed <Need_Soul>() == null)
     {
         //Log.Message("NoNeed");
         HarmonyPatches.CreateNewSoul(cpawn);
     }
     if (cpawn.needs.TryGetNeed <Need_Soul>().NoPatron)
     {
         return;
     }
     if (cpawn.needs.TryGetNeed <Need_Soul>().patronInfo.PatronName != "Slaanesh" || cpawn.needs.TryGetNeed <Need_Soul>().patronInfo.PatronName != "Undivided")
     {
         this.DrawOverlays(PatronName, cpawn);
     }
 }
Exemple #2
0
        private static bool HasSoulTraitNullyfyingTraits(ThoughtDef def, Pawn p, out Need_Soul soul)
        {
            if (p.needs.TryGetNeed <Need_Soul>() == null)

            {
                HarmonyPatches.CreateNewSoul(p);
            }
            soul = p.needs.TryGetNeed <Need_Soul>();
            List <SoulTrait> straitlist = soul.SoulTraits;

            foreach (SoulTrait strait in straitlist)
            {
                foreach (ThoughtDef tdef in strait.SDef.NullifiesThoughts)
                {
                    if (tdef.defName == def.defName)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }