protected override IEnumerable <Toil> MakeNewToils() { HediffComp_Menstruation Comp = pawn.GetMenstruationComp(); //this.FailOn(delegate //{ // return !(Comp.TotalCumPercent > 0.001); //}); yield return(Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.ClosestTouch)); Toil excreting = Toils_General.Wait(excretingTime, TargetIndex.None);//duration of excreting.WithProgressBarToilDelay(TargetIndex.A); yield return(excreting); yield return(new Toil() { initAction = delegate() { if (Comp.TotalCumPercent > 0.001) { CumMixture mixture = Comp.MixtureOut(RJWSexperience.VariousDefOf.GatheredCum, 0.5f); float amount = mixture.Volume; if (mixture.ispurecum) { Bucket.AddCum(amount); } else { GatheredCumMixture cummixture = (GatheredCumMixture)ThingMaker.MakeThing(VariousDefOf.GatheredCumMixture); cummixture.InitwithCum(mixture); Bucket.AddCum(amount, cummixture); } } else { ReadyForNextToil(); } if (Comp.TotalCumPercent > 0.001) { JumpToToil(excreting); } } }); Toil cleaning = new Toil(); cleaning.initAction = CleaningInit; cleaning.tickAction = CleaningTick; cleaning.AddFinishAction(Finish); cleaning.defaultCompleteMode = ToilCompleteMode.Never; cleaning.WithProgressBar(TargetIndex.A, () => progress / CleaningTime); yield return(cleaning); //yield return excreting; yield break; }