mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
23 lines
629 B
C#
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|