mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Compare commits
42 Commits
v0.1.0-alp
...
v0.2.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecaa98a46c | ||
|
|
94960b4cb3 | ||
|
|
6ed7796b6d | ||
|
|
4e43fc3c01 | ||
|
|
9923159df8 | ||
|
|
c232c2722a | ||
|
|
3b6969050f | ||
|
|
0ed25f690e | ||
|
|
dcdf619a52 | ||
|
|
291c4e5ba9 | ||
|
|
3159561a02 | ||
|
|
cb56710b4d | ||
|
|
4702662c95 | ||
|
|
6a28902305 | ||
|
|
557a46173b | ||
|
|
0990e34fef | ||
|
|
88e0b17741 | ||
|
|
10177331b4 | ||
|
|
fe6d94466d | ||
|
|
979ce38422 | ||
|
|
218e435581 | ||
|
|
79e4e7cde8 | ||
|
|
49fc0bde16 | ||
|
|
391408de9b | ||
|
|
243009704d | ||
|
|
f536658639 | ||
|
|
56fca825f0 | ||
|
|
847813c741 | ||
|
|
60005abfbd | ||
|
|
2538308e4e | ||
|
|
92bf378a1c | ||
|
|
6fba093b77 | ||
|
|
7893302d89 | ||
|
|
598cfefba4 | ||
|
|
1acf66f74d | ||
|
|
994dc44f00 | ||
|
|
620844b7e0 | ||
|
|
ab4f4e75d1 | ||
|
|
01c85670ec | ||
|
|
66c7ebf786 | ||
|
|
ba44e39344 | ||
|
|
a8f51751f1 |
@@ -4,14 +4,25 @@
|
||||
--- @type CoalitionObject
|
||||
-- @extends DCSObject#Object
|
||||
|
||||
--- @type coalition
|
||||
-- @field #coalition.side side
|
||||
|
||||
--- @type coalition.side
|
||||
-- @field NEUTRAL
|
||||
-- @field RED
|
||||
-- @field BLUE
|
||||
|
||||
coalition = {} --#coalition
|
||||
|
||||
--- Returns coalition of the object.
|
||||
-- @function [parent=#CoalitionObject] getCoalition
|
||||
-- @param self
|
||||
-- @return #coalition.side
|
||||
-- @param #CoalitionObject self
|
||||
-- @return DCSTypes#coalition.side
|
||||
|
||||
--- Returns object country.
|
||||
-- @function [parent=#CoalitionObject] getCountry
|
||||
-- @param self
|
||||
-- @param #CoalitionObject self
|
||||
-- @return #country.id
|
||||
|
||||
|
||||
CoalitionObject = {} --#CoalitionObject
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
-- @module DCSTypes
|
||||
|
||||
|
||||
|
||||
--- Time is given in seconds.
|
||||
-- @type Time
|
||||
-- @extends #number
|
||||
|
||||
35
Dcs/DCSworld.lua
Normal file
35
Dcs/DCSworld.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- @module DCSWorld
|
||||
|
||||
--- @type world
|
||||
-- @field #world.event event
|
||||
|
||||
|
||||
--- @type world.event
|
||||
-- @field S_EVENT_INVALID
|
||||
-- @field S_EVENT_SHOT
|
||||
-- @field S_EVENT_HIT
|
||||
-- @field S_EVENT_TAKEOFF
|
||||
-- @field S_EVENT_LAND
|
||||
-- @field S_EVENT_CRASH
|
||||
-- @field S_EVENT_EJECTION
|
||||
-- @field S_EVENT_REFUELING
|
||||
-- @field S_EVENT_DEAD
|
||||
-- @field S_EVENT_PILOT_DEAD
|
||||
-- @field S_EVENT_BASE_CAPTURED
|
||||
-- @field S_EVENT_MISSION_START
|
||||
-- @field S_EVENT_MISSION_END
|
||||
-- @field S_EVENT_TOOK_CONTROL
|
||||
-- @field S_EVENT_REFUELING_STOP
|
||||
-- @field S_EVENT_BIRTH
|
||||
-- @field S_EVENT_HUMAN_FAILURE
|
||||
-- @field S_EVENT_ENGINE_STARTUP
|
||||
-- @field S_EVENT_ENGINE_SHUTDOWN
|
||||
-- @field S_EVENT_PLAYER_ENTER_UNIT
|
||||
-- @field S_EVENT_PLAYER_LEAVE_UNIT
|
||||
-- @field S_EVENT_PLAYER_COMMENT
|
||||
-- @field S_EVENT_SHOOTING_START
|
||||
-- @field S_EVENT_SHOOTING_END
|
||||
-- @field S_EVENT_MAX
|
||||
|
||||
world = {} --#world
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -62,7 +65,62 @@
|
||||
<div id="content">
|
||||
<h1>Module <code>Base</code></h1>
|
||||
|
||||
<p>The BASE class for all the classes defined within MOOSE.</p>
|
||||
<p>BASE classes.</p>
|
||||
|
||||
|
||||
|
||||
<h1><a href="##(BASE)">#BASE</a> class</h1>
|
||||
<p>The <a href="##(BASE)">#BASE</a> class is the super class for most of the classes defined within MOOSE.</p>
|
||||
|
||||
<p>It handles:</p>
|
||||
|
||||
<ul>
|
||||
<li>The construction and inheritance of child classes.</li>
|
||||
<li>The tracing of objects during mission execution within the DCS.log file (under saved games folder).</li>
|
||||
</ul>
|
||||
|
||||
<p>Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.</p>
|
||||
|
||||
<h1>BASE Trace functionality</h1>
|
||||
<p>The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
Note that these trace methods are inherited by each MOOSE class interiting BASE.
|
||||
As such, each object created from derived class from BASE can use the tracing functions to trace its execution.</p>
|
||||
|
||||
<h2>Trace a function call</h2>
|
||||
<p>There are basically 3 types of tracing methods available within BASE:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F">BASE.F</a>: Trace the beginning of a function and its given parameters.</li>
|
||||
<li><a href="##(BASE).T">BASE.T</a>: Trace further logic within a function giving optional variables or parameters.</li>
|
||||
<li><a href="##(BASE).E">BASE.E</a>: Trace an execption within a function giving optional variables or parameters. An exception will always be traced.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Tracing levels</h2>
|
||||
<p>There are 3 tracing levels within MOOSE. <br/>
|
||||
These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.</p>
|
||||
|
||||
<p>As such, the F and T methods have additional variants to trace level 2 and 3 respectively:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).F2">BASE.F2</a>: Trace the beginning of a function and its given parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).F3">BASE.F3</a>: Trace the beginning of a function and its given parameters with tracing level 3.</li>
|
||||
<li><a href="##(BASE).T2">BASE.T2</a>: Trace further logic within a function giving optional variables or parameters with tracing level 2.</li>
|
||||
<li><a href="##(BASE).T3">BASE.T3</a>: Trace further logic within a function giving optional variables or parameters with tracing level 3.</li>
|
||||
</ul>
|
||||
|
||||
<h1>BASE Inheritance support</h1>
|
||||
<p>The following methods are available to support inheritance:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(BASE).Inherit">BASE.Inherit</a>: Inherits from a class.</li>
|
||||
<li><a href="##(BASE).Inherited">BASE.Inherited</a>: Returns the parent class from the class.</li>
|
||||
</ul>
|
||||
|
||||
<h1>Future</h1>
|
||||
<p>Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -127,6 +185,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).EnableEvents">BASE:EnableEvents()</a></td>
|
||||
<td class="summary">
|
||||
<p>Enable the event listeners for the class.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(BASE).Event">BASE:Event()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the event dispatcher</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -467,6 +531,24 @@ A #table or any field.</p>
|
||||
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(BASE).Event" >
|
||||
<strong>BASE:Event()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the event dispatcher</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Event.html##(EVENT)">Event#EVENT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -139,27 +142,33 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventAddForCleanUp">CLEANUP:_EventAddForCleanUp(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventAddForCleanUp">CLEANUP:_EventAddForCleanUp(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if the Unit has an S<em>EVENT</em>ENGINE<em>SHUTDOWN or an S</em>EVENT_HIT within the given ZoneNames.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventCrash">CLEANUP:_EventCrash(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventCrash">CLEANUP:_EventCrash(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if a crash event occurs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventHitCleanUp">CLEANUP:_EventHitCleanUp(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventHitCleanUp">CLEANUP:_EventHitCleanUp(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if the Unit has an S<em>EVENT</em>HIT within the given ZoneNames.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventShot">CLEANUP:_EventShot(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._EventShot">CLEANUP:_EventShot(event, Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if a unit shoots a missile.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLEANUP)._OnEventBirth">CLEANUP:_OnEventBirth(Event)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -394,7 +403,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventAddForCleanUp" >
|
||||
<strong>CLEANUP:_EventAddForCleanUp(event)</strong>
|
||||
<strong>CLEANUP:_EventAddForCleanUp(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -404,12 +413,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this is the case, add the Group to the CLEANUP List.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -418,7 +432,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventCrash" >
|
||||
<strong>CLEANUP:_EventCrash(event)</strong>
|
||||
<strong>CLEANUP:_EventCrash(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -428,12 +442,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>Crashed units go into a CleanUpList for removal.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -442,7 +461,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventHitCleanUp" >
|
||||
<strong>CLEANUP:_EventHitCleanUp(event)</strong>
|
||||
<strong>CLEANUP:_EventHitCleanUp(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -452,12 +471,17 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this is the case, destroy the unit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -466,7 +490,7 @@ The Unit name ...</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._EventShot" >
|
||||
<strong>CLEANUP:_EventShot(event)</strong>
|
||||
<strong>CLEANUP:_EventShot(event, Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -476,12 +500,38 @@ The Unit name ...</p>
|
||||
|
||||
<p>If this occurs within one of the zones, then the weapon used must be destroyed.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="DCSTypes.html##(Event)">DCSTypes#Event</a> event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CLEANUP)._OnEventBirth" >
|
||||
<strong>CLEANUP:_OnEventBirth(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -92,7 +95,7 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).Alive">CLIENT:Alive(CallBack, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
</td>
|
||||
@@ -167,6 +170,12 @@ Note that clients are NOT the same as groups, they are NOT necessarily alive. </
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientName">CLIENT.ClientName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CLIENT).ClientParameters">CLIENT.ClientParameters</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -400,20 +409,25 @@ is the text defining the Mission briefing.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(CLIENT).Alive" >
|
||||
<strong>CLIENT:Alive(CallBack)</strong>
|
||||
<strong>CLIENT:Alive(CallBack, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Checks for a client alive event and calls a function on a continuous basis.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function CallBack </em></code>:
|
||||
Function.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
@@ -587,6 +601,20 @@ Function.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(CLIENT).ClientParameters" >
|
||||
<strong>CLIENT.ClientParameters</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -70,6 +73,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="#CoalitionObject">CoalitionObject</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#coalition">coalition</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -85,6 +94,38 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(CoalitionObject).getCountry">CoalitionObject:getCountry()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns object country.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(coalition)">Type <code>coalition</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition).side">coalition.side</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(coalition.side)">Type <code>coalition.side</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).BLUE">coalition.side.BLUE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).NEUTRAL">coalition.side.NEUTRAL</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(coalition.side).RED">coalition.side.RED</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -102,6 +143,20 @@
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(coalition)">#coalition</a></em>
|
||||
<a id="coalition" >
|
||||
<strong>coalition</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(DCSCoalitionObject)" >Type <code>DCSCoalitionObject</code></a></h2>
|
||||
@@ -121,7 +176,7 @@
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(coalition.side)">#coalition.side</a>:</em></p>
|
||||
<p><em><a href="DCSTypes.html##(coalition.side)">DCSTypes#coalition.side</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -142,11 +197,68 @@
|
||||
<p><em><a href="##(country.id)">#country.id</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(coalition)" >Type <code>coalition</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(coalition.side)">#coalition.side</a></em>
|
||||
<a id="#(coalition).side" >
|
||||
<strong>coalition.side</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(coalition.side)" >Type <code>coalition.side</code></a></h2>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).BLUE" >
|
||||
<strong>coalition.side.BLUE</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).NEUTRAL" >
|
||||
<strong>coalition.side.NEUTRAL</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(coalition.side).RED" >
|
||||
<strong>coalition.side.RED</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(country.id)" >Type <code>country.id</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li>DCSTask</li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li>DCSTypes</li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li>DCSUnit</li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
609
Documentation/DCSWorld.html
Normal file
609
Documentation/DCSWorld.html
Normal file
@@ -0,0 +1,609 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li>DCSWorld</li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>DCSWorld</code></h1>
|
||||
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#world">world</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(world)">Type <code>world</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world).event">world.event</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(world.event)">Type <code>world.event</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_BASE_CAPTURED">world.event.S_EVENT_BASE_CAPTURED</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_BIRTH">world.event.S_EVENT_BIRTH</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_CRASH">world.event.S_EVENT_CRASH</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_DEAD">world.event.S_EVENT_DEAD</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_EJECTION">world.event.S_EVENT_EJECTION</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_ENGINE_SHUTDOWN">world.event.S_EVENT_ENGINE_SHUTDOWN</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_ENGINE_STARTUP">world.event.S_EVENT_ENGINE_STARTUP</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_HIT">world.event.S_EVENT_HIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_HUMAN_FAILURE">world.event.S_EVENT_HUMAN_FAILURE</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_INVALID">world.event.S_EVENT_INVALID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_LAND">world.event.S_EVENT_LAND</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MAX">world.event.S_EVENT_MAX</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MISSION_END">world.event.S_EVENT_MISSION_END</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_MISSION_START">world.event.S_EVENT_MISSION_START</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PILOT_DEAD">world.event.S_EVENT_PILOT_DEAD</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_COMMENT">world.event.S_EVENT_PLAYER_COMMENT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_ENTER_UNIT">world.event.S_EVENT_PLAYER_ENTER_UNIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_PLAYER_LEAVE_UNIT">world.event.S_EVENT_PLAYER_LEAVE_UNIT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_REFUELING">world.event.S_EVENT_REFUELING</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_REFUELING_STOP">world.event.S_EVENT_REFUELING_STOP</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOOTING_END">world.event.S_EVENT_SHOOTING_END</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOOTING_START">world.event.S_EVENT_SHOOTING_START</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_SHOT">world.event.S_EVENT_SHOT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_TAKEOFF">world.event.S_EVENT_TAKEOFF</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(world.event).S_EVENT_TOOK_CONTROL">world.event.S_EVENT_TOOK_CONTROL</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(world)">#world</a></em>
|
||||
<a id="world" >
|
||||
<strong>world</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(DCSWorld)" >Type <code>DCSWorld</code></a></h2>
|
||||
|
||||
<h2><a id="#(world)" >Type <code>world</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(world.event)">#world.event</a></em>
|
||||
<a id="#(world).event" >
|
||||
<strong>world.event</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(world.event)" >Type <code>world.event</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_BASE_CAPTURED" >
|
||||
<strong>world.event.S_EVENT_BASE_CAPTURED</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_BIRTH" >
|
||||
<strong>world.event.S_EVENT_BIRTH</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_CRASH" >
|
||||
<strong>world.event.S_EVENT_CRASH</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_DEAD" >
|
||||
<strong>world.event.S_EVENT_DEAD</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_EJECTION" >
|
||||
<strong>world.event.S_EVENT_EJECTION</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_ENGINE_SHUTDOWN" >
|
||||
<strong>world.event.S_EVENT_ENGINE_SHUTDOWN</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_ENGINE_STARTUP" >
|
||||
<strong>world.event.S_EVENT_ENGINE_STARTUP</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_HIT" >
|
||||
<strong>world.event.S_EVENT_HIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_HUMAN_FAILURE" >
|
||||
<strong>world.event.S_EVENT_HUMAN_FAILURE</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_INVALID" >
|
||||
<strong>world.event.S_EVENT_INVALID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_LAND" >
|
||||
<strong>world.event.S_EVENT_LAND</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MAX" >
|
||||
<strong>world.event.S_EVENT_MAX</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MISSION_END" >
|
||||
<strong>world.event.S_EVENT_MISSION_END</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_MISSION_START" >
|
||||
<strong>world.event.S_EVENT_MISSION_START</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PILOT_DEAD" >
|
||||
<strong>world.event.S_EVENT_PILOT_DEAD</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_COMMENT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_COMMENT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_ENTER_UNIT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_ENTER_UNIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_PLAYER_LEAVE_UNIT" >
|
||||
<strong>world.event.S_EVENT_PLAYER_LEAVE_UNIT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_REFUELING" >
|
||||
<strong>world.event.S_EVENT_REFUELING</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_REFUELING_STOP" >
|
||||
<strong>world.event.S_EVENT_REFUELING_STOP</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOOTING_END" >
|
||||
<strong>world.event.S_EVENT_SHOOTING_END</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOOTING_START" >
|
||||
<strong>world.event.S_EVENT_SHOOTING_START</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_SHOT" >
|
||||
<strong>world.event.S_EVENT_SHOT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_TAKEOFF" >
|
||||
<strong>world.event.S_EVENT_TAKEOFF</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(world.event).S_EVENT_TOOK_CONTROL" >
|
||||
<strong>world.event.S_EVENT_TOOK_CONTROL</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li>DCStimer</li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li>DEPLOYTASK</li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li>DESTROYBASETASK</li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -97,7 +100,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).EventDead">DESTROYBASETASK.EventDead(event, self)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).EventDead">DESTROYBASETASK:EventDead(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handle the S<em>EVENT</em>DEAD events to validate the destruction of units for the task monitoring.</p>
|
||||
</td>
|
||||
@@ -109,7 +112,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).New">DESTROYBASETASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).New">DESTROYBASETASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupPrefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new DESTROYBASETASK.</p>
|
||||
</td>
|
||||
@@ -188,25 +191,19 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYBASETASK).EventDead" >
|
||||
<strong>DESTROYBASETASK.EventDead(event, self)</strong>
|
||||
<strong>DESTROYBASETASK:EventDead(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handle the S<em>EVENT</em>DEAD events to validate the destruction of units for the task monitoring.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<pre><code> Event structure of DCS world.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>:
|
||||
structure of MOOSE.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -230,7 +227,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYBASETASK).New" >
|
||||
<strong>DESTROYBASETASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage)</strong>
|
||||
<strong>DESTROYBASETASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupPrefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -241,52 +238,32 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".</p>
|
||||
<p><code><em>#string DestroyGroupType </em></code>:
|
||||
Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".</p>
|
||||
<p><code><em>#string DestroyUnitType </em></code>:
|
||||
Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> table </em></code>:
|
||||
string,...} DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.</p>
|
||||
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||
string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnitType </em></code>: </p>
|
||||
<p><code><em>#number DestroyPercentage </em></code>:
|
||||
defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupPrefixes </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyPercentage </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
@@ -332,6 +309,8 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -88,13 +91,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).New">DESTROYGROUPSTASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).New">DESTROYGROUPSTASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new DESTROYGROUPSTASK.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).ReportGoalProgress">DESTROYGROUPSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).ReportGoalProgress">DESTROYGROUPSTASK:ReportGoalProgress(DestroyGroup, DestroyUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Report Goal Progress.</p>
|
||||
</td>
|
||||
@@ -150,7 +153,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYGROUPSTASK).New" >
|
||||
<strong>DESTROYGROUPSTASK.New(string, string, table, ?, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage)</strong>
|
||||
<strong>DESTROYGROUPSTASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -161,53 +164,35 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyGroupType String describing the group to be destroyed.</p>
|
||||
<p><code><em>#string DestroyGroupType </em></code>: </p>
|
||||
<pre><code>String describing the group to be destroyed.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> string </em></code>:
|
||||
DestroyUnitType String describing the unit to be destroyed.</p>
|
||||
<p><code><em>#string DestroyUnitType </em></code>: </p>
|
||||
<pre><code>String describing the unit to be destroyed.
|
||||
</code></pre>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> table </em></code>:
|
||||
string,...} DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.</p>
|
||||
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||
string> DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.
|
||||
<p><code><em>#number DestroyPercentage </em></code>:
|
||||
defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the <a href="TASK.html">TASK</a>.
|
||||
-@return DESTROYGROUPSTASK</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnitType </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroupNames </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyPercentage </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@@ -216,7 +201,7 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
<dt>
|
||||
|
||||
<a id="#(DESTROYGROUPSTASK).ReportGoalProgress" >
|
||||
<strong>DESTROYGROUPSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</strong>
|
||||
<strong>DESTROYGROUPSTASK:ReportGoalProgress(DestroyGroup, DestroyUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -227,35 +212,27 @@ umber DestroyPercentage defines the %-tage that needs to be destroyed to achieve
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Group </em></code>:
|
||||
DestroyGroup Group structure describing the group to be evaluated.</p>
|
||||
<p><code><em><a href="DCSGroup.html##(Group)">DCSGroup#Group</a> DestroyGroup </em></code>:
|
||||
Group structure describing the group to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Unit </em></code>:
|
||||
DestroyUnit Unit structure describing the Unit to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyGroup </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DestroyUnit </em></code>: </p>
|
||||
<p><code><em><a href="DCSUnit.html##(Unit)">DCSUnit#Unit</a> DestroyUnit </em></code>:
|
||||
Unit structure describing the Unit to be evaluated.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The DestroyCount reflecting the amount of units destroyed within the group.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li>DESTROYUNITTYPESTASK</li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li>Escort</li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -65,15 +68,19 @@
|
||||
<p>Taking the lead of AI escorting your flight.</p>
|
||||
|
||||
|
||||
<p>The ESCORT class allows you to interact with escorting AI on your flight and take the lead.
|
||||
|
||||
<h1><a href="##(ESCORT)">#ESCORT</a> class</h1>
|
||||
<p>The <a href="##(ESCORT)">#ESCORT</a> class allows you to interact with escorting AI on your flight and take the lead.
|
||||
Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).</p>
|
||||
|
||||
<p>The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes.
|
||||
Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.</p>
|
||||
|
||||
<h1>RADIO MENUs that can be created:</h1>
|
||||
<p>Find a summary below of the current available commands:</p>
|
||||
|
||||
<p><strong>1. Navigation ...:</strong> Escort group navigation functions:</p>
|
||||
<h2>Navigation ...:</h2>
|
||||
<p>Escort group navigation functions:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Join-Up and Follow at x meters":</strong> The escort group fill follow you at about x meters, and they will follow you.</li>
|
||||
@@ -81,14 +88,16 @@ Ships and Ground troops will have a more limited set, but they can provide suppo
|
||||
<li><strong>"Smoke":</strong> Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>2. Hold position ...:</strong> Escort group navigation functions:</p>
|
||||
<h2>Hold position ...:</h2>
|
||||
<p>Escort group navigation functions:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"At current location":</strong> Stops the escort group and they will hover 30 meters above the ground at the position they stopped.</li>
|
||||
<li><strong>"At client location":</strong> Stops the escort group and they will hover 30 meters above the ground at the position they stopped.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>3. Report targets ...:</strong> Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).</p>
|
||||
<h2>Report targets ...:</h2>
|
||||
<p>Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Report now":</strong> Will report the current detected targets.</li>
|
||||
@@ -96,21 +105,25 @@ Ships and Ground troops will have a more limited set, but they can provide suppo
|
||||
<li><strong>"Report targets off":</strong> Will stop detecting targets.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>4. Scan targets ...:</strong> Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.</p>
|
||||
<h2>Scan targets ...:</h2>
|
||||
<p>Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Scan targets 30 seconds":</strong> Scan 30 seconds for targets.</li>
|
||||
<li><strong>"Scan targets 60 seconds":</strong> Scan 60 seconds for targets.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>5. Attack targets ...:</strong> This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.</p>
|
||||
<h2>Attack targets ...:</h2>
|
||||
<p>This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.</p>
|
||||
|
||||
<p><strong>6. Request assistance from ...:</strong> This menu item will list all detected targets within a 15km range, as with the menu item <strong>Attack Targets</strong>.
|
||||
<h2>Request assistance from ...:</h2>
|
||||
<p>This menu item will list all detected targets within a 15km range, as with the menu item <strong>Attack Targets</strong>.
|
||||
This menu item allows to request attack support from other escorts supporting the current client group.
|
||||
eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles.
|
||||
eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.</p>
|
||||
|
||||
<p><strong>7. ROE ...:</strong> Defines the Rules of Engagement of the escort group when in flight.</p>
|
||||
<h2>ROE ...:</h2>
|
||||
<p>Sets the Rules of Engagement (ROE) of the escort group when in flight.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Hold Fire":</strong> The escort group will hold fire.</li>
|
||||
@@ -119,7 +132,8 @@ eg. the function allows a player to request support from other Planes escorting
|
||||
<li><strong>"Weapon Free":</strong> The escort group will engage with any target.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>8. Evasion ...:</strong> Will define the evasion techniques that the escort group will perform during flight or combat.</p>
|
||||
<h2>Evasion ...:</h2>
|
||||
<p>Will define the evasion techniques that the escort group will perform during flight or combat.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>"Fight until death":</strong> The escort group will have no reaction to threats.</li>
|
||||
@@ -128,27 +142,31 @@ eg. the function allows a player to request support from other Planes escorting
|
||||
<li><strong>"Go below radar and evade fire":</strong> The escort group will perform evasive vertical manoeuvres.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>9. Resume Mission ...:</strong> Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
<h2>Resume Mission ...:</h2>
|
||||
<p>Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.</p>
|
||||
|
||||
<p><strong>10. Abort Current Task:</strong> Cancel the current task and rejoin formation.</p>
|
||||
<h1>ESCORT construction methods.</h1>
|
||||
<p>Create a new SPAWN object with the <a href="##(ESCORT).New">ESCORT.New</a> method:</p>
|
||||
|
||||
<ol>
|
||||
<li><h2>ESCORT object construction methods.</h2>
|
||||
<p>Create a new SPAWN object with the <a href="##(ESCORT).New">ESCORT.New</a> method:</p></li>
|
||||
<li><p><a href="##(ESCORT).New">ESCORT.New</a>: Creates a new ESCORT object from a <a href="Group.html##(GROUP)">Group#GROUP</a> for a <a href="Client.html##(CLIENT)">Client#CLIENT</a>, with an optional briefing text.</p></li>
|
||||
<li><h2>ESCORT object initialization methods.</h2>
|
||||
<p>The following menus can be setup:</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuFollowAt">ESCORT.MenuFollowAt</a>: Creates a menu to make the escort follow the client.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuHoldAtEscortPosition">ESCORT.MenuHoldAtEscortPosition</a>: Creates a menu to hold the escort at its current position.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuHoldAtLeaderPosition">ESCORT.MenuHoldAtLeaderPosition</a>: Creates a menu to hold the escort at the client position.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuScanForTargets">ESCORT.MenuScanForTargets</a>: Creates a menu so that the escort scans targets.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuFlare">ESCORT.MenuFlare</a>: Creates a menu to disperse flares.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuSmoke">ESCORT.MenuSmoke</a>: Creates a menu to disparse smoke.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuReportTargets">ESCORT.MenuReportTargets</a>: Creates a menu so that the escort reports targets.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuReportPosition">ESCORT.MenuReportPosition</a>: Creates a menu so that the escort reports its current position from bullseye.</p></li>
|
||||
<li><p><a href="##(ESCORT).MenuAssistedAttack">ESCORT.MenuAssistedAttack</a>: Creates a menu structure so that the escort can resume from a waypoint.</p></li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li><a href="##(ESCORT).New">ESCORT.New</a>: Creates a new ESCORT object from a <a href="Group.html##(GROUP)">Group#GROUP</a> for a <a href="Client.html##(CLIENT)">Client#CLIENT</a>, with an optional briefing text.</li>
|
||||
</ul>
|
||||
|
||||
<h1>ESCORT initialization methods.</h1>
|
||||
<p>The following menus are created within the RADIO MENU of an active unit hosted by a player:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ESCORT).MenuFollowAt">ESCORT.MenuFollowAt</a>: Creates a menu to make the escort follow the client.</li>
|
||||
<li><a href="##(ESCORT).MenuHoldAtEscortPosition">ESCORT.MenuHoldAtEscortPosition</a>: Creates a menu to hold the escort at its current position.</li>
|
||||
<li><a href="##(ESCORT).MenuHoldAtLeaderPosition">ESCORT.MenuHoldAtLeaderPosition</a>: Creates a menu to hold the escort at the client position.</li>
|
||||
<li><a href="##(ESCORT).MenuScanForTargets">ESCORT.MenuScanForTargets</a>: Creates a menu so that the escort scans targets.</li>
|
||||
<li><a href="##(ESCORT).MenuFlare">ESCORT.MenuFlare</a>: Creates a menu to disperse flares.</li>
|
||||
<li><a href="##(ESCORT).MenuSmoke">ESCORT.MenuSmoke</a>: Creates a menu to disparse smoke.</li>
|
||||
<li><a href="##(ESCORT).MenuReportTargets">ESCORT.MenuReportTargets</a>: Creates a menu so that the escort reports targets.</li>
|
||||
<li><a href="##(ESCORT).MenuReportPosition">ESCORT.MenuReportPosition</a>: Creates a menu so that the escort reports its current position from bullseye.</li>
|
||||
<li><a href="##(ESCORT).MenuAssistedAttack">ESCORT.MenuAssistedAttack</a>: Creates a menu structure so that the escort can resume from a waypoint.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
@@ -717,10 +735,7 @@ Note that this is really fantastic, as you now have the dynamic of taking contro
|
||||
<h2><a id="#(Distance)" >Type <code>Distance</code></a></h2>
|
||||
|
||||
<h2><a id="#(ESCORT)" >Type <code>ESCORT</code></a></h2>
|
||||
|
||||
<p>ESCORT class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@@ -1832,6 +1847,7 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(ESCORT).ReportTargetsScheduler" >
|
||||
<strong>ESCORT.ReportTargetsScheduler</strong>
|
||||
</a>
|
||||
|
||||
1658
Documentation/Event.html
Normal file
1658
Documentation/Event.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li>GOHOMETASK</li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li>Group</li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li>MISSION</li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -387,6 +390,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).SchedulerId">MISSIONSCHEDULER.SchedulerId</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MISSIONSCHEDULER).Scoring">MISSIONSCHEDULER:Scoring(Scoring)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a mission scoring to the game.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1522,6 +1531,27 @@ MISSIONSCHEDULER:RemoveMission( 'Russia Transport Troops SA-6' )</code></pre>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(MISSIONSCHEDULER).Scoring" >
|
||||
<strong>MISSIONSCHEDULER:Scoring(Scoring)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a mission scoring to the game.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> Scoring </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -94,13 +97,13 @@ on defined intervals (currently every minute).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnBirth">MOVEMENT:OnBirth(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnBirth">MOVEMENT:OnBirth(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Captures the birth events when new Units were spawned.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnDeadOrCrash">MOVEMENT:OnDeadOrCrash(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(MOVEMENT).OnDeadOrCrash">MOVEMENT:OnDeadOrCrash(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Captures the Dead or Crash events when Units crash or are destroyed.</p>
|
||||
</td>
|
||||
@@ -186,7 +189,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(MOVEMENT).OnBirth" >
|
||||
<strong>MOVEMENT:OnBirth(event)</strong>
|
||||
<strong>MOVEMENT:OnBirth(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -197,7 +200,7 @@ on defined intervals (currently every minute).</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -207,7 +210,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(MOVEMENT).OnDeadOrCrash" >
|
||||
<strong>MOVEMENT:OnDeadOrCrash(event)</strong>
|
||||
<strong>MOVEMENT:OnDeadOrCrash(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -218,7 +221,7 @@ on defined intervals (currently every minute).</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li>PICKUPTASK</li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li>ROUTETASK</li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li>STAGE</li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
791
Documentation/Scoring.html
Normal file
791
Documentation/Scoring.html
Normal file
@@ -0,0 +1,791 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="CARGO.html">CARGO</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
|
||||
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="NOTASK.html">NOTASK</a></li>
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li>Scoring</li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="TASK.html">TASK</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>Scoring</code></h1>
|
||||
|
||||
<p>Scoring system for MOOSE.</p>
|
||||
|
||||
|
||||
<p>This scoring class calculates the hits and kills that players make within a simulation session.
|
||||
Scoring is calculated using a defined algorithm.
|
||||
With a small change in MissionScripting.lua, the scoring can also be logged in a CSV file, that can then be uploaded
|
||||
to a database or a BI tool to publish the scoring results to the player community.</p>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ClientGroup">ClientGroup</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SCORING">SCORING</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nHours">nHours</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nMins">nMins</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#nSecs">nSecs</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(SCORING)">Type <code>SCORING</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).AllScoresMenu">SCORING.AllScoresMenu</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ClassID">SCORING.ClassID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ClassName">SCORING.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).CloseCSV">SCORING:CloseCSV()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).Menu">SCORING.Menu</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).New">SCORING:New(GameName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SCORING object to administer the scoring achieved by players.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).OpenCSV">SCORING:OpenCSV(ScoringCSV)</a></td>
|
||||
<td class="summary">
|
||||
<p>Opens a score CSV file to log the scores.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).Players">SCORING.Players</a></td>
|
||||
<td class="summary">
|
||||
<p>A collection of the current players that have joined the game.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ReportScoreAll">SCORING:ReportScoreAll()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ReportScorePlayer">SCORING:ReportScorePlayer()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).RunTime">SCORING.RunTime</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoreCSV">SCORING:ScoreCSV(PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers a score for a player.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoreMenu">SCORING:ScoreMenu()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a score radio menu.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).ScoringCSV">SCORING.ScoringCSV</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING).SecondsToClock">SCORING:SecondsToClock(sSeconds)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddMissionScore">SCORING:_AddMissionScore(MissionName, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers Mission Scores for possible multiple players that contributed in the Mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddMissionTaskScore">SCORING:_AddMissionTaskScore(PlayerUnit, MissionName, Score)</a></td>
|
||||
<td class="summary">
|
||||
<p>Registers Scores the players completing a Mission Task.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._AddPlayerFromUnit">SCORING:_AddPlayerFromUnit(UnitData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add a new player entering a Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._EventOnDeadOrCrash">SCORING:_EventOnDeadOrCrash(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Track DEAD or CRASH events for the scoring.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._EventOnHit">SCORING:_EventOnHit(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnHit event for the scoring.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SCORING)._FollowPlayersScheduled">SCORING:_FollowPlayersScheduled()</a></td>
|
||||
<td class="summary">
|
||||
<p>Follows new players entering Clients within the DCSRTE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="ClientGroup" >
|
||||
<strong>ClientGroup</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SCORING)">#SCORING</a></em>
|
||||
<a id="SCORING" >
|
||||
<strong>SCORING</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nHours" >
|
||||
<strong>nHours</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nMins" >
|
||||
<strong>nMins</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="nSecs" >
|
||||
<strong>nSecs</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(Scoring)" >Type <code>Scoring</code></a></h2>
|
||||
|
||||
<h2><a id="#(SCORING)" >Type <code>SCORING</code></a></h2>
|
||||
|
||||
<p>The Scoring class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).AllScoresMenu" >
|
||||
<strong>SCORING.AllScoresMenu</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SCORING).ClassID" >
|
||||
<strong>SCORING.ClassID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(SCORING).ClassName" >
|
||||
<strong>SCORING.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).CloseCSV" >
|
||||
<strong>SCORING:CloseCSV()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).Menu" >
|
||||
<strong>SCORING.Menu</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).New" >
|
||||
<strong>SCORING:New(GameName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new SCORING object to administer the scoring achieved by players.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string GameName </em></code>:
|
||||
The name of the game. This name is also logged in the CSV score file.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Define a new scoring object for the mission Gori Valley.
|
||||
ScoringObject = SCORING:New( "Gori Valley" )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).OpenCSV" >
|
||||
<strong>SCORING:OpenCSV(ScoringCSV)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Opens a score CSV file to log the scores.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoringCSV </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
|
||||
ScoringObject = SCORING:New( "Gori Valley" )
|
||||
ScoringObject:OpenCSV( "Player Scores" )</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).Players" >
|
||||
<strong>SCORING.Players</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>A collection of the current players that have joined the game.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ReportScoreAll" >
|
||||
<strong>SCORING:ReportScoreAll()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ReportScorePlayer" >
|
||||
<strong>SCORING:ReportScorePlayer()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).RunTime" >
|
||||
<strong>SCORING.RunTime</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ScoreCSV" >
|
||||
<strong>SCORING:ScoreCSV(PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers a score for a player.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerName </em></code>:
|
||||
The name of the player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreType </em></code>:
|
||||
The type of the score.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreTimes </em></code>:
|
||||
The amount of scores achieved.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ScoreAmount </em></code>:
|
||||
The score given.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitName </em></code>:
|
||||
The unit name of the player.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitCoalition </em></code>:
|
||||
The coalition of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitCategory </em></code>:
|
||||
The category of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string PlayerUnitType </em></code>:
|
||||
The type of the player unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitName </em></code>:
|
||||
The name of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitCoalition </em></code>:
|
||||
The coalition of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitCategory </em></code>:
|
||||
The category of the target unit.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TargetUnitType </em></code>:
|
||||
The type of the target unit.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).ScoreMenu" >
|
||||
<strong>SCORING:ScoreMenu()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a score radio menu.</p>
|
||||
|
||||
|
||||
<p>Can be accessed using Radio -> F10.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SCORING)">#SCORING</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SCORING).ScoringCSV" >
|
||||
<strong>SCORING.ScoringCSV</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING).SecondsToClock" >
|
||||
<strong>SCORING:SecondsToClock(sSeconds)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> sSeconds </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddMissionScore" >
|
||||
<strong>SCORING:_AddMissionScore(MissionName, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers Mission Scores for possible multiple players that contributed in the Mission.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> MissionName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Score </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddMissionTaskScore" >
|
||||
<strong>SCORING:_AddMissionTaskScore(PlayerUnit, MissionName, Score)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Registers Scores the players completing a Mission Task.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> PlayerUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> MissionName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Score </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._AddPlayerFromUnit" >
|
||||
<strong>SCORING:_AddPlayerFromUnit(UnitData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add a new player entering a Unit.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> UnitData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._EventOnDeadOrCrash" >
|
||||
<strong>SCORING:_EventOnDeadOrCrash(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Track DEAD or CRASH events for the scoring.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._EventOnHit" >
|
||||
<strong>SCORING:_EventOnHit(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnHit event for the scoring.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SCORING)._FollowPlayersScheduled" >
|
||||
<strong>SCORING:_FollowPlayersScheduled()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Follows new players entering Clients within the DCSRTE.</p>
|
||||
|
||||
|
||||
<p>TODO: Need to see if i can catch this also with an event. It will eliminate the schedule ...</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li>Sead</li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -82,7 +85,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SEAD).EventShot">SEAD:EventShot(event)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SEAD).EventShot">SEAD:EventShot(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Detects if an SA site was shot with an anti radiation missile.</p>
|
||||
</td>
|
||||
@@ -147,7 +150,7 @@
|
||||
<dt>
|
||||
|
||||
<a id="#(SEAD).EventShot" >
|
||||
<strong>SEAD:EventShot(event)</strong>
|
||||
<strong>SEAD:EventShot(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@@ -161,7 +164,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> event </em></code>: </p>
|
||||
<p><code><em> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li>Spawn</li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -65,7 +68,9 @@
|
||||
<p>Dynamic spawning of groups (and units).</p>
|
||||
|
||||
|
||||
<p>The SPAWN class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
|
||||
<h1><a href="##(SPAWN)">#SPAWN</a> class</h1>
|
||||
<p>The <a href="##(SPAWN)">#SPAWN</a> class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the <em>"Spawn Template"</em> of the SPAWN object.
|
||||
A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods.</p>
|
||||
|
||||
@@ -86,53 +91,60 @@ Groups will follow the following naming structure when spawned at run-time:</p>
|
||||
<p>Some additional notes that need to be remembered:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</p></li>
|
||||
<li><p>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</p></li>
|
||||
<li><p>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</p></li>
|
||||
<li><h2>SPAWN object construction methods:</h2>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</p></li>
|
||||
<li>Templates are actually groups defined within the mission editor, with the flag "Late Activation" set. As such, these groups are never used within the mission, but are used by the <a href="##(SPAWN)">#SPAWN</a> module.</li>
|
||||
<li>It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.</li>
|
||||
<li>When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN construction methods:</h1>
|
||||
<p>Create a new SPAWN object with the <a href="##(SPAWN).New">SPAWN.New</a> or the <a href="##(SPAWN).NewWithAlias">SPAWN.NewWithAlias</a> methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).New">SPAWN.New</a>: Creates a new SPAWN object taking the name of the group that functions as the Template.</li>
|
||||
</ul>
|
||||
|
||||
<p>It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned.
|
||||
The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
|
||||
So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.</p>
|
||||
|
||||
<ol>
|
||||
<li><h2>SPAWN object initialization methods: </h2>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p></li>
|
||||
<li><p><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</p></li>
|
||||
<li><p><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </p></li>
|
||||
<li><p><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</p></li>
|
||||
<li><p><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</p></li>
|
||||
<li><p><a href="##(SPAWN).Repeat">SPAWN.Repeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a> and <a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a>.</p></li>
|
||||
<li><h2>SPAWN object spawning methods:</h2>
|
||||
<p>Groups can be spawned at different times and methods:</p></li>
|
||||
<li><p><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</p></li>
|
||||
<li><p><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</p></li>
|
||||
<li><p><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</p></li>
|
||||
</ol>
|
||||
<h1>SPAWN initialization methods: </h1>
|
||||
<p>A spawn object will behave differently based on the usage of initialization methods: </p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Limit">SPAWN.Limit</a>: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</li>
|
||||
<li><a href="##(SPAWN).RandomizeRoute">SPAWN.RandomizeRoute</a>: Randomize the routes of spawned groups.</li>
|
||||
<li><a href="##(SPAWN).RandomizeTemplate">SPAWN.RandomizeTemplate</a>: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </li>
|
||||
<li><a href="##(SPAWN).Uncontrolled">SPAWN.Uncontrolled</a>: Spawn plane groups uncontrolled.</li>
|
||||
<li><a href="##(SPAWN).Array">SPAWN.Array</a>: Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
|
||||
<li><a href="##(SPAWN).Repeat">SPAWN.Repeat</a>: Re-spawn groups when they land at the home base. Similar functions are <a href="##(SPAWN).RepeatOnLanding">SPAWN.RepeatOnLanding</a> and <a href="##(SPAWN).RepeatOnEngineShutDown">SPAWN.RepeatOnEngineShutDown</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h1>SPAWN spawning methods:</h1>
|
||||
<p>Groups can be spawned at different times and methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>: Spawn one new group based on the last spawned index.</li>
|
||||
<li><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>: Re-spawn a group based on a given index.</li>
|
||||
<li><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>: Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a> and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a> to start and stop the schedule respectively.</li>
|
||||
<li><a href="##(SPAWN).SpawnFromUnit">SPAWN.SpawnFromUnit</a>: Spawn a new group taking the position of a <a href="UNIT.html">UNIT</a>.</li>
|
||||
<li><a href="##(SPAWN).SpawnInZone">SPAWN.SpawnInZone</a>: Spawn a new group in a <a href="ZONE.html">ZONE</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Note that <a href="##(SPAWN).Spawn">SPAWN.Spawn</a> and <a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a> return a <a href="GROUP.html##(GROUP).New">GROUP#GROUP.New</a> object, that contains a reference to the DCSGroup object.
|
||||
You can use the <a href="GROUP.html">GROUP</a> object to do further actions with the DCSGroup.</p>
|
||||
|
||||
<ol>
|
||||
<li>SPAWN object cleaning:
|
||||
<hr/>
|
||||
Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> initialization method has been defined that will silently monitor the status of each spawned group.
|
||||
Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time.
|
||||
There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"...
|
||||
In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically.
|
||||
This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</li>
|
||||
</ol>
|
||||
<h1>SPAWN object cleaning:</h1>
|
||||
<p>Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
To prevent this, a <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> initialization method has been defined that will silently monitor the status of each spawned group.
|
||||
Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time.
|
||||
There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"...
|
||||
In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically.
|
||||
This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
Check the <a href="##(SPAWN).CleanUp">SPAWN.CleanUp</a> for further info.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
@@ -326,9 +338,9 @@ You can use the <a href="GROUP.html">GROUP</a> object to do further actions with
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInZone">SPAWN:SpawnInZone(Zone, SpawnIndex)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).SpawnInZone">SPAWN:SpawnInZone(Zone, ZoneRandomize, SpawnIndex)</a></td>
|
||||
<td class="summary">
|
||||
<p>Will spawn a Group within a given <a href="ZONE.html">ZONE</a>.</p>
|
||||
<p>Will spawn a Group within a given <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1420,23 +1432,33 @@ SpawnGroupName</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWN).SpawnInZone" >
|
||||
<strong>SPAWN:SpawnInZone(Zone, SpawnIndex)</strong>
|
||||
<strong>SPAWN:SpawnInZone(Zone, ZoneRandomize, SpawnIndex)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Will spawn a Group within a given <a href="ZONE.html">ZONE</a>.</p>
|
||||
<p>Will spawn a Group within a given <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</p>
|
||||
|
||||
|
||||
<p>Once the group is spawned within the zone, it will continue on its route.
|
||||
The first waypoint (where the group is spawned) is replaced with the zone coordinates.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(ZONE)">#ZONE</a> Zone </em></code>:
|
||||
<p><code><em><a href="Zone.html##(ZONE)">Zone#ZONE</a> Zone </em></code>:
|
||||
The zone where the group is to be spawned.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number ZoneRandomize </em></code>:
|
||||
(Optional) Set to true if you want to randomize the starting point in the zone.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number SpawnIndex </em></code>:
|
||||
(Optional) The index which group to spawn within the given zone.</p>
|
||||
|
||||
@@ -2039,7 +2061,7 @@ Nothing found</p>
|
||||
|
||||
|
||||
|
||||
<p> TODO Need to delete this... _Database does this now ...</p>
|
||||
<p> TODO Need to delete this... _DATABASE does this now ...</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@@ -2297,8 +2319,6 @@ The index of the group to be spawned.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE)" >Type <code>ZONE</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li>StaticObject</li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -217,7 +220,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK).Goal">TASK.Goal(?, self, GoalVerb)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK).Goal">TASK:Goal(GoalVerb)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a TASK has Goal(s).</p>
|
||||
</td>
|
||||
@@ -1147,29 +1150,19 @@ tring GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK).Goal" >
|
||||
<strong>TASK.Goal(?, self, GoalVerb)</strong>
|
||||
<strong>TASK:Goal(GoalVerb)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a TASK has Goal(s).</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> ? </em></code>:
|
||||
tring GoalVerb is the name of the Goal of the TASK.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> self </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> GoalVerb </em></code>: </p>
|
||||
<p><code><em>#string GoalVerb </em></code>:
|
||||
is the name of the Goal of the TASK.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
@@ -65,7 +68,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Base.html">Base</a></td>
|
||||
<td class="summary">
|
||||
<p>The BASE class for all the classes defined within MOOSE.</p>
|
||||
<p>BASE classes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -138,6 +141,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="DCSUnit.html">DCSUnit</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="DCSWorld.html">DCSWorld</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -179,13 +188,19 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Database.html">Database</a></td>
|
||||
<td class="summary">
|
||||
<p>Administers the Initial Sets of the Mission Templates as defined within the Mission Editor.</p>
|
||||
<p>Manage sets of units and groups.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Escort.html">Escort</a></td>
|
||||
<td class="summary">
|
||||
<p>Taking the lead of AI escorting your flight.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Event.html">Event</a></td>
|
||||
<td class="summary">
|
||||
<p>The EVENT class models an efficient event handling process between other classes and its units, weapons.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -246,6 +261,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="STAGE.html">STAGE</a></td>
|
||||
<td class="summary">
|
||||
<p>Stages within a <a href="TASK.html">TASK</a> within a <a href="MISSION.html">MISSION</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Scoring.html">Scoring</a></td>
|
||||
<td class="summary">
|
||||
<p>Scoring system for MOOSE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
|
||||
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
|
||||
@@ -38,6 +39,7 @@
|
||||
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="MISSION.html">MISSION</a></li>
|
||||
@@ -48,6 +50,7 @@
|
||||
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
|
||||
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
|
||||
<li><a href="STAGE.html">STAGE</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
rem Generate Moose_Embedded.lua
|
||||
del Moose_Embedded.lua
|
||||
|
||||
copy /b ..\Moose\Routines.lua ^
|
||||
+ ..\Moose\Base.lua ^
|
||||
+ ..\Moose\Menu.lua ^
|
||||
+ ..\Moose\Group.lua ^
|
||||
+ ..\Moose\Unit.lua ^
|
||||
+ ..\Moose\Zone.lua ^
|
||||
+ ..\Moose\Database.lua ^
|
||||
+ ..\Moose\Cargo.lua ^
|
||||
+ ..\Moose\Client.lua ^
|
||||
+ ..\Moose\Message.lua ^
|
||||
+ ..\Moose\Stage.lua ^
|
||||
+ ..\Moose\Task.lua ^
|
||||
+ ..\Moose\GoHomeTask.lua ^
|
||||
+ ..\Moose\DestroyBaseTask.lua ^
|
||||
+ ..\Moose\DestroyGroupsTask.lua ^
|
||||
+ ..\Moose\DestroyRadarsTask.lua ^
|
||||
+ ..\Moose\DestroyUnitTypesTask.lua ^
|
||||
+ ..\Moose\PickupTask.lua ^
|
||||
+ ..\Moose\DeployTask.lua ^
|
||||
+ ..\Moose\NoTask.lua ^
|
||||
+ ..\Moose\RouteTask.lua ^
|
||||
+ ..\Moose\Mission.lua ^
|
||||
+ ..\Moose\CleanUp.lua ^
|
||||
+ ..\Moose\Spawn.lua ^
|
||||
+ ..\Moose\Movement.lua ^
|
||||
+ ..\Moose\Sead.lua ^
|
||||
+ ..\Moose\Escort.lua ^
|
||||
Moose_Embedded.lua /y
|
||||
|
||||
echo env.info( 'Moose Embedded' ) > Moose_Embedded.lua
|
||||
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Routines.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Base.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Event.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Group.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Unit.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Zone.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Database.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Scoring.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Cargo.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Client.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Message.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Stage.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Task.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\GoHomeTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyBaseTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyGroupsTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyRadarsTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DestroyUnitTypesTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\PickupTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\DeployTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\NoTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\RouteTask.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Mission.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\CleanUp.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Spawn.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Movement.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Sead.lua Moose_Embedded.lua
|
||||
copy /b Moose_Embedded.lua + ..\Moose\Escort.lua Moose_Embedded.lua
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -38,6 +38,6 @@ env.info( "Include.MissionPath = " .. Include.MissionPath)
|
||||
|
||||
Include.Files = {}
|
||||
|
||||
Include.File( "Database" )
|
||||
Include.File( "Moose" )
|
||||
|
||||
env.info("Loaded MOOSE Include Engine")
|
||||
@@ -20,4 +20,6 @@ env.info( "Include.MissionPath = " .. Include.MissionPath)
|
||||
|
||||
Include.Files = {}
|
||||
|
||||
Include.File( "Moose" )
|
||||
|
||||
env.info("Loaded MOOSE Include Engine")
|
||||
|
||||
@@ -1,4 +1,55 @@
|
||||
--- The BASE class for all the classes defined within MOOSE.
|
||||
--- BASE classes.
|
||||
--
|
||||
-- @{#BASE} class
|
||||
-- ==============
|
||||
-- The @{#BASE} class is the super class for most of the classes defined within MOOSE.
|
||||
--
|
||||
-- It handles:
|
||||
--
|
||||
-- * The construction and inheritance of child classes.
|
||||
-- * The tracing of objects during mission execution within the DCS.log file (under saved games folder).
|
||||
--
|
||||
-- Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.
|
||||
--
|
||||
-- BASE Trace functionality
|
||||
-- ========================
|
||||
-- The BASE class contains trace methods to trace progress within a mission execution of a certain object.
|
||||
-- Note that these trace methods are inherited by each MOOSE class interiting BASE.
|
||||
-- As such, each object created from derived class from BASE can use the tracing functions to trace its execution.
|
||||
--
|
||||
-- Trace a function call
|
||||
-- ---------------------
|
||||
-- There are basically 3 types of tracing methods available within BASE:
|
||||
--
|
||||
-- * @{#BASE.F}: Trace the beginning of a function and its given parameters.
|
||||
-- * @{#BASE.T}: Trace further logic within a function giving optional variables or parameters.
|
||||
-- * @{#BASE.E}: Trace an execption within a function giving optional variables or parameters. An exception will always be traced.
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- BASE Inheritance support
|
||||
-- ========================
|
||||
-- The following methods are available to support inheritance:
|
||||
--
|
||||
-- * @{#BASE.Inherit}: Inherits from a class.
|
||||
-- * @{#BASE.Inherited}: Returns the parent class from the class.
|
||||
--
|
||||
-- Future
|
||||
-- ======
|
||||
-- Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- @module Base
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -46,6 +97,8 @@ FORMATION = {
|
||||
Cone = "Cone"
|
||||
}
|
||||
|
||||
|
||||
|
||||
--- The base constructor. This is the top top class of all classed defined within the MOOSE.
|
||||
-- Any new class needs to be derived from this class for proper inheritance.
|
||||
-- @param #BASE self
|
||||
@@ -140,6 +193,18 @@ function BASE:AddEvent( Event, EventFunction )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Returns the event dispatcher
|
||||
-- @param #BASE self
|
||||
-- @return Event#EVENT
|
||||
function BASE:Event()
|
||||
|
||||
return _EVENTDISPATCHER
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- Enable the event listeners for the class.
|
||||
-- @param #BASE self
|
||||
-- @return #BASE
|
||||
@@ -253,8 +318,8 @@ end
|
||||
-- @param #BASE self
|
||||
-- @param DCSTypes#Event event
|
||||
function BASE:onEvent(event)
|
||||
--self:F( { BaseEventCodes[event.id], event } )
|
||||
|
||||
--env.info( 'onEvent Table self = ' .. tostring(self) )
|
||||
if self then
|
||||
for EventID, EventObject in pairs( self.Events ) do
|
||||
if EventObject.EventEnabled then
|
||||
@@ -269,8 +334,8 @@ function BASE:onEvent(event)
|
||||
if event.target and event.target:isExist() then
|
||||
event.TgtUnitName = event.target:getName()
|
||||
end
|
||||
self:T( { BaseEventCodes[event.id], event } )
|
||||
EventObject.EventFunction( self, event )
|
||||
--self:T( { BaseEventCodes[event.id], event } )
|
||||
--EventObject.EventFunction( self, event )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -517,7 +517,7 @@ function CARGO_GROUP:Spawn( Client )
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnFromUnit( self.CargoZone:GetCargoHostUnit(), 60, 30, 1 ):GetName()
|
||||
else
|
||||
--- ReSpawn the Cargo in the CargoZone without a host ...
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, 1 ):GetName()
|
||||
self.CargoGroupName = self.CargoSpawn:SpawnInZone( self.CargoZone, true, 1 ):GetName()
|
||||
end
|
||||
self:StatusNone()
|
||||
end
|
||||
|
||||
@@ -10,6 +10,7 @@ Include.File( "Task" )
|
||||
|
||||
--- The CLEANUP class.
|
||||
-- @type CLEANUP
|
||||
-- @extends Base#BASE
|
||||
CLEANUP = {
|
||||
ClassName = "CLEANUP",
|
||||
ZoneNames = {},
|
||||
@@ -40,15 +41,8 @@ function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self,
|
||||
self.TimeInterval = TimeInterval
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._EventAddForCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_STARTUP, self._EventAddForCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_HIT, self._EventAddForCleanUp ) -- , self._EventHitCleanUp )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._EventCrash ) -- , self._EventHitCleanUp )
|
||||
--self:AddEvent( world.event.S_EVENT_DEAD, self._EventCrash )
|
||||
self:AddEvent( world.event.S_EVENT_SHOT, self._EventShot )
|
||||
_EVENTDISPATCHER:OnBirth( self._OnEventBirth, self )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
self.CleanUpScheduler = routines.scheduleFunction( self._CleanUpScheduler, { self }, timer.getTime() + 1, TimeInterval )
|
||||
|
||||
return self
|
||||
@@ -84,9 +78,8 @@ function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName )
|
||||
local CleanUpGroupUnits = CleanUpGroup:getUnits()
|
||||
if #CleanUpGroupUnits == 1 then
|
||||
local CleanUpGroupName = CleanUpGroup:getName()
|
||||
local Event = {["initiator"]=CleanUpUnit,["id"]=8}
|
||||
world.onEvent( Event )
|
||||
trigger.action.deactivateGroup( CleanUpGroup )
|
||||
--self:CreateEventCrash( timer.getTime(), CleanUpUnit )
|
||||
CleanUpGroup:destroy()
|
||||
self:T( { "Destroyed Group:", CleanUpGroupName } )
|
||||
else
|
||||
CleanUpUnit:destroy()
|
||||
@@ -111,13 +104,43 @@ function CLEANUP:_DestroyMissile( MissileObject )
|
||||
end
|
||||
end
|
||||
|
||||
function CLEANUP:_OnEventBirth( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
self.CleanUpList[Event.IniDCSUnitName] = {}
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnit = Event.IniDCSUnit
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroup = Event.IniDCSGroup
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroupName = Event.IniDCSGroupName
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnitName = Event.IniDCSUnitName
|
||||
|
||||
_EVENTDISPATCHER:OnEngineShutDownForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnEngineStartUpForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnHitForUnit( Event.IniDCSUnitName, self._EventAddForCleanUp, self )
|
||||
_EVENTDISPATCHER:OnPilotDeadForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnCrashForUnit( Event.IniDCSUnitName, self._EventCrash, self )
|
||||
_EVENTDISPATCHER:OnShotForUnit( Event.IniDCSUnitName, self._EventShot, self )
|
||||
|
||||
--self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._EventAddForCleanUp )
|
||||
--self:AddEvent( world.event.S_EVENT_ENGINE_STARTUP, self._EventAddForCleanUp )
|
||||
-- self:AddEvent( world.event.S_EVENT_HIT, self._EventAddForCleanUp ) -- , self._EventHitCleanUp )
|
||||
-- self:AddEvent( world.event.S_EVENT_CRASH, self._EventCrash ) -- , self._EventHitCleanUp )
|
||||
-- --self:AddEvent( world.event.S_EVENT_DEAD, self._EventCrash )
|
||||
-- self:AddEvent( world.event.S_EVENT_SHOT, self._EventShot )
|
||||
--
|
||||
-- self:EnableEvents()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--- Detects if a crash event occurs.
|
||||
-- Crashed units go into a CleanUpList for removal.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventCrash( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
--TODO: This stuff is not working due to a DCS bug. Burning units cannot be destroyed.
|
||||
--MESSAGE:New( "Crash ", "Crash", 10, "Crash" ):ToAll()
|
||||
-- self:T("before getGroup")
|
||||
-- local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
||||
@@ -126,44 +149,28 @@ function CLEANUP:_EventCrash( event )
|
||||
-- self:T("after deactivateGroup")
|
||||
-- event.initiator:destroy()
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
local CleanUpUnitName = CleanUpUnit:getName() -- return the name of the Unit
|
||||
local CleanUpGroup = Unit.getGroup(CleanUpUnit)-- Identify the Group
|
||||
local CleanUpGroupName = ""
|
||||
if CleanUpGroup and CleanUpGroup:isExist() then
|
||||
CleanUpGroupName = CleanUpGroup:getName() -- return the name of the Group
|
||||
end
|
||||
|
||||
self.CleanUpList[CleanUpUnitName] = {}
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpUnit = CleanUpUnit
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpGroup = CleanUpGroup
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpGroupName = CleanUpGroupName
|
||||
self.CleanUpList[CleanUpUnitName].CleanUpUnitName = CleanUpUnitName
|
||||
self.CleanUpList[Event.IniDCSUnitName] = {}
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnit = Event.IniDCSUnit
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroup = Event.IniDCSGroup
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpGroupName = Event.IniDCSGroupName
|
||||
self.CleanUpList[Event.IniDCSUnitName].CleanUpUnitName = Event.IniDCSUnitName
|
||||
|
||||
end
|
||||
|
||||
--- Detects if a unit shoots a missile.
|
||||
-- If this occurs within one of the zones, then the weapon used must be destroyed.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventShot( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventShot( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
||||
local _groupname = _grp:getName() -- return the name of the group
|
||||
local _unittable = {event.initiator:getName()} -- return the name of the units in the group
|
||||
local _SEADmissile = event.weapon -- Identify the weapon fired
|
||||
--local _SEADmissileName = _SEADmissile:getTypeName() -- return weapon type
|
||||
--trigger.action.outText( string.format("Alerte, depart missile " ..string.format(_SEADmissileName)), 20) --debug message
|
||||
-- Start of the 2nd loop
|
||||
--self:T( "Missile Launched = " .. _SEADmissileName )
|
||||
|
||||
-- Test if the missile was fired within one of the CLEANUP.ZoneNames.
|
||||
local CurrentLandingZoneID = 0
|
||||
CurrentLandingZoneID = routines.IsUnitInZones( event.initiator, self.ZoneNames )
|
||||
CurrentLandingZoneID = routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames )
|
||||
if ( CurrentLandingZoneID ) then
|
||||
-- Okay, the missile was fired within the CLEANUP.ZoneNames, destroy the fired weapon.
|
||||
--_SEADmissile:destroy()
|
||||
routines.scheduleFunction( CLEANUP._DestroyMissile, {self, _SEADmissile}, timer.getTime() + 0.1)
|
||||
routines.scheduleFunction( CLEANUP._DestroyMissile, { self, Event.Weapon }, timer.getTime() + 0.1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -171,38 +178,28 @@ end
|
||||
--- Detects if the Unit has an S_EVENT_HIT within the given ZoneNames. If this is the case, destroy the unit.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventHitCleanUp( event )
|
||||
self:F( { event } )
|
||||
function CLEANUP:_EventHitCleanUp( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
if CleanUpUnit and CleanUpUnit:isExist() and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then
|
||||
local CleanUpUnitName = event.initiator:getName() -- return the name of the Unit
|
||||
|
||||
if routines.IsUnitInZones( CleanUpUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( "Life: " .. CleanUpUnitName .. ' = ' .. CleanUpUnit:getLife() .. "/" .. CleanUpUnit:getLife0() )
|
||||
if CleanUpUnit:getLife() < CleanUpUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. CleanUpUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, {self, CleanUpUnit}, timer.getTime() + 0.1)
|
||||
if Event.IniDCSUnit then
|
||||
if routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( { "Life: ", Event.IniDCSUnitName, ' = ', Event.IniDCSUnit:getLife(), "/", Event.IniDCSUnit:getLife0() } )
|
||||
if Event.IniDCSUnit:getLife() < Event.IniDCSUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. Event.IniDCSUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, { self, Event.IniDCSUnit }, timer.getTime() + 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local CleanUpTgtUnit = event.target -- the target Unit
|
||||
if CleanUpTgtUnit and CleanUpTgtUnit:isExist() and Object.getCategory(CleanUpTgtUnit) == Object.Category.UNIT then
|
||||
local CleanUpTgtUnitName = event.target:getName() -- return the name of the target Unit
|
||||
local CleanUpTgtGroup = Unit.getGroup(event.target)-- Identify the target Group
|
||||
local CleanUpTgtGroupName = CleanUpTgtGroup:getName() -- return the name of the target Group
|
||||
|
||||
|
||||
if routines.IsUnitInZones( CleanUpTgtUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( "Life: " .. CleanUpTgtUnitName .. ' = ' .. CleanUpTgtUnit:getLife() .. "/" .. CleanUpTgtUnit:getLife0() )
|
||||
if CleanUpTgtUnit:getLife() < CleanUpTgtUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. CleanUpTgtUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, {self, CleanUpTgtUnit}, timer.getTime() + 0.1)
|
||||
if Event.TgtDCSUnit then
|
||||
if routines.IsUnitInZones( Event.TgtDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:T( { "Life: ", Event.TgtDCSUnitName, ' = ', Event.TgtDCSUnit:getLife(), "/", Event.TgtDCSUnit:getLife0() } )
|
||||
if Event.TgtDCSUnit:getLife() < Event.TgtDCSUnit:getLife0() then
|
||||
self:T( "CleanUp: Destroy: " .. Event.TgtDCSUnitName )
|
||||
routines.scheduleFunction( CLEANUP._DestroyUnit, { self, Event.TgtDCSUnit }, timer.getTime() + 0.1 )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Add the @{DCSUnit#Unit} to the CleanUpList for CleanUp.
|
||||
@@ -224,24 +221,20 @@ end
|
||||
--- Detects if the Unit has an S_EVENT_ENGINE_SHUTDOWN or an S_EVENT_HIT within the given ZoneNames. If this is the case, add the Group to the CLEANUP List.
|
||||
-- @param #CLEANUP self
|
||||
-- @param DCSTypes#Event event
|
||||
function CLEANUP:_EventAddForCleanUp( event )
|
||||
function CLEANUP:_EventAddForCleanUp( Event )
|
||||
|
||||
local CleanUpUnit = event.initiator -- the Unit
|
||||
if CleanUpUnit and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then
|
||||
local CleanUpUnitName = CleanUpUnit:getName() -- return the name of the Unit
|
||||
if self.CleanUpList[CleanUpUnitName] == nil then
|
||||
if routines.IsUnitInZones( CleanUpUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( CleanUpUnit, CleanUpUnitName )
|
||||
if Event.IniDCSUnit then
|
||||
if self.CleanUpList[Event.IniDCSUnitName] == nil then
|
||||
if routines.IsUnitInZones( Event.IniDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( Event.IniDCSUnit, Event.IniDCSUnitName )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local CleanUpTgtUnit = event.target -- the target Unit
|
||||
if CleanUpTgtUnit and Object.getCategory(CleanUpTgtUnit) == Object.Category.UNIT then
|
||||
local CleanUpTgtUnitName = CleanUpTgtUnit:getName() -- return the name of the target Unit
|
||||
if self.CleanUpList[CleanUpTgtUnitName] == nil then
|
||||
if routines.IsUnitInZones( CleanUpTgtUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( CleanUpTgtUnit, CleanUpTgtUnitName )
|
||||
if Event.TgtDCSUnit then
|
||||
if self.CleanUpList[Event.TgtDCSUnitName] == nil then
|
||||
if routines.IsUnitInZones( Event.TgtDCSUnit, self.ZoneNames ) ~= nil then
|
||||
self:_AddForCleanUp( Event.TgtDCSUnit, Event.TgtDCSUnitName )
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -259,9 +252,11 @@ local CleanUpSurfaceTypeText = {
|
||||
--- At the defined time interval, CleanUp the Groups within the CleanUpList.
|
||||
-- @param #CLEANUP self
|
||||
function CLEANUP:_CleanUpScheduler()
|
||||
self:F( "CleanUp Scheduler" )
|
||||
self:F( { "CleanUp Scheduler" } )
|
||||
|
||||
local CleanUpCount = 0
|
||||
for CleanUpUnitName, UnitData in pairs( self.CleanUpList ) do
|
||||
CleanUpCount = CleanUpCount + 1
|
||||
|
||||
self:T( { CleanUpUnitName, UnitData } )
|
||||
local CleanUpUnit = Unit.getByName(UnitData.CleanUpUnitName)
|
||||
@@ -269,7 +264,7 @@ function CLEANUP:_CleanUpScheduler()
|
||||
local CleanUpUnitName = UnitData.CleanUpUnitName
|
||||
if CleanUpUnit then
|
||||
self:T( { "CleanUp Scheduler", "Checking:", CleanUpUnitName } )
|
||||
if _Database:GetStatusGroup( CleanUpGroupName ) ~= "ReSpawn" then
|
||||
if _DATABASE:GetStatusGroup( CleanUpGroupName ) ~= "ReSpawn" then
|
||||
local CleanUpUnitVec3 = CleanUpUnit:getPoint()
|
||||
--self:T( CleanUpUnitVec3 )
|
||||
local CleanUpUnitVec2 = {}
|
||||
@@ -323,5 +318,6 @@ function CLEANUP:_CleanUpScheduler()
|
||||
self.CleanUpList[CleanUpUnitName] = nil -- Not anymore in the DCSRTE
|
||||
end
|
||||
end
|
||||
self:T(CleanUpCount)
|
||||
end
|
||||
|
||||
|
||||
@@ -91,11 +91,12 @@ end
|
||||
-- @param #CLIENT self
|
||||
-- @param #function CallBack Function.
|
||||
-- @return #CLIENT
|
||||
function CLIENT:Alive( CallBack )
|
||||
function CLIENT:Alive( CallBack, ... )
|
||||
self:F()
|
||||
|
||||
self.ClientAlive2 = false
|
||||
self.ClientCallBack = CallBack
|
||||
self.ClientParameters = arg
|
||||
self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
|
||||
|
||||
return self
|
||||
@@ -150,7 +151,7 @@ function CLIENT:_AliveCheckScheduler()
|
||||
if self:IsAlive() then
|
||||
if self.ClientAlive2 == false then
|
||||
self:T("Calling Callback function")
|
||||
self.ClientCallBack( self )
|
||||
self.ClientCallBack( self, unpack( self.ClientParameters ) )
|
||||
self.ClientAlive2 = true
|
||||
end
|
||||
else
|
||||
@@ -195,12 +196,12 @@ function CLIENT:GetDCSGroup()
|
||||
-- Now we need to resolve the bugs in DCS 1.5 ...
|
||||
-- Consult the database for the units of the Client Group. (ClientGroup:getUnits() returns nil)
|
||||
self:T3( "Bug 1.5 logic" )
|
||||
local ClientUnits = _Database.Groups[self.ClientName].Units
|
||||
local ClientUnits = _DATABASE.Groups[self.ClientName].Units
|
||||
self:T3( { ClientUnits[1].name, env.getValueDictByKey(ClientUnits[1].name) } )
|
||||
for ClientUnitID, ClientUnitData in pairs( ClientUnits ) do
|
||||
self:T3( { tonumber(UnitData:getID()), ClientUnitData.unitId } )
|
||||
if tonumber(UnitData:getID()) == ClientUnitData.unitId then
|
||||
local ClientGroupTemplate = _Database.Groups[self.ClientName].Template
|
||||
local ClientGroupTemplate = _DATABASE.Groups[self.ClientName].Template
|
||||
self.ClientID = ClientGroupTemplate.groupId
|
||||
self.ClientGroupUnit = UnitData
|
||||
self:T3( self.ClientName .. " : group found in bug 1.5 resolvement logic!" )
|
||||
|
||||
1410
Moose/Database.lua
1410
Moose/Database.lua
File diff suppressed because it is too large
Load Diff
@@ -16,10 +16,11 @@ DESTROYBASETASK = {
|
||||
}
|
||||
|
||||
--- Creates a new DESTROYBASETASK.
|
||||
-- @param string DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".
|
||||
-- @param string DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".
|
||||
-- @param table{string,...} DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.
|
||||
-- @param ?number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @param #DESTROYBASETASK self
|
||||
-- @param #string DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers".
|
||||
-- @param #string DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents".
|
||||
-- @param #list<#string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.
|
||||
-- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @return DESTROYBASETASK
|
||||
function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage )
|
||||
local self = BASE:Inherit( self, TASK:New() )
|
||||
@@ -30,34 +31,31 @@ function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPre
|
||||
self.DestroyGroupPrefixes = DestroyGroupPrefixes
|
||||
self.DestroyGroupType = DestroyGroupType
|
||||
self.DestroyUnitType = DestroyUnitType
|
||||
if DestroyPercentage then
|
||||
self.DestroyPercentage = DestroyPercentage
|
||||
end
|
||||
self.TaskBriefing = "Task: Destroy " .. DestroyGroupType .. "."
|
||||
self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEGROUPSDESTROYED:New(), STAGEDONE:New() }
|
||||
self.SetStage( self, 1 )
|
||||
|
||||
--self.AddEvent( self, world.event.S_EVENT_DEAD, self.EventDead )
|
||||
|
||||
--env.info( 'New Table self = ' .. tostring(self) )
|
||||
--env.info( 'New Table self = ' .. tostring(self) )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Handle the S_EVENT_DEAD events to validate the destruction of units for the task monitoring.
|
||||
-- @param event Event structure of DCS world.
|
||||
function DESTROYBASETASK:EventDead( event )
|
||||
self:F( { 'EventDead', event } )
|
||||
-- @param #DESTROYBASETASK self
|
||||
-- @param Event#EVENTDATA Event structure of MOOSE.
|
||||
function DESTROYBASETASK:EventDead( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local DestroyUnit = event.initiator
|
||||
local DestroyUnitName = DestroyUnit:getName()
|
||||
local DestroyGroup = Unit.getGroup( DestroyUnit )
|
||||
local DestroyGroupName = ""
|
||||
if DestroyGroup and DestroyGroup:isExist() then
|
||||
local DestroyGroupName = DestroyGroup:getName()
|
||||
end
|
||||
if Event.IniDCSUnit then
|
||||
local DestroyUnit = Event.IniDCSUnit
|
||||
local DestroyUnitName = Event.IniDCSUnitName
|
||||
local DestroyGroup = Event.IniDCSGroup
|
||||
local DestroyGroupName = Event.IniDCSGroupName
|
||||
|
||||
--TODO: I need to fix here if 2 groups in the mission have a similar name with GroupPrefix equal, then i should differentiate for which group the goal was reached!
|
||||
--I may need to test if for the goalverb that group goal was reached or something. Need to think about it a bit more ...
|
||||
local UnitsDestroyed = 0
|
||||
self:T( DestroyGroupName )
|
||||
self:T( DestroyUnitName )
|
||||
for DestroyGroupPrefixID, DestroyGroupPrefix in pairs( self.DestroyGroupPrefixes ) do
|
||||
self:T( DestroyGroupPrefix )
|
||||
if string.find( DestroyGroupName, DestroyGroupPrefix, 1, true ) then
|
||||
@@ -70,6 +68,7 @@ function DESTROYBASETASK:EventDead( event )
|
||||
self:T( { UnitsDestroyed } )
|
||||
self:IncreaseGoalCount( UnitsDestroyed, self.GoalVerb )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Validate task completeness of DESTROYBASETASK.
|
||||
|
||||
@@ -11,10 +11,11 @@ DESTROYGROUPSTASK = {
|
||||
}
|
||||
|
||||
--- Creates a new DESTROYGROUPSTASK.
|
||||
-- @param string DestroyGroupType String describing the group to be destroyed.
|
||||
-- @param string DestroyUnitType String describing the unit to be destroyed.
|
||||
-- @param table{string,...} DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.
|
||||
-- @param ?number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
-- @param #DESTROYGROUPSTASK self
|
||||
-- @param #string DestroyGroupType String describing the group to be destroyed.
|
||||
-- @param #string DestroyUnitType String describing the unit to be destroyed.
|
||||
-- @param #list<#string> DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed.
|
||||
-- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}.
|
||||
---@return DESTROYGROUPSTASK
|
||||
function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage )
|
||||
local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) )
|
||||
@@ -23,34 +24,34 @@ function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupN
|
||||
self.Name = 'Destroy Groups'
|
||||
self.GoalVerb = "Destroy " .. DestroyGroupType
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self.EventDead )
|
||||
--Child.AddEvent( Child, world.event.S_EVENT_PILOT_DEAD, Child.EventDead )
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
_EVENTDISPATCHER:OnCrash( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Report Goal Progress.
|
||||
-- @param Group DestroyGroup Group structure describing the group to be evaluated.
|
||||
-- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated.
|
||||
-- @param #DESTROYGROUPSTASK self
|
||||
-- @param DCSGroup#Group DestroyGroup Group structure describing the group to be evaluated.
|
||||
-- @param DCSUnit#Unit DestroyUnit Unit structure describing the Unit to be evaluated.
|
||||
-- @return #number The DestroyCount reflecting the amount of units destroyed within the group.
|
||||
function DESTROYGROUPSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit )
|
||||
self:F( { DestroyGroup, DestroyUnit } )
|
||||
self:T( DestroyGroup:getSize() )
|
||||
self:F( { DestroyGroup, DestroyUnit, self.DestroyPercentage } )
|
||||
|
||||
local DestroyGroupSize = DestroyGroup:getSize() - 1 -- When a DEAD event occurs, the getSize is still one larger than the destroyed unit.
|
||||
local DestroyGroupInitialSize = DestroyGroup:getInitialSize()
|
||||
self:T( { DestroyGroupSize, DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) } )
|
||||
|
||||
local DestroyCount = 0
|
||||
if DestroyGroup then
|
||||
if ( ( DestroyGroup:getInitialSize() * self.DestroyPercentage ) / 100 ) - DestroyGroup:getSize() <= 0 then
|
||||
if DestroyGroupSize <= DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) then
|
||||
DestroyCount = 1
|
||||
--[[ else
|
||||
if DestroyGroup:getSize() == 1 then
|
||||
if DestroyUnit and DestroyUnit:getLife() <= 1.0 then
|
||||
DestroyCount = 1
|
||||
end
|
||||
end
|
||||
]] end
|
||||
end
|
||||
else
|
||||
DestroyCount = 1
|
||||
end
|
||||
|
||||
self:T( DestroyCount )
|
||||
|
||||
return DestroyCount
|
||||
end
|
||||
|
||||
@@ -18,8 +18,8 @@ function DESTROYRADARSTASK:New( DestroyGroupNames )
|
||||
self:F()
|
||||
|
||||
self.Name = 'Destroy Radars'
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ function DESTROYUNITTYPESTASK:New( DestroyGroupType, DestroyUnitType, DestroyGro
|
||||
self.Name = 'Destroy Unit Types'
|
||||
self.GoalVerb = "Destroy " .. DestroyGroupType
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead )
|
||||
_EVENTDISPATCHER:OnDead( self.EventDead , self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -1,69 +1,90 @@
|
||||
--- Taking the lead of AI escorting your flight.
|
||||
-- The ESCORT class allows you to interact with escorting AI on your flight and take the lead.
|
||||
--
|
||||
-- @{#ESCORT} class
|
||||
-- ================
|
||||
-- The @{#ESCORT} class allows you to interact with escorting AI on your flight and take the lead.
|
||||
-- Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).
|
||||
--
|
||||
-- The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes.
|
||||
-- Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.
|
||||
--
|
||||
-- RADIO MENUs that can be created:
|
||||
-- ================================
|
||||
-- Find a summary below of the current available commands:
|
||||
--
|
||||
-- **1. Navigation ...:** Escort group navigation functions:
|
||||
-- Navigation ...:
|
||||
-- ---------------
|
||||
-- Escort group navigation functions:
|
||||
--
|
||||
-- * **"Join-Up and Follow at x meters":** The escort group fill follow you at about x meters, and they will follow you.
|
||||
-- * **"Flare":** Provides menu commands to let the escort group shoot a flare in the air in a color.
|
||||
-- * **"Smoke":** Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
|
||||
-- * **"Join-Up and Follow at x meters":** The escort group fill follow you at about x meters, and they will follow you.
|
||||
-- * **"Flare":** Provides menu commands to let the escort group shoot a flare in the air in a color.
|
||||
-- * **"Smoke":** Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
|
||||
--
|
||||
-- **2. Hold position ...:** Escort group navigation functions:
|
||||
-- Hold position ...:
|
||||
-- ------------------
|
||||
-- Escort group navigation functions:
|
||||
--
|
||||
-- * **"At current location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At client location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At current location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
-- * **"At client location":** Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
|
||||
--
|
||||
-- **3. Report targets ...:** Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).
|
||||
-- Report targets ...:
|
||||
-- -------------------
|
||||
-- Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).
|
||||
--
|
||||
-- * **"Report now":** Will report the current detected targets.
|
||||
-- * **"Report targets on":** Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
|
||||
-- * **"Report targets off":** Will stop detecting targets.
|
||||
-- * **"Report now":** Will report the current detected targets.
|
||||
-- * **"Report targets on":** Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
|
||||
-- * **"Report targets off":** Will stop detecting targets.
|
||||
--
|
||||
-- **4. Scan targets ...:** Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.
|
||||
-- Scan targets ...:
|
||||
-- -----------------
|
||||
-- Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.
|
||||
--
|
||||
-- * **"Scan targets 30 seconds":** Scan 30 seconds for targets.
|
||||
-- * **"Scan targets 60 seconds":** Scan 60 seconds for targets.
|
||||
-- * **"Scan targets 30 seconds":** Scan 30 seconds for targets.
|
||||
-- * **"Scan targets 60 seconds":** Scan 60 seconds for targets.
|
||||
--
|
||||
-- **5. Attack targets ...:** This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.
|
||||
-- Attack targets ...:
|
||||
-- -------------------
|
||||
-- This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.
|
||||
--
|
||||
-- **6. Request assistance from ...:** This menu item will list all detected targets within a 15km range, as with the menu item **Attack Targets**.
|
||||
-- Request assistance from ...:
|
||||
-- ----------------------------
|
||||
-- This menu item will list all detected targets within a 15km range, as with the menu item **Attack Targets**.
|
||||
-- This menu item allows to request attack support from other escorts supporting the current client group.
|
||||
-- eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles.
|
||||
-- eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.
|
||||
--
|
||||
-- **7. ROE ...:** Defines the Rules of Engagement of the escort group when in flight.
|
||||
-- ROE ...:
|
||||
-- --------
|
||||
-- Sets the Rules of Engagement (ROE) of the escort group when in flight.
|
||||
--
|
||||
-- * **"Hold Fire":** The escort group will hold fire.
|
||||
-- * **"Return Fire":** The escort group will return fire.
|
||||
-- * **"Open Fire":** The escort group will open fire on designated targets.
|
||||
-- * **"Weapon Free":** The escort group will engage with any target.
|
||||
-- * **"Hold Fire":** The escort group will hold fire.
|
||||
-- * **"Return Fire":** The escort group will return fire.
|
||||
-- * **"Open Fire":** The escort group will open fire on designated targets.
|
||||
-- * **"Weapon Free":** The escort group will engage with any target.
|
||||
--
|
||||
-- **8. Evasion ...:** Will define the evasion techniques that the escort group will perform during flight or combat.
|
||||
-- Evasion ...:
|
||||
-- ------------
|
||||
-- Will define the evasion techniques that the escort group will perform during flight or combat.
|
||||
--
|
||||
-- * **"Fight until death":** The escort group will have no reaction to threats.
|
||||
-- * **"Use flares, chaff and jammers":** The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
|
||||
-- * **"Evade enemy fire":** The rescort group will evade enemy fire before firing.
|
||||
-- * **"Go below radar and evade fire":** The escort group will perform evasive vertical manoeuvres.
|
||||
-- * **"Fight until death":** The escort group will have no reaction to threats.
|
||||
-- * **"Use flares, chaff and jammers":** The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
|
||||
-- * **"Evade enemy fire":** The rescort group will evade enemy fire before firing.
|
||||
-- * **"Go below radar and evade fire":** The escort group will perform evasive vertical manoeuvres.
|
||||
--
|
||||
-- **9. Resume Mission ...:** Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
-- Resume Mission ...:
|
||||
-- -------------------
|
||||
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
|
||||
--
|
||||
-- **10. Abort Current Task:** Cancel the current task and rejoin formation.
|
||||
--
|
||||
-- 1. ESCORT object construction methods.
|
||||
-- --------------------------------------
|
||||
-- ESCORT construction methods.
|
||||
-- ============================
|
||||
-- Create a new SPAWN object with the @{#ESCORT.New} method:
|
||||
--
|
||||
-- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Group#GROUP} for a @{Client#CLIENT}, with an optional briefing text.
|
||||
--
|
||||
-- 2. ESCORT object initialization methods.
|
||||
-- ----------------------------------------
|
||||
-- The following menus can be setup:
|
||||
-- ESCORT initialization methods.
|
||||
-- ==============================
|
||||
-- The following menus are created within the RADIO MENU of an active unit hosted by a player:
|
||||
--
|
||||
-- * @{#ESCORT.MenuFollowAt}: Creates a menu to make the escort follow the client.
|
||||
-- * @{#ESCORT.MenuHoldAtEscortPosition}: Creates a menu to hold the escort at its current position.
|
||||
@@ -77,7 +98,7 @@
|
||||
-- * @{#ESCORT.MenuROE: Creates a menu structure to set the rules of engagement of the escort.
|
||||
-- * @{#ESCORT.MenuEvasion: Creates a menu structure to set the evasion techniques when the escort is under threat.
|
||||
-- * @{#ESCORT.MenuResumeMission}: Creates a menu structure so that the escort can resume from a waypoint.
|
||||
--
|
||||
--
|
||||
-- @module Escort
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -87,8 +108,7 @@ Include.File( "Database" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Zone" )
|
||||
|
||||
|
||||
--- ESCORT class
|
||||
---
|
||||
-- @type ESCORT
|
||||
-- @extends Base#BASE
|
||||
-- @field Client#CLIENT EscortClient
|
||||
|
||||
484
Moose/Event.lua
Normal file
484
Moose/Event.lua
Normal file
@@ -0,0 +1,484 @@
|
||||
--- The EVENT class models an efficient event handling process between other classes and its units, weapons.
|
||||
-- @module Event
|
||||
-- @author FlightControl
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
|
||||
--- The EVENT structure
|
||||
-- @type EVENT
|
||||
-- @field #EVENT.Events Events
|
||||
EVENT = {
|
||||
ClassName = "EVENT",
|
||||
ClassID = 0,
|
||||
}
|
||||
|
||||
local _EVENTCODES = {
|
||||
"S_EVENT_SHOT",
|
||||
"S_EVENT_HIT",
|
||||
"S_EVENT_TAKEOFF",
|
||||
"S_EVENT_LAND",
|
||||
"S_EVENT_CRASH",
|
||||
"S_EVENT_EJECTION",
|
||||
"S_EVENT_REFUELING",
|
||||
"S_EVENT_DEAD",
|
||||
"S_EVENT_PILOT_DEAD",
|
||||
"S_EVENT_BASE_CAPTURED",
|
||||
"S_EVENT_MISSION_START",
|
||||
"S_EVENT_MISSION_END",
|
||||
"S_EVENT_TOOK_CONTROL",
|
||||
"S_EVENT_REFUELING_STOP",
|
||||
"S_EVENT_BIRTH",
|
||||
"S_EVENT_HUMAN_FAILURE",
|
||||
"S_EVENT_ENGINE_STARTUP",
|
||||
"S_EVENT_ENGINE_SHUTDOWN",
|
||||
"S_EVENT_PLAYER_ENTER_UNIT",
|
||||
"S_EVENT_PLAYER_LEAVE_UNIT",
|
||||
"S_EVENT_PLAYER_COMMENT",
|
||||
"S_EVENT_SHOOTING_START",
|
||||
"S_EVENT_SHOOTING_END",
|
||||
"S_EVENT_MAX",
|
||||
}
|
||||
|
||||
--- The Event structure
|
||||
-- @type EVENTDATA
|
||||
-- @field id
|
||||
-- @field initiator
|
||||
-- @field target
|
||||
-- @field weapon
|
||||
-- @field IniDCSUnit
|
||||
-- @field IniDCSUnitName
|
||||
-- @field IniDCSGroup
|
||||
-- @field IniDCSGroupName
|
||||
-- @field TgtDCSUnit
|
||||
-- @field TgtDCSUnitName
|
||||
-- @field TgtDCSGroup
|
||||
-- @field TgtDCSGroupName
|
||||
-- @field Weapon
|
||||
-- @field WeaponName
|
||||
-- @field WeaponTgtDCSUnit
|
||||
|
||||
--- The Events structure
|
||||
-- @type EVENT.Events
|
||||
-- @field #number IniUnit
|
||||
|
||||
function EVENT:New()
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F()
|
||||
self.EventHandler = world.addEventHandler( self )
|
||||
return self
|
||||
end
|
||||
|
||||
function EVENT:EventText( EventID )
|
||||
|
||||
local EventText = _EVENTCODES[EventID]
|
||||
|
||||
return EventText
|
||||
end
|
||||
|
||||
|
||||
--- Initializes the Events structure for the event
|
||||
-- @param #EVENT self
|
||||
-- @param DCSWorld#world.event EventID
|
||||
-- @param #string EventClass
|
||||
-- @return #EVENT.Events
|
||||
function EVENT:Init( EventID, EventClass )
|
||||
self:F3( { _EVENTCODES[EventID], EventClass } )
|
||||
if not self.Events[EventID] then
|
||||
self.Events[EventID] = {}
|
||||
end
|
||||
if not self.Events[EventID][EventClass] then
|
||||
self.Events[EventID][EventClass] = {}
|
||||
end
|
||||
return self.Events[EventID][EventClass]
|
||||
end
|
||||
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @param #function OnEventFunction
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, OnEventFunction )
|
||||
self:F2( EventTemplate.name )
|
||||
|
||||
for EventUnitID, EventUnit in pairs( EventTemplate.units ) do
|
||||
OnEventFunction( self, EventUnit.name, EventFunction, EventSelf )
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_X event independent from a unit or a weapon.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @param EventID
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventGeneric( EventFunction, EventSelf, EventID )
|
||||
self:F2( { EventID } )
|
||||
|
||||
local Event = self:Init( EventID, EventSelf:GetClassNameAndID() )
|
||||
Event.EventFunction = EventFunction
|
||||
Event.EventSelf = EventSelf
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set a new listener for an S_EVENT_X event
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @param EventID
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, EventID )
|
||||
self:F2( EventDCSUnitName )
|
||||
|
||||
local Event = self:Init( EventID, EventSelf:GetClassNameAndID() )
|
||||
if not Event.IniUnit then
|
||||
Event.IniUnit = {}
|
||||
end
|
||||
Event.IniUnit[EventDCSUnitName] = {}
|
||||
Event.IniUnit[EventDCSUnitName].EventFunction = EventFunction
|
||||
Event.IniUnit[EventDCSUnitName].EventSelf = EventSelf
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Create an OnBirth event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirthForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnBirthForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_BIRTH event, and registers the unit born.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirth( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_BIRTH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_BIRTH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName The id of the unit for the event to be handled.
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnBirthForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_BIRTH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnCrash event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrashForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnCrashForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_CRASH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrash( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_CRASH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_CRASH event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnCrashForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_CRASH )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param Group#GROUP EventGroup
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDeadForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnDeadForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDead( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set a new listener for an S_EVENT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnDeadForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_PILOT_DEAD event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnPilotDeadForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_PILOT_DEAD )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnLandForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnLandForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_LAND event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnLandForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_LAND )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnTakeOffForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnTakeOffForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_TAKEOFF event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnTakeOffForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_TAKEOFF )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Create an OnDead event handler for a group
|
||||
-- @param #EVENT self
|
||||
-- @param #table EventTemplate
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineShutDownForTemplate( EventTemplate, EventFunction, EventSelf )
|
||||
self:F( EventTemplate.name )
|
||||
|
||||
self:OnEventForTemplate( EventTemplate, EventFunction, EventSelf, self.OnEngineShutDownForUnit )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_ENGINE_SHUTDOWN event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineShutDownForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_ENGINE_SHUTDOWN )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_ENGINE_STARTUP event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnEngineStartUpForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_ENGINE_STARTUP )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_SHOT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnShot( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_SHOT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_SHOT event for a unit.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnShotForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_SHOT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_HIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnHit( EventFunction, EventSelf )
|
||||
self:F()
|
||||
|
||||
self:OnEventGeneric( EventFunction, EventSelf, world.event.S_EVENT_HIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a new listener for an S_EVENT_HIT event.
|
||||
-- @param #EVENT self
|
||||
-- @param #string EventDCSUnitName
|
||||
-- @param #function EventFunction The function to be called when the event occurs for the unit.
|
||||
-- @param Base#BASE EventSelf The self instance of the class for which the event is.
|
||||
-- @return #EVENT
|
||||
function EVENT:OnHitForUnit( EventDCSUnitName, EventFunction, EventSelf )
|
||||
self:F( EventDCSUnitName )
|
||||
|
||||
self:OnEventForUnit( EventDCSUnitName, EventFunction, EventSelf, world.event.S_EVENT_HIT )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
function EVENT:onEvent( Event )
|
||||
self:F( { _EVENTCODES[Event.id], Event } )
|
||||
|
||||
if self and self.Events and self.Events[Event.id] then
|
||||
if Event.initiator and Event.initiator:getCategory() == Object.Category.UNIT then
|
||||
Event.IniDCSUnit = Event.initiator
|
||||
Event.IniDCSGroup = Event.IniDCSUnit:getGroup()
|
||||
Event.IniDCSUnitName = Event.IniDCSUnit:getName()
|
||||
Event.IniDCSGroupName = ""
|
||||
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
|
||||
Event.IniDCSGroupName = Event.IniDCSGroup:getName()
|
||||
end
|
||||
end
|
||||
if Event.target then
|
||||
if Event.target and Event.target:getCategory() == Object.Category.UNIT then
|
||||
Event.TgtDCSUnit = Event.target
|
||||
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
|
||||
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
|
||||
Event.TgtDCSGroupName = ""
|
||||
if Event.TgtDCSGroup and Event.TgtDCSGroup:isExist() then
|
||||
Event.TgtDCSGroupName = Event.TgtDCSGroup:getName()
|
||||
end
|
||||
end
|
||||
end
|
||||
if Event.weapon then
|
||||
Event.Weapon = Event.weapon
|
||||
Event.WeaponName = Event.Weapon:getTypeName()
|
||||
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
|
||||
end
|
||||
for ClassName, EventData in pairs( self.Events[Event.id] ) do
|
||||
if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then
|
||||
self:T2( { "Calling event function for class ", ClassName, " unit ", Event.IniDCSUnitName } )
|
||||
EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventSelf, Event )
|
||||
else
|
||||
if Event.IniDCSUnit and not EventData.IniUnit then
|
||||
self:T2( { "Calling event function for class ", ClassName } )
|
||||
EventData.EventFunction( EventData.EventSelf, Event )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -999,7 +999,7 @@ end
|
||||
function GROUP:GetTaskMission()
|
||||
self:F( self.GroupName )
|
||||
|
||||
return routines.utils.deepCopy( _Database.Groups[self.GroupName].Template )
|
||||
return routines.utils.deepCopy( _DATABASE.Groups[self.GroupName].Template )
|
||||
end
|
||||
|
||||
--- Return the mission route of the group.
|
||||
@@ -1008,7 +1008,7 @@ end
|
||||
function GROUP:GetTaskRoute()
|
||||
self:F( self.GroupName )
|
||||
|
||||
return routines.utils.deepCopy( _Database.Groups[self.GroupName].Template.route.points )
|
||||
return routines.utils.deepCopy( _DATABASE.Groups[self.GroupName].Template.route.points )
|
||||
end
|
||||
|
||||
--- Return the route of a group by using the @{Database#DATABASE} class.
|
||||
@@ -1032,7 +1032,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
||||
|
||||
self:T( { GroupName } )
|
||||
|
||||
local Template = _Database.Groups[GroupName].Template
|
||||
local Template = _DATABASE.Groups[GroupName].Template
|
||||
|
||||
if Template then
|
||||
if not Begin then
|
||||
|
||||
@@ -474,7 +474,7 @@ function MISSIONSCHEDULER.Scheduler()
|
||||
if Mission.GoalFunction ~= nil then
|
||||
Mission.GoalFunction( Mission, Client )
|
||||
end
|
||||
_Database:_AddMissionTaskScore( Client:GetClientGroupDCSUnit(), Mission.Name, 25 )
|
||||
_DATABASE:_AddMissionTaskScore( Client:GetClientGroupDCSUnit(), Mission.Name, 25 )
|
||||
|
||||
-- if not Mission:IsCompleted() then
|
||||
-- end
|
||||
@@ -497,7 +497,9 @@ function MISSIONSCHEDULER.Scheduler()
|
||||
|
||||
if MissionComplete then
|
||||
Mission:Completed()
|
||||
_Database:_AddMissionScore( Mission.Name, 100 )
|
||||
if MISSIONSCHEDULER.Scoring then
|
||||
MISSIONSCHEDULER.Scoring:_AddMissionScore( Mission.Name, 100 )
|
||||
end
|
||||
else
|
||||
if TaskComplete then
|
||||
-- Reset for new tasking of active client
|
||||
@@ -661,3 +663,9 @@ function MISSIONSCHEDULER:Time( TimeSeconds, TimeIntervalShow, TimeShow )
|
||||
self.TimeShow = TimeShow
|
||||
end
|
||||
|
||||
--- Adds a mission scoring to the game.
|
||||
function MISSIONSCHEDULER:Scoring( Scoring )
|
||||
|
||||
self.Scoring = Scoring
|
||||
end
|
||||
|
||||
|
||||
15
Moose/Moose.lua
Normal file
15
Moose/Moose.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
--- The main include file for the MOOSE system.
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Database" )
|
||||
Include.File( "Event" )
|
||||
|
||||
-- The order of the declarations is important here. Don't touch it.
|
||||
|
||||
--- Declare the event dispatcher based on the EVENT class
|
||||
_EVENTDISPATCHER = EVENT:New() -- #EVENT
|
||||
|
||||
--- Declare the main database object, which is used internally by the MOOSE classes.
|
||||
_DATABASE = DATABASE:New():ScanEnvironment() -- Database#DATABASE
|
||||
|
||||
@@ -35,11 +35,11 @@ function MOVEMENT:New( MovePrefixes, MoveMaximum )
|
||||
self.AliveUnits = 0 -- Contains the counter how many units are currently alive
|
||||
self.MoveUnits = {} -- Reflects if the Moving for this MovePrefixes is going to be scheduled or not.
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self.OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self.OnDeadOrCrash )
|
||||
_EVENTDISPATCHER:OnBirth( self.OnBirth, self )
|
||||
|
||||
self:EnableEvents()
|
||||
-- self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth )
|
||||
--
|
||||
-- self:EnableEvents()
|
||||
|
||||
self:ScheduleStart()
|
||||
|
||||
@@ -61,43 +61,39 @@ end
|
||||
|
||||
--- Captures the birth events when new Units were spawned.
|
||||
-- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration.
|
||||
function MOVEMENT:OnBirth( event )
|
||||
self:F( { event } )
|
||||
function MOVEMENT:OnBirth( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local MovementUnit = event.initiator
|
||||
local MovementUnitName = MovementUnit:getName()
|
||||
self:T( "Birth object : " .. MovementUnitName )
|
||||
local MovementGroup = MovementUnit:getGroup()
|
||||
if MovementGroup and MovementGroup:isExist() then
|
||||
local MovementGroupName = MovementGroup:getName()
|
||||
if Event.IniDCSUnit then
|
||||
self:T( "Birth object : " .. Event.IniDCSUnitName )
|
||||
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( MovementUnitName, MovePrefix, 1, true ) then
|
||||
if string.find( Event.IniDCSUnitName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits + 1
|
||||
self.MoveUnits[MovementUnitName] = MovementGroupName
|
||||
self.MoveUnits[Event.IniDCSUnitName] = Event.IniDCSGroupName
|
||||
self:T( self.AliveUnits )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
_EVENTDISPATCHER:OnCrashForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Captures the Dead or Crash events when Units crash or are destroyed.
|
||||
-- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration.
|
||||
function MOVEMENT:OnDeadOrCrash( event )
|
||||
self:F( { event } )
|
||||
function MOVEMENT:OnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||
local MovementUnit = event.initiator
|
||||
local MovementUnitName = MovementUnit:getName()
|
||||
self:T( "Dead object : " .. MovementUnitName )
|
||||
if Event.IniDCSUnit then
|
||||
self:T( "Dead object : " .. Event.IniDCSUnitName )
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( MovementUnitName, MovePrefix, 1, true ) then
|
||||
if string.find( Event.IniDCSUnitName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits - 1
|
||||
self.MoveUnits[MovementUnitName] = nil
|
||||
self.MoveUnits[Event.IniDCSUnitName] = nil
|
||||
self:T( self.AliveUnits )
|
||||
end
|
||||
end
|
||||
|
||||
@@ -449,14 +449,14 @@ end
|
||||
do
|
||||
-- THE MAIN FUNCTION -- Accessed 100 times/sec.
|
||||
routines.main = function()
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 0.1) --reschedule first in case of Lua error
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 2) --reschedule first in case of Lua error
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
--area to add new stuff in
|
||||
|
||||
routines.do_scheduled_functions()
|
||||
end -- end of routines.main
|
||||
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 0.1)
|
||||
timer.scheduleFunction(routines.main, {}, timer.getTime() + 2)
|
||||
|
||||
end
|
||||
|
||||
@@ -1696,7 +1696,7 @@ function routines.getGroupRoute(groupIdent, task) -- same as getGroupPoints bu
|
||||
-- refactor to search by groupId and allow groupId and groupName as inputs
|
||||
local gpId = groupIdent
|
||||
if type(groupIdent) == 'string' and not tonumber(groupIdent) then
|
||||
gpId = _Database.Groups[groupIdent].groupId
|
||||
gpId = _DATABASE.Groups[groupIdent].groupId
|
||||
end
|
||||
|
||||
for coa_name, coa_data in pairs(env.mission.coalition) do
|
||||
@@ -1746,6 +1746,7 @@ function routines.getGroupRoute(groupIdent, task) -- same as getGroupPoints bu
|
||||
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
|
||||
end --for coa_name, coa_data in pairs(mission.coalition) do
|
||||
end
|
||||
|
||||
routines.ground.patrolRoute = function(vars)
|
||||
|
||||
|
||||
|
||||
815
Moose/Scoring.lua
Normal file
815
Moose/Scoring.lua
Normal file
@@ -0,0 +1,815 @@
|
||||
--- Scoring system for MOOSE.
|
||||
-- This scoring class calculates the hits and kills that players make within a simulation session.
|
||||
-- Scoring is calculated using a defined algorithm.
|
||||
-- With a small change in MissionScripting.lua, the scoring can also be logged in a CSV file, that can then be uploaded
|
||||
-- to a database or a BI tool to publish the scoring results to the player community.
|
||||
-- @module Scoring
|
||||
-- @author FlightControl
|
||||
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Menu" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Event" )
|
||||
|
||||
|
||||
--- The Scoring class
|
||||
-- @type SCORING
|
||||
-- @field Players A collection of the current players that have joined the game.
|
||||
-- @extends Base#BASE
|
||||
SCORING = {
|
||||
ClassName = "SCORING",
|
||||
ClassID = 0,
|
||||
Players = {},
|
||||
}
|
||||
|
||||
local _SCORINGCoalition =
|
||||
{
|
||||
[1] = "Red",
|
||||
[2] = "Blue",
|
||||
}
|
||||
|
||||
local _SCORINGCategory =
|
||||
{
|
||||
[Unit.Category.AIRPLANE] = "Plane",
|
||||
[Unit.Category.HELICOPTER] = "Helicopter",
|
||||
[Unit.Category.GROUND_UNIT] = "Vehicle",
|
||||
[Unit.Category.SHIP] = "Ship",
|
||||
[Unit.Category.STRUCTURE] = "Structure",
|
||||
}
|
||||
|
||||
--- Creates a new SCORING object to administer the scoring achieved by players.
|
||||
-- @param #SCORING self
|
||||
-- @param #string GameName The name of the game. This name is also logged in the CSV score file.
|
||||
-- @return #SCORING self
|
||||
-- @usage
|
||||
-- -- Define a new scoring object for the mission Gori Valley.
|
||||
-- ScoringObject = SCORING:New( "Gori Valley" )
|
||||
function SCORING:New( GameName )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
if GameName then
|
||||
self.GameName = GameName
|
||||
else
|
||||
error( "A game name must be given to register the scoring results" )
|
||||
end
|
||||
|
||||
|
||||
_EVENTDISPATCHER:OnDead( self._EventOnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnCrash( self._EventOnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnHit( self._EventOnHit, self )
|
||||
|
||||
self.SchedulerId = routines.scheduleFunction( SCORING._FollowPlayersScheduled, { self }, 0, 5 )
|
||||
|
||||
self:ScoreMenu()
|
||||
|
||||
return self
|
||||
|
||||
end
|
||||
|
||||
--- Creates a score radio menu. Can be accessed using Radio -> F10.
|
||||
-- @param #SCORING self
|
||||
-- @return #SCORING self
|
||||
function SCORING:ScoreMenu()
|
||||
self.Menu = SUBMENU:New( 'Scoring' )
|
||||
self.AllScoresMenu = COMMANDMENU:New( 'Score All Active Players', self.Menu, SCORING.ReportScoreAll, self )
|
||||
--- = COMMANDMENU:New('Your Current Score', ReportScore, SCORING.ReportScorePlayer, self )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Follows new players entering Clients within the DCSRTE.
|
||||
-- TODO: Need to see if i can catch this also with an event. It will eliminate the schedule ...
|
||||
function SCORING:_FollowPlayersScheduled()
|
||||
self:F3( "_FollowPlayersScheduled" )
|
||||
|
||||
local ClientUnit = 0
|
||||
local CoalitionsData = { AlivePlayersRed = coalition.getPlayers(coalition.side.RED), AlivePlayersBlue = coalition.getPlayers(coalition.side.BLUE) }
|
||||
local unitId
|
||||
local unitData
|
||||
local AlivePlayerUnits = {}
|
||||
|
||||
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
|
||||
self:T3( { "_FollowPlayersScheduled", CoalitionData } )
|
||||
for UnitId, UnitData in pairs( CoalitionData ) do
|
||||
self:_AddPlayerFromUnit( UnitData )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Track DEAD or CRASH events for the scoring.
|
||||
-- @param #SCORING self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SCORING:_EventOnDeadOrCrash( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local TargetUnit = nil
|
||||
local TargetGroup = nil
|
||||
local TargetUnitName = ""
|
||||
local TargetGroupName = ""
|
||||
local TargetPlayerName = ""
|
||||
local TargetCoalition = nil
|
||||
local TargetCategory = nil
|
||||
local TargetType = nil
|
||||
local TargetUnitCoalition = nil
|
||||
local TargetUnitCategory = nil
|
||||
local TargetUnitType = nil
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
|
||||
TargetUnit = Event.IniDCSUnit
|
||||
TargetUnitName = Event.IniDCSUnitName
|
||||
TargetGroup = Event.IniDCSGroup
|
||||
TargetGroupName = Event.IniDCSGroupName
|
||||
TargetPlayerName = TargetUnit:getPlayerName()
|
||||
|
||||
TargetCoalition = TargetUnit:getCoalition()
|
||||
--TargetCategory = TargetUnit:getCategory()
|
||||
TargetCategory = TargetUnit:getDesc().category -- Workaround
|
||||
TargetType = TargetUnit:getTypeName()
|
||||
|
||||
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
||||
TargetUnitCategory = _SCORINGCategory[TargetCategory]
|
||||
TargetUnitType = TargetType
|
||||
|
||||
self:T( { TargetUnitName, TargetGroupName, TargetPlayerName, TargetCoalition, TargetCategory, TargetType } )
|
||||
end
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Something got killed" )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitCoalition = PlayerData.UnitCoalition
|
||||
local InitCategory = PlayerData.UnitCategory
|
||||
local InitUnitCoalition = _SCORINGCoalition[InitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[InitCategory]
|
||||
|
||||
self:T( { InitUnitName, InitUnitType, InitUnitCoalition, InitCoalition, InitUnitCategory, InitCategory } )
|
||||
|
||||
-- What is he hitting?
|
||||
if TargetCategory then
|
||||
if PlayerData and PlayerData.Hit and PlayerData.Hit[TargetCategory] and PlayerData.Hit[TargetCategory][TargetUnitName] then -- Was there a hit for this unit for this player before registered???
|
||||
if not PlayerData.Kill[TargetCategory] then
|
||||
PlayerData.Kill[TargetCategory] = {}
|
||||
end
|
||||
if not PlayerData.Kill[TargetCategory][TargetType] then
|
||||
PlayerData.Kill[TargetCategory][TargetType] = {}
|
||||
PlayerData.Kill[TargetCategory][TargetType].Score = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].Penalty = 0
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill = 0
|
||||
end
|
||||
|
||||
if InitCoalition == TargetCoalition then
|
||||
PlayerData.Penalty = PlayerData.Penalty + 25
|
||||
PlayerData.Kill[TargetCategory][TargetType].Penalty = PlayerData.Kill[TargetCategory][TargetType].Penalty + 25
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill = PlayerData.Kill[TargetCategory][TargetType].PenaltyKill + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill .. " times. Penalty: -" .. PlayerData.Kill[TargetCategory][TargetType].Penalty ..
|
||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||
"", 5, "/PENALTY" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "KILL_PENALTY", 1, -125, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
PlayerData.Score = PlayerData.Score + 10
|
||||
PlayerData.Kill[TargetCategory][TargetType].Score = PlayerData.Kill[TargetCategory][TargetType].Score + 10
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill = PlayerData.Kill[TargetCategory][TargetType].ScoreKill + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed an enemy " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill .. " times. Score: " .. PlayerData.Kill[TargetCategory][TargetType].Score ..
|
||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||
"", 5, "/SCORE" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "KILL_SCORE", 1, 10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Add a new player entering a Unit.
|
||||
function SCORING:_AddPlayerFromUnit( UnitData )
|
||||
self:F( UnitData )
|
||||
|
||||
if UnitData:isExist() then
|
||||
local UnitName = UnitData:getName()
|
||||
local PlayerName = UnitData:getPlayerName()
|
||||
local UnitDesc = UnitData:getDesc()
|
||||
local UnitCategory = UnitDesc.category
|
||||
local UnitCoalition = UnitData:getCoalition()
|
||||
local UnitTypeName = UnitData:getTypeName()
|
||||
|
||||
self:T( { PlayerName, UnitName, UnitCategory, UnitCoalition, UnitTypeName } )
|
||||
|
||||
if self.Players[PlayerName] == nil then -- I believe this is the place where a Player gets a life in a mission when he enters a unit ...
|
||||
self.Players[PlayerName] = {}
|
||||
self.Players[PlayerName].Hit = {}
|
||||
self.Players[PlayerName].Kill = {}
|
||||
self.Players[PlayerName].Mission = {}
|
||||
|
||||
-- for CategoryID, CategoryName in pairs( SCORINGCategory ) do
|
||||
-- self.Players[PlayerName].Hit[CategoryID] = {}
|
||||
-- self.Players[PlayerName].Kill[CategoryID] = {}
|
||||
-- end
|
||||
self.Players[PlayerName].HitPlayers = {}
|
||||
self.Players[PlayerName].HitUnits = {}
|
||||
self.Players[PlayerName].Score = 0
|
||||
self.Players[PlayerName].Penalty = 0
|
||||
self.Players[PlayerName].PenaltyCoalition = 0
|
||||
self.Players[PlayerName].PenaltyWarning = 0
|
||||
end
|
||||
|
||||
if not self.Players[PlayerName].UnitCoalition then
|
||||
self.Players[PlayerName].UnitCoalition = UnitCoalition
|
||||
else
|
||||
if self.Players[PlayerName].UnitCoalition ~= UnitCoalition then
|
||||
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50
|
||||
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
|
||||
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.",
|
||||
"",
|
||||
2,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
self:ScoreCSV( PlayerName, "COALITION_PENALTY", 1, -50, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
|
||||
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:getTypeName() )
|
||||
end
|
||||
end
|
||||
self.Players[PlayerName].UnitName = UnitName
|
||||
self.Players[PlayerName].UnitCoalition = UnitCoalition
|
||||
self.Players[PlayerName].UnitCategory = UnitCategory
|
||||
self.Players[PlayerName].UnitType = UnitTypeName
|
||||
|
||||
if self.Players[PlayerName].Penalty > 100 then
|
||||
if self.Players[PlayerName].PenaltyWarning < 1 then
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than 150, you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
|
||||
"",
|
||||
30,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1
|
||||
end
|
||||
end
|
||||
|
||||
if self.Players[PlayerName].Penalty > 150 then
|
||||
ClientGroup = GROUP:NewFromDCSUnit( UnitData )
|
||||
ClientGroup:Destroy()
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
||||
"",
|
||||
10,
|
||||
"/PENALTYCOALITION" .. PlayerName
|
||||
):ToAll()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Registers Scores the players completing a Mission Task.
|
||||
function SCORING:_AddMissionTaskScore( PlayerUnit, MissionName, Score )
|
||||
self:F( { PlayerUnit, MissionName, Score } )
|
||||
|
||||
local PlayerName = PlayerUnit:getPlayerName()
|
||||
|
||||
if not self.Players[PlayerName].Mission[MissionName] then
|
||||
self.Players[PlayerName].Mission[MissionName] = {}
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreTask = 0
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreMission = 0
|
||||
end
|
||||
|
||||
self:T( PlayerName )
|
||||
self:T( self.Players[PlayerName].Mission[MissionName] )
|
||||
|
||||
self.Players[PlayerName].Score = self.Players[PlayerName].Score + Score
|
||||
self.Players[PlayerName].Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
|
||||
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished another Task in Mission '" .. MissionName .. "'. " ..
|
||||
Score .. " Score points added.",
|
||||
"", 20, "/SCORETASK" .. PlayerName ):ToAll()
|
||||
|
||||
self:ScoreCSV( PlayerName, "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:getName() )
|
||||
end
|
||||
|
||||
|
||||
--- Registers Mission Scores for possible multiple players that contributed in the Mission.
|
||||
function SCORING:_AddMissionScore( MissionName, Score )
|
||||
self:F( { MissionName, Score } )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
|
||||
if PlayerData.Mission[MissionName] then
|
||||
PlayerData.Score = PlayerData.Score + Score
|
||||
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
|
||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished Mission '" .. MissionName .. "'. " ..
|
||||
Score .. " Score points added.",
|
||||
"", 20, "/SCOREMISSION" .. PlayerName ):ToAll()
|
||||
self:ScoreCSV( PlayerName, "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnHit event for the scoring.
|
||||
-- @param #SCORING self
|
||||
-- @param Event#EVENTDATA Event
|
||||
function SCORING:_EventOnHit( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local InitUnit = nil
|
||||
local InitUnitName = ""
|
||||
local InitGroup = nil
|
||||
local InitGroupName = ""
|
||||
local InitPlayerName = "dummy"
|
||||
|
||||
local InitCoalition = nil
|
||||
local InitCategory = nil
|
||||
local InitType = nil
|
||||
local InitUnitCoalition = nil
|
||||
local InitUnitCategory = nil
|
||||
local InitUnitType = nil
|
||||
|
||||
local TargetUnit = nil
|
||||
local TargetUnitName = ""
|
||||
local TargetGroup = nil
|
||||
local TargetGroupName = ""
|
||||
local TargetPlayerName = ""
|
||||
|
||||
local TargetCoalition = nil
|
||||
local TargetCategory = nil
|
||||
local TargetType = nil
|
||||
local TargetUnitCoalition = nil
|
||||
local TargetUnitCategory = nil
|
||||
local TargetUnitType = nil
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
|
||||
InitUnit = Event.IniDCSUnit
|
||||
InitUnitName = Event.IniDCSUnitName
|
||||
InitGroup = Event.IniDCSGroup
|
||||
InitGroupName = Event.IniDCSGroupName
|
||||
InitPlayerName = InitUnit:getPlayerName()
|
||||
|
||||
InitCoalition = InitUnit:getCoalition()
|
||||
--TODO: Workaround Client DCS Bug
|
||||
--InitCategory = InitUnit:getCategory()
|
||||
InitCategory = InitUnit:getDesc().category
|
||||
InitType = InitUnit:getTypeName()
|
||||
|
||||
InitUnitCoalition = _SCORINGCoalition[InitCoalition]
|
||||
InitUnitCategory = _SCORINGCategory[InitCategory]
|
||||
InitUnitType = InitType
|
||||
|
||||
self:T( { InitUnitName, InitGroupName, InitPlayerName, InitCoalition, InitCategory, InitType , InitUnitCoalition, InitUnitCategory, InitUnitType } )
|
||||
end
|
||||
|
||||
|
||||
if Event.TgtDCSUnit then
|
||||
|
||||
TargetUnit = Event.TgtDCSUnit
|
||||
TargetUnitName = Event.TgtDCSUnitName
|
||||
TargetGroup = Event.TgtDCSGroup
|
||||
TargetGroupName = Event.TgtDCSGroupName
|
||||
TargetPlayerName = TargetUnit:getPlayerName()
|
||||
|
||||
TargetCoalition = TargetUnit:getCoalition()
|
||||
--TODO: Workaround Client DCS Bug
|
||||
--TargetCategory = TargetUnit:getCategory()
|
||||
TargetCategory = TargetUnit:getDesc().category
|
||||
TargetType = TargetUnit:getTypeName()
|
||||
|
||||
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
||||
TargetUnitCategory = _SCORINGCategory[TargetCategory]
|
||||
TargetUnitType = TargetType
|
||||
|
||||
self:T( { TargetUnitName, TargetGroupName, TargetPlayerName, TargetCoalition, TargetCategory, TargetType, TargetUnitCoalition, TargetUnitCategory, TargetUnitType } )
|
||||
end
|
||||
|
||||
if InitPlayerName ~= nil then -- It is a player that is hitting something
|
||||
self:_AddPlayerFromUnit( InitUnit )
|
||||
if self.Players[InitPlayerName] then -- This should normally not happen, but i'll test it anyway.
|
||||
if TargetPlayerName ~= nil then -- It is a player hitting another player ...
|
||||
self:_AddPlayerFromUnit( TargetUnit )
|
||||
self.Players[InitPlayerName].HitPlayers = self.Players[InitPlayerName].HitPlayers + 1
|
||||
end
|
||||
|
||||
self:T( "Hitting Something" )
|
||||
-- What is he hitting?
|
||||
if TargetCategory then
|
||||
if not self.Players[InitPlayerName].Hit[TargetCategory] then
|
||||
self.Players[InitPlayerName].Hit[TargetCategory] = {}
|
||||
end
|
||||
if not self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName] then
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName] = {}
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit = 0
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit = 0
|
||||
end
|
||||
local Score = 0
|
||||
if InitCoalition == TargetCoalition then
|
||||
self.Players[InitPlayerName].Penalty = self.Players[InitPlayerName].Penalty + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit + 1
|
||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit .. " times. Penalty: -" .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty ..
|
||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||
"",
|
||||
2,
|
||||
"/PENALTY" .. InitPlayerName .. "/" .. InitUnitName
|
||||
):ToAll()
|
||||
self:ScoreCSV( InitPlayerName, "HIT_PENALTY", 1, -25, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
else
|
||||
self.Players[InitPlayerName].Score = self.Players[InitPlayerName].Score + 10
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score + 1
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit = self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit + 1
|
||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit .. " times. Score: " .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score ..
|
||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||
"",
|
||||
2,
|
||||
"/SCORE" .. InitPlayerName .. "/" .. InitUnitName
|
||||
):ToAll()
|
||||
self:ScoreCSV( InitPlayerName, "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif InitPlayerName == nil then -- It is an AI hitting a player???
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SCORING:ReportScoreAll()
|
||||
|
||||
env.info( "Hello World " )
|
||||
|
||||
local ScoreMessage = ""
|
||||
local PlayerMessage = ""
|
||||
|
||||
self:T( "Score Report" )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Score Player: " .. PlayerName )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitCoalition = _SCORINGCoalition[PlayerData.UnitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[PlayerData.UnitCategory]
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
|
||||
local PlayerScore = 0
|
||||
local PlayerPenalty = 0
|
||||
|
||||
ScoreMessage = ":\n"
|
||||
|
||||
local ScoreMessageHits = ""
|
||||
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( CategoryName )
|
||||
if PlayerData.Hit[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreHit = 0
|
||||
local Penalty = 0
|
||||
local PenaltyHit = 0
|
||||
self:T( "Hit scores exist for player " .. PlayerName )
|
||||
for UnitName, UnitData in pairs( PlayerData.Hit[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreHit = ScoreHit + UnitData.ScoreHit
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyHit = UnitData.PenaltyHit
|
||||
end
|
||||
local ScoreMessageHit = string.format( "%s:%d ", CategoryName, Score - Penalty )
|
||||
self:T( ScoreMessageHit )
|
||||
ScoreMessageHits = ScoreMessageHits .. ScoreMessageHit
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageHits = ScoreMessageHits .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageHits ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Hits: " .. ScoreMessageHits .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageKills = ""
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( "Kill scores exist for player " .. PlayerName )
|
||||
if PlayerData.Kill[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreKill = 0
|
||||
local Penalty = 0
|
||||
local PenaltyKill = 0
|
||||
|
||||
for UnitName, UnitData in pairs( PlayerData.Kill[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreKill = ScoreKill + UnitData.ScoreKill
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyKill = PenaltyKill + UnitData.PenaltyKill
|
||||
end
|
||||
|
||||
local ScoreMessageKill = string.format( " %s:%d ", CategoryName, Score - Penalty )
|
||||
self:T( ScoreMessageKill )
|
||||
ScoreMessageKills = ScoreMessageKills .. ScoreMessageKill
|
||||
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageKills = ScoreMessageKills .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageKills ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Kills: " .. ScoreMessageKills .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageCoalitionChangePenalties = ""
|
||||
if PlayerData.PenaltyCoalition ~= 0 then
|
||||
ScoreMessageCoalitionChangePenalties = ScoreMessageCoalitionChangePenalties .. string.format( " -%d (%d changed)", PlayerData.Penalty, PlayerData.PenaltyCoalition )
|
||||
PlayerPenalty = PlayerPenalty + PlayerData.Penalty
|
||||
end
|
||||
if ScoreMessageCoalitionChangePenalties ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Coalition Penalties: " .. ScoreMessageCoalitionChangePenalties .. "\n"
|
||||
end
|
||||
|
||||
local ScoreMessageMission = ""
|
||||
local ScoreMission = 0
|
||||
local ScoreTask = 0
|
||||
for MissionName, MissionData in pairs( PlayerData.Mission ) do
|
||||
ScoreMission = ScoreMission + MissionData.ScoreMission
|
||||
ScoreTask = ScoreTask + MissionData.ScoreTask
|
||||
ScoreMessageMission = ScoreMessageMission .. "'" .. MissionName .. "'; "
|
||||
end
|
||||
PlayerScore = PlayerScore + ScoreMission + ScoreTask
|
||||
|
||||
if ScoreMessageMission ~= "" then
|
||||
ScoreMessage = ScoreMessage .. " Tasks: " .. ScoreTask .. " Mission: " .. ScoreMission .. " ( " .. ScoreMessageMission .. ")\n"
|
||||
end
|
||||
|
||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score:%d (%d Score -%d Penalties)%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||
end
|
||||
end
|
||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
||||
end
|
||||
|
||||
|
||||
function SCORING:ReportScorePlayer()
|
||||
|
||||
env.info( "Hello World " )
|
||||
|
||||
local ScoreMessage = ""
|
||||
local PlayerMessage = ""
|
||||
|
||||
self:T( "Score Report" )
|
||||
|
||||
for PlayerName, PlayerData in pairs( self.Players ) do
|
||||
if PlayerData then -- This should normally not happen, but i'll test it anyway.
|
||||
self:T( "Score Player: " .. PlayerName )
|
||||
|
||||
-- Some variables
|
||||
local InitUnitCoalition = _SCORINGCoalition[PlayerData.UnitCoalition]
|
||||
local InitUnitCategory = _SCORINGCategory[PlayerData.UnitCategory]
|
||||
local InitUnitType = PlayerData.UnitType
|
||||
local InitUnitName = PlayerData.UnitName
|
||||
|
||||
local PlayerScore = 0
|
||||
local PlayerPenalty = 0
|
||||
|
||||
ScoreMessage = ""
|
||||
|
||||
local ScoreMessageHits = ""
|
||||
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( CategoryName )
|
||||
if PlayerData.Hit[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreHit = 0
|
||||
local Penalty = 0
|
||||
local PenaltyHit = 0
|
||||
self:T( "Hit scores exist for player " .. PlayerName )
|
||||
for UnitName, UnitData in pairs( PlayerData.Hit[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreHit = ScoreHit + UnitData.ScoreHit
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyHit = UnitData.PenaltyHit
|
||||
end
|
||||
local ScoreMessageHit = string.format( "\n %s = %d score(%d;-%d) hits(#%d;#-%d)", CategoryName, Score - Penalty, Score, Penalty, ScoreHit, PenaltyHit )
|
||||
self:T( ScoreMessageHit )
|
||||
ScoreMessageHits = ScoreMessageHits .. ScoreMessageHit
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageHits = ScoreMessageHits .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageHits ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Hits: " .. ScoreMessageHits .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageKills = ""
|
||||
for CategoryID, CategoryName in pairs( _SCORINGCategory ) do
|
||||
self:T( "Kill scores exist for player " .. PlayerName )
|
||||
if PlayerData.Kill[CategoryID] then
|
||||
local Score = 0
|
||||
local ScoreKill = 0
|
||||
local Penalty = 0
|
||||
local PenaltyKill = 0
|
||||
|
||||
for UnitName, UnitData in pairs( PlayerData.Kill[CategoryID] ) do
|
||||
Score = Score + UnitData.Score
|
||||
ScoreKill = ScoreKill + UnitData.ScoreKill
|
||||
Penalty = Penalty + UnitData.Penalty
|
||||
PenaltyKill = PenaltyKill + UnitData.PenaltyKill
|
||||
end
|
||||
|
||||
local ScoreMessageKill = string.format( "\n %s = %d score(%d;-%d) hits(#%d;#-%d)", CategoryName, Score - Penalty, Score, Penalty, ScoreKill, PenaltyKill )
|
||||
self:T( ScoreMessageKill )
|
||||
ScoreMessageKills = ScoreMessageKills .. ScoreMessageKill
|
||||
|
||||
PlayerScore = PlayerScore + Score
|
||||
PlayerPenalty = PlayerPenalty + Penalty
|
||||
else
|
||||
--ScoreMessageKills = ScoreMessageKills .. string.format( "%s:%d ", string.format(CategoryName, 1, 1), 0 )
|
||||
end
|
||||
end
|
||||
if ScoreMessageKills ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Kills: " .. ScoreMessageKills .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageCoalitionChangePenalties = ""
|
||||
if PlayerData.PenaltyCoalition ~= 0 then
|
||||
ScoreMessageCoalitionChangePenalties = ScoreMessageCoalitionChangePenalties .. string.format( " -%d (%d changed)", PlayerData.Penalty, PlayerData.PenaltyCoalition )
|
||||
PlayerPenalty = PlayerPenalty + PlayerData.Penalty
|
||||
end
|
||||
if ScoreMessageCoalitionChangePenalties ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Coalition: " .. ScoreMessageCoalitionChangePenalties .. " "
|
||||
end
|
||||
|
||||
local ScoreMessageMission = ""
|
||||
local ScoreMission = 0
|
||||
local ScoreTask = 0
|
||||
for MissionName, MissionData in pairs( PlayerData.Mission ) do
|
||||
ScoreMission = ScoreMission + MissionData.ScoreMission
|
||||
ScoreTask = ScoreTask + MissionData.ScoreTask
|
||||
ScoreMessageMission = ScoreMessageMission .. "'" .. MissionName .. "'; "
|
||||
end
|
||||
PlayerScore = PlayerScore + ScoreMission + ScoreTask
|
||||
|
||||
if ScoreMessageMission ~= "" then
|
||||
ScoreMessage = ScoreMessage .. "\n Tasks: " .. ScoreTask .. " Mission: " .. ScoreMission .. " ( " .. ScoreMessageMission .. ") "
|
||||
end
|
||||
|
||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score = %d ( %d Score, -%d Penalties ):%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||
end
|
||||
end
|
||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
||||
|
||||
end
|
||||
|
||||
|
||||
function SCORING:SecondsToClock(sSeconds)
|
||||
local nSeconds = sSeconds
|
||||
if nSeconds == 0 then
|
||||
--return nil;
|
||||
return "00:00:00";
|
||||
else
|
||||
nHours = string.format("%02.f", math.floor(nSeconds/3600));
|
||||
nMins = string.format("%02.f", math.floor(nSeconds/60 - (nHours*60)));
|
||||
nSecs = string.format("%02.f", math.floor(nSeconds - nHours*3600 - nMins *60));
|
||||
return nHours..":"..nMins..":"..nSecs
|
||||
end
|
||||
end
|
||||
|
||||
--- Opens a score CSV file to log the scores.
|
||||
-- @param #SCORING self
|
||||
-- @param #string ScoringCSV
|
||||
-- @return #SCORING self
|
||||
-- @usage
|
||||
-- -- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
|
||||
-- ScoringObject = SCORING:New( "Gori Valley" )
|
||||
-- ScoringObject:OpenCSV( "Player Scores" )
|
||||
function SCORING:OpenCSV( ScoringCSV )
|
||||
self:F( ScoringCSV )
|
||||
|
||||
if lfs and io and os then
|
||||
if ScoringCSV then
|
||||
self.ScoringCSV = ScoringCSV
|
||||
local fdir = lfs.writedir() .. [[Logs\]] .. self.ScoringCSV .. " " .. os.date( "%Y-%m-%d %H-%M-%S" ) .. ".csv"
|
||||
|
||||
self.CSVFile, self.err = io.open( fdir, "w+" )
|
||||
if not self.CSVFile then
|
||||
error( "Error: Cannot open CSV file in " .. lfs.writedir() )
|
||||
end
|
||||
|
||||
self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
|
||||
|
||||
self.RunTime = os.date("%y-%m-%d_%H-%M-%S")
|
||||
else
|
||||
error( "A string containing the CSV file name must be given." )
|
||||
end
|
||||
else
|
||||
self:E( "The MissionScripting.lua file has not been changed to allow lfs, io and os modules to be used..." )
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Registers a score for a player.
|
||||
-- @param #SCORING self
|
||||
-- @param #string PlayerName The name of the player.
|
||||
-- @param #string ScoreType The type of the score.
|
||||
-- @param #string ScoreTimes The amount of scores achieved.
|
||||
-- @param #string ScoreAmount The score given.
|
||||
-- @param #string PlayerUnitName The unit name of the player.
|
||||
-- @param #string PlayerUnitCoalition The coalition of the player unit.
|
||||
-- @param #string PlayerUnitCategory The category of the player unit.
|
||||
-- @param #string PlayerUnitType The type of the player unit.
|
||||
-- @param #string TargetUnitName The name of the target unit.
|
||||
-- @param #string TargetUnitCoalition The coalition of the target unit.
|
||||
-- @param #string TargetUnitCategory The category of the target unit.
|
||||
-- @param #string TargetUnitType The type of the target unit.
|
||||
-- @return #SCORING self
|
||||
function SCORING:ScoreCSV( PlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||
--write statistic information to file
|
||||
local ScoreTime = self:SecondsToClock( timer.getTime() )
|
||||
PlayerName = PlayerName:gsub( '"', '_' )
|
||||
|
||||
if PlayerUnitName and PlayerUnitName ~= '' then
|
||||
local PlayerUnit = Unit.getByName( PlayerUnitName )
|
||||
|
||||
if PlayerUnit then
|
||||
if not PlayerUnitCategory then
|
||||
--PlayerUnitCategory = SCORINGCategory[PlayerUnit:getCategory()]
|
||||
PlayerUnitCategory = _SCORINGCategory[PlayerUnit:getDesc().category]
|
||||
end
|
||||
|
||||
if not PlayerUnitCoalition then
|
||||
PlayerUnitCoalition = _SCORINGCoalition[PlayerUnit:getCoalition()]
|
||||
end
|
||||
|
||||
if not PlayerUnitType then
|
||||
PlayerUnitType = PlayerUnit:getTypeName()
|
||||
end
|
||||
else
|
||||
PlayerUnitName = ''
|
||||
PlayerUnitCategory = ''
|
||||
PlayerUnitCoalition = ''
|
||||
PlayerUnitType = ''
|
||||
end
|
||||
else
|
||||
PlayerUnitName = ''
|
||||
PlayerUnitCategory = ''
|
||||
PlayerUnitCoalition = ''
|
||||
PlayerUnitType = ''
|
||||
end
|
||||
|
||||
if not TargetUnitCoalition then
|
||||
TargetUnitCoalition = ''
|
||||
end
|
||||
|
||||
if not TargetUnitCategory then
|
||||
TargetUnitCategory = ''
|
||||
end
|
||||
|
||||
if not TargetUnitType then
|
||||
TargetUnitType = ''
|
||||
end
|
||||
|
||||
if not TargetUnitName then
|
||||
TargetUnitName = ''
|
||||
end
|
||||
|
||||
if lfs and io and os then
|
||||
self.CSVFile:write(
|
||||
'"' .. self.GameName .. '"' .. ',' ..
|
||||
'"' .. self.RunTime .. '"' .. ',' ..
|
||||
'' .. ScoreTime .. '' .. ',' ..
|
||||
'"' .. PlayerName .. '"' .. ',' ..
|
||||
'"' .. ScoreType .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitCoalition .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitCategory .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitType .. '"' .. ',' ..
|
||||
'"' .. PlayerUnitName .. '"' .. ',' ..
|
||||
'"' .. TargetUnitCoalition .. '"' .. ',' ..
|
||||
'"' .. TargetUnitCategory .. '"' .. ',' ..
|
||||
'"' .. TargetUnitType .. '"' .. ',' ..
|
||||
'"' .. TargetUnitName .. '"' .. ',' ..
|
||||
'' .. ScoreTimes .. '' .. ',' ..
|
||||
'' .. ScoreAmount
|
||||
)
|
||||
|
||||
self.CSVFile:write( "\n" )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SCORING:CloseCSV()
|
||||
if lfs and io and os then
|
||||
self.CSVFile:close()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
-- @author (co) Flightcontrol (Modified and enriched with functionality)
|
||||
|
||||
Include.File( "Routines" )
|
||||
Include.File( "Event" )
|
||||
Include.File( "Base" )
|
||||
Include.File( "Mission" )
|
||||
Include.File( "Client" )
|
||||
@@ -42,32 +43,31 @@ function SEAD:New( SEADGroupPrefixes )
|
||||
else
|
||||
self.SEADGroupNames[SEADGroupPrefixes] = SEADGroupPrefixes
|
||||
end
|
||||
self:AddEvent( world.event.S_EVENT_SHOT, self.EventShot )
|
||||
self:EnableEvents()
|
||||
_EVENTDISPATCHER:OnShot( self.EventShot, self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME.
|
||||
-- @see SEAD
|
||||
function SEAD:EventShot( event )
|
||||
self:F( { event } )
|
||||
function SEAD:EventShot( Event )
|
||||
self:F( { Event } )
|
||||
|
||||
local SEADUnit = event.initiator
|
||||
local SEADUnitName = SEADUnit:getName()
|
||||
local SEADWeapon = event.weapon -- Identify the weapon fired
|
||||
local SEADWeaponName = SEADWeapon:getTypeName() -- return weapon type
|
||||
local SEADUnit = Event.IniDCSUnit
|
||||
local SEADUnitName = Event.IniDCSUnitName
|
||||
local SEADWeapon = Event.Weapon -- Identify the weapon fired
|
||||
local SEADWeaponName = Event.WeaponName -- return weapon type
|
||||
--trigger.action.outText( string.format("Alerte, depart missile " ..string.format(SEADWeaponName)), 20) --debug message
|
||||
-- Start of the 2nd loop
|
||||
self:T( "Missile Launched = " .. SEADWeaponName )
|
||||
if SEADWeaponName == "KH-58" or SEADWeaponName == "KH-25MPU" or SEADWeaponName == "AGM-88" or SEADWeaponName == "KH-31A" or SEADWeaponName == "KH-31P" then -- Check if the missile is a SEAD
|
||||
local _evade = math.random (1,100) -- random number for chance of evading action
|
||||
local _targetMim = Weapon.getTarget(SEADWeapon) -- Identify target
|
||||
local _targetMim = Event.Weapon:getTarget() -- Identify target
|
||||
local _targetMimname = Unit.getName(_targetMim)
|
||||
local _targetMimgroup = Unit.getGroup(Weapon.getTarget(SEADWeapon))
|
||||
local _targetMimgroupName = _targetMimgroup:getName()
|
||||
local _targetMimcont= _targetMimgroup:getController()
|
||||
local _targetskill = _Database.Units[_targetMimname].Template.skill
|
||||
local _targetskill = _DATABASE.Units[_targetMimname].Template.skill
|
||||
self:T( self.SEADGroupPrefixes )
|
||||
self:T( _targetMimgroupName )
|
||||
local SEADGroupFound = false
|
||||
|
||||
134
Moose/Spawn.lua
134
Moose/Spawn.lua
@@ -1,5 +1,8 @@
|
||||
--- Dynamic spawning of groups (and units).
|
||||
-- The SPAWN class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
--
|
||||
-- @{#SPAWN} class
|
||||
-- ===============
|
||||
-- The @{#SPAWN} class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned.
|
||||
-- For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the *"Spawn Template"* of the SPAWN object.
|
||||
-- A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods.
|
||||
--
|
||||
@@ -21,8 +24,8 @@
|
||||
-- * It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use.
|
||||
-- * When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore.
|
||||
--
|
||||
-- 1. SPAWN object construction methods:
|
||||
-- -------------------------------------
|
||||
-- SPAWN construction methods:
|
||||
-- ===========================
|
||||
-- Create a new SPAWN object with the @{#SPAWN.New} or the @{#SPAWN.NewWithAlias} methods:
|
||||
--
|
||||
-- * @{#SPAWN.New}: Creates a new SPAWN object taking the name of the group that functions as the Template.
|
||||
@@ -31,8 +34,8 @@
|
||||
-- The initialization functions will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
|
||||
-- So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.
|
||||
--
|
||||
-- 2. SPAWN object initialization methods:
|
||||
-- ---------------------------------------
|
||||
-- SPAWN initialization methods:
|
||||
-- =============================
|
||||
-- A spawn object will behave differently based on the usage of initialization methods:
|
||||
--
|
||||
-- * @{#SPAWN.Limit}: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
|
||||
@@ -42,8 +45,8 @@
|
||||
-- * @{#SPAWN.Array}: Make groups visible before they are actually activated, and order these groups like a batallion in an array.
|
||||
-- * @{#SPAWN.Repeat}: Re-spawn groups when they land at the home base. Similar functions are @{#SPAWN.RepeatOnLanding} and @{#SPAWN.RepeatOnEngineShutDown}.
|
||||
--
|
||||
-- 2. SPAWN object spawning methods:
|
||||
-- ---------------------------------
|
||||
-- SPAWN spawning methods:
|
||||
-- =======================
|
||||
-- Groups can be spawned at different times and methods:
|
||||
--
|
||||
-- * @{#SPAWN.Spawn}: Spawn one new group based on the last spawned index.
|
||||
@@ -55,8 +58,8 @@
|
||||
-- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object.
|
||||
-- You can use the @{GROUP} object to do further actions with the DCSGroup.
|
||||
--
|
||||
-- 3. SPAWN object cleaning:
|
||||
-- -------------------------
|
||||
-- SPAWN object cleaning:
|
||||
-- =========================
|
||||
-- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
|
||||
-- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
|
||||
-- and it may occur that no new groups are or can be spawned as limits are reached.
|
||||
@@ -67,6 +70,7 @@
|
||||
-- This models AI that has succesfully returned to their airbase, to restart their combat activities.
|
||||
-- Check the @{#SPAWN.CleanUp} for further info.
|
||||
--
|
||||
-- ====
|
||||
-- @module Spawn
|
||||
-- @author FlightControl
|
||||
|
||||
@@ -75,6 +79,7 @@ Include.File( "Base" )
|
||||
Include.File( "Database" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Zone" )
|
||||
Include.File( "Event" )
|
||||
|
||||
--- SPAWN Class
|
||||
-- @type SPAWN
|
||||
@@ -121,12 +126,6 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
else
|
||||
error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -165,12 +164,6 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
|
||||
end
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth )
|
||||
self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash )
|
||||
self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash )
|
||||
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -282,17 +275,12 @@ end
|
||||
-- -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically.
|
||||
-- SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()
|
||||
function SPAWN:Repeat()
|
||||
self:F( { self.SpawnTemplatePrefix } )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnIndex } )
|
||||
|
||||
self.SpawnRepeat = true
|
||||
self.RepeatOnEngineShutDown = false
|
||||
self.RepeatOnLanding = true
|
||||
|
||||
self:AddEvent( world.event.S_EVENT_LAND, self._OnLand )
|
||||
self:AddEvent( world.event.S_EVENT_TAKEOFF, self._OnTakeOff )
|
||||
self:AddEvent( world.event.S_EVENT_ENGINE_SHUTDOWN, self._OnEngineShutDown )
|
||||
self:EnableEvents()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -385,7 +373,22 @@ function SPAWN:Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY )
|
||||
self.SpawnGroups[SpawnGroupID].SpawnTemplate.visible = true
|
||||
|
||||
self.SpawnGroups[SpawnGroupID].Visible = true
|
||||
self.SpawnGroups[SpawnGroupID].Group = _Database:Spawn( self.SpawnGroups[SpawnGroupID].SpawnTemplate )
|
||||
|
||||
_EVENTDISPATCHER:OnBirthForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnBirth, self )
|
||||
_EVENTDISPATCHER:OnCrashForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
|
||||
if self.SpawnRepeat then
|
||||
_EVENTDISPATCHER:OnTakeOffForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnTakeOff, self )
|
||||
end
|
||||
if self.RepeatOnLanding then
|
||||
_EVENTDISPATCHER:OnLandForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnLand, self )
|
||||
end
|
||||
if self.RepeatOnEngineShutDown then
|
||||
_EVENTDISPATCHER:OnEngineShutDownForTemplate( self.SpawnGroups[SpawnGroupID].SpawnTemplate, self._OnEngineShutDown, self )
|
||||
end
|
||||
|
||||
self.SpawnGroups[SpawnGroupID].Group = _DATABASE:Spawn( self.SpawnGroups[SpawnGroupID].SpawnTemplate )
|
||||
|
||||
SpawnX = SpawnXIndex * SpawnDeltaX
|
||||
SpawnY = SpawnYIndex * SpawnDeltaY
|
||||
@@ -419,13 +422,13 @@ function SPAWN:ReSpawn( SpawnIndex )
|
||||
end
|
||||
|
||||
-- TODO: This logic makes DCS crash and i don't know why (yet).
|
||||
-- local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
|
||||
-- if SpawnGroup then
|
||||
-- local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
|
||||
-- if SpawnDCSGroup then
|
||||
-- SpawnGroup:Destroy()
|
||||
-- end
|
||||
-- end
|
||||
local SpawnGroup = self:GetGroupFromIndex( SpawnIndex )
|
||||
if SpawnGroup then
|
||||
local SpawnDCSGroup = SpawnGroup:GetDCSGroup()
|
||||
if SpawnDCSGroup then
|
||||
SpawnGroup:Destroy()
|
||||
end
|
||||
end
|
||||
|
||||
return self:SpawnWithIndex( SpawnIndex )
|
||||
end
|
||||
@@ -443,7 +446,21 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
self.SpawnGroups[self.SpawnIndex].Group:Activate()
|
||||
else
|
||||
self:T( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _Database:Spawn( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
_EVENTDISPATCHER:OnBirthForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnBirth, self )
|
||||
_EVENTDISPATCHER:OnCrashForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
_EVENTDISPATCHER:OnDeadForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnDeadOrCrash, self )
|
||||
|
||||
if self.SpawnRepeat then
|
||||
_EVENTDISPATCHER:OnTakeOffForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnTakeOff, self )
|
||||
end
|
||||
if self.RepeatOnLanding then
|
||||
_EVENTDISPATCHER:OnLandForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnLand, self )
|
||||
end
|
||||
if self.RepeatOnEngineShutDown then
|
||||
_EVENTDISPATCHER:OnEngineShutDownForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnEngineShutDown, self )
|
||||
end
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
if self.SpawnFunctionHook then
|
||||
@@ -451,14 +468,14 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
end
|
||||
-- TODO: Need to fix this by putting an "R" in the name of the group when the group repeats.
|
||||
--if self.SpawnRepeat then
|
||||
-- _Database:SetStatusGroup( SpawnTemplate.name, "ReSpawn" )
|
||||
-- _DATABASE:SetStatusGroup( SpawnTemplate.name, "ReSpawn" )
|
||||
--end
|
||||
end
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Spawned = true
|
||||
return self.SpawnGroups[self.SpawnIndex].Group
|
||||
else
|
||||
self:E( { self.SpawnTemplatePrefix, "No more Groups to Spawn:", SpawnIndex, self.SpawnMaxGroups } )
|
||||
--self:E( { self.SpawnTemplatePrefix, "No more Groups to Spawn:", SpawnIndex, self.SpawnMaxGroups } )
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -625,14 +642,17 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Will spawn a Group within a given @{ZONE}.
|
||||
--- Will spawn a Group within a given @{Zone#ZONE}.
|
||||
-- Once the group is spawned within the zone, it will continue on its route.
|
||||
-- The first waypoint (where the group is spawned) is replaced with the zone coordinates.
|
||||
-- @param #SPAWN self
|
||||
-- @param #ZONE Zone The zone where the group is to be spawned.
|
||||
-- @param Zone#ZONE Zone The zone where the group is to be spawned.
|
||||
-- @param #number ZoneRandomize (Optional) Set to true if you want to randomize the starting point in the zone.
|
||||
-- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone.
|
||||
-- @return Group#GROUP that was spawned.
|
||||
-- @return #nil when nothing was spawned.
|
||||
function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } )
|
||||
function SPAWN:SpawnInZone( Zone, ZoneRandomize, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, ZoneRandomize, SpawnIndex } )
|
||||
|
||||
if Zone then
|
||||
|
||||
@@ -647,11 +667,14 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
||||
|
||||
if SpawnTemplate then
|
||||
|
||||
local ZonePoint = Zone:GetPointVec2()
|
||||
local ZonePoint
|
||||
|
||||
if ZoneRandomize == true then
|
||||
ZonePoint = Zone:GetRandomPointVec2()
|
||||
else
|
||||
ZonePoint = Zone:GetPointVec2()
|
||||
end
|
||||
|
||||
SpawnTemplate.route.points = nil
|
||||
SpawnTemplate.route.points = {}
|
||||
SpawnTemplate.route.points[1] = {}
|
||||
SpawnTemplate.route.points[1].x = ZonePoint.x
|
||||
SpawnTemplate.route.points[1].y = ZonePoint.y
|
||||
|
||||
@@ -661,17 +684,7 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex )
|
||||
SpawnTemplate.units[UnitID].y = ZonePoint.y
|
||||
self:T( 'SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
|
||||
end
|
||||
|
||||
local SpawnPos = Zone:GetRandomPointVec2()
|
||||
local Point = {}
|
||||
Point.type = "Turning Point"
|
||||
Point.x = SpawnPos.x
|
||||
Point.y = SpawnPos.y
|
||||
Point.action = "Cone"
|
||||
Point.speed = 5
|
||||
|
||||
table.insert( SpawnTemplate.route.points, 2, Point )
|
||||
|
||||
|
||||
return self:SpawnWithIndex( self.SpawnIndex )
|
||||
end
|
||||
end
|
||||
@@ -682,6 +695,7 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Will spawn a plane group in uncontrolled mode...
|
||||
-- This will be similar to the uncontrolled flag setting in the ME.
|
||||
-- @return #SPAWN self
|
||||
@@ -955,7 +969,7 @@ function SPAWN:_GetTemplate( SpawnTemplatePrefix )
|
||||
|
||||
local SpawnTemplate = nil
|
||||
|
||||
SpawnTemplate = routines.utils.deepCopy( _Database.Groups[SpawnTemplatePrefix].Template )
|
||||
SpawnTemplate = routines.utils.deepCopy( _DATABASE.Groups[SpawnTemplatePrefix].Template )
|
||||
|
||||
if SpawnTemplate == nil then
|
||||
error( 'No Template returned for SpawnTemplatePrefix = ' .. SpawnTemplatePrefix )
|
||||
@@ -1112,7 +1126,7 @@ function SPAWN:_GetSpawnIndex( SpawnIndex )
|
||||
end
|
||||
|
||||
|
||||
-- TODO Need to delete this... _Database does this now ...
|
||||
-- TODO Need to delete this... _DATABASE does this now ...
|
||||
function SPAWN:_OnBirth( event )
|
||||
|
||||
if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line
|
||||
@@ -1130,7 +1144,7 @@ function SPAWN:_OnBirth( event )
|
||||
end
|
||||
|
||||
--- Obscolete
|
||||
-- @todo Need to delete this... _Database does this now ...
|
||||
-- @todo Need to delete this... _DATABASE does this now ...
|
||||
function SPAWN:_OnDeadOrCrash( event )
|
||||
self:F( self.SpawnTemplatePrefix, event )
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ end
|
||||
--- Get progress of a TASK.
|
||||
-- @return string GoalsText
|
||||
function TASK:GetGoalProgress()
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local GoalsText = ""
|
||||
for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do
|
||||
@@ -115,7 +115,7 @@ end
|
||||
-- @param MISSION Mission Group structure describing the Mission.
|
||||
-- @param CLIENT Client Group structure describing the Client.
|
||||
function TASK:ShowGoalProgress( Mission, Client )
|
||||
self:F()
|
||||
self:F2()
|
||||
|
||||
local GoalsText = ""
|
||||
for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do
|
||||
@@ -137,14 +137,14 @@ end
|
||||
|
||||
--- Sets a TASK to status Done.
|
||||
function TASK:Done()
|
||||
self:F()
|
||||
self:F2()
|
||||
self.TaskDone = true
|
||||
end
|
||||
|
||||
--- Returns if a TASK is done.
|
||||
-- @return bool
|
||||
function TASK:IsDone()
|
||||
self:F( self.TaskDone )
|
||||
self:F2( self.TaskDone )
|
||||
return self.TaskDone
|
||||
end
|
||||
|
||||
@@ -157,12 +157,12 @@ end
|
||||
--- Returns if a TASk has failed.
|
||||
-- @return bool
|
||||
function TASK:IsFailed()
|
||||
self:F( self.TaskFailed )
|
||||
self:F2( self.TaskFailed )
|
||||
return self.TaskFailed
|
||||
end
|
||||
|
||||
function TASK:Reset( Mission, Client )
|
||||
self:F()
|
||||
self:F2()
|
||||
self.ExecuteStage = _TransportExecuteStage.NONE
|
||||
end
|
||||
|
||||
@@ -173,13 +173,15 @@ function TASK:GetGoals()
|
||||
end
|
||||
|
||||
--- Returns if a TASK has Goal(s).
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @param #TASK self
|
||||
-- @param #string GoalVerb is the name of the Goal of the TASK.
|
||||
-- @return bool
|
||||
function TASK:Goal( GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
self:T2( {self.GoalTasks[GoalVerb] } )
|
||||
if self.GoalTasks[GoalVerb] and self.GoalTasks[GoalVerb].GoalTotal > 0 then
|
||||
return true
|
||||
else
|
||||
@@ -191,7 +193,7 @@ end
|
||||
-- @param number GoalTotal is the number of times the GoalVerb needs to be achieved.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:SetGoalTotal( GoalTotal, GoalVerb )
|
||||
self:F( { GoalTotal, GoalVerb } )
|
||||
self:F2( { GoalTotal, GoalVerb } )
|
||||
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
@@ -206,7 +208,7 @@ end
|
||||
--- Gets the total of Goals to be achieved within the TASK of the GoalVerb.
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
function TASK:GetGoalTotal( GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -222,7 +224,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:SetGoalCount( GoalCount, GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -237,7 +239,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:IncreaseGoalCount( GoalCountIncrease, GoalVerb )
|
||||
self:F()
|
||||
self:F2( { GoalCountIncrease, GoalVerb } )
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -251,7 +253,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalCount( GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -266,7 +268,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return TASK
|
||||
function TASK:GetGoalPercentage( GoalVerb )
|
||||
self:F()
|
||||
self:F2()
|
||||
if not GoalVerb then
|
||||
GoalVerb = self.GoalVerb
|
||||
end
|
||||
@@ -279,15 +281,16 @@ end
|
||||
|
||||
--- Returns if all the Goals of the TASK were achieved.
|
||||
-- @return bool
|
||||
function TASK:IsGoalReached( )
|
||||
function TASK:IsGoalReached()
|
||||
self:F2()
|
||||
|
||||
local GoalReached = true
|
||||
|
||||
for GoalVerb, Goals in pairs( self.GoalTasks ) do
|
||||
self:T( { "GoalVerb", GoalVerb } )
|
||||
self:T2( { "GoalVerb", GoalVerb } )
|
||||
if self:Goal( GoalVerb ) then
|
||||
local GoalToDo = self:GetGoalTotal( GoalVerb ) - self:GetGoalCount( GoalVerb )
|
||||
self:T( "GoalToDo = " .. GoalToDo )
|
||||
self:T2( "GoalToDo = " .. GoalToDo )
|
||||
if GoalToDo <= 0 then
|
||||
else
|
||||
GoalReached = false
|
||||
@@ -298,7 +301,7 @@ function TASK:IsGoalReached( )
|
||||
end
|
||||
end
|
||||
|
||||
self:T( GoalReached )
|
||||
self:T( { GoalReached, self.GoalTasks } )
|
||||
return GoalReached
|
||||
end
|
||||
|
||||
@@ -307,7 +310,7 @@ end
|
||||
-- @param string GoalTask is a text describing the Goal of the TASK to be achieved.
|
||||
-- @param number GoalIncrease is a number by which the Goal achievement is increasing.
|
||||
function TASK:AddGoalCompletion( GoalVerb, GoalTask, GoalIncrease )
|
||||
self:F( { GoalVerb, GoalTask, GoalIncrease } )
|
||||
self:F2( { GoalVerb, GoalTask, GoalIncrease } )
|
||||
|
||||
if self:Goal( GoalVerb ) then
|
||||
self.GoalTasks[GoalVerb].Goals[#self.GoalTasks[GoalVerb].Goals+1] = GoalTask
|
||||
@@ -320,7 +323,7 @@ end
|
||||
-- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used.
|
||||
-- @return string Goals
|
||||
function TASK:GetGoalCompletion( GoalVerb )
|
||||
self:F( { GoalVerb } )
|
||||
self:F2( { GoalVerb } )
|
||||
|
||||
if self:Goal( GoalVerb ) then
|
||||
local Goals = ""
|
||||
|
||||
@@ -46,9 +46,10 @@ function ZONE:GetRandomPointVec2()
|
||||
local Point = {}
|
||||
|
||||
local Zone = trigger.misc.getZone( self.ZoneName )
|
||||
|
||||
Point.x = Zone.point.x + math.random( Zone.radius * -1, Zone.radius )
|
||||
Point.y = Zone.point.z + math.random( Zone.radius * -1, Zone.radius )
|
||||
|
||||
local angle = math.random() * math.pi*2;
|
||||
Point.x = Zone.point.x + math.cos( angle ) * math.random() * Zone.radius;
|
||||
Point.y = Zone.point.z + math.sin( angle ) * math.random() * Zone.radius;
|
||||
|
||||
self:T( { Zone, Point } )
|
||||
|
||||
|
||||
10
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.lua
Normal file
10
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
Include.File( 'Cleanup' )
|
||||
Include.File( 'Spawn' )
|
||||
Include.File( 'Event')
|
||||
|
||||
Clean = CLEANUP:New( 'CLEAN_BATUMI', 180 )
|
||||
|
||||
SpawnRU = SPAWN:New( 'RU Attack Heli Batumi'):Limit( 2, 20 ):SpawnScheduled( 2, 0.2 )
|
||||
|
||||
SpawnUS = SPAWN:New( 'US Attack Heli Batumi'):Limit( 2, 20 ):SpawnScheduled( 2, 0.2 )
|
||||
|
||||
BIN
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
Normal file
BIN
Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
Normal file
Binary file not shown.
74
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.lua
Normal file
74
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
Include.File( 'Database' )
|
||||
Include.File( 'Spawn' )
|
||||
|
||||
DBBluePlanes = DATABASE:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
DBRedVehicles = DATABASE:New()
|
||||
:FilterCoalitions( "red" )
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
DBShips = DATABASE:New()
|
||||
:FilterCategories( "ship" )
|
||||
:FilterStart()
|
||||
|
||||
DBBelgium = DATABASE:New()
|
||||
:FilterCategories( "helicopter" )
|
||||
:FilterCountries( "BELGIUM" )
|
||||
:FilterStart()
|
||||
|
||||
DBNorthKorea = DATABASE:New()
|
||||
:FilterCountries( "NORTH_KOREA" )
|
||||
:FilterStart()
|
||||
|
||||
DBKA50Vinson = DATABASE:New()
|
||||
:FilterTypes( { "Ka-50", "VINSON" } )
|
||||
:FilterStart()
|
||||
|
||||
DBBluePlanes:TraceDatabase()
|
||||
DBRedVehicles:TraceDatabase()
|
||||
DBShips:TraceDatabase()
|
||||
DBBelgium:TraceDatabase()
|
||||
DBNorthKorea:TraceDatabase()
|
||||
DBKA50Vinson:TraceDatabase()
|
||||
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Database Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Database Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Database Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Database Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Database Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnUS_AttackVehicle = SPAWN:New( 'Database Spawn Test USA Attack Vehicle' )
|
||||
SpawnRU_AttackVehicle = SPAWN:New( 'Database Spawn Test RUSSIA Attack Vehicle' )
|
||||
|
||||
for i = 1, 10 do
|
||||
GroupRU_AttackVehicle = SpawnRU_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone RU"), true)
|
||||
GroupUS_AttackVehicle = SpawnUS_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone US"), true)
|
||||
end
|
||||
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
routines.scheduleFunction( DBBluePlanes.TraceDatabase, { DBBluePlanes }, 1 )
|
||||
routines.scheduleFunction( DBRedVehicles.TraceDatabase, { DBRedVehicles }, 1 )
|
||||
routines.scheduleFunction( DBShips.TraceDatabase, { DBShips }, 1 )
|
||||
routines.scheduleFunction( DBBelgium.TraceDatabase, { DBBelgium }, 1 )
|
||||
routines.scheduleFunction( DBNorthKorea.TraceDatabase, { DBNorthKorea }, 1 )
|
||||
routines.scheduleFunction( DBKA50Vinson.TraceDatabase, { DBKA50Vinson }, 1 )
|
||||
|
||||
DBRedVehicles
|
||||
:ForEachAliveUnit( function( DCSUnit )
|
||||
DBRedVehicles:T( DCSUnit:getName() )
|
||||
end )
|
||||
BIN
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.miz
Normal file
BIN
Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.miz
Normal file
Binary file not shown.
BIN
Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
Normal file
BIN
Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
Normal file
Binary file not shown.
41
Test Missions/Moose_Test_DESTROY/Moose_Test_DESTROY.lua
Normal file
41
Test Missions/Moose_Test_DESTROY/Moose_Test_DESTROY.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- MOOSE include files.
|
||||
Include.File( "Mission" )
|
||||
Include.File( "Client" )
|
||||
Include.File( "DestroyGroupsTask" )
|
||||
Include.File( "DestroyRadarsTask" )
|
||||
Include.File( "DestroyUnitTypesTask" )
|
||||
Include.File( "Group" )
|
||||
Include.File( "Unit" )
|
||||
Include.File( "Zone" )
|
||||
Include.File( "Event" )
|
||||
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Gound', 'Ground', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying targets. Your mission goal should increase..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Ground Vehicle', 'Ground Vehicles', { 'DESTROY Test 1' }, 100 ) -- 75% of a patriot battery needs to be destroyed to achieve mission success...
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 1 )
|
||||
Mission:AddTask( DESTROYGROUPSTASK, 1 )
|
||||
|
||||
MISSIONSCHEDULER.AddMission( Mission )
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
local Mission = MISSION:New( 'Destroy Helicopters', 'Helicopters', 'Briefing', 'CCCP' )
|
||||
|
||||
Mission:AddClient( CLIENT:New( 'Client Plane', "Just wait and observe the SU-25T destoying the helicopters. The helicopter mission goal should increase once all are destroyed ..." ) )
|
||||
|
||||
local DESTROYGROUPSTASK = DESTROYGROUPSTASK:New( 'Helicopter', 'Helicopters', { 'DESTROY Test 2' }, 50 )
|
||||
DESTROYGROUPSTASK:SetGoalTotal( 2 )
|
||||
Mission:AddTask( DESTROYGROUPSTASK, 1 )
|
||||
|
||||
MISSIONSCHEDULER.AddMission( Mission )
|
||||
end
|
||||
|
||||
-- MISSION SCHEDULER STARTUP
|
||||
MISSIONSCHEDULER.Start()
|
||||
MISSIONSCHEDULER.ReportMenu()
|
||||
MISSIONSCHEDULER.ReportMissionsFlash( 30 )
|
||||
MISSIONSCHEDULER.ReportMissionsHide()
|
||||
BIN
Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
Normal file
BIN
Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
Normal file
Binary file not shown.
11
Test Missions/Moose_Test_SEAD/Moose_Test_SEAD.lua
Normal file
11
Test Missions/Moose_Test_SEAD/Moose_Test_SEAD.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
Include.File( "Sead" )
|
||||
|
||||
|
||||
-- CCCP SEAD Defenses
|
||||
SEAD_RU_SAM_Defenses = SEAD
|
||||
:New(
|
||||
{ 'SAM Test'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limit
|
||||
-- Tests the CleanUp functionality.
|
||||
-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground.
|
||||
-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn.
|
||||
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 180 ):SpawnScheduled( 10, 0 )
|
||||
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):CleanUp( 60 ):SpawnScheduled( 10, 0 )
|
||||
Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):Limit( 3, 100 ):RandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )
|
||||
|
||||
-- Maykop
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
images/body-bg.jpg
Normal file
BIN
images/body-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
images/download-button.png
Normal file
BIN
images/download-button.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
images/github-button.png
Normal file
BIN
images/github-button.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
images/header-bg.jpg
Normal file
BIN
images/header-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
images/highlight-bg.jpg
Normal file
BIN
images/highlight-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
images/sidebar-bg.jpg
Normal file
BIN
images/sidebar-bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
60
index.html
Normal file
60
index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Moose by FlightControl-Master</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<section class="page-header">
|
||||
<h1 class="project-name">Moose</h1>
|
||||
<h2 class="project-tagline">Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World</h2>
|
||||
<a href="https://github.com/FlightControl-Master/MOOSE" class="btn">View on GitHub</a>
|
||||
<a href="https://github.com/FlightControl-Master/MOOSE/zipball/master" class="btn">Download .zip</a>
|
||||
<a href="https://github.com/FlightControl-Master/MOOSE/tarball/master" class="btn">Download .tar.gz</a>
|
||||
</section>
|
||||
|
||||
<section class="main-content">
|
||||
<h1>
|
||||
<a id="context" class="anchor" href="#context" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Context</h1>
|
||||
|
||||
<p>A development has been ongoing for a while now, which allows to create missions quickly using an Object Oriented Framework developed in lua.
|
||||
MOOSE is currently still in alpha version, but will evolve over time. Right now, it has been updated to work with DCS world 1.5.</p>
|
||||
|
||||
<p>MOOSE is a <strong>M</strong>ission <strong>O</strong>bject <strong>O</strong>riented <strong>S</strong>cripting <strong>E</strong>nvironment, and is meant for mission designers and mission hosters. It allows to quickly setup complex missions using pre-scripted scenarios using the available classes within the framework.</p>
|
||||
|
||||
<p>You can find the source of MOOSE here on GITHUB. It is free for download:
|
||||
<a href="https://github.com/FlightControl-Master/MOOSE/">https://github.com/FlightControl-Master/MOOSE/</a></p>
|
||||
|
||||
<h1>
|
||||
<a id="goals" class="anchor" href="#goals" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Goals</h1>
|
||||
|
||||
<p>The goal of MOOSE is to allow mission designers to enhance their scripting with mission orchestration objects, which can be instantiated from defined classes within the framework. This will allow to write mission scripts with minimal code embedded. Of course, the richness of the framework will determine the richness of the misson scenarios. We can expect that MOOSE will evolve over time, as more missions will be designed within the framework.</p>
|
||||
|
||||
<h1>
|
||||
<a id="classes" class="anchor" href="#classes" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Classes</h1>
|
||||
|
||||
<p>The following classes are currently embedded within MOOSE:</p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="Documentation/Base.html">BASE</a>: The main class from which all MOOSE classes are derived from. The BASE class contains essential functions to support inheritance and MOOSE object execution tracing (logging within the DCS.log file in the saved games folder of the user).</p></li>
|
||||
<li><p><a href="Documentation/DATABASE.html">DATABASE</a>: Create sets of units (and groups) upon defined filter criteria. These sets can be used to iterate the DATABASE calling a defined function for each unit (or group).</p></li>
|
||||
<li><p><a href="Documentation/Spawn.html">SPAWN</a>: Spawn new groups (and units) during mission execution.</p></li>
|
||||
<li><p><a href="Documentation/Escort.html">ESCORT</a>: Makes groups consisting of helicopters, airplanes, ground troops or ships within a mission joining your flight. You can control these groups through the ratio menu during your flight. Available commands are around: Navigation, Position Hold, Reporting (Target Detection), Attacking, Assisted Attacks, ROE, Evasion, Mission Execution and more ...</p></li>
|
||||
</ul>
|
||||
|
||||
<footer class="site-footer">
|
||||
<span class="site-footer-owner"><a href="https://github.com/FlightControl-Master/MOOSE">Moose</a> is maintained by <a href="https://github.com/FlightControl-Master">FlightControl-Master</a>.</span>
|
||||
|
||||
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
|
||||
</footer>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1
javascripts/main.js
Normal file
1
javascripts/main.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log('This would be the main JS file.');
|
||||
6
params.json
Normal file
6
params.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Moose",
|
||||
"tagline": "Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World",
|
||||
"body": "# Context\r\n\r\nA development has been ongoing for a while now, which allows to create missions quickly using an Object Oriented Framework developed in lua.\r\nMOOSE is currently still in alpha version, but will evolve over time. Right now, it has been updated to work with DCS world 1.5.\r\n\r\nMOOSE is a **M**ission **O**bject **O**riented **S**cripting **E**nvironment, and is meant for mission designers and mission hosters. It allows to quickly setup complex missions using pre-scripted scenarios using the available classes within the framework.\r\n\r\nYou can find the source of MOOSE here on GITHUB. It is free for download: \r\nhttps://github.com/FlightControl-Master/MOOSE/\r\n\r\n# Goals\r\n\r\nThe goal of MOOSE is to allow mission designers to enhance their scripting with mission orchestration objects, which can be instantiated from defined classes within the framework. This will allow to write mission scripts with minimal code embedded. Of course, the richness of the framework will determine the richness of the misson scenarios. We can expect that MOOSE will evolve over time, as more missions will be designed within the framework.\r\n\r\n# Classes\r\n\r\nThe following classes are currently embedded within MOOSE:\r\n\r\n* [BASE](Documentation/Base.html): The main class from which all MOOSE classes are derived from. The BASE class contains essential functions to support inheritance and MOOSE object execution tracing (logging within the DCS.log file in the saved games folder of the user).\r\n\r\n* [DATABASE](Documentation/DATABASE.html): Create sets of units (and groups) upon defined filter criteria. These sets can be used to iterate the DATABASE calling a defined function for each unit (or group).\r\n\r\n* [SPAWN](Documentation/Spawn.html): Spawn new groups (and units) during mission execution.\r\n\r\n* [ESCORT](Documentation/Escort.html): Makes groups consisting of helicopters, airplanes, ground troops or ships within a mission joining your flight. You can control these groups through the ratio menu during your flight. Available commands are around: Navigation, Position Hold, Reporting (Target Detection), Attacking, Assisted Attacks, ROE, Evasion, Mission Execution and more ...\r\n\r\n",
|
||||
"note": "Don't delete this file! It's used internally to help with page regeneration."
|
||||
}
|
||||
124
stylesheets/github-light.css
Normal file
124
stylesheets/github-light.css
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 GitHub, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
.pl-c /* comment */ {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */,
|
||||
.pl-s .pl-v /* string variable */ {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.pl-e /* entity */,
|
||||
.pl-en /* entity.name */ {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.pl-s .pl-s1 /* string source */,
|
||||
.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.pl-ent /* entity.name.tag */ {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.pl-k /* keyword, storage, storage.type */ {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
|
||||
.pl-s /* string */,
|
||||
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
|
||||
.pl-sr /* string.regexp */,
|
||||
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
|
||||
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */,
|
||||
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ {
|
||||
color: #183691;
|
||||
}
|
||||
|
||||
.pl-v /* variable */ {
|
||||
color: #ed6a43;
|
||||
}
|
||||
|
||||
.pl-id /* invalid.deprecated */ {
|
||||
color: #b52a1d;
|
||||
}
|
||||
|
||||
.pl-ii /* invalid.illegal */ {
|
||||
background-color: #b52a1d;
|
||||
color: #f8f8f8;
|
||||
}
|
||||
|
||||
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
|
||||
color: #63a35c;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pl-ml /* markup.list */ {
|
||||
color: #693a17;
|
||||
}
|
||||
|
||||
.pl-mh /* markup.heading */,
|
||||
.pl-mh .pl-en /* markup.heading entity.name */,
|
||||
.pl-ms /* meta.separator */ {
|
||||
color: #1d3e81;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pl-mq /* markup.quote */ {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.pl-mi /* markup.italic */ {
|
||||
color: #333;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.pl-mb /* markup.bold */ {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
|
||||
background-color: #ffecec;
|
||||
color: #bd2c00;
|
||||
}
|
||||
|
||||
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
|
||||
background-color: #eaffea;
|
||||
color: #55a532;
|
||||
}
|
||||
|
||||
.pl-mdr /* meta.diff.range */ {
|
||||
color: #795da3;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pl-mo /* meta.output */ {
|
||||
color: #1d3e81;
|
||||
}
|
||||
|
||||
424
stylesheets/normalize.css
vendored
Normal file
424
stylesheets/normalize.css
vendored
Normal file
@@ -0,0 +1,424 @@
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||
* and Firefox.
|
||||
* Correct `block` display not defined for `main` in IE 11.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9/10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow not hidden in IE 9/10/11.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contain overflow in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address odd `em`-unit font size rendering in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
* styling of `select`, unless a `border` property is set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Correct color not being inherited.
|
||||
* Known issue: affects color of disabled elements.
|
||||
* 2. Correct font properties not being inherited.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||
* Correct `select` style inheritance in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
* It's recommended that you don't attempt to style these elements.
|
||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
*
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
* `font-size` values of the `input`, it causes the cursor style of the
|
||||
* decrement button to change from `default` to `text`.
|
||||
*/
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */ /* 2 */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||
* padding (and `textfield` appearance).
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't inherit the `font-weight` (applied by a rule above).
|
||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
*/
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Tables
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
228
stylesheets/print.css
Normal file
228
stylesheets/print.css
Normal file
@@ -0,0 +1,228 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
border: 0;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #d5000d;
|
||||
}
|
||||
|
||||
header {
|
||||
padding-top: 35px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
line-height: 1.2;
|
||||
color: #303030;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
header h2 {
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
line-height: 1.3;
|
||||
color: #aaa;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
#downloads {
|
||||
display: none;
|
||||
}
|
||||
#main_content {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
margin-bottom: 30px;
|
||||
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||
font-size: 12px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
border: solid 1px #ddd;
|
||||
}
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* COMMON STYLES */
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
form {
|
||||
padding: 20px;
|
||||
background: #f2f2f2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL ELEMENT TYPE STYLES */
|
||||
|
||||
h1 {
|
||||
font-size: 2.8em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 8px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #d5000d;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: .8em;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p a {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0 0 0 30px;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.6em;
|
||||
border-left: 10px solid #e9e9e9;
|
||||
}
|
||||
|
||||
ul li {
|
||||
padding-left: 20px;
|
||||
list-style-position: inside;
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
ol li {
|
||||
padding-left: 3px;
|
||||
list-style-position: inside;
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
font-style: italic;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 30px;
|
||||
margin-top: 40px;
|
||||
font-size: 13px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
.clearfix:after {
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
content: '.';
|
||||
}
|
||||
|
||||
.clearfix {display: inline-block;}
|
||||
* html .clearfix {height: 1%;}
|
||||
.clearfix {display: block;}
|
||||
245
stylesheets/stylesheet.css
Normal file
245
stylesheets/stylesheet.css
Normal file
@@ -0,0 +1,245 @@
|
||||
* {
|
||||
box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: #606c71; }
|
||||
|
||||
a {
|
||||
color: #1e6bb8;
|
||||
text-decoration: none; }
|
||||
a:hover {
|
||||
text-decoration: underline; }
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
margin-bottom: 1rem;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 0.3rem;
|
||||
transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
|
||||
.btn + .btn {
|
||||
margin-left: 1rem; }
|
||||
|
||||
.btn:hover {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
text-decoration: none;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-color: rgba(255, 255, 255, 0.3); }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.btn {
|
||||
padding: 0.75rem 1rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.btn {
|
||||
padding: 0.6rem 0.9rem;
|
||||
font-size: 0.9rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
font-size: 0.9rem; }
|
||||
.btn + .btn {
|
||||
margin-top: 1rem;
|
||||
margin-left: 0; } }
|
||||
|
||||
.page-header {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: #159957;
|
||||
background-image: linear-gradient(120deg, #155799, #159957); }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.page-header {
|
||||
padding: 5rem 6rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.page-header {
|
||||
padding: 3rem 4rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.page-header {
|
||||
padding: 2rem 1rem; } }
|
||||
|
||||
.project-name {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.1rem; }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.project-name {
|
||||
font-size: 3.25rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.project-name {
|
||||
font-size: 2.25rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.project-name {
|
||||
font-size: 1.75rem; } }
|
||||
|
||||
.project-tagline {
|
||||
margin-bottom: 2rem;
|
||||
font-weight: normal;
|
||||
opacity: 0.7; }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.project-tagline {
|
||||
font-size: 1.25rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.project-tagline {
|
||||
font-size: 1.15rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.project-tagline {
|
||||
font-size: 1rem; } }
|
||||
|
||||
.main-content :first-child {
|
||||
margin-top: 0; }
|
||||
.main-content img {
|
||||
max-width: 100%; }
|
||||
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: normal;
|
||||
color: #159957; }
|
||||
.main-content p {
|
||||
margin-bottom: 1em; }
|
||||
.main-content code {
|
||||
padding: 2px 4px;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 0.9rem;
|
||||
color: #383e41;
|
||||
background-color: #f3f6fa;
|
||||
border-radius: 0.3rem; }
|
||||
.main-content pre {
|
||||
padding: 0.8rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
font: 1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
color: #567482;
|
||||
word-wrap: normal;
|
||||
background-color: #f3f6fa;
|
||||
border: solid 1px #dce6f0;
|
||||
border-radius: 0.3rem; }
|
||||
.main-content pre > code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 0.9rem;
|
||||
color: #567482;
|
||||
word-break: normal;
|
||||
white-space: pre;
|
||||
background: transparent;
|
||||
border: 0; }
|
||||
.main-content .highlight {
|
||||
margin-bottom: 1rem; }
|
||||
.main-content .highlight pre {
|
||||
margin-bottom: 0;
|
||||
word-break: normal; }
|
||||
.main-content .highlight pre, .main-content pre {
|
||||
padding: 0.8rem;
|
||||
overflow: auto;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.45;
|
||||
border-radius: 0.3rem; }
|
||||
.main-content pre code, .main-content pre tt {
|
||||
display: inline;
|
||||
max-width: initial;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: initial;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
background-color: transparent;
|
||||
border: 0; }
|
||||
.main-content pre code:before, .main-content pre code:after, .main-content pre tt:before, .main-content pre tt:after {
|
||||
content: normal; }
|
||||
.main-content ul, .main-content ol {
|
||||
margin-top: 0; }
|
||||
.main-content blockquote {
|
||||
padding: 0 1rem;
|
||||
margin-left: 0;
|
||||
color: #819198;
|
||||
border-left: 0.3rem solid #dce6f0; }
|
||||
.main-content blockquote > :first-child {
|
||||
margin-top: 0; }
|
||||
.main-content blockquote > :last-child {
|
||||
margin-bottom: 0; }
|
||||
.main-content table {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
word-break: normal;
|
||||
word-break: keep-all; }
|
||||
.main-content table th {
|
||||
font-weight: bold; }
|
||||
.main-content table th, .main-content table td {
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid #e9ebec; }
|
||||
.main-content dl {
|
||||
padding: 0; }
|
||||
.main-content dl dt {
|
||||
padding: 0;
|
||||
margin-top: 1rem;
|
||||
font-size: 1rem;
|
||||
font-weight: bold; }
|
||||
.main-content dl dd {
|
||||
padding: 0;
|
||||
margin-bottom: 1rem; }
|
||||
.main-content hr {
|
||||
height: 2px;
|
||||
padding: 0;
|
||||
margin: 1rem 0;
|
||||
background-color: #eff0f1;
|
||||
border: 0; }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.main-content {
|
||||
max-width: 64rem;
|
||||
padding: 2rem 6rem;
|
||||
margin: 0 auto;
|
||||
font-size: 1.1rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.main-content {
|
||||
padding: 2rem 4rem;
|
||||
font-size: 1.1rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.main-content {
|
||||
padding: 2rem 1rem;
|
||||
font-size: 1rem; } }
|
||||
|
||||
.site-footer {
|
||||
padding-top: 2rem;
|
||||
margin-top: 2rem;
|
||||
border-top: solid 1px #eff0f1; }
|
||||
|
||||
.site-footer-owner {
|
||||
display: block;
|
||||
font-weight: bold; }
|
||||
|
||||
.site-footer-credits {
|
||||
color: #819198; }
|
||||
|
||||
@media screen and (min-width: 64em) {
|
||||
.site-footer {
|
||||
font-size: 1rem; } }
|
||||
|
||||
@media screen and (min-width: 42em) and (max-width: 64em) {
|
||||
.site-footer {
|
||||
font-size: 1rem; } }
|
||||
|
||||
@media screen and (max-width: 42em) {
|
||||
.site-footer {
|
||||
font-size: 0.9rem; } }
|
||||
Reference in New Issue
Block a user