Rename the TextureCache members to something more sensible

This commit is contained in:
lutepickle 2022-09-11 07:31:01 -07:00
parent 13b1ceb0a1
commit af82bad406
3 changed files with 51 additions and 42 deletions

View File

@ -103,13 +103,14 @@ namespace RJW_Menstruation
public static readonly Dictionary<Stage, Texture2D> StageTexture = new Dictionary<Stage, Texture2D>() public static readonly Dictionary<Stage, Texture2D> StageTexture = new Dictionary<Stage, Texture2D>()
{ {
{ Stage.Follicular, TextureCache.HumanTexture }, { Stage.Follicular, TextureCache.FollicularTexture },
{ Stage.ClimactericFollicular, TextureCache.HumanTexture }, { Stage.ClimactericFollicular, TextureCache.FollicularTexture },
{ Stage.Luteal, TextureCache.FertilityTexture }, { Stage.Luteal, TextureCache.LutealTexture },
{ Stage.ClimactericLuteal, TextureCache.FertilityTexture }, { Stage.ClimactericLuteal, TextureCache.LutealTexture },
{ Stage.Bleeding, TextureCache.KhorneTexture }, { Stage.Bleeding, TextureCache.BleedingTexture },
{ Stage.ClimactericBleeding, TextureCache.KhorneTexture }, { Stage.ClimactericBleeding, TextureCache.BleedingTexture },
{ Stage.Recover, TextureCache.NurgleTexture } { Stage.Pregnant, TextureCache.PregnantTexture },
{ Stage.Recover, TextureCache.RecoverTexture }
}; };
@ -565,7 +566,7 @@ namespace RJW_Menstruation
{ {
get get
{ {
if (!StageTexture.TryGetValue(CurrentVisibleStage, out Texture2D tex)) tex = TextureCache.TzeentchTexture; if (!StageTexture.TryGetValue(CurrentVisibleStage, out Texture2D tex)) tex = TextureCache.PregnantTexture;
return tex; return tex;
} }
} }

View File

@ -6,7 +6,7 @@ namespace RJW_Menstruation
[StaticConstructorOnStartup] [StaticConstructorOnStartup]
public static class TextureCache public static class TextureCache
{ {
// Milk bars
public static Texture2D MilkTexture public static Texture2D MilkTexture
{ {
get get
@ -15,46 +15,52 @@ namespace RJW_Menstruation
return milktexturecache; return milktexturecache;
} }
} }
public static Texture2D SlaaneshTexture // Sex drive
public static Texture2D SexDriveTexture
{ {
get get
{ {
if (slaaneshtexturecache == null) slaaneshtexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f); if (sexdrivetexturecache == null) sexdrivetexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f);
return slaaneshtexturecache; return sexdrivetexturecache;
} }
} }
public static Texture2D KhorneTexture // Bleeding, vulnerability
public static Texture2D BleedingTexture
{ {
get get
{ {
if (khornetexturecache == null) khornetexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f); if (bleedingtexturecache == null) bleedingtexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f);
return khornetexturecache; return bleedingtexturecache;
} }
} }
public static Texture2D TzeentchTexture // Pregnant, default, formerly sex ability
public static Texture2D PregnantTexture
{ {
get get
{ {
if (tzeentchtexturecache == null) tzeentchtexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f); if (pregnanttexturecache == null) pregnanttexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f);
return tzeentchtexturecache; return pregnanttexturecache;
} }
} }
public static Texture2D NurgleTexture // Recover, count of egg births
public static Texture2D RecoverTexture
{ {
get get
{ {
if (nurgletexturecache == null) nurgletexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f); if (recovertexturecache == null) recovertexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f);
return nurgletexturecache; return recovertexturecache;
} }
} }
public static Texture2D HumanTexture // Follicular, count of humanlike births
public static Texture2D FollicularTexture
{ {
get get
{ {
if (humantexturecache == null) humantexturecache = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f); if (folliculartexturecache == null) folliculartexturecache = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f);
return humantexturecache; return folliculartexturecache;
} }
} }
// Count of animal births
public static Texture2D AnimalTexture public static Texture2D AnimalTexture
{ {
get get
@ -63,20 +69,22 @@ namespace RJW_Menstruation
return animaltexturecache; return animaltexturecache;
} }
} }
public static Texture2D FertilityTexture // Luteal, fertility
public static Texture2D LutealTexture
{ {
get get
{ {
if (fertilitytexturecache == null) fertilitytexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f); if (lutealtexturecache == null) lutealtexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f);
return fertilitytexturecache; return lutealtexturecache;
} }
} }
public static Texture2D GhalmarazTexture // Unused, formerly count of whored
public static Texture2D WhoredTexture
{ {
get get
{ {
if (ghalmaraztexturecache == null) ghalmaraztexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f); if (whoredtexturecache == null) whoredtexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f);
return ghalmaraztexturecache; return whoredtexturecache;
} }
} }
@ -85,14 +93,14 @@ namespace RJW_Menstruation
public static readonly Texture2D GatherCum_Pussy = ContentFinder<Texture2D>.Get("UI/Icon/ToPussy"); public static readonly Texture2D GatherCum_Pussy = ContentFinder<Texture2D>.Get("UI/Icon/ToPussy");
private static Texture2D milktexturecache = SolidColorMaterials.NewSolidColorTexture(0.992f, 1.0f, 0.960f, 1.0f); private static Texture2D milktexturecache = SolidColorMaterials.NewSolidColorTexture(0.992f, 1.0f, 0.960f, 1.0f);
private static Texture2D slaaneshtexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f); private static Texture2D sexdrivetexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f);
private static Texture2D khornetexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f); private static Texture2D bleedingtexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f);
private static Texture2D tzeentchtexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f); private static Texture2D pregnanttexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f);
private static Texture2D nurgletexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f); private static Texture2D recovertexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f);
private static Texture2D humantexturecache = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f); private static Texture2D folliculartexturecache = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f);
private static Texture2D animaltexturecache = SolidColorMaterials.NewSolidColorTexture(0.411f, 0.521f, 0.878f, 1.0f); private static Texture2D animaltexturecache = SolidColorMaterials.NewSolidColorTexture(0.411f, 0.521f, 0.878f, 1.0f);
private static Texture2D fertilitytexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f); private static Texture2D lutealtexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f);
private static Texture2D ghalmaraztexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f); private static Texture2D whoredtexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f);

View File

@ -397,15 +397,15 @@ namespace RJW_Menstruation
float statvalue; float statvalue;
const float height = 24f; const float height = 24f;
statvalue = pawn.GetStatValue(xxx.sex_drive_stat); statvalue = pawn.GetStatValue(xxx.sex_drive_stat);
FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.SlaaneshTexture, Texture2D.blackTexture, xxx.sex_drive_stat.description); FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.SexDriveTexture, Texture2D.blackTexture, xxx.sex_drive_stat.description);
lineRect.y += height; lineRect.y += height;
statvalue = pawn.GetStatValue(xxx.vulnerability_stat); statvalue = pawn.GetStatValue(xxx.vulnerability_stat);
FillableBarLabeled(lineRect, " " + xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.KhorneTexture, Texture2D.blackTexture, xxx.vulnerability_stat.description); FillableBarLabeled(lineRect, " " + xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.BleedingTexture, Texture2D.blackTexture, xxx.vulnerability_stat.description);
lineRect.y += height; lineRect.y += height;
statvalue = pawn.records.GetValue(xxx.CountOfBirthHuman); statvalue = pawn.records.GetValue(xxx.CountOfBirthHuman);
FillableBarLabeled(lineRect, " " + xxx.CountOfBirthHuman.LabelCap.CapitalizeFirst() + " " + statvalue, statvalue / 10, TextureCache.HumanTexture, Texture2D.blackTexture, xxx.CountOfBirthHuman.description); FillableBarLabeled(lineRect, " " + xxx.CountOfBirthHuman.LabelCap.CapitalizeFirst() + " " + statvalue, statvalue / 10, TextureCache.FollicularTexture, Texture2D.blackTexture, xxx.CountOfBirthHuman.description);
lineRect.y += height; lineRect.y += height;
statvalue = pawn.records.GetValue(xxx.CountOfBirthAnimal); statvalue = pawn.records.GetValue(xxx.CountOfBirthAnimal);
@ -413,12 +413,12 @@ namespace RJW_Menstruation
lineRect.y += height; lineRect.y += height;
statvalue = pawn.records.GetValue(xxx.CountOfBirthEgg); statvalue = pawn.records.GetValue(xxx.CountOfBirthEgg);
FillableBarLabeled(lineRect, " " + xxx.CountOfBirthEgg.LabelCap.CapitalizeFirst() + " " + statvalue, statvalue / 100, TextureCache.NurgleTexture, Texture2D.blackTexture, xxx.CountOfBirthEgg.description); FillableBarLabeled(lineRect, " " + xxx.CountOfBirthEgg.LabelCap.CapitalizeFirst() + " " + statvalue, statvalue / 100, TextureCache.RecoverTexture, Texture2D.blackTexture, xxx.CountOfBirthEgg.description);
lineRect.y += height * 4; lineRect.y += height * 4;
statvalue = Configurations.ImplantationChance * comp.ImplantFactor; statvalue = Configurations.ImplantationChance * comp.ImplantFactor;
float fertchance = comp.GetFertilityChance(); float fertchance = comp.GetFertilityChance();
FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.FertilityTexture, Texture2D.blackTexture, Translations.FertilityDesc(String.Format("{0:0.##}", fertchance * 100))); FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.LutealTexture, Texture2D.blackTexture, Translations.FertilityDesc(String.Format("{0:0.##}", fertchance * 100)));
Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height); Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height);
GUI.DrawTexture(overayRect, TextureCache.FertChanceTex); GUI.DrawTexture(overayRect, TextureCache.FertChanceTex);
lineRect.y += height; lineRect.y += height;