protected Toil ToilGetWanderCell(IntVec3 pyrePosition)
{
Toil toil = new Toil()
{
initAction = () =>
{
IntVec3 cell;
bool validCellIsFound = CellFinder.TryFindRandomReachableCellNear(pyrePosition, Building_Pyre.partyAreaRadius, TraverseParms.For(TraverseMode.NoPassClosedDoors, Danger.None), new Predicate<IntVec3>(this.IsValidCellToWander), null, out cell);
if (validCellIsFound)
{
this.CurJob.targetB = cell;
}
else
{
this.CurJob.targetB = this.pawn.Position;
}
},
defaultCompleteMode = ToilCompleteMode.Instant
};
return toil;
}