protected override CommandQueueElement RunInternal()
        {
            var             resp      = Client.IssueRequest(Client.RequestBuilder.GetPage(PageType.Fleet, PlanetId));
            PlanetResources resources = resp.GetParsedSingle <PlanetResources>();
            DetectedShip    cargo     = resp.GetParsed <DetectedShip>().FirstOrDefault(s => s.Ship == ShipType.LargeCargo);

            FleetComposition fleet = FleetComposition.ToTransport(resources.Resources);

            // if on a moon, leave 10% of deuterium, or else no other ship will be able to travel
            if (resp.GetParsedSingle <OgamePageInfo>().PlanetCoord.Type == CoordinateType.Moon)
            {
                fleet.Resources.Deuterium = (int)(fleet.Resources.Deuterium * 0.9f);
            }
            int needed    = fleet.Ships[ShipType.LargeCargo];
            int available = cargo?.Count ?? 0;

            if (needed > available)
            {
                Logger.Instance.Log(LogLevel.Error, $"Not enough Large Cargos on planet: needed {needed}, only {available} available.");
                return(null);
            }

            SendFleetCommand sendFleet = new SendFleetCommand()
            {
                Mission     = UseDeployment ? MissionType.Deployment : MissionType.Transport,
                Speed       = Speed,
                PlanetId    = PlanetId,
                Destination = Destination,
                Fleet       = fleet
            };

            sendFleet.Run();
            return(null);
        }
        public string Inject(OgamePageInfo info, string body, ResponseContainer response, string host, int port)
        {
            if (info?.Page != PageType.Fleet)
            {
                return(body);
            }

            int cargosNecessary = FleetComposition.ToTransport(response.GetParsedSingle <PlanetResources>().Resources).Ships[ShipType.LargeCargo];

            return(largeCargo.Replace(body, $@"$1<span onclick=""toggleMaxShips('#shipsChosen', 203,{cargosNecessary}); checkIntInput('#ship_203', 0, {cargosNecessary}); checkShips('shipsChosen'); event.stopPropagation(); return false;"" style='color: #aaa'>[{cargosNecessary}]</span> $2"));
        }