Ejemplo n.º 1
0
        public static void SetupMoveIntoNextCell_Postfix(Pawn_PathFollower __instance, Pawn ___pawn)
        {
            Building_DoorMat building_DoorMat = ___pawn.Map.thingGrid.ThingAt <Building_DoorMat>(__instance.nextCell);

            if (building_DoorMat != null)
            {
                building_DoorMat.Notify_PawnApproaching(___pawn);
            }
        }
Ejemplo n.º 2
0
 public static void CostToMoveIntoCell_Postfix(ref int __result, Pawn_PathFollower __instance, Pawn ___pawn, Pawn pawn, IntVec3 c)
 {
     if (DoorMatsSettings.slowdown > 0)
     {
         Building_DoorMat building_DoorMat = ___pawn.Map.thingGrid.ThingAt <Building_DoorMat>(c);
         if (building_DoorMat != null)
         {
             __result += DoorMatsSettings.slowdown;
         }
     }
 }
Ejemplo n.º 3
0
 public static void CostToMoveIntoCell_Postfix(ref int __result, Pawn_PathFollower __instance, Pawn pawn, IntVec3 c)
 {
     if (DoorMatsSettings.slowdown > 0 && pawn != null && (pawn.IsColonist || pawn.IsPrisonerOfColony))
     {
         if (pawn.Drafted || pawn.health.hediffSet.BleedRateTotal > 0.01)
         {
             return;
         }
         if (pawn.CurJob != null && (pawn.CurJobDef == JobDefOf.Flee || pawn.CurJobDef == JobDefOf.FleeAndCower || pawn.CurJobDef == JobDefOf.TendPatient || pawn.CurJobDef.driverClass == typeof(JobDriver_TakeToBed)))
         {
             return;
         }
         Building_DoorMat building_DoorMat = pawn.Map.thingGrid.ThingAt <Building_DoorMat>(c);
         if (building_DoorMat != null)
         {
             __result += DoorMatsSettings.slowdown;
         }
     }
 }