public static void ApplyPsychologyThoughts_BleedingHeart(TaleNewsPawnBanished __instance, Pawn recipient) { Pawn banishmentVictim = __instance.BanishmentVictim; if (banishmentVictim.RaceProps.Humanlike && recipient != banishmentVictim) { ThoughtDef thoughtDefToGain = null; if (!banishmentVictim.IsPrisonerOfColony) { if (__instance.IsDeadly) { thoughtDefToGain = Psycho_ThoughtDefOf.ColonistAbandonedToDieBleedingHeart; } else { thoughtDefToGain = Psycho_ThoughtDefOf.ColonistAbandonedBleedingHeart; } } else { if (__instance.IsDeadly) { thoughtDefToGain = Psycho_ThoughtDefOf.PrisonerAbandonedToDieBleedingHeart; } } recipient.needs.mood.thoughts.memories.TryGainMemory(thoughtDefToGain, banishmentVictim); } }
private static void GenerateAndProcessNews(Pawn victim, bool banishmentIsDeadly) { var banishmentNews = new TaleNewsPawnBanished(victim, banishmentIsDeadly); foreach (var other in PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_Colonists) { if (other.IsNearEnough(victim)) { other.GetNewsKnowledgeTracker()?.KnowNews(banishmentNews); } } }
private static void GenerateAndProcessNews(Pawn victim, bool banishmentIsDeadly) { Map mapOfOccurence = victim.Map; if (mapOfOccurence == null) { return; } TaleNewsPawnBanished banishmentNews = new TaleNewsPawnBanished(victim, banishmentIsDeadly); foreach (Pawn other in PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_Colonists) { if (other.Map == mapOfOccurence) { other.GetNewsKnowledgeTracker().KnowNews(banishmentNews, WitnessShockGrade.UNDEFINED); } } }