compatibility w/ rjw 4.5.1

This commit is contained in:
c0ffeeeeeeee 2020-12-01 15:41:22 -08:00
parent 15b7e76f43
commit 54381c7655
4 changed files with 27 additions and 22 deletions

12
.gitignore vendored
View file

@ -337,4 +337,14 @@ ASALocalRun/
.localhistory/ .localhistory/
# BeatPulse healthcheck temp database # BeatPulse healthcheck temp database
healthchecksdb healthchecksdb
/Source/Patches/PawnAnimationPatches/HarmonyPatch_Pawn_DrawTracker.cs
/Source/Patches/PawnAnimationPatches/HarmonyPatch_PawnRotation.cs
/Source/Patches/PawnAnimationPatches/HarmonyPatch_PawnRenderer.cs
/Source/Patches/OtherModPatches/HarmonyPatch_ShowHairWithHats.cs
/Source/Patches/OtherModPatches/HarmonyPatch_FacialAnimation.cs
/Source/Patches/OtherModPatches/HarmonyPatch_DontShaveYourHead.cs
/Source/Patches/OtherModPatches/HarmonyPatch_CSL.cs
/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs
/Source/Patches/ThingAnimationPatches/HarmonyPatch_ThingDrawAt.cs
/Defs/AnimationDefs/Animations_SexToys.xml

View file

@ -121,8 +121,6 @@ namespace Rimworld_Animations {
//they'll just do the thrusting anim //they'll just do the thrusting anim
} }
} }
} }
} }

View file

@ -37,30 +37,27 @@ namespace Rimworld_Animations {
if (pawn.mindState?.duty?.def == DutyDefOf.TravelOrLeave) { if (pawn.mindState?.duty?.def == DutyDefOf.TravelOrLeave) {
// TODO: Some guest pawns keep the TravelOrLeave duty the whole time, I think the ones assigned to guard the pack animals. // TODO: Some guest pawns keep the TravelOrLeave duty the whole time, I think the ones assigned to guard the pack animals.
// That's probably ok, though it wasn't the intention. // That's probably ok, though it wasn't the intention.
if (RJWSettings.DebugLogJoinInBed) Log.Message($"[RJW] JoinInBed.TryGiveJob:({xxx.get_pawnname(pawn)}): has TravelOrLeave, no time for lovin!"); if (RJWSettings.DebugLogJoinInBed) ModLog.Message($"JoinInBed.TryGiveJob:({xxx.get_pawnname(pawn)}): has TravelOrLeave, no time for lovin [ANIM JOBGIVER]!");
return false; return false;
} }
if (pawn.CurJob == null || pawn.CurJob.def == JobDefOf.LayDown) { if ((pawn.CurJob == null || pawn.CurJob.def == JobDefOf.LayDown) && CasualSex_Helper.CanHaveSex(pawn)) {
//--Log.Message(" checking pawn and abilities"); //--Log.Message(" finding partner");
if (xxx.can_fuck(pawn) || xxx.can_be_fucked(pawn)) { Pawn partner = CasualSex_Helper.find_partner(pawn, pawn.Map, bedsex: true);
//--Log.Message(" finding partner");
Pawn partner = JobGiver_JoinInBed.find_pawn_to_fuck(pawn, pawn.Map);
//--Log.Message(" checking partner"); //--Log.Message(" checking partner");
if (partner == null) if (partner == null)
return false;
// Can never be null, since find checks for bed.
Building_Bed bed = partner.CurrentBed();
// Interrupt current job.
if (pawn.CurJob != null && pawn.jobs.curDriver != null)
pawn.jobs.curDriver.EndJobWith(JobCondition.InterruptForced);
__result = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), partner, bed);
return false; return false;
}
// Can never be null, since find checks for bed.
Building_Bed bed = partner.CurrentBed();
// Interrupt current job.
if (pawn.CurJob != null && pawn.jobs.curDriver != null)
pawn.jobs.curDriver.EndJobWith(JobCondition.InterruptForced);
__result = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), partner, bed);
return false;
} }
return false; return false;