mirror of
https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
synced 2024-08-14 23:57:38 +00:00
hucow changes
This commit is contained in:
parent
064871641c
commit
5e807217bc
21 changed files with 373 additions and 23 deletions
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,21 +24,20 @@ namespace CRIALactation
|
|||
base.CompTick();
|
||||
Pawn p = this.parent as Pawn;
|
||||
|
||||
if (!isActive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!p.IsHashIntervalTick(100))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (LactationUtility.IsLactating(p))
|
||||
{
|
||||
InductionCompletionPercent = 0.8f;
|
||||
isActive = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(TicksSinceLastMassage + OneDayInTicks / Props.TimesMassagedADay < GenTicks.TicksGame)
|
||||
{
|
||||
CanMassage = true;
|
||||
|
@ -53,7 +52,7 @@ namespace CRIALactation
|
|||
|
||||
LactationUtility.StartLactating(p, true);
|
||||
isActive = false;
|
||||
InductionCompletionPercent = 0.6f; //start at 60% in case they ever lose lactating again
|
||||
InductionCompletionPercent = 0.80f; //start at 80% in case they ever lose lactating again
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue