From 8002febf096563dc9afececa9330127af875f951 Mon Sep 17 00:00:00 2001 From: FlightControl_Master Date: Thu, 26 Oct 2017 11:13:11 +0200 Subject: [PATCH] * Renamed AIRBASE POLICE to ATC GROUND * Fixed issues with landing and departing. --- .../{AirbasePolice.lua => ATC_Ground.lua} | 460 +-- Moose Development/Moose/Wrapper/Airbase.lua | 2 +- Moose Mission Setup/Moose.files | 2 +- Moose Mission Setup/Moose.lua | 4 +- Moose Mission Setup/Moose_.lua | 4 +- docs/Documentation/AI_A2A.html | 1 + docs/Documentation/AirbasePolice.html | 527 +++- docs/Documentation/Base.html | 2519 +++-------------- docs/Documentation/Cargo.html | 1 + docs/Documentation/Designate.html | 2 +- docs/Documentation/Detection.html | 2 - docs/Documentation/Fsm.html | 3 +- docs/Documentation/Positionable.html | 42 +- docs/Documentation/Set.html | 664 +++++ docs/Documentation/Spawn.html | 8 +- docs/Documentation/Task_Cargo.html | 2 +- docs/Documentation/Utils.html | 54 + docs/Documentation/index.html | 4 +- 18 files changed, 1777 insertions(+), 2524 deletions(-) rename Moose Development/Moose/Functional/{AirbasePolice.lua => ATC_Ground.lua} (85%) diff --git a/Moose Development/Moose/Functional/AirbasePolice.lua b/Moose Development/Moose/Functional/ATC_Ground.lua similarity index 85% rename from Moose Development/Moose/Functional/AirbasePolice.lua rename to Moose Development/Moose/Functional/ATC_Ground.lua index 2c8b30069..0205f95d1 100644 --- a/Moose Development/Moose/Functional/AirbasePolice.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -1,4 +1,4 @@ ---- **Functional** -- The AIRBASEPOLICE classes monitor airbase traffic and regulate speed while taxiing. +--- **Functional** -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing. -- -- === -- @@ -7,34 +7,34 @@ -- -- === -- --- @module AirbasePolice +-- @module ATC_Ground ---- @type AIRBASEPOLICE_BASE +--- @type ATC_GROUND -- @field Core.Set#SET_CLIENT SetClient -- @extends Core.Base#BASE ---- Base class for AIRBASEPOLICE implementations. --- @field #AIRBASEPOLICE_BASE -AIRBASEPOLICE_BASE = { - ClassName = "AIRBASEPOLICE_BASE", +--- Base class for ATC_GROUND implementations. +-- @field #ATC_GROUND +ATC_GROUND = { + ClassName = "ATC_GROUND", SetClient = nil, Airbases = nil, AirbaseNames = nil, } ---- @type AIRBASEPOLICE_BASE.AirbaseNames +--- @type ATC_GROUND.AirbaseNames -- @list <#string> ---- Creates a new AIRBASEPOLICE_BASE object. --- @param #AIRBASEPOLICE_BASE self +--- Creates a new ATC_GROUND object. +-- @param #ATC_GROUND self -- @param Airbases A table of Airbase Names. --- @return #AIRBASEPOLICE_BASE self -function AIRBASEPOLICE_BASE:New( Airbases, AirbaseList ) +-- @return #ATC_GROUND self +function ATC_GROUND:New( Airbases, AirbaseList ) -- Inherits from BASE - local self = BASE:Inherit( self, BASE:New() ) -- #AIRBASEPOLICE_BASE + local self = BASE:Inherit( self, BASE:New() ) -- #ATC_GROUND self:E( { self.ClassName, Airbases } ) self.Airbases = Airbases @@ -88,10 +88,10 @@ end --- Smoke the airbases runways. --- @param #AIRBASEPOLICE_BASE self +-- @param #ATC_GROUND self -- @param Utilities.Utils#SMOKECOLOR SmokeColor The color of the smoke around the runways. --- @return #AIRBASEPOLICE_BASE self -function AIRBASEPOLICE_BASE:SmokeRunways( SmokeColor ) +-- @return #ATC_GROUND self +function ATC_GROUND:SmokeRunways( SmokeColor ) for AirbaseID, Airbase in pairs( self.Airbases ) do for PointsRunwayID, PointsRunway in pairs( Airbase.PointsRunways ) do @@ -102,27 +102,27 @@ end --- Set the maximum speed in Kmph until the player gets kicked. --- @param #AIRBASEPOLICE_BASE self +-- @param #ATC_GROUND self -- @param #number KickSpeed Set the maximum speed in Kmph until the player gets kicked. --- @return #AIRBASEPOLICE_BASE self -function AIRBASEPOLICE_BASE:SetKickSpeedKmph( KickSpeed ) +-- @return #ATC_GROUND self +function ATC_GROUND:SetKickSpeedKmph( KickSpeed ) self.KickSpeed = UTILS.KmphToMps( KickSpeed ) end --- Set the maximum speed in Miph until the player gets kicked. --- @param #AIRBASEPOLICE_BASE self +-- @param #ATC_GROUND self -- @param #number KickSpeedMiph Set the maximum speed in Mph until the player gets kicked. --- @return #AIRBASEPOLICE_BASE self -function AIRBASEPOLICE_BASE:SetKickSpeedMiph( KickSpeedMiph ) +-- @return #ATC_GROUND self +function ATC_GROUND:SetKickSpeedMiph( KickSpeedMiph ) self.KickSpeed = UTILS.MiphToMps( KickSpeedMiph ) end ---- @param #AIRBASEPOLICE_BASE self -function AIRBASEPOLICE_BASE:_AirbaseMonitor() +--- @param #ATC_GROUND self +function ATC_GROUND:_AirbaseMonitor() self:E( "In Scheduler") @@ -144,94 +144,96 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor() NotInRunwayZone = ( Client:IsNotInZone( ZoneRunway ) == true ) and NotInRunwayZone or false end + local IsOnGround = Client:InAir() == false + if NotInRunwayZone then - local Taxi = Client:GetState( self, "Taxi" ) - self:E( Taxi ) - if Taxi == false then - Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed .. " km/h.", 20, "ATC" ) - Client:SetState( self, "Taxi", true ) - end - - -- TODO: GetVelocityKMH function usage - local Velocity = VELOCITY_POSITIONABLE:New( Client ) - --MESSAGE:New( "Velocity = " .. Velocity:ToString(), 1 ):ToAll() - local IsAboveRunway = Client:IsAboveRunway() - local IsOnGround = Client:InAir() == false - self:T( IsAboveRunway, IsOnGround ) - + if IsOnGround then - if Velocity:Get() > self.KickSpeed then - MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() - Client:Destroy() - Client:SetState( self, "Speeding", false ) - Client:SetState( self, "Warnings", 0 ) + local Taxi = Client:GetState( self, "Taxi" ) + self:E( Taxi ) + if Taxi == false then + Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed .. " km/h.", 20, "ATC" ) + Client:SetState( self, "Taxi", true ) + end + + -- TODO: GetVelocityKMH function usage + local Velocity = VELOCITY_POSITIONABLE:New( Client ) + --MESSAGE:New( "Velocity = " .. Velocity:ToString(), 1 ):ToAll() + local IsAboveRunway = Client:IsAboveRunway() + self:T( IsAboveRunway, IsOnGround ) + + if IsOnGround then + if Velocity:Get() > self.KickSpeed then + MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() + Client:Destroy() + Client:SetState( self, "Speeding", false ) + Client:SetState( self, "Warnings", 0 ) + end + end + + + if IsOnGround then + + if Velocity:GetKmph() > AirbaseMeta.MaximumSpeed then + local IsSpeeding = Client:GetState( self, "Speeding" ) + + if IsSpeeding == true then + local SpeedingWarnings = Client:GetState( self, "Warnings" ) + self:T( SpeedingWarnings ) + + if SpeedingWarnings <= 3 then + Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " .. + string.format( "%s", Velocity:ToString() ), 5, "ATC" ) + Client:SetState( self, "Warnings", SpeedingWarnings + 1 ) + else + MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() + --- @param Wrapper.Client#CLIENT Client + Client:Destroy() + Client:SetState( self, "Speeding", false ) + Client:SetState( self, "Warnings", 0 ) + end + + else + Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%s", Velocity:ToString() ), 5, "ATC" ) + Client:SetState( self, "Speeding", true ) + Client:SetState( self, "Warnings", 1 ) + end + + else + Client:SetState( self, "Speeding", false ) + Client:SetState( self, "Warnings", 0 ) + end end - end - - if IsOnGround then - - if Velocity:GetKmph() > AirbaseMeta.MaximumSpeed then - local IsSpeeding = Client:GetState( self, "Speeding" ) - - if IsSpeeding == true then - local SpeedingWarnings = Client:GetState( self, "Warnings" ) - self:T( SpeedingWarnings ) - - if SpeedingWarnings <= 3 then - Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " .. - string.format( "%s", Velocity:ToString() ), 5, "ATC" ) - Client:SetState( self, "Warnings", SpeedingWarnings + 1 ) + if IsOnGround and not IsAboveRunway then + + local IsOffRunway = Client:GetState( self, "IsOffRunway" ) + + if IsOffRunway == true then + local OffRunwayWarnings = Client:GetState( self, "OffRunwayWarnings" ) + self:T( OffRunwayWarnings ) + + if OffRunwayWarnings <= 3 then + Client:Message( "Warning " .. OffRunwayWarnings .. "/3! Airbase traffic rule violation! Get back on the taxi immediately!", 5, "ATC" ) + Client:SetState( self, "OffRunwayWarnings", OffRunwayWarnings + 1 ) else MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() --- @param Wrapper.Client#CLIENT Client Client:Destroy() - Client:SetState( self, "Speeding", false ) - Client:SetState( self, "Warnings", 0 ) + Client:SetState( self, "IsOffRunway", false ) + Client:SetState( self, "OffRunwayWarnings", 0 ) end - else - Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%s", Velocity:ToString() ), 5, "ATC" ) - Client:SetState( self, "Speeding", true ) - Client:SetState( self, "Warnings", 1 ) + Client:Message( "Attention! You are off the taxiway. Get back on the taxiway immediately!", 5, "ATC" ) + Client:SetState( self, "IsOffRunway", true ) + Client:SetState( self, "OffRunwayWarnings", 1 ) end - + else - Client:SetState( self, "Speeding", false ) - Client:SetState( self, "Warnings", 0 ) + Client:SetState( self, "IsOffRunway", false ) + Client:SetState( self, "OffRunwayWarnings", 0 ) end end - - if IsOnGround and not IsAboveRunway then - - local IsOffRunway = Client:GetState( self, "IsOffRunway" ) - - if IsOffRunway == true then - local OffRunwayWarnings = Client:GetState( self, "OffRunwayWarnings" ) - self:T( OffRunwayWarnings ) - - if OffRunwayWarnings <= 3 then - Client:Message( "Warning " .. OffRunwayWarnings .. "/3! Airbase traffic rule violation! Get back on the taxi immediately!", 5, "ATC" ) - Client:SetState( self, "OffRunwayWarnings", OffRunwayWarnings + 1 ) - else - MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() - --- @param Wrapper.Client#CLIENT Client - Client:Destroy() - Client:SetState( self, "IsOffRunway", false ) - Client:SetState( self, "OffRunwayWarnings", 0 ) - end - else - Client:Message( "Attention! You are off the taxiway. Get back on the taxiway immediately!", 5, "ATC" ) - Client:SetState( self, "IsOffRunway", true ) - Client:SetState( self, "OffRunwayWarnings", 1 ) - end - - else - Client:SetState( self, "IsOffRunway", false ) - Client:SetState( self, "OffRunwayWarnings", 0 ) - end - - else Client:SetState( self, "Speeding", false ) Client:SetState( self, "Warnings", 0 ) @@ -243,6 +245,8 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor() Client:SetState( self, "Taxi", false ) end end + else + Client:SetState( self, "Taxi", false ) end end ) @@ -253,14 +257,14 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor() end ---- @type AIRBASEPOLICE_CAUCASUS --- @extends #AIRBASEPOLICE_BASE +--- @type ATC_GROUND_CAUCASUS +-- @extends #ATC_GROUND ---- # AIRBASEPOLICE_CAUCASUS, extends @{#AIRBASEPOLICE_BASE} +--- # ATC_GROUND_CAUCASUS, extends @{#ATC_GROUND} -- --- ![Banner Image](..\Presentations\AIRBASEPOLICE\Dia1.JPG) +-- ![Banner Image](..\Presentations\ATC_GROUND\Dia1.JPG) -- --- The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi. +-- The ATC_GROUND_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi. -- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned. -- -- The maximum speed for the airbases at Caucasus is **50 km/h**. @@ -272,44 +276,45 @@ end -- -- # Airbases monitored -- --- The following airbases are monitored at the Caucasus region: +-- The following airbases are monitored at the Caucasus region. +-- Use the AIRBASE.Caucasus enumeration to select the airbases to be monitored. -- --- * Anapa Vityazevo --- * Batumi --- * Beslan --- * Gelendzhik --- * Gudauta --- * Kobuleti --- * Krasnodar Center --- * Krasnodar Pashkovsky --- * Krymsk --- * Kutaisi --- * Maykop Khanskaya --- * Mineralnye Vody --- * Mozdok --- * Nalchik --- * Novorossiysk --- * Senaki Kolkhi --- * Sochi Adler --- * Soganlug --- * Sukhumi Babushara --- * Tbilisi Lochini --- * Vaziani +-- * ´AIRBASE.Caucasus.Anapa_Vityazevo´ +-- * ´AIRBASE.Caucasus.Batumi´ +-- * ´AIRBASE.Caucasus.Beslan´ +-- * ´AIRBASE.Caucasus.Gelendzhik´ +-- * ´AIRBASE.Caucasus.Gudauta´ +-- * ´AIRBASE.Caucasus.Kobuleti´ +-- * ´AIRBASE.Caucasus.Krasnodar_Center´ +-- * ´AIRBASE.Caucasus.Krasnodar_Pashkovsky´ +-- * ´AIRBASE.Caucasus.Krymsk´ +-- * ´AIRBASE.Caucasus.Kutaisi´ +-- * ´AIRBASE.Caucasus.Maykop_Khanskaya´ +-- * ´AIRBASE.Caucasus.Mineralnye_Vody´ +-- * ´AIRBASE.Caucasus.Mozdok´ +-- * ´AIRBASE.Caucasus.Nalchik´ +-- * ´AIRBASE.Caucasus.Novorossiysk´ +-- * ´AIRBASE.Caucasus.Senaki_Kolkhi´ +-- * ´AIRBASE.Caucasus.Sochi_Adler´ +-- * ´AIRBASE.Caucasus.Soganlug´ +-- * ´AIRBASE.Caucasus.Sukhumi_Babushara´ +-- * ´AIRBASE.Caucasus.Tbilisi_Lochini´ +-- * ´AIRBASE.Caucasus.Vaziani´ -- -- -- # Installation -- -- ## In Single Player Missions -- --- AIRBASEPOLICE is fully functional in single player. +-- ATC_GROUND is fully functional in single player. -- -- ## In Multi Player Missions -- --- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. +-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. -- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -- To work around this problem, a much better solution has been made, using the slot blocker script designed -- by Ciribob. With the help of __Ciribob__, this script has been extended to also kick client players while in flight. --- AIRBASEPOLICE is communicating with this modified script to kick players! +-- ATC_GROUND is communicating with this modified script to kick players! -- -- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob. -- @@ -317,18 +322,26 @@ end -- -- # Script it! -- --- ## 1. AIRBASEPOLICE_CAUCASUS Constructor +-- ## 1. ATC_GROUND_CAUCASUS Constructor -- --- Creates a new AIRBASEPOLICE_CAUCASUS object that will monitor pilots taxiing behaviour. +-- Creates a new ATC_GROUND_CAUCASUS object that will monitor pilots taxiing behaviour. -- --- -- This creates a new AIRBASEPOLICE_CAUCASUS object. +-- -- This creates a new ATC_GROUND_CAUCASUS object. -- --- -- Monitor for these clients the airbases. --- AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New() +-- -- Monitor all the airbases. +-- AirbasePoliceCaucasus = ATC_GROUND_CAUCASUS:New() +-- +-- -- Monitor specific airbases only. -- --- @field #AIRBASEPOLICE_CAUCASUS -AIRBASEPOLICE_CAUCASUS = { - ClassName = "AIRBASEPOLICE_CAUCASUS", +-- ATC_Ground = ATC_GROUND_CAUCASUS:New( +-- { AIRBASE.Caucasus.Gelendzhik, +-- AIRBASE.Caucasus.Krymsk +-- } +-- ) +-- +-- @field #ATC_GROUND_CAUCASUS +ATC_GROUND_CAUCASUS = { + ClassName = "ATC_GROUND_CAUCASUS", Airbases = { [AIRBASE.Caucasus.Anapa_Vityazevo] = { PointsRunways = { @@ -615,14 +628,14 @@ AIRBASEPOLICE_CAUCASUS = { }, } ---- Creates a new AIRBASEPOLICE_CAUCASUS object. --- @param #AIRBASEPOLICE_CAUCASUS self +--- Creates a new ATC_GROUND_CAUCASUS object. +-- @param #ATC_GROUND_CAUCASUS self -- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Caucasus enumerator). --- @return #AIRBASEPOLICE_CAUCASUS self -function AIRBASEPOLICE_CAUCASUS:New( AirbaseNames ) +-- @return #ATC_GROUND_CAUCASUS self +function ATC_GROUND_CAUCASUS:New( AirbaseNames ) -- Inherits from BASE - local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) ) + local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) ) @@ -838,15 +851,15 @@ end ---- @type AIRBASEPOLICE_NEVADA --- @extends Functional.AirbasePolice#AIRBASEPOLICE_BASE +--- @type ATC_GROUND_NEVADA +-- @extends Functional.AirbasePolice#ATC_GROUND ---- # AIRBASEPOLICE_NEVADA, extends @{#AIRBASEPOLICE_BASE} +--- # ATC_GROUND_NEVADA, extends @{#ATC_GROUND} -- --- ![Banner Image](..\Presentations\AIRBASEPOLICE\Dia1.JPG) +-- ![Banner Image](..\Presentations\ATC_GROUND\Dia1.JPG) -- --- The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi. +-- The ATC_GROUND_NEVADA class monitors the speed of the airplanes at the airbase during taxi. -- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned. -- -- The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving @@ -856,27 +869,41 @@ end -- -- # Airbases monitored -- --- The following airbases are monitored at the Caucasus region: +-- The following airbases are monitored at the Nevada region. +-- Use the AIRBASE.Nevada enumeration to select the airbases to be monitored. -- --- * Nellis --- * McCarran --- * Creech --- * GroomLake --- +-- * `AIRBASE.Nevada.Beatty_Airport` +-- * `AIRBASE.Nevada.Boulder_City_Airport` +-- * `AIRBASE.Nevada.Creech_AFB` +-- * `AIRBASE.Nevada.Echo_Bay` +-- * `AIRBASE.Nevada.Groom_Lake_AFB` +-- * `AIRBASE.Nevada.Henderson_Executive_Airport` +-- * `AIRBASE.Nevada.Jean_Airport` +-- * `AIRBASE.Nevada.Laughlin_Airport` +-- * `AIRBASE.Nevada.Lincoln_County` +-- * `AIRBASE.Nevada.McCarran_International_Airport` +-- * `AIRBASE.Nevada.Mellan_Airstrip` +-- * `AIRBASE.Nevada.Mesquite` +-- * `AIRBASE.Nevada.Mina_Airport_3Q0` +-- * `AIRBASE.Nevada.Nellis_AFB` +-- * `AIRBASE.Nevada.North_Las_Vegas` +-- * `AIRBASE.Nevada.Pahute_Mesa_Airstrip` +-- * `AIRBASE.Nevada.Tonopah_Airport` +-- * `AIRBASE.Nevada.Tonopah_Test_Range_Airfield` -- -- # Installation -- -- ## In Single Player Missions -- --- AIRBASEPOLICE is fully functional in single player. +-- ATC_GROUND is fully functional in single player. -- -- ## In Multi Player Missions -- --- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. +-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. -- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -- To work around this problem, a much better solution has been made, using the slot blocker script designed -- by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. --- AIRBASEPOLICE is communicating with this modified script to kick players! +-- ATC_GROUND is communicating with this modified script to kick players! -- -- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob. -- @@ -884,18 +911,29 @@ end -- -- # Script it! -- --- ## 1. AIRBASEPOLICE_NEVADA Constructor +-- ## 1. ATC_GROUND_NEVADA Constructor -- --- Creates a new AIRBASEPOLICE_NEVADA object that will monitor pilots taxiing behaviour. +-- Creates a new ATC_GROUND_NEVADA object that will monitor pilots taxiing behaviour. -- --- -- This creates a new AIRBASEPOLICE_NEVADA object. +-- -- This creates a new ATC_GROUND_NEVADA object. -- --- -- Monitor for these clients the airbases. --- AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New() +-- -- Monitor all the airbases. +-- AirbasePoliceCaucasus = ATC_GROUND_NEVADA:New() -- --- @field #AIRBASEPOLICE_NEVADA -AIRBASEPOLICE_NEVADA = { - ClassName = "AIRBASEPOLICE_NEVADA", +-- +-- -- Monitor specific airbases. +-- ATC_Ground = ATC_GROUND_NEVADA:New( +-- { AIRBASE.Nevada.Laughlin_Airport, +-- AIRBASE.Nevada.Mellan_Airstrip, +-- AIRBASE.Nevada.Lincoln_County, +-- AIRBASE.Nevada.North_Las_Vegas, +-- AIRBASE.Nevada.McCarran_International_Airport +-- } +-- ) +-- +-- @field #ATC_GROUND_NEVADA +ATC_GROUND_NEVADA = { + ClassName = "ATC_GROUND_NEVADA", Airbases = { [AIRBASE.Nevada.Beatty_Airport] = { @@ -1165,14 +1203,14 @@ AIRBASEPOLICE_NEVADA = { }, } ---- Creates a new AIRBASEPOLICE_NEVADA object. --- @param #AIRBASEPOLICE_NEVADA self +--- Creates a new ATC_GROUND_NEVADA object. +-- @param #ATC_GROUND_NEVADA self -- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Nevada enumerator). --- @return #AIRBASEPOLICE_NEVADA self -function AIRBASEPOLICE_NEVADA:New( AirbaseNames ) +-- @return #ATC_GROUND_NEVADA self +function ATC_GROUND_NEVADA:New( AirbaseNames ) -- Inherits from BASE - local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) ) + local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) ) @@ -1335,15 +1373,15 @@ function AIRBASEPOLICE_NEVADA:New( AirbaseNames ) end ---- @type AIRBASEPOLICE_NORMANDY --- @extends Functional.AirbasePolice#AIRBASEPOLICE_BASE +--- @type ATC_GROUND_NORMANDY +-- @extends Functional.AirbasePolice#ATC_GROUND ---- # AIRBASEPOLICE_NORMANDY, extends @{#AIRBASEPOLICE_BASE} +--- # ATC_GROUND_NORMANDY, extends @{#ATC_GROUND} -- --- ![Banner Image](..\Presentations\AIRBASEPOLICE\Dia1.JPG) +-- ![Banner Image](..\Presentations\ATC_GROUND\Dia1.JPG) -- --- The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi. +-- The ATC_GROUND_NORMANDY class monitors the speed of the airplanes at the airbase during taxi. -- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned. -- -- The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving @@ -1353,27 +1391,54 @@ end -- -- # Airbases monitored -- --- The following airbases are monitored at the Caucasus region: +-- The following airbases are monitored at the Normandy region. +-- Use the AIRBASE.Normandy enumeration to select the airbases to be monitored. -- --- * Nellis --- * McCarran --- * Creech --- * GroomLake --- +-- * ´AIRBASE.Normandy.Azeville´ +-- * ´AIRBASE.Normandy.Bazenville´ +-- * ´AIRBASE.Normandy.Beny_sur_Mer´ +-- * ´AIRBASE.Normandy.Beuzeville´ +-- * ´AIRBASE.Normandy.Biniville´ +-- * ´AIRBASE.Normandy.Brucheville´ +-- * ´AIRBASE.Normandy.Cardonville´ +-- * ´AIRBASE.Normandy.Carpiquet´ +-- * ´AIRBASE.Normandy.Chailey´ +-- * ´AIRBASE.Normandy.Chippelle´ +-- * ´AIRBASE.Normandy.Cretteville´ +-- * ´AIRBASE.Normandy.Cricqueville_en_Bessin´ +-- * ´AIRBASE.Normandy.Deux_Jumeaux´ +-- * ´AIRBASE.Normandy.Evreux´ +-- * ´AIRBASE.Normandy.Ford´ +-- * ´AIRBASE.Normandy.Funtington´ +-- * ´AIRBASE.Normandy.Lantheuil´ +-- * ´AIRBASE.Normandy.Le_Molay´ +-- * ´AIRBASE.Normandy.Lessay´ +-- * ´AIRBASE.Normandy.Lignerolles´ +-- * ´AIRBASE.Normandy.Longues_sur_Mer´ +-- * ´AIRBASE.Normandy.Maupertus´ +-- * ´AIRBASE.Normandy.Meautis´ +-- * ´AIRBASE.Normandy.Needs_Oar_Point´ +-- * ´AIRBASE.Normandy.Picauville´ +-- * ´AIRBASE.Normandy.Rucqueville´ +-- * ´AIRBASE.Normandy.Saint_Pierre_du_Mont´ +-- * ´AIRBASE.Normandy.Sainte_Croix_sur_Mer´ +-- * ´AIRBASE.Normandy.Sainte_Laurent_sur_Mer´ +-- * ´AIRBASE.Normandy.Sommervieu´ +-- * ´AIRBASE.Normandy.Tangmere´ -- -- # Installation -- -- ## In Single Player Missions -- --- AIRBASEPOLICE is fully functional in single player. +-- ATC_GROUND is fully functional in single player. -- -- ## In Multi Player Missions -- --- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. +-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. -- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -- To work around this problem, a much better solution has been made, using the slot blocker script designed -- by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. --- AIRBASEPOLICE is communicating with this modified script to kick players! +-- ATC_GROUND is communicating with this modified script to kick players! -- -- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob. -- @@ -1381,18 +1446,25 @@ end -- -- # Script it! -- --- ## 1. AIRBASEPOLICE_NORMANDY Constructor +-- ## 1. ATC_GROUND_NORMANDY Constructor -- --- Creates a new AIRBASEPOLICE_NORMANDY object that will monitor pilots taxiing behaviour. +-- Creates a new ATC_GROUND_NORMANDY object that will monitor pilots taxiing behaviour. -- --- -- This creates a new AIRBASEPOLICE_NORMANDY object. +-- -- This creates a new ATC_GROUND_NORMANDY object. -- -- -- Monitor for these clients the airbases. --- AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New() +-- AirbasePoliceCaucasus = ATC_GROUND_NORMANDY:New() +-- +-- ATC_Ground = ATC_GROUND_NORMANDY:New( +-- { AIRBASE.Normandy.Chippelle, +-- AIRBASE.Normandy.Beuzeville +-- } +-- ) +-- -- --- @field #AIRBASEPOLICE_NORMANDY -AIRBASEPOLICE_NORMANDY = { - ClassName = "AIRBASEPOLICE_NORMANDY", +-- @field #ATC_GROUND_NORMANDY +ATC_GROUND_NORMANDY = { + ClassName = "ATC_GROUND_NORMANDY", Airbases = { [AIRBASE.Normandy.Azeville] = { PointsRunways = { @@ -1784,14 +1856,14 @@ AIRBASEPOLICE_NORMANDY = { } ---- Creates a new AIRBASEPOLICE_NORMANDY object. --- @param #AIRBASEPOLICE_NORMANDY self +--- Creates a new ATC_GROUND_NORMANDY object. +-- @param #ATC_GROUND_NORMANDY self -- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Normandy enumerator). --- @return #AIRBASEPOLICE_NORMANDY self -function AIRBASEPOLICE_NORMANDY:New( AirbaseNames ) +-- @return #ATC_GROUND_NORMANDY self +function ATC_GROUND_NORMANDY:New( AirbaseNames ) -- Inherits from BASE - local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) ) + local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) ) -- These lines here are for the demonstration mission. -- They create in the dcs.log the coordinates of the runway polygons, that are then diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index fab9998b3..ae8082b8b 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -149,7 +149,7 @@ function AIRBASE:Register( AirbaseName ) local self = BASE:Inherit( self, POSITIONABLE:New( AirbaseName ) ) self.AirbaseName = AirbaseName - self.AirbaseZone = ZONE_RADIUS:New( AirbaseName, self:GetVec2(), 8000 ) + self.AirbaseZone = ZONE_RADIUS:New( AirbaseName, self:GetVec2(), 2000 ) return self end diff --git a/Moose Mission Setup/Moose.files b/Moose Mission Setup/Moose.files index 4d9f53b43..8f0925e61 100644 --- a/Moose Mission Setup/Moose.files +++ b/Moose Mission Setup/Moose.files @@ -41,7 +41,7 @@ Functional/Movement.lua Functional/Sead.lua Functional/Escort.lua Functional/MissileTrainer.lua -Functional/AirbasePolice.lua +Functional/ATC_Ground.lua Functional/Detection.lua Functional/Designate.lua Functional/RAT.lua diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index e88e8bf87..0c3d72962 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20171023_1007' ) +env.info( 'Moose Generation Timestamp: 20171026_0958' ) local base = _G @@ -61,7 +61,7 @@ __Moose.Include( 'Functional/Movement.lua' ) __Moose.Include( 'Functional/Sead.lua' ) __Moose.Include( 'Functional/Escort.lua' ) __Moose.Include( 'Functional/MissileTrainer.lua' ) -__Moose.Include( 'Functional/AirbasePolice.lua' ) +__Moose.Include( 'Functional/ATC_Ground.lua' ) __Moose.Include( 'Functional/Detection.lua' ) __Moose.Include( 'Functional/Designate.lua' ) __Moose.Include( 'Functional/RAT.lua' ) diff --git a/Moose Mission Setup/Moose_.lua b/Moose Mission Setup/Moose_.lua index 1cdef6beb..0e300d47a 100644 --- a/Moose Mission Setup/Moose_.lua +++ b/Moose Mission Setup/Moose_.lua @@ -1,5 +1,5 @@ env.info('*** MOOSE DYNAMIC INCLUDE START *** ') -env.info('Moose Generation Timestamp: 20171023_1007') +env.info('Moose Generation Timestamp: 20171026_0958') local base=_G __Moose={} __Moose.Include=function(IncludeFile) @@ -56,7 +56,7 @@ __Moose.Include('Functional/Movement.lua') __Moose.Include('Functional/Sead.lua') __Moose.Include('Functional/Escort.lua') __Moose.Include('Functional/MissileTrainer.lua') -__Moose.Include('Functional/AirbasePolice.lua') +__Moose.Include('Functional/ATC_Ground.lua') __Moose.Include('Functional/Detection.lua') __Moose.Include('Functional/Designate.lua') __Moose.Include('Functional/RAT.lua') diff --git a/docs/Documentation/AI_A2A.html b/docs/Documentation/AI_A2A.html index 54b845efc..67ca9d37e 100644 --- a/docs/Documentation/AI_A2A.html +++ b/docs/Documentation/AI_A2A.html @@ -671,6 +671,7 @@
+ #number AI_A2A.IdleCount diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html index c00793f61..b95d334b0 100644 --- a/docs/Documentation/AirbasePolice.html +++ b/docs/Documentation/AirbasePolice.html @@ -115,7 +115,7 @@

Module AirbasePolice

-

Functional -- The AIRBASEPOLICE classes monitor airbase traffic and regulate speed while taxiing.

+

Functional -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing.

@@ -132,27 +132,37 @@ AIRBASEPOLICE_BASE -

Base class for AIRBASEPOLICE implementations.

+

Base class for ATC_GROUND implementations.

- AIRBASEPOLICE_CAUCASUS + ATC_GROUND_CAUCASUS -

AIRBASEPOLICE_CAUCASUS, extends #AIRBASEPOLICE_BASE

+

ATCGROUNDCAUCASUS, extends #AIRBASEPOLICE_BASE

-

Banner Image

+

Banner Image

-

The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

+

The ATCGROUNDCAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

- AIRBASEPOLICE_NEVADA + ATC_GROUND_NEVADA -

AIRBASEPOLICE_NEVADA, extends #AIRBASEPOLICE_BASE

+

ATCGROUNDNEVADA, extends #AIRBASEPOLICE_BASE

-

Banner Image

+

Banner Image

-

The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

+

The ATCGROUNDNEVADA class monitors the speed of the airplanes at the airbase during taxi.

+ + + + ATC_GROUND_NORMANDY + +

ATCGROUNDNORMANDY, extends #AIRBASEPOLICE_BASE

+ +

Banner Image

+ +

The ATCGROUNDNORMANDY class monitors the speed of the airplanes at the airbase during taxi.

@@ -165,7 +175,31 @@

Type AIRBASEPOLICE_BASE

- + + + + + + + + + + + + + + + + + @@ -174,6 +208,18 @@ + + + + + + + + @@ -190,22 +236,32 @@
AIRBASEPOLICE_BASE:New(SetClient, Airbases, AirbaseList)AIRBASEPOLICE_BASE.AirbaseList + +
AIRBASEPOLICE_BASE.AirbaseMonitor + +
AIRBASEPOLICE_BASE.Airbases + +
AIRBASEPOLICE_BASE.KickSpeed + +
AIRBASEPOLICE_BASE:New(Airbases, AirbaseList)

Creates a new AIRBASEPOLICE_BASE object.

AIRBASEPOLICE_BASE.SetClient +
AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed) +

Set the maximum speed in Kmph until the player gets kicked.

+
AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph) +

Set the maximum speed in Miph until the player gets kicked.

-

Type AIRBASEPOLICE_CAUCASUS

+

Type ATC_GROUND_CAUCASUS

- +
AIRBASEPOLICE_CAUCASUS:New(SetClient, AirbaseNames)ATC_GROUND_CAUCASUS:New(AirbaseNames) -

Creates a new AIRBASEPOLICE_CAUCASUS object.

+

Creates a new ATCGROUNDCAUCASUS object.

-

Type AIRBASEPOLICE_NEVADA

+

Type ATC_GROUND_NEVADA

- + + +
AIRBASEPOLICE_NEVADA:New(SetClient, AirbaseNames)ATC_GROUND_NEVADA:New(AirbaseNames) -

Creates a new AIRBASEPOLICE_NEVADA object.

+

Creates a new ATCGROUNDNEVADA object.

+
+ +

Type ATC_GROUND_NORMANDY

+ + + +
ATC_GROUND_NORMANDY:New(AirbaseNames) +

Creates a new ATCGROUNDNORMANDY object.

@@ -221,25 +277,25 @@
-

Base class for AIRBASEPOLICE implementations.

+

Base class for ATC_GROUND implementations.

- #AIRBASEPOLICE_CAUCASUS - -AIRBASEPOLICE_CAUCASUS + #ATC_GROUND_CAUCASUS + +ATC_GROUND_CAUCASUS
-

AIRBASEPOLICE_CAUCASUS, extends #AIRBASEPOLICE_BASE

+

ATCGROUNDCAUCASUS, extends #AIRBASEPOLICE_BASE

-

Banner Image

+

Banner Image

-

The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

+

The ATCGROUNDCAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

@@ -253,30 +309,31 @@ faster than the maximum allowed speed, the pilot will be kicked.

Airbases monitored

-

The following airbases are monitored at the Caucasus region:

+

The following airbases are monitored at the Caucasus region. +Use the AIRBASE.Caucasus enumeration to select the airbases to be monitored.

    -
  • Anapa Vityazevo
  • -
  • Batumi
  • -
  • Beslan
  • -
  • Gelendzhik
  • -
  • Gudauta
  • -
  • Kobuleti
  • -
  • Krasnodar Center
  • -
  • Krasnodar Pashkovsky
  • -
  • Krymsk
  • -
  • Kutaisi
  • -
  • Maykop Khanskaya
  • -
  • Mineralnye Vody
  • -
  • Mozdok
  • -
  • Nalchik
  • -
  • Novorossiysk
  • -
  • Senaki Kolkhi
  • -
  • Sochi Adler
  • -
  • Soganlug
  • -
  • Sukhumi Babushara
  • -
  • Tbilisi Lochini
  • -
  • Vaziani
  • +
  • ´AIRBASE.Caucasus.Anapa_Vityazevo´
  • +
  • ´AIRBASE.Caucasus.Batumi´
  • +
  • ´AIRBASE.Caucasus.Beslan´
  • +
  • ´AIRBASE.Caucasus.Gelendzhik´
  • +
  • ´AIRBASE.Caucasus.Gudauta´
  • +
  • ´AIRBASE.Caucasus.Kobuleti´
  • +
  • ´AIRBASE.Caucasus.Krasnodar_Center´
  • +
  • ´AIRBASE.Caucasus.Krasnodar_Pashkovsky´
  • +
  • ´AIRBASE.Caucasus.Krymsk´
  • +
  • ´AIRBASE.Caucasus.Kutaisi´
  • +
  • ´AIRBASE.Caucasus.Maykop_Khanskaya´
  • +
  • ´AIRBASE.Caucasus.Mineralnye_Vody´
  • +
  • ´AIRBASE.Caucasus.Mozdok´
  • +
  • ´AIRBASE.Caucasus.Nalchik´
  • +
  • ´AIRBASE.Caucasus.Novorossiysk´
  • +
  • ´AIRBASE.Caucasus.Senaki_Kolkhi´
  • +
  • ´AIRBASE.Caucasus.Sochi_Adler´
  • +
  • ´AIRBASE.Caucasus.Soganlug´
  • +
  • ´AIRBASE.Caucasus.Sukhumi_Babushara´
  • +
  • ´AIRBASE.Caucasus.Tbilisi_Lochini´
  • +
  • ´AIRBASE.Caucasus.Vaziani´
@@ -284,15 +341,15 @@ faster than the maximum allowed speed, the pilot will be kicked.

In Single Player Missions

-

AIRBASEPOLICE is fully functional in single player.

+

ATC_GROUND is fully functional in single player.

In Multi Player Missions

-

AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. +

ATCGROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. To work around this problem, a much better solution has been made, using the slot blocker script designed by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. -AIRBASEPOLICE is communicating with this modified script to kick players!

+ATCGROUND is communicating with this modified script to kick players!

Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

@@ -300,37 +357,42 @@ AIRBASEPOLICE is communicating with this modified script to kick players!

Script it!

-

1. AIRBASEPOLICE_CAUCASUS Constructor

+

1. ATCGROUNDCAUCASUS Constructor

-

Creates a new AIRBASEPOLICE_CAUCASUS object that will monitor pilots taxiing behaviour.

+

Creates a new ATCGROUNDCAUCASUS object that will monitor pilots taxiing behaviour.

-
-- This creates a new AIRBASEPOLICE_CAUCASUS object.
+
-- This creates a new ATC_GROUND_CAUCASUS object.
 
--- Create a set of all clients in the mission.
-AllClientsSet = SET_CLIENT:New():FilterStart()
+-- Monitor all the airbases.
+AirbasePoliceCaucasus = ATC_GROUND_CAUCASUS:New()
+
+-- Monitor specific airbases only.
+
+ATC_Ground = ATC_GROUND_CAUCASUS:New(
+  { AIRBASE.Caucasus.Gelendzhik,     
+    AIRBASE.Caucasus.Krymsk          
+  }                                  
+)                                    
 
--- Monitor for these clients the airbases.
-AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New( AllClientsSet )
 
-
- #AIRBASEPOLICE_NEVADA - -AIRBASEPOLICE_NEVADA + #ATC_GROUND_NEVADA + +ATC_GROUND_NEVADA
-

AIRBASEPOLICE_NEVADA, extends #AIRBASEPOLICE_BASE

+

ATCGROUNDNEVADA, extends #AIRBASEPOLICE_BASE

-

Banner Image

+

Banner Image

-

The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

+

The ATCGROUNDNEVADA class monitors the speed of the airplanes at the airbase during taxi.

The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

@@ -342,29 +404,43 @@ faster than the maximum allowed speed, the pilot will be kicked.

Airbases monitored

-

The following airbases are monitored at the Caucasus region:

+

The following airbases are monitored at the Nevada region. +Use the AIRBASE.Nevada enumeration to select the airbases to be monitored.

    -
  • Nellis
  • -
  • McCarran
  • -
  • Creech
  • -
  • GroomLake
  • +
  • AIRBASE.Nevada.Beatty_Airport
  • +
  • AIRBASE.Nevada.Boulder_City_Airport
  • +
  • AIRBASE.Nevada.Creech_AFB
  • +
  • AIRBASE.Nevada.Echo_Bay
  • +
  • AIRBASE.Nevada.Groom_Lake_AFB
  • +
  • AIRBASE.Nevada.Henderson_Executive_Airport
  • +
  • AIRBASE.Nevada.Jean_Airport
  • +
  • AIRBASE.Nevada.Laughlin_Airport
  • +
  • AIRBASE.Nevada.Lincoln_County
  • +
  • AIRBASE.Nevada.McCarran_International_Airport
  • +
  • AIRBASE.Nevada.Mellan_Airstrip
  • +
  • AIRBASE.Nevada.Mesquite
  • +
  • AIRBASE.Nevada.Mina_Airport_3Q0
  • +
  • AIRBASE.Nevada.Nellis_AFB
  • +
  • AIRBASE.Nevada.North_Las_Vegas
  • +
  • AIRBASE.Nevada.Pahute_Mesa_Airstrip
  • +
  • AIRBASE.Nevada.Tonopah_Airport
  • +
  • AIRBASE.Nevada.Tonopah_Test_Range_Airfield
-

Installation

In Single Player Missions

-

AIRBASEPOLICE is fully functional in single player.

+

ATC_GROUND is fully functional in single player.

In Multi Player Missions

-

AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. +

ATCGROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. To work around this problem, a much better solution has been made, using the slot blocker script designed by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. -AIRBASEPOLICE is communicating with this modified script to kick players!

+ATCGROUND is communicating with this modified script to kick players!

Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

@@ -372,20 +448,131 @@ AIRBASEPOLICE is communicating with this modified script to kick players!

Script it!

-

1. AIRBASEPOLICE_NEVADA Constructor

+

1. ATCGROUNDNEVADA Constructor

-

Creates a new AIRBASEPOLICE_NEVADA object that will monitor pilots taxiing behaviour.

+

Creates a new ATCGROUNDNEVADA object that will monitor pilots taxiing behaviour.

-
-- This creates a new AIRBASEPOLICE_NEVADA object.
+
-- This creates a new ATC_GROUND_NEVADA object.
 
--- Create a set of all clients in the mission.
-AllClientsSet = SET_CLIENT:New():FilterStart()
+-- Monitor all the airbases.
+AirbasePoliceCaucasus = ATC_GROUND_NEVADA:New()
+
+
+-- Monitor specific airbases.
+ATC_Ground = ATC_GROUND_NEVADA:New(              
+  { AIRBASE.Nevada.Laughlin_Airport,             
+    AIRBASE.Nevada.Mellan_Airstrip,              
+    AIRBASE.Nevada.Lincoln_County,               
+    AIRBASE.Nevada.North_Las_Vegas,              
+    AIRBASE.Nevada.McCarran_International_Airport
+  }                                              
+)                                                
+
+ + +
+
+
+
+ + #ATC_GROUND_NORMANDY + +ATC_GROUND_NORMANDY + +
+
+ +

ATCGROUNDNORMANDY, extends #AIRBASEPOLICE_BASE

+ +

Banner Image

+ +

The ATCGROUNDNORMANDY class monitors the speed of the airplanes at the airbase during taxi.

+ + +

The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

+ +

The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving +faster than the maximum allowed speed, the pilot will be kicked.

+ +

Different airbases have different maximum speeds, according safety regulations.

+ +

Airbases monitored

+ +

The following airbases are monitored at the Normandy region. +Use the AIRBASE.Normandy enumeration to select the airbases to be monitored.

+ +
    +
  • ´AIRBASE.Normandy.Azeville´
  • +
  • ´AIRBASE.Normandy.Bazenville´
  • +
  • ´AIRBASE.Normandy.BenysurMer´
  • +
  • ´AIRBASE.Normandy.Beuzeville´
  • +
  • ´AIRBASE.Normandy.Biniville´
  • +
  • ´AIRBASE.Normandy.Brucheville´
  • +
  • ´AIRBASE.Normandy.Cardonville´
  • +
  • ´AIRBASE.Normandy.Carpiquet´
  • +
  • ´AIRBASE.Normandy.Chailey´
  • +
  • ´AIRBASE.Normandy.Chippelle´
  • +
  • ´AIRBASE.Normandy.Cretteville´
  • +
  • ´AIRBASE.Normandy.CricquevilleenBessin´
  • +
  • ´AIRBASE.Normandy.Deux_Jumeaux´
  • +
  • ´AIRBASE.Normandy.Evreux´
  • +
  • ´AIRBASE.Normandy.Ford´
  • +
  • ´AIRBASE.Normandy.Funtington´
  • +
  • ´AIRBASE.Normandy.Lantheuil´
  • +
  • ´AIRBASE.Normandy.Le_Molay´
  • +
  • ´AIRBASE.Normandy.Lessay´
  • +
  • ´AIRBASE.Normandy.Lignerolles´
  • +
  • ´AIRBASE.Normandy.LonguessurMer´
  • +
  • ´AIRBASE.Normandy.Maupertus´
  • +
  • ´AIRBASE.Normandy.Meautis´
  • +
  • ´AIRBASE.Normandy.NeedsOarPoint´
  • +
  • ´AIRBASE.Normandy.Picauville´
  • +
  • ´AIRBASE.Normandy.Rucqueville´
  • +
  • ´AIRBASE.Normandy.SaintPierredu_Mont´
  • +
  • ´AIRBASE.Normandy.SainteCroixsur_Mer´
  • +
  • ´AIRBASE.Normandy.SainteLaurentsur_Mer´
  • +
  • ´AIRBASE.Normandy.Sommervieu´
  • +
  • ´AIRBASE.Normandy.Tangmere´
  • +
+ +

Installation

+ +

In Single Player Missions

+ +

ATC_GROUND is fully functional in single player.

+ +

In Multi Player Missions

+ +

ATCGROUND is NOT functional in multi player, for client machines connecting to the server, running the mission. +Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. +To work around this problem, a much better solution has been made, using the slot blocker script designed +by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. +ATCGROUND is communicating with this modified script to kick players!

+ +

Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

+ +

Simple Slot Blocker from Ciribob & FlightControl

+ +

Script it!

+ +

1. ATCGROUNDNORMANDY Constructor

+ +

Creates a new ATCGROUNDNORMANDY object that will monitor pilots taxiing behaviour.

+ +
-- This creates a new ATC_GROUND_NORMANDY object.
 
 -- Monitor for these clients the airbases.
-AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
+AirbasePoliceCaucasus = ATC_GROUND_NORMANDY:New()
+
+ATC_Ground = ATC_GROUND_NORMANDY:New( 
+  { AIRBASE.Normandy.Chippelle,
+    AIRBASE.Normandy.Beuzeville 
+  } 
+)
 
+
@@ -412,8 +599,64 @@ AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
+ + +AIRBASEPOLICE_BASE.AirbaseList + +
+
+ + + +
+
+
+
+ + + +AIRBASEPOLICE_BASE.AirbaseMonitor + +
+
+ + + +
+
+
+
+ + + +AIRBASEPOLICE_BASE.Airbases + +
+
+ + + +
+
+
+
+ + + +AIRBASEPOLICE_BASE.KickSpeed + +
+
+ + + +
+
+
+
+ -AIRBASEPOLICE_BASE:New(SetClient, Airbases, AirbaseList) +AIRBASEPOLICE_BASE:New(Airbases, AirbaseList)
@@ -424,12 +667,6 @@ AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New( AllClientsSet )
  • -

    SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.

    - -
  • -
  • -

    Airbases : A table of Airbase Names.

    @@ -459,6 +696,60 @@ self

    +
+
+
+
+ + +AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed) + +
+
+ +

Set the maximum speed in Kmph until the player gets kicked.

+ +

Parameter

+
    +
  • + +

    #number KickSpeed : +Set the maximum speed in Kmph until the player gets kicked.

    + +
  • +
+

Return value

+ +

#AIRBASEPOLICE_BASE: +self

+ +
+
+
+
+ + +AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph) + +
+
+ +

Set the maximum speed in Miph until the player gets kicked.

+ +

Parameter

+
    +
  • + +

    #number KickSpeedMiph : +Set the maximum speed in Mph until the player gets kicked.

    + +
  • +
+

Return value

+ +

#AIRBASEPOLICE_BASE: +self

+
@@ -504,29 +795,23 @@ self

Type AIRBASEPOLICE_BASE.AirbaseNames

-

Type AIRBASEPOLICE_CAUCASUS

+

Type ATC_GROUND_CAUCASUS

Field(s)

- -AIRBASEPOLICE_CAUCASUS:New(SetClient, AirbaseNames) + +ATC_GROUND_CAUCASUS:New(AirbaseNames)
-

Creates a new AIRBASEPOLICE_CAUCASUS object.

+

Creates a new ATCGROUNDCAUCASUS object.

-

Parameters

+

Parameter

  • -

    SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.

    - -
  • -
  • -

    AirbaseNames : A list {} of airbase names (Use AIRBASE.Caucasus enumerator).

    @@ -534,35 +819,29 @@ A list {} of airbase names (Use AIRBASE.Caucasus enumerator).

Return value

-

#AIRBASEPOLICE_CAUCASUS: +

#ATCGROUNDCAUCASUS: self

-

Type AIRBASEPOLICE_NEVADA

+

Type ATC_GROUND_NEVADA

Field(s)

- -AIRBASEPOLICE_NEVADA:New(SetClient, AirbaseNames) + +ATC_GROUND_NEVADA:New(AirbaseNames)
-

Creates a new AIRBASEPOLICE_NEVADA object.

+

Creates a new ATCGROUNDNEVADA object.

-

Parameters

+

Parameter

  • -

    SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.

    - -
  • -
  • -

    AirbaseNames : A list {} of airbase names (Use AIRBASE.Nevada enumerator).

    @@ -570,7 +849,37 @@ A list {} of airbase names (Use AIRBASE.Nevada enumerator).

Return value

-

#AIRBASEPOLICE_NEVADA: +

#ATCGROUNDNEVADA: +self

+ +
+
+ +

Type ATC_GROUND_NORMANDY

+

Field(s)

+
+
+ + +ATC_GROUND_NORMANDY:New(AirbaseNames) + +
+
+ +

Creates a new ATCGROUNDNORMANDY object.

+ +

Parameter

+
    +
  • + +

    AirbaseNames : +A list {} of airbase names (Use AIRBASE.Normandy enumerator).

    + +
  • +
+

Return value

+ +

#ATCGROUNDNORMANDY: self

diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html index 2a96f397b..2d446b98b 100644 --- a/docs/Documentation/Base.html +++ b/docs/Documentation/Base.html @@ -115,12 +115,9 @@

Module Base

-

Core -- BASE forms the basis of the MOOSE framework.

+

Core -- VELOCITY models a speed, which can be expressed in various formats according the Settings.

-

Each class within the MOOSE framework derives from BASE.

- -

Banner Image


@@ -133,435 +130,126 @@

Global(s)

- + - +
BASEVELOCITY -

1) #BASE class

+

VELOCITY class, extends Base#BASE

-

All classes within the MOOSE framework are derived from the BASE class.

+

VELOCITY models a speed, which can be expressed in various formats according the Settings.

FORMATIONVELOCITY_POSITIONABLE +

VELOCITY_POSITIONABLE class, extends Base#BASE

+

VELOCITY_POSITIONABLE monitors the speed of an Positionable in the simulation, which can be expressed in various formats according the Settings.

-

Type BASE

+

Type VELOCITY

- + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
BASE.ClassIDVELOCITY:Get() -

The ID number of the class.

+

Get the velocity in Mps (meters per second).

BASE.ClassNameVELOCITY:GetKmph() -

The name of the class.

+

Get the velocity in Kmph (kilometers per hour).

BASE.ClassNameAndIDVELOCITY:GetMiph() -

The name of the class concatenated with the ID number of the class.

+

Get the velocity in Miph (miles per hour).

BASE:ClearState(Object, StateName)VELOCITY:GetText(Settings) - +

Get the velocity in text, according the player Settings.

BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)VELOCITY:New(VelocityMps) -

Creation of a Birth Event.

+

VELOCITY Constructor.

BASE:CreateEventCrash(EventTime, Initiator)VELOCITY:Set(VelocityMps) -

Creation of a Crash Event.

+

Set the velocity in Mps (meters per second).

BASE:CreateEventTakeoff(EventTime, Initiator)VELOCITY:SetKmph(VelocityKmph) -

Creation of a Takeoff Event.

+

Set the velocity in Kmph (kilometers per hour).

BASE:E(Arguments)VELOCITY:SetMiph(VelocityMiph) -

Log an exception which will be traced always.

+

Set the velocity in Miph (miles per hour).

BASE:EventDispatcher()VELOCITY:ToString(Controllable, Settings, VelocityGroup) -

Returns the event dispatcher

+

Get the velocity in text, according the player or default Settings.

BASE:EventRemoveAll() -

Remove all subscribed events

-
BASE:F(Arguments) -

Trace a function call.

-
BASE:F2(Arguments) -

Trace a function call level 2.

-
BASE:F3(Arguments) -

Trace a function call level 3.

-
BASE:GetClassID() -

Get the ClassID of the class instance.

-
BASE:GetClassName() -

Get the ClassName of the class instance.

-
BASE:GetClassNameAndID() -

Get the ClassName + ClassID of the class instance.

-
BASE:GetEventPriority() -

Get the Class Event processing Priority.

-
BASE:GetParent(Child, FromClass) -

This is the worker method to retrieve the Parent class.

-
BASE:GetState(Object, Key) -

Get a Value given a Key from the Object.

-
BASE:HandleEvent(Event, EventFunction) -

Subscribe to a DCS Event.

-
BASE:Inherit(Child, Parent) -

This is the worker method to inherit from a parent class.

-
BASE:IsInstanceOf(ClassName) -

This is the worker method to check if an object is an (sub)instance of a class.

-
BASE:IsTrace() -

Enquires if tracing is on (for the class).

-
BASE:New() -

BASE constructor.

-
BASE:OnEvent(EventData) -

Occurs when an object is completely destroyed.

-
BASE:OnEventBaseCaptured(EventData) -

Occurs when a ground unit captures either an airbase or a farp.

-
BASE:OnEventBirth(EventData) -

Occurs when any object is spawned into the mission.

-
BASE:OnEventCrash(EventData) -

Occurs when any aircraft crashes into the ground and is completely destroyed.

-
BASE:OnEventDead(EventData) -

Occurs when an object is dead.

-
BASE:OnEventEjection(EventData) -

Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

-
BASE:OnEventEngineShutdown(EventData) -

Occurs when any aircraft shuts down its engines.

-
BASE:OnEventEngineStartup(EventData) -

Occurs when any aircraft starts its engines.

-
BASE:OnEventHit(EventData) -

Occurs whenever an object is hit by a weapon.

-
BASE:OnEventHumanFailure(EventData) -

Occurs when any system fails on a human controlled aircraft.

-
BASE:OnEventLand(EventData) -

Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

-
BASE:OnEventMissionEnd(EventData) -

Occurs when a mission ends

-
BASE:OnEventMissionStart(EventData) -

Occurs when a mission starts

-
BASE:OnEventPilotDead(EventData) -

Occurs when the pilot of an aircraft is killed.

-
BASE:OnEventPlayerEnterUnit(EventData) -

Occurs when any player assumes direct control of a unit.

-
BASE:OnEventPlayerLeaveUnit(EventData) -

Occurs when any player relieves control of a unit to the AI.

-
BASE:OnEventRefueling(EventData) -

Occurs when an aircraft connects with a tanker and begins taking on fuel.

-
BASE:OnEventRefuelingStop(EventData) -

Occurs when an aircraft is finished taking fuel.

-
BASE:OnEventShootingEnd(EventData) -

Occurs when any unit stops firing its weapon.

-
BASE:OnEventShootingStart(EventData) -

Occurs when any unit begins firing a weapon that has a high rate of fire.

-
BASE:OnEventShot(EventData) -

Occurs whenever any unit in a mission fires a weapon.

-
BASE:OnEventTakeoff(EventData) -

Occurs when an aircraft takes off from an airbase, farp, or ship.

-
BASE:ScheduleOnce(Start, SchedulerFunction, ...) -

Schedule a new time event.

-
BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) -

Schedule a new time event.

-
BASE:ScheduleStop(SchedulerFunction) -

Stops the Schedule.

-
BASE.SchedulerObject - -
BASE:SetEventPriority(EventPriority) -

Set the Class Event processing Priority.

-
BASE:SetState(Object, Key, Value) -

Set a state or property of the Object given a Key and a Value.

-
BASE:T(Arguments) -

Trace a function logic level 1.

-
BASE:T2(Arguments) -

Trace a function logic level 2.

-
BASE:T3(Arguments) -

Trace a function logic level 3.

-
BASE:TraceAll(TraceAll) -

Trace all methods in MOOSE

-
BASE:TraceClass(Class) -

Set tracing for a class

-
BASE:TraceClassMethod(Class, Method) -

Set tracing for a specific method of class

-
BASE:TraceLevel(Level) -

Set trace level

-
BASE:TraceOnOff(TraceOnOff) -

Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

-
BASE:UnHandleEvent(Event) -

UnSubscribe to a DCS event.

-
BASE._ - -
BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

Trace a function call.

-
BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

Trace a function logic.

-
BASE.__ - -
BASE:onEvent(event)VELOCITY.Velocity
-

Type FORMATION

+

Type VELOCITY_POSITIONABLE

- + - + + + + + + + + + + + + + + + + + + + + + @@ -572,1510 +260,287 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
- #BASE - -BASE + #VELOCITY + +VELOCITY
-

1) #BASE class

+

VELOCITY class, extends Base#BASE

-

All classes within the MOOSE framework are derived from the BASE class.

+

VELOCITY models a speed, which can be expressed in various formats according the Settings.

-

-BASE provides facilities for :

+ +

1. VELOCITY constructor

    -
  • The construction and inheritance of MOOSE classes.
  • -
  • The class naming and numbering system.
  • -
  • The class hierarchy search system.
  • -
  • The tracing of information or objects during mission execution for debuggin purposes.
  • -
  • The subscription to DCS events for event handling in MOOSE objects.
  • +
  • VELOCITY.New(): Creates a new VELOCITY object.
-

Note: The BASE class is an abstract class and is not meant to be used directly.

- -

1.1) BASE constructor

- -

Any class derived from BASE, will use the Base#BASE.New constructor embedded in the Base#BASE.Inherit method. -See an example at the Base#BASE.New method how this is done.

- -

1.2) Trace information for debugging

- -

The BASE class contains trace methods to trace progress within a mission execution of a certain object. -These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.

- -

Any type of information can be passed to these tracing methods. See the following examples:

- -
self:E( "Hello" )
-
- -

Result in the word "Hello" in the dcs.log.

- -
local Array = { 1, nil, "h", { "a","b" }, "x" }
-self:E( Array )
-
- -

Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log.

- -
local Object1 = "Object1"
-local Object2 = 3
-local Object3 = { Object 1, Object 2 }
-self:E( { Object1, Object2, Object3 } )
-
- -

Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.

- -
local SpawnObject = SPAWN:New( "Plane" )
-local GroupObject = GROUP:FindByName( "Group" )
-self:E( { Spawn = SpawnObject, Group = GroupObject } )
-
- -

Results with the text [1]={Spawn={....),Group={...}} in the dcs.log.

- -

Below a more detailed explanation of the different method types for tracing.

- -

1.2.1) Tracing methods categories

- -

There are basically 3 types of tracing methods available:

- -
    -
  • BASE.F: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.
  • -
  • BASE.T: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.
  • -
  • BASE.E: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.
  • -
- -

1.2.2) Tracing levels

- -

There are 3 tracing levels within MOOSE.
-These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.

- -

As such, the F and T methods have additional variants to trace level 2 and 3 respectively:

- -
    -
  • BASE.F2: Trace the beginning of a function and its given parameters with tracing level 2.
  • -
  • BASE.F3: Trace the beginning of a function and its given parameters with tracing level 3.
  • -
  • BASE.T2: Trace further logic within a function giving optional variables or parameters with tracing level 2.
  • -
  • BASE.T3: Trace further logic within a function giving optional variables or parameters with tracing level 3.
  • -
- -

1.2.3) Trace activation.

- -

Tracing can be activated in several ways:

- -
    -
  • Switch tracing on or off through the BASE.TraceOnOff() method.
  • -
  • Activate all tracing through the BASE.TraceAll() method.
  • -
  • Activate only the tracing of a certain class (name) through the BASE.TraceClass() method.
  • -
  • Activate only the tracing of a certain method of a certain class through the BASE.TraceClassMethod() method.
  • -
  • Activate only the tracing of a certain level through the BASE.TraceLevel() method.
  • -
- -

1.2.4) Check if tracing is on.

- -

The method BASE.IsTrace() will validate if tracing is activated or not.

- -

1.3 DCS simulator Event Handling

- -

The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

- -

1.3.1 Subscribe / Unsubscribe to DCS Events

- -

At first, the mission designer will need to Subscribe to a specific DCS event for the class. -So, when the DCS event occurs, the class will be notified of that event. -There are two methods which you use to subscribe to or unsubscribe from an event.

- - - -

1.3.2 Event Handling of DCS Events

- -

Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called -when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information -about the event that occurred.

- -

Find below an example of the prototype how to write an event handling function for two units:

- -
 local Tank1 = UNIT:FindByName( "Tank A" )
- local Tank2 = UNIT:FindByName( "Tank B" )
-
- -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
- Tank1:HandleEvent( EVENTS.Dead )
- Tank2:HandleEvent( EVENTS.Dead )
-
- --- This function is an Event Handling function that will be called when Tank1 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank1:OnEventDead( EventData )
-
-   self:SmokeGreen()
- end
-
- --- This function is an Event Handling function that will be called when Tank2 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank2:OnEventDead( EventData )
-
-   self:SmokeBlue()
- end
-
- - - -

See the Event module for more information about event handling.

- -

1.4) Class identification methods

- -

BASE provides methods to get more information of each object:

- -
    -
  • BASE.GetClassID(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.
  • -
  • BASE.GetClassName(): Gets the name of the object, which is the name of the class the object was instantiated from.
  • -
  • BASE.GetClassNameAndID(): Gets the name and ID of the object.
  • -
- -

1.5) All objects derived from BASE can have "States"

- -

A mechanism is in place in MOOSE, that allows to let the objects administer states.
-States are essentially properties of objects, which are identified by a Key and a Value.

- -

The method BASE.SetState() can be used to set a Value with a reference Key to the object.
-To read or retrieve a state Value based on a Key, use the BASE.GetState method.

- -

These two methods provide a very handy way to keep state at long lasting processes. -Values can be stored within the objects, and later retrieved or changed when needed. -There is one other important thing to note, the BASE.SetState() and BASE.GetState methods -receive as the first parameter the object for which the state needs to be set. -Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same -object name to the method.

- -

1.10) Inheritance

- -

The following methods are available to implement inheritance

- -
    -
  • BASE.Inherit: Inherits from a class.
  • -
  • BASE.GetParent: Returns the parent object from the object it is handling, or nil if there is no parent object.
  • -
- -
-
- #FORMATION - -FORMATION + #VELOCITY_POSITIONABLE + +VELOCITY_POSITIONABLE
+

VELOCITY_POSITIONABLE class, extends Base#BASE

+ +

VELOCITY_POSITIONABLE monitors the speed of an Positionable in the simulation, which can be expressed in various formats according the Settings.

+ + + +

1. VELOCITY_POSITIONABLE constructor

+ +

Type Base

-

Type BASE

+

Type VELOCITY

Field(s)

- -BASE.ClassID + +VELOCITY:Get()
-

The ID number of the class.

- -
-
-
-
- - -BASE.ClassName - -
-
- -

The name of the class.

- -
-
-
-
- - -BASE.ClassNameAndID - -
-
- -

The name of the class concatenated with the ID number of the class.

- -
-
-
-
- - -BASE:ClearState(Object, StateName) - -
-
- - - -

Parameters

-
    -
  • - -

    Object :

    - -
  • -
  • - -

    StateName :

    - -
  • -
-
-
-
-
- - -BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) - -
-
- -

Creation of a Birth Event.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Time EventTime : -The time stamp of the event.

    - -
  • -
  • - -

    Dcs.DCSWrapper.Object#Object Initiator : -The initiating object of the event.

    - -
  • -
  • - -

    #string IniUnitName : -The initiating unit name.

    - -
  • -
  • - -

    place :

    - -
  • -
  • - -

    subplace :

    - -
  • -
-
-
-
-
- - -BASE:CreateEventCrash(EventTime, Initiator) - -
-
- -

Creation of a Crash Event.

- -

Parameters

- -
-
-
-
- - -BASE:CreateEventTakeoff(EventTime, Initiator) - -
-
- -

Creation of a Takeoff Event.

- -

Parameters

- -
-
-
-
- - -BASE:E(Arguments) - -
-
- -

Log an exception which will be traced always.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:EventDispatcher() - -
-
- -

Returns the event dispatcher

- -

Return value

- -

Core.Event#EVENT:

- - -
-
-
-
- - -BASE:EventRemoveAll() - -
-
- -

Remove all subscribed events

- -

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:F(Arguments) - -
-
- -

Trace a function call.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:F2(Arguments) - -
-
- -

Trace a function call level 2.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:F3(Arguments) - -
-
- -

Trace a function call level 3.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:GetClassID() - -
-
- -

Get the ClassID of the class instance.

- -

Return value

- -

#string: -The ClassID of the class instance.

- -
-
-
-
- - -BASE:GetClassName() - -
-
- -

Get the ClassName of the class instance.

- -

Return value

- -

#string: -The ClassName of the class instance.

- -
-
-
-
- - -BASE:GetClassNameAndID() - -
-
- -

Get the ClassName + ClassID of the class instance.

- - -

The ClassName + ClassID is formatted as '%s#%09d'.

- -

Return value

- -

#string: -The ClassName + ClassID of the class instance.

- -
-
-
-
- - -BASE:GetEventPriority() - -
-
- -

Get the Class Event processing Priority.

- - -

The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

+

Get the velocity in Mps (meters per second).

Return value

#number: -The Event processing Priority.

+The velocity in meters per second.

- -BASE:GetParent(Child, FromClass) + +VELOCITY:GetKmph()
-

This is the worker method to retrieve the Parent class.

+

Get the velocity in Kmph (kilometers per hour).

- -

Note that the Parent class must be passed to call the parent class method.

- -
self:GetParent(self):ParentMethod()
-
-
-
- -

Parameters

-
    -
  • - -

    #BASE Child : -is the Child class from which the Parent class needs to be retrieved.

    - -
  • -
  • - -

    FromClass :

    - -
  • -
-

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:GetState(Object, Key) - -
-
- -

Get a Value given a Key from the Object.

- - -

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

- -

Parameters

-
    -
  • - -

    Object : -The object that holds the Value set by the Key.

    - -
  • -
  • - -

    Key : -The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

    - -
  • -
-

Return value

- - -

The Value retrieved.

- -
-
-
-
- - -BASE:HandleEvent(Event, EventFunction) - -
-
- -

Subscribe to a DCS Event.

- -

Parameters

-
    -
  • - -

    Core.Event#EVENTS Event :

    - -
  • -
  • - -

    #function EventFunction : -(optional) The function to be called when the event occurs for the unit.

    - -
  • -
-

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:Inherit(Child, Parent) - -
-
- -

This is the worker method to inherit from a parent class.

- -

Parameters

-
    -
  • - -

    Child : -is the Child class that inherits.

    - -
  • -
  • - -

    #BASE Parent : -is the Parent class that the Child inherits from.

    - -
  • -
-

Return value

- -

#BASE: -Child

- -
-
-
-
- - -BASE:IsInstanceOf(ClassName) - -
-
- -

This is the worker method to check if an object is an (sub)instance of a class.

- - - -

Examples:

- -
    -
  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • -
  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • -
  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • -
  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • -
  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

  • -
- - -

Parameter

-
    -
  • - -

    ClassName : -is the name of the class or the class itself to run the check against

    - -
  • -
-

Return value

- -

#boolean:

- - -
-
-
-
- - -BASE:IsTrace() - -
-
- -

Enquires if tracing is on (for the class).

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -BASE:New() - -
-
- -

BASE constructor.

- - - -

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

- -
function EVENT:New()
-  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
-  return self
-end
-  
-
- -

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:OnEvent(EventData) - -
-
- -

Occurs when an object is completely destroyed.

- - -

initiator : The unit that is was destroyed.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventBaseCaptured(EventData) - -
-
- -

Occurs when a ground unit captures either an airbase or a farp.

- - -

initiator : The unit that captured the base -place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventBirth(EventData) - -
-
- -

Occurs when any object is spawned into the mission.

- - -

initiator : The unit that was spawned

- -

Parameter

- -
-
-
-
- - -BASE:OnEventCrash(EventData) - -
-
- -

Occurs when any aircraft crashes into the ground and is completely destroyed.

- - -

initiator : The unit that has crashed

- -

Parameter

- -
-
-
-
- - -BASE:OnEventDead(EventData) - -
-
- -

Occurs when an object is dead.

- - -

initiator : The unit that is dead.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEjection(EventData) - -
-
- -

Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEngineShutdown(EventData) - -
-
- -

Occurs when any aircraft shuts down its engines.

- - -

initiator : The unit that is stopping its engines.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEngineStartup(EventData) - -
-
- -

Occurs when any aircraft starts its engines.

- - -

initiator : The unit that is starting its engines.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventHit(EventData) - -
-
- -

Occurs whenever an object is hit by a weapon.

- - -

initiator : The unit object the fired the weapon -weapon: Weapon object that hit the target -target: The Object that was hit.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventHumanFailure(EventData) - -
-
- -

Occurs when any system fails on a human controlled aircraft.

- - -

initiator : The unit that had the failure

- -

Parameter

- -
-
-
-
- - -BASE:OnEventLand(EventData) - -
-
- -

Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

- - -

Can be an Airbase Object, FARP, or Ships

- -

Parameter

- -
-
-
-
- - -BASE:OnEventMissionEnd(EventData) - -
-
- -

Occurs when a mission ends

- -

Parameter

- -
-
-
-
- - -BASE:OnEventMissionStart(EventData) - -
-
- -

Occurs when a mission starts

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPilotDead(EventData) - -
-
- -

Occurs when the pilot of an aircraft is killed.

- - -

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. -initiator : The unit that the pilot has died in.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPlayerEnterUnit(EventData) - -
-
- -

Occurs when any player assumes direct control of a unit.

- - -

initiator : The unit that is being taken control of.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPlayerLeaveUnit(EventData) - -
-
- -

Occurs when any player relieves control of a unit to the AI.

- - -

initiator : The unit that the player left.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventRefueling(EventData) - -
-
- -

Occurs when an aircraft connects with a tanker and begins taking on fuel.

- - -

initiator : The unit that is receiving fuel.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventRefuelingStop(EventData) - -
-
- -

Occurs when an aircraft is finished taking fuel.

- - -

initiator : The unit that was receiving fuel.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShootingEnd(EventData) - -
-
- -

Occurs when any unit stops firing its weapon.

- - -

Event will always correspond with a shooting start event. -initiator : The unit that was doing the shooing.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShootingStart(EventData) - -
-
- -

Occurs when any unit begins firing a weapon that has a high rate of fire.

- - -

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. -initiator : The unit that is doing the shooing. -target: The unit that is being targeted.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShot(EventData) - -
-
- -

Occurs whenever any unit in a mission fires a weapon.

- - -

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventTakeoff(EventData) - -
-
- -

Occurs when an aircraft takes off from an airbase, farp, or ship.

- - -

initiator : The unit that tookoff -place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

- -

Parameter

- -
-
-
-
- - -BASE:ScheduleOnce(Start, SchedulerFunction, ...) - -
-
- -

Schedule a new time event.

- - -

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

- -

Parameters

-
    -
  • - -

    #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    - -
  • -
  • - -

    #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    - -
  • -
  • - -

    #table ... : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    - -
  • -

Return value

#number: -The ScheduleID of the planned schedule.

+The velocity in kilometers per hour.

- -BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) + +VELOCITY:GetMiph()
-

Schedule a new time event.

+

Get the velocity in Miph (miles per hour).

- -

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

- -

Parameters

-
    -
  • - -

    #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    - -
  • -
  • - -

    #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

    - -
  • -
  • - -

    #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    - -
  • -
  • - -

    #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

    - -
  • -
  • - -

    #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    - -
  • -
  • - -

    #table ... : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    - -
  • -

Return value

#number: -The ScheduleID of the planned schedule.

+The velocity in miles per hour.

- -BASE:ScheduleStop(SchedulerFunction) + +VELOCITY:GetText(Settings)
-

Stops the Schedule.

+

Get the velocity in text, according the player Settings.

Parameter

  • -

    #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    +

    Core.Settings#SETTINGS Settings :

+

Return value

+ +

#string: +The velocity in text.

+ +
+
+
+
+ + +VELOCITY:New(VelocityMps) + +
+
+ +

VELOCITY Constructor.

+ +

Parameter

+
    +
  • + +

    #number VelocityMps : +The velocity in meters per second.

    + +
  • +
+

Return value

+ +

#VELOCITY:

+ + +
+
+
+
+ + +VELOCITY:Set(VelocityMps) + +
+
+ +

Set the velocity in Mps (meters per second).

+ +

Parameter

+
    +
  • + +

    #number VelocityMps : +The velocity in meters per second.

    + +
  • +
+

Return value

+ +

#VELOCITY:

+ + +
+
+
+
+ + +VELOCITY:SetKmph(VelocityKmph) + +
+
+ +

Set the velocity in Kmph (kilometers per hour).

+ +

Parameter

+
    +
  • + +

    #number VelocityKmph : +The velocity in kilometers per hour.

    + +
  • +
+

Return value

+ +

#VELOCITY:

+ + +
+
+
+
+ + +VELOCITY:SetMiph(VelocityMiph) + +
+
+ +

Set the velocity in Miph (miles per hour).

+ +

Parameter

+
    +
  • + +

    #number VelocityMiph : +The velocity in miles per hour.

    + +
  • +
+

Return value

+ +

#VELOCITY:

+ + +
+
+
+
+ + +VELOCITY:ToString(Controllable, Settings, VelocityGroup) + +
+
+ +

Get the velocity in text, according the player or default Settings.

+ +

Parameters

+ +

Return value

+ +

#string: +The velocity in text according the player or default Settings

+
- -BASE.SchedulerObject + +VELOCITY.Velocity
@@ -2084,466 +549,128 @@ The event function to be called when a timer event occurs. The event function ne
+ +

Type VELOCITY_POSITIONABLE

+

Field(s)

- -BASE:SetEventPriority(EventPriority) + +VELOCITY_POSITIONABLE:Get()
-

Set the Class Event processing Priority.

+

Get the velocity in Mps (meters per second).

+

Return value

+ +

#number: +The velocity in meters per second.

+ +
+
+
+
+ + +VELOCITY_POSITIONABLE:GetKmph() + +
+
-

The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

+

Get the velocity in Kmph (kilometers per hour).

+ +

Return value

+ +

#number: +The velocity in kilometers per hour.

+ +
+
+
+
+ + +VELOCITY_POSITIONABLE:GetMiph() + +
+
+ +

Get the velocity in Miph (miles per hour).

+ +

Return value

+ +

#number: +The velocity in miles per hour.

+ +
+
+
+
+ + +VELOCITY_POSITIONABLE:New(Positionable) + +
+
+ +

VELOCITY_POSITIONABLE Constructor.

Parameter

Return value

+

#VELOCITY_POSITIONABLE:

-

self

- -BASE:SetState(Object, Key, Value) + + +VELOCITY_POSITIONABLE.Positionable
-

Set a state or property of the Object given a Key and a Value.

- -

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

- -

Parameters

-
    -
  • - -

    Object : -The object that will hold the Value set by the Key.

    - -
  • -
  • - -

    Key : -The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

    - -
  • -
  • - -

    Value : -The value to is stored in the object.

    - -
  • -
-

Return values

-
    -
  1. - - -

    The Value set.

    - -
  2. -
  3. - -

    #nil: -The Key was not found and thus the Value could not be retrieved.

    - -
  4. -
-
-
-
-
- - -BASE:T(Arguments) - -
-
- -

Trace a function logic level 1.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:T2(Arguments) - -
-
- -

Trace a function logic level 2.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:T3(Arguments) - -
-
- -

Trace a function logic level 3.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:TraceAll(TraceAll) - -
-
- -

Trace all methods in MOOSE

- -

Parameter

-
    -
  • - -

    #boolean TraceAll : -true = trace all methods in MOOSE.

    - -
  • -
-
-
-
-
- - -BASE:TraceClass(Class) - -
-
- -

Set tracing for a class

- -

Parameter

-
    -
  • - -

    #string Class :

    - -
  • -
-
-
-
-
- - -BASE:TraceClassMethod(Class, Method) - -
-
- -

Set tracing for a specific method of class

- -

Parameters

-
    -
  • - -

    #string Class :

    - -
  • -
  • - -

    #string Method :

    - -
  • -
-
-
-
-
- - -BASE:TraceLevel(Level) - -
-
- -

Set trace level

- -

Parameter

-
    -
  • - -

    #number Level :

    - -
  • -
-
-
-
-
- - -BASE:TraceOnOff(TraceOnOff) - -
-
- -

Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

- - -

So tracing must be switched on manually in your mission if you are using Moose statically. -When moose is loading dynamically (for moose class development), tracing is switched on by default.

- -

Parameter

-
    -
  • - -

    #boolean TraceOnOff : -Switch the tracing on or off.

    - -
  • -
-

Usage:

-
-- Switch the tracing On
-BASE:TraceOnOff( true )
-
--- Switch the tracing Off
-BASE:TraceOnOff( false )
- -BASE:UnHandleEvent(Event) + +VELOCITY_POSITIONABLE:ToString()
-

UnSubscribe to a DCS event.

+

Get the velocity in text, according the player or default Settings.

-

Parameter

-

Return value

-

#BASE:

- +

#string: +The velocity in text according the player or default Settings

- #BASE._ - -BASE._ - -
-
- - - -
-
-
-
- - -BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
-
- -

Trace a function call.

- - -

This function is private.

- -

Parameters

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
  • - -

    DebugInfoCurrentParam :

    - -
  • -
  • - -

    DebugInfoFromParam :

    - -
  • -
-
-
-
-
- - -BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
-
- -

Trace a function logic.

- -

Parameters

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
  • - -

    DebugInfoCurrentParam :

    - -
  • -
  • - -

    DebugInfoFromParam :

    - -
  • -
-
-
-
-
- - #BASE.__ - -BASE.__ - -
-
- - - -
-
-
-
- - -BASE:onEvent(event) - -
-
- - - - -

TODO: Complete Dcs.DCSTypes#Event structure.
-- The main event handling function... This function captures all events generated for the class. - @param #BASE self - @param Dcs.DCSTypes#Event event

- -

Parameter

-
    -
  • - -

    event :

    - -
  • -
-
-
- -

Type BASE._

- -

Type BASE.__

- -

Type FORMATION

- -

The Formation Class

- -

Field(s)

-
-
- - -FORMATION.Cone - -
-
- -

A cone formation.

- -
-
-
-
- - #string - -FORMATION.Vee + + +VELOCITY_POSITIONABLE.Velocity
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index 06e19e514..9b0fcf9dd 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -3805,6 +3805,7 @@ The range till cargo will board.

+ #number CARGO_UNIT.RunCount diff --git a/docs/Documentation/Designate.html b/docs/Documentation/Designate.html index 8292e8e22..548df5b75 100644 --- a/docs/Documentation/Designate.html +++ b/docs/Documentation/Designate.html @@ -1106,7 +1106,7 @@ function below will use the range 1-7 just in case

- + #number DESIGNATE.LaseDuration diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index 1f6111db1..535e6d549 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -2469,7 +2469,6 @@ The index of the DetectedItem.

- #number DETECTION_BASE.DetectedItemCount @@ -2483,7 +2482,6 @@ The index of the DetectedItem.

- #number DETECTION_BASE.DetectedItemMax diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index 2dc168b7d..78de04a27 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -1608,7 +1608,7 @@ A string defining the start state.

- + #string FSM._StartState @@ -1907,7 +1907,6 @@ A string defining the start state.

- FSM.current diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html index 3d38d59aa..b0a3587af 100644 --- a/docs/Documentation/Positionable.html +++ b/docs/Documentation/Positionable.html @@ -314,7 +314,7 @@
@@ -327,6 +327,12 @@ + + + + @@ -1208,14 +1214,14 @@ The POSITIONABLE is not existing or alive.

-

Returns the POSITIONABLE velocity vector.

+

Returns the a Velocity object from the positionable.

Return values

  1. -

    Dcs.DCSTypes#Vec3: -The velocity vector

    +

    Core.Velocity#VELOCITY: +Velocity The Velocity object.

  2. @@ -1266,6 +1272,34 @@ The velocity in meters per second.

    + +POSITIONABLE:GetVelocityVec3() + +
    +
    + +

    Returns the POSITIONABLE velocity Vec3 vector.

    + +

    Return values

    +
      +
    1. + +

      Dcs.DCSTypes#Vec3: +The velocity Vec3 vector

      + +
    2. +
    3. + +

      #nil: +The POSITIONABLE is not existing or alive.

      + +
    4. +
    +
    +
    +
    +
    + POSITIONABLE:HasCargo(Cargo) diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html index e7f92fb7a..0b8836cf1 100644 --- a/docs/Documentation/Set.html +++ b/docs/Documentation/Set.html @@ -236,6 +236,22 @@
  3. Countries
  4. Starting with certain prefix strings.
  5. + +
+ + + @@ -951,6 +967,106 @@ mission designer to add a dedicated method

+ +
FORMATION.ConeVELOCITY_POSITIONABLE:Get() -

A cone formation.

+

Get the velocity in Mps (meters per second).

FORMATION.VeeVELOCITY_POSITIONABLE:GetKmph() +

Get the velocity in Kmph (kilometers per hour).

+
VELOCITY_POSITIONABLE:GetMiph() +

Get the velocity in Miph (miles per hour).

+
VELOCITY_POSITIONABLE:New(Positionable) +

VELOCITY_POSITIONABLE Constructor.

+
VELOCITY_POSITIONABLE.Positionable + +
VELOCITY_POSITIONABLE:ToString() +

Get the velocity in text, according the player or default Settings.

+
VELOCITY_POSITIONABLE.Velocity
POSITIONABLE:GetVelocity() -

Returns the POSITIONABLE velocity vector.

+

Returns the a Velocity object from the positionable.

POSITIONABLE:GetVelocityMPS()

Returns the POSITIONABLE velocity in meters per second.

+
POSITIONABLE:GetVelocityVec3() +

Returns the POSITIONABLE velocity Vec3 vector.

SET_PLAYER +

4) SET_PLAYER class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_PLAYER class to build sets of units belonging to alive players:

+ +

4.1) SET_PLAYER constructor

+ +

Create a new SET_PLAYER object with the SET_PLAYER.New method:

+ +
SET_GROUP:_EventOnDeadOrCrash(Event)

Handles the OnDead or OnCrash event for alive groups set.

+
+ +

Type SET_PLAYER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_PLAYER:AddClientsByName(AddClientNames) +

Add CLIENT(s) to SET_PLAYER.

+
SET_PLAYER:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_PLAYER:FilterCategories(Categories) +

Builds a set of clients out of categories joined by players.

+
SET_PLAYER:FilterCoalitions(Coalitions) +

Builds a set of clients of coalitions joined by specific players.

+
SET_PLAYER:FilterCountries(Countries) +

Builds a set of clients of defined countries.

+
SET_PLAYER:FilterPrefixes(Prefixes) +

Builds a set of clients of defined client prefixes.

+
SET_PLAYER:FilterStart() +

Starts the filtering.

+
SET_PLAYER:FilterTypes(Types) +

Builds a set of clients of defined client types joined by players.

+
SET_PLAYER:FindClient(PlayerName) +

Finds a Client based on the Player Name.

+
SET_PLAYER:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_PLAYER:ForEachPlayer(IteratorFunction, ...) +

Iterate the SET_PLAYER and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

+
SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

+
SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

+
SET_PLAYER:IsIncludeObject(MClient) + +
SET_PLAYER:New() +

Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

+
SET_PLAYER:RemoveClientsByName(RemoveClientNames) +

Remove CLIENT(s) from SET_PLAYER.

@@ -1664,6 +1780,69 @@ The following iterator methods are currently available within the SETGROUP:
+ +
+
+
+ + #SET_PLAYER + +SET_PLAYER + +
+
+ +

4) SET_PLAYER class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_PLAYER class to build sets of units belonging to alive players:

+ +

4.1) SET_PLAYER constructor

+ +

Create a new SET_PLAYER object with the SET_PLAYER.New method:

+ + + + +

+

4.3) SET_PLAYER filter criteria

+ +

You can set filter criteria to define the set of clients within the SET_PLAYER. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:

+ + + +

Planned filter criteria within development are (so these are not yet available):

+ + + +

4.4) SET_PLAYER iterators

+ +

Once the filters have been defined and the SETPLAYER has been built, you can iterate the SETPLAYER with the available iterator methods. +The iterator methods will walk the SETPLAYER set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the SETPLAYER:

+ + + +
+
@@ -4828,6 +5007,491 @@ A single name or an array of GROUP names.

+ +
+ +

Type SET_PLAYER

+

Field(s)

+
+
+ + +SET_PLAYER:AddClientsByName(AddClientNames) + +
+
+ +

Add CLIENT(s) to SET_PLAYER.

+ +

Parameter

+
    +
  • + +

    #string AddClientNames : +A single name or an array of CLIENT names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +SET_PLAYER:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CLIENT

    + +
  2. +
  3. + +

    #table: +The CLIENT

    + +
  4. +
+
+
+
+
+ + +SET_PLAYER:FilterCategories(Categories) + +
+
+ +

Builds a set of clients out of categories joined by players.

+ + +

Possible current categories are plane, helicopter, ground, ship.

+ +

Parameter

+
    +
  • + +

    #string Categories : +Can take the following values: "plane", "helicopter", "ground", "ship".

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of clients of coalitions joined by specific players.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FilterCountries(Countries) + +
+
+ +

Builds a set of clients of defined countries.

+ + +

Possible current countries are those known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Countries : +Can take those country strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FilterPrefixes(Prefixes) + +
+
+ +

Builds a set of clients of defined client prefixes.

+ + +

All the clients starting with the given prefixes will be included within the set.

+ +

Parameter

+
    +
  • + +

    #string Prefixes : +The prefix of which the client name starts with.

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FilterTypes(Types) + +
+
+ +

Builds a set of clients of defined client types joined by players.

+ + +

Possible current types are those types known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Types : +Can take those type strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:FindClient(PlayerName) + +
+
+ +

Finds a Client based on the Player Name.

+ +

Parameter

+
    +
  • + +

    #string PlayerName :

    + +
  • +
+

Return value

+ +

Wrapper.Client#CLIENT: +The found Client.

+ +
+
+
+
+ + +SET_PLAYER:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CLIENT

    + +
  2. +
  3. + +

    #table: +The CLIENT

    + +
  4. +
+
+
+
+
+ + +SET_PLAYER:ForEachPlayer(IteratorFunction, ...) + +
+
+ +

Iterate the SET_PLAYER and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:IsIncludeObject(MClient) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_PLAYER: +self

+ +
+
+
+
+ + +SET_PLAYER:New() + +
+
+ +

Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Return value

+ +

#SET_PLAYER:

+ + +

Usage:

+
-- Define a new SET_PLAYER Object. This DBObject will contain a reference to all Clients.
+DBObject = SET_PLAYER:New()
+ +
+
+
+
+ + +SET_PLAYER:RemoveClientsByName(RemoveClientNames) + +
+
+ +

Remove CLIENT(s) from SET_PLAYER.

+ +

Parameter

+ +

Return value

+ + +

self

+
diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 749b3fc74..835bbb850 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -2308,9 +2308,6 @@ The group that was spawned. You can use this group for further actions.

- -

Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.

-
@@ -2885,9 +2882,6 @@ when nothing was spawned.

- -

Overwrite unit names by default with group name.

-
@@ -3285,7 +3279,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
- #boolean + SPAWN.SpawnUnControlled diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html index 00d9af5e6..40b927b18 100644 --- a/docs/Documentation/Task_Cargo.html +++ b/docs/Documentation/Task_Cargo.html @@ -562,7 +562,7 @@ based on the tasking capabilities defined in Task#TA
- Core.Cargo#CARGO + Core.Cargo#CARGO_GROUP FSM_PROCESS.Cargo diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html index c04656808..cf6b13576 100644 --- a/docs/Documentation/Utils.html +++ b/docs/Documentation/Utils.html @@ -317,6 +317,12 @@ which are excellent tools to be reused in an OO environment!.

UTILS.MetersToNM(meters) + + + + UTILS.MiphToMps(miph) + + @@ -329,6 +335,12 @@ which are excellent tools to be reused in an OO environment!.

UTILS.MpsToKnots(mps) + + + + UTILS.MpsToMiph(mps) + + @@ -910,6 +922,27 @@ is the name of the class to evaluate (can be either a string or a Moose class)
+ +UTILS.MiphToMps(miph) + +
+
+ + + +

Parameter

+
    +
  • + +

    miph :

    + +
  • +
+
+
+
+
+ UTILS.MpsToKmph(mps) @@ -939,6 +972,27 @@ is the name of the class to evaluate (can be either a string or a Moose class)Parameter +
    +
  • + +

    mps :

    + +
  • +
+ +
+
+
+ + +UTILS.MpsToMiph(mps) + +
+
+ + +

Parameter

  • diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html index 59b168ce2..45db4212d 100644 --- a/docs/Documentation/index.html +++ b/docs/Documentation/index.html @@ -276,7 +276,7 @@ even when there are hardly any players in the mission.

    AirbasePolice -

    Functional -- The AIRBASEPOLICE classes monitor airbase traffic and regulate speed while taxiing.

    +

    Functional -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing.

    @@ -288,7 +288,7 @@ even when there are hardly any players in the mission.

    Base -

    Core -- BASE forms the basis of the MOOSE framework.

    +

    Core -- VELOCITY models a speed, which can be expressed in various formats according the Settings.