public static void SkipPlayerAvoidGridCells(Pawn pawn, ref Predicate <IntVec3> validator) { var originalValidator = validator; validator = cell => (originalValidator == null || originalValidator(cell)) && !PlayerAvoidanceGrids.PawnShouldAvoidCell(pawn, cell); }
public static void ReturnFriendlyAvoidGrid(this Pawn p, ref ByteGrid __result) { if (__result == null && p?.Map != null && PlayerAvoidanceGrids.PawnHasPlayerAvoidanceGridKnowledge(p)) { __result = PlayerAvoidanceGrids.TryGetByteGridForMap(p.Map); } }
public static void ConsiderFriendlyAvoidGrid(IntVec3 c, Map map, Pawn forPawn, ref bool __result) { if (__result == false && PlayerAvoidanceGrids.PawnShouldAvoidCell(forPawn, c)) { __result = true; } }