mirror of
https://gitgud.io/c0ffeeeeeeee/rjw-toys-and-masturbation.git
synced 2024-08-15 00:43:44 +00:00
bonus mood, thinknode AI
This commit is contained in:
parent
1b49e235cf
commit
da8939c4b8
9 changed files with 95 additions and 9 deletions
|
@ -21,20 +21,59 @@ namespace RJW_ToysAndMasturbation {
|
|||
if (!xxx.can_be_fucked(pawn) && !xxx.can_fuck(pawn)) {
|
||||
return null;
|
||||
}
|
||||
if ((SexUtility.ReadyForLovin(pawn) && (!xxx.is_whore(pawn) || pawn.IsPrisoner || xxx.is_slave(pawn))) || xxx.is_frustrated(pawn)) {
|
||||
if (RJWPreferenceSettings.FapInBed && pawn.jobs.curDriver is JobDriver_LayDown) {
|
||||
Building_Bed bed = ((JobDriver_LayDown)pawn.jobs.curDriver).Bed;
|
||||
if (bed != null) {
|
||||
return JobMaker.MakeJob(xxx.Masturbate, null, bed, bed.Position);
|
||||
|
||||
if(findSexToyOnMap(pawn, out Thing sexToy)) {
|
||||
if ((SexUtility.ReadyForLovin(pawn) && (!xxx.is_whore(pawn) || pawn.IsPrisoner || xxx.is_slave(pawn))) || xxx.is_frustrated(pawn)) {
|
||||
if (RJWPreferenceSettings.FapInBed && pawn.jobs.curDriver is JobDriver_LayDown) {
|
||||
Building_Bed bed = ((JobDriver_LayDown)pawn.jobs.curDriver).Bed;
|
||||
if (bed != null) {
|
||||
|
||||
Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, sexToy, bed, bed.Position);
|
||||
j.count = 1;
|
||||
return j;
|
||||
|
||||
}
|
||||
}
|
||||
else if (RJWPreferenceSettings.FapEverywhere && (xxx.is_frustrated(pawn) || xxx.has_quirk(pawn, "Exhibitionist"))) {
|
||||
Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, sexToy, null, FapLocation(pawn));
|
||||
j.count = 1;
|
||||
return j;
|
||||
}
|
||||
|
||||
}
|
||||
else if (RJWPreferenceSettings.FapEverywhere && (xxx.is_frustrated(pawn) || xxx.has_quirk(pawn, "Exhibitionist"))) {
|
||||
return JobMaker.MakeJob(xxx.Masturbate, null, null, FapLocation(pawn));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public static bool findSexToyOnMap(Pawn p, out Thing sexToy) {
|
||||
|
||||
Predicate<Thing> validator = delegate (Thing t) {
|
||||
if(t.TryGetComp<CompSexToy>() == null) {
|
||||
return false;
|
||||
}
|
||||
//homo check
|
||||
if (t.TryGetComp<CompSexToy>().Props.primaryGender == p.gender ||
|
||||
(t.TryGetComp<CompSexToy>().Props.primaryGender == Gender.Male && xxx.can_fuck(p) && (RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.Homo)) ||
|
||||
(t.TryGetComp<CompSexToy>().Props.primaryGender == Gender.Female && xxx.can_be_fucked(p) && (RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.Homo)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
sexToy = GenClosest.ClosestThingReachable(p.Position, p.Map, ThingRequest.ForGroup(ThingRequestGroup.HaulableAlways), PathEndMode.OnCell, TraverseParms.For(p), validator: validator, maxDistance: 100);
|
||||
|
||||
if (sexToy != null)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue