예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
        }
예제 #6
0
        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));
        }
예제 #7
0
        public static IEnumerable <Thing> ThingsByDefInRange(this IntVec3 cell, Map map, ThingDef thingDef, float range)
        {
            ThingsTracker tracker = map.GetThingTracker();

            return(tracker.ThingsInRangeOf(thingDef, cell, range));
        }