From 88520cb8eb588eb75a7d1e6afa402ca969c34edb Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Wed, 17 Apr 2024 18:46:51 -0700 Subject: [PATCH 1/3] Change the ingestion effect to use the new ingestedcount --- .../RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs index e4607b7..5ec2abb 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/IngestionOutcomeDoers.cs @@ -8,7 +8,7 @@ namespace RJW_Menstruation protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount) { Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn); - float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingested.stackCount; + float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingestedcount; AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors); hediff.Severity = effect; pawn.health.AddHediff(hediff); From bbaf27a3972e6e6687fb64a126d658e64ed90426 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Wed, 24 Apr 2024 06:55:23 -0700 Subject: [PATCH 2/3] Change health card patch to use the new variable name --- .../RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs index c2f1176..26a66eb 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs @@ -55,7 +55,7 @@ namespace RJW_Menstruation public const float buttonWidth = 50f; public const float buttonHeight = 20f; - public static void Prefix(Rect leftRect, Pawn pawn, float curY) + public static void Prefix(Rect rect, Pawn pawn, float curY) { if (Configurations.EnableButtonInHT && pawn.ShowStatus() && pawn.ShouldCycle()) { @@ -63,7 +63,7 @@ namespace RJW_Menstruation if (comp != null) { Text.Font = GameFont.Tiny; - Rect buttonRect = new Rect(leftRect.xMax - buttonWidth - 8f, curY + 4f, buttonWidth, buttonHeight); + Rect buttonRect = new Rect(rect.xMax - buttonWidth - 8f, curY + 4f, buttonWidth, buttonHeight); if (Widgets.ButtonText(buttonRect, Translations.Button_HealthTab)) { Dialog_WombStatus.ToggleWindow(pawn, comp); From d6818b9834d36da579a44fe103f17cdc8b69acdd Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Wed, 24 Apr 2024 09:36:55 -0700 Subject: [PATCH 3/3] Little refactor in the HAR littersize patch --- .../HediffComps/HediffComp_PregeneratedBabies.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs index debbb75..38a25de 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs @@ -301,10 +301,10 @@ namespace RJW_Menstruation // So make it always consider the mother to have one baby public static class HAR_LitterSize_Undo { - public static void Postfix(ref int __result, Pawn mother) + public static void Postfix(ref int __result) { - if (Configurations.PregnancySource != Configurations.PregnancyType.Biotech || !Configurations.EnableBiotechTwins) return; - __result = 0; + if (Configurations.PregnancySource == Configurations.PregnancyType.Biotech && Configurations.EnableBiotechTwins) + __result = 0; return; } }