coffees-rjw-ideology-addons/CRIALactation/Source/Thoughts/ThoughtWorker_Precept_NoRecentHumanMilk.cs
c0ffee 5b4b203d13 replaced compinducelactation with hediffcomp; cleaner
todo:
add abilitydef to hucow handler to begin inducing lactation; give lactation induction hediff to recipient pawn
add thoughtdef w/ thoughtworker_hediff to give pawns thoughts on inducing lactation
2022-10-14 18:10:00 -07:00

27 lines
844 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using UnityEngine;
namespace CRIALactation
{
public class ThoughtWorker_Precept_NoRecentHumanMilk : ThoughtWorker_Precept, IPreceptCompDescriptionArgs
{
public IEnumerable<NamedArgument> GetDescriptionArgs()
{
yield return MinDaysSinceLastHumanMeatForThought.Named("HUMANMILKREQUIREDINTERVAL");
}
protected override ThoughtState ShouldHaveThought(Pawn p)
{
int num = Mathf.Max(0, p.TryGetComp<CompLactation>().lastHumanLactationIngestedTick);
return Find.TickManager.TicksGame - num > 480000 && !LactationUtility.IsHucow(p);
}
public const int MinDaysSinceLastHumanMeatForThought = 8;
}
}