This commit is contained in:
Jaaldabaoth 2024-06-04 13:08:37 +02:00
parent 951085ec59
commit 25008ce5dc
48 changed files with 2345 additions and 59 deletions

View file

@ -1,5 +1,6 @@
using HarmonyLib;
using RimWorld;
using RimWorld.BaseGen;
using RimWorld.QuestGen;
using rjw;
using rjw.Modules.Shared.Extensions;
@ -10,6 +11,7 @@ using System.Text;
using System.Threading.Tasks;
using Verse;
namespace RJW_Genes
{
@ -24,13 +26,19 @@ namespace RJW_Genes
private const float SEVERITY_INCREASE_PER_ORGASM = 0.075f;
public static void Postfix(JobDriver_Sex __instance)
public static void Postfix(JobDriver_Sex __instance)
{
Pawn orgasmingPawn = __instance.pawn;
if (orgasmingPawn != null && GeneUtility.HasGeneNullCheck(orgasmingPawn, GeneDefOf.rjw_genes_sexual_mytosis) && ! orgasmingPawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_mytosis_shock_hediff))
bool hasPollutedMytosis = false;
if (orgasmingPawn != null && (GeneUtility.HasGeneNullCheck(orgasmingPawn, GeneDefOf.rjw_genes_sexual_mytosis) || hasPollutedMytosis) && ! orgasmingPawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_mytosis_shock_hediff))
{
var mytosisHediff = GetOrgasmMytosisHediff(orgasmingPawn);
mytosisHediff.Severity += SEVERITY_INCREASE_PER_ORGASM;
if(hasPollutedMytosis && orgasmingPawn.Spawned && GridsUtility.IsPolluted(orgasmingPawn.Position, orgasmingPawn.Map))
{
mytosisHediff.Severity -= SEVERITY_INCREASE_PER_ORGASM;
}
if (mytosisHediff.Severity >= 1.0)
{
@ -295,6 +303,8 @@ namespace RJW_Genes
}
}
/*