public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(IdleCaravans));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(AwaitingMedicalOperation));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.HuntersWithoutRangedWeapon));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.ColonistsNeedingRescue.FirstOrDefault <Pawn>()));
 }
Beispiel #5
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ShieldUsersWithRangedWeapon));
 }
Beispiel #6
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.StarvingColonists.FirstOrDefault()));
 }
Beispiel #7
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ColonistsNeedingRescue));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BadDispensers));
 }
Beispiel #9
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(StarvingColonists));
 }
Beispiel #10
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(HeatstrokePawns));
 }
Beispiel #11
0
 public void AlertsReadoutUpdate()
 {
     if (Mathf.Max(Find.TickManager.TicksGame, Find.TutorialState.endTick) >= 600)
     {
         if (Find.Storyteller.def.disableAlerts)
         {
             activeAlerts.Clear();
         }
         else
         {
             curAlertIndex++;
             if (curAlertIndex >= AlertCycleLength)
             {
                 curAlertIndex = 0;
             }
             for (int i = curAlertIndex; i < AllAlerts.Count; i += AlertCycleLength)
             {
                 Alert alert = AllAlerts[i];
                 try
                 {
                     if (alert.Active)
                     {
                         if (!activeAlerts.Contains(alert))
                         {
                             activeAlerts.Add(alert);
                             alert.Notify_Started();
                         }
                     }
                     else
                     {
                         for (int j = 0; j < activeAlerts.Count; j++)
                         {
                             if (activeAlerts[j] == alert)
                             {
                                 activeAlerts.RemoveAt(j);
                                 break;
                             }
                         }
                     }
                 }
                 catch (Exception ex)
                 {
                     Log.ErrorOnce("Exception processing alert " + alert.ToString() + ": " + ex.ToString(), 743575);
                     if (activeAlerts.Contains(alert))
                     {
                         activeAlerts.Remove(alert);
                     }
                 }
             }
             for (int num = activeAlerts.Count - 1; num >= 0; num--)
             {
                 Alert alert2 = activeAlerts[num];
                 try
                 {
                     activeAlerts[num].AlertActiveUpdate();
                 }
                 catch (Exception ex2)
                 {
                     Log.ErrorOnce("Exception updating alert " + alert2.ToString() + ": " + ex2.ToString(), 743575);
                     activeAlerts.RemoveAt(num);
                 }
             }
             if (mouseoverAlertIndex >= 0 && mouseoverAlertIndex < activeAlerts.Count)
             {
                 AlertReport report = activeAlerts[mouseoverAlertIndex].GetReport();
                 IEnumerable <GlobalTargetInfo> culprits = report.culprits;
                 if (culprits != null)
                 {
                     foreach (GlobalTargetInfo item in culprits)
                     {
                         TargetHighlighter.Highlight(item);
                     }
                 }
             }
             mouseoverAlertIndex = -1;
         }
     }
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BestowersWaiting));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.NeedingColonists));
 }
 public void AlertsReadoutUpdate()
 {
     if (Mathf.Max(Find.TickManager.TicksGame, Find.TutorialState.endTick) >= 600)
     {
         if (Find.Storyteller.def.disableAlerts)
         {
             this.activeAlerts.Clear();
         }
         else
         {
             this.curAlertIndex++;
             if (this.curAlertIndex >= AlertsReadout.AlertCycleLength)
             {
                 this.curAlertIndex = 0;
             }
             for (int i = this.curAlertIndex; i < this.AllAlerts.Count; i += AlertsReadout.AlertCycleLength)
             {
                 Alert alert = this.AllAlerts[i];
                 try
                 {
                     if (alert.Active)
                     {
                         if (!this.activeAlerts.Contains(alert))
                         {
                             this.activeAlerts.Add(alert);
                             alert.Notify_Started();
                         }
                     }
                     else
                     {
                         int num = 0;
                         while (num < this.activeAlerts.Count)
                         {
                             if (this.activeAlerts[num] != alert)
                             {
                                 num++;
                                 continue;
                             }
                             this.activeAlerts.RemoveAt(num);
                             break;
                         }
                     }
                 }
                 catch (Exception ex)
                 {
                     Log.ErrorOnce("Exception processing alert " + alert.ToString() + ": " + ex.ToString(), 743575);
                     if (this.activeAlerts.Contains(alert))
                     {
                         this.activeAlerts.Remove(alert);
                     }
                 }
             }
             for (int num2 = this.activeAlerts.Count - 1; num2 >= 0; num2--)
             {
                 Alert alert2 = this.activeAlerts[num2];
                 try
                 {
                     this.activeAlerts[num2].AlertActiveUpdate();
                 }
                 catch (Exception ex2)
                 {
                     Log.ErrorOnce("Exception updating alert " + alert2.ToString() + ": " + ex2.ToString(), 743575);
                     this.activeAlerts.RemoveAt(num2);
                 }
             }
             if (this.mouseoverAlertIndex >= 0 && this.mouseoverAlertIndex < this.activeAlerts.Count)
             {
                 AlertReport      report  = this.activeAlerts[this.mouseoverAlertIndex].GetReport();
                 GlobalTargetInfo culprit = report.culprit;
                 if (culprit.IsValid && culprit.IsMapTarget && Find.VisibleMap != null && culprit.Map == Find.VisibleMap)
                 {
                     GenDraw.DrawArrowPointingAt(((TargetInfo)culprit).CenterVector3, false);
                 }
             }
             this.mouseoverAlertIndex = -1;
         }
     }
 }
Beispiel #15
0
 public static AlertReport CulpritsAre(IEnumerable <WorldObject> culprits)
 {
     return(AlertReport.CulpritsAre((culprits == null) ? null : culprits.Select(AlertReport.WorldObjectToTargetInfo)));
 }
Beispiel #16
0
		public override AlertReport GetReport()
		{
			return AlertReport.CulpritsAre(this.BoredPawns());
		}
Beispiel #17
0
 public static AlertReport CulpritsAre(IEnumerable <Caravan> culprits)
 {
     return(AlertReport.CulpritsAre((culprits == null) ? null : culprits.Select(AlertReport.CaravanToTargetInfo)));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(StarvingAnimals));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.BadHunters));
 }
Beispiel #20
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(HypothermiaDangerColonists));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.SickPawns));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.AffectedPawns()));
 }
Beispiel #23
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BoredPawns));
 }
Beispiel #24
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.ImmobileCaravans));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.ExhaustedColonists.FirstOrDefault <Pawn>()));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BreakRiskAlertUtility.PawnsAtRiskExtreme.Concat(BreakRiskAlertUtility.PawnsAtRiskMajor)));
 }
Beispiel #27
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ExhaustedColonists));
 }
Beispiel #28
0
 public static AlertReport CulpritsAre(IEnumerable <Building> culprits)
 {
     return(AlertReport.CulpritsAre((culprits == null) ? null : culprits.Select(AlertReport.BuildingToTargetInfo)));
 }
Beispiel #29
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(Targets));
 }
Beispiel #30
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(UnburiedColonistCorpses));
 }