Add wider variety of insect egg graphics

This commit is contained in:
lutepickle 2022-08-27 11:01:26 -07:00
parent d88a71bd61
commit 0518a3f40c
9 changed files with 20 additions and 3 deletions

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -123,7 +123,7 @@ namespace RJW_Menstruation
{
for (int i = babycount; i > 1; i--)
{
Texture2D result = ContentFinder<Texture2D>.Get((path + "_Multiplet_" + i), false);
Texture2D result = ContentFinder<Texture2D>.Get(path + "_Multiplet_" + i, false);
if (result != null) return result;
}
return null;
@ -155,14 +155,30 @@ namespace RJW_Menstruation
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
return cumtex;
}
public static Texture2D GetInsectEggedIcon(this HediffComp_Menstruation comp)
{
List<Hediff_InsectEgg> hediffs = comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().ToList();
if (hediffs.NullOrEmpty()) return null;
string path = "Womb/Insect_Egged/";
if (hediffs.Max(hediff => hediff.eggssize) > 0.3) // The threshold for "large egg" in the debug
{
if (hediffs.Count == 1) return ContentFinder<Texture2D>.Get(path + "Womb_Egged_Large", true);
else return ContentFinder<Texture2D>.Get(path + "Womb_Egged_ManyMixed", true);
}
Texture2D result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_" + hediffs.Count(), false);
if (result == null) result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_Many", true);
return result;
}
public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
{
if (comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().FirstOrDefault() != null) return ContentFinder<Texture2D>.Get(("Womb/Womb_Egged"), true);
Texture2D wombtex = comp.GetInsectEggedIcon();
if (wombtex != null) return wombtex;
string icon = comp.WombTex;
HediffComp_Menstruation.Stage stage = comp.curStage;
if (stage == HediffComp_Menstruation.Stage.Bleeding) icon += "_Bleeding";
Texture2D wombtex = ContentFinder<Texture2D>.Get((icon), true);
wombtex = ContentFinder<Texture2D>.Get(icon, true);
return wombtex;
}

View File

@ -1,6 +1,7 @@
Version 1.0.7.3
- Properly display multiple icons for pawns with multiple wombs.
- Show the 'about to ovulate' icon in the womb dialog for induced ovulators during vaginal sex.
- Display more insect eggs in a womb when someone has more, with new graphics by Euldrop.
Version 1.0.7.2
- Fix errors when trying to open dev actions when HAR is not installed.