mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-23 19:45:29 +00:00
Static
This commit is contained in:
+459
-163
@@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170707_0826' )
|
env.info( 'Moose Generation Timestamp: 20170708_0922' )
|
||||||
|
|
||||||
--- Various routines
|
--- Various routines
|
||||||
-- @module routines
|
-- @module routines
|
||||||
@@ -3097,9 +3097,9 @@ end
|
|||||||
function BASE:GetParent( Child )
|
function BASE:GetParent( Child )
|
||||||
local Parent
|
local Parent
|
||||||
if rawget( Child, "__" ) then
|
if rawget( Child, "__" ) then
|
||||||
Parent = getmetatable( Child.__ ).__Index
|
Parent = getmetatable( Child.__ ).__index
|
||||||
else
|
else
|
||||||
Parent = getmetatable( Child ).__Index
|
Parent = getmetatable( Child ).__index
|
||||||
end
|
end
|
||||||
return Parent
|
return Parent
|
||||||
end
|
end
|
||||||
@@ -5370,7 +5370,7 @@ do -- SETTINGS
|
|||||||
if PlayerName == nil then
|
if PlayerName == nil then
|
||||||
local self = BASE:Inherit( self, BASE:New() ) -- #SETTINGS
|
local self = BASE:Inherit( self, BASE:New() ) -- #SETTINGS
|
||||||
self:SetMetric() -- Defaults
|
self:SetMetric() -- Defaults
|
||||||
self:SetA2G_MGRS() -- Defaults
|
self:SetA2G_BR() -- Defaults
|
||||||
self:SetA2A_BRAA() -- Defaults
|
self:SetA2A_BRAA() -- Defaults
|
||||||
self:SetLL_Accuracy( 2 ) -- Defaults
|
self:SetLL_Accuracy( 2 ) -- Defaults
|
||||||
self:SetLL_DMS( true ) -- Defaults
|
self:SetLL_DMS( true ) -- Defaults
|
||||||
@@ -5762,7 +5762,7 @@ do -- SETTINGS
|
|||||||
|
|
||||||
--- @param #SETTINGS self
|
--- @param #SETTINGS self
|
||||||
function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW )
|
function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW )
|
||||||
self.Metrics = MW
|
self.Metric = MW
|
||||||
MESSAGE:New( string.format("Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup )
|
MESSAGE:New( string.format("Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup )
|
||||||
self:RemovePlayerMenu(PlayerUnit)
|
self:RemovePlayerMenu(PlayerUnit)
|
||||||
self:SetPlayerMenu(PlayerUnit)
|
self:SetPlayerMenu(PlayerUnit)
|
||||||
@@ -15808,6 +15808,85 @@ function CARGO:Spawn( PointVec2 )
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Signal a flare at the position of the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
-- @param Utilities.Utils#FLARECOLOR FlareColor
|
||||||
|
function CARGO:Flare( FlareColor )
|
||||||
|
if self:IsUnLoaded() then
|
||||||
|
trigger.action.signalFlare( self.CargoObject:GetVec3(), FlareColor , 0 )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a white flare at the position of the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:FlareWhite()
|
||||||
|
self:Flare( trigger.flareColor.White )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a yellow flare at the position of the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:FlareYellow()
|
||||||
|
self:Flare( trigger.flareColor.Yellow )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a green flare at the position of the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:FlareGreen()
|
||||||
|
self:Flare( trigger.flareColor.Green )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a red flare at the position of the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:FlareRed()
|
||||||
|
self:Flare( trigger.flareColor.Red )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:Smoke( SmokeColor, Range )
|
||||||
|
self:F2()
|
||||||
|
if self:IsUnLoaded() then
|
||||||
|
if Range then
|
||||||
|
trigger.action.smoke( self.CargoObject:GetRandomVec3( Range ), SmokeColor )
|
||||||
|
else
|
||||||
|
trigger.action.smoke( self.CargoObject:GetVec3(), SmokeColor )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO Green.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:SmokeGreen()
|
||||||
|
self:Smoke( trigger.smokeColor.Green, Range )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO Red.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:SmokeRed()
|
||||||
|
self:Smoke( trigger.smokeColor.Red, Range )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO White.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:SmokeWhite()
|
||||||
|
self:Smoke( trigger.smokeColor.White, Range )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO Orange.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:SmokeOrange()
|
||||||
|
self:Smoke( trigger.smokeColor.Orange, Range )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the CARGO Blue.
|
||||||
|
-- @param #CARGO self
|
||||||
|
function CARGO:SmokeBlue()
|
||||||
|
self:Smoke( trigger.smokeColor.Blue, Range )
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Check if Cargo is the given @{Zone}.
|
--- Check if Cargo is the given @{Zone}.
|
||||||
@@ -16597,6 +16676,10 @@ function CARGO_GROUP:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius
|
|||||||
|
|
||||||
if From == "Loaded" then
|
if From == "Loaded" then
|
||||||
|
|
||||||
|
if self.CargoObject then
|
||||||
|
self.CargoObject:Destroy()
|
||||||
|
end
|
||||||
|
|
||||||
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
|
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
|
||||||
self.CargoSet:ForEach(
|
self.CargoSet:ForEach(
|
||||||
function( Cargo, NearRadius )
|
function( Cargo, NearRadius )
|
||||||
@@ -18247,6 +18330,94 @@ function POSITIONABLE:CargoItemCount()
|
|||||||
end
|
end
|
||||||
return ItemCount
|
return ItemCount
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Signal a flare at the position of the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
-- @param Utilities.Utils#FLARECOLOR FlareColor
|
||||||
|
function POSITIONABLE:Flare( FlareColor )
|
||||||
|
self:F2()
|
||||||
|
trigger.action.signalFlare( self:GetVec3(), FlareColor , 0 )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a white flare at the position of the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:FlareWhite()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.White , 0 )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a yellow flare at the position of the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:FlareYellow()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Yellow , 0 )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a green flare at the position of the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:FlareGreen()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Green , 0 )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Signal a red flare at the position of the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:FlareRed()
|
||||||
|
self:F2()
|
||||||
|
local Vec3 = self:GetVec3()
|
||||||
|
if Vec3 then
|
||||||
|
trigger.action.signalFlare( Vec3, trigger.flareColor.Red, 0 )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:Smoke( SmokeColor, Range )
|
||||||
|
self:F2()
|
||||||
|
if Range then
|
||||||
|
trigger.action.smoke( self:GetRandomVec3( Range ), SmokeColor )
|
||||||
|
else
|
||||||
|
trigger.action.smoke( self:GetVec3(), SmokeColor )
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE Green.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:SmokeGreen()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Green )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE Red.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:SmokeRed()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Red )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE White.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:SmokeWhite()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.White )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE Orange.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:SmokeOrange()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Orange )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Smoke the POSITIONABLE Blue.
|
||||||
|
-- @param #POSITIONABLE self
|
||||||
|
function POSITIONABLE:SmokeBlue()
|
||||||
|
self:F2()
|
||||||
|
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Blue )
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- **Wrapper** -- CONTROLLABLE is an intermediate class wrapping Group and Unit classes "controllers".
|
--- **Wrapper** -- CONTROLLABLE is an intermediate class wrapping Group and Unit classes "controllers".
|
||||||
--
|
--
|
||||||
-- ====
|
-- ====
|
||||||
@@ -21827,7 +21998,7 @@ do -- Players
|
|||||||
-- @return #nil The group has no players
|
-- @return #nil The group has no players
|
||||||
function GROUP:GetPlayerNames()
|
function GROUP:GetPlayerNames()
|
||||||
|
|
||||||
local PlayerNames = nil
|
local PlayerNames = {}
|
||||||
|
|
||||||
local Units = self:GetUnits()
|
local Units = self:GetUnits()
|
||||||
for UnitID, UnitData in pairs( Units ) do
|
for UnitID, UnitData in pairs( Units ) do
|
||||||
@@ -21843,7 +22014,99 @@ do -- Players
|
|||||||
return PlayerNames
|
return PlayerNames
|
||||||
end
|
end
|
||||||
|
|
||||||
end--- **Wrapper** - UNIT is a wrapper class for the DCS Class Unit.
|
end
|
||||||
|
|
||||||
|
--do -- Smoke
|
||||||
|
--
|
||||||
|
----- Signal a flare at the position of the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
---- @param Utilities.Utils#FLARECOLOR FlareColor
|
||||||
|
--function GROUP:Flare( FlareColor )
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.signalFlare( self:GetVec3(), FlareColor , 0 )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Signal a white flare at the position of the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:FlareWhite()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.White , 0 )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Signal a yellow flare at the position of the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:FlareYellow()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Yellow , 0 )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Signal a green flare at the position of the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:FlareGreen()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Green , 0 )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Signal a red flare at the position of the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:FlareRed()
|
||||||
|
-- self:F2()
|
||||||
|
-- local Vec3 = self:GetVec3()
|
||||||
|
-- if Vec3 then
|
||||||
|
-- trigger.action.signalFlare( Vec3, trigger.flareColor.Red, 0 )
|
||||||
|
-- end
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:Smoke( SmokeColor, Range )
|
||||||
|
-- self:F2()
|
||||||
|
-- if Range then
|
||||||
|
-- trigger.action.smoke( self:GetRandomVec3( Range ), SmokeColor )
|
||||||
|
-- else
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), SmokeColor )
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP Green.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:SmokeGreen()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Green )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP Red.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:SmokeRed()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Red )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP White.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:SmokeWhite()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), trigger.smokeColor.White )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP Orange.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:SmokeOrange()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Orange )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
----- Smoke the GROUP Blue.
|
||||||
|
---- @param #GROUP self
|
||||||
|
--function GROUP:SmokeBlue()
|
||||||
|
-- self:F2()
|
||||||
|
-- trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Blue )
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--end--- **Wrapper** - UNIT is a wrapper class for the DCS Class Unit.
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
@@ -22443,12 +22706,17 @@ end
|
|||||||
-- @param #UNIT self
|
-- @param #UNIT self
|
||||||
function UNIT:GetThreatLevel()
|
function UNIT:GetThreatLevel()
|
||||||
|
|
||||||
local Attributes = self:GetDesc().attributes
|
|
||||||
self:T( Attributes )
|
|
||||||
|
|
||||||
local ThreatLevel = 0
|
local ThreatLevel = 0
|
||||||
local ThreatText = ""
|
local ThreatText = ""
|
||||||
|
|
||||||
|
local Descriptor = self:GetDesc()
|
||||||
|
|
||||||
|
if Descriptor then
|
||||||
|
|
||||||
|
local Attributes = Descriptor.attributes
|
||||||
|
self:T( Attributes )
|
||||||
|
|
||||||
if self:IsGround() then
|
if self:IsGround() then
|
||||||
|
|
||||||
self:T( "Ground" )
|
self:T( "Ground" )
|
||||||
@@ -22560,6 +22828,7 @@ function UNIT:GetThreatLevel()
|
|||||||
|
|
||||||
ThreatText = ThreatLevels[ThreatLevel+1]
|
ThreatText = ThreatLevels[ThreatLevel+1]
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:T2( ThreatLevel )
|
self:T2( ThreatLevel )
|
||||||
return ThreatLevel, ThreatText
|
return ThreatLevel, ThreatText
|
||||||
@@ -22633,92 +22902,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Signal a flare at the position of the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
-- @param Utilities.Utils#FLARECOLOR FlareColor
|
|
||||||
function UNIT:Flare( FlareColor )
|
|
||||||
self:F2()
|
|
||||||
trigger.action.signalFlare( self:GetVec3(), FlareColor , 0 )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Signal a white flare at the position of the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:FlareWhite()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.White , 0 )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Signal a yellow flare at the position of the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:FlareYellow()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Yellow , 0 )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Signal a green flare at the position of the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:FlareGreen()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.signalFlare( self:GetVec3(), trigger.flareColor.Green , 0 )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Signal a red flare at the position of the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:FlareRed()
|
|
||||||
self:F2()
|
|
||||||
local Vec3 = self:GetVec3()
|
|
||||||
if Vec3 then
|
|
||||||
trigger.action.signalFlare( Vec3, trigger.flareColor.Red, 0 )
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:Smoke( SmokeColor, Range )
|
|
||||||
self:F2()
|
|
||||||
if Range then
|
|
||||||
trigger.action.smoke( self:GetRandomVec3( Range ), SmokeColor )
|
|
||||||
else
|
|
||||||
trigger.action.smoke( self:GetVec3(), SmokeColor )
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT Green.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:SmokeGreen()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Green )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT Red.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:SmokeRed()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Red )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT White.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:SmokeWhite()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.White )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT Orange.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:SmokeOrange()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Orange )
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Smoke the UNIT Blue.
|
|
||||||
-- @param #UNIT self
|
|
||||||
function UNIT:SmokeBlue()
|
|
||||||
self:F2()
|
|
||||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Blue )
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Is methods
|
-- Is methods
|
||||||
@@ -24012,7 +24195,7 @@ end
|
|||||||
-- @param #string DisplayMessagePrefix (Default="Scoring: ") The scoring prefix string.
|
-- @param #string DisplayMessagePrefix (Default="Scoring: ") The scoring prefix string.
|
||||||
-- @return #SCORING
|
-- @return #SCORING
|
||||||
function SCORING:SetDisplayMessagePrefix( DisplayMessagePrefix )
|
function SCORING:SetDisplayMessagePrefix( DisplayMessagePrefix )
|
||||||
self.DisplayMessagePrefix = DisplayMessagePrefix or "Scoring: "
|
self.DisplayMessagePrefix = DisplayMessagePrefix or ""
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -24355,7 +24538,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
|||||||
MESSAGE:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
MESSAGE:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
||||||
10
|
10
|
||||||
):ToAll()
|
):ToAll()
|
||||||
UnitData:Destroy()
|
UnitData:GetGroup():Destroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -24629,7 +24812,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||||
else
|
else
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit a friendly target " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit friendly target " ..
|
||||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
|
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
|
||||||
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
||||||
2
|
2
|
||||||
@@ -24653,7 +24836,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
:ToCoalitionIf( InitCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
|
||||||
else
|
else
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit an enemy target " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit enemy target " ..
|
||||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
|
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
|
||||||
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
|
||||||
2
|
2
|
||||||
@@ -24665,7 +24848,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
end
|
end
|
||||||
else -- A scenery object was hit.
|
else -- A scenery object was hit.
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit a scenery object.",
|
:New( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit scenery object.",
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||||
@@ -24726,9 +24909,9 @@ function SCORING:_EventOnHit( Event )
|
|||||||
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1
|
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1
|
||||||
|
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit a friendly target " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit friendly target " ..
|
||||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.PenaltyHit .. " times. " ..
|
TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
"Penalty: -" .. PlayerHit.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Penalty: -" .. PlayerHit.Penalty .. " = " .. Player.Score - Player.Penalty,
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||||
@@ -24739,9 +24922,9 @@ function SCORING:_EventOnHit( Event )
|
|||||||
PlayerHit.Score = PlayerHit.Score + 1
|
PlayerHit.Score = PlayerHit.Score + 1
|
||||||
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
|
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit an enemy target " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit enemy target " ..
|
||||||
TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
|
TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Score: +" .. PlayerHit.Score .. " = " .. Player.Score - Player.Penalty,
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||||
@@ -24750,7 +24933,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
end
|
end
|
||||||
else -- A scenery object was hit.
|
else -- A scenery object was hit.
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit a scenery object.",
|
:New( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit scenery object.",
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesHit() and self:IfMessagesToAll() )
|
||||||
@@ -24850,17 +25033,17 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
|||||||
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
|
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " ..
|
||||||
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " ..
|
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
|
||||||
"Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Penalty: -" .. TargetDestroy.Penalty .. " = " .. Player.Score - Player.Penalty,
|
||||||
15
|
15
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
||||||
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
||||||
else
|
else
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed a friendly target " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly target " ..
|
||||||
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.PenaltyDestroy .. " times. " ..
|
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
|
||||||
"Penalty: -" .. TargetDestroy.Penalty .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Penalty: -" .. TargetDestroy.Penalty .. " = " .. Player.Score - Player.Penalty,
|
||||||
15
|
15
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
||||||
@@ -24884,17 +25067,17 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
|||||||
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
|
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " ..
|
||||||
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " ..
|
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
|
||||||
"Score: " .. TargetDestroy.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
|
"Score: +" .. TargetDestroy.Score .. " = " .. Player.Score - Player.Penalty,
|
||||||
15
|
15
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
||||||
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
|
||||||
else
|
else
|
||||||
MESSAGE
|
MESSAGE
|
||||||
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed an enemy " ..
|
:New( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy " ..
|
||||||
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. TargetDestroy.ScoreDestroy .. " times. " ..
|
TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
|
||||||
"Score: " .. TargetDestroy.Score .. ". Total:" .. Player.Score - Player.Penalty,
|
"Score: +" .. TargetDestroy.Score .. " = " .. Player.Score - Player.Penalty,
|
||||||
15
|
15
|
||||||
)
|
)
|
||||||
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
|
||||||
@@ -38805,6 +38988,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
self:E( { DefenderSquadron } )
|
self:E( { DefenderSquadron } )
|
||||||
local SpawnCoord = DefenderSquadron.Airbase:GetCoordinate() -- Core.Point#COORDINATE
|
local SpawnCoord = DefenderSquadron.Airbase:GetCoordinate() -- Core.Point#COORDINATE
|
||||||
local TargetCoord = Target.Set:GetFirst():GetCoordinate()
|
local TargetCoord = Target.Set:GetFirst():GetCoordinate()
|
||||||
|
if TargetCoord then
|
||||||
local Distance = SpawnCoord:Get2DDistance( TargetCoord )
|
local Distance = SpawnCoord:Get2DDistance( TargetCoord )
|
||||||
|
|
||||||
if ClosestDistance == 0 or Distance < ClosestDistance then
|
if ClosestDistance == 0 or Distance < ClosestDistance then
|
||||||
@@ -38817,6 +39001,7 @@ do -- AI_A2A_DISPATCHER
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ClosestDefenderSquadronName then
|
if ClosestDefenderSquadronName then
|
||||||
|
|
||||||
@@ -39162,33 +39347,33 @@ do
|
|||||||
-- 
|
-- 
|
||||||
--
|
--
|
||||||
-- The AI_A2A_GCICAP class is designed to create an automatic air defence system for a coalition setting up GCI and CAP air defenses.
|
-- The AI_A2A_GCICAP class is designed to create an automatic air defence system for a coalition setting up GCI and CAP air defenses.
|
||||||
|
-- The class derives from @{AI#AI_A2A_DISPATCHER} and thus all the methods that are defined in this class, can be used also in AI\_A2A\_GCICAP.
|
||||||
--
|
--
|
||||||
-- 
|
-- 
|
||||||
--
|
--
|
||||||
-- It includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy air movements that are detected by a ground based radar network.
|
-- AI_A2A_GCICAP includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy
|
||||||
-- CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept detected enemy aircraft or they run short of fuel and must return to base (RTB). When a CAP flight leaves their zone to perform an interception or return to base a new CAP flight will spawn to take their place.
|
-- air movements that are detected by a ground based radar network.
|
||||||
|
-- CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept
|
||||||
|
-- detected enemy aircraft or they run short of fuel and must return to base (RTB).
|
||||||
|
-- When a CAP flight leaves their zone to perform an interception or return to base a new CAP flight will spawn to take their place.
|
||||||
-- If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control.
|
-- If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control.
|
||||||
-- With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system.
|
-- With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system.
|
||||||
-- In short it is a plug in very flexible and configurable air defence module for DCS World.
|
-- In short it is a plug in very flexible and configurable air defence module for DCS World.
|
||||||
--
|
--
|
||||||
-- Note that in order to create a two way A2A defense system, two AI\_A2A\_GCICAP defense system may need to be created, for each coalition one.
|
-- The AI_A2A_GCICAP provides a lightweight configuration method using the mission editor.
|
||||||
-- This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.
|
|
||||||
--
|
--
|
||||||
-- ## 1. AI\_A2A\_GCICAP constructor:
|
|
||||||
--
|
--
|
||||||
-- The @{#AI_A2A_GCICAP.New}() method creates a new AI\_A2A\_GCICAP instance.
|
-- ## 1) Configure a working AI\_A2A\_GCICAP defense system for ONE coalition.
|
||||||
-- There are two parameters required, a list of prefix group names that collects the groups of the EWR network, and a radius in meters,
|
|
||||||
-- that will be used to group the detected targets.
|
|
||||||
--
|
--
|
||||||
-- ### 1.1. Define the **EWR network**:
|
-- ### 1.1) Define which airbases are for which coalition.
|
||||||
--
|
--
|
||||||
-- As part of the AI\_A2A\_GCICAP constructor, a list of prefixes must be given of the group names defined within the mission editor,
|
-- Color the airbases red or blue. You can do this by selecting the airbase on the map, and select the coalition blue or red.
|
||||||
-- that define the EWR network.
|
--
|
||||||
|
-- ### 1.2) Place Groups given a name starting with a **EWR prefix** of your choice to build your EWR network.
|
||||||
|
--
|
||||||
|
-- **All EWR groups starting with the EWR prefix (text) will be included in the detection system.**
|
||||||
--
|
--
|
||||||
-- An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.
|
-- An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.
|
||||||
--
|
|
||||||
-- 
|
|
||||||
--
|
|
||||||
-- Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units.
|
-- Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units.
|
||||||
-- These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US).
|
-- These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US).
|
||||||
-- Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar.
|
-- Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar.
|
||||||
@@ -39207,28 +39392,80 @@ do
|
|||||||
-- EWR networks are **dynamically maintained**. By defining in a **smart way the names or name prefixes of the groups** with EWR capable units, these groups will be **automatically added or deleted** from the EWR network,
|
-- EWR networks are **dynamically maintained**. By defining in a **smart way the names or name prefixes of the groups** with EWR capable units, these groups will be **automatically added or deleted** from the EWR network,
|
||||||
-- increasing or decreasing the radar coverage of the Early Warning System.
|
-- increasing or decreasing the radar coverage of the Early Warning System.
|
||||||
--
|
--
|
||||||
-- See the following example to setup an EWR network containing EWR stations and AWACS.
|
-- ### 1.3) Place Airplane or Helicopter Groups with late activation switched on
|
||||||
--
|
--
|
||||||
-- -- Setup the A2A GCICAP dispatcher, and initialize it.
|
-- These are **templates**, with a given name starting with **a Template prefix** above each airbase that you wanna have a squadron.
|
||||||
-- A2ADispatcher = AI_A2A_DISPATCHER_GCICAP:New( { "DF CCCP AWACS", "DF CCCP EWR" }, 30000 )
|
-- These **templates** need to be within 10km from the airbase center. They don't need to have a slot at the airplane, they can just be positioned above the airbase,
|
||||||
|
-- without a route, and should only have ONE unit.
|
||||||
--
|
--
|
||||||
-- The above example creates a new AI_A2A_DISPATCHER_GCICAP instance, and stores this in the variable (object) **A2ADispatcher**.
|
-- ### 1.4) Place floating helicopters to create the CAP zones.
|
||||||
-- The first parameter is are the prefixes of the group names that define the EWR network.
|
|
||||||
-- The A2A dispatcher will filter all active groups with a group name starting with **DF CCCP AWACS** or **DF CCCP EWR** to be included in the EWR network.
|
|
||||||
--
|
--
|
||||||
-- ### 1.2. Define the detected **target grouping radius**:
|
-- The helicopter indicates the start of the CAP zone.
|
||||||
|
-- The route points the form of the CAP zone polygon.
|
||||||
|
-- The place of the helicopter is important, as the airbase closest to the helicopter will be the airbase from where the CAP planes will take off for CAP.
|
||||||
--
|
--
|
||||||
-- As a second parameter of the @{#AI_A2A_DISPATCHER_GCICAP.New}() method, a radius in meters must be given. The radius indicates that detected targets need to be grouped within a radius of 30km.
|
-- ## 2) There are a lot of defaults set, which can be further modified using the methods in @{AI#AI_A2A_DISPATCHER}:
|
||||||
|
--
|
||||||
|
-- ### 2.1) Planes are taking off in the air from the airbases.
|
||||||
|
--
|
||||||
|
-- This prevents airbases to get cluttered with airplanes taking off, it also reduces the risk of human players colliding with taxiiing airplanes,
|
||||||
|
-- resulting in the airbase to halt operations.
|
||||||
|
--
|
||||||
|
-- ### 2.2) Planes return near the airbase or will land if damaged.
|
||||||
|
--
|
||||||
|
-- When damaged airplanes return to the airbase, they will be routed and will dissapear in the air when they are near the airbase.
|
||||||
|
-- There are exceptions to this rule, airplanes that aren't "listening" anymore due to damage or out of fuel, will return to the airbase and land.
|
||||||
|
--
|
||||||
|
-- ### 2.3) CAP operations setup for specific airbases, will be executed with the following parameters:
|
||||||
|
--
|
||||||
|
-- * The altitude will range between 6000 and 10000 meters.
|
||||||
|
-- * The CAP speed will vary between 500 and 800 km/h.
|
||||||
|
-- * The engage speed between 800 and 1200 km/h.
|
||||||
|
--
|
||||||
|
-- ### 2.4) Each airbase will perform GCI when required, with the following parameters:
|
||||||
|
--
|
||||||
|
-- * The engage speed is between 800 and 1200 km/h.
|
||||||
|
--
|
||||||
|
-- ### 2.5) Grouping or detected targets.
|
||||||
|
--
|
||||||
|
-- Detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate
|
||||||
|
-- group being detected.
|
||||||
|
--
|
||||||
|
-- Targets will be grouped within a radius of 30km by default.
|
||||||
|
--
|
||||||
|
-- The radius indicates that detected targets need to be grouped within a radius of 30km.
|
||||||
-- The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation.
|
-- The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation.
|
||||||
-- Fast planes like in the 80s, need a larger radius than WWII planes.
|
-- Fast planes like in the 80s, need a larger radius than WWII planes.
|
||||||
-- Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.
|
-- Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.
|
||||||
--
|
--
|
||||||
-- Note that detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate
|
-- ## 3) Additional notes:
|
||||||
-- group being detected. This may result in additional GCI being started by the dispatcher! So don't make this value too small!
|
|
||||||
--
|
--
|
||||||
-- ## 2. AI_A2A_DISPATCHER_DOCUMENTATION is derived from @{#AI_A2A_DISPATCHER},
|
-- In order to create a two way A2A defense system, **two AI\_A2A\_GCICAP defense systems must need to be created**, for each coalition one.
|
||||||
-- so all further documentation needs to be consulted in this class
|
-- Each defense system needs its own EWR network setup, airplane templates and CAP configurations.
|
||||||
-- for documentation consistency.
|
--
|
||||||
|
-- This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ## 4) Coding example how to use the AI\_A2A\_GCICAP class:
|
||||||
|
--
|
||||||
|
-- -- Setup the AI_A2A_GCICAP dispatcher for one coalition, and initialize it.
|
||||||
|
-- GCI_Red = AI_A2A_GCICAP:New( "EWR CCCP", "SQUADRON CCCP", "CAP CCCP", 2 )
|
||||||
|
--
|
||||||
|
-- This will create a GCI/CAP system for the RED coalition, and stores the reference to the GCI/CAP system in the `GCI\_Red` variable!
|
||||||
|
-- In the mission editor, the following setup will have taken place:
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- The following parameters were given to the :New method of AI_A2A_GCICAP, and mean the following:
|
||||||
|
--
|
||||||
|
-- * `EWR CCCP`: Groups of the RED coalition are placed that define the EWR network. These groups start with the name `EWR CCCP`.
|
||||||
|
-- * `SQUADRON CCCP`: Late activated Groups objects of the RED coalition are placed above the relevant airbases that will contain these templates in the squadron.
|
||||||
|
-- These late activated Groups start with the name `SQUADRON CCCP`. Each Group object contains only one Unit, and defines the weapon payload, skin and skill level.
|
||||||
|
-- * `CAP CCCP`: CAP Zones are defined using floating, late activated Helicopter Group objects, where the route points define the route of the polygon of the CAP Zone.
|
||||||
|
-- These Helicopter Group objects start with the name `CAP CCCP`, and will be the locations wherein CAP will be performed.
|
||||||
|
-- * `2` Defines how many CAP airplanes are patrolling in each CAP zone defined simulateneously.
|
||||||
--
|
--
|
||||||
-- @field #AI_A2A_GCICAP
|
-- @field #AI_A2A_GCICAP
|
||||||
AI_A2A_GCICAP = {
|
AI_A2A_GCICAP = {
|
||||||
@@ -40745,7 +40982,7 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Engage == true then
|
if Engage == true then
|
||||||
self:E( 'Detected -> Engaging' )
|
self:F( 'Detected -> Engaging' )
|
||||||
self:__Engage( 1 )
|
self:__Engage( 1 )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -40828,13 +41065,13 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
|
|||||||
if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then
|
if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then
|
||||||
if self.EngageZone then
|
if self.EngageZone then
|
||||||
if DetectedUnit:IsInZone( self.EngageZone ) then
|
if DetectedUnit:IsInZone( self.EngageZone ) then
|
||||||
self:E( {"Within Zone and Engaging ", DetectedUnit } )
|
self:F( {"Within Zone and Engaging ", DetectedUnit } )
|
||||||
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
|
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if self.EngageRange then
|
if self.EngageRange then
|
||||||
if DetectedUnit:GetPointVec3():Get2DDistance(Controllable:GetPointVec3() ) <= self.EngageRange then
|
if DetectedUnit:GetPointVec3():Get2DDistance(Controllable:GetPointVec3() ) <= self.EngageRange then
|
||||||
self:E( {"Within Range and Engaging", DetectedUnit } )
|
self:F( {"Within Range and Engaging", DetectedUnit } )
|
||||||
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
|
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -40851,7 +41088,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
|
|||||||
|
|
||||||
|
|
||||||
if #AttackTasks == 0 then
|
if #AttackTasks == 0 then
|
||||||
self:E("No targets found -> Going back to Patrolling")
|
self:F("No targets found -> Going back to Patrolling")
|
||||||
self:__Abort( 1 )
|
self:__Abort( 1 )
|
||||||
self:__Route( 1 )
|
self:__Route( 1 )
|
||||||
self:SetDetectionActivated()
|
self:SetDetectionActivated()
|
||||||
@@ -45901,7 +46138,7 @@ function MISSION:ReportOverview( ReportGroup, TaskStatus )
|
|||||||
|
|
||||||
-- Determine how many tasks are remaining.
|
-- Determine how many tasks are remaining.
|
||||||
local TasksRemaining = 0
|
local TasksRemaining = 0
|
||||||
for TaskID, Task in pairs( self:GetTasks() ) do
|
for TaskID, Task in UTILS.spairs( self:GetTasks(), function( t, a, b ) return t[a]:ReportOrder( ReportGroup ) < t[b]:ReportOrder( ReportGroup ) end ) do
|
||||||
local Task = Task -- Tasking.Task#TASK
|
local Task = Task -- Tasking.Task#TASK
|
||||||
if Task:Is( TaskStatus ) then
|
if Task:Is( TaskStatus ) then
|
||||||
Report:Add( " - " .. Task:ReportOverview( ReportGroup ) )
|
Report:Add( " - " .. Task:ReportOverview( ReportGroup ) )
|
||||||
@@ -46745,7 +46982,7 @@ function TASK:SetPlannedMenuForGroup( TaskGroup, MenuTime )
|
|||||||
|
|
||||||
--local MissionMenu = Mission:GetMenu( TaskGroup )
|
--local MissionMenu = Mission:GetMenu( TaskGroup )
|
||||||
|
|
||||||
local TaskPlannedMenu = MENU_GROUP:New( TaskGroup, "Planned Tasks", MissionMenu ):SetTime( MenuTime )
|
local TaskPlannedMenu = MENU_GROUP:New( TaskGroup, "Join Planned Task", MissionMenu, Mission.MenuReportTasksPerStatus, Mission, TaskGroup, "Planned" ):SetTime( MenuTime )
|
||||||
local TaskTypeMenu = MENU_GROUP:New( TaskGroup, TaskType, TaskPlannedMenu ):SetTime( MenuTime ):SetRemoveParent( true )
|
local TaskTypeMenu = MENU_GROUP:New( TaskGroup, TaskType, TaskPlannedMenu ):SetTime( MenuTime ):SetRemoveParent( true )
|
||||||
local TaskTypeMenu = MENU_GROUP:New( TaskGroup, TaskText, TaskTypeMenu ):SetTime( MenuTime ):SetRemoveParent( true )
|
local TaskTypeMenu = MENU_GROUP:New( TaskGroup, TaskText, TaskTypeMenu ):SetTime( MenuTime ):SetRemoveParent( true )
|
||||||
local ReportTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Report Task Status" ), TaskTypeMenu, self.MenuTaskStatus, self, TaskGroup ):SetTime( MenuTime ):SetRemoveParent( true )
|
local ReportTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Report Task Status" ), TaskTypeMenu, self.MenuTaskStatus, self, TaskGroup ):SetTime( MenuTime ):SetRemoveParent( true )
|
||||||
@@ -48487,6 +48724,14 @@ do -- TASK_A2G_SEAD
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TASK_A2G_SEAD:ReportOrder( ReportGroup )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @param #TASK_A2G_SEAD self
|
--- @param #TASK_A2G_SEAD self
|
||||||
function TASK_A2G_SEAD:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2G_SEAD:onafterGoal( TaskUnit, From, Event, To )
|
||||||
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
||||||
@@ -48498,7 +48743,7 @@ do -- TASK_A2G_SEAD
|
|||||||
self:__Goal( -10 )
|
self:__Goal( -10 )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when a target in scope of the A2A attack, has been destroyed .
|
--- Set a score when a target in scope of the A2G attack, has been destroyed .
|
||||||
-- @param #TASK_A2G_SEAD self
|
-- @param #TASK_A2G_SEAD self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points to be granted when task process has been achieved.
|
-- @param #number Score The score in points to be granted when task process has been achieved.
|
||||||
@@ -48514,7 +48759,7 @@ do -- TASK_A2G_SEAD
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when all the targets in scope of the A2A attack, have been destroyed.
|
--- Set a score when all the targets in scope of the A2G attack, have been destroyed.
|
||||||
-- @param #TASK_A2G_SEAD self
|
-- @param #TASK_A2G_SEAD self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points.
|
-- @param #number Score The score in points.
|
||||||
@@ -48530,7 +48775,7 @@ do -- TASK_A2G_SEAD
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a penalty when the A2A attack has failed.
|
--- Set a penalty when the A2G attack has failed.
|
||||||
-- @param #TASK_A2G_SEAD self
|
-- @param #TASK_A2G_SEAD self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Penalty The penalty in points, must be a negative value!
|
-- @param #number Penalty The penalty in points, must be a negative value!
|
||||||
@@ -48600,6 +48845,15 @@ do -- TASK_A2G_BAI
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function TASK_A2G_BAI:ReportOrder( ReportGroup )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @param #TASK_A2G_BAI self
|
--- @param #TASK_A2G_BAI self
|
||||||
function TASK_A2G_BAI:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2G_BAI:onafterGoal( TaskUnit, From, Event, To )
|
||||||
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
||||||
@@ -48611,7 +48865,7 @@ do -- TASK_A2G_BAI
|
|||||||
self:__Goal( -10 )
|
self:__Goal( -10 )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when a target in scope of the A2A attack, has been destroyed .
|
--- Set a score when a target in scope of the A2G attack, has been destroyed .
|
||||||
-- @param #TASK_A2G_BAI self
|
-- @param #TASK_A2G_BAI self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points to be granted when task process has been achieved.
|
-- @param #number Score The score in points to be granted when task process has been achieved.
|
||||||
@@ -48627,7 +48881,7 @@ do -- TASK_A2G_BAI
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when all the targets in scope of the A2A attack, have been destroyed.
|
--- Set a score when all the targets in scope of the A2G attack, have been destroyed.
|
||||||
-- @param #TASK_A2G_BAI self
|
-- @param #TASK_A2G_BAI self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points.
|
-- @param #number Score The score in points.
|
||||||
@@ -48643,7 +48897,7 @@ do -- TASK_A2G_BAI
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a penalty when the A2A attack has failed.
|
--- Set a penalty when the A2G attack has failed.
|
||||||
-- @param #TASK_A2G_BAI self
|
-- @param #TASK_A2G_BAI self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Penalty The penalty in points, must be a negative value!
|
-- @param #number Penalty The penalty in points, must be a negative value!
|
||||||
@@ -48713,6 +48967,14 @@ do -- TASK_A2G_CAS
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TASK_A2G_CAS:ReportOrder( ReportGroup )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @param #TASK_A2G_CAS self
|
--- @param #TASK_A2G_CAS self
|
||||||
function TASK_A2G_CAS:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2G_CAS:onafterGoal( TaskUnit, From, Event, To )
|
||||||
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
||||||
@@ -48724,7 +48986,7 @@ do -- TASK_A2G_CAS
|
|||||||
self:__Goal( -10 )
|
self:__Goal( -10 )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when a target in scope of the A2A attack, has been destroyed .
|
--- Set a score when a target in scope of the A2G attack, has been destroyed .
|
||||||
-- @param #TASK_A2G_CAS self
|
-- @param #TASK_A2G_CAS self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points to be granted when task process has been achieved.
|
-- @param #number Score The score in points to be granted when task process has been achieved.
|
||||||
@@ -48740,7 +49002,7 @@ do -- TASK_A2G_CAS
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a score when all the targets in scope of the A2A attack, have been destroyed.
|
--- Set a score when all the targets in scope of the A2G attack, have been destroyed.
|
||||||
-- @param #TASK_A2G_CAS self
|
-- @param #TASK_A2G_CAS self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Score The score in points.
|
-- @param #number Score The score in points.
|
||||||
@@ -48756,7 +49018,7 @@ do -- TASK_A2G_CAS
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a penalty when the A2A attack has failed.
|
--- Set a penalty when the A2G attack has failed.
|
||||||
-- @param #TASK_A2G_CAS self
|
-- @param #TASK_A2G_CAS self
|
||||||
-- @param #string PlayerName The name of the player.
|
-- @param #string PlayerName The name of the player.
|
||||||
-- @param #number Penalty The penalty in points, must be a negative value!
|
-- @param #number Penalty The penalty in points, must be a negative value!
|
||||||
@@ -49708,6 +49970,16 @@ do -- TASK_A2A_INTERCEPT
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param #TASK_A2A_INTERCEPT self
|
||||||
|
-- @param Wrapper.Group#GROUP ReportGroup
|
||||||
|
function TASK_A2A_INTERCEPT:ReportOrder( ReportGroup )
|
||||||
|
self:F( { TaskInfo = self.TaskInfo } )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- @param #TASK_A2A_INTERCEPT self
|
--- @param #TASK_A2A_INTERCEPT self
|
||||||
function TASK_A2A_INTERCEPT:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2A_INTERCEPT:onafterGoal( TaskUnit, From, Event, To )
|
||||||
@@ -49831,6 +50103,13 @@ do -- TASK_A2A_SWEEP
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TASK_A2A_SWEEP:ReportOrder( ReportGroup )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
--- @param #TASK_A2A_SWEEP self
|
--- @param #TASK_A2A_SWEEP self
|
||||||
function TASK_A2A_SWEEP:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2A_SWEEP:onafterGoal( TaskUnit, From, Event, To )
|
||||||
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
||||||
@@ -49950,6 +50229,13 @@ do -- TASK_A2A_ENGAGE
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TASK_A2A_ENGAGE:ReportOrder( ReportGroup )
|
||||||
|
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||||
|
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||||
|
|
||||||
|
return Distance
|
||||||
|
end
|
||||||
|
|
||||||
--- @param #TASK_A2A_ENGAGE self
|
--- @param #TASK_A2A_ENGAGE self
|
||||||
function TASK_A2A_ENGAGE:onafterGoal( TaskUnit, From, Event, To )
|
function TASK_A2A_ENGAGE:onafterGoal( TaskUnit, From, Event, To )
|
||||||
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
local TargetSetUnit = self.TargetSetUnit -- Core.Set#SET_UNIT
|
||||||
@@ -50264,8 +50550,10 @@ do -- TASK_CARGO
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if NotInDeployZones then
|
if NotInDeployZones then
|
||||||
|
if not TaskUnit:InAir() then
|
||||||
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Board cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuBoardCargo, self, Cargo ):SetTime(MenuTime)
|
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Board cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuBoardCargo, self, Cargo ):SetTime(MenuTime)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Route to Pickup cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuRouteToPickup, self, Cargo ):SetTime(MenuTime)
|
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Route to Pickup cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuRouteToPickup, self, Cargo ):SetTime(MenuTime)
|
||||||
end
|
end
|
||||||
@@ -50273,9 +50561,9 @@ do -- TASK_CARGO
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Cargo:IsLoaded() then
|
if Cargo:IsLoaded() then
|
||||||
|
if not TaskUnit:InAir() then
|
||||||
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Unboard cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuUnBoardCargo, self, Cargo ):SetTime(MenuTime)
|
MENU_GROUP_COMMAND:New( TaskUnit:GetGroup(), "Unboard cargo " .. Cargo.Name, TaskUnit.Menu, self.MenuUnBoardCargo, self, Cargo ):SetTime(MenuTime)
|
||||||
|
end
|
||||||
-- Deployzones are optional zones that can be selected to request routing information.
|
-- Deployzones are optional zones that can be selected to request routing information.
|
||||||
for DeployZoneName, DeployZone in pairs( Task.DeployZones ) do
|
for DeployZoneName, DeployZone in pairs( Task.DeployZones ) do
|
||||||
if not Cargo:IsInZone( DeployZone ) then
|
if not Cargo:IsInZone( DeployZone ) then
|
||||||
@@ -50355,7 +50643,7 @@ do -- TASK_CARGO
|
|||||||
function Fsm:onafterArriveAtPickup( TaskUnit, Task )
|
function Fsm:onafterArriveAtPickup( TaskUnit, Task )
|
||||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||||
if self.Cargo:IsAlive() then
|
if self.Cargo:IsAlive() then
|
||||||
TaskUnit:Smoke( Task:GetSmokeColor(), 15 )
|
self.Cargo:Smoke( Task:GetSmokeColor(), 15 )
|
||||||
if TaskUnit:IsAir() then
|
if TaskUnit:IsAir() then
|
||||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Land", TaskUnit:GetGroup() )
|
Task:GetMission():GetCommandCenter():MessageToGroup( "Land", TaskUnit:GetGroup() )
|
||||||
self:__Land( -0.1, "Pickup" )
|
self:__Land( -0.1, "Pickup" )
|
||||||
@@ -50605,6 +50893,7 @@ do -- TASK_CARGO
|
|||||||
|
|
||||||
-- TODO:I need to find a more decent solution for this.
|
-- TODO:I need to find a more decent solution for this.
|
||||||
Task:E( { CargoDeployed = Task.CargoDeployed and "true" or "false" } )
|
Task:E( { CargoDeployed = Task.CargoDeployed and "true" or "false" } )
|
||||||
|
Task:E( { CargoIsAlive = self.Cargo:IsAlive() and "true" or "false" } )
|
||||||
if self.Cargo:IsAlive() then
|
if self.Cargo:IsAlive() then
|
||||||
if Task.CargoDeployed then
|
if Task.CargoDeployed then
|
||||||
Task:CargoDeployed( TaskUnit, self.Cargo, self.DeployZone )
|
Task:CargoDeployed( TaskUnit, self.Cargo, self.DeployZone )
|
||||||
@@ -50619,6 +50908,7 @@ do -- TASK_CARGO
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set a limit on the amount of cargo items that can be loaded into the Carriers.
|
--- Set a limit on the amount of cargo items that can be loaded into the Carriers.
|
||||||
-- @param #TASK_CARGO self
|
-- @param #TASK_CARGO self
|
||||||
-- @param CargoLimit Specifies a number of cargo items that can be loaded in the helicopter.
|
-- @param CargoLimit Specifies a number of cargo items that can be loaded in the helicopter.
|
||||||
@@ -50922,7 +51212,7 @@ do -- TASK_CARGO_TRANSPORT
|
|||||||
local CargoType = Cargo:GetType()
|
local CargoType = Cargo:GetType()
|
||||||
local CargoName = Cargo:GetName()
|
local CargoName = Cargo:GetName()
|
||||||
local CargoCoordinate = Cargo:GetCoordinate()
|
local CargoCoordinate = Cargo:GetCoordinate()
|
||||||
CargoReport:Add( string.format( '- "%s" (%s) at %s', CargoName, CargoType, CargoCoordinate:ToString() ) )
|
CargoReport:Add( string.format( '- "%s" (%s) at %s', CargoName, CargoType, CargoCoordinate:ToStringMGRS() ) )
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -50935,6 +51225,12 @@ do -- TASK_CARGO_TRANSPORT
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TASK_CARGO_TRANSPORT:ReportOrder( ReportGroup )
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @param #TASK_CARGO_TRANSPORT self
|
-- @param #TASK_CARGO_TRANSPORT self
|
||||||
-- @return #boolean
|
-- @return #boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user