public static Thing DropShuttle_NewTemp(List <ActiveDropPodInfo> pods, Map map, IntVec3 cell, Faction faction = null) { RemovePawnsFromWorldPawns(pods); Thing thing = QuestGen_Shuttle.GenerateShuttle(faction, null, null, acceptColonists: false, onlyAcceptColonists: false, onlyAcceptHealthy: false, 0, dropEverythingIfUnsatisfied: false, leaveImmediatelyWhenSatisfied: false, dropEverythingOnArrival: true); thing.TryGetComp <CompShuttle>().hideControls = true; CompTransporter compTransporter = thing.TryGetComp <CompTransporter>(); for (int i = 0; i < pods.Count; i++) { compTransporter.innerContainer.TryAddRangeOrTransfer(pods[i].innerContainer); } if (!cell.IsValid) { cell = DropCellFinder.GetBestShuttleLandingSpot(map, Faction.OfPlayer, out var _); } GenPlace.TryPlaceThing(SkyfallerMaker.MakeSkyfaller(ThingDefOf.ShuttleIncoming, thing), cell, map, ThingPlaceMode.Near); return(thing); }
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); }