mc for onslort 1.4

This commit is contained in:
c0ffee 2023-02-05 19:05:01 -08:00
parent 711a61a31a
commit 396cbb8c56
23 changed files with 237 additions and 43 deletions

View file

@ -13,7 +13,7 @@ namespace CRIALactation
{
public class JobDriver_MassageBreasts : JobDriver
{
private readonly float WorkTotal = 300f;
private readonly float WorkTotal = 600f;
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
@ -47,7 +47,24 @@ namespace CRIALactation
Pawn p = job.GetTarget(TargetIndex.A).Thing as Pawn;
if (massageProgress >= WorkTotal)
{
p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp<HediffComp_LactationInduction>().massage(pawn);
Hediff induce = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
induce.Severity += (1f / LactationSettings.totalMassagesUntilLactation);
//0.05f ; //20 times, 3 times a day = 7 days, give or take
if (induce.Severity >= 1)
{
//p.health.AddHediff(cooldown,
LactationUtility.StartLactating(p, true);
//remove the other hediff
p.health.RemoveHediff(induce);
}
//Add cooldown hediff. This has the pain debuff so i'm going to add it even if you're now lactating. The last one would have still hurt.
Hediff cooldown = HediffMaker.MakeHediff(HediffDefOf_Milk.InducingLactationCooldown, p, null);
cooldown.Severity = LactationSettings.massageCooldown;
p.health.AddHediff(cooldown, null, null, null);
return JobCondition.Succeeded;
}