public static IEnumerable <FloatMenuOption> GetATKFloatMenuOptions(
            CompLaunchableSRTS representative,
            IEnumerable <IThingHolder> pods,
            SettlementBase settlement,
            Caravan car)
        {
            Func <FloatMenuAcceptanceReport> acceptanceReportGetter1 = (Func <FloatMenuAcceptanceReport>)(() => TransportPodsArrivalAction_AttackSettlement.CanAttack(pods, settlement));
            Func <TransportPodsArrivalAction_AttackSettlement> arrivalActionGetter1 = (Func <TransportPodsArrivalAction_AttackSettlement>)(() => new TransportPodsArrivalAction_AttackSettlement(settlement, PawnsArrivalModeDefOf.EdgeDrop));

            object[] objArray1 = new object[1]
            {
                (object)settlement.Label
            };
            foreach (FloatMenuOption floatMenuOption in SRTSArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_AttackSettlement>(acceptanceReportGetter1, arrivalActionGetter1, "AttackAndDropAtEdge".Translate(objArray1), representative, settlement.Tile, car))
            {
                FloatMenuOption f = floatMenuOption;
                yield return(f);

                f = (FloatMenuOption)null;
            }
            Func <FloatMenuAcceptanceReport> acceptanceReportGetter2 = (Func <FloatMenuAcceptanceReport>)(() => TransportPodsArrivalAction_AttackSettlement.CanAttack(pods, settlement));
            Func <TransportPodsArrivalAction_AttackSettlement> arrivalActionGetter2 = (Func <TransportPodsArrivalAction_AttackSettlement>)(() => new TransportPodsArrivalAction_AttackSettlement(settlement, PawnsArrivalModeDefOf.CenterDrop));

            object[] objArray2 = new object[1]
            {
                (object)settlement.Label
            };
            foreach (FloatMenuOption floatMenuOption in SRTSArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_AttackSettlement>(acceptanceReportGetter2, arrivalActionGetter2, "AttackAndDropInCenter".Translate(objArray2), representative, settlement.Tile, car))
            {
                FloatMenuOption f2 = floatMenuOption;
                yield return(f2);

                f2 = (FloatMenuOption)null;
            }
        }
예제 #2
0
 public static IEnumerable <FloatMenuOption> GetATKFloatMenuOptions(CompDropship representative, IEnumerable <IThingHolder> pods, Settlement settlement, Caravan car)
 {
     foreach (FloatMenuOption f in DropShipArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_AttackSettlement>(() => TransportPodsArrivalAction_AttackSettlement.CanAttack(pods, settlement), () => new TransportPodsArrivalAction_AttackSettlement(settlement, PawnsArrivalModeDefOf.EdgeDrop), "AttackAndDropAtEdge".Translate(settlement.Label), representative, settlement.Tile, car))
     {
         yield return(f);
     }
     foreach (FloatMenuOption f2 in DropShipArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_AttackSettlement>(() => TransportPodsArrivalAction_AttackSettlement.CanAttack(pods, settlement), () => new TransportPodsArrivalAction_AttackSettlement(settlement, PawnsArrivalModeDefOf.CenterDrop), "AttackAndDropInCenter".Translate(settlement.Label), representative, settlement.Tile, car))
     {
         yield return(f2);
     }
     yield break;
 }