Updates and bug fixes

This commit is contained in:
AbstractConcept 2023-01-29 10:54:14 -06:00
parent 299934584e
commit 2256f28cf8
15 changed files with 74 additions and 64 deletions

Binary file not shown.

Binary file not shown.

View File

@ -31,7 +31,7 @@
<baseMoodEffect>0</baseMoodEffect> <baseMoodEffect>0</baseMoodEffect>
</li> </li>
</stages> </stages>
<reactionToSexDiscovery>Acceptance</reactionToSexDiscovery> <reactionToSexDiscovery>Uncaring</reactionToSexDiscovery>
</Privacy_Please.SexActThoughtDef> </Privacy_Please.SexActThoughtDef>
<Privacy_Please.SexActThoughtDef> <Privacy_Please.SexActThoughtDef>
@ -80,7 +80,7 @@
<baseMoodEffect>0</baseMoodEffect> <baseMoodEffect>0</baseMoodEffect>
</li> </li>
</stages> </stages>
<reactionToSexDiscovery>Acceptance</reactionToSexDiscovery> <reactionToSexDiscovery>Uncaring</reactionToSexDiscovery>
</Privacy_Please.SexActThoughtDef> </Privacy_Please.SexActThoughtDef>
<Privacy_Please.SexActThoughtDef> <Privacy_Please.SexActThoughtDef>

View File

@ -5,11 +5,11 @@
<li>UnderWhere</li> <li>UnderWhere</li>
</mods> </mods>
<match Class="PatchOperationSequence"> <match Class="PatchOperationSequence">
<success>Always</success> <success>Normal</success>
<operations> <operations>
<li Class="PatchOperationReplace"> <li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="UnderWhere_Panties" or defName="UnderWhere_Boxers" or defName="UnderWhere_Loincloth"]/apparel/bodyPartGroups</xpath> <xpath>Defs/ThingDef/apparel[layers/li="Underwear" and not(layers/li="UnderwearTop")]/bodyPartGroups</xpath>
<value> <value>
<bodyPartGroups> <bodyPartGroups>
<li>GenitalsBPG</li> <li>GenitalsBPG</li>
@ -18,14 +18,14 @@
</li> </li>
<li Class="PatchOperationReplace"> <li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="UnderWhere_Bra" or defName="UnderWhere_Chestwrap"]/apparel/bodyPartGroups</xpath> <xpath>Defs/ThingDef/apparel[layers/li="UnderwearTop" and not(layers/li="Underwear")]/bodyPartGroups</xpath>
<value> <value>
<bodyPartGroups> <bodyPartGroups>
<li>ChestBPG</li> <li>ChestBPG</li>
</bodyPartGroups> </bodyPartGroups>
</value> </value>
</li> </li>
</operations> </operations>
</match> </match>
</Operation> </Operation>

Binary file not shown.

View File

@ -45,7 +45,7 @@ namespace Privacy_Please
public SexActThoughtDef replacementThoughtDef; public SexActThoughtDef replacementThoughtDef;
} }
public void DetermineReactionOfPawns(Pawn pawn, Pawn witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, bool applyThoughtDefs) public void DetermineReactionOfPawns(Pawn pawn, Pawn witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, bool applyThoughtDefs = false)
{ {
reactionOfPawn = DetermineReaction(pawn, witness, pawnReaction, applyThoughtDefs); reactionOfPawn = DetermineReaction(pawn, witness, pawnReaction, applyThoughtDefs);
reactionOfWitness = DetermineReaction(witness, pawn, witnessReaction, applyThoughtDefs); reactionOfWitness = DetermineReaction(witness, pawn, witnessReaction, applyThoughtDefs);
@ -53,6 +53,17 @@ namespace Privacy_Please
public ReactionToSexDiscovery DetermineReaction(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef) public ReactionToSexDiscovery DetermineReaction(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef)
{ {
JobDriver_Sex jobDriver = reactor.jobs.curDriver as JobDriver_Sex;
// Reactors who do not have thoughts applied to them
if (reactor.IsUnableToSenseSex() || reactor.RaceProps.Animal || reactor.RaceProps.IsMechanoid) return ReactionToSexDiscovery.Ignored;
if (otherPawn.RaceProps.Animal || otherPawn.RaceProps.IsMechanoid) return ReactionToSexDiscovery.Uncaring;
if (BasicSettings.slavesIgnoreSex && (reactor.IsPrisoner || reactor.IsSlave)) return ReactionToSexDiscovery.Uncaring;
if (BasicSettings.otherFactionsIgnoreSex && reactor.Faction.IsPlayer == false) return ReactionToSexDiscovery.Uncaring;
if (BasicSettings.copulatorsIgnoreSlaves && (otherPawn.IsPrisoner || otherPawn.IsSlave)) return ReactionToSexDiscovery.Uncaring;
if (BasicSettings.copulatorsIgnoreOtherFactions && otherPawn.Faction.IsPlayer == false) return ReactionToSexDiscovery.Uncaring;
// Apply thoughtDef
SexActThoughtDef thoughtDef = GetThoughtDefForReactor(reactor, reaction, out Precept precept); SexActThoughtDef thoughtDef = GetThoughtDefForReactor(reactor, reaction, out Precept precept);
ReactionToSexDiscovery reactionToSexAct = thoughtDef.reactionToSexDiscovery; ReactionToSexDiscovery reactionToSexAct = thoughtDef.reactionToSexDiscovery;
@ -64,6 +75,11 @@ namespace Privacy_Please
if (thoughtDef.stages[0].baseMoodEffect < 0 && nullifyingTraits?.Any(x => x.HasTrait(reactor)) != true) if (thoughtDef.stages[0].baseMoodEffect < 0 && nullifyingTraits?.Any(x => x.HasTrait(reactor)) != true)
{ reactor.TryGetComp<CompPawnThoughtData>()?.TryToExclaim(); } { reactor.TryGetComp<CompPawnThoughtData>()?.TryToExclaim(); }
// Reactors who have their reactions changed after applying thoughtDefs
if (BasicSettings.whoringIsUninteruptable && jobDriver?.Sexprops.isWhoring == true) return ReactionToSexDiscovery.Uncaring;
if (BasicSettings.rapeIsUninteruptable && jobDriver?.Sexprops.isRape == true) return ReactionToSexDiscovery.Uncaring;
if (reactor.HostileTo(otherPawn)) return ReactionToSexDiscovery.StopSex;
return reactionToSexAct; return reactionToSexAct;
} }
@ -77,13 +93,13 @@ namespace Privacy_Please
{ {
foreach (ReplacementThought replacementThought in reaction.replacementThoughts) foreach (ReplacementThought replacementThought in reaction.replacementThoughts)
{ {
if (replacementThought?.requiredTraits.Any(x => x.HasTrait(reactor)) == true) if (replacementThought?.requiredTraits?.Any(x => x.HasTrait(reactor)) == true)
{ return replacementThought.replacementThoughtDef; } { return replacementThought.replacementThoughtDef; }
if (replacementThought.requiredQuirk != null && xxx.has_quirk(reactor, replacementThought.requiredQuirk)) if (replacementThought.requiredQuirk != null && xxx.has_quirk(reactor, replacementThought.requiredQuirk))
{ return replacementThought.replacementThoughtDef; } { return replacementThought.replacementThoughtDef; }
if (replacementThought.requiredPreceptDef != null && reactor.ideo.Ideo.HasPrecept(replacementThought.requiredPreceptDef)) if (replacementThought.requiredPreceptDef != null && reactor.ideo?.Ideo.HasPrecept(replacementThought.requiredPreceptDef) == true)
{ {
precept = reactor.ideo.Ideo.GetPrecept(replacementThought.requiredPreceptDef); precept = reactor.ideo.Ideo.GetPrecept(replacementThought.requiredPreceptDef);
return replacementThought.replacementThoughtDef; return replacementThought.replacementThoughtDef;

View File

@ -21,22 +21,12 @@ namespace Privacy_Please
public static bool IsHavingSex(this Pawn pawn) public static bool IsHavingSex(this Pawn pawn)
{ {
if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false) return GetAllSexParticipants(pawn).Count > 1;
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
return jobdriver.Partner != null && jobdriver.Partner != pawn;
} }
public static bool IsMasturbating(this Pawn pawn) public static bool IsMasturbating(this Pawn pawn)
{ {
if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false) return GetAllSexParticipants(pawn).Count == 1;
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
return jobdriver.Partner == null || jobdriver.Partner == pawn || (jobdriver.Partner is Pawn) == false;
} }
public static Pawn GetSexInitiator(this Pawn pawn) public static Pawn GetSexInitiator(this Pawn pawn)
@ -155,8 +145,7 @@ namespace Privacy_Please
{ {
if (pawn.Dead || if (pawn.Dead ||
pawn.Awake() == false || pawn.Awake() == false ||
pawn.Suspended || pawn.Suspended)
pawn.MentalState != null)
{ return true; } { return true; }
return false; return false;

View File

@ -62,12 +62,20 @@ namespace Privacy_Please
public static class HarmonyPatch_JobDriver_Sex_SexTick public static class HarmonyPatch_JobDriver_Sex_SexTick
{ {
// When pawns are having sex, intermittently check their surrounds for privacy // When pawns are having sex, intermittently check their surrounds for privacy
public static void Postfix(ref JobDriver_Sex __instance, Pawn pawn) public static void Postfix(ref JobDriver_Sex __instance)
{ {
Pawn pawn = __instance.pawn;
Pawn partner = pawn.GetSexPartner();
if (pawn.IsHashIntervalTick(90)) if (pawn.IsHashIntervalTick(90))
{ {
if (pawn.IsMasturbating() || pawn.IsHavingSex()) if (pawn.IsMasturbating() || pawn.IsHavingSex())
{ PrivacyUtility.PrivacyCheckForPawn(pawn, 8f); } {
PrivacyUtility.PrivacyCheckForPawn(pawn, 8f);
if (partner != null)
{ PrivacyUtility.PrivacyCheckForPawn(partner, 8f); }
}
} }
} }
} }

View File

@ -25,6 +25,9 @@ namespace Privacy_Please
public static bool ignoreRitualAndPartySex = true; public static bool ignoreRitualAndPartySex = true;
public static bool slavesIgnoreSex = false; public static bool slavesIgnoreSex = false;
public static bool otherFactionsIgnoreSex = false; public static bool otherFactionsIgnoreSex = false;
public static bool copulatorsIgnoreSlaves = false;
public static bool copulatorsIgnoreOtherFactions = false;
public static bool rapeIsUninteruptable = true; public static bool rapeIsUninteruptable = true;
public static bool whoringIsUninteruptable = true; public static bool whoringIsUninteruptable = true;
@ -49,6 +52,8 @@ namespace Privacy_Please
Scribe_Values.Look(ref ignoreRitualAndPartySex, "ignoreRitualAndPartySex", false); Scribe_Values.Look(ref ignoreRitualAndPartySex, "ignoreRitualAndPartySex", false);
Scribe_Values.Look(ref slavesIgnoreSex, "slavesIgnoreSex", false); Scribe_Values.Look(ref slavesIgnoreSex, "slavesIgnoreSex", false);
Scribe_Values.Look(ref otherFactionsIgnoreSex, "otherFactionsIgnoreSex", false); Scribe_Values.Look(ref otherFactionsIgnoreSex, "otherFactionsIgnoreSex", false);
Scribe_Values.Look(ref copulatorsIgnoreSlaves, "copulatorsIgnoreSlaves", false);
Scribe_Values.Look(ref copulatorsIgnoreOtherFactions, "copulatorsIgnoreOtherFactions", false);
Scribe_Values.Look(ref rapeIsUninteruptable, "slavesIgnoreSex", true); Scribe_Values.Look(ref rapeIsUninteruptable, "slavesIgnoreSex", true);
Scribe_Values.Look(ref whoringIsUninteruptable, "otherFactionsIgnoreSex", true); Scribe_Values.Look(ref whoringIsUninteruptable, "otherFactionsIgnoreSex", true);
Scribe_Values.Look(ref underwearSufficentForIdeos, "underwearSufficentForIdeos", true); Scribe_Values.Look(ref underwearSufficentForIdeos, "underwearSufficentForIdeos", true);
@ -109,6 +114,8 @@ namespace Privacy_Please
listingStandard.CheckboxLabeled("ignore_ritual_and_party_sex".Translate(), ref BasicSettings.ignoreRitualAndPartySex, "ignore_ritual_and_party_sex_desc".Translate()); listingStandard.CheckboxLabeled("ignore_ritual_and_party_sex".Translate(), ref BasicSettings.ignoreRitualAndPartySex, "ignore_ritual_and_party_sex_desc".Translate());
listingStandard.CheckboxLabeled("slaves_ignore_sex".Translate(), ref BasicSettings.slavesIgnoreSex, "slaves_ignore_sex_desc".Translate()); listingStandard.CheckboxLabeled("slaves_ignore_sex".Translate(), ref BasicSettings.slavesIgnoreSex, "slaves_ignore_sex_desc".Translate());
listingStandard.CheckboxLabeled("other_factions_ignore_sex".Translate(), ref BasicSettings.otherFactionsIgnoreSex, "other_factions_ignore_sex_desc".Translate()); listingStandard.CheckboxLabeled("other_factions_ignore_sex".Translate(), ref BasicSettings.otherFactionsIgnoreSex, "other_factions_ignore_sex_desc".Translate());
listingStandard.CheckboxLabeled("copulators_ignore_slaves".Translate(), ref BasicSettings.copulatorsIgnoreSlaves, "copulators_ignore_slaves_desc".Translate());
listingStandard.CheckboxLabeled("copulators_ignore_other_factions".Translate(), ref BasicSettings.copulatorsIgnoreOtherFactions, "copulators_ignore_other_factions_desc".Translate());
listingStandard.CheckboxLabeled("major_taboo_can_start_fights".Translate(), ref BasicSettings.majorTabooCanStartFights, "major_taboo_can_start_fights_desc".Translate()); listingStandard.CheckboxLabeled("major_taboo_can_start_fights".Translate(), ref BasicSettings.majorTabooCanStartFights, "major_taboo_can_start_fights_desc".Translate());
listingStandard.CheckboxLabeled("rape_is_uninteruptable".Translate(), ref BasicSettings.rapeIsUninteruptable, "rape_is_uninteruptable_desc".Translate()); listingStandard.CheckboxLabeled("rape_is_uninteruptable".Translate(), ref BasicSettings.rapeIsUninteruptable, "rape_is_uninteruptable_desc".Translate());
listingStandard.CheckboxLabeled("whoring_is_uninteruptable".Translate(), ref BasicSettings.whoringIsUninteruptable, "whoring_is_uninteruptable".Translate()); listingStandard.CheckboxLabeled("whoring_is_uninteruptable".Translate(), ref BasicSettings.whoringIsUninteruptable, "whoring_is_uninteruptable".Translate());

View File

@ -3,9 +3,12 @@
public enum ReactionToSexDiscovery public enum ReactionToSexDiscovery
{ {
Approval = 1, Approval = 1,
Acceptance = 0, Uncaring = 0,
Discomfort = -1, Acceptance = -1,
Panic = -2, Discomfort = -2,
Nausea = -3, Panic = -3,
Nausea = -4,
Ignored = -99,
StopSex = -100,
} }
} }

View File

@ -34,7 +34,7 @@ namespace Privacy_Please
{ {
// Get the pawn's and witness' reaction to the discovery // Get the pawn's and witness' reaction to the discovery
SexInteractionUtility.GetReactionsToSexDiscovery(jobDriver, witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, true); SexInteractionUtility.GetReactionsToSexDiscovery(jobDriver, witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, true);
bool tryToPropositionTheWitness = Random.value < BasicSettings.chanceForOtherToJoinInSex && SexInteractionUtility.PasserbyCanBePropositionedForSex(witness, pawn.GetAllSexParticipants()); bool tryToPropositionTheWitness = Random.value < BasicSettings.chanceForOtherToJoinInSex && jobDriver?.Sexprops.isWhoring != true && SexInteractionUtility.PasserbyCanBePropositionedForSex(witness, pawn.GetAllSexParticipants());
// Try to proposition the witness // Try to proposition the witness
if ((int)reactionOfPawn >= (int)ReactionToSexDiscovery.Acceptance && (int)reactionOfWitness >= (int)ReactionToSexDiscovery.Acceptance && tryToPropositionTheWitness) if ((int)reactionOfPawn >= (int)ReactionToSexDiscovery.Acceptance && (int)reactionOfWitness >= (int)ReactionToSexDiscovery.Acceptance && tryToPropositionTheWitness)
@ -71,11 +71,16 @@ namespace Privacy_Please
} }
// The proposition failed. Is this awkward for those having sex? // The proposition failed. Is this awkward for those having sex?
else if (SexInteractionUtility.PawnWorriesAboutSexWitness(pawn, witness) && (int)reactionOfPawn < (int)ReactionToSexDiscovery.Approval) else if ((int)reactionOfPawn < (int)ReactionToSexDiscovery.Uncaring)
{ {
// The pawn is uncomfortable and is stopping sex // The pawn is uncomfortable and is stopping sex
foreach (Pawn participant in pawn.GetAllSexParticipants()) foreach (Pawn participant in pawn.GetAllSexParticipants())
{ participant.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); } {
JobDriver_Sex participantJobDriver = participant.jobs.curDriver as JobDriver_Sex;
if (participantJobDriver?.ticks_left > 60)
{ participantJobDriver.ticks_left = 60; }
}
} }
} }
} }

View File

@ -17,32 +17,13 @@ namespace Privacy_Please
if (witness == null || pawn == witness || witness.IsUnableToSenseSex() || witness.CanSee(pawn) == false) return false; if (witness == null || pawn == witness || witness.IsUnableToSenseSex() || witness.CanSee(pawn) == false) return false;
List<Pawn> sexParticipants = pawn.GetAllSexParticipants(); List<Pawn> sexParticipants = pawn.GetAllSexParticipants();
bool witnessIsJoiningSex = witness.jobs.curDriver is JobDriver_SexBaseInitiator && sexParticipants.Contains((witness.jobs.curDriver as JobDriver_SexBaseInitiator).Partner); bool witnessIsJoiningSex = witness.jobs.curDriver is JobDriver_SexBaseInitiator && sexParticipants.Contains((witness.jobs.curDriver as JobDriver_SexBaseInitiator).Target);
if (sexParticipants.Contains(witness) || witnessIsJoiningSex) return false; if (sexParticipants.Contains(witness) || witnessIsJoiningSex) return false;
return true; return true;
} }
public static bool PawnWorriesAboutSexWitness(Pawn pawn, Pawn witness)
{
JobDriver_Sex jobDriver = pawn.jobs.curDriver as JobDriver_Sex;
if (pawn.IsUnableToSenseSex() || pawn.AnimalOrWildMan() || pawn.RaceProps.IsMechanoid || pawn.Faction.HostileTo(Faction.OfPlayer)) return false;
if (BasicSettings.rapeIsUninteruptable && jobDriver?.Sexprops.isRape == true) return true;
if (witness.HostileTo(pawn)) return true;
if (witness.RaceProps.Animal || witness.RaceProps.IsMechanoid) return false;
if (pawn.Drafted == true || pawn.mindState?.duty?.def?.alwaysShowWeapon == true) return false;
if (BasicSettings.slavesIgnoreSex && (pawn.IsPrisoner || pawn.IsSlave || witness.IsPrisoner || witness.IsSlave)) return false;
if (BasicSettings.otherFactionsIgnoreSex && (pawn.Faction.IsPlayer == false || witness.Faction.IsPlayer == false)) return false;
if (BasicSettings.whoringIsUninteruptable && jobDriver?.Sexprops.isWhoring == true) return true;
return true;
}
public static bool PawnIsCheatingOnPartner(Pawn pawn, Pawn partner) public static bool PawnIsCheatingOnPartner(Pawn pawn, Pawn partner)
{ {
List<Pawn> spouses = pawn.GetSpouses(false); List<Pawn> spouses = pawn.GetSpouses(false);
@ -75,13 +56,14 @@ namespace Privacy_Please
public static bool PasserbyCanBePropositionedForSex(Pawn passerby, List<Pawn> participants) public static bool PasserbyCanBePropositionedForSex(Pawn passerby, List<Pawn> participants)
{ {
if (passerby == null || if (passerby == null ||
participants.Contains(passerby) || participants.Contains(passerby) ||
participants.Any(x => x.CanSee(passerby) == false)) participants.Any(x => x.CanSee(passerby) == false))
{ return false; } { return false; }
if (participants.Count > 2 || if (participants.Count > 2 ||
participants.Any(x => x.IsForbidden(passerby) || x.HostileTo(passerby)) || participants.Any(x => x.IsForbidden(passerby) ||
x.HostileTo(passerby)) ||
CasualSex_Helper.CanHaveSex(passerby) == false || CasualSex_Helper.CanHaveSex(passerby) == false ||
xxx.IsTargetPawnOkay(passerby) == false) xxx.IsTargetPawnOkay(passerby) == false)
{ return false; } { return false; }
@ -102,7 +84,7 @@ namespace Privacy_Please
reactionOfPawn = ReactionToSexDiscovery.Acceptance; reactionOfPawn = ReactionToSexDiscovery.Acceptance;
reactionOfWitness = ReactionToSexDiscovery.Acceptance; reactionOfWitness = ReactionToSexDiscovery.Acceptance;
// Determine if there are any issues with the sex event and the witness' morals // Determine if there are any issues with the sex event and the witness' morals and apply thoughtDefs as required
foreach (SexActReactionDef sexActReactionDef in DefDatabase<SexActReactionDef>.AllDefs) foreach (SexActReactionDef sexActReactionDef in DefDatabase<SexActReactionDef>.AllDefs)
{ {
var methodInfo = AccessTools.Method(typeof(SexInteractionUtility), sexActReactionDef.sexActCheck, null, null); var methodInfo = AccessTools.Method(typeof(SexInteractionUtility), sexActReactionDef.sexActCheck, null, null);
@ -110,7 +92,7 @@ namespace Privacy_Please
if (methodInfo == null) if (methodInfo == null)
{ DebugMode.Message("Method '" + sexActReactionDef.sexActCheck + "' was not found"); continue; } { DebugMode.Message("Method '" + sexActReactionDef.sexActCheck + "' was not found"); continue; }
if ((bool)methodInfo.Invoke(null, new object[] { jobDriver })) if ((bool)methodInfo.Invoke(null, new object[] { jobDriver, witness }))
{ sexActReactionDef.DetermineReactionOfPawns(pawn, witness, out reactionOfPawn, out reactionOfWitness, applyThoughtDefs); } { sexActReactionDef.DetermineReactionOfPawns(pawn, witness, out reactionOfPawn, out reactionOfWitness, applyThoughtDefs); }
} }
@ -144,39 +126,39 @@ namespace Privacy_Please
} }
} }
public static bool SexActIsNecrophilia(JobDriver_Sex jobDriver) public static bool SexActIsNecrophilia(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.Partner != null && jobDriver.Partner.Dead; return jobDriver.Partner != null && jobDriver.Partner.Dead;
} }
public static bool SexActIsBestiality(JobDriver_Sex jobDriver) public static bool SexActIsBestiality(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.Partner != null && jobDriver.Partner.RaceProps.Animal; return jobDriver.Partner != null && jobDriver.Partner.RaceProps.Animal;
} }
public static bool SexActIsRape(JobDriver_Sex jobDriver) public static bool SexActIsRape(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver is JobDriver_Rape || jobDriver is JobDriver_RapeEnemy || jobDriver is JobDriver_SexBaseRecieverRaped; return jobDriver is JobDriver_Rape || jobDriver is JobDriver_RapeEnemy || jobDriver is JobDriver_SexBaseRecieverRaped;
} }
public static bool SexActIsXenophilia(JobDriver_Sex jobDriver) public static bool SexActIsXenophilia(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.Partner != null && jobDriver.Partner.def.defName != jobDriver.pawn.def.defName; return jobDriver.Partner != null && jobDriver.Partner.def.defName != jobDriver.pawn.def.defName;
} }
public static bool SexActIsMasturbation(JobDriver_Sex jobDriver) public static bool SexActIsMasturbation(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.pawn.IsMasturbating(); return jobDriver.pawn.IsMasturbating();
} }
public static bool SexActIsExhibitionism(JobDriver_Sex jobDriver) public static bool SexActIsExhibitionism(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.pawn.IsHavingSex(); return jobDriver.pawn.IsHavingSex();
} }
public static bool SexActIsInfidelity(JobDriver_Sex jobDriver) public static bool SexActIsInfidelity(JobDriver_Sex jobDriver, Pawn witness = null)
{ {
return jobDriver.pawn.IsHavingSex(); return PawnIsCheatingOnPartner(jobDriver.pawn, witness);
} }
} }
} }

Binary file not shown.

Binary file not shown.