Implemented basic exhibitionism precept
This commit is contained in:
parent
696b0a9f07
commit
bfdcac73ef
4 changed files with 89 additions and 6 deletions
66
Defs/PreceptDefs/Precepts_Exhibitionism.xml
Normal file
66
Defs/PreceptDefs/Precepts_Exhibitionism.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<!-- Issues -->
|
||||
<IssueDef>
|
||||
<defName>Exhibitionism</defName>
|
||||
<label>exhibitionism</label>
|
||||
<iconPath>UI/Issues/Exhibitionism</iconPath>
|
||||
</IssueDef>
|
||||
|
||||
<!-- Precepts -->
|
||||
<PreceptDef>
|
||||
<defName>Exhibitionism_Disapproved</defName>
|
||||
<issue>Exhibitionism</issue>
|
||||
<label>disapproved</label>
|
||||
<description>Pawns will care about others performing sexual acts before them and will feel embarassed.</description>
|
||||
<impact>Low</impact>
|
||||
<displayOrderInIssue>50</displayOrderInIssue>
|
||||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>100</defaultSelectionWeight>
|
||||
</PreceptDef>
|
||||
|
||||
<PreceptDef>
|
||||
<defName>Exhibitionism_Forbidden</defName>
|
||||
<issue>Exhibitionism</issue>
|
||||
<label>forbidden</label>
|
||||
<description>The display of physical affections in front of others is a major taboo.</description>
|
||||
<impact>High</impact>
|
||||
<displayOrderInIssue>40</displayOrderInIssue>
|
||||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>100</defaultSelectionWeight>
|
||||
</PreceptDef>
|
||||
|
||||
<PreceptDef>
|
||||
<defName>Exhibitionism_Acceptable</defName>
|
||||
<issue>Exhibitionism</issue>
|
||||
<label>acceptable</label>
|
||||
<description>Pawns will not care about others performing sexual acts before them.</description>
|
||||
<impact>Low</impact>
|
||||
<displayOrderInIssue>30</displayOrderInIssue>
|
||||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>100</defaultSelectionWeight>
|
||||
</PreceptDef>
|
||||
|
||||
<PreceptDef>
|
||||
<defName>Exhibitionism_Approved</defName>
|
||||
<issue>Exhibitionism</issue>
|
||||
<label>approved</label>
|
||||
<description>The display of physical affection before others is encouraged.</description>
|
||||
<impact>Medium</impact>
|
||||
<displayOrderInIssue>20</displayOrderInIssue>
|
||||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>100</defaultSelectionWeight>
|
||||
</PreceptDef>
|
||||
<!--
|
||||
<PreceptDef>
|
||||
<defName>Exhibitionism_Required</defName>
|
||||
<issue>Exhibitionism</issue>
|
||||
<label>required</label>
|
||||
<description>The display of physical affection before others is required.</description>
|
||||
<impact>High</impact>
|
||||
<displayOrderInIssue>10</displayOrderInIssue>
|
||||
<displayOrderInImpact>1000</displayOrderInImpact>
|
||||
<defaultSelectionWeight>100</defaultSelectionWeight>
|
||||
</PreceptDef>
|
||||
-->
|
||||
</Defs>
|
|
@ -129,7 +129,14 @@ namespace Rimworld_Animations_Patch
|
|||
{ return true; }
|
||||
|
||||
bool hasPrivacy = true;
|
||||
bool isExhibitionist = pawn.HasTrait("Exhibitionist") || xxx.has_quirk(pawn, "Exhibitionist");
|
||||
bool isExhibitionismAllowedByPrecept = false;
|
||||
|
||||
Precept precept = new Precept();
|
||||
if (HasPreceptForIssue(pawn, DefDatabase<IssueDef>.GetNamedSilentFail("Exhibitionism"), out precept)) {
|
||||
isExhibitionismAllowedByPrecept = !IssueIsMajorTaboo(pawn, DefDatabase<IssueDef>.GetNamedSilentFail("Exhibitionism"), out precept) && !IssueIsMinorTaboo(pawn, DefDatabase<IssueDef>.GetNamedSilentFail("Exhibitionism"), out precept);
|
||||
}
|
||||
|
||||
bool isExhibitionist = pawn.HasTrait("Exhibitionist") || xxx.has_quirk(pawn, "Exhibitionist") || isExhibitionismAllowedByPrecept;
|
||||
|
||||
pawn.IsInBed(out Building bed);
|
||||
|
||||
|
|
|
@ -91,7 +91,10 @@ namespace Rimworld_Animations_Patch
|
|||
|
||||
else if (BasicSettings.worryAboutXeno && sexIsXeno)
|
||||
{ tabooStatus = GetTabooStatusOfIssue(pawn, DefDatabase<IssueDef>.GetNamedSilentFail("HAR_AlienDating"), TabooStatus.NotTaboo, out precept); }
|
||||
|
||||
|
||||
else
|
||||
{ tabooStatus = GetTabooStatusOfIssue(pawn, DefDatabase<IssueDef>.GetNamedSilentFail("Exhibitionism"), TabooStatus.NotTaboo, out precept); }
|
||||
|
||||
//DebugMode.Message("Sex job is: " + jobDriver + " Issue is: " + (precept?.def?.issue?.defName).ToStringSafe() + " Opinion is: " + (precept?.def?.defName).ToStringSafe() + " Judgement is: " + tabooStatus.ToString());
|
||||
|
||||
return tabooStatus;
|
||||
|
@ -120,15 +123,18 @@ namespace Rimworld_Animations_Patch
|
|||
|
||||
JobDriver_Sex jobDriver = pawn.jobs.curDriver as JobDriver_Sex;
|
||||
|
||||
bool pawnExhibitionismAllowedByPrecept = pawn.Ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamedSilentFail("Exhibitionism_Approved"));
|
||||
bool witnessVoyeurismAllowedByPrecept = witness.Ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamedSilentFail("Exhibitionism_Approved"));
|
||||
|
||||
string pawnThoughtDefName = pawn.IsMasturbating() ? "SeenMasturbating" : "SeenHavingSex";
|
||||
string witnessThoughtDefName = pawn.IsMasturbating() ? "SawMasturbation" : "SawSex";
|
||||
|
||||
bool pawnIsExhibitionist = pawn.HasTrait("Exhibitionist") || xxx.has_quirk(pawn, "Exhibitionist");
|
||||
if (pawnIsExhibitionist)
|
||||
if (pawnIsExhibitionist || pawnExhibitionismAllowedByPrecept)
|
||||
{ pawnThoughtDefName += "Exhibitionist"; }
|
||||
|
||||
bool witnessIsVoyeur = witness.HasTrait("Voyeur") || xxx.has_quirk(witness, "Voyeur");
|
||||
if (witnessIsVoyeur)
|
||||
if (witnessIsVoyeur || witnessVoyeurismAllowedByPrecept)
|
||||
{ witnessThoughtDefName += "Voyeur"; }
|
||||
|
||||
bool sexIsRitual = pawn.GetLord() != null && pawn.GetLord().LordJob is LordJob_Ritual && witness?.Ideo == pawn?.Ideo;
|
||||
|
@ -140,6 +146,8 @@ namespace Rimworld_Animations_Patch
|
|||
// Determine if there are any issues with the witness' morals
|
||||
TabooStatus tabooStatus = CheckSexJobAgainstMorals(witness, jobDriver, out Precept precept);
|
||||
|
||||
bool witnessNoSpecialReaction = witness.Ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamedSilentFail("Exhibitionism_Acceptable")) && !witnessIsVoyeur;
|
||||
|
||||
if (tabooStatus == TabooStatus.MajorTaboo)
|
||||
{ witnessThoughtDefName = "SawMajorTaboo"; witnessJoiningSex = false; }
|
||||
|
||||
|
@ -149,7 +157,7 @@ namespace Rimworld_Animations_Patch
|
|||
else if (pawnIsCheating)
|
||||
{ witnessThoughtDefName = "CheatedOnMe"; witnessJoiningSex = false; }
|
||||
|
||||
else if (BasicSettings.needPrivacy == false)
|
||||
else if (BasicSettings.needPrivacy == false || witnessNoSpecialReaction)
|
||||
{ witnessThoughtDefName = ""; }
|
||||
|
||||
// Apply thoughts to witness
|
||||
|
@ -212,6 +220,8 @@ namespace Rimworld_Animations_Patch
|
|||
// Check issue against pawn precepts
|
||||
tabooStatus = CheckSexJobAgainstMorals(pawn, jobDriver, out precept);
|
||||
|
||||
bool pawnNoSpecialReaction = pawn.Ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamedSilentFail("Exhibitionism_Acceptable")) && !pawnIsExhibitionist;
|
||||
|
||||
if (tabooStatus == TabooStatus.MajorTaboo)
|
||||
{ pawnThoughtDefName = "SeenCommittingMajorTaboo"; witnessJoiningSex = false; }
|
||||
|
||||
|
@ -221,7 +231,7 @@ namespace Rimworld_Animations_Patch
|
|||
else if (pawnIsCheating)
|
||||
{ pawnThoughtDefName = "CaughtCheating"; witnessJoiningSex = false; }
|
||||
|
||||
else if (BasicSettings.needPrivacy == false)
|
||||
else if (BasicSettings.needPrivacy == false || pawnNoSpecialReaction)
|
||||
{ pawnThoughtDefName = ""; }
|
||||
|
||||
// Apply thoughts to pawn
|
||||
|
|
BIN
Textures/UI/Issues/Exhibitionism.png
Normal file
BIN
Textures/UI/Issues/Exhibitionism.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Loading…
Reference in a new issue