Extremely basic masturbation precepts

This commit is contained in:
amevarashi 2022-07-16 21:14:06 +05:00
parent 9613dd2aba
commit b2e368bbe6
4 changed files with 71 additions and 2 deletions

View File

@ -62,8 +62,15 @@ namespace RJWSexperience.Ideology.Patches
{
public static void Postfix(Pawn p, ref float __result)
{
if (__result > 0f && p.Ideo != null) // ideo is null if don't have dlc
__result *= IdeoUtility.GetPreceptsMtbMultiplier<DefExtension_ModifyFappinMtb>(p.Ideo);
if (__result < 0f || p.Ideo == null) // ideo is null if don't have dlc
return;
if (!RsiHistoryEventDefOf.RSI_Masturbated.CreateEvent(p).DoerWillingToDo())
{
__result = -2f;
return;
}
__result *= IdeoUtility.GetPreceptsMtbMultiplier<DefExtension_ModifyFappinMtb>(p.Ideo);
}
}
}

View File

@ -13,5 +13,6 @@ namespace RJWSexperience.Ideology
[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginTaken;
[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginStolen;
[MayRequireIdeology] public static readonly HistoryEventDef RSI_TookVirgin;
[MayRequireIdeology] public static readonly HistoryEventDef RSI_Masturbated;
}
}

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- Issues -->
<IssueDef>
<defName>Masturbation</defName>
<label>masturbation</label>
<iconPath>UI/Issues/Bestiality</iconPath>
</IssueDef>
<HistoryEventDef>
<defName>RSI_Masturbated</defName>
<label>masturbated</label>
</HistoryEventDef>
<!-- Precepts -->
<PreceptDef>
<defName>Masturbation_Abhorrent</defName>
<issue>Masturbation</issue>
<label>abhorrent</label>
<description>Masturbation is unacceptable.</description>
<impact>Medium</impact>
<displayOrderInIssue>40</displayOrderInIssue>
<displayOrderInImpact>100</displayOrderInImpact>
<comps>
<li Class="PreceptComp_UnwillingToDo">
<eventDef>RSI_Masturbated</eventDef>
</li>
</comps>
</PreceptDef>
<PreceptDef>
<defName>Masturbation_Disapproved</defName>
<issue>Masturbation</issue>
<label>disapproved</label>
<description>Masturbation is somewhat shameful.</description>
<impact>Low</impact>
<displayOrderInIssue>20</displayOrderInIssue>
<displayOrderInImpact>100</displayOrderInImpact>
<modExtensions>
<li Class="RJWSexperience.Ideology.Precepts.DefExtension_ModifyFappinMtb">
<multiplier>2.0</multiplier>
</li>
</modExtensions>
</PreceptDef>
</Defs>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationAddModExtension">
<xpath>/Defs/InteractionDef[defName="Masturbation_AutoBreastjob" or defName="Masturbation_AutoFellatio" or defName="Masturbation_Breastjob" or defName="Masturbation_HandjobA" or defName="Masturbation_HandjobP" or defName="Masturbation_HandjobV"]</xpath>
<value>
<li Class="RJWSexperience.Ideology.InteractionDefExtension_HistoryEvents">
<pawnEvents>
<li>RSI_Masturbated</li>
</pawnEvents>
</li>
</value>
</Operation>
</Patch>