mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
fix LoopNeverending error
This commit is contained in:
parent
33ebba94a7
commit
c6241be3fc
1 changed files with 10 additions and 3 deletions
|
@ -4,6 +4,7 @@ using RimWorld;
|
||||||
using rjw;
|
using rjw;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
using Verse.AI;
|
||||||
using Verse.Sound;
|
using Verse.Sound;
|
||||||
|
|
||||||
namespace Rimworld_Animations {
|
namespace Rimworld_Animations {
|
||||||
|
@ -513,9 +514,15 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
public bool LoopNeverending()
|
public bool LoopNeverending()
|
||||||
{
|
{
|
||||||
if(pawn?.jobs?.curDriver != null &&
|
JobDriver jobDriver = pawn?.jobs?.curDriver;
|
||||||
(pawn.jobs.curDriver is JobDriver_Sex) && (pawn.jobs.curDriver as JobDriver_Sex).neverendingsex ||
|
if (jobDriver == null) return false;
|
||||||
(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)
|
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue