Esempio n. 1
0
 protected virtual void FinalizeLanding()
 {
     vehicle.CompVehicleLauncher.inFlight = false;
     if (VehicleReservationManager.AnyVehicleInhabitingCells(vehicle.PawnOccupiedCells(Position, Rotation), Map))
     {
         GenExplosion.DoExplosion(Position, Map, Mathf.Max(vehicle.VehicleDef.Size.x, vehicle.VehicleDef.Size.z), DamageDefOf.Bomb, vehicle);
     }
     else
     {
         GenSpawn.Spawn(vehicle, Position, Map, Rotation);
         if (VehicleMod.settings.main.deployOnLanding)
         {
             vehicle.CompVehicleLauncher.SetTimedDeployment();
         }
     }
     Destroy();
 }
Esempio n. 2
0
        /// <summary>
        /// Vehicle that has reserved <paramref name="cell"/>
        /// </summary>
        /// <param name="vehicle"></param>
        /// <param name="map"></param>
        /// <param name="cell"></param>
        /// <param name="rot"></param>
        public static VehiclePawn VehicleInPosition(VehiclePawn vehicle, Map map, IntVec3 cell, Rot4 rot)
        {
            IEnumerable <IntVec3> cells = vehicle.PawnOccupiedCells(cell, rot);

            return(VehicleReservationManager.VehicleInhabitingCells(cells, map));
        }
Esempio n. 3
0
        /// <summary>
        /// Vehicle is blocked at <paramref name="cell"/> and will not spawn correctly
        /// </summary>
        /// <param name="cell"></param>
        public static bool VehicleBlockedInPosition(VehiclePawn vehicle, Map map, IntVec3 cell, Rot4 rot)
        {
            IEnumerable <IntVec3> cells = vehicle.PawnOccupiedCells(cell, rot);

            return(VehicleReservationManager.AnyVehicleInhabitingCells(cells, map) || !vehicle.CellRectStandable(map, cell, rot));
        }