public override IEnumerable <Gizmo> GetGizmos() { _003CGetGizmos_003Ec__Iterator0 _003CGetGizmos_003Ec__Iterator = (_003CGetGizmos_003Ec__Iterator0) /*Error near IL_0036: stateMachine*/; MapParent mapParent = base.parent as MapParent; if (!mapParent.HasMap) { yield break; } if (!this.Props.reformCaravan) { yield return((Gizmo) new Command_Action { defaultLabel = "CommandFormCaravan".Translate(), defaultDesc = "CommandFormCaravanDesc".Translate(), icon = FormCaravanComp.FormCaravanCommand, hotKey = KeyBindingDefOf.Misc2, tutorTag = "FormCaravan", action = delegate { Find.WindowStack.Add(new Dialog_FormCaravan(mapParent.Map, false, null, true, false)); } }); /*Error: Unable to find new state assignment for yield return*/; } if (mapParent.Map.mapPawns.FreeColonistsSpawnedCount == 0) { yield break; } Command_Action reformCaravan = new Command_Action { defaultLabel = "CommandReformCaravan".Translate(), defaultDesc = "CommandReformCaravanDesc".Translate(), icon = FormCaravanComp.FormCaravanCommand, hotKey = KeyBindingDefOf.Misc2, tutorTag = "ReformCaravan", action = delegate { Find.WindowStack.Add(new Dialog_FormCaravan(mapParent.Map, true, null, true, false)); } }; if (GenHostility.AnyHostileActiveThreatToPlayer(mapParent.Map)) { reformCaravan.Disable("CommandReformCaravanFailHostilePawns".Translate()); } yield return((Gizmo)reformCaravan); /*Error: Unable to find new state assignment for yield return*/; }
public IEnumerable <Gizmo> GetGizmos() { _003CGetGizmos_003Ec__Iterator0 _003CGetGizmos_003Ec__Iterator = (_003CGetGizmos_003Ec__Iterator0) /*Error near IL_0038: stateMachine*/; using (IEnumerator <Gizmo> enumerator = this.priorityWork.GetGizmos().GetEnumerator()) { if (enumerator.MoveNext()) { Gizmo g = enumerator.Current; yield return(g); /*Error: Unable to find new state assignment for yield return*/; } } Lord lord = this.pawn.GetLord(); if (lord == null) { yield break; } if (!(lord.LordJob is LordJob_FormAndSendCaravan)) { yield break; } yield return((Gizmo) new Command_Action { defaultLabel = "CommandCancelFormingCaravan".Translate(), defaultDesc = "CommandCancelFormingCaravanDesc".Translate(), icon = TexCommand.ClearPrioritizedWork, activateSound = SoundDefOf.TickLow, action = delegate { CaravanFormingUtility.StopFormingCaravan(lord); }, hotKey = KeyBindingDefOf.DesignatorCancel }); /*Error: Unable to find new state assignment for yield return*/; IL_01bf: /*Error near IL_01c0: Unexpected return in MoveNext()*/; }
public static IEnumerable <Gizmo> GetGizmos(Pawn pawn) { if (IsFormingCaravanOrDownedPawnToBeTakenByCaravan(pawn)) { _003CGetGizmos_003Ec__Iterator0 _003CGetGizmos_003Ec__Iterator = (_003CGetGizmos_003Ec__Iterator0) /*Error near IL_006b: stateMachine*/; Lord lord = GetFormAndSendCaravanLord(pawn); yield return((Gizmo) new Command_Action { defaultLabel = "CommandCancelFormingCaravan".Translate(), defaultDesc = "CommandCancelFormingCaravanDesc".Translate(), icon = TexCommand.ClearPrioritizedWork, activateSound = SoundDefOf.Tick_Low, action = delegate { StopFormingCaravan(lord); }, hotKey = KeyBindingDefOf.Designator_Cancel }); /*Error: Unable to find new state assignment for yield return*/; } if (pawn.Spawned) { bool anyCaravanToJoin = false; for (int i = 0; i < pawn.Map.lordManager.lords.Count; i++) { Lord lord2 = pawn.Map.lordManager.lords[i]; if (lord2.faction == Faction.OfPlayer && lord2.LordJob is LordJob_FormAndSendCaravan) { anyCaravanToJoin = true; break; } } if (anyCaravanToJoin && Dialog_FormCaravan.AllSendablePawns(pawn.Map, reform: false).Contains(pawn)) { yield return((Gizmo) new Command_Action { defaultLabel = "CommandAddToCaravan".Translate(), defaultDesc = "CommandAddToCaravanDesc".Translate(), icon = AddToCaravanCommand, action = delegate { List <Lord> list = new List <Lord>(); for (int j = 0; j < pawn.Map.lordManager.lords.Count; j++) { Lord lord3 = pawn.Map.lordManager.lords[j]; if (lord3.faction == Faction.OfPlayer && lord3.LordJob is LordJob_FormAndSendCaravan) { list.Add(lord3); } } if (list.Count != 0) { if (list.Count == 1) { LateJoinFormingCaravan(pawn, list[0]); SoundDefOf.Click.PlayOneShotOnCamera(); } else { List <FloatMenuOption> list2 = new List <FloatMenuOption>(); for (int k = 0; k < list.Count; k++) { Lord caravanLocal = list[k]; string label = "Caravan".Translate() + " " + (k + 1); list2.Add(new FloatMenuOption(label, delegate { if (pawn.Spawned && pawn.Map.lordManager.lords.Contains(caravanLocal) && Dialog_FormCaravan.AllSendablePawns(pawn.Map, reform: false).Contains(pawn)) { LateJoinFormingCaravan(pawn, caravanLocal); } })); } Find.WindowStack.Add(new FloatMenu(list2)); } } }, hotKey = KeyBindingDefOf.Misc7 }); /*Error: Unable to find new state assignment for yield return*/; } } }
public override IEnumerable <Gizmo> GetGizmos() { _003CGetGizmos_003Ec__Iterator0 _003CGetGizmos_003Ec__Iterator = (_003CGetGizmos_003Ec__Iterator0) /*Error near IL_0044: stateMachine*/; using (IEnumerator <Gizmo> enumerator = this._003CGetGizmos_003E__BaseCallProxy0().GetEnumerator()) { if (enumerator.MoveNext()) { Gizmo c = enumerator.Current; yield return(c); /*Error: Unable to find new state assignment for yield return*/; } } CompChangeableProjectile changeableProjectile = this.gun.TryGetComp <CompChangeableProjectile>(); if (changeableProjectile != null) { Command_Action extract = new Command_Action { defaultLabel = "CommandExtractShell".Translate(), defaultDesc = "CommandExtractShellDesc".Translate(), icon = ContentFinder <Texture2D> .Get("Things/Item/Resource/Shell/Shell_HighExplosive", true), alsoClickIfOtherInGroupClicked = false, action = delegate { GenPlace.TryPlaceThing(changeableProjectile.RemoveShell(), _003CGetGizmos_003Ec__Iterator._0024this.Position, _003CGetGizmos_003Ec__Iterator._0024this.Map, ThingPlaceMode.Near, null); } }; if (changeableProjectile.Projectile == null) { extract.Disable("CommandExtractShellFailNoShell".Translate()); } yield return((Gizmo)extract); /*Error: Unable to find new state assignment for yield return*/; } if (this.CanSetForcedTarget) { yield return((Gizmo) new Command_VerbTarget { defaultLabel = "CommandSetForceAttackTarget".Translate(), defaultDesc = "CommandSetForceAttackTargetDesc".Translate(), icon = ContentFinder <Texture2D> .Get("UI/Commands/Attack", true), verb = this.GunCompEq.PrimaryVerb, hotKey = KeyBindingDefOf.Misc4 }); /*Error: Unable to find new state assignment for yield return*/; } if (base.forcedTarget.IsValid) { Command_Action stop = new Command_Action { defaultLabel = "CommandStopForceAttack".Translate(), defaultDesc = "CommandStopForceAttackDesc".Translate(), icon = ContentFinder <Texture2D> .Get("UI/Commands/Halt", true), action = delegate { _003CGetGizmos_003Ec__Iterator._0024this.ResetForcedTarget(); SoundDefOf.TickLow.PlayOneShotOnCamera(null); } }; if (!base.forcedTarget.IsValid) { stop.Disable("CommandStopAttackFailNotForceAttacking".Translate()); } stop.hotKey = KeyBindingDefOf.Misc5; yield return((Gizmo)stop); /*Error: Unable to find new state assignment for yield return*/; } if (!this.CanToggleHoldFire) { yield break; } yield return((Gizmo) new Command_Toggle { defaultLabel = "CommandHoldFire".Translate(), defaultDesc = "CommandHoldFireDesc".Translate(), icon = ContentFinder <Texture2D> .Get("UI/Commands/HoldFire", true), hotKey = KeyBindingDefOf.Misc6, toggleAction = delegate { _003CGetGizmos_003Ec__Iterator._0024this.holdFire = !_003CGetGizmos_003Ec__Iterator._0024this.holdFire; if (_003CGetGizmos_003Ec__Iterator._0024this.holdFire) { _003CGetGizmos_003Ec__Iterator._0024this.ResetForcedTarget(); } }, isActive = (() => _003CGetGizmos_003Ec__Iterator._0024this.holdFire) }); /*Error: Unable to find new state assignment for yield return*/; IL_0407: /*Error near IL_0408: Unexpected return in MoveNext()*/; }