2022-07-12 22:49:55 +00:00
|
|
|
|
using HarmonyLib;
|
2021-09-26 09:19:24 +00:00
|
|
|
|
using RimWorld;
|
2022-07-12 22:49:55 +00:00
|
|
|
|
using UnityEngine;
|
2021-09-26 09:19:24 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
using Verse.Sound;
|
|
|
|
|
|
|
|
|
|
namespace RJW_Menstruation.Sexperience
|
|
|
|
|
{
|
|
|
|
|
[HarmonyPatch(typeof(Dialog_WombStatus), "DrawWomb")]
|
|
|
|
|
public static class Menstruation_Patch_Dialog_WombStatus
|
|
|
|
|
{
|
|
|
|
|
public const float ICONSIZE = 42f;
|
|
|
|
|
|
|
|
|
|
public static void Postfix(Rect rect, Dialog_WombStatus __instance)
|
|
|
|
|
{
|
|
|
|
|
Rect buttonRect = new Rect(rect.x, rect.yMax - ICONSIZE, ICONSIZE, ICONSIZE).ContractedBy(2f);
|
|
|
|
|
if (__instance.Comp.DoCleanWomb)
|
|
|
|
|
{
|
2022-07-12 22:49:55 +00:00
|
|
|
|
Widgets.DrawTextureFitted(buttonRect, TextureCache.GatherCum_Bucket, 1.0f);
|
2021-09-26 09:19:24 +00:00
|
|
|
|
TooltipHandler.TipRegion(buttonRect, Translations.Dialog_DoCleanWomb_Tooltip);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Widgets.DrawTextureFitted(buttonRect, TextureCache.GatherCum_Pussy, 1.0f);
|
|
|
|
|
TooltipHandler.TipRegion(buttonRect, Translations.Dialog_DontCleanWomb_Tooltip);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Widgets.ButtonInvisible(buttonRect))
|
|
|
|
|
{
|
|
|
|
|
SoundDefOf.Click.PlayOneShotOnCamera();
|
|
|
|
|
__instance.Comp.DoCleanWomb = !__instance.Comp.DoCleanWomb;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|