Compare commits

...

3 commits

Author SHA1 Message Date
ADHD_Coder
21c48dfa60 Merge branch 'UI_vag_label_fix' into 'dev'
Fix UI so it displays the type of the linked vagina hediff

See merge request lutepickle/rjw_menstruation!14
2026-06-11 16:24:47 +00:00
lutepickle
d8b98ca05e Fix patch to RJW tab with 6.1.4 2026-06-08 09:29:12 -07:00
ADHD_Coder
8ff3771a0e Fix UI so it displays the type of the vaginal the menstruationComp is linked to, instead of the first vagina the pawn has. 2025-11-17 13:55:13 -08:00
11 changed files with 12 additions and 15 deletions

Binary file not shown.

View file

@ -2,12 +2,6 @@
<Patch>
<Operation Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationInsert">
<xpath>/Defs/PawnTableDef[defName="RJW_PawnTable_Humanlikes"]/columns/li[text()="Pregnant"]</xpath>
<value>
<li>RJWMenstruation_Womb</li>
</value>
</li>
<li Class="PatchOperationInsert">
<xpath>/Defs/PawnTableDef[defName="RJW_PawnTable_Colonists"]/columns/li[text()="Pregnant"]</xpath>
<value>

Binary file not shown.

View file

@ -126,7 +126,7 @@ namespace RJW_Menstruation
protected int? opcache = null;
protected float antisperm = 0.0f;
// RJW pregnancy, or Biotech pregnancy/labor/laborpushing
protected Hediff pregnancy = null;
protected Hediff pregnancy = null; // Remove, instead reference per-genital pregnancy list
protected int eggLifeSpanTicks = GenDate.DaysToTicks(2);
protected EstrusLevel estrusLevel = EstrusLevel.Visible;
@ -313,7 +313,7 @@ namespace RJW_Menstruation
{
StatDefOf.Fertility.Worker.ClearCacheForThing(Pawn); // No effect for now, but a future RW update might add caching for this
calculatingOvulationChance = true;
ovulationChance *= PawnCapacityUtility.CalculateCapacityLevel(Pawn.health.hediffSet, xxx.reproduction);
ovulationChance *= PawnCapacityUtility.CalculateCapacityLevel(Pawn.health.hediffSet, xxx.reproduction); // Add genital fertility
}
finally
{
@ -1481,7 +1481,7 @@ namespace RJW_Menstruation
try
{
if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}");
if (pregnancy == null)
if (pregnancy == null) // Support pregnancy list, maybe split off into function
{
Configurations.PregnancyType usePregnancy = xxx.is_human(Pawn) ? Configurations.PregnancySource : Configurations.PregnancyType.MultiplePregnancy;
switch (usePregnancy)
@ -1499,7 +1499,7 @@ namespace RJW_Menstruation
case Configurations.PregnancyType.MultiplePregnancy:
if (Configurations.Debug) Log.Message($"Creating new menstruation pregnancy");
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer); // Add fertility comp of mother
pregnant = true;
deadeggs.Add(egg);
break;

View file

@ -400,7 +400,7 @@ namespace RJW_Menstruation
GUI.DrawTexture(genitalIconRect, vagina, ScaleMode.ScaleToFit);
GUI.color = Color.white;
GUI.Label(genitalVaginaLabelRect, pawn.GetVaginaLabel(), fontstylecenter);
GUI.Label(genitalVaginaLabelRect, comp.GetVaginaLabel(), fontstylecenter);
GUI.Label(genitalAnusLabelRect, pawn.GetAnusLabel(), fontstylecenter);
}

View file

@ -325,10 +325,10 @@ namespace RJW_Menstruation
}
public static string GetVaginaLabel(this Pawn pawn)
public static string GetVaginaLabel(this HediffComp_Menstruation comp)
{
Hediff hediff = pawn.health.hediffSet.hediffs.Find(h => VariousDefOf.AllVaginas.Contains(h.def));
return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")" + "\n" + xxx.CountOfSex.LabelCap.CapitalizeFirst() + ": " + pawn.records.GetAsInt(xxx.CountOfSex);
Hediff hediff = comp.parent;
return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")" + "\n" + xxx.CountOfSex.LabelCap.CapitalizeFirst() + ": " + comp.parent.pawn.records.GetAsInt(xxx.CountOfSex);
}
public static string GetAnusLabel(this Pawn pawn)
{

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RJW Menstruation</identifier>
<version>1.6.2.3</version>
<version>1.6.2.4</version>
<dependencies>
</dependencies>
<incompatibleWith />

View file

@ -1,3 +1,6 @@
Version 1.6.2.4
- Fix error on startup and missing womb status in RJW tab with RJW 6.1.4.
Version 1.6.2.3
- Fix multiple breasts not appearing in the menstruation UI.
- Status of wombs now appears in RJW main tab, contributed by GhostClinic.