mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Show the debug due date on the gizmo for Biotech pregnancies
This commit is contained in:
parent
5c27575446
commit
ca895ef296
5 changed files with 18 additions and 8 deletions
Binary file not shown.
Binary file not shown.
|
@ -466,12 +466,6 @@ namespace RJW_Menstruation
|
|||
pawn.story.traits.allTraits = selectedTraits;
|
||||
}
|
||||
|
||||
public string DueDate()
|
||||
{
|
||||
if (pawn.Tile == -1) return "";
|
||||
return GenDate.DateFullStringWithHourAt(GenDate.TickGameToAbs((int)p_end_tick), Find.WorldGrid.LongLatOf(pawn.Tile));
|
||||
}
|
||||
|
||||
public override bool TryMergeWith(Hediff other)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -48,8 +48,10 @@ namespace RJW_Menstruation
|
|||
{
|
||||
description
|
||||
.AppendFormat("{0}: {1}\n", comp.curStage, comp.curStageHrs);
|
||||
if (comp.Pregnancy is Hediff_MultiplePregnancy preg) description
|
||||
.AppendFormat("due: {0}\n", preg.DueDate());
|
||||
if (comp.Pregnancy is Hediff_BasePregnancy rjwpreg) description
|
||||
.AppendFormat("due: {0}\n", rjwpreg.DueDate());
|
||||
else if (comp.Pregnancy is Hediff_Pregnant biopreg) description
|
||||
.AppendFormat("due: {0}\n", biopreg.DueDate());
|
||||
description
|
||||
.AppendFormat("fertcums: {0}\n" +
|
||||
"ovarypower: {1}\n" +
|
||||
|
|
|
@ -304,5 +304,19 @@ namespace RJW_Menstruation
|
|||
CopyBodyPartRecord(baby, original, Genital_Helper.get_uddersBPR(baby), Genital_Helper.get_uddersBPR(original));
|
||||
CopyBodyPartRecord(baby, original, Genital_Helper.get_anusBPR(baby), Genital_Helper.get_anusBPR(original));
|
||||
}
|
||||
|
||||
public static string DueDate(this Hediff_BasePregnancy preg)
|
||||
{
|
||||
if (preg.pawn.Tile == -1) return "";
|
||||
return GenDate.DateFullStringWithHourAt(GenDate.TickGameToAbs((int)preg.p_end_tick), Find.WorldGrid.LongLatOf(preg.pawn.Tile));
|
||||
}
|
||||
|
||||
public static string DueDate(this Hediff_Pregnant preg)
|
||||
{
|
||||
if (preg.pawn.Tile == -1) return "";
|
||||
int ticksRemaining = (int)((1f - preg.GestationProgress) * preg.pawn.RaceProps.gestationPeriodDays * GenDate.TicksPerDay);
|
||||
int dueTickAbs = GenTicks.TicksAbs + ticksRemaining;
|
||||
return GenDate.DateFullStringWithHourAt(dueTickAbs, Find.WorldGrid.LongLatOf(preg.pawn.Tile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue