public static LordToil GetWandererChatToil(IoMChatType chatType) { switch (chatType) { case IoMChatType.SimpleChat: { return(new LordToil_WanderAndChat(DefOfs.C_DutyDefOfs.FollowAndChat)); } case IoMChatType.ConvertEmperor: { return(new LordToil_WanderAndChat(DefOfs.C_DutyDefOfs.FollowAndChat)); } case IoMChatType.ConvertChaos: { return(new LordToil_WanderAndChat(DefOfs.C_DutyDefOfs.FollowAndChat)); } case IoMChatType.ConvertTau: { return(new LordToil_WanderAndChat(DefOfs.C_DutyDefOfs.FollowAndChat)); } case IoMChatType.InquisitorInvestigation: { return(new LordToil_WanderAndChat(DefOfs.C_DutyDefOfs.FollowAndInvestigate)); } } return(null); }
public static Toil ChatToPawn(Pawn pawn, Pawn talkee, IoMChatType chatType = IoMChatType.SimpleChat) { return(new Toil { initAction = delegate { if (!pawn.interactions.TryInteractWith(talkee, InteractionDefOf.BuildRapport)) { pawn.jobs.curDriver.ReadyForNextToil(); } else { pawn.records.Increment(RecordDefOf.PrisonersChatted); } }, socialMode = RandomSocialMode.Off, defaultCompleteMode = ToilCompleteMode.Delay, defaultDuration = 240, finishActions = new List <Action>() { delegate { PerformPostChatActions(pawn, talkee, chatType); }, } }); }
public LordJob_IntrusiveWanderer(IntVec3 chillSpot, Pawn centralPawn, IoMChatType chatType) { this.chillSpot = chillSpot; this.centralPawn = centralPawn; this.chatType = chatType; }
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 { } }
public IncidentWorker_WanderingTrader() { this.ChatType = IoMChatType.SimpleChat; }