Exemple #1
0
 public static void DropTravelingTransportPods(List <ActiveDropPodInfo> dropPods, IntVec3 near, Map map)
 {
     ByakheeArrivalActionUtility.RemovePawnsFromWorldPawns(dropPods);
     for (int i = 0; i < dropPods.Count; i++)
     {
         IntVec3 c;
         DropCellFinder.TryFindDropSpotNear(near, map, out c, false, true, true, null, true);
         DropPodUtility.MakeDropPodAt(c, map, dropPods[i]);
     }
 }
Exemple #2
0
        public static Thing DropShuttle(List <ActiveDropPodInfo> pods, Map map, IntVec3 cell, Faction faction = null)
        {
            ByakheeArrivalActionUtility.RemovePawnsFromWorldPawns(pods);
            Thing           thing           = QuestGen_Shuttle.GenerateShuttle(faction, null, null, false, false, false, 0, false, false, true, false, null, null, -1, null, false, true, false, false);
            TransportShip   transportShip   = TransportShipMaker.MakeTransportShip(TransportShipDefOf.Ship_Shuttle, null, thing);
            CompTransporter compTransporter = thing.TryGetComp <CompTransporter>();

            for (int i = 0; i < pods.Count; i++)
            {
                compTransporter.innerContainer.TryAddRangeOrTransfer(pods[i].innerContainer, true, false);
            }
            if (!cell.IsValid)
            {
                cell = DropCellFinder.GetBestShuttleLandingSpot(map, Faction.OfPlayer);
            }
            transportShip.ArriveAt(cell, map.Parent);
            transportShip.AddJobs(new ShipJobDef[]
            {
                ShipJobDefOf.Unload,
                ShipJobDefOf.FlyAway
            });
            return(thing);
        }