コード例 #1
0
 private static void Postfix(ref bool __result, Thing thing, Region region, PathEndMode peMode, Pawn traveler)
 {
     if (!__result || traveler is null)
     {
         return;
     }
     if (traveler.IsCaptiveOf(null))
     {
         __result = CageUtility.Reachable(traveler.Position, thing, peMode, TraverseParms.For(traveler));
     }
 }
コード例 #2
0
 private static void Postfix(ref bool __result, IntVec3 c, Pawn forPawn)
 {
     if (!__result)
     {
         return;
     }
     if (forPawn.IsCaptiveOf(null))
     {
         __result = CageUtility.Reachable(forPawn.Position, c, PathEndMode.OnCell,
                                          TraverseParms.For(forPawn, mode: TraverseMode.ByPawn));
     }
 }
コード例 #3
0
 private static void Postfix(ref bool __result, IntVec3 start, LocalTargetInfo dest,
                             PathEndMode peMode, TraverseParms traverseParams)
 {
     if (!__result || traverseParams.pawn is null)
     {
         return;
     }
     if (traverseParams.pawn.IsCaptiveOf(null))
     {
         __result = CageUtility.Reachable(start, dest, peMode, traverseParams);
     }
 }
コード例 #4
0
 private static void Postfix(ref bool __result, Thing t, Pawn pawn)
 {
     if (__result)
     {
         return;
     }
     if (pawn.IsCaptiveOf(null))
     {
         __result = !CageUtility.Reachable(pawn.Position, t, PathEndMode.ClosestTouch,
                                           TraverseParms.For(pawn, mode: TraverseMode.ByPawn));
     }
 }
コード例 #5
0
 private static void Postfix(ref Thing __result, IntVec3 root, Map map, ThingRequest thingReq,
                             PathEndMode peMode, TraverseParms traverseParams, float maxDistance,
                             Predicate <Thing> validator, IEnumerable <Thing> customGlobalSearchSet,
                             int searchRegionsMin, int searchRegionsMax, bool forceAllowGlobalSearch,
                             RegionType traversableRegionTypes, bool ignoreEntirelyForbiddenRegions)
 {
     if (__result is null || traverseParams.pawn is null)
     {
         return;
     }
     if (traverseParams.pawn.IsCaptiveOf(null) && !CageUtility.Reachable(root, __result, peMode, traverseParams))
     {
         __result = null;
     }
 }