Example #1
0
        private static IEnumerable <IntVec3> IngredientPlaceCellsInOrder(Thing destination)
        {
            yieldedIngPlaceCells.Clear();
            try
            {
                _003CIngredientPlaceCellsInOrder_003Ec__Iterator0 _003CIngredientPlaceCellsInOrder_003Ec__Iterator = (_003CIngredientPlaceCellsInOrder_003Ec__Iterator0) /*Error near IL_0055: stateMachine*/;
                IntVec3    interactCell = destination.Position;
                IBillGiver billGiver    = destination as IBillGiver;
                if (billGiver != null)
                {
                    interactCell = ((Thing)billGiver).InteractionCell;
                    using (IEnumerator <IntVec3> enumerator = (from c in billGiver.IngredientStackCells
                                                               orderby(c - interactCell).LengthHorizontalSquared
                                                               select c).GetEnumerator())
                    {
                        if (enumerator.MoveNext())
                        {
                            IntVec3 c3 = enumerator.Current;
                            yieldedIngPlaceCells.Add(c3);
                            yield return(c3);

                            /*Error: Unable to find new state assignment for yield return*/;
                        }
                    }
                }
                int     i = 0;
                IntVec3 c2;
                while (true)
                {
                    if (i >= 200)
                    {
                        yield break;
                    }
                    c2 = interactCell + GenRadial.RadialPattern[i];
                    if (!yieldedIngPlaceCells.Contains(c2))
                    {
                        Building ed = c2.GetEdifice(destination.Map);
                        if (ed == null || ed.def.passability != Traversability.Impassable || ed.def.surfaceType != 0)
                        {
                            break;
                        }
                    }
                    i++;
                }
                yield return(c2);

                /*Error: Unable to find new state assignment for yield return*/;
            }
            finally
            {
                ((_003CIngredientPlaceCellsInOrder_003Ec__Iterator0) /*Error near IL_024c: stateMachine*/)._003C_003E__Finally0();
            }
IL_025c:
            /*Error near IL_025d: Unexpected return in MoveNext()*/;
        }
        private static IEnumerable <IntVec3> IngredientPlaceCellsInOrder(IBillGiver billGiver)
        {
            _003CIngredientPlaceCellsInOrder_003Ec__Iterator0 _003CIngredientPlaceCellsInOrder_003Ec__Iterator = (_003CIngredientPlaceCellsInOrder_003Ec__Iterator0) /*Error near IL_0038: stateMachine*/;

            Toils_JobTransforms.yieldedIngPlaceCells.Clear();
            IntVec3 interactCell = ((Thing)billGiver).InteractionCell;

            using (IEnumerator <IntVec3> enumerator = (from c in billGiver.IngredientStackCells
                                                       orderby(c - interactCell).LengthHorizontalSquared
                                                       select c).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    IntVec3 c3 = enumerator.Current;
                    Toils_JobTransforms.yieldedIngPlaceCells.Add(c3);
                    yield return(c3);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            int     i = 0;
            IntVec3 c2;

            while (true)
            {
                if (i < 200)
                {
                    c2 = interactCell + GenRadial.RadialPattern[i];
                    if (!Toils_JobTransforms.yieldedIngPlaceCells.Contains(c2))
                    {
                        Building ed = c2.GetEdifice(billGiver.Map);
                        if (ed == null)
                        {
                            break;
                        }
                        if (ed.def.passability != Traversability.Impassable)
                        {
                            break;
                        }
                        if (ed.def.surfaceType != 0)
                        {
                            break;
                        }
                    }
                    i++;
                    continue;
                }
                yield break;
            }
            yield return(c2);

            /*Error: Unable to find new state assignment for yield return*/;
IL_0205:
            /*Error near IL_0206: Unexpected return in MoveNext()*/;
        }