CLEANUP_AIRBASE documentation

This commit is contained in:
FlightControl 2017-07-08 13:00:18 +02:00
parent 388103afea
commit ab33d6b272
14 changed files with 133 additions and 167 deletions

View File

@ -1,4 +1,4 @@
--- **Functional** -- The CLEANUP class keeps an area clean of crashing or colliding airplanes. It also prevents airplanes from firing within this area.
--- **Functional** -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes. It also prevents airplanes from firing within this area.
--
-- ===
--
@ -9,24 +9,24 @@
--
-- @module CleanUp
--- @type CLEANUP.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-)
--- @type CLEANUP_AIRBASE.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-)
-- @field #map<#string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases.
-- @extends Core.Base#BASE
--- @type CLEANUP
-- @extends #CLEANUP.__
--- @type CLEANUP_AIRBASE
-- @extends #CLEANUP_AIRBASE.__
--- # CLEANUP, extends @{Base#BASE}
--- # CLEANUP_AIRBASE, extends @{Base#BASE}
--
-- ![Banner Image](..\Presentations\CLEANUP\Dia1.JPG)
-- ![Banner Image](..\Presentations\CLEANUP_AIRBASE\Dia1.JPG)
--
-- The CLEANUP class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.
-- The CLEANUP_AIRBASE class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.
-- Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase.
-- Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP.
-- Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE.
-- Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits.
-- Any airborne or ground unit that is on the runway below 30 meters (default value) will be automatically removed if it is damaged.
--
-- This is not a full 100% secure implementation. It is still possible that CLEANUP cannot prevent (in-time) to keep the airbase clean.
-- This is not a full 100% secure implementation. It is still possible that CLEANUP_AIRBASE cannot prevent (in-time) to keep the airbase clean.
-- The following situations may happen that will still stop the runway of an airbase:
--
-- * A damaged unit is not removed on time when above the runway, and crashes on the runway.
@ -37,7 +37,7 @@
-- its status will be checked every 0.25 seconds! This is required to ensure that the airbase is kept clean.
-- But as a result, there is more CPU overload.
--
-- So as an advise, I suggest you use the CLEANUP class with care:
-- So as an advise, I suggest you use the CLEANUP_AIRBASE class with care:
--
-- * Only monitor airbases that really need to be monitored!
-- * Try not to monitor airbases that are likely to be invaded by enemy troops.
@ -45,54 +45,54 @@
--
-- By following the above guidelines, you can add airbase cleanup with acceptable CPU overhead.
--
-- ## 1. CLEANUP Constructor
-- ## 1. CLEANUP_AIRBASE Constructor
--
-- Creates the main object which is preventing the airbase to get polluted with debris on the runway, which halts the airbase.
--
-- -- Clean these Zones.
-- CleanUpAirports = CLEANUP:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
-- CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
--
-- -- or
-- CleanUpTbilisi = CLEANUP:New( AIRBASE.Caucasus.Tbilisi )
-- CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )
-- CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
-- CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )
--
-- ## 2. Add or Remove airbases
--
-- The method @{#CLEANUP.AddAirbase}() to add an airbase to the cleanup validation process.
-- The method @{#CLEANUP.RemoveAirbase}() removes an airbase from the cleanup validation process.
-- The method @{#CLEANUP_AIRBASE.AddAirbase}() to add an airbase to the cleanup validation process.
-- The method @{#CLEANUP_AIRBASE.RemoveAirbase}() removes an airbase from the cleanup validation process.
--
-- ## 3. Clean missiles and bombs within the airbase zone.
--
-- When missiles or bombs hit the runway, the airbase operations stop.
-- Use the method @{#CLEANUP.SetCleanMissiles}() to control the cleaning of missiles, which will prevent airbases to stop.
-- Use the method @{#CLEANUP_AIRBASE.SetCleanMissiles}() to control the cleaning of missiles, which will prevent airbases to stop.
-- Note that this method will not allow anymore airbases to be attacked, so there is a trade-off here to do.
--
-- @field #CLEANUP
CLEANUP = {
ClassName = "CLEANUP",
-- @field #CLEANUP_AIRBASE
CLEANUP_AIRBASE = {
ClassName = "CLEANUP_AIRBASE",
TimeInterval = 0.2,
CleanUpList = {},
}
-- @field #CLEANUP.__
CLEANUP.__ = {}
-- @field #CLEANUP_AIRBASE.__
CLEANUP_AIRBASE.__ = {}
--- @field #CLEANUP.__.Airbases
CLEANUP.__.Airbases = {}
--- @field #CLEANUP_AIRBASE.__.Airbases
CLEANUP_AIRBASE.__.Airbases = {}
--- Creates the main object which is handling the cleaning of the debris within the given Zone Names.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param #list<#string> AirbaseNames Is a table of airbase names where the debris should be cleaned. Also a single string can be passed with one airbase name.
-- @return #CLEANUP
-- @return #CLEANUP_AIRBASE
-- @usage
-- -- Clean these Zones.
-- CleanUpAirports = CLEANUP:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
-- CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
-- or
-- CleanUpTbilisi = CLEANUP:New( AIRBASE.Caucasus.Tbilisi )
-- CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )
function CLEANUP:New( AirbaseNames )
-- CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
-- CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )
function CLEANUP_AIRBASE:New( AirbaseNames )
local self = BASE:Inherit( self, BASE:New() ) -- #CLEANUP
local self = BASE:Inherit( self, BASE:New() ) -- #CLEANUP_AIRBASE
self:F( { AirbaseNames } )
if type( AirbaseNames ) == 'table' then
@ -119,10 +119,10 @@ function CLEANUP:New( AirbaseNames )
end
--- Adds an airbase to the airbase validation list.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param #string AirbaseName
-- @return #CLEANUP
function CLEANUP:AddAirbase( AirbaseName )
-- @return #CLEANUP_AIRBASE
function CLEANUP_AIRBASE:AddAirbase( AirbaseName )
self.__.Airbases[AirbaseName] = AIRBASE:FindByName( AirbaseName )
self:F({"Airbase:", AirbaseName, self.__.Airbases[AirbaseName]:GetDesc()})
@ -130,10 +130,10 @@ function CLEANUP:AddAirbase( AirbaseName )
end
--- Removes an airbase from the airbase validation list.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param #string AirbaseName
-- @return #CLEANUP
function CLEANUP:RemoveAirbase( AirbaseName )
-- @return #CLEANUP_AIRBASE
function CLEANUP_AIRBASE:RemoveAirbase( AirbaseName )
self.__.Airbases[AirbaseName] = nil
return self
end
@ -143,12 +143,12 @@ end
-- Note that when this method is used, the airbase operations won't stop if
-- the missile or bomb was cleaned within the airbase zone, which is 8km from the center of the airbase.
-- However, there is a trade-off to make. Attacks on airbases won't be possible anymore if this method is used.
-- Note, one can also use the method @{#CLEANUP.RemoveAirbase}() to remove the airbase from the control process as a whole,
-- Note, one can also use the method @{#CLEANUP_AIRBASE.RemoveAirbase}() to remove the airbase from the control process as a whole,
-- when an enemy unit is near. That is also an option...
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param #string CleanMissiles (Default=true) If true, missiles fired are immediately destroyed. If false missiles are not controlled.
-- @return #CLEANUP
function CLEANUP:SetCleanMissiles( CleanMissiles )
-- @return #CLEANUP_AIRBASE
function CLEANUP_AIRBASE:SetCleanMissiles( CleanMissiles )
if CleanMissiles or true then
self:HandleEvent( EVENTS.Shot, self.__.OnEventShot )
@ -157,7 +157,7 @@ function CLEANUP:SetCleanMissiles( CleanMissiles )
end
end
function CLEANUP.__:IsInAirbase( Vec2 )
function CLEANUP_AIRBASE.__:IsInAirbase( Vec2 )
local InAirbase = false
for AirbaseName, Airbase in pairs( self.__.Airbases ) do
@ -174,9 +174,9 @@ end
--- Destroys a @{Unit} from the simulator, but checks first if it is still existing!
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Wrapper.Unit#UNIT CleanUpUnit The object to be destroyed.
function CLEANUP.__:DestroyUnit( CleanUpUnit )
function CLEANUP_AIRBASE.__:DestroyUnit( CleanUpUnit )
self:F( { CleanUpUnit } )
if CleanUpUnit then
@ -199,9 +199,9 @@ end
--- Destroys a missile from the simulator, but checks first if it is still existing!
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Dcs.DCSTypes#Weapon MissileObject
function CLEANUP.__:DestroyMissile( MissileObject )
function CLEANUP_AIRBASE.__:DestroyMissile( MissileObject )
self:F( { MissileObject } )
if MissileObject and MissileObject:isExist() then
@ -210,9 +210,9 @@ function CLEANUP.__:DestroyMissile( MissileObject )
end
end
--- @param #CLEANUP self
--- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA EventData
function CLEANUP.__:OnEventBirth( EventData )
function CLEANUP_AIRBASE.__:OnEventBirth( EventData )
self:F( { EventData } )
self.CleanUpList[EventData.IniDCSUnitName] = {}
@ -226,9 +226,9 @@ end
--- Detects if a crash event occurs.
-- Crashed units go into a CleanUpList for removal.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA Event
function CLEANUP.__:OnEventCrash( Event )
function CLEANUP_AIRBASE.__:OnEventCrash( Event )
self:F( { Event } )
--TODO: This stuff is not working due to a DCS bug. Burning units cannot be destroyed.
@ -251,22 +251,22 @@ end
--- Detects if a unit shoots a missile.
-- If this occurs within one of the airbases, then the weapon used must be destroyed.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA Event
function CLEANUP.__:OnEventShot( Event )
function CLEANUP_AIRBASE.__:OnEventShot( Event )
self:F( { Event } )
-- Test if the missile was fired within one of the CLEANUP.AirbaseNames.
-- Test if the missile was fired within one of the CLEANUP_AIRBASE.AirbaseNames.
if self:IsInAirbase( Event.IniUnit:GetVec2() ) then
-- Okay, the missile was fired within the CLEANUP.AirbaseNames, destroy the fired weapon.
-- Okay, the missile was fired within the CLEANUP_AIRBASE.AirbaseNames, destroy the fired weapon.
self:DestroyMissile( Event.Weapon )
end
end
--- Detects if the Unit has an S_EVENT_HIT within the given AirbaseNames. If this is the case, destroy the unit.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA Event
function CLEANUP.__:OnEventHit( Event )
function CLEANUP_AIRBASE.__:OnEventHit( Event )
self:F( { Event } )
if Event.IniUnit then
@ -274,7 +274,7 @@ function CLEANUP.__:OnEventHit( Event )
self:T( { "Life: ", Event.IniDCSUnitName, ' = ', Event.IniUnit:GetLife(), "/", Event.IniUnit:GetLife0() } )
if Event.IniUnit:GetLife() < Event.IniUnit:GetLife0() then
self:T( "CleanUp: Destroy: " .. Event.IniDCSUnitName )
CLEANUP.__:DestroyUnit( Event.IniUnit )
CLEANUP_AIRBASE.__:DestroyUnit( Event.IniUnit )
end
end
end
@ -284,17 +284,17 @@ function CLEANUP.__:OnEventHit( Event )
self:T( { "Life: ", Event.TgtDCSUnitName, ' = ', Event.TgtUnit:GetLife(), "/", Event.TgtUnit:GetLife0() } )
if Event.TgtUnit:GetLife() < Event.TgtUnit:GetLife0() then
self:T( "CleanUp: Destroy: " .. Event.TgtDCSUnitName )
CLEANUP.__:DestroyUnit( Event.TgtUnit )
CLEANUP_AIRBASE.__:DestroyUnit( Event.TgtUnit )
end
end
end
end
--- Add the @{DCSWrapper.Unit#Unit} to the CleanUpList for CleanUp.
-- @param #CLEANUP self
-- @param #CLEANUP_AIRBASE self
-- @param Wrapper.Unit#UNIT CleanUpUnit
-- @oaram #string CleanUpUnitName
function CLEANUP.__:AddForCleanUp( CleanUpUnit, CleanUpUnitName )
function CLEANUP_AIRBASE.__:AddForCleanUp( CleanUpUnit, CleanUpUnitName )
self:F( { CleanUpUnit, CleanUpUnitName } )
self.CleanUpList[CleanUpUnitName] = {}
@ -312,10 +312,10 @@ function CLEANUP.__:AddForCleanUp( CleanUpUnit, CleanUpUnitName )
end
--- Detects if the Unit has an S_EVENT_ENGINE_SHUTDOWN or an S_EVENT_HIT within the given AirbaseNames. If this is the case, add the Group to the CLEANUP List.
-- @param #CLEANUP.__ self
--- Detects if the Unit has an S_EVENT_ENGINE_SHUTDOWN or an S_EVENT_HIT within the given AirbaseNames. If this is the case, add the Group to the CLEANUP_AIRBASE List.
-- @param #CLEANUP_AIRBASE.__ self
-- @param Core.Event#EVENTDATA Event
function CLEANUP.__:EventAddForCleanUp( Event )
function CLEANUP_AIRBASE.__:EventAddForCleanUp( Event )
self:F({Event})
@ -340,8 +340,8 @@ end
--- At the defined time interval, CleanUp the Groups within the CleanUpList.
-- @param #CLEANUP self
function CLEANUP.__:CleanUpSchedule()
-- @param #CLEANUP_AIRBASE self
function CLEANUP_AIRBASE.__:CleanUpSchedule()
local CleanUpCount = 0
for CleanUpUnitName, CleanUpListData in pairs( self.CleanUpList ) do

View File

@ -926,9 +926,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
<p> This table contains the targets detected during patrol.</p>
</dd>
</dl>
<dl class="function">

View File

@ -570,7 +570,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CARGO_GROUP).OnEventCargoDead">CARGO_GROUP.OnEventCargoDead(Cargo, EventData, self)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CARGO_GROUP).OnEventCargoDead">CARGO_GROUP:OnEventCargoDead(EventData)</a></td>
<td class="summary">
</td>
@ -2298,29 +2298,19 @@ The amount of seconds to delay the action.</p>
<dt>
<a id="#(CARGO_GROUP).OnEventCargoDead" >
<strong>CARGO_GROUP.OnEventCargoDead(Cargo, EventData, self)</strong>
<strong>CARGO_GROUP:OnEventCargoDead(EventData)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(CARGO)">#CARGO</a> Cargo </em></code>: </p>
</li>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
</ul>
</dd>

View File

@ -105,7 +105,7 @@
<div id="content">
<h1>Module <code>CleanUp</code></h1>
<p><strong>Functional</strong> -- The CLEANUP class keeps an area clean of crashing or colliding airplanes.</p>
<p><strong>Functional</strong> -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes.</p>
<p>It also prevents airplanes from firing within this area.</p>
@ -121,54 +121,54 @@
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#CLEANUP">CLEANUP</a></td>
<td class="name" nowrap="nowrap"><a href="#CLEANUP_AIRBASE">CLEANUP_AIRBASE</a></td>
<td class="summary">
<h1>CLEANUP, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<h1>CLEANUP_AIRBASE, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p><img src="..\Presentations\CLEANUP\Dia1.JPG" alt="Banner Image"/></p>
<p><img src="..\Presentations\CLEANUP_AIRBASE\Dia1.JPG" alt="Banner Image"/></p>
<p>The CLEANUP class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.</p>
<p>The CLEANUP_AIRBASE class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.</p>
</td>
</tr>
</table>
<h2><a id="#(CLEANUP)">Type <code>CLEANUP</code></a></h2>
<h2><a id="#(CLEANUP_AIRBASE)">Type <code>CLEANUP_AIRBASE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP).AddAirbase">CLEANUP:AddAirbase(AirbaseName)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE).AddAirbase">CLEANUP_AIRBASE:AddAirbase(AirbaseName)</a></td>
<td class="summary">
<p>Adds an airbase to the airbase validation list.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP).New">CLEANUP:New(<, AirbaseNames)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE).New">CLEANUP_AIRBASE:New(<, AirbaseNames)</a></td>
<td class="summary">
<p>Creates the main object which is handling the cleaning of the debris within the given Zone Names.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP).RemoveAirbase">CLEANUP:RemoveAirbase(AirbaseName)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE).RemoveAirbase">CLEANUP_AIRBASE:RemoveAirbase(AirbaseName)</a></td>
<td class="summary">
<p>Removes an airbase from the airbase validation list.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP).SetCleanMissiles">CLEANUP:SetCleanMissiles(CleanMissiles)</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE).SetCleanMissiles">CLEANUP_AIRBASE:SetCleanMissiles(CleanMissiles)</a></td>
<td class="summary">
<p>Enables or disables the cleaning of missiles within the airbase zones.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP).__">CLEANUP.__</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE).__">CLEANUP_AIRBASE.__</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(CLEANUP.__)">Type <code>CLEANUP.__</code></a></h2>
<h2><a id="#(CLEANUP_AIRBASE.__)">Type <code>CLEANUP_AIRBASE.__</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP.__).<">CLEANUP.__.<</a></td>
<td class="name" nowrap="nowrap"><a href="##(CLEANUP_AIRBASE.__).<">CLEANUP_AIRBASE.__.<</a></td>
<td class="summary">
<p>string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases.</p>
</td>
@ -179,26 +179,26 @@
<dl class="function">
<dt>
<em><a href="##(CLEANUP)">#CLEANUP</a></em>
<a id="CLEANUP" >
<strong>CLEANUP</strong>
<em><a href="##(CLEANUP_AIRBASE)">#CLEANUP_AIRBASE</a></em>
<a id="CLEANUP_AIRBASE" >
<strong>CLEANUP_AIRBASE</strong>
</a>
</dt>
<dd>
<h1>CLEANUP, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<h1>CLEANUP_AIRBASE, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p><img src="..\Presentations\CLEANUP\Dia1.JPG" alt="Banner Image"/></p>
<p><img src="..\Presentations\CLEANUP_AIRBASE\Dia1.JPG" alt="Banner Image"/></p>
<p>The CLEANUP class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.</p>
<p>The CLEANUP_AIRBASE class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.</p>
<p>Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase.
Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP.
Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE.
Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits.
Any airborne or ground unit that is on the runway below 30 meters (default value) will be automatically removed if it is damaged.</p>
<p>This is not a full 100% secure implementation. It is still possible that CLEANUP cannot prevent (in-time) to keep the airbase clean.
<p>This is not a full 100% secure implementation. It is still possible that CLEANUP_AIRBASE cannot prevent (in-time) to keep the airbase clean.
The following situations may happen that will still stop the runway of an airbase:</p>
<ul>
@ -211,7 +211,7 @@ The following situations may happen that will still stop the runway of an airbas
its status will be checked every 0.25 seconds! This is required to ensure that the airbase is kept clean.
But as a result, there is more CPU overload.</p>
<p>So as an advise, I suggest you use the CLEANUP class with care:</p>
<p>So as an advise, I suggest you use the CLEANUP_AIRBASE class with care:</p>
<ul>
<li>Only monitor airbases that really need to be monitored!</li>
@ -221,27 +221,27 @@ But as a result, there is more CPU overload.</p>
<p>By following the above guidelines, you can add airbase cleanup with acceptable CPU overhead.</p>
<h2>1. CLEANUP Constructor</h2>
<h2>1. CLEANUP_AIRBASE Constructor</h2>
<p>Creates the main object which is preventing the airbase to get polluted with debris on the runway, which halts the airbase.</p>
<pre><code> -- Clean these Zones.
CleanUpAirports = CLEANUP:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
-- or
CleanUpTbilisi = CLEANUP:New( AIRBASE.Caucasus.Tbilisi )
CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )
CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )
</code></pre>
<h2>2. Add or Remove airbases</h2>
<p>The method <a href="##(CLEANUP).AddAirbase">CLEANUP.AddAirbase</a>() to add an airbase to the cleanup validation process.
The method <a href="##(CLEANUP).RemoveAirbase">CLEANUP.RemoveAirbase</a>() removes an airbase from the cleanup validation process.</p>
<p>The method <a href="##(CLEANUP_AIRBASE).AddAirbase">CLEANUP_AIRBASE.AddAirbase</a>() to add an airbase to the cleanup validation process.
The method <a href="##(CLEANUP_AIRBASE).RemoveAirbase">CLEANUP_AIRBASE.RemoveAirbase</a>() removes an airbase from the cleanup validation process.</p>
<h2>3. Clean missiles and bombs within the airbase zone.</h2>
<p>When missiles or bombs hit the runway, the airbase operations stop.
Use the method <a href="##(CLEANUP).SetCleanMissiles">CLEANUP.SetCleanMissiles</a>() to control the cleaning of missiles, which will prevent airbases to stop.
Use the method <a href="##(CLEANUP_AIRBASE).SetCleanMissiles">CLEANUP_AIRBASE.SetCleanMissiles</a>() to control the cleaning of missiles, which will prevent airbases to stop.
Note that this method will not allow anymore airbases to be attacked, so there is a trade-off here to do.</p>
@ -249,13 +249,13 @@ Note that this method will not allow anymore airbases to be attacked, so there i
</dl>
<h2><a id="#(CleanUp)" >Type <code>CleanUp</code></a></h2>
<h2><a id="#(CLEANUP)" >Type <code>CLEANUP</code></a></h2>
<h2><a id="#(CLEANUP_AIRBASE)" >Type <code>CLEANUP_AIRBASE</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(CLEANUP).AddAirbase" >
<strong>CLEANUP:AddAirbase(AirbaseName)</strong>
<a id="#(CLEANUP_AIRBASE).AddAirbase" >
<strong>CLEANUP_AIRBASE:AddAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
@ -272,7 +272,7 @@ Note that this method will not allow anymore airbases to be attacked, so there i
</ul>
<h3>Return value</h3>
<p><em><a href="##(CLEANUP)">#CLEANUP</a>:</em></p>
<p><em><a href="##(CLEANUP_AIRBASE)">#CLEANUP_AIRBASE</a>:</em></p>
</dd>
@ -280,8 +280,8 @@ Note that this method will not allow anymore airbases to be attacked, so there i
<dl class="function">
<dt>
<a id="#(CLEANUP).New" >
<strong>CLEANUP:New(<, AirbaseNames)</strong>
<a id="#(CLEANUP_AIRBASE).New" >
<strong>CLEANUP_AIRBASE:New(<, AirbaseNames)</strong>
</a>
</dt>
<dd>
@ -304,23 +304,23 @@ string> AirbaseNames Is a table of airbase names where the debris should be clea
</ul>
<h3>Return value</h3>
<p><em><a href="##(CLEANUP)">#CLEANUP</a>:</em></p>
<p><em><a href="##(CLEANUP_AIRBASE)">#CLEANUP_AIRBASE</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code> -- Clean these Zones.
CleanUpAirports = CLEANUP:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
or
CleanUpTbilisi = CLEANUP:New( AIRBASE.Caucasus.Tbilisi )
CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )</code></pre>
CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(CLEANUP).RemoveAirbase" >
<strong>CLEANUP:RemoveAirbase(AirbaseName)</strong>
<a id="#(CLEANUP_AIRBASE).RemoveAirbase" >
<strong>CLEANUP_AIRBASE:RemoveAirbase(AirbaseName)</strong>
</a>
</dt>
<dd>
@ -337,7 +337,7 @@ CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )</code></pre>
</ul>
<h3>Return value</h3>
<p><em><a href="##(CLEANUP)">#CLEANUP</a>:</em></p>
<p><em><a href="##(CLEANUP_AIRBASE)">#CLEANUP_AIRBASE</a>:</em></p>
</dd>
@ -345,8 +345,8 @@ CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )</code></pre>
<dl class="function">
<dt>
<a id="#(CLEANUP).SetCleanMissiles" >
<strong>CLEANUP:SetCleanMissiles(CleanMissiles)</strong>
<a id="#(CLEANUP_AIRBASE).SetCleanMissiles" >
<strong>CLEANUP_AIRBASE:SetCleanMissiles(CleanMissiles)</strong>
</a>
</dt>
<dd>
@ -358,7 +358,7 @@ CleanUpKutaisi = CLEANUP:New( AIRBASE.Caucasus.Kutaisi )</code></pre>
Note that when this method is used, the airbase operations won't stop if
the missile or bomb was cleaned within the airbase zone, which is 8km from the center of the airbase.
However, there is a trade-off to make. Attacks on airbases won't be possible anymore if this method is used.
Note, one can also use the method <a href="##(CLEANUP).RemoveAirbase">CLEANUP.RemoveAirbase</a>() to remove the airbase from the control process as a whole,
Note, one can also use the method <a href="##(CLEANUP_AIRBASE).RemoveAirbase">CLEANUP_AIRBASE.RemoveAirbase</a>() to remove the airbase from the control process as a whole,
when an enemy unit is near. That is also an option...</p>
<h3>Parameter</h3>
@ -372,7 +372,7 @@ when an enemy unit is near. That is also an option...</p>
</ul>
<h3>Return value</h3>
<p><em><a href="##(CLEANUP)">#CLEANUP</a>:</em></p>
<p><em><a href="##(CLEANUP_AIRBASE)">#CLEANUP_AIRBASE</a>:</em></p>
</dd>
@ -381,8 +381,8 @@ when an enemy unit is near. That is also an option...</p>
<dt>
<em></em>
<a id="#(CLEANUP).__" >
<strong>CLEANUP.__</strong>
<a id="#(CLEANUP_AIRBASE).__" >
<strong>CLEANUP_AIRBASE.__</strong>
</a>
</dt>
<dd>
@ -390,19 +390,19 @@ when an enemy unit is near. That is also an option...</p>
<p> @field #CLEANUP.__</p>
<p> @field #CLEANUP<em>AIRBASE.</em>_</p>
</dd>
</dl>
<h2><a id="#(CLEANUP.__)" >Type <code>CLEANUP.__</code></a></h2>
<h2><a id="#(CLEANUP_AIRBASE.__)" >Type <code>CLEANUP_AIRBASE.__</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em><a href="##(map)">#map</a></em>
<a id="#(CLEANUP.__).<" >
<strong>CLEANUP.__.<</strong>
<a id="#(CLEANUP_AIRBASE.__).<" >
<strong>CLEANUP_AIRBASE.__.<</strong>
</a>
</dt>
<dd>
@ -412,7 +412,7 @@ when an enemy unit is near. That is also an option...</p>
</dd>
</dl>
<h2><a id="#(CLEANUP.__.Airbases)" >Type <code>CLEANUP.__.Airbases</code></a></h2>
<h2><a id="#(CLEANUP_AIRBASE.__.Airbases)" >Type <code>CLEANUP_AIRBASE.__.Airbases</code></a></h2>
<h2><a id="#(list)" >Type <code>list</code></a></h2>

View File

@ -900,7 +900,6 @@ function below will use the range 1-7 just in case</p>
<dl class="function">
<dt>
<em></em>
<a id="#(DESIGNATE).LaserCodes" >
<strong>DESIGNATE.LaserCodes</strong>
</a>

View File

@ -2406,7 +2406,6 @@ The index of the DetectedItem.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(DETECTION_BASE).DetectedItemMax" >
<strong>DETECTION_BASE.DetectedItemMax</strong>
</a>

View File

@ -2823,6 +2823,7 @@ The y coordinate.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(POINT_VEC2).z" >
<strong>POINT_VEC2.z</strong>
</a>

View File

@ -1838,7 +1838,6 @@ self</p>
<dl class="function">
<dt>
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
<a id="#(POSITIONABLE).Spot" >
<strong>POSITIONABLE.Spot</strong>
</a>

View File

@ -822,12 +822,6 @@ and any spaces before and after the resulting name are removed.</p>
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
<td class="summary">
</td>
</tr>
</table>
@ -2200,6 +2194,9 @@ The group that was spawned. You can use this group for further actions.</p>
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
</dd>
</dl>
<dl class="function">
@ -2732,6 +2729,9 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd>
</dl>
<dl class="function">
@ -3126,7 +3126,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>
@ -3150,7 +3150,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
</dd>
</dl>
@ -3730,20 +3730,6 @@ True = Continue Scheduler</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(SPAWN).uncontrolled" >
<strong>SPAWN.uncontrolled</strong>
</a>
</dt>
<dd>
</dd>
</dl>

View File

@ -436,7 +436,6 @@ ptional) The name of the new static.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(SPAWNSTATIC).SpawnIndex" >
<strong>SPAWNSTATIC.SpawnIndex</strong>
</a>

View File

@ -765,7 +765,6 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).ScheduleID" >
<strong>SPOT.ScheduleID</strong>
</a>
@ -779,7 +778,6 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotIR" >
<strong>SPOT.SpotIR</strong>
</a>
@ -793,7 +791,6 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotLaser" >
<strong>SPOT.SpotLaser</strong>
</a>
@ -807,7 +804,6 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).Target" >
<strong>SPOT.Target</strong>
</a>

View File

@ -630,7 +630,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(TASK_CARGO).CargoLimit" >
<strong>TASK_CARGO.CargoLimit</strong>
</a>

View File

@ -290,7 +290,7 @@ even when there are hardly any players in the mission.</strong></p>
<tr>
<td class="name" nowrap="nowrap"><a href="CleanUp.html">CleanUp</a></td>
<td class="summary">
<p><strong>Functional</strong> -- The CLEANUP class keeps an area clean of crashing or colliding airplanes.</p>
<p><strong>Functional</strong> -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes.</p>
</td>
</tr>
<tr>

View File

@ -114,7 +114,7 @@ MOOSE Functional Classes provide various functions that are useful in mission de
* [AIRBASEPOLICE](Documentation/AirbasePolice.html): Control the speed of players at the airbases. Speeding players are eliminated (does not work due to a bug in the DCS).
* [CLEANUP](Documentation/CleanUp.html): Keeps the airbases clean from clutter. (Only partly functional due to a bug in DCS, destroyed objects cannot be removed).
* [CLEANUP_AIRBASE](Documentation/CleanUp.html): Keeps the airbases clean from clutter. (Only partly functional due to a bug in DCS, destroyed objects cannot be removed).
## 2.4. MOOSE Wrapper Classes