From 57bb1950e43efd98580be8e37bd744207fe78bcc Mon Sep 17 00:00:00 2001 From: Vegapnk Date: Tue, 18 Jul 2023 07:00:45 +0200 Subject: [PATCH] Made evergrowth Genitalia tick configurable --- CHANGELOG.md | 1 + Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml | 6 ++++++ Common/Defs/GeneDefs/GeneDefs_LifeForce.xml | 4 ++-- Source/Genes/GenitaliaSize/Gene_EvergrowingGenitalia.cs | 5 +++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac8e980..7b35dd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Simple Gene that removes Sex need (called asexual, `rjw_genes_no_sex_need`) - New Gene that grows Penisses on Oral sex. Configurable in XML. - New Gene Lifeforce Empath: Gain Lifeforce for sexually satisfied pawns, loose for frustrated pawns. +- More genes are configurable with XML, e.g. tick speed, distances or multipliers. I am getting the hang of it. **Fixes:** diff --git a/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml b/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml index 6d0bb5c..492aedc 100644 --- a/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml +++ b/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml @@ -125,6 +125,12 @@
  • PenisSize
  • VaginaSize
  • + +
  • + + 60000 +
  • +
    \ No newline at end of file diff --git a/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml b/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml index ba0bf2d..0be1356 100644 --- a/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml +++ b/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml @@ -265,8 +265,8 @@ rjw_genes_lifeforce 3 rjw_genes_fertilin - 1 - -1 + 3 + -2
  • diff --git a/Source/Genes/GenitaliaSize/Gene_EvergrowingGenitalia.cs b/Source/Genes/GenitaliaSize/Gene_EvergrowingGenitalia.cs index 05a6803..87e91ee 100644 --- a/Source/Genes/GenitaliaSize/Gene_EvergrowingGenitalia.cs +++ b/Source/Genes/GenitaliaSize/Gene_EvergrowingGenitalia.cs @@ -16,13 +16,14 @@ namespace RJW_Genes public const int RESIZING_AGE = 20; //public const int GROWTH_INTERVAL = 1000; // Test value for Quick Trials - public const int GROWTH_INTERVAL = 60000; // 60k == 1 day + public const int GROWTH_INTERVAL_FALLBACK = 60000; // 60k == 1 day public override void Tick() { base.Tick(); - if (pawn.IsHashIntervalTick(GROWTH_INTERVAL) + int interval = ModExtensionHelper.GetTickIntervalFromModExtension(GeneDefOf.rjw_genes_evergrowth, GROWTH_INTERVAL_FALLBACK); + if (pawn.IsHashIntervalTick(interval) && this.pawn.Map != null && pawn.ageTracker.AgeBiologicalYears >= RESIZING_AGE) {