Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }