/// <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)
 {
     if (AttemptToObtainExistingReference(news) == null)
     {
         // Pawn is receiving this for the first time.
         TaleNewsReference newReference = news.CreateReferenceForReceipient(Pawn);
         newsKnowledgeList.Add(newReference);
         newReference.ActivateNews();
     }
     else
     {
         // Pawn might have forgotten about the news, so let's see.
         // Not implemented for now.
     }
 }
Exemple #2
0
        /// <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;
        }
        /// <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)
        {
            if (news == null)
            {
                return;
            }

            if (AttemptToObtainExistingReference(news) != null)
            {
                return;
            }

            // Pawn is receiving this for the first time.
            var newReference = news.CreateReferenceForReceipient(Pawn);

            newsKnowledgeList.Add(newReference);
            newReference.ActivateNews();
        }