diff --git a/1.4/Assemblies/Privacy-Please.dll b/1.4/Assemblies/Privacy-Please.dll
index 263b6bc..8616b86 100644
Binary files a/1.4/Assemblies/Privacy-Please.dll and b/1.4/Assemblies/Privacy-Please.dll differ
diff --git a/1.4/Assemblies/Privacy-Please.pdb b/1.4/Assemblies/Privacy-Please.pdb
index 88cfb36..be0740f 100644
Binary files a/1.4/Assemblies/Privacy-Please.pdb and b/1.4/Assemblies/Privacy-Please.pdb differ
diff --git a/Defs/PreceptDefs/PreceptDef_Exhibitionism.xml b/Defs/PreceptDefs/PreceptDef_Exhibitionism.xml
index 35cedca..fb35db0 100644
--- a/Defs/PreceptDefs/PreceptDef_Exhibitionism.xml
+++ b/Defs/PreceptDefs/PreceptDef_Exhibitionism.xml
@@ -23,7 +23,7 @@
Exhibitionism_Acceptable
Exhibitionism
acceptable
- Sex infront of others is normal and deserves no special attention.
+ Having sex out in the open is normal and deserves no special attention.
Low
20
1000
@@ -34,7 +34,7 @@
Exhibitionism_Approved
Exhibitionism
approved
- Physical intimacy is to be celebrated.
+ Displays of physical intimacy are to be celebrated.
Medium
10
1000
diff --git a/Defs/PreceptDefs/PreceptDef_Infidelity.xml b/Defs/PreceptDefs/PreceptDef_Infidelity.xml
index 187241f..731d949 100644
--- a/Defs/PreceptDefs/PreceptDef_Infidelity.xml
+++ b/Defs/PreceptDefs/PreceptDef_Infidelity.xml
@@ -12,7 +12,7 @@
Infidelity_Heartbreaking
Infidelity
heartbreaking
- test
+ Infidelity is a betrayal that will not soon be forgiven or forgotten.
Low
30
1000
@@ -23,7 +23,7 @@
Infidelity_Disapproved
Infidelity
disapproved
- test
+ Cheating on a partner is considered disrespectful.
Low
20
1000
@@ -34,7 +34,7 @@
Infidelity_Acceptable
Infidelity
acceptable
- test
+ Physical intimacy is something that should be explored freely with others.
Low
10
1000
diff --git a/Defs/PreceptDefs/PreceptDef_MasturbationExtension.xml b/Defs/PreceptDefs/PreceptDef_MasturbationExtension.xml
new file mode 100644
index 0000000..95108e8
--- /dev/null
+++ b/Defs/PreceptDefs/PreceptDef_MasturbationExtension.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ Masturbation_Acceptable
+ Masturbation
+ acceptable
+ Masturbation is a normal, healthy activity.
+ Low
+ 10
+ 1000
+ 100
+
+
+
\ No newline at end of file
diff --git a/Defs/SexActReactionDefs.xml b/Defs/SexActReactionDefs.xml
index 69d2962..23fd8fd 100644
--- a/Defs/SexActReactionDefs.xml
+++ b/Defs/SexActReactionDefs.xml
@@ -1,57 +1,126 @@
-
- reactionToExhibitionism
- Exhibitionism
- SexActIsExhibitionism
-
- SawExhibitionism_Disapproved
-
- SawExhibitionism_Disapproved
- SawExhibitionism_Acceptable
- SawExhibitionism_Approved
-
+
+
+ reactionToNecrophilia
+ Necrophilia
+ SexActIsNecrophilia
+
+ PartookInNecrophilia_Disapproved
- Voyeur
- SawExhibitionism_Approved
+
+ Necrophiliac
+
+ PartookInNecrophilia_Honorable
-
+
+
+ SawNecrophilia_Abhorrent
+
+ SawNecrophilia_Abhorrent
+ SawNecrophilia_Horrible
+ SawNecrophilia_Disapproved
+ SawNecrophilia_Acceptable
+ SawNecrophilia_Honorable
+
+
+
+
+ Necrophiliac
+
+ SawNecrophilia_Honorable
+
+
+
-
- reactionToMasturbation
- Masturbation
- SexActIsMasturbation
-
- SawMasturbation_Disapproved
-
- SawMasturbation_Abhorrent
- SawMasturbation_Disapproved
- SawMasturbation_Acceptable
-
+
+ reactionToBestiality
+ Bestiality
+ SexActIsBestiality
+
+ PartookInBestiality_Disapproved
- Voyeur
- SawMasturbation_Approved
+
+ Zoophile
+
+ PartookInBestiality_Honorable
-
+
+
+ SawBestiality_Abhorrent
+
+ SawBestiality_Abhorrent
+ SawBestiality_Horrible
+ SawBestiality_Disapproved
+ SawBestiality_Acceptable
+ SawBestiality_Honorable
+
+
+
+
+ Zoophile
+
+ SawBestiality_Honorable
+
+
+
+
+
+
+ reactionToRape
+ Rape
+ SexActIsRape
+
+ PartookInRape_Disapproved
+
+
+
+ Rapist
+
+ PartookInRape_Honorable
+
+
+
+
+ SawRape_Abhorrent
+
+ SawRape_Abhorrent
+ SawRape_Horrible
+ SawRape_Disapproved
+ SawRape_Acceptable
+ SawRape_Honorable
+
+
+
+
+ Rapist
+
+ SawRape_Honorable
+
+
+
reactionToInfidelity
Infidelity
SexActIsInfidelity
+
+ PartookInInfidelity_Disapproved
+
SawInfidelity_Heartbreaking
-
+
SawInfidelity_Heartbreaking
SawInfidelity_Disapproved
SawInfidelity_Acceptable
-
+
Cuckold
@@ -65,15 +134,32 @@
reactionToXenophilia
HAR_AlienDating
SexActIsRape
+
+ PartookInHAR_AlienDating_Acceptable
+
+
+
+ 1
+
+ PartookInHAR_AlienDating_Prohibited
+
+
+
+ -1
+
+ PartookInHAR_AlienDating_Know_Honorable
+
+
+
SawHAR_AlienDating_Acceptable
-
+
SawHAR_AlienDating_Prohibited
SawHAR_AlienDating_Horrible
SawHAR_AlienDating_Acceptable
SawHAR_AlienDating_Preferred
SawHAR_AlienDating_Know_Honorable
-
+
@@ -90,77 +176,81 @@
-
-
- reactionToBestiality
- Bestiality
- SexActIsBestiality
-
- SawBestiality_Abhorrent
-
- SawBestiality_Abhorrent
- SawBestiality_Horrible
- SawBestiality_Disapproved
- SawBestiality_Acceptable
- SawBestiality_Honorable
-
+
+
+ reactionToMasturbation
+ Masturbation
+ SexActIsMasturbation
+
+ PartookInMasturbation_Disapproved
+
+ PartookInMasturbation_Abhorrent
+ PartookInMasturbation_Disapproved
+ PartookInMasturbation_Acceptable
+
-
- Zoophile
-
- SawBestiality_Honorable
+ Exhibitionism_Approved
+ PartookInMasturbation_Exhibitionism_Approved
+
+
+ Exhibitionism_Acceptable
+ PartookInMasturbation_Exhibitionism_Acceptable
+
+
+ Exhibitionist
+ PartookInMasturbation_Approved
-
-
-
-
- reactionToNecrophilia
- Necrophilia
- SexActIsNecrophilia
+
- SawNecrophilia_Abhorrent
-
- SawNecrophilia_Abhorrent
- SawNecrophilia_Horrible
- SawNecrophilia_Disapproved
- SawNecrophilia_Acceptable
- SawNecrophilia_Honorable
-
+ SawMasturbation_Disapproved
+
+ SawMasturbation_Abhorrent
+ SawMasturbation_Disapproved
+ SawMasturbation_Acceptable
+
-
- Necrophiliac
-
- SawNecrophilia_Honorable
+ Voyeur
+ SawMasturbation_Approved
-
+
-
- reactionToRape
- Rape
- SexActIsRape
-
- SawRape_Abhorrent
-
- SawRape_Abhorrent
- SawRape_Horrible
- SawRape_Disapproved
- SawRape_Acceptable
- SawRape_Honorable
-
+
+ reactionToExhibitionism
+ Exhibitionism
+ SexActIsExhibitionism
+
+ PartookInExhibitionism_Disapproved
+
+ PartookInExhibitionism_Disapproved
+ PartookInExhibitionism_Acceptable
+ PartookInExhibitionism_Approved
+
-
- Rapist
-
- SawRape_Honorable
+ Exhibitionist
+ PartookInExhibitionism_Approved
-
+
+
+ SawExhibitionism_Disapproved
+
+ SawExhibitionism_Disapproved
+ SawExhibitionism_Acceptable
+ SawExhibitionism_Approved
+
+
+
+ Voyeur
+ SawExhibitionism_Approved
+
+
+
-
+
\ No newline at end of file
diff --git a/Defs/ThoughtDefs/ThoughtDefs.xml b/Defs/ThoughtDefs/ThoughtDefs.xml
index 0ce7311..210b581 100644
--- a/Defs/ThoughtDefs/ThoughtDefs.xml
+++ b/Defs/ThoughtDefs/ThoughtDefs.xml
@@ -2,138 +2,9 @@
-
- SeenMasturbating
- Thought_Memory
- 1.0
- 3
- 0.5
-
-
- was caught masturbatin'
- I'm so embarrassed!
- -12
-
-
-
- Exhibitionism_Acceptable
- Exhibitionism_Approved
-
-
-
-
- SeenHavingSex
- Thought_Memory
- 1.0
- 3
- 0.5
-
-
- was caught lovin'
- Well, that was awkward!
- -8
-
-
-
- Exhibitionism_Acceptable
- Exhibitionism_Approved
-
-
-
- SeenMasturbatingExhibitionist
- Thought_Memory
- 1.0
- 1
-
-
- exhibitionist caught masturbatin'
- It's OK, come and have a closer look...
- 4
-
-
-
-
- SeenHavingSexExhibitionist
- Thought_Memory
- 1.0
- 1
-
-
- exhibitionist caught lovin'
- Heheh, hope they enjoyed the show!
- 6
-
-
-
-
-
- SawMasturbation
- Thought_Memory
- 1.0
- 1
- 0.5
-
-
- saw someone masturbatin'
- Argh! I'm so sorry!
- -6
-
-
-
- Exhibitionism_Acceptable
- Exhibitionism_Approved
-
-
-
- SawSex
- Thought_Memory
- 1.0
- 1
- 0.5
-
-
- saw someone lovin'
- Jeez! Get a room!
- -4
-
-
-
- Exhibitionism_Acceptable
- Exhibitionism_Approved
-
-
-
-
- SawMasturbationVoyeur
- Thought_Memory
- 1.0
- 1
-
-
- voyeur saw some masturbatin'
- I think that awoke something in me...
- 4
-
-
-
-
-
- SawSexVoyeur
- Thought_Memory
- 1.0
- 1
-
-
- voyeur saw some lovin'
- Damn. So hot!
- 6
-
-
-
-
CaughtCheating
Thought_Memory
@@ -149,64 +20,6 @@
-
- SeenCommittingTaboo
- Thought_Memory
- 2.0
- 1
- 0.5
-
-
- caught committing a taboo
- I'm so ashamed.
- -15
-
-
-
-
- SeenCommittingMajorTaboo
- Thought_Memory
- 3.0
- 1
- 0.5
-
-
- caught committing a major taboo
- How can I face the world after this?
- -20
-
-
-
-
-
- SawTaboo
- Thought_Memory
- 2.0
- 1
- 0.5
-
-
- witnessed a taboo
- What vile degeneracy!
- -10
-
-
-
-
-
- SawMajorTaboo
- Thought_Memory
- 3.0
- 1
- 0.5
-
-
- witnessed a major taboo
- Disgusting vermin! You'll get yours!
- -15
-
-
-
diff --git a/Defs/ThoughtDefs/ThoughtDefsBeastiality.xml b/Defs/ThoughtDefs/ThoughtDefsBeastiality.xml
index 8195103..ba5497e 100644
--- a/Defs/ThoughtDefs/ThoughtDefsBeastiality.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsBeastiality.xml
@@ -17,7 +17,7 @@
Zoophile
- Outrage
+ Outrage
@@ -35,7 +35,7 @@
Zoophile
- Discomfort
+ Discomfort
@@ -53,7 +53,7 @@
Zoophile
- Discomfort
+ Discomfort
@@ -71,7 +71,7 @@
Zoophile
- Acceptance
+ Acceptance
@@ -86,7 +86,7 @@
+2
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsExhibitionism.xml b/Defs/ThoughtDefs/ThoughtDefsExhibitionism.xml
index b222d05..104dff3 100644
--- a/Defs/ThoughtDefs/ThoughtDefsExhibitionism.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsExhibitionism.xml
@@ -1,7 +1,56 @@
+
+
+ PartookInExhibitionism_Disapproved
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ caught lovin'
+ That was soooo awkward!
+ -8
+
+
+ Discomfort
+
+
+ PartookInExhibitionism_Acceptable
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ caught lovin'
+ Eh, it's no big deal.
+ 0
+
+
+ Acceptance
+
+
+
+ PartookInExhibitionism_Approved
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ exhibitionist caught lovin'
+ Mmm, enjoying the show?
+ 6
+
+
+ Approval
+
+
+
SawExhibitionism_Disapproved
Thought_Memory
@@ -11,11 +60,11 @@
walked in on some lovin'
- test
+ Jeez! Get a room!
-4
- Discomfort
+ Discomfort
@@ -27,11 +76,11 @@
passed by some lovin'
- test
+ Don't mind me, just passing through.
0
- Acceptance
+ Acceptance
@@ -43,11 +92,11 @@
observed some lovin'
- test
- 2
+ Damn, that's hot!
+ 3
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsInfidelity.xml b/Defs/ThoughtDefs/ThoughtDefsInfidelity.xml
index 4f93c76..bdb33d7 100644
--- a/Defs/ThoughtDefs/ThoughtDefsInfidelity.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsInfidelity.xml
@@ -2,42 +2,96 @@
+
+
+ PartookInInfidelity_Heartbreaking
+ 3
+ 3
+ 1
+
+
+ Caught cheating
+ {1}, I'm so sorry. Please, forgive me...
+ -20
+
+
+ Discomfort
+
+
+
+ PartookInInfidelity_Disapproved
+ 3
+ 3
+ 1
+
+
+ Caught cheating
+ Sorry, {1}. Please don't be too mad?
+ -10
+
+
+ Discomfort
+
+
+
+ PartookInInfidelity_Acceptable
+ 3
+ 3
+ 1
+
+
+ Caught cheating
+
+ Oh hey babe, you wanna join us?
+
+
+ Acceptance
+
+
+
+ PartookInInfidelity_Approved
+ 3
+ 3
+ 1
+
+
+ Cluckold
+
+
+
+
+ Approval
+
+
+
SawInfidelity_Heartbreaking
3
3
- Indignant
1
- horrified by xenophilia
+
Filthy degenerates!
- -15
+ -20
-
- -1
-
- Outrage
+ Outrage
SawInfidelity_Disapproved
3
3
- Disquiet
1
- disturbed by xenophilia
- Oh! That's not right...
+
+
-10
-
- -1
-
- Discomfort
+ Discomfort
@@ -47,15 +101,12 @@
1
- saw xenophilia
- Oops, sorry about walking in on you!
- -4
+
+
+ -5
-
- 1
-
- Acceptance
+ Acceptance
@@ -65,15 +116,12 @@
1
- noticed xenophilia
- I wonder what their kids would look like?
- +1
+
+
+
-
- 1
-
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsMasturbation.xml b/Defs/ThoughtDefs/ThoughtDefsMasturbation.xml
index 8916705..f9d27e8 100644
--- a/Defs/ThoughtDefs/ThoughtDefsMasturbation.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsMasturbation.xml
@@ -2,68 +2,132 @@
+
+
+ PartookInMasturbation_Abhorrent
+ 3
+ 3
+ 1
+
+
+ caught masturbatin'
+ I'm disgusted with myself.
+ -15
+
+
+ Discomfort
+
+
+
+ PartookInMasturbation_Disapproved
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ caught masturbatin'
+ I feel nothing but shame.
+ -5
+
+
+ Discomfort
+
+
+
+ PartookInMasturbation_Acceptable
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ caught masturbatin'
+ That was a little humiliating.
+ -5
+
+
+ Acceptance
+
+
+
+ PartookInMasturbation_Approved
+ Thought_Memory
+ 1.0
+ 1
+ 0.5
+
+
+ exhibitionist caught masturbatin'
+ Come closer, that a good look!
+ -5
+
+
+ Approval
+
+
+
SawMasturbation_Abhorrent
3
3
- Indignant
1
disgusted by masturbatin'
- You'll go blind you know!
+ You'll go blind if up keep that up!
-15
- Outrage
+ Outrage
SawMasturbation_Disapproved
Thought_Memory
- 1.0
- 1
+ 3
+ 3
0.5
- saw someone masturbatin'
+ shocked by masturbatin'
Argh! I'm so sorry!
- -5
+ -10
- Discomfort
+ Discomfort
SawMasturbation_Acceptable
Thought_Memory
- 1.0
+ 1
1
0.5
saw someone masturbatin'
- Argh! I'm so sorry!
+ Well, that was embarrassing.
-5
- Acceptance
+ Acceptance
SawMasturbation_Approved
Thought_Memory
- 1.0
+ 1
1
0.5
- saw someone masturbatin'
- Argh! I'm so sorry!
- -5
+ voyeur saw masturbatin'
+ I think that awoke something in me...
+ 3
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsNecrophilia.xml b/Defs/ThoughtDefs/ThoughtDefsNecrophilia.xml
index a2ec228..33fcc74 100644
--- a/Defs/ThoughtDefs/ThoughtDefsNecrophilia.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsNecrophilia.xml
@@ -17,7 +17,7 @@
Necrophiliac
- Outrage
+ Outrage
@@ -35,7 +35,7 @@
Necrophiliac
- Discomfort
+ Discomfort
@@ -53,7 +53,7 @@
Necrophiliac
- Discomfort
+ Discomfort
@@ -71,7 +71,7 @@
Necrophiliac
- Acceptance
+ Acceptance
@@ -86,7 +86,7 @@
+2
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsRape.xml b/Defs/ThoughtDefs/ThoughtDefsRape.xml
index 8996411..9f48aff 100644
--- a/Defs/ThoughtDefs/ThoughtDefsRape.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsRape.xml
@@ -17,7 +17,7 @@
Rapist
- Outrage
+ Outrage
@@ -35,7 +35,7 @@
Rapist
- Discomfort
+ Discomfort
@@ -53,7 +53,7 @@
Rapist
- Discomfort
+ Discomfort
@@ -71,7 +71,7 @@
Rapist
- Acceptance
+ Acceptance
@@ -86,7 +86,7 @@
+2
- Approval
+ Approval
diff --git a/Defs/ThoughtDefs/ThoughtDefsXenophilia.xml b/Defs/ThoughtDefs/ThoughtDefsXenophilia.xml
index f5f8249..af0f890 100644
--- a/Defs/ThoughtDefs/ThoughtDefsXenophilia.xml
+++ b/Defs/ThoughtDefs/ThoughtDefsXenophilia.xml
@@ -18,7 +18,7 @@
-1
- Outrage
+ Outrage
@@ -37,7 +37,7 @@
-1
- Discomfort
+ Discomfort
@@ -55,7 +55,7 @@
1
- Acceptance
+ Acceptance
@@ -73,7 +73,7 @@
1
- Approval
+ Approval
@@ -91,7 +91,7 @@
1
- Approval
+ Approval
diff --git a/Source/.vs/SourceCode/v16/.suo b/Source/.vs/SourceCode/v16/.suo
index 2b885e7..c7b44e8 100644
Binary files a/Source/.vs/SourceCode/v16/.suo and b/Source/.vs/SourceCode/v16/.suo differ
diff --git a/Source/Scripts/Defs/SexActReactionDef.cs b/Source/Scripts/Defs/SexActReactionDef.cs
index 72e2eee..4993328 100644
--- a/Source/Scripts/Defs/SexActReactionDef.cs
+++ b/Source/Scripts/Defs/SexActReactionDef.cs
@@ -33,7 +33,7 @@ namespace Privacy_Please
public class SubSexActReactionDef
{
public SexActThoughtDef defaultThoughtDef;
- public List associatedThoughtDefs;
+ public List preceptThoughtDefs;
public List replacementThoughts;
}
@@ -41,21 +41,20 @@ namespace Privacy_Please
{
public List requiredTraits;
public string requiredQuirk;
+ public PreceptDef requiredPreceptDef;
public SexActThoughtDef replacementThoughtDef;
}
-
- public ReactionToSexAct DetermineReactionOfPawns(Pawn pawn, Pawn witness, bool applyThoughtDefs)
+
+ public void DetermineReactionOfPawns(Pawn pawn, Pawn witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, bool applyThoughtDefs)
{
- DetermineReactionOfPawn(pawn, witness, pawnReaction, applyThoughtDefs);
- ReactionToSexAct reactionToSexAct = DetermineReactionOfPawn(witness, pawn, witnessReaction, applyThoughtDefs);
-
- return reactionToSexAct;
+ reactionOfPawn = DetermineReaction(pawn, witness, pawnReaction, applyThoughtDefs);
+ reactionOfWitness = DetermineReaction(witness, pawn, witnessReaction, applyThoughtDefs);
}
- public ReactionToSexAct DetermineReactionOfPawn(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef)
+ public ReactionToSexDiscovery DetermineReaction(Pawn reactor, Pawn otherPawn, SubSexActReactionDef reaction, bool applyThoughtDef)
{
SexActThoughtDef thoughtDef = GetThoughtDefForReactor(reactor, reaction, out Precept precept);
- ReactionToSexAct reactionToSexAct = thoughtDef.reactionToSexAct;
+ ReactionToSexDiscovery reactionToSexAct = thoughtDef.reactionToSexDiscovery;
if (applyThoughtDef)
{ reactor.needs.mood.thoughts.memories.TryGainMemory(thoughtDef, otherPawn, precept); }
@@ -83,16 +82,22 @@ namespace Privacy_Please
if (replacementThought.requiredQuirk != null && xxx.has_quirk(reactor, replacementThought.requiredQuirk))
{ return replacementThought.replacementThoughtDef; }
+
+ if (replacementThought.requiredPreceptDef != null && reactor.ideo.Ideo.HasPrecept(replacementThought.requiredPreceptDef))
+ {
+ precept = reactor.ideo.Ideo.GetPrecept(replacementThought.requiredPreceptDef);
+ return replacementThought.replacementThoughtDef;
+ }
}
}
precept = reactor.GetPreceptForIssue(issueDef);
- if (precept != null && reaction.associatedThoughtDefs.NullOrEmpty() == false)
+ if (precept != null && reaction.preceptThoughtDefs.NullOrEmpty() == false)
{
string thoughtDefName = precept.def.defName;
- foreach (SexActThoughtDef associatedThoughtDef in reaction.associatedThoughtDefs)
+ foreach (SexActThoughtDef associatedThoughtDef in reaction.preceptThoughtDefs)
{
if (associatedThoughtDef.defName.Contains(thoughtDefName))
{ return associatedThoughtDef; }
diff --git a/Source/Scripts/Defs/SexActThoughtDef.cs b/Source/Scripts/Defs/SexActThoughtDef.cs
index 7777366..da08eaa 100644
--- a/Source/Scripts/Defs/SexActThoughtDef.cs
+++ b/Source/Scripts/Defs/SexActThoughtDef.cs
@@ -9,6 +9,6 @@ namespace Privacy_Please
{
public class SexActThoughtDef : ThoughtDef
{
- public ReactionToSexAct reactionToSexAct = ReactionToSexAct.Acceptance;
+ public ReactionToSexDiscovery reactionToSexDiscovery = ReactionToSexDiscovery.Acceptance;
}
}
diff --git a/Source/Scripts/Extensions/PawnExtension.cs b/Source/Scripts/Extensions/PawnExtension.cs
index 503f9b3..5e611ed 100644
--- a/Source/Scripts/Extensions/PawnExtension.cs
+++ b/Source/Scripts/Extensions/PawnExtension.cs
@@ -19,15 +19,9 @@ namespace Privacy_Please
return bed != null;
}
- public static bool IsSeated(this Pawn pawn, out Building seat)
- {
- seat = pawn.Position.GetThingList(pawn.Map).FirstOrDefault(x => x is Building && x.def.building.isSittable) as Building;
- return seat != null;
- }
-
public static bool IsHavingSex(this Pawn pawn)
{
- if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
+ if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false)
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
@@ -37,7 +31,7 @@ namespace Privacy_Please
public static bool IsMasturbating(this Pawn pawn)
{
- if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
+ if (pawn?.jobs?.curDriver == null || pawn.jobs.curDriver is JobDriver_Sex == false)
{ return false; }
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
@@ -47,12 +41,12 @@ namespace Privacy_Please
public static Pawn GetSexInitiator(this Pawn pawn)
{
- if (pawn?.jobs?.curDriver != null && pawn.Dead == false && pawn.jobs.curDriver is JobDriver_SexBaseInitiator)
+ if (pawn?.jobs?.curDriver != null && pawn.jobs.curDriver is JobDriver_SexBaseInitiator)
{ return pawn; }
JobDriver_SexBaseReciever jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseReciever;
- if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseInitiator)
+ if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseInitiator)
{ return jobDriver.Partner; }
return null;
@@ -65,7 +59,7 @@ namespace Privacy_Please
JobDriver_SexBaseInitiator jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseInitiator;
- if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
+ if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
{ return jobDriver.Partner; }
return null;
@@ -119,11 +113,6 @@ namespace Privacy_Please
return lovers.Any(x => x.otherPawn == other);
}
- //public static bool GetThoughtOnIssue(this Pawn pawn, string issueDefName, out Precept precept)
- //{
-
- //}
-
public static Precept GetPreceptForIssue(this Pawn pawn, IssueDef issueDef)
{
if (issueDef == null || pawn?.Ideo == null)
@@ -164,16 +153,27 @@ namespace Privacy_Please
public static bool IsUnfazedBySex(this Pawn pawn)
{
- if (pawn.Dead ||
- pawn.AnimalOrWildMan() ||
- pawn.RaceProps.IsMechanoid ||
- pawn.Awake() == false ||
- pawn.Suspended)
+ if (IsUnableToSenseSex(pawn))
+ { return true; }
+
+ if (pawn.AnimalOrWildMan() || pawn.RaceProps.IsMechanoid)
{ return true; }
if (BasicSettings.slavesIgnoreSex && (pawn.IsPrisoner || pawn.IsSlave)) return true;
if (BasicSettings.otherFactionsIgnoreSex && pawn.Faction.IsPlayer == false) return true;
if (pawn.Faction.HostileTo(Faction.OfPlayer)) return true;
+ if (pawn.Drafted == false && pawn.mindState?.duty?.def?.alwaysShowWeapon == true) return true;
+
+ return false;
+ }
+
+ public static bool IsUnableToSenseSex(this Pawn pawn)
+ {
+ if (pawn.Dead ||
+ pawn.Awake() == false ||
+ pawn.Suspended ||
+ pawn.MentalState != null)
+ { return true; }
return false;
}
diff --git a/Source/Scripts/Patches/HarmonyPatch_RJW.cs b/Source/Scripts/Patches/HarmonyPatch_RJW.cs
index 3d5912a..fac5146 100644
--- a/Source/Scripts/Patches/HarmonyPatch_RJW.cs
+++ b/Source/Scripts/Patches/HarmonyPatch_RJW.cs
@@ -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.CouldInvitePasserbyForSex(other, pawn.GetAllSexParticipants()))
+ if (other != null && thoughtDef?.hediff == null && SexInteractionUtility.PasserbyCanBePropositionedForSex(other, pawn.GetAllSexParticipants()))
{
DebugMode.Message(other.NameShortColored + " is a potential candidate");
candidates.Add(other);
@@ -64,29 +64,8 @@ namespace Privacy_Please
{
if (pawn.IsHashIntervalTick(90))
{
- if (pawn.IsMasturbating() && PrivacyUtility.PawnHasPrivacy(pawn, 8f) == false)
- { pawn.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
-
- else if (pawn.IsHavingSex())
- {
- bool havePrivacy = true;
- List 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); }
- }
- }
+ if (pawn.IsMasturbating() || pawn.IsHavingSex())
+ { PrivacyUtility.PrivacyCheckForPawn(pawn, 8f); }
}
}
}
diff --git a/Source/Scripts/Settings/BasicSettings.cs b/Source/Scripts/Settings/BasicSettings.cs
index 11f6532..b2a0a91 100644
--- a/Source/Scripts/Settings/BasicSettings.cs
+++ b/Source/Scripts/Settings/BasicSettings.cs
@@ -24,8 +24,8 @@ namespace Privacy_Please
public static bool majorTabooCanStartFights = false;
public static bool ignoreRitualAndPartySex = true;
public static bool slavesIgnoreSex = false;
- public static bool ignoreSlaveRape = false;
public static bool otherFactionsIgnoreSex = false;
+ public static bool whoringIsUninteruptable = true;
public static bool underwearSufficentForIdeos = true;
public static bool exposedUnderwearMood = true;
@@ -44,7 +44,6 @@ namespace Privacy_Please
Scribe_Values.Look(ref worryAboutXeno, "worryAboutXeno", true);
Scribe_Values.Look(ref worryAboutMasturbation, "worryAboutMasturbation", true);
Scribe_Values.Look(ref worryAboutIncest, "worryAboutIncest", true);
- Scribe_Values.Look(ref ignoreSlaveRape, "ignoreSlaveRape", false);
Scribe_Values.Look(ref majorTabooCanStartFights, "majorTabooCanStartFights", false);
Scribe_Values.Look(ref ignoreRitualAndPartySex, "ignoreRitualAndPartySex", false);
Scribe_Values.Look(ref slavesIgnoreSex, "slavesIgnoreSex", false);
@@ -99,10 +98,6 @@ namespace Privacy_Please
listingStandard.CheckboxLabeled("worry_about_infidelity".Translate(), ref BasicSettings.worryAboutInfidelity, "worry_about_infidelity_desc".Translate());
listingStandard.CheckboxLabeled("worry_about_beastiality".Translate(), ref BasicSettings.worryAboutBeastiality, "worry_about_beastiality_desc".Translate());
listingStandard.CheckboxLabeled("worry_about_rape".Translate(), ref BasicSettings.worryAboutRape, "worry_about_rape_desc".Translate());
-
- if (BasicSettings.worryAboutRape)
- { listingStandard.CheckboxLabeled("ignore_slave_rape".Translate(), ref BasicSettings.ignoreSlaveRape); }
-
listingStandard.CheckboxLabeled("worry_about_necro".Translate(), ref BasicSettings.worryAboutNecro, "worry_about_necro_desc".Translate());
listingStandard.CheckboxLabeled("worry_about_xeno".Translate(), ref BasicSettings.worryAboutXeno, "worry_about_xeno_desc".Translate());
diff --git a/Source/Scripts/Utilities/Enums.cs b/Source/Scripts/Utilities/Enums.cs
index dc7da1b..5014d47 100644
--- a/Source/Scripts/Utilities/Enums.cs
+++ b/Source/Scripts/Utilities/Enums.cs
@@ -1,10 +1,13 @@
namespace Privacy_Please
{
- public enum ReactionToSexAct
+ public enum ReactionToSexDiscovery
{
Approval = 1,
Acceptance = 0,
Discomfort = -1,
Outrage = -2,
+ Panick = -3,
+ Nauseated = -3,
+ Random = -99,
}
}
diff --git a/Source/Scripts/Utilities/PrivacyUtility.cs b/Source/Scripts/Utilities/PrivacyUtility.cs
index b8abc44..db9152b 100644
--- a/Source/Scripts/Utilities/PrivacyUtility.cs
+++ b/Source/Scripts/Utilities/PrivacyUtility.cs
@@ -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.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.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;
}
}
}
diff --git a/Source/Scripts/Utilities/SexInteractionUtility.cs b/Source/Scripts/Utilities/SexInteractionUtility.cs
index aca5842..ee31fa0 100644
--- a/Source/Scripts/Utilities/SexInteractionUtility.cs
+++ b/Source/Scripts/Utilities/SexInteractionUtility.cs
@@ -14,19 +14,13 @@ namespace Privacy_Please
{
public static bool PawnCaughtLovinByWitness(Pawn pawn, Pawn witness)
{
- return true;
-
- if (witness == null ||
- pawn == witness ||
- (pawn.IsMasturbating() == false && pawn.IsHavingSex() == false) ||
- witness.IsUnfazedBySex() == false ||
- witness.CanSee(pawn) == false)
+ if (witness == null || pawn == witness || witness.IsUnableToSenseSex() || witness.CanSee(pawn) == false)
{ return false; }
List sexParticipants = pawn.GetAllSexParticipants();
- bool witnessIsApproachingSexParticipant = 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).Partner);
- if (sexParticipants.Contains(witness) || witnessIsApproachingSexParticipant)
+ if (sexParticipants.Contains(witness) || witnessIsJoiningSex)
{ return false; }
return true;
@@ -62,41 +56,34 @@ namespace Privacy_Please
return false;
}
- public static bool CouldInvitePasserbyForSex(Pawn passerby, List participants)
+ public static bool PasserbyCanBePropositionedForSex(Pawn passerby, List participants)
{
if (passerby == null ||
- participants.Contains(passerby) ||
- passerby.IsUnfazedBySex() == false ||
- participants.All(x => x.CanSee(passerby) == false))
+ participants.Contains(passerby) ||
+ participants.Any(x => x.CanSee(passerby) == false))
{ return false; }
if (participants.Count > 2 ||
- participants.Any(x => x.IsForbidden(passerby) || x.HostileTo(passerby) || PawnIsCheatingOnPartner(x, passerby)) ||
+ participants.Any(x => x.IsForbidden(passerby) || x.HostileTo(passerby)) ||
CasualSex_Helper.CanHaveSex(passerby) == false ||
- xxx.IsTargetPawnOkay(passerby) == false)
- { return false; }
-
- if (passerby.MentalState != null ||
- passerby.jobs.curDriver is JobDriver_Flee ||
- passerby.jobs.curDriver is JobDriver_AttackMelee ||
- passerby.jobs.curDriver is JobDriver_Vomit)
+ xxx.IsTargetPawnOkay(passerby) == false)
{ return false; }
if (SexUtility.ReadyForHookup(passerby) &&
(passerby?.jobs?.curJob == null || (passerby.jobs.curJob.playerForced == false && CasualSex_Helper.quickieAllowedJobs.Contains(passerby.jobs.curJob.def))) &&
participants.Any(x => SexAppraiser.would_fuck(x, passerby) > 0.1f && SexAppraiser.would_fuck(passerby, x) > 0.1f) &&
participants.All(x => SexAppraiser.would_fuck(x, passerby, false, false, true) > 0.1f && SexAppraiser.would_fuck(passerby, x, false, false, true) > 0.1f))
- {
- return true;
- }
+ { return true; }
return false;
}
- public static ReactionToSexAct GetReactionToSexAct(Pawn witness, JobDriver_Sex jobDriver, bool applyThoughtDefs = false)
+ public static void GetReactionsToSexDiscovery(JobDriver_Sex jobDriver, Pawn witness, out ReactionToSexDiscovery reactionOfPawn, out ReactionToSexDiscovery reactionOfWitness, bool applyThoughtDefs = false)
{
Pawn pawn = jobDriver.pawn;
- ReactionToSexAct reactionOfWitness = ReactionToSexAct.Acceptance;
+
+ reactionOfPawn = ReactionToSexDiscovery.Acceptance;
+ reactionOfWitness = ReactionToSexDiscovery.Acceptance;
// Determine if there are any issues with the sex event and the witness' morals
foreach (SexActReactionDef sexActReactionDef in DefDatabase.AllDefs)
@@ -109,11 +96,9 @@ namespace Privacy_Please
if ((bool)methodInfo.Invoke(null, new object[] { jobDriver }))
{
DebugMode.Message(sexActReactionDef.defName);
- reactionOfWitness = sexActReactionDef.DetermineReactionOfPawns(pawn, witness, applyThoughtDefs);
+ sexActReactionDef.DetermineReactionOfPawns(pawn, witness, out reactionOfPawn, out reactionOfWitness, applyThoughtDefs);
}
}
-
- return reactionOfWitness;
}
public static bool SexActIsNecrophilia(JobDriver_Sex jobDriver)
diff --git a/Source/obj/Debug/Privacy-Please.dll b/Source/obj/Debug/Privacy-Please.dll
index 263b6bc..8616b86 100644
Binary files a/Source/obj/Debug/Privacy-Please.dll and b/Source/obj/Debug/Privacy-Please.dll differ
diff --git a/Source/obj/Debug/Privacy-Please.pdb b/Source/obj/Debug/Privacy-Please.pdb
index 88cfb36..be0740f 100644
Binary files a/Source/obj/Debug/Privacy-Please.pdb and b/Source/obj/Debug/Privacy-Please.pdb differ
diff --git a/Source/obj/Debug/SourceCode.csprojAssemblyReference.cache b/Source/obj/Debug/SourceCode.csprojAssemblyReference.cache
index 481df48..7ba9202 100644
Binary files a/Source/obj/Debug/SourceCode.csprojAssemblyReference.cache and b/Source/obj/Debug/SourceCode.csprojAssemblyReference.cache differ