Пример #1
0
 public override IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan)
 {
     foreach (FloatMenuOption f in CaravanArrivalAction_VisitEscapeShip.GetFloatMenuOptions(caravan, (MapParent)this.parent))
     {
         yield return(f);
     }
 }
        public override FloatMenuAcceptanceReport StillValid(Caravan caravan, int destinationTile)
        {
            FloatMenuAcceptanceReport floatMenuAcceptanceReport = base.StillValid(caravan, destinationTile);

            if (!floatMenuAcceptanceReport)
            {
                return(floatMenuAcceptanceReport);
            }
            if (this.target != null && this.target.Tile != destinationTile)
            {
                return(false);
            }
            return(CaravanArrivalAction_VisitEscapeShip.CanVisit(caravan, this.target));
        }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    enumerator = CaravanArrivalAction_VisitEscapeShip.GetFloatMenuOptions(caravan, (MapParent)this.parent).GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    if (enumerator.MoveNext())
                    {
                        f             = enumerator.Current;
                        this.$current = f;
                        if (!this.$disposing)
                        {
                            this.$PC = 1;
                        }
                        flag = true;
                        return(true);
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }
Пример #4
0
        public override IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan)
        {
            using (IEnumerator <FloatMenuOption> enumerator = CaravanArrivalAction_VisitEscapeShip.GetFloatMenuOptions(caravan, (MapParent)parent).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    FloatMenuOption f = enumerator.Current;
                    yield return(f);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_00c9:
            /*Error near IL_00ca: Unexpected return in MoveNext()*/;
        }
 public static IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan, MapParent escapeShip)
 {
     return(CaravanArrivalActionUtility.GetFloatMenuOptions <CaravanArrivalAction_VisitEscapeShip>(() => CaravanArrivalAction_VisitEscapeShip.CanVisit(caravan, escapeShip), () => new CaravanArrivalAction_VisitEscapeShip(escapeShip.GetComponent <EscapeShipComp>()), "VisitEscapeShip".Translate(new object[]
     {
         escapeShip.Label
     }), caravan, escapeShip.Tile, escapeShip));
 }