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)); } }
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)); } }
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); } }
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)); } }
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; } }