Ejemplo n.º 1
0
        protected override IEnumerable <Toil> MakeNewToils()
        {
            this.FailOnDestroyedOrNull(TargetIndex.A);

            Toil gotoThing = new Toil();

            gotoThing.initAction = delegate
            {
                this.pawn.pather.StartPath(this.TargetThingA, PathEndMode.ClosestTouch);
            };
            gotoThing.defaultCompleteMode = ToilCompleteMode.PatherArrival;
            gotoThing.FailOnDespawnedNullOrForbidden(TargetIndex.A);
            yield return(gotoThing);

            yield return(Toils_ItemBelt.TakeToItemBelt(TargetIndex.A, this.job.count));
        }
Ejemplo n.º 2
0
 public static Toil TakeToItemBelt(TargetIndex ind, int count)
 {
     return(Toils_ItemBelt.TakeToItemBelt(ind, () => count));
 }