rjw-genes/Source/Genes/Life_Force/ThinkNode_ConditionalCannotInteract.cs
Shabakur 7958f021b9 LordJob and LordToil Fininished
Succubus will not when spawned rape target, and afterward will follow target. Succubus will target someone else at random or when target is unreachable or sleeping
2023-01-16 17:16:25 +01:00

23 lines
629 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace RJW_Genes
{
public class ThinkNode_ConditionalCannotInteract : ThinkNode_Conditional
{
protected override bool Satisfied(Pawn pawn)
{
Pawn target = pawn.mindState.duty.focus.Pawn;
if (target == null)
{
return true;
}
return (target.jobs != null && target.jobs.curDriver.asleep) || !pawn.CanReach(target, PathEndMode.InteractionCell, Danger.Deadly);
}
}
}