public override AlertReport GetReport()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                foreach (Building item in from b in maps[i].listerBuildings.allBuildingsColonist
                         where b.def.IsFoodDispenser
                         select b)
                {
                    bool     flag   = false;
                    ThingDef hopper = ThingDefOf.Hopper;
                    foreach (IntVec3 item2 in GenAdj.CellsAdjacentCardinal(item))
                    {
                        if (item2.InBounds(maps[i]))
                        {
                            Thing edifice = item2.GetEdifice(item.Map);
                            if (edifice != null && edifice.def == hopper)
                            {
                                flag = true;
                                break;
                            }
                        }
                    }
                    if (!flag)
                    {
                        return(AlertReport.CulpritIs(item));
                    }
                }
            }
            return(AlertReport.Inactive);
        }
Пример #2
0
        public override AlertReport GetReport()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                Map map = maps[i];
                if (map.IsPlayerHome && map.mapPawns.PrisonersOfColonySpawned.Any())
                {
                    bool flag = false;
                    foreach (Pawn item in map.mapPawns.FreeColonistsSpawned)
                    {
                        if (!item.Downed && item.workSettings != null && item.workSettings.GetPriority(WorkTypeDefOf.Warden) > 0)
                        {
                            flag = true;
                            break;
                        }
                    }
                    if (!flag)
                    {
                        return(AlertReport.CulpritIs(map.mapPawns.PrisonersOfColonySpawned.First()));
                    }
                }
            }
            return(AlertReport.Inactive);
        }
Пример #3
0
        public override AlertReport GetReport()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                Map map = maps[i];
                if (map.IsPlayerHome)
                {
                    Designation designation = (from d in map.designationManager.allDesignations
                                               where d.def == DesignationDefOf.Mine
                                               select d).FirstOrDefault <Designation>();
                    if (designation != null)
                    {
                        bool flag = false;
                        foreach (Pawn current in map.mapPawns.FreeColonistsSpawned)
                        {
                            if (!current.Downed && current.workSettings != null && current.workSettings.GetPriority(WorkTypeDefOf.Mining) > 0)
                            {
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            return(AlertReport.CulpritIs(designation.target.Thing));
                        }
                    }
                }
            }
            return(AlertReport.Inactive);
        }
Пример #4
0
        public override AlertReport GetReport()
        {
            Pawn pawn = this.TraderPawns.FirstOrDefault();

            if (pawn == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs((GlobalTargetInfo)((Thing)pawn)));
        }
        public override AlertReport GetReport()
        {
            Pawn pawn = this.HypothermiaDangerColonists.FirstOrDefault();

            if (pawn == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs(pawn));
        }
Пример #6
0
        public override AlertReport GetReport()
        {
            Pawn pawn = this.BadHunter();

            if (pawn == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs(pawn));
        }
Пример #7
0
        public override AlertReport GetReport()
        {
            Thing thing = this.BadTable();

            if (thing == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs(thing));
        }
Пример #8
0
        public override AlertReport GetReport()
        {
            Pawn pawn = this.AffectedPawns().FirstOrDefault <Pawn>();

            if (pawn != null)
            {
                return(AlertReport.CulpritIs(pawn));
            }
            return(AlertReport.Inactive);
        }
        public override AlertReport GetReport()
        {
            Fire fireInHomeArea = this.FireInHomeArea;

            if (fireInHomeArea != null)
            {
                return(AlertReport.CulpritIs(fireInHomeArea));
            }
            return(false);
        }
Пример #10
0
        public override AlertReport GetReport()
        {
            Pawn pawn = this.NeedingColonists.FirstOrDefault <Pawn>();

            if (pawn == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs(pawn));
        }
        public override AlertReport GetReport()
        {
            if (Find.AnyPlayerHomeMap == null)
            {
                return(false);
            }
            Pawn pawn = this.Patients.FirstOrDefault();

            if (pawn == null)
            {
                return(false);
            }
            return(AlertReport.CulpritIs(pawn));
        }
Пример #12
0
 public override AlertReport GetReport()
 {
     foreach (Map map in Find.Maps)
     {
         if (map.passingShipManager.passingShips.Count > 0)
         {
             Building_CommsConsole console = map.listerBuildings.AllBuildingsColonistOfClass <Building_CommsConsole>().FirstOrDefault();
             if (console != null)
             {
                 return(AlertReport.CulpritIs((GlobalTargetInfo)((Thing)console)));
             }
         }
     }
     return(false);
 }
        public override AlertReport GetReport()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                foreach (Building_Throne item in maps[i].listerThings.ThingsInGroup(ThingRequestGroup.Throne))
                {
                    validationInfo = RoomRoleWorker_ThroneRoom.Validate(item.GetRoom());
                    if (validationInfo != null)
                    {
                        return(AlertReport.CulpritIs(item));
                    }
                }
            }
            return(false);
        }
Пример #14
0
        public override AlertReport GetReport()
        {
            foreach (var map in Find.Maps)
            {
                if (map.passingShipManager.passingShips.Count <= 0)
                {
                    continue;
                }

                var console = map.listerBuildings.AllBuildingsColonistOfClass <Building_CommsConsole>()
                              .FirstOrDefault();
                if (console != null)
                {
                    return(AlertReport.CulpritIs(console));
                }
            }

            return(false);
        }
Пример #15
0
        public override AlertReport GetReport()
        {
            List <Map> maps = Find.Maps;

            for (int i = 0; i < maps.Count; i++)
            {
                Map map = maps[i];
                if (!map.IsPlayerHome)
                {
                    continue;
                }
                Designation        designation     = null;
                List <Designation> allDesignations = map.designationManager.allDesignations;
                for (int j = 0; j < allDesignations.Count; j++)
                {
                    if (allDesignations[j].def == DesignationDefOf.Mine)
                    {
                        designation = allDesignations[j];
                        break;
                    }
                }
                if (designation == null)
                {
                    continue;
                }
                bool flag = false;
                foreach (Pawn item in map.mapPawns.FreeColonistsSpawned)
                {
                    if (!item.Downed && item.workSettings != null && item.workSettings.GetPriority(WorkTypeDefOf.Mining) > 0)
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    return(AlertReport.CulpritIs(designation.target.Thing));
                }
            }
            return(false);
        }
Пример #16
0
        public override AlertReport GetReport()
        {
            if (TraderPawns.Count() == 0)
            {
                return(false);
            }
            var selectedPawn    = TraderPawns.FirstOrDefault();
            var someoneSelected = false;

            foreach (Pawn p in TraderPawns)
            {
                if (Find.Selector.IsSelected(p))
                {
                    someoneSelected = true;
                    continue;
                }
                if (someoneSelected && !Find.Selector.IsSelected(p))
                {
                    selectedPawn = p;
                    break;
                }
            }
            return(AlertReport.CulpritIs(selectedPawn));
        }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.SickPawns.FirstOrDefault()));
 }
Пример #18
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.ExhaustedColonists.FirstOrDefault <Pawn>()));
 }
Пример #19
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.StarvingColonists.FirstOrDefault()));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.StarvingAnimals.FirstOrDefault <Pawn>()));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.ColonistsNeedingRescue.FirstOrDefault <Pawn>()));
 }