mirror of
https://gitgud.io/AbstractConcept/privacy-please.git
synced 2024-08-15 00:03:18 +00:00
Bug fixes
- Animation keys should be better synced with the animation (fewer instance of missing keys) - Copied keyframes and cloned stages should no longer be linked to each other -If you delete the first keyframe in a clip, instead of denying you, it will reset the associated actor it to its default starting position - You can now move keyframes over the first one in a clip and override it. If less than two keys remain, new keys will be generated to a minimum of a two - Fixed error when cycling through actor body parts
This commit is contained in:
parent
03e634e56c
commit
a6a550af53
26 changed files with 519 additions and 469 deletions
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
@ -13,18 +13,16 @@ namespace Privacy_Please
|
|||
{
|
||||
public static class PrivacyUtility
|
||||
{
|
||||
public static bool PawnHasPrivacy(Pawn pawn, float radius)
|
||||
public static void PrivacyCheckForPawn(Pawn pawn, float radius)
|
||||
{
|
||||
//if (pawn.IsUnfazedBySex())
|
||||
//{ return true; }
|
||||
|
||||
if (pawn.IsHavingSex() == false && pawn.IsMasturbating() == false)
|
||||
{ return true; }
|
||||
{ return; }
|
||||
|
||||
//if (pawn.GetLord() != null && (pawn.GetLord().LordJob is LordJob_Ritual || pawn.GetLord().LordJob is LordJob_Joinable_Party) && BasicSettings.ignoreRitualAndPartySex)
|
||||
//{ return true; }
|
||||
if (BasicSettings.ignoreRitualAndPartySex && pawn.IsPartOfRitualOrGathering())
|
||||
{ return; }
|
||||
|
||||
bool hasPrivacy = true;
|
||||
// Local variables
|
||||
JobDriver_Sex jobDriver = pawn.jobs.curDriver as JobDriver_Sex;
|
||||
pawn.IsInBed(out Building bed);
|
||||
|
||||
foreach (Thing thing in GenRadial.RadialDistinctThingsAround(pawn.Position, pawn.Map, radius, true))
|
||||
|
@ -35,18 +33,21 @@ namespace Privacy_Please
|
|||
// Caught having sex
|
||||
if (SexInteractionUtility.PawnCaughtLovinByWitness(pawn, witness))
|
||||
{
|
||||
// Try to invite intruder to join in
|
||||
if (SexInteractionUtility.GetReactionToSexAct(witness, pawn.jobs.curDriver as JobDriver_Sex) >= (int)ReactionToSexAct.Acceptance)
|
||||
{
|
||||
// TODO roll for sex
|
||||
// Get the pawn's and witness' reaction to the discovery
|
||||
SexInteractionUtility.GetReactionsToSexDiscovery(jobDriver, witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, true);
|
||||
bool tryToPropositionTheWitness = Random.value < BasicSettings.chanceForOtherToJoinInSex && SexInteractionUtility.PasserbyCanBePropositionedForSex(witness, pawn.GetAllSexParticipants());
|
||||
|
||||
if (CasualSex_Helper.CanHaveSex(witness) && xxx.IsTargetPawnOkay(witness) &&
|
||||
(xxx.has_quirk(witness, "Voyeur") || (xxx.has_quirk(witness, "Cuckold") && SexInteractionUtility.SexParticipantsIncludesACheatingPartner(witness, pawn.GetAllSexParticipants()))))
|
||||
// Try to proposition the witness
|
||||
if ((int)reactionOfPawn >= (int)ReactionToSexDiscovery.Acceptance && (int)reactionOfWitness >= (int)ReactionToSexDiscovery.Acceptance && tryToPropositionTheWitness)
|
||||
{
|
||||
// Voyeurism
|
||||
if (pawn.IsVoyeur() || (pawn.IsCuckold() && SexInteractionUtility.SexParticipantsIncludesACheatingPartner(witness, pawn.GetAllSexParticipants())))
|
||||
{
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("WatchSex", false), pawn.GetSexReceiver(), bed);
|
||||
witness.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
|
||||
// Consensual sex
|
||||
else if (pawn.IsMasturbating())
|
||||
{
|
||||
if (bed == null)
|
||||
|
@ -62,6 +63,7 @@ namespace Privacy_Please
|
|||
}
|
||||
}
|
||||
|
||||
// Threesome
|
||||
else if (pawn.GetSexReceiver() != null)
|
||||
{
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("JoinInSex", false), pawn.GetSexReceiver(), bed);
|
||||
|
@ -69,16 +71,18 @@ namespace Privacy_Please
|
|||
}
|
||||
}
|
||||
|
||||
else
|
||||
{ hasPrivacy = false; }
|
||||
// The proposition failed. Awwkkkwaaarrddd....
|
||||
else if (pawn.IsUnfazedBySex() == false && (int)reactionOfPawn < (int)ReactionToSexDiscovery.Approval)
|
||||
{
|
||||
if (BasicSettings.whoringIsUninteruptable && jobDriver?.Sexprops.isWhoring == true)
|
||||
{ return; }
|
||||
|
||||
// The pawn is uncomfortable and is stopping sex
|
||||
foreach (Pawn participant in pawn.GetAllSexParticipants())
|
||||
{ participant.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return BasicSettings.needPrivacy == false ||
|
||||
hasPrivacy ||
|
||||
xxx.has_quirk(pawn, "Exhibitionist") ||
|
||||
pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Acceptable) == true ||
|
||||
pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Approved) == true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue