This commit is contained in:
AbstractConcept 2023-02-01 16:05:06 -06:00
parent 12b947317e
commit 5224ef08c2
28 changed files with 393 additions and 322 deletions

View file

@ -21,7 +21,8 @@ namespace Privacy_Please
__instance is JobDriver_SexBaseInitiator &&
pawn.GetAllSexParticipants().Count == 2 &&
(__instance is JobDriver_JoinInSex) == false &&
Random.value < BasicSettings.chanceForOtherToJoinInSex)
Random.value < BasicSettings.chanceForOtherToJoinInSex &&
pawn.TryGetComp<CompPawnThoughtData>()?.CanSendAnInvitionForSex() == true)
{
DebugMode.Message("Find another to join in sex?");
@ -33,12 +34,10 @@ namespace Privacy_Please
Pawn other = thing as Pawn;
if (other == null || pawn == other) continue;
DebugMode.Message("Checking " + other.LabelShort);
SexInteractionUtility.GetReactionsToSexDiscovery(pawn.jobs.curDriver as JobDriver_Sex, other, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfOther, false);
DebugMode.Message("Reaction: " + reactionOfOther);
SexInteractionUtility.GetReactionsToSexAct(pawn.jobs.curDriver as JobDriver_Sex, other, out ReactionToSexAct reactionOfPawn, out ReactionToSexAct reactionOfOther, false);
// Find candidates to invite
if ((int)reactionOfOther >= (int)ReactionToSexDiscovery.Acceptance && SexInteractionUtility.PasserbyCanBePropositionedForSex(other, pawn.GetAllSexParticipants()))
if ((int)reactionOfOther >= (int)ReactionToSexAct.Acceptance && SexInteractionUtility.PasserbyCanBePropositionedForSex(other, pawn.GetAllSexParticipants()))
{
DebugMode.Message(other.NameShortColored + " is a potential candidate");
candidates.Add(other);