coffees-rjw-ideology-addons/CRIALactation/Source/Comps/CompAbilityEffects/CompAbilityEffect_BeginInducingLactation.cs
c0ffee 5b4b203d13 replaced compinducelactation with hediffcomp; cleaner
todo:
add abilitydef to hucow handler to begin inducing lactation; give lactation induction hediff to recipient pawn
add thoughtdef w/ thoughtworker_hediff to give pawns thoughts on inducing lactation
2022-10-14 18:10:00 -07:00

28 lines
691 B
C#

using RimWorld;
using RimWorld.Planet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace CRIALactation
{
public class CompAbilityEffect_BeginInducingLactation : CompAbilityEffect
{
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
Pawn pawn = target.Pawn;
if (pawn == null) return false;
if (!pawn.IsColonistPlayerControlled || !pawn.IsSlaveOfColony || !pawn.IsPrisonerOfColony) return false;
if (LactationUtility.IsLactating(pawn)) return false;
return true;
}
}
}