Revert "Bug fixes"

This reverts commit a6a550af53.
This commit is contained in:
AbstractConcept 2022-11-05 23:04:23 -05:00
parent a6a550af53
commit 127206926b
26 changed files with 481 additions and 531 deletions

View file

@ -34,7 +34,7 @@ namespace Privacy_Please
ThoughtDef thoughtDef = null; // SexInteractionUtility.GetThoughtsAboutSexAct(other, __instance, out Precept precept);
// Find candidates to invite
if (other != null && thoughtDef?.hediff == null && SexInteractionUtility.PasserbyCanBePropositionedForSex(other, pawn.GetAllSexParticipants()))
if (other != null && thoughtDef?.hediff == null && SexInteractionUtility.CouldInvitePasserbyForSex(other, pawn.GetAllSexParticipants()))
{
DebugMode.Message(other.NameShortColored + " is a potential candidate");
candidates.Add(other);
@ -64,8 +64,29 @@ namespace Privacy_Please
{
if (pawn.IsHashIntervalTick(90))
{
if (pawn.IsMasturbating() || pawn.IsHavingSex())
{ PrivacyUtility.PrivacyCheckForPawn(pawn, 8f); }
if (pawn.IsMasturbating() && PrivacyUtility.PawnHasPrivacy(pawn, 8f) == false)
{ pawn.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
else if (pawn.IsHavingSex())
{
bool havePrivacy = true;
List<Pawn> participants = pawn.GetAllSexParticipants();
foreach (Pawn participant in participants)
{
if (PrivacyUtility.PawnHasPrivacy(participant, 8f) == false)
{ havePrivacy = false; }
}
if (__instance.Sexprops != null && (__instance.Sexprops.isRape || __instance.Sexprops.isWhoring))
{ return; }
if (havePrivacy == false)
{
foreach (Pawn participant in participants)
{ participant.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
}
}
}
}
}