Disguise progress bar color for the hidden pregnancy

This commit is contained in:
amevarashi 2022-03-20 17:48:27 +05:00
parent b7267e614c
commit 33bbde68ca

View file

@ -251,11 +251,27 @@ namespace RJW_Menstruation
return mixedcolor;
}
}
public Stage CurrentVisibleStage
{
get
{
if (curStage == Stage.Pregnant)
{
if (Configurations.InfoDetail == Configurations.DetailLevel.All || (PregnancyHelper.GetPregnancy(parent.pawn)?.Visible ?? false))
return Stage.Pregnant;
else
return Stage.Luteal;
}
return curStage;
}
}
public string GetCurStageLabel
{
get
{
switch (curStage)
switch (CurrentVisibleStage)
{
case Stage.Follicular:
return Translations.Stage_Follicular;
@ -268,8 +284,7 @@ namespace RJW_Menstruation
case Stage.Fertilized:
return Translations.Stage_Fertilized;
case Stage.Pregnant:
if (Configurations.InfoDetail == Configurations.DetailLevel.All || (PregnancyHelper.GetPregnancy(parent.pawn)?.Visible ?? false)) return Translations.Stage_Pregnant;
else return Translations.Stage_Luteal;
return Translations.Stage_Pregnant;
case Stage.Recover:
return Translations.Stage_Recover;
case Stage.None:
@ -483,7 +498,7 @@ namespace RJW_Menstruation
{
get
{
if (!StageTexture.TryGetValue(curStage, out Texture2D tex)) tex = TextureCache.TzeentchTexture;
if (!StageTexture.TryGetValue(CurrentVisibleStage, out Texture2D tex)) tex = TextureCache.TzeentchTexture;
return tex;
}
}