coffees-rjw-ideology-addons/CRIALactation/Source/Precepts/PreceptComp_Lactation.cs
dominiclopez391 a5d5cc1d44 changes to lactation hediffs:
prisoners can be milked
pawns spawn lactating by default with hucow precept
2021-11-15 14:58:49 -08:00

33 lines
804 B
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 PreceptComp_Lactation : PreceptComp
{
public override void Notify_MemberGenerated(Pawn pawn, Precept precept)
{
if(precept.def == PreceptDefOf_Lactation.Lactating_Essential &&
LactationUtility.HasMilkableBreasts(pawn))
{
if (!LactationUtility.IsLactating(pawn))
{
LactationUtility.StartLactating(pawn, pawn.relations.ChildrenCount > 0);
Log.Message("Creating pawn with lact" + pawn.Name);
}
}
}
}
}