mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Properly calculate gestation hours
This commit is contained in:
parent
dc832dfb0f
commit
84c1d12cff
2 changed files with 6 additions and 1 deletions
Binary file not shown.
|
@ -253,7 +253,12 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public static float GestationHours(this Hediff_BasePregnancy hediff)
|
public static float GestationHours(this Hediff_BasePregnancy hediff)
|
||||||
{
|
{
|
||||||
return (1 / /*hediff?.progress_per_tick ??*/ 1) / 2500f;
|
if (hediff == null)
|
||||||
|
{
|
||||||
|
Log.Error("Tried to get gestation length without a pregnancy.");
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
else return (hediff.p_end_tick - hediff.p_start_tick) / GenDate.TicksPerHour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue