/// <summary> /// Attempts to activate news, and let the recipient react to the news. /// <para/> /// Will do nothing if the news has already been activated before. /// </summary> public void ActivateNews(WitnessShockGrade shockGrade) { this.shockGrade = shockGrade; if (!hasBeenActivated) { // First time activating. ReferencedTaleNews.ActivateForReceipient(CachedSubject); UpdateNewsImportance(true); tickReceived = Find.TickManager.TicksGame; hasBeenActivated = true; } }
/// <summary> /// Finds the TaleNewsReference of the given TaleNews in the known list (or generates a new one if it does not exist), and activates it. /// </summary> /// <param name="news"></param> public void KnowNews(TaleNews news, WitnessShockGrade shockGrade) { foreach (TaleNewsReference reference in newsKnowledgeList) { if (reference.IsReferencingTaleNews(news)) { reference.ActivateNews(shockGrade); return; } } TaleNewsReference newReference = news.CreateReferenceForReceipient(Pawn); newsKnowledgeList.Add(newReference); newReference.ActivateNews(shockGrade); return; }