mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
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
|
|
{
|
|
[HarmonyPatch(typeof(Pawn_GetGizmos), nameof(Pawn_GetGizmos.GetMenstruationGizmos))]
|
|
public static class GetGizmos_Patch
|
|
{
|
|
public static void Postfix(HediffComp_Menstruation comp, ref List<Gizmo> __result)
|
|
{
|
|
if (Configurations.EnableGatherCumGizmo)
|
|
__result.Add(CreateGizmo_GatherCum(comp));
|
|
}
|
|
|
|
private static Gizmo CreateGizmo_GatherCum(HediffComp_Menstruation comp)
|
|
{
|
|
Texture2D icon = TextureCache.GatherCum_Bucket;
|
|
string label = Translations.Gizmo_GatherCum;
|
|
string description = Translations.Gizmo_GatherCum;
|
|
Gizmo gizmo = new Command_Toggle
|
|
{
|
|
defaultLabel = label,
|
|
defaultDesc = description,
|
|
icon = icon,
|
|
isActive = delegate() { return comp.DoCleanWomb; },
|
|
toggleAction = delegate
|
|
{
|
|
comp.DoCleanWomb = !comp.DoCleanWomb;
|
|
}
|
|
};
|
|
|
|
return gizmo;
|
|
}
|
|
|
|
}
|
|
}
|