Added setting for consensual pussyheal

This commit is contained in:
Shabakur 2023-01-28 17:37:57 +01:00
parent 7b033ff6d6
commit 1651afe4dd
19 changed files with 92 additions and 3 deletions

Binary file not shown.

View file

@ -7,4 +7,11 @@
<reportString>forced masturbatin'.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
<JobDef>
<defName>MiscSexReciever</defName>
<driverClass>RJW_More_Genes.JobDriver_MiscSexBaseReciever</driverClass>
<reportString>lovin'.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
</Defs>

View file

@ -12,5 +12,7 @@ namespace RJW_More_Genes
public static class JobDefOf
{
public static readonly JobDef Mindbreak;
public static readonly JobDef MiscSexReciever;
public static readonly JobDef HealPussy;
}
}

View file

@ -19,7 +19,11 @@ namespace RJW_More_Genes
//this.FailOnCannotTouch(TargetIndex.B, PathEndMode.OnCell);
this.FailOnDespawnedNullOrForbidden(this.iTarget);
//this.FailOn(() => !target.health.capacities.CanBeAwake);
JobDef PartnerJob = xxx.gettin_raped;
JobDef PartnerJob = xxx.getting_quickie;
if(RJWMGSettings.consensual_pussyheal)
{
PartnerJob = JobDefOf.MiscSexReciever;
}
yield return Toils_Goto.Goto(TargetIndex.A, PathEndMode.OnCell);
yield return new Toil
{
@ -46,6 +50,11 @@ namespace RJW_More_Genes
if (comp.props is CompProperties_SexInteractionRequirements)
{
CompProperties_SexInteractionRequirements sexpropsreq = comp.props as CompProperties_SexInteractionRequirements;
if (RJWMGSettings.gene_pussyheal)
{
sexpropsreq.tags.Clear();
sexpropsreq.tags.Add(rjw.Modules.Interactions.Enums.InteractionTag.Consensual);
}
this.Sexprops = SexInteractionUtility.GenerateSexProps(this.pawn, this.Partner, sexpropsreq);
}
}

View file

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using Verse.AI;
using rjw;
namespace RJW_More_Genes
{
//Made this quickly may have some mistakes
public class JobDriver_MiscSexBaseReciever: JobDriver_SexBaseReciever
{
protected override IEnumerable<Toil> MakeNewToils()
{
base.setup_ticks();
this.parteners.Add(base.Partner);
this.FailOnDespawnedOrNull(this.iTarget);
this.FailOn(() => !base.Partner.health.capacities.CanBeAwake);
this.FailOn(() => this.pawn.Drafted);
this.FailOn(() => base.Partner.Drafted);
Toil toil = this.MakeSexToil();
toil.FailOn(() => base.Partner.CurJob.def != JobDefOf.HealPussy); //or other jobs in the future
yield return toil;
yield break;
}
private Toil MakeSexToil()
{
Toil toil = new Toil();
toil.defaultCompleteMode = ToilCompleteMode.Never;
toil.socialMode = RandomSocialMode.Off;
toil.handlingFacing = true;
toil.tickAction = delegate ()
{
if (this.pawn.IsHashIntervalTick(this.ticks_between_hearts))
{
base.ThrowMetaIconF(this.pawn.Position, this.pawn.Map, FleckDefOf.Heart);
}
};
toil.AddEndCondition(delegate
{
if (this.parteners.Count <= 0)
{
return JobCondition.Succeeded;
}
return JobCondition.Ongoing;
});
toil.AddFinishAction(delegate
{
if (xxx.is_human(this.pawn))
{
this.pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
}
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(this.pawn);
});
toil.socialMode = RandomSocialMode.Off;
return toil;
}
}
}

View file

@ -21,7 +21,10 @@ namespace RJW_More_Genes
listing_Standard.Begin(rect);
listing_Standard.Gap(24f);
listing_Standard.CheckboxLabeled("gene pussyheal", ref gene_pussyheal, "disable the effects of the gene", 0f, 1f);
listing_Standard.Gap(3f);
listing_Standard.CheckboxLabeled("sexfrenzy", ref sexfrenzy, "disable the effects", 0f, 1f);
listing_Standard.Gap(3f);
listing_Standard.CheckboxLabeled("consensual_pussyheal", ref consensual_pussyheal, "pussyheal counts as consensual sex instead of rape", 0f, 1f);
listing_Standard.End();
}
@ -30,8 +33,10 @@ namespace RJW_More_Genes
base.ExposeData();
Scribe_Values.Look<bool>(ref RJWMGSettings.gene_pussyheal, "gene_pussyheal", RJWMGSettings.gene_pussyheal, true);
Scribe_Values.Look<bool>(ref RJWMGSettings.sexfrenzy, "sexfrenzy", RJWMGSettings.sexfrenzy, true);
Scribe_Values.Look<bool>(ref RJWMGSettings.consensual_pussyheal, "consensual_pussyheal", RJWMGSettings.consensual_pussyheal, false);
}
public static bool gene_pussyheal = true;
public static bool sexfrenzy = true;
public static bool consensual_pussyheal = true;
}
}

View file

@ -69,6 +69,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="JobDriver_CastAbilityAfterSex.cs" />
<Compile Include="Royalty\AbilityUtility.cs" />
<Compile Include="Royalty\CompAbilityEffect_Orgasm.cs" />
<Compile Include="Royalty\CompAbilityEffect_SexFrenzy.cs" />
@ -85,7 +86,7 @@
<Compile Include="Royalty\HediffComp_OrgasmCycle.cs" />
<Compile Include="HediffDefOf.cs" />
<Compile Include="JobDefOf.cs" />
<Compile Include="JobDriver_CastAbilityAfterSex.cs" />
<Compile Include="JobDriver_MiscSexBaseReciever.cs" />
<Compile Include="JobDriver_Mindbreak.cs" />
<Compile Include="MentalStateDefOf.cs" />
<Compile Include="PatchProcessSex.cs" />

View file

@ -1 +1 @@
a5ab93a622659cbd8dd55dafbd7ec218b2635267
a9c54690bdfa5f3538ab47c50ae6d6f8f88e1b94