Esempio n. 1
0
 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>()));
 }
Esempio n. 5
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ShieldUsersWithRangedWeapon));
 }
Esempio n. 6
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.StarvingColonists.FirstOrDefault()));
 }
Esempio n. 7
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ColonistsNeedingRescue));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BadDispensers));
 }
Esempio n. 9
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(StarvingColonists));
 }
Esempio n. 10
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(HeatstrokePawns));
 }
Esempio n. 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;
         }
     }
 }
Esempio n. 15
0
 public static AlertReport CulpritsAre(IEnumerable <WorldObject> culprits)
 {
     return(AlertReport.CulpritsAre((culprits == null) ? null : culprits.Select(AlertReport.WorldObjectToTargetInfo)));
 }
Esempio n. 16
0
		public override AlertReport GetReport()
		{
			return AlertReport.CulpritsAre(this.BoredPawns());
		}
Esempio n. 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));
 }
Esempio n. 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()));
 }
Esempio n. 23
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BoredPawns));
 }
Esempio n. 24
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(this.ImmobileCaravans));
 }
Esempio n. 25
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritIs(this.ExhaustedColonists.FirstOrDefault <Pawn>()));
 }
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(BreakRiskAlertUtility.PawnsAtRiskExtreme.Concat(BreakRiskAlertUtility.PawnsAtRiskMajor)));
 }
Esempio n. 27
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(ExhaustedColonists));
 }
Esempio n. 28
0
 public static AlertReport CulpritsAre(IEnumerable <Building> culprits)
 {
     return(AlertReport.CulpritsAre((culprits == null) ? null : culprits.Select(AlertReport.BuildingToTargetInfo)));
 }
Esempio n. 29
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(Targets));
 }
Esempio n. 30
0
 public override AlertReport GetReport()
 {
     return(AlertReport.CulpritsAre(UnburiedColonistCorpses));
 }