A little cleanup

This commit is contained in:
lutepickle 2022-12-25 06:38:58 -08:00
parent cf2eff9556
commit 8c0a8f05d1

View file

@ -20,11 +20,7 @@ namespace RJW_Menstruation
comp.Initialize(); comp.Initialize();
} }
HediffComp_Breast bcomp = __instance.GetBreastComp(); __instance.GetBreastComp()?.Initialize();
if (bcomp != null)
{
bcomp.Initialize();
}
} }
} }
@ -124,56 +120,4 @@ namespace RJW_Menstruation
__result = Translations.CannotNoWomb; __result = Translations.CannotNoWomb;
} }
} }
//Merged to RJW
//[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetIconFor")]
//public class PawnColumnWorker_Patch_Icon
//{
// public static void Postfix(Pawn pawn, ref Texture2D __result)
// {
// if (pawn.IsVisiblyPregnant()) __result = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
// }
//
//}
//
//[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetTooltipText")]
//public class PawnColumnWorker_Patch_Tooltip
//{
// public static bool Prefix(Pawn pawn, ref string __result)
// {
// float gestationProgress = PregnancyHelper.GetPregnancy(pawn).Severity;
// int num = (int)(pawn.RaceProps.gestationPeriodDays * 60000f);
// int numTicks = (int)(gestationProgress * (float)num);
// __result = "PregnantIconDesc".Translate(numTicks.ToStringTicksToDays("F0"), num.ToStringTicksToDays("F0"));
// return false;
// }
//
//}
//
//[HarmonyPatch(typeof(TransferableUIUtility), "DoExtraAnimalIcons")]
//public class TransferableUIUtility_Patch_Icon
//{
// //private static readonly Texture2D PregnantIcon = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
//
//
//
// public static void Postfix(Transferable trad, Rect rect, ref float curX, Texture2D ___PregnantIcon)
// {
// Pawn pawn = trad.AnyThing as Pawn;
// if (pawn?.health?.hediffSet != null && pawn.IsVisiblyPregnant())
// {
// Rect rect3 = new Rect(curX - 24f, (rect.height - 24f) / 2f, 24f, 24f);
// curX -= 24f;
// if (Mouse.IsOver(rect3))
// {
// TooltipHandler.TipRegion(rect3, PawnColumnWorker_Pregnant.GetTooltipText(pawn));
// }
// GUI.DrawTexture(rect3, ___PregnantIcon);
// }
// }
//}
} }