mirror of
https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
synced 2024-08-14 23:57:38 +00:00
35 lines
1 KiB
C#
35 lines
1 KiB
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 CompAbilityEffect_ConvertHucow : CompAbilityEffect
|
|
{
|
|
|
|
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
|
{
|
|
Pawn pawn = target.Pawn;
|
|
return pawn != null && AbilityUtility.ValidateMustBeHuman(pawn, throwMessages) &&
|
|
AbilityUtility.ValidateNoMentalState(pawn, throwMessages) &&
|
|
AbilityUtility.ValidateSameIdeo(this.parent.pawn, pawn, throwMessages) &&
|
|
LactationUtility.IsLactating(pawn) &&
|
|
!LactationUtility.IsHucow(pawn);
|
|
|
|
}
|
|
|
|
|
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
|
{
|
|
base.Apply(target, dest);
|
|
Pawn pawn = target.Pawn;
|
|
LactationUtility.ExtendLactationDuration(pawn);
|
|
}
|
|
}
|
|
}
|