protected override IEnumerable <Toil> MakeNewToils() { this.FailOnDestroyedOrNull(TargetIndex.A); Toil gotoCorpse = Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch).FailOnDespawnedOrNull(TargetIndex.A); yield return(Toils_Jump.JumpIfTargetInvalid(TargetIndex.B, gotoCorpse)); yield return(Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.InteractionCell).FailOnDespawnedOrNull(TargetIndex.B)); yield return(Toils_General.Wait(300, TargetIndex.None).WithProgressBarToilDelay(TargetIndex.B, false, -0.5f).FailOnDespawnedOrNull(TargetIndex.B).FailOnCannotTouch(TargetIndex.B, PathEndMode.InteractionCell)); yield return(Toils_General.Open(TargetIndex.B)); yield return(Toils_Reserve.Reserve(TargetIndex.A, 1, -1, null)); yield return(gotoCorpse); yield return(Toils_Haul.StartCarryThing(TargetIndex.A, false, false, false)); yield return(this.FindCellToDropCorpseToil()); yield return(Toils_Reserve.Reserve(TargetIndex.C, 1, -1, null)); yield return(Toils_Goto.GotoCell(TargetIndex.C, PathEndMode.Touch)); yield return(Toils_Haul.PlaceHauledThingInCell(TargetIndex.C, null, false)); yield return(this.ForbidAndNotifyMentalStateToil()); yield break; }
protected override IEnumerable <Toil> MakeNewToils() { this.FailOnDestroyedOrNull(CorpseInd); Toil gotoCorpse = Toils_Goto.GotoThing(CorpseInd, PathEndMode.Touch).FailOnDespawnedOrNull(CorpseInd); yield return(Toils_Jump.JumpIfTargetInvalid(GraveInd, gotoCorpse)); yield return(Toils_Goto.GotoThing(GraveInd, PathEndMode.InteractionCell).FailOnDespawnedOrNull(GraveInd)); yield return(Toils_General.Wait(300).WithProgressBarToilDelay(GraveInd, false, -0.5f).FailOnDespawnedOrNull(GraveInd).FailOnCannotTouch(GraveInd, PathEndMode.InteractionCell)); yield return(Toils_General.Open(GraveInd)); yield return(Toils_Reserve.Reserve(CorpseInd, 1, -1, null)); yield return(gotoCorpse); yield return(Toils_Haul.StartCarryThing(CorpseInd, false, false, false)); yield return(this.FindCellToDropCorpseToil()); yield return(Toils_Reserve.Reserve(CellInd, 1, -1, null)); yield return(Toils_Goto.GotoCell(CellInd, PathEndMode.Touch)); yield return(Toils_Haul.PlaceHauledThingInCell(CellInd, null, false)); foreach (Toil t in this.Nibble()) { yield return(t); } yield return(this.Forbid()); }
protected override IEnumerable <Toil> MakeNewToils() { this.FailOnDestroyedOrNull(TargetIndex.A); Toil gotoCorpse = Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch).FailOnDespawnedOrNull(TargetIndex.A); yield return(Toils_Jump.JumpIfTargetInvalid(TargetIndex.B, gotoCorpse)); /*Error: Unable to find new state assignment for yield return*/; }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0u: this.FailOnDestroyedOrNull(TargetIndex.A); gotoCorpse = Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch).FailOnDespawnedOrNull(TargetIndex.A); this.$current = Toils_Jump.JumpIfTargetInvalid(TargetIndex.B, gotoCorpse); if (!this.$disposing) { this.$PC = 1; } return(true); case 1u: this.$current = Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.InteractionCell).FailOnDespawnedOrNull(TargetIndex.B); if (!this.$disposing) { this.$PC = 2; } return(true); case 2u: this.$current = Toils_General.Wait(300, TargetIndex.None).WithProgressBarToilDelay(TargetIndex.B, false, -0.5f).FailOnDespawnedOrNull(TargetIndex.B).FailOnCannotTouch(TargetIndex.B, PathEndMode.InteractionCell); if (!this.$disposing) { this.$PC = 3; } return(true); case 3u: this.$current = Toils_General.Open(TargetIndex.B); if (!this.$disposing) { this.$PC = 4; } return(true); case 4u: this.$current = Toils_Reserve.Reserve(TargetIndex.A, 1, -1, null); if (!this.$disposing) { this.$PC = 5; } return(true); case 5u: this.$current = gotoCorpse; if (!this.$disposing) { this.$PC = 6; } return(true); case 6u: this.$current = Toils_Haul.StartCarryThing(TargetIndex.A, false, false, false); if (!this.$disposing) { this.$PC = 7; } return(true); case 7u: this.$current = base.FindCellToDropCorpseToil(); if (!this.$disposing) { this.$PC = 8; } return(true); case 8u: this.$current = Toils_Reserve.Reserve(TargetIndex.C, 1, -1, null); if (!this.$disposing) { this.$PC = 9; } return(true); case 9u: this.$current = Toils_Goto.GotoCell(TargetIndex.C, PathEndMode.Touch); if (!this.$disposing) { this.$PC = 10; } return(true); case 10u: this.$current = Toils_Haul.PlaceHauledThingInCell(TargetIndex.C, null, false); if (!this.$disposing) { this.$PC = 11; } return(true); case 11u: this.$current = base.ForbidAndNotifyMentalStateToil(); if (!this.$disposing) { this.$PC = 12; } return(true); case 12u: this.$PC = -1; break; } return(false); }