// Token: 0x0600004C RID: 76 RVA: 0x00004148 File Offset: 0x00002348 protected override IEnumerable <Toil> MakeNewToils() { this.FailOnDespawnedNullOrForbidden(TargetIndex.A); this.FailOnBurningImmobile(TargetIndex.A); this.FailOn(delegate() { CompDeepDrill compDeepDrill = this.job.targetA.Thing.TryGetComp <CompDeepDrill>(); return(!compDeepDrill.CanDrillNow()); }); yield return(Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.InteractionCell)); Toil work = new Toil(); work.tickAction = delegate() { Pawn actor = work.actor; Building building = (Building)actor.CurJob.targetA.Thing; CompDeepDrill comp = building.GetComp <CompDeepDrill>(); comp.DrillWorkDone(actor); }; work.defaultCompleteMode = ToilCompleteMode.Never; work.WithEffect(EffecterDefOf.Drill, TargetIndex.A); work.FailOnCannotTouch(TargetIndex.A, PathEndMode.InteractionCell); yield return(work); yield break; }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0u: this.FailOnDespawnedNullOrForbidden(TargetIndex.A); this.FailOnBurningImmobile(TargetIndex.A); this.FailOn(delegate() { CompDeepDrill compDeepDrill = this.job.targetA.Thing.TryGetComp <CompDeepDrill>(); return(!compDeepDrill.CanDrillNow()); }); this.$current = Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.InteractionCell); if (!this.$disposing) { this.$PC = 1; } return(true); case 1u: < MakeNewToils > c__AnonStorey.work = new Toil(); < MakeNewToils > c__AnonStorey.work.tickAction = delegate() { Pawn actor = < MakeNewToils > c__AnonStorey.work.actor; Building building = (Building)actor.CurJob.targetA.Thing; CompDeepDrill comp = building.GetComp <CompDeepDrill>(); comp.DrillWorkDone(actor); actor.skills.Learn(SkillDefOf.Mining, 0.065f, false); };