Expose of ResizingGenes, fixing #34

This commit is contained in:
Vegapnk 2023-05-10 16:19:45 +02:00
parent 59412ae330
commit d00834049b
2 changed files with 35 additions and 9 deletions

View file

@ -7,6 +7,8 @@ namespace RJW_Genes
/// This Patch adds behavior to all resizing genes:
/// At Age RESIZING_MIN_AGE the Pawns Resizing Genes will trigger again, if not already triggered somewhere else.
/// This is meant to allow kids to grow up without resized genitals, and resize later (Fixing #11).
///
/// See `Gene_GenitaliaResizingGene` for a short summary of Issue #34.
/// </summary>
[HarmonyPatch(typeof(Pawn_AgeTracker), "BirthdayBiological")]
public class Patch_ResizingOnAdulthood
@ -18,10 +20,10 @@ namespace RJW_Genes
{
foreach(Gene_GenitaliaResizingGene gene in GeneUtility.GetGenitaliaResizingGenes(___pawn))
{
if (!gene.WasApplied)
if (!gene.ResizingWasApplied)
{
gene.Resize();
gene.WasApplied = true;
gene.ResizingWasApplied = true;
}
}
}