Revert "Originvagsize is unused and took up save file space, so get rid of it"

This reverts commit d8fcb15f39.
This commit is contained in:
lutepickle 2022-07-23 19:59:23 -07:00
parent 0de63e3bed
commit 62f37dcac8
2 changed files with 22 additions and 2 deletions

View file

@ -118,6 +118,7 @@ namespace RJW_Menstruation
protected int opcache = -1; protected int opcache = -1;
protected HediffComp_Breast breastcache = null; protected HediffComp_Breast breastcache = null;
protected float antisperm = 0.0f; protected float antisperm = 0.0f;
protected float? originvagsize = null;
protected Hediff_BasePregnancy pregnancy = null; protected Hediff_BasePregnancy pregnancy = null;
public Hediff_BasePregnancy Pregnancy { get => pregnancy; set => pregnancy = value; } public Hediff_BasePregnancy Pregnancy { get => pregnancy; set => pregnancy = value; }
@ -446,6 +447,22 @@ namespace RJW_Menstruation
} }
} }
public float OriginVagSize
{
get
{
if (originvagsize == null)
{
originvagsize = parent.Severity;
}
return originvagsize ?? 0.1f;
}
set
{
originvagsize = value;
}
}
public float CurStageIntervalHours public float CurStageIntervalHours
{ {
get get
@ -485,6 +502,7 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true); Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true); Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true);
Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true); Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true);
Scribe_Values.Look(ref originvagsize, "originvagsize", originvagsize, true);
Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", DoCleanWomb, true); Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", DoCleanWomb, true);
Scribe_References.Look(ref pregnancy, "pregnancy"); Scribe_References.Look(ref pregnancy, "pregnancy");
} }

View file

@ -218,13 +218,15 @@ namespace RJW_Menstruation
} }
public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp) public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp, bool drawOrigin = false)
{ {
Hediff hediff = comp?.parent; Hediff hediff = comp?.parent;
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true); if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
//HediffComp_Menstruation comp = hediff.GetMenstruationComp(); //HediffComp_Menstruation comp = hediff.GetMenstruationComp();
string icon; string icon;
float severity = hediff.Severity; float severity;
if (drawOrigin) severity = comp.OriginVagSize;
else severity = hediff.Severity;
if (comp != null) icon = comp.VagTex; if (comp != null) icon = comp.VagTex;
else icon = "Genitals/Vagina"; else icon = "Genitals/Vagina";