mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #1122 from FlightControl-Master/FF/Develop
AIRBOSS v0.9.8
This commit is contained in:
commit
6853eecffa
@ -210,6 +210,7 @@ do -- COORDINATE
|
|||||||
FromParkingAreaHot = "From Parking Area Hot",
|
FromParkingAreaHot = "From Parking Area Hot",
|
||||||
FromRunway = "From Runway",
|
FromRunway = "From Runway",
|
||||||
Landing = "Landing",
|
Landing = "Landing",
|
||||||
|
LandingReFuAr = "LandingReFuAr",
|
||||||
}
|
}
|
||||||
|
|
||||||
--- @field COORDINATE.WaypointType
|
--- @field COORDINATE.WaypointType
|
||||||
@ -219,6 +220,7 @@ do -- COORDINATE
|
|||||||
TakeOff = "TakeOffParkingHot",
|
TakeOff = "TakeOffParkingHot",
|
||||||
TurningPoint = "Turning Point",
|
TurningPoint = "Turning Point",
|
||||||
Land = "Land",
|
Land = "Land",
|
||||||
|
LandingReFuAr = "LandingReFuAr",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1027,8 +1029,9 @@ do -- COORDINATE
|
|||||||
-- @param Wrapper.Airbase#AIRBASE airbase The airbase for takeoff and landing points.
|
-- @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 #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 #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.
|
-- @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 } )
|
self:F2( { AltType, Type, Action, Speed, SpeedLocked } )
|
||||||
|
|
||||||
-- Set alttype or "RADIO" which is AGL.
|
-- Set alttype or "RADIO" which is AGL.
|
||||||
@ -1055,7 +1058,7 @@ do -- COORDINATE
|
|||||||
|
|
||||||
-- Waypoint type.
|
-- Waypoint type.
|
||||||
RoutePoint.type = Type or nil
|
RoutePoint.type = Type or nil
|
||||||
RoutePoint.action = Action or nil
|
RoutePoint.action = Action or nil
|
||||||
|
|
||||||
-- Speed.
|
-- Speed.
|
||||||
RoutePoint.speed = Speed/3.6
|
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 ))
|
--self:MarkToAll(string.format("Landing waypoint at airbase %s, ID=%d, Category=%d", airbase:GetName(), AirbaseID, AirbaseCategory ))
|
||||||
end
|
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.
|
-- Waypoint tasks.
|
||||||
RoutePoint.task = {}
|
RoutePoint.task = {}
|
||||||
RoutePoint.task.id = "ComboTask"
|
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)
|
return self:WaypointAir(nil, COORDINATE.WaypointType.Land, COORDINATE.WaypointAction.Landing, Speed, false, airbase, DCSTasks, description)
|
||||||
end
|
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.
|
--- Build an ground type route point.
|
||||||
|
|||||||
@ -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 #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 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 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
|
-- @extends Core.Spawn#SPAWN
|
||||||
|
|
||||||
--- Implements an easy to use way to randomly fill your map with AI aircraft.
|
--- Implements an easy to use way to randomly fill your map with AI aircraft.
|
||||||
@ -428,6 +429,7 @@ RAT={
|
|||||||
parkingscanradius=40, -- Scan radius.
|
parkingscanradius=40, -- Scan radius.
|
||||||
parkingscanscenery=false, -- Scan parking spots for scenery obstacles.
|
parkingscanscenery=false, -- Scan parking spots for scenery obstacles.
|
||||||
parkingverysafe=false, -- Very safe option.
|
parkingverysafe=false, -- Very safe option.
|
||||||
|
despawnair=true,
|
||||||
}
|
}
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
@ -546,7 +548,7 @@ RAT.id="RAT | "
|
|||||||
--- RAT version.
|
--- RAT version.
|
||||||
-- @list version
|
-- @list version
|
||||||
RAT.version={
|
RAT.version={
|
||||||
version = "2.3.5",
|
version = "2.3.6",
|
||||||
print = true,
|
print = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1098,6 +1100,14 @@ function RAT:SetParkingSpotSafeOFF()
|
|||||||
return self
|
return self
|
||||||
end
|
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.
|
--- 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.
|
-- 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
|
-- @param #RAT self
|
||||||
@ -3604,13 +3614,18 @@ function RAT:Status(message, forID)
|
|||||||
|
|
||||||
local text=string.format("Flight %s will be despawned NOW!", self.alias)
|
local text=string.format("Flight %s will be despawned NOW!", self.alias)
|
||||||
self:T(RAT.id..text)
|
self:T(RAT.id..text)
|
||||||
-- Despawn old group.
|
|
||||||
|
-- Respawn group
|
||||||
if (not self.norespawn) and (not self.respawn_after_takeoff) then
|
if (not self.norespawn) and (not self.respawn_after_takeoff) then
|
||||||
local idx=self:GetSpawnIndexFromGroup(group)
|
local idx=self:GetSpawnIndexFromGroup(group)
|
||||||
local coord=group:GetCoordinate()
|
local coord=group:GetCoordinate()
|
||||||
self:_Respawn(idx, coord, 0)
|
self:_Respawn(idx, coord, 0)
|
||||||
end
|
end
|
||||||
self:_Despawn(group, 0)
|
|
||||||
|
-- Despawn old group.
|
||||||
|
if self.despawnair then
|
||||||
|
self:_Despawn(group, 0)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user