Working version, fiew!

This commit is contained in:
FlightControl_Master 2017-10-26 14:54:59 +02:00
parent 8a4a37ac11
commit 0e4a5c02d5
19 changed files with 56 additions and 122 deletions

View File

@ -437,44 +437,44 @@ end
--- Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).
-- @param #SET_BASE self
-- @param Core.Event#EVENTDATA Event
function SET_BASE:_EventOnPlayerEnterUnit( Event )
self:F3( { Event } )
if Event.IniDCSUnit then
local ObjectName, Object = self:AddInDatabase( Event )
self:T3( ObjectName, Object )
if self:IsIncludeObject( Object ) then
self:Add( ObjectName, Object )
--self:_EventOnPlayerEnterUnit( Event )
end
end
end
--function SET_BASE:_EventOnPlayerEnterUnit( Event )
-- self:F3( { Event } )
--
-- if Event.IniDCSUnit then
-- local ObjectName, Object = self:AddInDatabase( Event )
-- self:T3( ObjectName, Object )
-- if self:IsIncludeObject( Object ) then
-- self:Add( ObjectName, Object )
-- --self:_EventOnPlayerEnterUnit( Event )
-- end
-- end
--end
--- Handles the OnPlayerLeaveUnit event to clean the active players table.
-- @param #SET_BASE self
-- @param Core.Event#EVENTDATA Event
function SET_BASE:_EventOnPlayerLeaveUnit( Event )
self:F3( { Event } )
local ObjectName = Event.IniDCSUnit
if Event.IniDCSUnit then
if Event.IniDCSGroup then
local GroupUnits = Event.IniDCSGroup:getUnits()
local PlayerCount = 0
for _, DCSUnit in pairs( GroupUnits ) do
if DCSUnit ~= Event.IniDCSUnit then
if DCSUnit:getPlayerName() ~= nil then
PlayerCount = PlayerCount + 1
end
end
end
self:E(PlayerCount)
if PlayerCount == 0 then
self:Remove( Event.IniDCSGroupName )
end
end
end
end
--function SET_BASE:_EventOnPlayerLeaveUnit( Event )
-- self:F3( { Event } )
--
-- local ObjectName = Event.IniDCSUnit
-- if Event.IniDCSUnit then
-- if Event.IniDCSGroup then
-- local GroupUnits = Event.IniDCSGroup:getUnits()
-- local PlayerCount = 0
-- for _, DCSUnit in pairs( GroupUnits ) do
-- if DCSUnit ~= Event.IniDCSUnit then
-- if DCSUnit:getPlayerName() ~= nil then
-- PlayerCount = PlayerCount + 1
-- end
-- end
-- end
-- self:E(PlayerCount)
-- if PlayerCount == 0 then
-- self:Remove( Event.IniDCSGroupName )
-- end
-- end
-- end
--end
-- Iterators

View File

@ -124,28 +124,24 @@ end
--- @param #ATC_GROUND self
function ATC_GROUND:_AirbaseMonitor()
self:E( "In Scheduler")
self.SetClient:ForEachClient(
--- @param Wrapper.Client#CLIENT Client
function( Client )
for AirbaseID, AirbaseMeta in pairs( self.Airbases ) do
if Client:IsAlive() then
if AirbaseMeta.Monitor == true then
local IsOnGround = Client:InAir() == false
self:E( AirbaseID, AirbaseMeta.MaximumSpeed )
for AirbaseID, AirbaseMeta in pairs( self.Airbases ) do
self:E( AirbaseID, AirbaseMeta.MaximumSpeed )
if AirbaseMeta.Monitor == true and Client:IsInZone( AirbaseMeta.ZoneBoundary ) then
self.SetClient:ForEachClientInZone( AirbaseMeta.ZoneBoundary,
--- @param Wrapper.Client#CLIENT Client
function( Client )
self:E( Client.UnitName )
if Client and Client:IsAlive() then
local NotInRunwayZone = true
for ZoneRunwayID, ZoneRunway in pairs( AirbaseMeta.ZoneRunways ) do
NotInRunwayZone = ( Client:IsNotInZone( ZoneRunway ) == true ) and NotInRunwayZone or false
end
local IsOnGround = Client:InAir() == false
if NotInRunwayZone then
if IsOnGround then
@ -245,13 +241,13 @@ function ATC_GROUND:_AirbaseMonitor()
Client:SetState( self, "Taxi", false )
end
end
else
Client:SetState( self, "Taxi", false )
end
end
)
else
Client:SetState( self, "Taxi", false )
end
end
end
)
return true
end

View File

@ -671,6 +671,7 @@
<dl class="function">
<dt>
<em>#number</em>
<a id="#(AI_A2A).IdleCount" >
<strong>AI_A2A.IdleCount</strong>
</a>

View File

@ -2269,6 +2269,7 @@ The amount of seconds to delay the action.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(CARGO_CRATE).CargoCarrier" >
<strong>CARGO_CRATE.CargoCarrier</strong>
</a>

View File

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

View File

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

View File

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

View File

@ -2017,6 +2017,7 @@ The height in meters to add to the altitude of the positionable.</p>
<dl class="function">
<dt>
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
<a id="#(POSITIONABLE).Spot" >
<strong>POSITIONABLE.Spot</strong>
</a>

View File

@ -555,18 +555,6 @@
<td class="name" nowrap="nowrap"><a href="##(SET_BASE)._EventOnDeadOrCrash">SET_BASE:_EventOnDeadOrCrash(Event)</a></td>
<td class="summary">
<p>Handles the OnDead or OnCrash event for alive units set.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SET_BASE)._EventOnPlayerEnterUnit">SET_BASE:_EventOnPlayerEnterUnit(Event)</a></td>
<td class="summary">
<p>Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SET_BASE)._EventOnPlayerLeaveUnit">SET_BASE:_EventOnPlayerLeaveUnit(Event)</a></td>
<td class="summary">
<p>Handles the OnPlayerLeaveUnit event to clean the active players table.</p>
</td>
</tr>
<tr>
@ -3059,48 +3047,6 @@ self</p>
<dl class="function">
<dt>
<a id="#(SET_BASE)._EventOnPlayerEnterUnit" >
<strong>SET_BASE:_EventOnPlayerEnterUnit(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SET_BASE)._EventOnPlayerLeaveUnit" >
<strong>SET_BASE:_EventOnPlayerLeaveUnit(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the OnPlayerLeaveUnit event to clean the active players table.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SET_BASE)._FilterStart" >
<strong>SET_BASE:_FilterStart()</strong>
</a>

View File

@ -2882,9 +2882,6 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd>
</dl>
<dl class="function">
@ -2899,9 +2896,6 @@ when nothing was spawned.</p>
<p> By default, no InitLimit</p>
</dd>
</dl>
<dl class="function">
@ -2937,7 +2931,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(SPAWN).SpawnMaxGroups" >
<strong>SPAWN.SpawnMaxGroups</strong>
</a>
@ -2954,7 +2948,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
</a>
@ -3282,7 +3276,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>
@ -3306,7 +3300,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
</dd>
</dl>

View File

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

View File

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

View File

@ -489,7 +489,6 @@ The name of the player.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(ZONE_GOAL).SmokeTime" >
<strong>ZONE_GOAL.SmokeTime</strong>
</a>
@ -498,9 +497,6 @@ The name of the player.</p>
<p>self.SmokeColor = nil</p>
</dd>
</dl>
<dl class="function">

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB