WIP for SexConversions
This commit is contained in:
parent
862676e61a
commit
2e89759a9a
|
@ -0,0 +1,41 @@
|
|||
using HarmonyLib;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology
|
||||
{
|
||||
/*
|
||||
[HarmonyPatch(typeof(JobDriver_Sex), "Orgasm")]
|
||||
public static class RJW_Patch_Orgasm_IdeoConversion
|
||||
{
|
||||
public static void Postfix(JobDriver_Sex __instance)
|
||||
{
|
||||
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
|
||||
if (__instance.pawn == null || __instance.Partner == null)
|
||||
return;
|
||||
// Orgasm is called "all the time" - it exits early when the sex is still going.
|
||||
// Hence, we exit early if there is no actual orgasm happening
|
||||
if (__instance.sex_ticks > __instance.orgasmstick)
|
||||
return;
|
||||
|
||||
if (__instance.pawn.Ideo.HasPrecept(VariousDefOf.Proselyzing_By_Orgasm))
|
||||
{
|
||||
IdeoUtility.ConvertPawnBySex(__instance.pawn, __instance.Partner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(SexUtility), "Aftersex", new Type[] { typeof(SexProps) })]
|
||||
public static class RJW_Patch_Aftersex_IdeoConversion
|
||||
{
|
||||
// This is not exactly where I should put it (Maybe after The JobDriver_Sex Finishes??)
|
||||
// But it works here and doesn't damage things.
|
||||
public static void Postfix(SexProps props)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -72,5 +72,7 @@ namespace RJWSexperience.Ideology
|
|||
[MayRequireIdeology] public static readonly PreceptDef Necrophilia_Disapproved = DefDatabase<PreceptDef>.GetNamed("Necrophilia_Disapproved");
|
||||
[MayRequireIdeology] public static readonly PreceptDef Necrophilia_Acceptable = DefDatabase<PreceptDef>.GetNamed("Necrophilia_Acceptable");
|
||||
[MayRequireIdeology] public static readonly PreceptDef Necrophilia_Approved = DefDatabase<PreceptDef>.GetNamed("Necrophilia_Approved");
|
||||
[MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Orgasm = DefDatabase<PreceptDef>.GetNamed("Proselyzing_By_Orgasm");
|
||||
[MayRequireIdeology] public static readonly PreceptDef Proselyzing_By_Sex = DefDatabase<PreceptDef>.GetNamed("Proselyzing_By_Sex");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<!-- Issues -->
|
||||
<IssueDef>
|
||||
<defName>Sex_Proselytizing</defName>
|
||||
<label>sex type</label>
|
||||
<iconPath>UI/Issues/Submissive</iconPath>
|
||||
</IssueDef>
|
||||
|
||||
<PreceptDef>
|
||||
<defName>Proselyzing_By_Sex</defName>
|
||||
<issue>Sex_Proselytizing</issue>
|
||||
<label>Sexual Proselyzing</label>
|
||||
<description>Sex converts both partners towards this ideology.</description>
|
||||
<impact>Low</impact>
|
||||
<displayOrderInIssue>40</displayOrderInIssue>
|
||||
<displayOrderInImpact>300</displayOrderInImpact>
|
||||
</PreceptDef>
|
||||
|
||||
<PreceptDef>
|
||||
<defName>Proselyzing_By_Orgasm</defName>
|
||||
<issue>Sex_Proselytizing</issue>
|
||||
<label>Orgasm Proselyzing</label>
|
||||
<description>Orgasms converts both partners towards this ideology.</description>
|
||||
<impact>Low</impact>
|
||||
<displayOrderInIssue>50</displayOrderInIssue>
|
||||
<displayOrderInImpact>400</displayOrderInImpact>
|
||||
</PreceptDef>
|
||||
|
||||
</Defs>
|
Loading…
Reference in New Issue