2021-11-17 17:59:06 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2022-10-15 01:10:00 +00:00
|
|
|
|
int num = Mathf.Max(0, p.TryGetComp<CompLactation>().lastHumanLactationIngestedTick);
|
2022-08-06 05:04:35 +00:00
|
|
|
|
return Find.TickManager.TicksGame - num > 480000 && !LactationUtility.IsHucow(p);
|
2021-11-17 17:59:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public const int MinDaysSinceLastHumanMeatForThought = 8;
|
|
|
|
|
}
|
|
|
|
|
}
|