public override FloatMenuAcceptanceReport StillValid(IEnumerable <IThingHolder> pods, int destinationTile) { FloatMenuAcceptanceReport floatMenuAcceptanceReport = base.StillValid(pods, destinationTile); if (!floatMenuAcceptanceReport) { return(floatMenuAcceptanceReport); } if (this.site != null && this.site.Tile != destinationTile) { return(false); } return(TransportPodsArrivalAction_VisitSite.CanVisit(pods, this.site)); }
public static IEnumerable <FloatMenuOption> GetFloatMenuOptions(CompLaunchable representative, IEnumerable <IThingHolder> pods, Site site) { foreach (FloatMenuOption f in TransportPodsArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_VisitSite>(() => TransportPodsArrivalAction_VisitSite.CanVisit(pods, site), () => new TransportPodsArrivalAction_VisitSite(site, PawnsArrivalModeDefOf.EdgeDrop), "DropAtEdge".Translate(), representative, site.Tile)) { yield return(f); } foreach (FloatMenuOption f2 in TransportPodsArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_VisitSite>(() => TransportPodsArrivalAction_VisitSite.CanVisit(pods, site), () => new TransportPodsArrivalAction_VisitSite(site, PawnsArrivalModeDefOf.CenterDrop), "DropInCenter".Translate(), representative, site.Tile)) { yield return(f2); } }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; bool flag = false; switch (num) { case 0u: enumerator = TransportPodsArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_VisitSite>(() => TransportPodsArrivalAction_VisitSite.CanVisit(pods, site), () => new TransportPodsArrivalAction_VisitSite(site, PawnsArrivalModeDefOf.EdgeDrop), "DropAtEdge".Translate(), representative, site.Tile).GetEnumerator(); num = 4294967293u; break; case 1u: break; case 2u: goto IL_177; 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(); } } } enumerator2 = TransportPodsArrivalActionUtility.GetFloatMenuOptions <TransportPodsArrivalAction_VisitSite>(() => TransportPodsArrivalAction_VisitSite.CanVisit(< GetFloatMenuOptions > c__AnonStorey.pods, <GetFloatMenuOptions> c__AnonStorey.site), () => new TransportPodsArrivalAction_VisitSite(< GetFloatMenuOptions > c__AnonStorey.site, PawnsArrivalModeDefOf.CenterDrop), "DropInCenter".Translate(), representative, <GetFloatMenuOptions> c__AnonStorey.site.Tile).GetEnumerator(); num = 4294967293u; try { IL_177: switch (num) { } if (enumerator2.MoveNext()) { f2 = enumerator2.Current; this.$current = f2; if (!this.$disposing) { this.$PC = 2; } flag = true; return(true); } } finally { if (!flag) { if (enumerator2 != null) { enumerator2.Dispose(); } } } this.$PC = -1; return(false); }