mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Properly display biotech pregnanies in the womb dialog and gizmo
This commit is contained in:
parent
c72ff42da1
commit
592cb361ad
6 changed files with 26 additions and 7 deletions
Binary file not shown.
Binary file not shown.
|
@ -94,7 +94,7 @@ namespace RJW_Menstruation
|
|||
|
||||
string icon = "Fetus/Slime_Abomi02";
|
||||
string fetustex = "Fetus/Fetus_Default";
|
||||
ThingDef babydef = comp.Pawn.def;
|
||||
ThingDef babydef = comp.Pawn.def; // TODO: Pregenerated babies
|
||||
|
||||
float gestationProgress = comp.StageProgress;
|
||||
int babycount = hediff is Hediff_BasePregnancy preg ? preg.babies.Count : 1;
|
||||
|
|
|
@ -57,15 +57,16 @@ namespace RJW_Menstruation
|
|||
comp.TotalFertCum, comp.ovarypower, comp.GetNumOfEggs);
|
||||
}
|
||||
else description.AppendFormat("{0}\n", comp.GetCurStageLabel);
|
||||
if (pawn.IsRJWPregnant())
|
||||
if (pawn.IsRJWPregnant() || pawn.IsBiotechPregnant())
|
||||
{
|
||||
Hediff_BasePregnancy hediff = comp.Pregnancy;
|
||||
Hediff hediff = comp.Pregnancy;
|
||||
if (hediff != null && Utility.ShowFetusImage(hediff))
|
||||
{
|
||||
icon = comp.GetPregnancyIcon(hediff);
|
||||
if (hediff is Hediff_BasePregnancy h)
|
||||
float gestationProgress = comp.StageProgress;
|
||||
if (hediff is Hediff_BasePregnancy || hediff is HediffWithParents)
|
||||
{
|
||||
if (h.GestationProgress < 0.2f) icon_overay = comp.GetCumIcon();
|
||||
if (gestationProgress < 0.2f) icon_overay = comp.GetCumIcon();
|
||||
else icon_overay = ContentFinder<Texture2D>.Get(("Womb/Empty"), true);
|
||||
}
|
||||
else icon_overay = ContentFinder<Texture2D>.Get(("Womb/Empty"), true);
|
||||
|
|
|
@ -217,8 +217,26 @@ namespace RJW_Menstruation
|
|||
GUI.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + father + " ", fontstyleright);
|
||||
}
|
||||
}
|
||||
else if (hediff is HediffWithParents p)
|
||||
{
|
||||
if (p is Hediff_Pregnant hp && hp.Severity < 0.2f) cum = comp.GetCumIcon();
|
||||
else cum = ContentFinder<Texture2D>.Get("Womb/Empty", true);
|
||||
// TODO: Pregenerated babies (base on multiplepregnancy)
|
||||
if (Utility.ShowFetusInfo())
|
||||
{
|
||||
preginfoheight = fontheight;
|
||||
Rect preginfo = new Rect(0f, mainRect.yMax - wombRectHeight - 2, wombRectWidth, preginfoheight);
|
||||
fontstyleright.normal.textColor = Color.white;
|
||||
fontstyleright.alignment = TextAnchor.MiddleRight;
|
||||
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
||||
|
||||
string father = p.Father.LabelShort;
|
||||
|
||||
GUI.Box(preginfo, "1 " + p.Mother.def.label + " " + Translations.Dialog_WombInfo02, buttonstyle);
|
||||
GUI.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + father + " ", fontstyleright);
|
||||
}
|
||||
}
|
||||
else cum = ContentFinder<Texture2D>.Get(("Womb/Empty"), true);
|
||||
// TODO: Biotech pregnancy
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ namespace RJW_Menstruation
|
|||
return null;
|
||||
}
|
||||
}
|
||||
// TODO: Biotech
|
||||
// TODO: Biotech pregenerated babies
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue