From 7f43e958df21704013c268398595ac5f317b3e68 Mon Sep 17 00:00:00 2001
From: FlightControl
Date: Thu, 23 Mar 2017 20:44:56 +0100
Subject: [PATCH] WeaponType added in AttackUnit
--- WeaponType is added
---
.../Moose/Wrapper/Controllable.lua | 12 +-
.../l10n/DEFAULT/Moose.lua | 14 +-
Moose Mission Setup/Moose.lua | 14 +-
docs/Documentation/AI_Patrol.html | 3 +
docs/Documentation/Controllable.html | 20 +--
docs/Documentation/Detection.html | 2 +-
docs/Documentation/Fsm.html | 3 +-
docs/Documentation/MOVEMENT.html | 4 -
docs/Documentation/Spawn.html | 145 ++++--------------
docs/Documentation/Task_A2G_Dispatcher.html | 13 +-
10 files changed, 74 insertions(+), 156 deletions(-)
diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua
index c4263c1f2..808fb28ec 100644
--- a/Moose Development/Moose/Wrapper/Controllable.lua
+++ b/Moose Development/Moose/Wrapper/Controllable.lua
@@ -543,11 +543,12 @@ end
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
-- @param #number AttackQty (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
-- @param Dcs.DCSTypes#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
--- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
--- @param #boolean ControllableAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.
+-- @param #number Altitude (optional) The altitude from where to attack.
+-- @param #boolean Visible (optional) not a clue.
+-- @param #number WeaponType (optional) The WeaponType.
-- @return Dcs.DCSTasking.Task#Task The DCS task structure.
-function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack )
- self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack } )
+function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType )
+ self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType } )
local DCSTask
DCSTask = {
@@ -563,7 +564,8 @@ function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, Att
altitude = Altitude or 30,
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty,
- },
+ weaponType = WeaponType
+ }
}
self:E( DCSTask )
diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
index ca958bdf5..6585e8bab 100644
--- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
+++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170323_1912' )
+env.info( 'Moose Generation Timestamp: 20170323_2044' )
local base = _G
Include = {}
@@ -14308,11 +14308,12 @@ end
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
-- @param #number AttackQty (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
-- @param Dcs.DCSTypes#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
--- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
--- @param #boolean ControllableAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.
+-- @param #number Altitude (optional) The altitude from where to attack.
+-- @param #boolean Visible (optional) not a clue.
+-- @param #number WeaponType (optional) The WeaponType.
-- @return Dcs.DCSTasking.Task#Task The DCS task structure.
-function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack )
- self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack } )
+function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType )
+ self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType } )
local DCSTask
DCSTask = {
@@ -14328,7 +14329,8 @@ function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, Att
altitude = Altitude or 30,
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty,
- },
+ weaponType = WeaponType
+ }
}
self:E( DCSTask )
diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua
index ca958bdf5..6585e8bab 100644
--- a/Moose Mission Setup/Moose.lua
+++ b/Moose Mission Setup/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170323_1912' )
+env.info( 'Moose Generation Timestamp: 20170323_2044' )
local base = _G
Include = {}
@@ -14308,11 +14308,12 @@ end
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.
-- @param #number AttackQty (optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
-- @param Dcs.DCSTypes#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
--- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
--- @param #boolean ControllableAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.
+-- @param #number Altitude (optional) The altitude from where to attack.
+-- @param #boolean Visible (optional) not a clue.
+-- @param #number WeaponType (optional) The WeaponType.
-- @return Dcs.DCSTasking.Task#Task The DCS task structure.
-function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack )
- self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack } )
+function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType )
+ self:F2( { self.ControllableName, AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType } )
local DCSTask
DCSTask = {
@@ -14328,7 +14329,8 @@ function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, Att
altitude = Altitude or 30,
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty,
- },
+ weaponType = WeaponType
+ }
}
self:E( DCSTask )
diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html
index e54ea6cf5..7d6d6d9a7 100644
--- a/docs/Documentation/AI_Patrol.html
+++ b/docs/Documentation/AI_Patrol.html
@@ -920,6 +920,9 @@ Use the method AIPATROLZONE.M
+
+ This table contains the targets detected during patrol.
+
diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html
index 5c1ba178a..fa850fb75 100644
--- a/docs/Documentation/Controllable.html
+++ b/docs/Documentation/Controllable.html
@@ -529,7 +529,7 @@ A speed can be given in km/h.
- | CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, AttackQtyLimit, ControllableAttack, Altitude, Visible) |
+ CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) |
(AIR) Attack the Unit.
|
@@ -2135,7 +2135,7 @@ The DCS task structure.
-CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, AttackQtyLimit, ControllableAttack, Altitude, Visible)
+CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType)
@@ -2176,24 +2176,20 @@ The UNIT.
-#boolean AttackQtyLimit :
-(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
+#number Altitude :
+(optional) The altitude from where to attack.
-#boolean ControllableAttack :
-(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.
+#boolean Visible :
+(optional) not a clue.
- Altitude :
-
-
-
-
- Visible :
+#number WeaponType :
+(optional) The WeaponType.
diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html
index 64ac45ee0..dba431606 100644
--- a/docs/Documentation/Detection.html
+++ b/docs/Documentation/Detection.html
@@ -2238,7 +2238,7 @@ self
-
-
+ #number
DETECTION_BASE.DetectionInterval
diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html
index f62491c1d..02ff1ee96 100644
--- a/docs/Documentation/Fsm.html
+++ b/docs/Documentation/Fsm.html
@@ -1555,7 +1555,7 @@ A string defining the start state.
-
- #string
+
FSM._StartState
@@ -1854,6 +1854,7 @@ A string defining the start state.
-
+
FSM.current
diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html
index 53e309a7e..2ec03bdbd 100644
--- a/docs/Documentation/MOVEMENT.html
+++ b/docs/Documentation/MOVEMENT.html
@@ -191,7 +191,6 @@ on defined intervals (currently every minute).
-
- #number
MOVEMENT.AliveUnits
@@ -200,9 +199,6 @@ on defined intervals (currently every minute).
-
-
Contains the counter how many units are currently alive
-
diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html
index f90276a23..4a25605f0 100644
--- a/docs/Documentation/Spawn.html
+++ b/docs/Documentation/Spawn.html
@@ -770,18 +770,6 @@ and any spaces before and after the resulting name are removed.
| SPAWN:_GetGroupCountryID(SpawnPrefix) |
Gets the CountryID of the Group with the given SpawnPrefix
- |
-
-
- | SPAWN:_GetGroupFromDCSUnit(DCSUnit) |
-
- Return the group within the SpawnGroups collection with input a DCSUnit.
- |
-
-
- | SPAWN:_GetGroupIndexFromDCSUnit(DCSUnit) |
-
- Get the group index from a DCSUnit.
|
@@ -791,7 +779,7 @@ and any spaces before and after the resulting name are removed.
- | SPAWN:_GetPrefixFromDCSUnit(DCSUnit) |
+ SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) |
Return the prefix of a SpawnUnit.
|
@@ -815,31 +803,31 @@ and any spaces before and after the resulting name are removed.
- | SPAWN:_OnBirth(Event) |
+ SPAWN:_OnBirth(EventData) |
|
- | SPAWN:_OnDeadOrCrash(Event) |
+ SPAWN:_OnDeadOrCrash(EventData) |
|
- | SPAWN:_OnEngineShutDown(event) |
+ SPAWN:_OnEngineShutDown(EventData) |
Will detect AIR Units shutting down their engines ...
|
- | SPAWN:_OnLand(event) |
+ SPAWN:_OnLand(EventData) |
Will detect AIR Units landing...
|
- | SPAWN:_OnTakeOff(event) |
+ SPAWN:_OnTakeOff(EventData) |
Will detect AIR Units taking off...
|
@@ -2327,6 +2315,9 @@ when nothing was spawned.
+
+ Overwrite unit names by default with group name.
+
@@ -2341,6 +2332,9 @@ when nothing was spawned.
+
+ By default, no InitLimit
+
@@ -2376,7 +2370,7 @@ when nothing was spawned.
-
-
+ #number
SPAWN.SpawnMaxGroups
@@ -2393,7 +2387,7 @@ when nothing was spawned.
-
-
+ #number
SPAWN.SpawnMaxUnitsAlive
@@ -2711,7 +2705,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
-
-
+ #boolean
SPAWN.SpawnUnControlled
@@ -2866,84 +2860,6 @@ The group that was spawned. You can use this group for further actions.
-
-
-SPAWN:_GetGroupFromDCSUnit(DCSUnit)
-
-
--
-
-
Return the group within the SpawnGroups collection with input a DCSUnit.
-
- Parameter
-
- Return values
-
- -
-
-
Wrapper.Group#GROUP:
-The Group
-
-
- -
-
-
#nil:
-Nothing found
-
-
-
-
-
-
--
-
-
-SPAWN:_GetGroupIndexFromDCSUnit(DCSUnit)
-
-
--
-
-
Get the group index from a DCSUnit.
-
-
-The method will search for a #-mark, and will return the index behind the #-mark of the DCSUnit.
-It will return nil of no prefix was found.
-
- Parameter
-
- Return values
-
- -
-
-
#string:
-The prefix
-
-
- -
-
-
#nil:
-Nothing found
-
-
-
-
-
-
--
-
SPAWN:_GetLastIndex()
@@ -2957,8 +2873,8 @@ Nothing found
-
-
-SPAWN:_GetPrefixFromDCSUnit(DCSUnit)
+
+SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup)
-
@@ -2969,13 +2885,18 @@ Nothing found
The method will search for a #-mark, and will return the text before the #-mark.
It will return nil of no prefix was found.
- Parameter
+ Parameters
Return values
@@ -3073,7 +2994,7 @@ Nothing found
-
-SPAWN:_OnBirth(Event)
+SPAWN:_OnBirth(EventData)
-
@@ -3084,7 +3005,7 @@ Nothing found
@@ -3094,7 +3015,7 @@ Nothing found
-
-SPAWN:_OnDeadOrCrash(Event)
+SPAWN:_OnDeadOrCrash(EventData)
-
@@ -3105,7 +3026,7 @@ Nothing found
@@ -3115,7 +3036,7 @@ Nothing found
-
-SPAWN:_OnEngineShutDown(event)
+SPAWN:_OnEngineShutDown(EventData)
-
@@ -3130,7 +3051,7 @@ But only when the Unit was registered to have landed.
@@ -3140,7 +3061,7 @@ But only when the Unit was registered to have landed.
-
-SPAWN:_OnLand(event)
+SPAWN:_OnLand(EventData)
-
@@ -3155,7 +3076,7 @@ This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.
-
-
event :
+Core.Event#EVENTDATA EventData :
@@ -3165,7 +3086,7 @@ This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.
-SPAWN:_OnTakeOff(event)
+SPAWN:_OnTakeOff(EventData)
-
@@ -3180,7 +3101,7 @@ This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.
-
-
event :
+Core.Event#EVENTDATA EventData :
diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html
index 96bc84a59..d3f800748 100644
--- a/docs/Documentation/Task_A2G_Dispatcher.html
+++ b/docs/Documentation/Task_A2G_Dispatcher.html
@@ -178,7 +178,7 @@ Find a summary below describing for which situation a task type is created:
- | TASK_A2G_DISPATCHER:New(The, SetGroup, Detection, Mission) |
+ TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) |
TASKA2GDISPATCHER constructor.
|
@@ -403,7 +403,7 @@ If there are no targets to be set.
-TASK_A2G_DISPATCHER:New(The, SetGroup, Detection, Mission)
+TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection)
@@ -414,8 +414,8 @@ If there are no targets to be set.
Return value