Use ToLower() again for anus matching

This commit is contained in:
lutepickle 2022-09-29 07:16:50 -07:00
parent 6a7fb8ef70
commit 04ecbdde54
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -274,7 +274,7 @@ namespace RJW_Menstruation
public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
{
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def));
if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.Contains("anus"));
if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
string icon;

View file

@ -332,7 +332,7 @@ namespace RJW_Menstruation
public static string GetAnusLabel(this Pawn pawn)
{
Hediff hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def));
if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.Contains("anus"));
if (hediff == null) hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
if (hediff != null) return hediff.LabelBase.CapitalizeFirst() + "\n(" + hediff.LabelInBrackets + ")";
else return "";
}