mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/Ops
This commit is contained in:
commit
ac4db4a392
@ -1688,6 +1688,20 @@ do -- AI_A2A_DISPATCHER
|
|||||||
return DefenderSquadron
|
return DefenderSquadron
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Get a resource count from a specific squadron
|
||||||
|
-- @param #AI_A2A_DISPATCHER self
|
||||||
|
-- @param #string Squadron Name of the squadron.
|
||||||
|
-- @return #number Number of airframes available or nil if the squadron does not exist
|
||||||
|
function AI_A2A_DISPATCHER:QuerySquadron(Squadron)
|
||||||
|
local Squadron = self:GetSquadron(Squadron)
|
||||||
|
if Squadron.ResourceCount then
|
||||||
|
self:T2(string.format("%s = %s",Squadron.Name,Squadron.ResourceCount))
|
||||||
|
return Squadron.ResourceCount
|
||||||
|
end
|
||||||
|
self:F({Squadron = Squadron.Name,SquadronResourceCount = Squadron.ResourceCount})
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
--- [DEPRECATED - Might create problems launching planes] Set the Squadron visible before startup of the dispatcher.
|
--- [DEPRECATED - Might create problems launching planes] Set the Squadron visible before startup of the dispatcher.
|
||||||
-- All planes will be spawned as uncontrolled on the parking spot.
|
-- All planes will be spawned as uncontrolled on the parking spot.
|
||||||
-- They will lock the parking spot.
|
-- They will lock the parking spot.
|
||||||
|
|||||||
@ -951,7 +951,7 @@ do -- AI_A2G_DISPATCHER
|
|||||||
AI_A2G_DISPATCHER.DefenseQueue = {}
|
AI_A2G_DISPATCHER.DefenseQueue = {}
|
||||||
|
|
||||||
--- Defense approach types.
|
--- Defense approach types.
|
||||||
-- @type #AI_A2G_DISPATCHER.DefenseApproach
|
-- @type AI_A2G_DISPATCHER.DefenseApproach
|
||||||
AI_A2G_DISPATCHER.DefenseApproach = {
|
AI_A2G_DISPATCHER.DefenseApproach = {
|
||||||
Random = 1,
|
Random = 1,
|
||||||
Distance = 2,
|
Distance = 2,
|
||||||
@ -1806,6 +1806,19 @@ do -- AI_A2G_DISPATCHER
|
|||||||
return DefenderSquadron
|
return DefenderSquadron
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Get a resource count from a specific squadron
|
||||||
|
-- @param #AI_A2G_DISPATCHER self
|
||||||
|
-- @param #string Squadron Name of the squadron.
|
||||||
|
-- @return #number Number of airframes available or nil if the squadron does not exist
|
||||||
|
function AI_A2G_DISPATCHER:QuerySquadron(Squadron)
|
||||||
|
local Squadron = self:GetSquadron(Squadron)
|
||||||
|
if Squadron.ResourceCount then
|
||||||
|
self:T2(string.format("%s = %s",Squadron.Name,Squadron.ResourceCount))
|
||||||
|
return Squadron.ResourceCount
|
||||||
|
end
|
||||||
|
self:F({Squadron = Squadron.Name,SquadronResourceCount = Squadron.ResourceCount})
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
--- Set the Squadron visible before startup of the dispatcher.
|
--- Set the Squadron visible before startup of the dispatcher.
|
||||||
-- All planes will be spawned as uncontrolled on the parking spot.
|
-- All planes will be spawned as uncontrolled on the parking spot.
|
||||||
@ -1839,7 +1852,7 @@ do -- AI_A2G_DISPATCHER
|
|||||||
--- Check if the Squadron is visible before startup of the dispatcher.
|
--- Check if the Squadron is visible before startup of the dispatcher.
|
||||||
-- @param #AI_A2G_DISPATCHER self
|
-- @param #AI_A2G_DISPATCHER self
|
||||||
-- @param #string SquadronName The squadron name.
|
-- @param #string SquadronName The squadron name.
|
||||||
-- @return #bool true if visible.
|
-- @return #boolean true if visible.
|
||||||
-- @usage
|
-- @usage
|
||||||
--
|
--
|
||||||
-- -- Set the Squadron visible before startup of dispatcher.
|
-- -- Set the Squadron visible before startup of dispatcher.
|
||||||
|
|||||||
@ -947,7 +947,7 @@ do -- AI_AIR_DISPATCHER
|
|||||||
AI_AIR_DISPATCHER.DefenseQueue = {}
|
AI_AIR_DISPATCHER.DefenseQueue = {}
|
||||||
|
|
||||||
--- Defense approach types
|
--- Defense approach types
|
||||||
-- @type #AI_AIR_DISPATCHER.DefenseApproach
|
-- @type AI_AIR_DISPATCHER.DefenseApproach
|
||||||
AI_AIR_DISPATCHER.DefenseApproach = {
|
AI_AIR_DISPATCHER.DefenseApproach = {
|
||||||
Random = 1,
|
Random = 1,
|
||||||
Distance = 2,
|
Distance = 2,
|
||||||
@ -1852,7 +1852,7 @@ do -- AI_AIR_DISPATCHER
|
|||||||
--- Check if the Squadron is visible before startup of the dispatcher.
|
--- Check if the Squadron is visible before startup of the dispatcher.
|
||||||
-- @param #AI_AIR_DISPATCHER self
|
-- @param #AI_AIR_DISPATCHER self
|
||||||
-- @param #string SquadronName The squadron name.
|
-- @param #string SquadronName The squadron name.
|
||||||
-- @return #bool true if visible.
|
-- @return #boolean true if visible.
|
||||||
-- @usage
|
-- @usage
|
||||||
--
|
--
|
||||||
-- -- Set the Squadron visible before startup of dispatcher.
|
-- -- Set the Squadron visible before startup of dispatcher.
|
||||||
|
|||||||
@ -443,9 +443,9 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @param #number ZLevels The amount of levels on the Z-axis.
|
-- @param #number ZLevels The amount of levels on the Z-axis.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
@ -493,9 +493,9 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @param #number ZLevels The amount of levels on the Z-axis.
|
-- @param #number ZLevels The amount of levels on the Z-axis.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
@ -580,7 +580,7 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationTrail( XStart, XSpace, YStart )
|
function AI_ESCORT:MenuFormationTrail( XStart, XSpace, YStart )
|
||||||
|
|
||||||
@ -594,7 +594,7 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationStack( XStart, XSpace, YStart, YSpace )
|
function AI_ESCORT:MenuFormationStack( XStart, XSpace, YStart, YSpace )
|
||||||
@ -609,8 +609,8 @@ end
|
|||||||
-- This menu will appear under **Formation**.
|
-- This menu will appear under **Formation**.
|
||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationLeftLine( XStart, YStart, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationLeftLine( XStart, YStart, ZStart, ZSpace )
|
||||||
@ -625,8 +625,8 @@ end
|
|||||||
-- This menu will appear under **Formation**.
|
-- This menu will appear under **Formation**.
|
||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationRightLine( XStart, YStart, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationRightLine( XStart, YStart, ZStart, ZSpace )
|
||||||
@ -642,8 +642,8 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationLeftWing( XStart, XSpace, YStart, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationLeftWing( XStart, XSpace, YStart, ZStart, ZSpace )
|
||||||
@ -659,8 +659,8 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationRightWing( XStart, XSpace, YStart, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationRightWing( XStart, XSpace, YStart, ZStart, ZSpace )
|
||||||
@ -676,9 +676,9 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationCenterWing( XStart, XSpace, YStart, YSpace, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationCenterWing( XStart, XSpace, YStart, YSpace, ZStart, ZSpace )
|
||||||
@ -694,9 +694,9 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:MenuFormationVic( XStart, XSpace, YStart, YSpace, ZStart, ZSpace )
|
function AI_ESCORT:MenuFormationVic( XStart, XSpace, YStart, YSpace, ZStart, ZSpace )
|
||||||
@ -712,9 +712,9 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
|
||||||
-- @param #nubmer ZStart The start position on the Z-axis in meters for the first group.
|
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
|
||||||
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
|
||||||
-- @param #number ZLevels The amount of levels on the Z-axis.
|
-- @param #number ZLevels The amount of levels on the Z-axis.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
@ -1471,7 +1471,7 @@ end
|
|||||||
-- @param #AI_ESCORT self
|
-- @param #AI_ESCORT self
|
||||||
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
-- @param #number XStart The start position on the X-axis in meters for the first group.
|
||||||
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
|
||||||
-- @param #nubmer YStart The start position on the Y-axis in meters for the first group.
|
-- @param #number YStart The start position on the Y-axis in meters for the first group.
|
||||||
-- @return #AI_ESCORT
|
-- @return #AI_ESCORT
|
||||||
function AI_ESCORT:_EscortFormationTrail( EscortGroup, XStart, XSpace, YStart )
|
function AI_ESCORT:_EscortFormationTrail( EscortGroup, XStart, XSpace, YStart )
|
||||||
|
|
||||||
|
|||||||
@ -540,7 +540,7 @@ do -- COORDINATE
|
|||||||
local gotscenery=false
|
local gotscenery=false
|
||||||
|
|
||||||
local function EvaluateZone(ZoneObject)
|
local function EvaluateZone(ZoneObject)
|
||||||
BASE:T({ZoneObject})
|
|
||||||
if ZoneObject then
|
if ZoneObject then
|
||||||
|
|
||||||
-- Get category of scanned object.
|
-- Get category of scanned object.
|
||||||
@ -3284,6 +3284,51 @@ do -- COORDINATE
|
|||||||
return self:GetTemperatureText( nil, Settings )
|
return self:GetTemperatureText( nil, Settings )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Function to check if a coordinate is in a steep (>8% elevation) area of the map
|
||||||
|
-- @param #COORDINATE self
|
||||||
|
-- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter)
|
||||||
|
-- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters)
|
||||||
|
-- @return #boolen IsSteep If true, area is steep
|
||||||
|
-- @return #number MaxElevation Elevation in meters measured over 100m
|
||||||
|
function COORDINATE:IsInSteepArea(Radius,Minelevation)
|
||||||
|
local steep = false
|
||||||
|
local elev = Minelevation or 8
|
||||||
|
local bdelta = 0
|
||||||
|
local h0 = self:GetLandHeight()
|
||||||
|
local radius = Radius or 50
|
||||||
|
local diam = radius * 2
|
||||||
|
for i=0,150,30 do
|
||||||
|
local polar = math.fmod(i+180,360)
|
||||||
|
local c1 = self:Translate(radius,i,false,false)
|
||||||
|
local c2 = self:Translate(radius,polar,false,false)
|
||||||
|
local h1 = c1:GetLandHeight()
|
||||||
|
local h2 = c2:GetLandHeight()
|
||||||
|
local d1 = math.abs(h1-h2)
|
||||||
|
local d2 = math.abs(h0-h1)
|
||||||
|
local d3 = math.abs(h0-h2)
|
||||||
|
local dm = d1 > d2 and d1 or d2
|
||||||
|
local dm1 = dm > d3 and dm or d3
|
||||||
|
bdelta = dm1 > bdelta and dm1 or bdelta
|
||||||
|
self:T(string.format("d1=%d, d2=%d, d3=%d, max delta=%d",d1,d2,d3,bdelta))
|
||||||
|
end
|
||||||
|
local steepness = bdelta / (radius / 100)
|
||||||
|
if steepness >= elev then steep = true end
|
||||||
|
return steep, math.floor(steepness)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Function to check if a coordinate is in a flat (<8% elevation) area of the map
|
||||||
|
-- @param #COORDINATE self
|
||||||
|
-- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter)
|
||||||
|
-- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters)
|
||||||
|
-- @return #boolen IsFlat If true, area is flat
|
||||||
|
-- @return #number MaxElevation Elevation in meters measured over 100m
|
||||||
|
function COORDINATE:IsInFlatArea(Radius,Minelevation)
|
||||||
|
local steep, elev = self:IsInSteepArea(Radius,Minelevation)
|
||||||
|
local flat = not steep
|
||||||
|
return flat, elev
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
do -- POINT_VEC3
|
do -- POINT_VEC3
|
||||||
|
|||||||
@ -3084,6 +3084,39 @@ function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are generally **not** allowed to use afterburner. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetProhibitAfterburner()
|
||||||
|
self.prohibitAB = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are generally allowed to use afterburner. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetAllowAfterburner()
|
||||||
|
self.prohibitAB = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are **not** allowed to use afterburner in mission execution phase. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetProhibitAfterburnerExecutePhase()
|
||||||
|
self.prohibitABExecute = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are allowed to use afterburner in mission execution phase. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetAllowAfterburnerExecutePhase()
|
||||||
|
self.prohibitABExecute = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
-- prohibitABExecute
|
||||||
|
|
||||||
--- **[LEGION, COMMANDER, CHIEF]** Assign a legion cohort to the mission. Only these cohorts will be considered for the job.
|
--- **[LEGION, COMMANDER, CHIEF]** Assign a legion cohort to the mission. Only these cohorts will be considered for the job.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
|
|||||||
@ -1219,7 +1219,7 @@ CTLD.UnitTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.0.35"
|
CTLD.version="1.0.36"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -2335,7 +2335,7 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
|
|||||||
rheading = UTILS.RandomGaussian(0,30,-90,90,100)
|
rheading = UTILS.RandomGaussian(0,30,-90,90,100)
|
||||||
rheading = math.fmod((heading + rheading + addon), 360)
|
rheading = math.fmod((heading + rheading + addon), 360)
|
||||||
else
|
else
|
||||||
local initialSpacing = IsHerc and 16 or 12 -- initial spacing of the first crates
|
local initialSpacing = IsHerc and 16 or (capabilities.length+2) -- initial spacing of the first crates
|
||||||
local crateSpacing = 4 -- further spacing of remaining crates
|
local crateSpacing = 4 -- further spacing of remaining crates
|
||||||
local lateralSpacing = 4 -- lateral spacing of crates
|
local lateralSpacing = 4 -- lateral spacing of crates
|
||||||
local nrSideBySideCrates = 3 -- number of crates that are placed side-by-side
|
local nrSideBySideCrates = 3 -- number of crates that are placed side-by-side
|
||||||
|
|||||||
@ -206,7 +206,7 @@ FLIGHTGROUP.PlayerSkill = {
|
|||||||
|
|
||||||
--- Player data.
|
--- Player data.
|
||||||
-- @type FLIGHTGROUP.PlayerData
|
-- @type FLIGHTGROUP.PlayerData
|
||||||
-- @type #string name Player name.
|
-- @field #string name Player name.
|
||||||
-- @field #boolean subtitles Display subtitles.
|
-- @field #boolean subtitles Display subtitles.
|
||||||
-- @field #string skill Skill level.
|
-- @field #string skill Skill level.
|
||||||
|
|
||||||
|
|||||||
@ -3339,8 +3339,10 @@ end
|
|||||||
function OPSGROUP:GetExpectedSpeed()
|
function OPSGROUP:GetExpectedSpeed()
|
||||||
|
|
||||||
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
|
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
|
||||||
|
--env.info("GetExpectedSpeed - returning ZERO")
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
--env.info("GetExpectedSpeed - returning self.speedWP = "..self.speedWp)
|
||||||
return self.speedWp or 0
|
return self.speedWp or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -5401,6 +5403,17 @@ function OPSGROUP:onafterMissionExecute(From, Event, To, Mission)
|
|||||||
self:SetEngageDetectedOn(UTILS.MetersToNM(Mission.engagedetectedRmax), Mission.engagedetectedTypes, Mission.engagedetectedEngageZones, Mission.engagedetectedNoEngageZones)
|
self:SetEngageDetectedOn(UTILS.MetersToNM(Mission.engagedetectedRmax), Mission.engagedetectedTypes, Mission.engagedetectedEngageZones, Mission.engagedetectedNoEngageZones)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set AB usage for mission execution based on Mission entry, if the option was set in the mission
|
||||||
|
if self.isFlightgroup then
|
||||||
|
if Mission.prohibitABExecute == true then
|
||||||
|
self:SetProhibitAfterburner()
|
||||||
|
self:I("Set prohibit AB")
|
||||||
|
elseif Mission.prohibitABExecute == false then
|
||||||
|
self:SetAllowAfterburner()
|
||||||
|
self:T2("Set allow AB")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- On after "PauseMission" event.
|
--- On after "PauseMission" event.
|
||||||
@ -5697,6 +5710,17 @@ function OPSGROUP:onafterMissionDone(From, Event, To, Mission)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set AB usage based on Mission entry, if the option was set in the mission
|
||||||
|
if self.isFlightgroup then
|
||||||
|
if Mission.prohibitAB == true then
|
||||||
|
self:T2("Setting prohibit AB")
|
||||||
|
self:SetProhibitAfterburner()
|
||||||
|
elseif Mission.prohibitAB == false then
|
||||||
|
self:T2("Setting allow AB")
|
||||||
|
self:SetAllowAfterburner()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Check if group is done.
|
-- Check if group is done.
|
||||||
self:_CheckGroupDone(delay)
|
self:_CheckGroupDone(delay)
|
||||||
|
|
||||||
@ -6117,6 +6141,18 @@ function OPSGROUP:_SetMissionOptions(mission)
|
|||||||
self:SwitchICLS(mission.icls.Channel, mission.icls.Morse, mission.icls.UnitName)
|
self:SwitchICLS(mission.icls.Channel, mission.icls.Morse, mission.icls.UnitName)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set AB usage based on Mission entry, if the option was set in the mission
|
||||||
|
if self.isFlightgroup then
|
||||||
|
if mission.prohibitAB == true then
|
||||||
|
self:SetProhibitAfterburner()
|
||||||
|
self:T2("Set prohibit AB")
|
||||||
|
elseif mission.prohibitAB == false then
|
||||||
|
self:SetAllowAfterburner()
|
||||||
|
self:T2("Set allow AB")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user