lactation precepts

This commit is contained in:
c0ffee12 2021-07-26 08:19:49 -07:00
parent edada8ff48
commit 5752647b4f
10 changed files with 231 additions and 17 deletions

View file

@ -10,13 +10,41 @@ using UnityEngine;
namespace CRIALactation
{
/** //doesn't work because inheritance problems with rimworld
public class Precept_Lactation : Precept
{
public override void Notify_MemberSpawned(Pawn pawn)
{
Log.Message("spawning pawn with lact");
if (!pawn.IsColonistPlayerControlled && !LactationUtility.IsLactating(pawn))
{
LactationUtility.StartLactating(pawn, pawn.relations.ChildrenCount > 0);
}
//spawned into map
base.Notify_MemberSpawned(pawn);
}
public override void Notify_MemberGenerated(Pawn pawn)
{
Log.Message("Creating pawn with lact");
//first created
if(pawn.IsColonistPlayerControlled && LactationUtility.HasMilkableBreasts(pawn))
{
if (!LactationUtility.IsLactating(pawn))
{
LactationUtility.StartLactating(pawn, pawn.relations.ChildrenCount > 0);
Log.Message("Creating pawn with lact" + pawn.Name);
}
}
base.Notify_MemberGenerated(pawn);
}
}
**/
}