Exemple #1
0
        protected override void GiveThoughtsToReceipient(Pawn recipient)
        {
            // Check if the receipient can receive any thoughts at all.
            // No need to check for victim's raceprops; only Colonists can be targetted to be kidnapped.
            if (!recipient.IsCapableOfThought())
            {
                return;
            }

            // Change to vanilla "pawn lost" thoughts

            // Give generic Colonist Kidnapped thoughts
            recipient.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.ColonistLost);

            // Then give Friend/Rival Kidnapped thoughts
            if (recipient.RaceProps.IsFlesh && PawnUtility.ShouldGetThoughtAbout(KidnapVictim, recipient))
            {
                var opinion = recipient.relations.OpinionOf(KidnapVictim);
                if (opinion >= 20)
                {
                    new IndividualThoughtToAdd(ThoughtDefOf.PawnWithGoodOpinionLost, recipient, KidnapVictim,
                                               KidnapVictim.relations.GetFriendDiedThoughtPowerFactor(opinion)).Add();
                }
                else if (opinion <= -20)
                {
                    new IndividualThoughtToAdd(ThoughtDefOf.PawnWithBadOpinionLost, recipient, KidnapVictim,
                                               KidnapVictim.relations.GetRivalDiedThoughtPowerFactor(opinion)).Add();
                }
            }

            // Finally give Family Member Kidnapped thoughts
            var mostImportantRelation = recipient.GetMostImportantRelation(KidnapVictim);

            var genderSpecificLostThought = mostImportantRelation?.GetGenderSpecificLostThought(KidnapVictim);

            if (genderSpecificLostThought != null)
            {
                new IndividualThoughtToAdd(genderSpecificLostThought, recipient, KidnapVictim).Add();
                // outIndividualThoughts.Add(new IndividualThoughtToAdd(genderSpecificDiedThought, potentiallyRelatedPawn, victim, 1f, 1f));
            }

            // TODO
        }