Little cleanup

This commit is contained in:
lutepickle 2024-02-16 16:39:15 -08:00
parent 7e5b2000da
commit d483e22ac2

View file

@ -141,7 +141,7 @@ namespace RJW_Menstruation
else if (gestationProgress < 0.8f) icon = fetustex + "04";
else icon = fetustex + "05";
return TryGetTwinsIcon(icon, babycount) ?? ContentFinder<Texture2D>.Get((icon), true);
return TryGetTwinsIcon(icon, babycount) ?? ContentFinder<Texture2D>.Get(icon, true);
}
public static Texture2D TryGetTwinsIcon(string path, int babycount)
@ -160,7 +160,7 @@ namespace RJW_Menstruation
List<Hediff_InsectEgg> insectEggs = new List<Hediff_InsectEgg>();
comp.Pawn.health.hediffSet.GetHediffs(ref insectEggs);
if (!insectEggs.NullOrEmpty() && insectEggs.Sum(hediff => hediff.eggssize) > 1.0f) return null; // same logic as "Stuffed" in GetInsectEggedIcon
if (insectEggs?.Sum(hediff => hediff.eggssize) > 1.0f) return null; // same logic as "Stuffed" in GetInsectEggedIcon
string icon = comp.WombTex;
float cumpercent = comp.TotalCumPercent;
@ -183,7 +183,7 @@ namespace RJW_Menstruation
else if (cumpercent < 0.89f) icon += "_Cum_15";
else if (cumpercent < 0.95f) icon += "_Cum_16";
else icon += "_Cum_17";
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
Texture2D cumtex = ContentFinder<Texture2D>.Get(icon, true);
return cumtex;
}
public static Texture2D GetInsectEggedIcon(this HediffComp_Menstruation comp)
@ -331,14 +331,14 @@ namespace RJW_Menstruation
else if (severity < 1.01f) icon += "10"; //cavernous
else icon += "11"; //abyssal
return ContentFinder<Texture2D>.Get((icon), true);
return ContentFinder<Texture2D>.Get(icon, true);
}
public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
{
Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
pawn.health.hediffSet.hediffs.FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Anal00", true);
string icon;
float severity;
@ -362,7 +362,7 @@ namespace RJW_Menstruation
else if (severity < 1.01f) icon += "04"; //cavernous
else icon += "05"; //abyssal
return ContentFinder<Texture2D>.Get((icon), true);
return ContentFinder<Texture2D>.Get(icon, true);
}
public static float GestationHours(this Hediff hediff)
@ -453,7 +453,7 @@ namespace RJW_Menstruation
if (precept != null) return true;
else return pawn.IsBreeder() ||
pawn.HasImpregnationFetish();
pawn.HasImpregnationFetish();
}
public static float DamagePants(this Pawn pawn, float fluidAmount)