// Token: 0x06000C80 RID: 3200 RVA: 0x0003DF08 File Offset: 0x0003C108 internal static void _Interacted(this InteractionWorker_RomanceAttempt _this, Pawn initiator, Pawn recipient, List <RulePackDef> extraSentencePacks) { if (Rand.Value < _SuccessChance(_this, initiator, recipient)) { List <Pawn> list; _BreakLoverAndFianceRelations(_this, initiator, out list); List <Pawn> list2; _BreakLoverAndFianceRelations(_this, recipient, out list2); for (int i = 0; i < list.Count; i++) { _TryAddCheaterThought(_this, list[i], initiator); } for (int j = 0; j < list2.Count; j++) { _TryAddCheaterThought(_this, list2[j], recipient); } initiator.relations.TryRemoveDirectRelation(PawnRelationDefOf.ExLover, recipient); initiator.relations.AddDirectRelation(PawnRelationDefOf.Lover, recipient); TaleRecorder.RecordTale(TaleDefOf.BecameLover, new object[] { initiator, recipient }); initiator.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOf.BrokeUpWithMe, recipient); recipient.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOf.BrokeUpWithMe, initiator); initiator.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOfPsychology.BrokeUpWithMeCodependent, recipient); recipient.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOfPsychology.BrokeUpWithMeCodependent, initiator); initiator.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOf.FailedRomanceAttemptOnMe, recipient); recipient.needs.mood.thoughts.memories.RemoveSocialMemoryThoughts(ThoughtDefOf.FailedRomanceAttemptOnMe, initiator); if (initiator.IsColonist || recipient.IsColonist) { var _SendNewLoversLetter = typeof(InteractionWorker_RomanceAttempt).GetMethod("SendNewLoversLetter", BindingFlags.Instance | BindingFlags.NonPublic); if (_SendNewLoversLetter != null) { _SendNewLoversLetter.Invoke(_this, new object[] { initiator, recipient, list, list2 }); } else { Log.ErrorOnce("Unable to reflect InteractionWorker_RomanceAttempt.SendNewLoversLetter!", 305432421); } } extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptAccepted); LovePartnerRelationUtility.TryToShareBed(initiator, recipient); } else { initiator.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOf.RebuffedMyRomanceAttempt, recipient); recipient.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOf.FailedRomanceAttemptOnMe, initiator); extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptRejected); } }
public override void Interacted(Pawn initiator, Pawn recipient, List <RulePackDef> extraSentencePacks, out string letterText, out string letterLabel, out LetterDef letterDef) { if (lastInitiator != initiator || lastRecipient != recipient) { AttractionUtility.CalculateAttraction(initiator, recipient, false, true, out veryLowInitiatorReasons, out lowInitiatorReasons, out highInitiatorReasons, out veryHighInitiatorReasons, out AttractionFactorDef reasonForInstantFailure); } if (Rand.Value < this.SuccessChance(initiator, recipient)) { GRPawnRelationUtility.AdvanceRelationship(initiator, recipient, PawnRelationDefOf.Lover); LovePartnerRelationUtility.TryToShareBed(initiator, recipient); //TODO Add Move In tale if (PawnUtility.ShouldSendNotificationAbout(initiator) || PawnUtility.ShouldSendNotificationAbout(recipient)) { letterText = "MoveInLetterText".Translate(initiator.Named("PAWN1"), recipient.Named("PAWN2")); letterText += AttractionUtility.WriteReasonsParagraph(initiator, recipient, veryHighInitiatorReasons, highInitiatorReasons, lowInitiatorReasons, veryLowInitiatorReasons); letterText += AttractionUtility.WriteReasonsParagraph(recipient, initiator, veryHighRecipientReasons, highRecipientReasons, lowRecipientReasons, veryLowRecipientReasons); letterLabel = "MoveInLetterTitle".Translate(); letterDef = LetterDefOf.PositiveEvent; } else { letterText = null; letterLabel = null; letterDef = null; } //extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptAccepted); } else { //extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptRejected); letterText = null; letterLabel = null; letterDef = null; } }
internal static void _Interacted(this InteractionWorker_RomanceAttempt _this, Pawn initiator, Pawn recipient, List <RulePackDef> extraSentencePacks) { if (PsychologyBase.ActivateKinsey()) { PsychologyPawn realInitiator = initiator as PsychologyPawn; PsychologyPawn realRecipient = recipient as PsychologyPawn; if (realInitiator != null && realRecipient != null) { realInitiator.sexuality.LearnSexuality(realRecipient); } } if (Rand.Value < _SuccessChance(_this, initiator, recipient)) { List <Pawn> list; List <Pawn> list2; _this._BreakLoverAndFianceRelations(initiator, out list); _this._BreakLoverAndFianceRelations(recipient, out list2); for (int i = 0; i < list.Count; i++) { _TryAddCheaterThought(_this, list[i], initiator); } for (int j = 0; j < list2.Count; j++) { _TryAddCheaterThought(_this, list2[j], recipient); } initiator.relations.TryRemoveDirectRelation(PawnRelationDefOf.ExLover, recipient); initiator.relations.AddDirectRelation(PawnRelationDefOf.Lover, recipient); TaleRecorder.RecordTale(TaleDefOf.BecameLover, new object[] { initiator, recipient }); initiator.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.BrokeUpWithMe, recipient); recipient.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.BrokeUpWithMe, initiator); initiator.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOfPsychology.BrokeUpWithMeCodependent, recipient); recipient.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOfPsychology.BrokeUpWithMeCodependent, initiator); initiator.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.FailedRomanceAttemptOnMe, recipient); initiator.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.FailedRomanceAttemptOnMeLowOpinionMood, recipient); recipient.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.FailedRomanceAttemptOnMe, initiator); recipient.needs.mood.thoughts.memories.RemoveMemoryThoughtsOfDefWhereOtherPawnIs(ThoughtDefOf.FailedRomanceAttemptOnMeLowOpinionMood, initiator); if (initiator.IsColonist || recipient.IsColonist) { var _SendNewLoversLetter = typeof(InteractionWorker_RomanceAttempt).GetMethod("SendNewLoversLetter", BindingFlags.Instance | BindingFlags.NonPublic); if (_SendNewLoversLetter != null) { _SendNewLoversLetter.Invoke(_this, new object[] { initiator, recipient, list, list2 }); } else { Log.ErrorOnce("Unable to reflect InteractionWorker_RomanceAttempt.SendNewLoversLetter!", 305432421); } } extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptAccepted); LovePartnerRelationUtility.TryToShareBed(initiator, recipient); } else { if (!initiator.story.traits.HasTrait(TraitDefOfPsychology.Lecher)) { initiator.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOfPsychology.RebuffedMyRomanceAttemptLecher, recipient); } else { initiator.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOf.RebuffedMyRomanceAttempt, recipient); } if (recipient.relations.OpinionOf(initiator) <= 0) { recipient.needs.mood.thoughts.memories.TryGainMemoryThought(ThoughtDefOf.FailedRomanceAttemptOnMeLowOpinionMood, initiator); } extraSentencePacks.Add(RulePackDefOf.Sentence_RomanceAttemptRejected); } }