Merge pull request #1122 from FlightControl-Master/FF/Develop

AIRBOSS v0.9.8
This commit is contained in:
Frank 2019-02-21 10:20:59 +01:00 committed by GitHub
commit 6853eecffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2726 additions and 1347 deletions

View File

@ -210,6 +210,7 @@ do -- COORDINATE
FromParkingAreaHot = "From Parking Area Hot",
FromRunway = "From Runway",
Landing = "Landing",
LandingReFuAr = "LandingReFuAr",
}
--- @field COORDINATE.WaypointType
@ -219,6 +220,7 @@ do -- COORDINATE
TakeOff = "TakeOffParkingHot",
TurningPoint = "Turning Point",
Land = "Land",
LandingReFuAr = "LandingReFuAr",
}
@ -1027,8 +1029,9 @@ do -- COORDINATE
-- @param Wrapper.Airbase#AIRBASE airbase The airbase for takeoff and landing points.
-- @param #table DCSTasks A table of @{DCS#Task} items which are executed at the waypoint.
-- @param #string description A text description of the waypoint, which will be shown on the F10 map.
-- @param #number timeReFuAr Time in minutes the aircraft stays at the airport for ReFueling and ReArming.
-- @return #table The route point.
function COORDINATE:WaypointAir( AltType, Type, Action, Speed, SpeedLocked, airbase, DCSTasks, description )
function COORDINATE:WaypointAir( AltType, Type, Action, Speed, SpeedLocked, airbase, DCSTasks, description, timeReFuAr )
self:F2( { AltType, Type, Action, Speed, SpeedLocked } )
-- Set alttype or "RADIO" which is AGL.
@ -1055,7 +1058,7 @@ do -- COORDINATE
-- Waypoint type.
RoutePoint.type = Type or nil
RoutePoint.action = Action or nil
RoutePoint.action = Action or nil
-- Speed.
RoutePoint.speed = Speed/3.6
@ -1084,6 +1087,11 @@ do -- COORDINATE
--self:MarkToAll(string.format("Landing waypoint at airbase %s, ID=%d, Category=%d", airbase:GetName(), AirbaseID, AirbaseCategory ))
end
-- Time in minutes to stay at the airbase before resuming route.
if Type==COORDINATE.WaypointType.LandingReFuAr then
RoutePoint.timeReFuAr=timeReFuAr or 10
end
-- Waypoint tasks.
RoutePoint.task = {}
RoutePoint.task.id = "ComboTask"
@ -1173,7 +1181,17 @@ do -- COORDINATE
return self:WaypointAir(nil, COORDINATE.WaypointType.Land, COORDINATE.WaypointAction.Landing, Speed, false, airbase, DCSTasks, description)
end
--- Build a Waypoint Air "LandingReFuAr". Mimics the aircraft ReFueling and ReArming.
-- @param #COORDINATE self
-- @param DCS#Speed Speed Airspeed in km/h.
-- @param Wrapper.Airbase#AIRBASE airbase The airbase for takeoff and landing points.
-- @param #number timeReFuAr Time in minutes, the aircraft stays at the airbase. Default 10 min.
-- @param #table DCSTasks A table of @{DCS#Task} items which are executed at the waypoint.
-- @param #string description A text description of the waypoint, which will be shown on the F10 map.
-- @return #table The route point.
function COORDINATE:WaypointAirLandingReFu( Speed, airbase, timeReFuAr, DCSTasks, description )
return self:WaypointAir(nil, COORDINATE.WaypointType.LandingReFuAr, COORDINATE.WaypointAction.LandingReFuAr, Speed, false, airbase, DCSTasks, description, timeReFuAr or 10)
end
--- Build an ground type route point.

View File

@ -150,6 +150,7 @@
-- @field #number parkingscanradius Radius in meters until which parking spots are scanned for obstacles like other units, statics or scenery.
-- @field #boolean parkingscanscenery If true, area around parking spots is scanned for scenery objects. Default is false.
-- @field #boolean parkingverysafe If true, parking spots are considered as non-free until a possible aircraft has left and taken off. Default false.
-- @field #boolean despawnair If true, aircraft are despawned when they reach their destination zone. Default.
-- @extends Core.Spawn#SPAWN
--- Implements an easy to use way to randomly fill your map with AI aircraft.
@ -428,6 +429,7 @@ RAT={
parkingscanradius=40, -- Scan radius.
parkingscanscenery=false, -- Scan parking spots for scenery obstacles.
parkingverysafe=false, -- Very safe option.
despawnair=true,
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -546,7 +548,7 @@ RAT.id="RAT | "
--- RAT version.
-- @list version
RAT.version={
version = "2.3.5",
version = "2.3.6",
print = true,
}
@ -1098,6 +1100,14 @@ function RAT:SetParkingSpotSafeOFF()
return self
end
--- Aircraft that reach their destination zone are not despawned. They will probably go the the nearest airbase and try to land.
-- @param #RAT self
-- @return #RAT RAT self object.
function RAT:SetDespawnAirOFF()
self.despawnair=false
return self
end
--- Set takeoff type. Starting cold at airport, starting hot at airport, starting at runway, starting in the air.
-- Default is "takeoff-coldorhot". So there is a 50% chance that the aircraft starts with cold engines and 50% that it starts with hot engines.
-- @param #RAT self
@ -3604,13 +3614,18 @@ function RAT:Status(message, forID)
local text=string.format("Flight %s will be despawned NOW!", self.alias)
self:T(RAT.id..text)
-- Despawn old group.
-- Respawn group
if (not self.norespawn) and (not self.respawn_after_takeoff) then
local idx=self:GetSpawnIndexFromGroup(group)
local coord=group:GetCoordinate()
self:_Respawn(idx, coord, 0)
end
self:_Despawn(group, 0)
-- Despawn old group.
if self.despawnair then
self:_Despawn(group, 0)
end
end

File diff suppressed because it is too large Load Diff