diff --git a/Moose Development/Moose/AI/AI_Designate.lua b/Moose Development/Moose/AI/AI_Designate.lua index 8ff898987..663fe47fb 100644 --- a/Moose Development/Moose/AI/AI_Designate.lua +++ b/Moose Development/Moose/AI/AI_Designate.lua @@ -105,7 +105,7 @@ do -- AI_DESIGNATE -- -- ## 2. AI_DESIGNATE is a FSM -- - -- ![Process]() + -- ![Process](..\Presentations\DESIGNATE\Dia2.JPG) -- -- ### 2.1 AI_DESIGNATE States -- @@ -141,7 +141,7 @@ do -- AI_DESIGNATE -- -- ### 3.2 Auto generate laser codes -- - -- WIP + -- Use the method @{#AI_DESIGNATE.GenerateLaserCodes}() to generate all possible laser codes. Logic implemented and advised by Ciribob! -- -- ## 4. Autolase to automatically lase detected targets. -- @@ -372,6 +372,59 @@ do -- AI_DESIGNATE return self end + --- Generate an array of possible laser codes. + -- Each new lase will select a code from this table. + -- The entered value can range from 1111 - 1788, + -- -- but the first digit of the series must be a 1 or 2 + -- -- and the last three digits must be between 1 and 8. + -- The range used to be bugged so its not 1 - 8 but 0 - 7. + -- function below will use the range 1-7 just in case + -- @param #AI_DESIGNATE self + -- @return #AI_DESIGNATE + function AI_DESIGNATE:GenerateLaserCodes() --R2.1 + + self.LaserCodes = {} + + local function containsDigit(_number, _numberToFind) + + local _thisNumber = _number + local _thisDigit = 0 + + while _thisNumber ~= 0 do + _thisDigit = _thisNumber % 10 + _thisNumber = math.floor(_thisNumber / 10) + if _thisDigit == _numberToFind then + return true + end + end + + return false + end + + -- generate list of laser codes + local _code = 1111 + local _count = 1 + while _code < 1777 and _count < 30 do + while true do + _code = _code + 1 + if not containsDigit(_code, 8) + and not containsDigit(_code, 9) + and not containsDigit(_code, 0) then + self:T(_code) + table.insert( self.LaserCodes, _code ) + break + end + end + _count = _count + 1 + end + + self.LaserCodesUsed = {} + + return self + end + + + --- Set auto lase. -- Auto lase will start lasing targets immediately when these are in range. -- @param #AI_DESIGNATE self @@ -780,4 +833,5 @@ do -- AI_DESIGNATE end +-- Help from Ciribob diff --git a/Moose Development/Moose/Core/Spot.lua b/Moose Development/Moose/Core/Spot.lua index 3adccb06f..e1f7f4e99 100644 --- a/Moose Development/Moose/Core/Spot.lua +++ b/Moose Development/Moose/Core/Spot.lua @@ -55,14 +55,14 @@ do -- -- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to: -- - -- * Spot for a defined duration. + -- * Mark targets for a defined duration. -- * wiggle the spot at the target. -- * Provide a @{Unit} as a target, instead of a point. -- * Implement a status machine, LaseOn, LaseOff. -- -- ## 1. SPOT constructor -- - -- * @{#SPOT.New}(): Creates a new SPOT object. + -- * @{#SPOT.New}(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object. -- -- ## 2. SPOT is a FSM -- diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 3fb8251c1..54a1d5a34 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170423_0705' ) +env.info( 'Moose Generation Timestamp: 20170423_1757' ) local base = _G diff --git a/docs/Documentation/AI_Designate.html b/docs/Documentation/AI_Designate.html index 1afab5d4c..590d48988 100644 --- a/docs/Documentation/AI_Designate.html +++ b/docs/Documentation/AI_Designate.html @@ -186,6 +186,12 @@ each detected set of potential targets can be lased or smoked...

AI_DESIGNATE.Detection + + + + AI_DESIGNATE:GenerateLaserCodes() + +

Generate an array of possible laser codes.

@@ -558,7 +564,7 @@ Once Targets have been detected, the DesignateObject will trig

2. AI_DESIGNATE is a FSM

-

Process

+

Process

2.1 AI_DESIGNATE States

@@ -576,7 +582,9 @@ Once Targets have been detected, the DesignateObject will trig
  • **AI_DESIGNATE.Status**: Report designation status.
  • -

    3. Set laser codes

    +

    3. Laser codes

    + +

    3.1 Set possible laser codes

    An array of laser codes can be provided, that will be used by the AI_DESIGNATE when lasing. The laser code is communicated by the Recce when it is lasing a larget. @@ -596,6 +604,10 @@ One laser code can be given or an sequence of laser codes through an table...

    The above sets a collection of possible laser codes that can be assigned. Note the { } notation!

    +

    3.2 Auto generate laser codes

    + +

    Use the method AI_DESIGNATE.GenerateLaserCodes() to generate all possible laser codes. Logic implemented and advised by Ciribob!

    +

    4. Autolase to automatically lase detected targets.

    DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. @@ -700,6 +712,32 @@ Note that autolase will automatically activate lasing for ALL DetectedItems< + + +

    +
    + + +AI_DESIGNATE:GenerateLaserCodes() + +
    +
    + +

    Generate an array of possible laser codes.

    + + +

    Each new lase will select a code from this table. +The entered value can range from 1111 - 1788, +-- but the first digit of the series must be a 1 or 2 +-- and the last three digits must be between 1 and 8. + The range used to be bugged so its not 1 - 8 but 0 - 7. +function below will use the range 1-7 just in case

    + +

    Return value

    + +

    #AI_DESIGNATE:

    + +
    diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index dc938b7ba..6b3dd2a7a 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -770,6 +770,12 @@ and any spaces before and after the resulting name are removed.

    SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + + + + SPAWN.uncontrolled + + @@ -2071,9 +2077,6 @@ The group that was spawned. You can use this group for further actions.

    - -

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

    -
    @@ -2527,9 +2530,6 @@ when nothing was spawned.

    - -

    Overwrite unit names by default with group name.

    -
    @@ -2544,9 +2544,6 @@ when nothing was spawned.

    - -

    By default, no InitLimit

    -
    @@ -2582,7 +2579,7 @@ when nothing was spawned.

    - #number + SPAWN.SpawnMaxGroups @@ -2599,7 +2596,7 @@ when nothing was spawned.

    - #number + SPAWN.SpawnMaxUnitsAlive @@ -2951,7 +2948,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

    Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

    +

    When the first Spawn executes, all the Groups need to be made visible before start.

    @@ -3517,6 +3514,20 @@ True = Continue Scheduler

    + +
    +
    +
    + + + +SPAWN.uncontrolled + +
    +
    + + +
    diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index d1eef677c..07c50b18e 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -444,7 +444,6 @@ ptional) The name of the new static.

    - #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Spot.html b/docs/Documentation/Spot.html index 66be5647a..e11696253 100644 --- a/docs/Documentation/Spot.html +++ b/docs/Documentation/Spot.html @@ -158,7 +158,7 @@

    SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:

      -
    • Spot for a defined duration.
    • +
    • Mark targets for a defined duration.
    @@ -339,7 +339,7 @@

    SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:

      -
    • Spot for a defined duration.
    • +
    • Mark targets for a defined duration.
    @@ -352,7 +352,7 @@

    1. SPOT constructor

      -
    • SPOT.New(): Creates a new SPOT object.
    • +
    • SPOT.New(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object.

    2. SPOT is a FSM

    @@ -761,6 +761,7 @@ true if it is lasing

    + SPOT.ScheduleID @@ -774,6 +775,7 @@ true if it is lasing

    + SPOT.SpotIR @@ -787,6 +789,7 @@ true if it is lasing

    + SPOT.SpotLaser @@ -800,6 +803,7 @@ true if it is lasing

    + SPOT.Target diff --git a/docs/Presentations/DESIGNATE/Dia10.JPG b/docs/Presentations/DESIGNATE/Dia10.JPG new file mode 100644 index 000000000..b559bfc12 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia10.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia11.JPG b/docs/Presentations/DESIGNATE/Dia11.JPG new file mode 100644 index 000000000..804b7e6f1 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia11.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia12.JPG b/docs/Presentations/DESIGNATE/Dia12.JPG new file mode 100644 index 000000000..2f13b0025 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia12.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia13.JPG b/docs/Presentations/DESIGNATE/Dia13.JPG new file mode 100644 index 000000000..ea70bc9f4 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia13.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia14.JPG b/docs/Presentations/DESIGNATE/Dia14.JPG new file mode 100644 index 000000000..588e5eadc Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia14.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia2.JPG b/docs/Presentations/DESIGNATE/Dia2.JPG new file mode 100644 index 000000000..2ceb76b12 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia2.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia3.JPG b/docs/Presentations/DESIGNATE/Dia3.JPG new file mode 100644 index 000000000..fd1bbb1fc Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia3.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia4.JPG b/docs/Presentations/DESIGNATE/Dia4.JPG new file mode 100644 index 000000000..a5244da04 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia4.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia5.JPG b/docs/Presentations/DESIGNATE/Dia5.JPG new file mode 100644 index 000000000..d899d4dc9 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia5.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia6.JPG b/docs/Presentations/DESIGNATE/Dia6.JPG new file mode 100644 index 000000000..8724da922 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia6.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia7.JPG b/docs/Presentations/DESIGNATE/Dia7.JPG new file mode 100644 index 000000000..45426829b Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia7.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia8.JPG b/docs/Presentations/DESIGNATE/Dia8.JPG new file mode 100644 index 000000000..6af36dac2 Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia8.JPG differ diff --git a/docs/Presentations/DESIGNATE/Dia9.JPG b/docs/Presentations/DESIGNATE/Dia9.JPG new file mode 100644 index 000000000..46cd3eceb Binary files /dev/null and b/docs/Presentations/DESIGNATE/Dia9.JPG differ diff --git a/docs/Presentations/SPOT/Dia2.JPG b/docs/Presentations/SPOT/Dia2.JPG new file mode 100644 index 000000000..83ef1431f Binary files /dev/null and b/docs/Presentations/SPOT/Dia2.JPG differ diff --git a/docs/Presentations/SPOT/Dia3.JPG b/docs/Presentations/SPOT/Dia3.JPG new file mode 100644 index 000000000..595d3b052 Binary files /dev/null and b/docs/Presentations/SPOT/Dia3.JPG differ