Beispiel #1
0
 public override IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan)
 {
     foreach (FloatMenuOption floatMenuOption in base.GetFloatMenuOptions(caravan))
     {
         yield return(floatMenuOption);
     }
     if (CaravanVisitUtility.SettlementVisitedNow(caravan) != this)
     {
         foreach (FloatMenuOption floatMenuOption2 in CaravanArrivalAction_VisitSettlement.GetFloatMenuOptions(caravan, this))
         {
             yield return(floatMenuOption2);
         }
     }
     foreach (FloatMenuOption floatMenuOption3 in CaravanArrivalAction_Trade.GetFloatMenuOptions(caravan, this))
     {
         yield return(floatMenuOption3);
     }
     foreach (FloatMenuOption floatMenuOption4 in CaravanArrivalAction_OfferGifts.GetFloatMenuOptions(caravan, this))
     {
         yield return(floatMenuOption4);
     }
     foreach (FloatMenuOption floatMenuOption5 in CaravanArrivalAction_AttackSettlement.GetFloatMenuOptions(caravan, this))
     {
         yield return(floatMenuOption5);
     }
 }
Beispiel #2
0
		public override FloatMenuAcceptanceReport StillValid(Caravan caravan, int destinationTile)
		{
			FloatMenuAcceptanceReport floatMenuAcceptanceReport = base.StillValid(caravan, destinationTile);
			if (!floatMenuAcceptanceReport)
			{
				return floatMenuAcceptanceReport;
			}
			if (this.settlement != null && this.settlement.Tile != destinationTile)
			{
				return false;
			}
			return CaravanArrivalAction_AttackSettlement.CanAttack(caravan, this.settlement);
		}
Beispiel #3
0
        public override IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan)
        {
            using (IEnumerator <FloatMenuOption> enumerator = base.GetFloatMenuOptions(caravan).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    FloatMenuOption o = enumerator.Current;
                    yield return(o);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            if (CaravanVisitUtility.SettlementVisitedNow(caravan) != this)
            {
                using (IEnumerator <FloatMenuOption> enumerator2 = CaravanArrivalAction_VisitSettlement.GetFloatMenuOptions(caravan, this).GetEnumerator())
                {
                    if (enumerator2.MoveNext())
                    {
                        FloatMenuOption f3 = enumerator2.Current;
                        yield return(f3);

                        /*Error: Unable to find new state assignment for yield return*/;
                    }
                }
            }
            using (IEnumerator <FloatMenuOption> enumerator3 = CaravanArrivalAction_OfferGifts.GetFloatMenuOptions(caravan, this).GetEnumerator())
            {
                if (enumerator3.MoveNext())
                {
                    FloatMenuOption f2 = enumerator3.Current;
                    yield return(f2);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            using (IEnumerator <FloatMenuOption> enumerator4 = CaravanArrivalAction_AttackSettlement.GetFloatMenuOptions(caravan, this).GetEnumerator())
            {
                if (enumerator4.MoveNext())
                {
                    FloatMenuOption f = enumerator4.Current;
                    yield return(f);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_029a:
            /*Error near IL_029b: Unexpected return in MoveNext()*/;
        }
Beispiel #4
0
 public override IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan)
 {
     foreach (FloatMenuOption o in this.< GetFloatMenuOptions > __BaseCallProxy2(caravan))
     {
         yield return(o);
     }
     if (CaravanVisitUtility.SettlementVisitedNow(caravan) != this)
     {
         foreach (FloatMenuOption f in CaravanArrivalAction_VisitSettlement.GetFloatMenuOptions(caravan, this))
         {
             yield return(f);
         }
     }
     foreach (FloatMenuOption f2 in CaravanArrivalAction_OfferGifts.GetFloatMenuOptions(caravan, this))
     {
         yield return(f2);
     }
     foreach (FloatMenuOption f3 in CaravanArrivalAction_AttackSettlement.GetFloatMenuOptions(caravan, this))
     {
         yield return(f3);
     }
     yield break;
 }
Beispiel #5
0
 public static IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan, SettlementBase settlement)
 {
     return(CaravanArrivalActionUtility.GetFloatMenuOptions <CaravanArrivalAction_AttackSettlement>(() => CaravanArrivalAction_AttackSettlement.CanAttack(caravan, settlement), () => new CaravanArrivalAction_AttackSettlement(settlement), "AttackSettlement".Translate(new object[]
     {
         settlement.Label
     }), caravan, settlement.Tile, settlement));
 }
Beispiel #6
0
 internal FloatMenuAcceptanceReport <> m__0()
 {
     return(CaravanArrivalAction_AttackSettlement.CanAttack(this.caravan, this.settlement));
 }