Compare commits

...

3 Commits

Author SHA1 Message Date
lutepickle d6818b9834 Little refactor in the HAR littersize patch 2024-04-24 09:36:55 -07:00
lutepickle bbaf27a397 Change health card patch to use the new variable name 2024-04-24 06:55:23 -07:00
lutepickle 88520cb8eb Change the ingestion effect to use the new ingestedcount 2024-04-17 18:46:51 -07:00
3 changed files with 6 additions and 6 deletions

View File

@ -301,10 +301,10 @@ namespace RJW_Menstruation
// So make it always consider the mother to have one baby // So make it always consider the mother to have one baby
public static class HAR_LitterSize_Undo 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; if (Configurations.PregnancySource == Configurations.PregnancyType.Biotech && Configurations.EnableBiotechTwins)
__result = 0; __result = 0;
return; return;
} }
} }

View File

@ -8,7 +8,7 @@ namespace RJW_Menstruation
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount) protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested, int ingestedcount)
{ {
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn); 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); AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize_NewTemp(pawn, toleranceChemical, ref effect, multiplyByGeneToleranceFactors);
hediff.Severity = effect; hediff.Severity = effect;
pawn.health.AddHediff(hediff); pawn.health.AddHediff(hediff);

View File

@ -55,7 +55,7 @@ namespace RJW_Menstruation
public const float buttonWidth = 50f; public const float buttonWidth = 50f;
public const float buttonHeight = 20f; 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()) if (Configurations.EnableButtonInHT && pawn.ShowStatus() && pawn.ShouldCycle())
{ {
@ -63,7 +63,7 @@ namespace RJW_Menstruation
if (comp != null) if (comp != null)
{ {
Text.Font = GameFont.Tiny; 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)) if (Widgets.ButtonText(buttonRect, Translations.Button_HealthTab))
{ {
Dialog_WombStatus.ToggleWindow(pawn, comp); Dialog_WombStatus.ToggleWindow(pawn, comp);