2021-07-26 15:19:49 +00:00
|
|
|
|
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_Social : ThoughtWorker_Precept_Social
|
|
|
|
|
{
|
|
|
|
|
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
|
|
|
|
|
{
|
|
|
|
|
|
2022-06-10 00:51:12 +00:00
|
|
|
|
if (p == null || otherPawn == null) return false;
|
|
|
|
|
|
2021-07-30 15:28:19 +00:00
|
|
|
|
if (!LactationUtility.HasMilkableBreasts(otherPawn)) return false;
|
|
|
|
|
|
2021-11-17 19:52:07 +00:00
|
|
|
|
if (LactationUtility.IsHucow(otherPawn))
|
2021-07-26 15:19:49 +00:00
|
|
|
|
{
|
|
|
|
|
return ThoughtState.ActiveAtStage(0);
|
2021-11-17 19:52:07 +00:00
|
|
|
|
}
|
|
|
|
|
else if (LactationUtility.IsLactating(otherPawn))
|
|
|
|
|
{
|
|
|
|
|
return ThoughtState.ActiveAtStage(1);
|
2021-07-26 15:19:49 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-10 00:51:12 +00:00
|
|
|
|
if(otherPawn.ageTracker?.Adult == null || !otherPawn.ageTracker.Adult)
|
2021-11-24 00:50:33 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-26 15:19:49 +00:00
|
|
|
|
if (ExpectationsUtility.CurrentExpectationFor(p).order <= ExpectationDefOf.VeryLow.order)
|
|
|
|
|
{
|
2021-11-17 19:52:07 +00:00
|
|
|
|
return ThoughtState.ActiveAtStage(2);
|
2021-07-26 15:19:49 +00:00
|
|
|
|
}
|
|
|
|
|
else if (ExpectationsUtility.CurrentExpectationFor(p).order <= ExpectationDefOf.Moderate.order)
|
|
|
|
|
{
|
2021-11-17 19:52:07 +00:00
|
|
|
|
return ThoughtState.ActiveAtStage(3);
|
2021-07-26 15:19:49 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2021-11-17 19:52:07 +00:00
|
|
|
|
return ThoughtState.ActiveAtStage(4);
|
2021-07-26 15:19:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|