public void ReadCorruptionTick(Pawn pawn, ReadableBooks book) { Need_Soul soul = pawn.needs.TryGetNeed <Need_Soul>(); if (soul != null) { float num; int sign = 0; switch (book.Tdef.soulItemCategory) { case (SoulItemCategories.Neutral): { sign = 0; break; } case (SoulItemCategories.Corruption): { sign = -1; break; } case (SoulItemCategories.Redemption): { sign = 1; break; } default: { Log.Error("No Soul Item Category Found"); break; } } num = sign * this.Tdef.SoulGainRate * 0.2f / 1200; soul.GainNeed(num); } }
public static void PerformPostChatActions(Pawn talker, Pawn talkee, IoMChatType chatType) { if (chatType != IoMChatType.ConvertTau) { Need_Soul talkerSoul = CorruptionStoryTrackerUtilities.GetPawnSoul(talker); Need_Soul talkeeSoul = CorruptionStoryTrackerUtilities.GetPawnSoul(talkee); if (talkerSoul != null && talkeeSoul != null) { if (chatType != IoMChatType.InquisitorInvestigation) { if (talkerSoul.NoPatron && talkeeSoul.NoPatron) { if (Rand.Range(4, 6) + GetChatIntrigueFactor(talker, talkee) > 0) { talkeeSoul.GainNeed(-0.0005f); } else { talkee.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOf.SleepDisturbed, talker); } } else if (talkerSoul.NoPatron && !talkeeSoul.NoPatron) { StartReligiousSocialFight(talker, talkee); } else if (!talkerSoul.NoPatron && !talkeeSoul.NoPatron) { talkeeSoul.GainNeed(0.005f); } else if (!talkerSoul.NoPatron && talkeeSoul.NoPatron) { if (Rand.Range(-2, 0) + GetChatIntrigueFactor(talker, talkee) > 0) { talkeeSoul.GainNeed(-0.0005f); } else { StartReligiousSocialFight(talker, talkee); } } } else { //switch (talkeeSoul.CurCategory) //{ // case SoulAffliction.Lost: // { // return; // } // case SoulAffliction.Corrupted: // { // return; // } // case SoulAffliction.Tainted: // { // return; // } //} Lord lord = talker.GetLord(); LordJob_IntrusiveWanderer lordJob = lord.LordJob as LordJob_IntrusiveWanderer; lordJob.InquisitorFoundHeretic = true; } } } else { } }