Simple implementation of a Rut gene

This commit is contained in:
Vegapnk 2024-07-17 22:01:31 +02:00
parent 8d1d43b691
commit 35d9662663
8 changed files with 140 additions and 3 deletions

View file

@ -75,6 +75,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_insectincubator;
public static readonly GeneDef rjw_genes_hardwired_progenity;
public static readonly GeneDef rjw_genes_blocked_masturbation;
public static readonly GeneDef rjw_genes_basic_rut;
// Cum
public static readonly GeneDef rjw_genes_no_cum;
@ -142,6 +143,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_infectious_hypersexuality;
public static readonly GeneDef rjw_genes_stretcher;
public static readonly GeneDef rjw_genes_infectious_blocked_masturbation;
public static readonly GeneDef rjw_genes_infectious_rut;
//Other Defs
public static readonly XenotypeDef rjw_genes_succubus;

View file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace RJW_Genes
{
public class Gene_Rut : Gene
{
public override void Tick()
{
base.Tick();
if (pawn == null || pawn.genes == null)
return;
var chanceExtension = this.def.GetModExtension<TickBasedChanceExtension>();
if (chanceExtension == null) return;
if (pawn.IsHashIntervalTick(chanceExtension.tickInterval)){
Random r = new Random();
if (r.NextDouble() < chanceExtension.eventChance)
{
Hediff rut = pawn.health.GetOrAddHediff(HediffDefOf.rjw_genes_genetic_rut);
rut.Severity = 1;
ModLog.Debug($"Pawn {pawn} gained rjw_genes_genetic_rut based on chance.");
}
}
}
}
}

View file

@ -23,6 +23,8 @@ namespace RJW_Genes
public static readonly HediffDef rjw_genes_twinkification_progress;
public static readonly HediffDef rjw_genes_feminization_progress;
public static readonly HediffDef rjw_genes_genetic_rut;
// Note: Counter does meant it counters it, not it's counting
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumstuffed_counter;
[MayRequire("LustLicentia.RJWLabs")] public static readonly HediffDef rjw_genes_cumflation_counter;

View file

@ -81,6 +81,7 @@
<Compile Include="Genes\Breeding\ConditionalStatAffecters\ConditionalStatAffecter_VeryManyChildren.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_FerventOvipositor.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_InsectIncubator.cs" />
<Compile Include="Genes\Breeding\Genes\Gene_Rut.cs" />
<Compile Include="Genes\Breeding\Patches\Patch_BlockedMasturbation.cs" />
<Compile Include="Genes\Cum\HediffComp_ProcessCumbucket.cs" />
<Compile Include="Genes\Cum\HediffsCompProperties_ProcessCumbucketMTB.cs" />