mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Start on Living CumBucket
This commit is contained in:
parent
bd1ef6d5a2
commit
05770a834e
11 changed files with 164 additions and 4 deletions
|
@ -83,6 +83,7 @@ namespace RJW_Genes
|
|||
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_likes_cumflation;
|
||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_cumflation_immunity;
|
||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_generous_donor;
|
||||
[MayRequire("rjw.sexperience")] public static readonly GeneDef rjw_genes_living_cumbucket;
|
||||
|
||||
|
||||
// Reproduction
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
using HarmonyLib;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
||||
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
|
||||
public class Patch_LivingCumbucket_StackHediff
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This is the amount of fluid required if the pawn has a bodysize of 1, to reach a severity in the hediff of 1.
|
||||
/// The hediff can still be increased.
|
||||
/// </summary>
|
||||
const float fluid_amount_required_for_hediff_severity_ = 100.0f;
|
||||
|
||||
public static void Postfix(SexProps props)
|
||||
{
|
||||
if (!ModsConfig.IsActive("rjw.sexperience"))
|
||||
return;
|
||||
|
||||
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Masturbation or other nieche-cases)
|
||||
if (props == null || props.pawn == null || !props.hasPartner())
|
||||
return;
|
||||
|
||||
Pawn pawnA = props.pawn;
|
||||
Pawn pawnB = props.partner;
|
||||
|
||||
if (pawnA.genes != null && pawnA.genes.HasActiveGene(GeneDefOf.rjw_genes_living_cumbucket) && CumUtility.GetTotalFluidAmount(pawnB) > 0)
|
||||
{
|
||||
ProcessLivingCumbucket(pawnA, CumUtility.GetTotalFluidAmount(pawnB));
|
||||
}
|
||||
|
||||
if (pawnB.genes != null && pawnB.genes.HasActiveGene(GeneDefOf.rjw_genes_living_cumbucket) && CumUtility.GetTotalFluidAmount(pawnA) > 0)
|
||||
{
|
||||
ProcessLivingCumbucket(pawnB, CumUtility.GetTotalFluidAmount(pawnA));
|
||||
}
|
||||
}
|
||||
|
||||
public static void ProcessLivingCumbucket(Pawn pawn, float cumamount)
|
||||
{
|
||||
float bodysize = pawn.BodySize;
|
||||
float result_severity_increase = cumamount / (fluid_amount_required_for_hediff_severity_ * bodysize);
|
||||
ModLog.Message($"Pumping the living cumbucket {pawn} (Bodysize {bodysize}) with {cumamount} cum, resulting in severity {result_severity_increase}");
|
||||
|
||||
|
||||
Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_filled_living_cumbucket);
|
||||
if (hediff == null)
|
||||
{
|
||||
hediff = pawn.health.GetOrAddHediff(HediffDefOf.rjw_genes_filled_living_cumbucket);
|
||||
hediff.Severity = 0.01f;
|
||||
}
|
||||
|
||||
hediff.Severity += result_severity_increase;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,5 +29,7 @@ namespace RJW_Genes
|
|||
|
||||
public static readonly HediffDef OvaryAgitator;
|
||||
public static readonly HediffDef Bioscaffold;
|
||||
|
||||
[MayRequire("rjw.sexperience")] public static readonly HediffDef rjw_genes_filled_living_cumbucket;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@
|
|||
<Compile Include="Genes\Breeding\Genes\Gene_FerventOvipositor.cs" />
|
||||
<Compile Include="Genes\Breeding\Genes\Gene_InsectIncubator.cs" />
|
||||
<Compile Include="Genes\Breeding\Patches\Patch_BlockedMasturbation.cs" />
|
||||
<Compile Include="Genes\Cum\Patch_LikesCumflation.cs" />
|
||||
<Compile Include="Genes\Cum\Patches\Patch_LikesCumflation.cs" />
|
||||
<Compile Include="Genes\Cum\Patches\Patch_LivingCumbucket_StackHediff.cs" />
|
||||
<Compile Include="Genes\Damage\Gene_Elasticity.cs" />
|
||||
<Compile Include="Genes\Diseases\Defs\GeneticDiseaseExtension.cs" />
|
||||
<Compile Include="Genes\Diseases\Defs\GeneticInfectorExtension.cs" />
|
||||
|
@ -109,10 +110,10 @@
|
|||
<Compile Include="Genes\Gender\Genes\Gene_GenderFluid.cs" />
|
||||
<Compile Include="Genes\GenitaliaSize\Gene_EvergrowingGenitalia.cs" />
|
||||
<Compile Include="Genes\Cum\CumUtility.cs" />
|
||||
<Compile Include="Genes\Cum\Gene_ChangeCumAmount.cs" />
|
||||
<Compile Include="Genes\Cum\Patch_TransferNutrition.cs" />
|
||||
<Compile Include="Genes\Cum\Genes\Gene_ChangeCumAmount.cs" />
|
||||
<Compile Include="Genes\Cum\Patches\Patch_TransferNutrition.cs" />
|
||||
<Compile Include="Genes\Damage\Gene_Unbreakable.cs" />
|
||||
<Compile Include="Genes\Cum\Patch_CumflationImmunity.cs" />
|
||||
<Compile Include="Genes\Cum\Patches\Patch_CumflationImmunity.cs" />
|
||||
<Compile Include="Genes\ExtraGenitalia\Gene_ExtraBreasts.cs" />
|
||||
<Compile Include="Genes\ExtraGenitalia\Gene_ExtraAnus.cs" />
|
||||
<Compile Include="Genes\ExtraGenitalia\Gene_Futa.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue