mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
hotfix
This commit is contained in:
parent
11d8ae4863
commit
cb8e6eb893
3 changed files with 44 additions and 44 deletions
Binary file not shown.
|
@ -13,7 +13,7 @@ Version 1.0.3.1
|
||||||
- minor bug fixes
|
- minor bug fixes
|
||||||
|
|
||||||
Version 1.0.3.0
|
Version 1.0.3.0
|
||||||
- added various fetus images (thanks to GluxDesigns)
|
- added various fetus images (thanks to Glux)
|
||||||
- added twin fetus image
|
- added twin fetus image
|
||||||
- male insects can impregnate female
|
- male insects can impregnate female
|
||||||
- now insects egg display on womb icon
|
- now insects egg display on womb icon
|
||||||
|
|
|
@ -113,49 +113,49 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
|
|
||||||
//Merged to RJW
|
//Merged to RJW
|
||||||
[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetIconFor")]
|
//[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetIconFor")]
|
||||||
public class PawnColumnWorker_Patch_Icon
|
//public class PawnColumnWorker_Patch_Icon
|
||||||
{
|
//{
|
||||||
public static void Postfix(Pawn pawn, ref Texture2D __result)
|
// public static void Postfix(Pawn pawn, ref Texture2D __result)
|
||||||
{
|
// {
|
||||||
if (pawn.IsVisiblyPregnant()) __result = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
|
// if (pawn.IsVisiblyPregnant()) __result = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetTooltipText")]
|
//[HarmonyPatch(typeof(PawnColumnWorker_Pregnant), "GetTooltipText")]
|
||||||
public class PawnColumnWorker_Patch_Tooltip
|
//public class PawnColumnWorker_Patch_Tooltip
|
||||||
{
|
//{
|
||||||
public static bool Prefix(Pawn pawn, ref string __result)
|
// public static bool Prefix(Pawn pawn, ref string __result)
|
||||||
{
|
// {
|
||||||
float gestationProgress = PregnancyHelper.GetPregnancy(pawn).Severity;
|
// float gestationProgress = PregnancyHelper.GetPregnancy(pawn).Severity;
|
||||||
int num = (int)(pawn.RaceProps.gestationPeriodDays * 60000f);
|
// int num = (int)(pawn.RaceProps.gestationPeriodDays * 60000f);
|
||||||
int numTicks = (int)(gestationProgress * (float)num);
|
// int numTicks = (int)(gestationProgress * (float)num);
|
||||||
__result = "PregnantIconDesc".Translate(numTicks.ToStringTicksToDays("F0"), num.ToStringTicksToDays("F0"));
|
// __result = "PregnantIconDesc".Translate(numTicks.ToStringTicksToDays("F0"), num.ToStringTicksToDays("F0"));
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
[HarmonyPatch(typeof(TransferableUIUtility), "DoExtraAnimalIcons")]
|
//[HarmonyPatch(typeof(TransferableUIUtility), "DoExtraAnimalIcons")]
|
||||||
public class TransferableUIUtility_Patch_Icon
|
//public class TransferableUIUtility_Patch_Icon
|
||||||
{
|
//{
|
||||||
private static readonly Texture2D PregnantIcon = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
|
// private static readonly Texture2D PregnantIcon = ContentFinder<Texture2D>.Get("UI/Icons/Animal/Pregnant", true);
|
||||||
public static void Postfix(Transferable trad, Rect rect, ref float curX)
|
// public static void Postfix(Transferable trad, Rect rect, ref float curX)
|
||||||
{
|
// {
|
||||||
Pawn pawn = trad.AnyThing as Pawn;
|
// Pawn pawn = trad.AnyThing as Pawn;
|
||||||
if (pawn.IsVisiblyPregnant())
|
// if (pawn.IsVisiblyPregnant())
|
||||||
{
|
// {
|
||||||
Rect rect3 = new Rect(curX - 24f, (rect.height - 24f) / 2f, 24f, 24f);
|
// Rect rect3 = new Rect(curX - 24f, (rect.height - 24f) / 2f, 24f, 24f);
|
||||||
curX -= 24f;
|
// curX -= 24f;
|
||||||
if (Mouse.IsOver(rect3))
|
// if (Mouse.IsOver(rect3))
|
||||||
{
|
// {
|
||||||
TooltipHandler.TipRegion(rect3, PawnColumnWorker_Pregnant.GetTooltipText(pawn));
|
// TooltipHandler.TipRegion(rect3, PawnColumnWorker_Pregnant.GetTooltipText(pawn));
|
||||||
}
|
// }
|
||||||
GUI.DrawTexture(rect3, PregnantIcon);
|
// GUI.DrawTexture(rect3, PregnantIcon);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
//[HarmonyPatch(typeof(JobGiver_OptimizeApparel), "ApparelScoreGain_NewTmp")]
|
//[HarmonyPatch(typeof(JobGiver_OptimizeApparel), "ApparelScoreGain_NewTmp")]
|
||||||
|
|
Loading…
Reference in a new issue