2021-09-26 09:19:24 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Verse;
|
|
|
|
|
using RimWorld;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using RJWSexperience;
|
|
|
|
|
using rjw;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace RJW_Menstruation.Sexperience
|
|
|
|
|
{
|
2022-03-23 16:27:06 +00:00
|
|
|
|
[HarmonyPatch(typeof(Pawn_GetGizmos), nameof(Pawn_GetGizmos.GetMenstruationGizmos))]
|
2021-09-26 09:19:24 +00:00
|
|
|
|
public static class GetGizmos_Patch
|
|
|
|
|
{
|
2022-04-28 16:52:51 +00:00
|
|
|
|
public static void Postfix(HediffComp_Menstruation comp, ref List<Gizmo> __result)
|
2021-09-26 09:19:24 +00:00
|
|
|
|
{
|
2022-04-26 05:37:52 +00:00
|
|
|
|
if (Configurations.EnableGatherCumGizmo)
|
|
|
|
|
__result.Add(CreateGizmo_GatherCum(comp));
|
2021-09-26 09:19:24 +00:00
|
|
|
|
}
|
2022-03-23 16:27:06 +00:00
|
|
|
|
|
|
|
|
|
private static Gizmo CreateGizmo_GatherCum(HediffComp_Menstruation comp)
|
2021-09-26 09:19:24 +00:00
|
|
|
|
{
|
|
|
|
|
Texture2D icon = TextureCache.GatherCum_Bucket;
|
2022-06-02 19:36:54 +00:00
|
|
|
|
string label = Translations.Gizmo_GatherCum;
|
|
|
|
|
string description = Translations.Gizmo_GatherCum;
|
2021-09-26 09:19:24 +00:00
|
|
|
|
Gizmo gizmo = new Command_Toggle
|
|
|
|
|
{
|
|
|
|
|
defaultLabel = label,
|
|
|
|
|
defaultDesc = description,
|
|
|
|
|
icon = icon,
|
|
|
|
|
isActive = delegate() { return comp.DoCleanWomb; },
|
|
|
|
|
toggleAction = delegate
|
|
|
|
|
{
|
|
|
|
|
comp.DoCleanWomb = !comp.DoCleanWomb;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return gizmo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|