public static IEnumerable <Thing> ThingsByDefInRange(this IntVec3 cell, Map map, ThingDef thingDef, float range, PathEndMode pathEndMode = PathEndMode.None, TraverseMode traverseMode = TraverseMode.ByPawn, Danger danger = Danger.Unspecified) { ThingsTracker tracker = map.GetThingTracker(); return(ThingsReachableFrom(map, tracker.ThingsInRangeOf(thingDef, cell, range), cell, pathEndMode, traverseMode, danger)); }
public static IEnumerable <Pawn> PawnsInRange(this IntVec3 cell, Map map, float range, PathEndMode pathEndMode = PathEndMode.None, TraverseMode traverseMode = TraverseMode.ByPawn, Danger danger = Danger.Unspecified) { ThingsTracker tracker = map.GetThingTracker(); return(ThingsReachableFrom(map, tracker.ThingsInRangeOf(TrackedThingsRequestCategory.Pawns, cell, range), cell, pathEndMode, traverseMode, danger).Select(t => t as Pawn)); }
public static IEnumerable <Apparel> ApparelInRange(this IntVec3 cell, Map map, float range) { ThingsTracker tracker = map.GetThingTracker(); return(tracker.ThingsInRangeOf(TrackedThingsRequestCategory.Apparel, cell, range).Select(t => t as Apparel)); }
public static IEnumerable <ThingWithComps> MedicineInRange(this IntVec3 cell, Map map, float range) { ThingsTracker tracker = map.GetThingTracker(); return(tracker.ThingsInRangeOf(TrackedThingsRequestCategory.Medicine, cell, range).Select(t => t as ThingWithComps)); }
public static IEnumerable <Pawn> HostilesInRange(this IntVec3 cell, Map map, Faction faction, float range) { ThingsTracker tracker = map.GetThingTracker(); return(tracker.ThingsInRangeOf(TrackedThingsRequestCategory.Pawns, cell, range).Where(t => t.Faction?.HostileTo(faction) ?? false).Select(t => t as Pawn)); }
public static IEnumerable <Pawn> PawnsInRange(this IntVec3 cell, Map map, float range) { ThingsTracker tracker = map.GetThingTracker(); return(tracker.ThingsInRangeOf(TrackedThingsRequestCategory.Pawns, cell, range).Select(t => t as Pawn)); }
public static IEnumerable <Thing> ThingsByDefInRange(this IntVec3 cell, Map map, ThingDef thingDef, float range) { ThingsTracker tracker = map.GetThingTracker(); return(tracker.ThingsInRangeOf(thingDef, cell, range)); }