mirror of
https://gitgud.io/AbstractConcept/privacy-please.git
synced 2024-08-15 00:03:18 +00:00
v 1.0.0
This commit is contained in:
parent
2256f28cf8
commit
12b947317e
52 changed files with 444 additions and 689 deletions
|
@ -25,6 +25,9 @@ namespace Privacy_Please
|
|||
Quirk cuckold = new Quirk("Cuckold", "CuckoldQuirk");
|
||||
Quirk.All.AddDistinct(cuckold);
|
||||
|
||||
Quirk cuckolder = new Quirk("Cuckolder", "CuckolderQuirk");
|
||||
Quirk.All.AddDistinct(cuckolder);
|
||||
|
||||
DebugMode.Message("Added RJW quirks");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,9 +31,11 @@ namespace Privacy_Please
|
|||
foreach (Thing thing in GenRadial.RadialDistinctThingsAround(pawn.Position, pawn.Map, radius, true))
|
||||
{
|
||||
Pawn other = thing as Pawn;
|
||||
if (other == null) continue;
|
||||
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);
|
||||
|
||||
// Find candidates to invite
|
||||
if ((int)reactionOfOther >= (int)ReactionToSexDiscovery.Acceptance && SexInteractionUtility.PasserbyCanBePropositionedForSex(other, pawn.GetAllSexParticipants()))
|
||||
|
@ -50,6 +52,7 @@ namespace Privacy_Please
|
|||
pawn.GetSexInitiator().IsInBed(out Building bed);
|
||||
|
||||
DebugMode.Message(invitedPawn.NameShortColored + " was invited to join in sex");
|
||||
pawn.interactions.TryInteractWith(invitedPawn, ModInteractionDefOf.InviteToHaveGroupSex);
|
||||
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("JoinInSex", false), pawn.GetSexPartner(), bed);
|
||||
invitedPawn.jobs.TryTakeOrderedJob(job);
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestHairOrFaceUncovered), "HasUncoveredGroinChestHairOrFace")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestHairOrFaceUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
bool faceCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Eyes));
|
||||
bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
|
||||
|
||||
__result = !(groinCovered && chestCovered && faceCovered && hairCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestOrHairUncovered), "HasUncoveredGroinChestOrHair")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestOrHairUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
|
||||
|
||||
__result = !(groinCovered && chestCovered && hairCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinOrChestUncovered), "HasUncoveredGroinOrChest")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_HasUncoveredGroinOrChest
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
|
||||
__result = !(groinCovered && chestCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinUncovered), "HasUncoveredGroin")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
|
||||
__result = !groinCovered;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue