Esempio n. 1
0
 //Zombies don't receive thoughts
 public static bool CanGetThought_PreFix(Pawn pawn, ThoughtDef def, ref bool __result)
 {
     if (ZombieUtility.IsZombie(pawn))
     {
         __result = false;
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 //Zombies will "shamble"
 public static void CostToMoveIntoCell_PostFix(Pawn pawn, IntVec3 c, ref int __result)
 {
     if (ZombieUtility.IsZombie(pawn))
     {
         var cHead   = pawn?.kindDef?.defName == "RE_CrimsonHeadKind";
         var randPct = Rand.Range(0.4f * (cHead ? 0.2f : 1f), 3.2f * (cHead ? 0.5f : 1f));
         __result = Mathf.Clamp((int)(__result * randPct), 1, int.MaxValue);
     }
 }
Esempio n. 3
0
 // RimWorld.GenHostility
 public static void HostileTo_PostFix(Thing a, Thing b, ref bool __result)
 {
     if (a != null && b != null)
     {
         if (a is Pawn pawnA && b is Pawn pawnB)
         {
             if (ZombieUtility.IsZombie(pawnA) && !ZombieUtility.IsZombie(pawnB))
             {
                 __result = true;
             }
         }
     }
 }