mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Merge branch 'master' into 'master'
Fix LoopNeverending Error See merge request c0ffeeeeeeee/rimworld-animations!18
This commit is contained in:
commit
15b0e2c9f6
1 changed files with 10 additions and 3 deletions
|
@ -4,6 +4,7 @@ using RimWorld;
|
|||
using rjw;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using Verse.Sound;
|
||||
|
||||
namespace Rimworld_Animations {
|
||||
|
@ -513,9 +514,15 @@ namespace Rimworld_Animations {
|
|||
|
||||
public bool LoopNeverending()
|
||||
{
|
||||
if(pawn?.jobs?.curDriver != null &&
|
||||
(pawn.jobs.curDriver is JobDriver_Sex) && (pawn.jobs.curDriver as JobDriver_Sex).neverendingsex ||
|
||||
(pawn.jobs.curDriver is JobDriver_SexBaseReciever) && (pawn.jobs.curDriver as JobDriver_Sex).Partner?.jobs?.curDriver != null && ((pawn.jobs.curDriver as JobDriver_Sex).Partner.jobs.curDriver as JobDriver_Sex).neverendingsex)
|
||||
JobDriver jobDriver = pawn?.jobs?.curDriver;
|
||||
if (jobDriver == null) return false;
|
||||
|
||||
if (jobDriver is JobDriver_Sex sexDriver && sexDriver.neverendingsex)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (jobDriver is JobDriver_SexBaseReciever sexReceiverDriver && sexReceiverDriver.Partner?.jobs?.curDriver is JobDriver_Sex partnerSexDriver && partnerSexDriver.neverendingsex)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue