2021-07-26 04:06:00 +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
|
|
|
|
|
{
|
2021-07-26 15:19:49 +00:00
|
|
|
|
/** //doesn't work because inheritance problems with rimworld
|
2021-07-26 04:06:00 +00:00
|
|
|
|
public class Precept_Lactation : Precept
|
|
|
|
|
{
|
2021-07-26 15:19:49 +00:00
|
|
|
|
|
2021-07-26 04:06:00 +00:00
|
|
|
|
public override void Notify_MemberSpawned(Pawn pawn)
|
|
|
|
|
{
|
2021-07-26 15:19:49 +00:00
|
|
|
|
Log.Message("spawning pawn with lact");
|
|
|
|
|
if (!pawn.IsColonistPlayerControlled && !LactationUtility.IsLactating(pawn))
|
|
|
|
|
{
|
|
|
|
|
LactationUtility.StartLactating(pawn, pawn.relations.ChildrenCount > 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//spawned into map
|
2021-07-26 04:06:00 +00:00
|
|
|
|
base.Notify_MemberSpawned(pawn);
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-26 15:19:49 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 04:06:00 +00:00
|
|
|
|
}
|
2021-07-26 15:19:49 +00:00
|
|
|
|
**/
|
2021-07-26 04:06:00 +00:00
|
|
|
|
}
|