mirror of
https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
synced 2024-08-14 23:57:38 +00:00
58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Verse;
|
|
using RimWorld;
|
|
using rjw;
|
|
using Milk;
|
|
using UnityEngine;
|
|
|
|
namespace CRIALactation
|
|
{
|
|
public class ThoughtWorker_Precept_Lactating_Essential : ThoughtWorker_Precept
|
|
{
|
|
|
|
protected override ThoughtState ShouldHaveThought(Pawn p)
|
|
{
|
|
|
|
if (!p.IsColonistPlayerControlled) return false;
|
|
|
|
if (ThoughtUtility.ThoughtNullified(p, this.def))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if(!LactationUtility.HasMilkableBreasts(p))
|
|
{
|
|
return false;
|
|
}
|
|
if (LactationUtility.IsHucow(p))
|
|
{
|
|
return ThoughtState.ActiveAtStage(0);
|
|
}
|
|
if (LactationUtility.IsLactating(p))
|
|
{
|
|
return ThoughtState.ActiveAtStage(1);
|
|
}
|
|
|
|
if (!p.ageTracker.Adult)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (ExpectationsUtility.CurrentExpectationFor(p).order <= ExpectationDefOf.VeryLow.order)
|
|
{
|
|
return ThoughtState.ActiveAtStage(2);
|
|
}
|
|
else if(ExpectationsUtility.CurrentExpectationFor(p).order <= ExpectationDefOf.Moderate.order)
|
|
{
|
|
return ThoughtState.ActiveAtStage(3);
|
|
}
|
|
else
|
|
{
|
|
return ThoughtState.ActiveAtStage(4);
|
|
}
|
|
}
|
|
}
|
|
}
|