From b5b90029307b876e868c113d609379f00b630e25 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Fri, 3 Jun 2022 20:22:32 -0700 Subject: [PATCH] Make the pregnant breast growth start/end a const instead of a magic number --- .../RJW_Menstruation/HediffComps/HediffComp_Breast.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs index c78800c..72b5d38 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Breast.cs @@ -40,6 +40,8 @@ namespace RJW_Menstruation public const float VARIANT = 0.2f; public const int TICKINTERVAL = 3750; public const float MAX_BREAST_INCREMENT = 0.10f; + public const float BREAST_GROWTH_START = 1f / 6f; + public const float BREAST_GROWTH_END = 1f / 3f; public CompProperties_Breast Props; @@ -282,7 +284,7 @@ namespace RJW_Menstruation // Scenario B: Pregnant, grow in the second half of first trimester else if (parent.pawn.IsPregnant()) { - float pregnancySize = Mathf.InverseLerp(1f / 6f, 1f / 3f, parent.pawn.GetPregnancyProgress()) * MAX_BREAST_INCREMENT; + float pregnancySize = Mathf.InverseLerp(BREAST_GROWTH_START, BREAST_GROWTH_END, parent.pawn.GetPregnancyProgress()) * MAX_BREAST_INCREMENT; if (breastSizeIncreased > pregnancySize) { debugGrowthStatus = "Shrinking due to being oversize for pregnancy";