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
|
@ -0,0 +1,27 @@
|
|||
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<CompInduceLactation>().lastHumanLactationIngestedTick);
|
||||
return Find.TickManager.TicksGame - num > 480000;
|
||||
}
|
||||
|
||||
public const int MinDaysSinceLastHumanMeatForThought = 8;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue