mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Show the status button in the health tab for pawns with a vagina as a second hediff.
This commit is contained in:
parent
e170b5fa47
commit
b6f220b30b
3 changed files with 12 additions and 1 deletions
Binary file not shown.
|
@ -89,11 +89,21 @@ namespace RJW_Menstruation
|
||||||
public const float buttonWidth = 50f;
|
public const float buttonWidth = 50f;
|
||||||
public const float buttonHeight = 20f;
|
public const float buttonHeight = 20f;
|
||||||
|
|
||||||
|
private static HediffComp_Menstruation GetFirstMenstruation(IEnumerable<Hediff> diffs, float rectWidth)
|
||||||
|
{
|
||||||
|
foreach (Hediff diff in diffs)
|
||||||
|
{
|
||||||
|
HediffComp_Menstruation comp = diff.GetMenstruationComp();
|
||||||
|
if (comp != null) return comp;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static void Prefix(Rect rect, Pawn pawn, IEnumerable<Hediff> diffs, ref float curY)
|
public static void Prefix(Rect rect, Pawn pawn, IEnumerable<Hediff> diffs, ref float curY)
|
||||||
{
|
{
|
||||||
if (Configurations.EnableButtonInHT && pawn.ShowStatus())
|
if (Configurations.EnableButtonInHT && pawn.ShowStatus())
|
||||||
{
|
{
|
||||||
HediffComp_Menstruation comp = diffs.First().GetMenstruationComp();
|
HediffComp_Menstruation comp = GetFirstMenstruation(diffs, rect.width * 0.625f);
|
||||||
if (comp != null)
|
if (comp != null)
|
||||||
{
|
{
|
||||||
Rect buttonrect = new Rect((rect.xMax) / 2 - 5f, curY + 2f, buttonWidth, buttonHeight);
|
Rect buttonrect = new Rect((rect.xMax) / 2 - 5f, curY + 2f, buttonWidth, buttonHeight);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Version 1.0.6.3
|
Version 1.0.6.3
|
||||||
- Fix pawn generation for races with a single lifestage.
|
- Fix pawn generation for races with a single lifestage.
|
||||||
- Show womb gizmo for males with vaginas, too.
|
- Show womb gizmo for males with vaginas, too.
|
||||||
|
- Show the status button in the health tab for pawns with more than one genital.
|
||||||
|
|
||||||
Version 1.0.6.2
|
Version 1.0.6.2
|
||||||
- Fix error/crash when a pawn in estrus (with hookup override enabled) looks for partners.
|
- Fix error/crash when a pawn in estrus (with hookup override enabled) looks for partners.
|
||||||
|
|
Loading…
Reference in a new issue