Small bugfixes and documentation update for GroupSet.lua

This commit is contained in:
FlightControl 2016-05-27 13:53:06 +02:00
parent f3b8835a16
commit 41375f4491
14 changed files with 15 additions and 27 deletions

View File

@ -23,7 +23,7 @@
--
-- * @{#GROUPSET.FilterCoalitions}: Builds the GROUPSET with the groups belonging to the coalition(s).
-- * @{#GROUPSET.FilterCategories}: Builds the GROUPSET with the groups belonging to the category(ies).
-- * @{#GROUPSET.FilterTypes}: Builds the GROUPSET with the groups belonging to the unit type(s).
-- * @{#GROUPSET.FilterCountries}: Builds the GROUPSET with the gruops belonging to the country(ies).
-- * @{#GROUPSET.FilterPrefixes}: Builds the GROUPSET with the groups starting with the same prefix string(s).
--
-- Once the filter criteria have been set for the GROUPSET, you can start filtering using:
@ -41,12 +41,7 @@
-- The iterator methods will walk the GROUPSET set, and call for each element within the set a function that you provide.
-- The following iterator methods are currently available within the GROUPSET:
--
-- * @{#GROUPSET.ForEachGroup}: Calls a function for each alive unit it finds within the GROUPSET.
--
-- Planned iterators methods in development are (so these are not yet available):
--
-- * @{#GROUPSET.ForEachUnitInGroup}: Calls a function for each group contained within the GROUPSET.
-- * @{#GROUPSET.ForEachUnitInZone}: Calls a function for each unit within a certain zone contained within the GROUPSET.
-- * @{#GROUPSET.ForEachGroup}: Calls a function for each alive group it finds within the GROUPSET.
--
-- @module GroupSet
-- @author FlightControl
@ -101,10 +96,10 @@ function GROUPSET:New()
end
--- Finds a Unit based on the Unit Name.
--- Finds a Group based on the Group Name.
-- @param #GROUPSET self
-- @param #string GroupName
-- @return Group#GROUP The found Unit.
-- @return Group#GROUP The found Group.
function GROUPSET:FindUnit( GroupName )
local GroupFound = self.Set[GroupName]
@ -169,7 +164,7 @@ function GROUPSET:FilterCountries( Countries )
end
--- Builds a set of groups of defined unit prefixes.
--- Builds a set of groups of defined GROUP prefixes.
-- All the groups starting with the given prefixes will be included within the set.
-- @param #GROUPSET self
-- @param #string Prefixes The prefix of which the group name starts with.
@ -242,7 +237,7 @@ function GROUPSET:ForEachUnit( IteratorFunction, ... )
end
----- Interate the GROUPSET and call an interator function for each **alive** player, providing the Unit of the player and optional parameters.
----- Interate the GROUPSET and call an interator function for each **alive** player, providing the Group of the player and optional parameters.
---- @param #GROUPSET self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the GROUPSET. The function needs to accept a GROUP parameter.
---- @return #GROUPSET self

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160527_1334' )
env.info( 'Moose Generation Timestamp: 20160527_1352' )
local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() )

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20160527_1334' )
env.info( 'Moose Generation Timestamp: 20160527_1352' )
local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() )

View File

@ -99,7 +99,7 @@ Filter criteria are defined by:</p>
<ul>
<li><a href="##(GROUPSET).FilterCoalitions">GROUPSET.FilterCoalitions</a>: Builds the GROUPSET with the groups belonging to the coalition(s).</li>
<li><a href="##(GROUPSET).FilterCategories">GROUPSET.FilterCategories</a>: Builds the GROUPSET with the groups belonging to the category(ies).</li>
<li><a href="##(GROUPSET).FilterTypes">GROUPSET.FilterTypes</a>: Builds the GROUPSET with the groups belonging to the unit type(s).</li>
<li><a href="##(GROUPSET).FilterCountries">GROUPSET.FilterCountries</a>: Builds the GROUPSET with the gruops belonging to the country(ies).</li>
<li><a href="##(GROUPSET).FilterPrefixes">GROUPSET.FilterPrefixes</a>: Builds the GROUPSET with the groups starting with the same prefix string(s).</li>
</ul>
@ -122,14 +122,7 @@ The iterator methods will walk the GROUPSET set, and call for each element withi
The following iterator methods are currently available within the GROUPSET:</p>
<ul>
<li><a href="##(GROUPSET).ForEachGroup">GROUPSET.ForEachGroup</a>: Calls a function for each alive unit it finds within the GROUPSET.</li>
</ul>
<p>Planned iterators methods in development are (so these are not yet available):</p>
<ul>
<li><a href="##(GROUPSET).ForEachUnitInGroup">GROUPSET.ForEachUnitInGroup</a>: Calls a function for each group contained within the GROUPSET.</li>
<li><a href="##(GROUPSET).ForEachUnitInZone">GROUPSET.ForEachUnitInZone</a>: Calls a function for each unit within a certain zone contained within the GROUPSET.</li>
<li><a href="##(GROUPSET).ForEachGroup">GROUPSET.ForEachGroup</a>: Calls a function for each alive group it finds within the GROUPSET.</li>
</ul>
@ -189,7 +182,7 @@ The following iterator methods are currently available within the GROUPSET:</p>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterPrefixes">GROUPSET:FilterPrefixes(Prefixes)</a></td>
<td class="summary">
<p>Builds a set of groups of defined unit prefixes.</p>
<p>Builds a set of groups of defined GROUP prefixes.</p>
</td>
</tr>
<tr>
@ -207,7 +200,7 @@ The following iterator methods are currently available within the GROUPSET:</p>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FindUnit">GROUPSET:FindUnit(GroupName)</a></td>
<td class="summary">
<p>Finds a Unit based on the Unit Name.</p>
<p>Finds a Group based on the Group Name.</p>
</td>
</tr>
<tr>
@ -438,7 +431,7 @@ self</p>
</dt>
<dd>
<p>Builds a set of groups of defined unit prefixes.</p>
<p>Builds a set of groups of defined GROUP prefixes.</p>
<p>All the groups starting with the given prefixes will be included within the set.</p>
@ -525,7 +518,7 @@ The GROUP</p>
</dt>
<dd>
<p>Finds a Unit based on the Unit Name.</p>
<p>Finds a Group based on the Group Name.</p>
<h3>Parameter</h3>
<ul>
@ -538,7 +531,7 @@ The GROUP</p>
<h3>Return value</h3>
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em>
The found Unit.</p>
The found Group.</p>
</dd>
</dl>