mirror of
https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
synced 2024-08-14 23:57:38 +00:00
added tracker for when pawn last ingested human milk
This commit is contained in:
parent
994a525cb7
commit
e1a817c55f
5 changed files with 58 additions and 2 deletions
25
CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs
Normal file
25
CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace CRIALactation
|
||||
{
|
||||
[HarmonyPatch(typeof(Thing), "Ingested")]
|
||||
public static class HarmonyPatch_Thing
|
||||
{
|
||||
public static void Prefix(Thing __instance, Pawn ingester)
|
||||
{
|
||||
|
||||
if(__instance.def == ThingDefOf_Milk.HumanMilk || __instance.def == ThingDefOf_Milk.HumanoidMilk)
|
||||
{
|
||||
ingester.TryGetComp<CompInduceLactation>().lastHumanLactationIngestedTick = Find.TickManager.TicksGame;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue