Fix folders and namespaces (except for the Rituals)

This commit is contained in:
amevarashi 2022-10-14 21:35:31 +05:00
parent 17a8264b49
commit 075260f091
47 changed files with 46 additions and 138 deletions

View file

@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using rjw;
using Verse;
using Verse.AI;
using RimWorld;
namespace RJWSexperience.Ideology
{
public class JobGiver_DrugOrgy : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
if (pawn.Drafted) return null;
DutyDef dutyDef = null;
PawnDuty duty = null;
if (pawn.mindState != null)
{
duty = pawn.mindState.duty;
dutyDef = duty.def;
}
else return null;
if (dutyDef == DutyDefOf.TravelOrLeave || !xxx.can_do_loving(pawn))
{
return null;
}
Pawn target = FindPartner(pawn, duty);
if (target == null || !pawn.CanReserveAndReach(target, PathEndMode.ClosestTouch, Danger.None,1)) return JobMaker.MakeJob(VariousDefOf.DrugMasturbate);
return JobMaker.MakeJob(VariousDefOf.DrugSex, target);
}
protected Pawn FindPartner(Pawn pawn, PawnDuty duty)
{
if (duty != null)
{
List<Pawn> pawns = pawn.Map.mapPawns.AllPawnsSpawned.FindAll(x => x.mindState?.duty?.def == duty.def);
return pawns.RandomElementByWeightWithDefault(x => SexAppraiser.would_fuck(pawn,x), 0.1f);
}
return null;
}
}
/// <summary>
/// copied from rjw
/// </summary>
public class JobDriver_SexDrugOrgy : JobDriver_SexBaseInitiator
{
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return true;
}
protected override IEnumerable<Toil> MakeNewToils()
{
setup_ticks();
var PartnerJob = VariousDefOf.GettinDrugSex;
this.FailOnDespawnedNullOrForbidden(iTarget);
this.FailOn(() => !Partner.health.capacities.CanBeAwake);
this.FailOn(() => pawn.Drafted);
this.FailOn(() => Partner == null);
yield return Toils_Goto.GotoThing(iTarget, PathEndMode.OnCell);
Toil WaitForPartner = new Toil();
WaitForPartner.defaultCompleteMode = ToilCompleteMode.Delay;
WaitForPartner.initAction = delegate
{
ticksLeftThisToil = 5000;
};
WaitForPartner.tickAction = delegate
{
pawn.GainComfortFromCellIfPossible();
if (pawn.Position.DistanceTo(Partner.Position) <= 1f)
{
ReadyForNextToil();
}
};
yield return WaitForPartner;
Toil StartPartnerJob = new Toil();
StartPartnerJob.defaultCompleteMode = ToilCompleteMode.Instant;
StartPartnerJob.socialMode = RandomSocialMode.Off;
StartPartnerJob.initAction = delegate
{
var dri = Partner.jobs.curDriver as JobDriver_DrugSexReceiver;
if (dri == null)
{
Job gettingQuickie = JobMaker.MakeJob(PartnerJob, pawn, Partner);
Partner.jobs.StartJob(gettingQuickie, JobCondition.InterruptForced);
}
};
yield return StartPartnerJob;
Toil SexToil = new Toil();
SexToil.defaultCompleteMode = ToilCompleteMode.Never;
SexToil.socialMode = RandomSocialMode.Off;
SexToil.defaultDuration = duration;
SexToil.handlingFacing = true;
SexToil.FailOn(() => Partner.CurJob.def != PartnerJob);
SexToil.initAction = delegate
{
Partner.pather.StopDead();
Partner.jobs.curDriver.asleep = false;
Start();
Sexprops.usedCondom = CondomUtility.TryUseCondom(pawn) || CondomUtility.TryUseCondom(Partner);
};
SexToil.AddPreTickAction(delegate
{
SexTick(pawn, Partner);
SexUtility.reduce_rest(Partner, 1);
SexUtility.reduce_rest(pawn, 1);
if (ticks_left <= 0)
ReadyForNextToil();
});
SexToil.AddFinishAction(delegate
{
End();
});
yield return SexToil;
yield return new Toil
{
initAction = delegate
{
//// Trying to add some interactions and social logs
SexUtility.ProcessSex(Sexprops);
},
defaultCompleteMode = ToilCompleteMode.Instant
};
}
}
/// <summary>
/// copied from rjw
/// </summary>
public class JobDriver_DrugSexReceiver : JobDriver_SexBaseRecieverLoved
{
protected override IEnumerable<Toil> MakeNewToils()
{
setup_ticks();
parteners.Add(Partner);// add job starter, so this wont fail, before Initiator starts his job
// More/less hearts based on opinion.
if (pawn.relations.OpinionOf(Partner) < 0)
ticks_between_hearts += 50;
else if (pawn.relations.OpinionOf(Partner) > 60)
ticks_between_hearts -= 25;
this.FailOnDespawnedOrNull(iTarget);
this.FailOn(() => !Partner.health.capacities.CanBeAwake);
this.FailOn(() => pawn.Drafted);
this.FailOn(() => Partner.Drafted);
this.FailOn(() => Partner == null);
yield return Toils_Reserve.Reserve(iTarget, 1, 0);
var get_loved = MakeSexToil();
get_loved.handlingFacing = false;
yield return get_loved;
}
protected Toil MakeSexToil()
{
Toil get_loved = new Toil();
get_loved.defaultCompleteMode = ToilCompleteMode.Never;
get_loved.socialMode = RandomSocialMode.Off;
get_loved.handlingFacing = true;
get_loved.tickAction = delegate
{
};
get_loved.AddEndCondition(new Func<JobCondition>(() =>
{
if (parteners.Count <= 0)
{
return JobCondition.Succeeded;
}
return JobCondition.Ongoing;
}));
get_loved.AddFinishAction(delegate
{
if (xxx.is_human(pawn))
pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
});
get_loved.socialMode = RandomSocialMode.Off;
return get_loved;
}
}
/// <summary>
/// copied from rjw
/// </summary>
public class JobDriver_DrugMasturabate : JobDriver_Masturbate
{
protected override IEnumerable<Toil> MakeNewToils()
{
setup_ticks();
this.FailOn(() => pawn.health.Downed);
this.FailOn(() => pawn.IsBurning());
this.FailOn(() => pawn.IsFighting());
this.FailOn(() => pawn.Drafted);
Toil SexToil = Toils_General.Wait(duration);
SexToil.handlingFacing = true;
SexToil.initAction = delegate
{
Start();
};
SexToil.tickAction = delegate
{
SexTick(pawn, null, true);
SexUtility.reduce_rest(pawn, 1);
if (ticks_left <= 0)
ReadyForNextToil();
};
SexToil.AddFinishAction(delegate
{
End();
});
yield return SexToil;
yield return new Toil
{
initAction = delegate
{
SexUtility.Aftersex(Sexprops);
if (!SexUtility.ConsiderCleaning(pawn)) return;
LocalTargetInfo own_cum = pawn.PositionHeld.GetFirstThing<Filth>(pawn.Map);
Job clean = JobMaker.MakeJob(JobDefOf.Clean);
clean.AddQueuedTarget(TargetIndex.A, own_cum);
pawn.jobs.jobQueue.EnqueueFirst(clean);
},
defaultCompleteMode = ToilCompleteMode.Instant
};
}
}
}

View file

@ -0,0 +1,159 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using Verse.AI.Group;
using RimWorld;
using rjw;
namespace RJWSexperience.Ideology
{
public class JobGiver_GangbangConsensual : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
if (pawn.Drafted) return null;
DutyDef dutyDef = null;
PawnDuty duty = null;
if (pawn.mindState != null)
{
duty = pawn.mindState.duty;
dutyDef = duty.def;
}
else return null;
if (dutyDef == DutyDefOf.TravelOrLeave || !xxx.can_do_loving(pawn))
{
return null;
}
Pawn target = duty.focusSecond.Pawn;
if (!pawn.CanReach(target, PathEndMode.ClosestTouch, Danger.None)) return null;
return JobMaker.MakeJob(VariousDefOf.Gangbang, target);
}
}
public class JobDriver_Gangbang : JobDriver_SexBaseInitiator
{
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return true;
}
protected override IEnumerable<Toil> MakeNewToils()
{
setup_ticks();
this.FailOnDespawnedNullOrForbidden(iTarget);
this.FailOn(() => Partner == null);
this.FailOn(() => pawn.Drafted);
this.FailOn(() => Partner.Drafted);
yield return Toils_Goto.GotoThing(iTarget, PathEndMode.OnCell);
Toil StartPartnerJob = new Toil();
StartPartnerJob.defaultCompleteMode = ToilCompleteMode.Instant;
StartPartnerJob.socialMode = RandomSocialMode.Off;
StartPartnerJob.initAction = delegate
{
var dri = Partner.jobs.curDriver as JobDriver_SexBaseRecieverRaped;
if (dri == null)
{
Job gettin_loved = JobMaker.MakeJob(VariousDefOf.GettinGangbang, pawn, Bed);
Partner.jobs.StartJob(gettin_loved, JobCondition.InterruptForced);
}
};
yield return StartPartnerJob;
Toil SexToil = new Toil();
SexToil.defaultCompleteMode = ToilCompleteMode.Never;
SexToil.defaultDuration = duration;
SexToil.handlingFacing = true;
SexToil.FailOn(() => Partner.CurJob.def != VariousDefOf.GettinGangbang);
SexToil.initAction = delegate
{
Start();
Sexprops.usedCondom = CondomUtility.TryUseCondom(pawn) || CondomUtility.TryUseCondom(Partner);
};
SexToil.AddPreTickAction(delegate
{
SexTick(pawn, Partner);
SexUtility.reduce_rest(Partner, 1);
SexUtility.reduce_rest(pawn, 2);
if (ticks_left <= 0)
ReadyForNextToil();
});
SexToil.AddFinishAction(delegate
{
End();
});
yield return SexToil;
yield return new Toil
{
initAction = delegate
{
// Trying to add some interactions and social logs
SexUtility.ProcessSex(Sexprops);
},
defaultCompleteMode = ToilCompleteMode.Instant
};
}
}
public class JobDriver_GangbangReceiver : JobDriver_SexBaseRecieverLoved
{
protected override IEnumerable<Toil> MakeNewToils()
{
setup_ticks();
parteners.Add(Partner);// add job starter, so this wont fail, before Initiator starts his job
Toil get_banged = new Toil();
get_banged.defaultCompleteMode = ToilCompleteMode.Never;
get_banged.handlingFacing = true;
get_banged.initAction = delegate
{
pawn.pather.StopDead();
pawn.jobs.curDriver.asleep = false;
};
get_banged.tickAction = delegate
{
if ((parteners.Count > 0) && pawn.IsHashIntervalTick(ticks_between_hearts / parteners.Count) && pawn.IsHashIntervalTick(ticks_between_hearts))
ThrowMetaIconF(pawn.Position, pawn.Map, FleckDefOf.Heart);
};
get_banged.AddEndCondition(new Func<JobCondition>(() =>
{
if (parteners.Count <= 0)
{
return JobCondition.Succeeded;
}
return JobCondition.Ongoing;
}));
get_banged.AddFinishAction(delegate
{
if (xxx.is_human(pawn))
pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
if (Bed != null && pawn.Downed)
{
Job tobed = JobMaker.MakeJob(JobDefOf.Rescue, pawn, Bed);
tobed.count = 1;
Partner.jobs.jobQueue.EnqueueFirst(tobed);
}
else if (pawn.HostileTo(Partner))
pawn.health.AddHediff(xxx.submitting);
});
get_banged.socialMode = RandomSocialMode.Off;
yield return get_banged;
}
}
}

View file

@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using Verse.AI.Group;
using RimWorld;
using rjw;
namespace RJWSexperience.Ideology
{
public class JobGiver_GangbangVictim : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
if (pawn.Drafted) return null;
DutyDef dutyDef = null;
PawnDuty duty = null;
if (pawn.mindState != null)
{
duty = pawn.mindState.duty;
dutyDef = duty.def;
}
else return null;
if (dutyDef == DutyDefOf.TravelOrLeave || !xxx.can_do_loving(pawn))
{
return null;
}
Pawn target = duty.focusSecond.Pawn;
if (!pawn.CanReach(target, PathEndMode.ClosestTouch, Danger.None)) return null;
return JobMaker.MakeJob(VariousDefOf.RapeVictim, target);
}
}
/// <summary>
/// copied from rjw
/// </summary>
public class JobDriver_RapeVictim : JobDriver_Rape
{
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return true;
}
protected override IEnumerable<Toil> MakeNewToils()
{
if (RJWSettings.DebugRape) ModLog.Message("" + this.GetType().ToString() + "::MakeNewToils() called");
setup_ticks();
var PartnerJob = xxx.gettin_raped;
this.FailOnDespawnedNullOrForbidden(iTarget);
this.FailOn(() => Partner == null);
this.FailOn(() => pawn.Drafted);
this.FailOn(() => Partner.Drafted);
yield return Toils_Goto.GotoThing(iTarget, PathEndMode.OnCell);
SexUtility.RapeTargetAlert(pawn, Partner);
Toil StartPartnerJob = new Toil();
StartPartnerJob.defaultCompleteMode = ToilCompleteMode.Instant;
StartPartnerJob.socialMode = RandomSocialMode.Off;
StartPartnerJob.initAction = delegate
{
var dri = Partner.jobs.curDriver as JobDriver_SexBaseRecieverRaped;
if (dri == null)
{
Job gettin_raped = JobMaker.MakeJob(PartnerJob, pawn);
Partner.jobs.StartJob(gettin_raped, JobCondition.InterruptForced, null, false, true, null);
}
};
yield return StartPartnerJob;
Toil SexToil = new Toil();
SexToil.defaultCompleteMode = ToilCompleteMode.Never;
SexToil.defaultDuration = duration;
SexToil.handlingFacing = true;
SexToil.FailOn(() => Partner.CurJob.def != PartnerJob);
SexToil.initAction = delegate
{
Partner.pather.StopDead();
Partner.jobs.curDriver.asleep = false;
if (RJWSettings.DebugRape) ModLog.Message("JobDriver_RapeComfortPawn::MakeNewToils() - reserving prisoner");
Start();
};
SexToil.tickAction = delegate
{
SexTick(pawn, Partner);
SexUtility.reduce_rest(Partner, 1);
SexUtility.reduce_rest(pawn, 2);
if (ticks_left <= 0)
ReadyForNextToil();
};
SexToil.AddFinishAction(delegate
{
End();
});
yield return SexToil;
yield return new Toil
{
initAction = delegate
{
// Trying to add some interactions and social logs
SexUtility.ProcessSex(Sexprops);
Partner.records.Increment(xxx.GetRapedAsComfortPawn);
},
defaultCompleteMode = ToilCompleteMode.Instant
};
}
}
}

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using RimWorld;
namespace RJWSexperience.Ideology
{
public class LordJob_Ritual_Gangbang : LordJob_Ritual
{
public LordJob_Ritual_Gangbang() { }
public LordJob_Ritual_Gangbang(string targetID ,TargetInfo selectedTarget, Precept_Ritual ritual, RitualObligation obligation, List<RitualStage> allStages, RitualRoleAssignments assignments, Pawn organizer = null) : base(selectedTarget, ritual, obligation, allStages, assignments, organizer)
{
foreach (RitualRole ritualRole in assignments.AllRolesForReading)
{
if (ritualRole != null && ritualRole.id.Contains(targetID))
{
Pawn item = assignments.FirstAssignedPawn(ritualRole);
pawnsDeathIgnored.Add(item);
}
}
}
}
}

View file

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using Verse.AI.Group;
namespace RJWSexperience.Ideology
{
public class RitualBehaviorWorker_Gangbang : RitualBehaviorWorker
{
public RitualBehaviorWorker_Gangbang() { }
public RitualBehaviorWorker_Gangbang(RitualBehaviorDef def) : base(def) { }
public override void PostCleanup(LordJob_Ritual ritual)
{
Pawn warden = ritual.PawnWithRole("initiator");
Pawn pawn = ritual.PawnWithRole("victim");
if (pawn.IsPrisonerOfColony)
{
WorkGiver_Warden_TakeToBed.TryTakePrisonerToBed(pawn, warden);
pawn.guest.WaitInsteadOfEscapingFor(1250);
}
}
protected override LordJob CreateLordJob(TargetInfo target, Pawn organizer, Precept_Ritual ritual, RitualObligation obligation, RitualRoleAssignments assignments)
{
return new LordJob_Ritual_Gangbang("victim", target, ritual, obligation, def.stages, assignments, organizer);
}
}
public class RitualBehaviorWorker_Gangbang_Consensual : RitualBehaviorWorker
{
public RitualBehaviorWorker_Gangbang_Consensual() { }
public RitualBehaviorWorker_Gangbang_Consensual(RitualBehaviorDef def) : base(def) { }
protected override LordJob CreateLordJob(TargetInfo target, Pawn organizer, Precept_Ritual ritual, RitualObligation obligation, RitualRoleAssignments assignments)
{
return new LordJob_Ritual_Gangbang("initiator", target, ritual, obligation, def.stages, assignments, organizer);
}
}
public class RitualStage_InteractWithVictim : RitualStage
{
public override TargetInfo GetSecondFocus(LordJob_Ritual ritual)
{
return ritual.assignments.AssignedPawns("victim").FirstOrDefault(p => RitualRole_RapeVictim.CanBeVictim(p));
}
}
public class RitualStage_InteractWithVictim_All : RitualStage
{
public override TargetInfo GetSecondFocus(LordJob_Ritual ritual)
{
return ritual.assignments.AssignedPawns("victim").FirstOrDefault();
}
}
public class RitualStage_InteractWithInitiator : RitualStage
{
public override TargetInfo GetSecondFocus(LordJob_Ritual ritual)
{
return ritual.assignments.AssignedPawns("initiator").FirstOrDefault();
}
}
}

View file

@ -0,0 +1,86 @@
using RimWorld;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology
{
public class RitualOutcomeComp_HediffBased : RitualOutcomeComp_QualitySingleOffset
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public HediffDef hediffDef = null;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float minSeverity = 0;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public string roleId = "";
protected override string LabelForDesc => label;
public override bool DataRequired => false;
public override bool Applies(LordJob_Ritual ritual)
{
Pawn victim = null;
foreach (RitualRole ritualRole in ritual.assignments.AllRolesForReading)
{
if (ritualRole?.id.Contains(roleId) == true)
{
victim = ritual.assignments.FirstAssignedPawn(ritualRole);
}
}
if (victim != null && hediffDef != null)
{
Hediff hediff = victim.health.hediffSet.GetFirstHediffOfDef(hediffDef);
if (hediff?.Severity >= minSeverity)
{
return true;
}
}
return false;
}
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
{
return new ExpectedOutcomeDesc
{
label = LabelForDesc.CapitalizeFirst(),
present = false,
uncertainOutcome = true,
effect = ExpectedOffsetDesc(true, -1f),
quality = qualityOffset,
positive = true
};
}
}
public class RitualOutcomeComp_NeedBased : RitualOutcomeComp_QualitySingleOffset
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public NeedDef needDef = null;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float minAvgNeed = 0;
protected override string LabelForDesc => label;
public override bool DataRequired => false;
public override bool Applies(LordJob_Ritual ritual)
{
float avgNeed = 0;
foreach (Pawn pawn in ritual.assignments.AllPawns)
{
avgNeed += pawn.needs?.TryGetNeed(needDef)?.CurLevel ?? 0f;
}
avgNeed /= ritual.assignments.AllPawns.Count;
return avgNeed >= minAvgNeed;
}
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
{
return new ExpectedOutcomeDesc
{
label = LabelForDesc.CapitalizeFirst(),
present = false,
uncertainOutcome = true,
effect = ExpectedOffsetDesc(true, -1f),
quality = qualityOffset,
positive = true
};
}
}
}

View file

@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using rjw;
namespace RJWSexperience.Ideology
{
public class RitualRole_RapeVictim : RitualRole
{
public override bool AppliesToRole(Precept_Role role, out string reason, Precept_Ritual ritual = null, Pawn pawn = null, bool skipReason = false)
{
reason = null;
return false;
}
public override bool AppliesToPawn(Pawn p, out string reason, LordJob_Ritual ritual = null, RitualRoleAssignments assignments = null, Precept_Ritual precept = null, bool skipReason = false)
{
reason = null;
if (CanBeVictim(p)) return true;
if (!skipReason)
{
reason = Keyed.RSVictimCondition;
}
return false;
}
public static bool CanBeVictim(Pawn pawn)
{
if (pawn.IsPrisonerOfColony || pawn.IsSlaveOfColony) return true;
if (pawn.IsSubmissive()) return true;
if (pawn.IsDesignatedComfort() || (pawn.guilt != null && pawn.guilt.IsGuilty) || (pawn.apparel != null && pawn.apparel.PsychologicallyNude)) return true;
return false;
}
}
public class RitualRole_HumanBreedee : RitualRole
{
public override bool AppliesToRole(Precept_Role role, out string reason, Precept_Ritual ritual = null, Pawn pawn = null, bool skipReason = false)
{
reason = null;
return false;
}
public override bool AppliesToPawn(Pawn p, out string reason, LordJob_Ritual ritual = null, RitualRoleAssignments assignments = null, Precept_Ritual precept = null, bool skipReason = false)
{
reason = null;
if (!xxx.is_human(p))
{
reason = Keyed.RSNotHuman;
return false;
}
if (CanBeBreedee(p)) return true;
if (!skipReason)
{
reason = Keyed.RSShouldCanFuck;
}
return false;
}
public static bool CanBeBreedee(Pawn pawn)
{
if (xxx.can_be_fucked(pawn)) return true;
return false;
}
}
public class RitualRole_AnimalBreeder : RitualRole
{
public override bool Animal => true;
public override bool AppliesToRole(Precept_Role role, out string reason, Precept_Ritual ritual = null, Pawn pawn = null, bool skipReason = false)
{
reason = null;
return false;
}
public override bool AppliesToPawn(Pawn p, out string reason, LordJob_Ritual ritual = null, RitualRoleAssignments assignments = null, Precept_Ritual precept = null, bool skipReason = false)
{
reason = null;
if (!p.IsAnimal())
{
reason = Keyed.RSNotAnimal;
return false;
}
if (CanBeBreeder(p, assignments?.Ritual)) return true;
if (!skipReason)
{
reason = Keyed.RSBreederCondition;
}
return false;
}
public static bool CanBeBreeder(Pawn animal, Precept_Ritual precept)
{
if (precept != null && precept.ideo.HasPrecept(VariousDefOf.Bestiality_OnlyVenerated) && !precept.ideo.IsVeneratedAnimal(animal))
{
return false;
}
if (!xxx.can_rape(animal)) return false;
return true;
}
}
}