mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2026-06-18 19:25:59 +00:00
59 lines
No EOL
1.5 KiB
C#
59 lines
No EOL
1.5 KiB
C#
using System.Collections.Generic;
|
|
using Verse;
|
|
using Verse.AI;
|
|
using RimWorld;
|
|
using rjw;
|
|
|
|
namespace RJWSexperience.Ideology
|
|
{
|
|
public class JobDriver_LewdTrainFeed : JobDriver_Train
|
|
{
|
|
protected override IEnumerable<Toil> MakeNewToils()
|
|
{
|
|
SetFinalizerJob(cond =>
|
|
cond == JobCondition.Succeeded
|
|
? JobMaker.MakeJob(RsiDefOf.Job.TrainLewd_Lovin, Animal)
|
|
: null
|
|
);
|
|
|
|
bool skipping = false;
|
|
foreach (var toil in base.MakeNewToils())
|
|
{
|
|
// Base has two sets of toils for feeding, which each begin with a toil named 'FeedToils'.
|
|
// Since we only want to feed once, we skip everything between the two.
|
|
if (toil.debugName == "FeedToils")
|
|
{
|
|
skipping = !skipping;
|
|
}
|
|
// Hold off on setting last interact time until sex is finished
|
|
if (skipping || toil.debugName == nameof(Toils_Interpersonal.SetLastInteractTime))
|
|
{
|
|
continue;
|
|
}
|
|
|
|
// Training to be handled by sex job
|
|
if (toil.debugName == nameof(Toils_Interpersonal.TryTrain))
|
|
{
|
|
break;
|
|
}
|
|
|
|
// Replace talk to animal interaction with RJW's one
|
|
if (toil.debugName == "TalkToAnimal" && Rand.Chance(0.5f))
|
|
{
|
|
toil.initAction = delegate
|
|
{
|
|
if (xxx.can_fuck(Animal))
|
|
{
|
|
pawn.interactions.TryInteractWith(Animal, RsiDefOf.Interaction.AnimalSexTameChatMale);
|
|
}
|
|
else
|
|
{
|
|
pawn.interactions.TryInteractWith(Animal, RsiDefOf.Interaction.AnimalSexTameChatFemale);
|
|
}
|
|
};
|
|
}
|
|
yield return toil;
|
|
}
|
|
}
|
|
}
|
|
} |