fixed a bug causing multiple casual sex to not play orgy anim + more bodytype offsets

This commit is contained in:
Platinum 2020-05-10 17:14:45 -07:00
parent b5b4073b08
commit eb325a8dce
6 changed files with 19 additions and 7 deletions

View file

@ -20,6 +20,9 @@
</defNames>
<isFucking>true</isFucking>
<initiator>true</initiator>
<bodyTypeOffset>
<Hulk>(0, 0.2)</Hulk>
</bodyTypeOffset>
</li>
<li>
<defNames>
@ -27,6 +30,9 @@
</defNames>
<isFucking>true</isFucking>
<initiator>true</initiator>
<bodyTypeOffset>
<Hulk>(0, 0.2)</Hulk>
</bodyTypeOffset>
</li>
</actors>

View file

@ -182,5 +182,9 @@ namespace Rimworld_Animations {
GenDraw.DrawMeshNowOrLater(mesh, pawnHeadPosition, Quaternion.AngleAxis(pawnAnimator.headAngle, Vector3.up), material, portrait);
}
}
public static readonly JobDef JoinInBedAnimation = DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true);
public static readonly JobDef GettinLovedAnimation = DefDatabase<JobDef>.GetNamed("GettinLovedAnimation", true);
}
}

View file

@ -38,7 +38,7 @@ namespace Rimworld_Animations {
yield return Toils_Reserve.Reserve(ibed, Bed.SleepingSlotsCount, 0);
Toil get_loved = new Toil();
get_loved.FailOn(() => Partner.CurJobDef != DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true));
get_loved.FailOn(() => Partner.CurJobDef != AnimationUtility.JoinInBedAnimation);
get_loved.defaultCompleteMode = ToilCompleteMode.Never;
get_loved.socialMode = RandomSocialMode.Off;
get_loved.handlingFacing = true;

View file

@ -27,7 +27,7 @@ namespace Rimworld_Animations {
yield return Toils_Reserve.Reserve(ipartner, xxx.max_rapists_per_prisoner, 0, null);
Toil goToPawnInBed = Toils_Goto.GotoThing(ipartner, PathEndMode.OnCell);
goToPawnInBed.FailOn(() => !RestUtility.InBed(Partner) && !xxx.in_same_bed(Partner, pawn));
goToPawnInBed.FailOn(() => !(RestUtility.InBed(Partner) || Partner.CurJobDef == AnimationUtility.GettinLovedAnimation));
yield return goToPawnInBed;
@ -35,15 +35,17 @@ namespace Rimworld_Animations {
Toil startPartnerSex = new Toil();
startPartnerSex.initAction = delegate {
Job gettinLovedJob = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("GettinLovedAnimation"), pawn, Bed); // new gettin loved toil that wakes up the pawn goes here
if(Partner.CurJobDef != AnimationUtility.GettinLovedAnimation) {
Job gettinLovedJob = JobMaker.MakeJob(AnimationUtility.GettinLovedAnimation, pawn, Bed); // new gettin loved toil that wakes up the pawn goes here
Partner.jobs.jobQueue.EnqueueFirst(gettinLovedJob);
Partner.jobs.EndCurrentJob(JobCondition.InterruptForced);
}
Partner.jobs.jobQueue.EnqueueFirst(gettinLovedJob);
Partner.jobs.EndCurrentJob(JobCondition.InterruptForced);
};
yield return startPartnerSex;
Toil sexToil = new Toil();
sexToil.FailOn(() => (Partner.CurJobDef == null) || Partner.CurJobDef != DefDatabase<JobDef>.GetNamed("GettinLovedAnimation", true)); //partner jobdriver is not sexbaserecieverlovedforanim
sexToil.FailOn(() => (Partner.CurJobDef == null) || Partner.CurJobDef != AnimationUtility.GettinLovedAnimation); //partner jobdriver is not sexbaserecieverlovedforanim
sexToil.socialMode = RandomSocialMode.Off;
sexToil.defaultCompleteMode = ToilCompleteMode.Never;
sexToil.handlingFacing = true;

View file

@ -19,7 +19,7 @@ namespace Rimworld_Animations {
if(__result != null) {
Pawn partnerInMyBed = LovePartnerRelationUtility.GetPartnerInMyBed(pawn);
RestUtility.WakeUp(pawn);
__result = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), partnerInMyBed, partnerInMyBed.CurrentBed());
__result = JobMaker.MakeJob(AnimationUtility.JoinInBedAnimation, partnerInMyBed, partnerInMyBed.CurrentBed());
}
}
}