Compare commits

..

1493 Commits

Author SHA1 Message Date
Sven Van de Velde
e2a0aa5573 Merge pull request #532 from FlightControl-Master/master-release-prep
Fix DETECTION_AREAS
2017-05-18 21:04:26 +02:00
FlightControl
a932f49554 Fix DetectedItemCount for DETECTION_AREAS 2017-05-18 20:59:36 +02:00
FlightControl
a57e24212e Merge remote-tracking branch 'refs/remotes/origin/master-release-2.1' into master-release-prep 2017-05-18 20:59:03 +02:00
FlightControl
775a3b20ab Dynamic 2017-05-18 14:16:03 +02:00
Sven Van de Velde
0d2e398e37 Merge pull request #529 from FlightControl-Master/master-release-prep
Fixes #528
2017-05-18 14:14:39 +02:00
FlightControl
97179cc0b3 Merge remote-tracking branch 'refs/remotes/origin/master-release-2.1' into master-release-prep 2017-05-18 14:13:56 +02:00
FlightControl
b26d5e09e6 Remove the moose.lua file 2017-05-18 14:13:29 +02:00
FlightControl
091373f98f Fixes #528 - DETECTION_UNITS uses a string as the index 2017-05-18 14:10:20 +02:00
FlightControl
694798947f New version 2017-05-18 10:12:26 +02:00
FlightControl
87fb057e0e Remove moose.lua 2017-05-18 10:08:24 +02:00
FlightControl
a644d3b8c8 Dynamic Moose.lua 2017-05-18 10:03:51 +02:00
Sven Van de Velde
7707293615 Merge pull request #527 from FlightControl-Master/master-release-prep
Fixes issue #525
2017-05-18 09:30:16 +02:00
FlightControl
3da82f595a Merge remote-tracking branch 'origin/master-release-prep' into master-release-prep
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-05-18 09:28:41 +02:00
FlightControl
b5f8a5aad6 Static version 2017-05-18 09:27:21 +02:00
Sven Van de Velde
596e442b8a Merge pull request #526 from FlightControl-Master/525-R21-Fix-messages-displayed-in-tasking
525 r21 fix messages displayed in tasking
2017-05-18 09:25:46 +02:00
FlightControl
c83cdfdeff Update Moose.lua 2017-05-18 09:24:19 +02:00
FlightControl
6d1ab6bd98 Updated messages being displayed wrongly 2017-05-18 09:16:39 +02:00
FlightControl
0bc7c4138a Static moose.lua 2017-05-17 06:13:18 +02:00
Sven Van de Velde
da842491d0 Merge pull request #524 from FlightControl-Master/master
Release 2.1 preparation
2017-05-17 06:11:25 +02:00
FlightControl
c036b68f40 Updated release notes 2.1 2017-05-17 06:05:20 +02:00
FlightControl
caedaddd06 Fixed with A2G tasking
Imagine, the mission had a static moose.lua. I was testing with a static
moose.lua
2017-05-16 21:24:38 +02:00
Sven Van de Velde
1662b891df Merge pull request #523 from FlightControl-Master/522-Fix-Mission-complete-when-one-task-is-finished
Mission complete disabled when a task is finished
2017-05-16 17:04:16 +02:00
FlightControl
71c59aec74 Mission complete disabled when a task is finished
The concept was completely wrong. A mission will require separate logic
or triggers to register goal completion. I will need to do a training
video on that one.
2017-05-16 16:58:40 +02:00
FlightControl
aa159b1337 Documentation tags and release prep text 2017-05-16 10:35:26 +02:00
Sven Van de Velde
666544b5ba Merge pull request #521 from FlightControl-Master/511-Fix-Make-menu-option-cancel-route
Cancel route implemented
2017-05-15 22:24:36 +02:00
FlightControl
0e0e9bb550 Cancel route implemented
-- Cancel route option added
-- Added first version of MGRS or LL coordinate system.
2017-05-15 22:24:10 +02:00
Sven Van de Velde
666a3708d7 Merge pull request #520 from FlightControl-Master/513-Fix-deploy-troops-outside-a-deploy-zone
Fixed
2017-05-15 13:05:50 +02:00
FlightControl
30d9f369f3 Fixed
When the deployzone is nil, the troops are deployed 60 meters in front
of the carrier.
2017-05-15 13:05:19 +02:00
Sven Van de Velde
4d52c0ce3e Merge pull request #519 from FlightControl-Master/517-Fix-designate-failing-on-empty-set
Fixed #517 - When detected set is empty, script fails when lasing is activated.
2017-05-15 12:40:58 +02:00
FlightControl
cc4a6a5f01 Fixed #517 - When detected set is empty, script fails when lasing is activated.
Now, when there is no target detected and lase is activated, the system
does not crash.
2017-05-15 12:40:32 +02:00
Sven Van de Velde
9053f99960 Merge pull request #510 from FlightControl-Master/TASKING
Updated the mission menu generation and task menu maintenance

-- Added Mission Briefing menu showing the Mission Briefing.
-- Mission menus are generated once for the groups when they belong to
the SetGroup.
2017-05-14 08:34:17 +02:00
FlightControl
7df1963de4 Updated the mission menu generation and task menu maintenance
-- Added Mission Briefing menu showing the Mission Briefing.
-- Mission menus are generated once for the groups when they belong to
the SetGroup.
2017-05-14 08:33:28 +02:00
FlightControl
bb8eaf3f03 Merge remote-tracking branch 'refs/remotes/origin/master' into TASKING 2017-05-14 07:00:43 +02:00
FlightControl
4f806d3e4b Documentation AI_FORMATION 2017-05-13 13:34:57 +02:00
FlightControl
755e71f6d9 Added
-- FormationBox
-- FormationTrail
-- Optimized formation forming by inclination...
2017-05-13 13:29:44 +02:00
FlightControl
4359831423 Updates in POSITIONABLE
-- Added :GetBoundingBox()
-- Added :GetHeight()
-- Updated documentation
2017-05-13 06:36:13 +02:00
FlightControl
bd75743800 Much improved AI_FORMATION version
not the different models supported, but the core logic to route the
followers.
fiew! Was the whole day busy with this!
2017-05-12 18:39:09 +02:00
FlightControl
ea1b204145 Update with correction of angle 2017-05-11 21:48:16 +02:00
FlightControl
f8454daf9f Removed cargo menu is ready. 2017-05-11 21:17:12 +02:00
FlightControl
546b960951 method AI_FORMATION:FormationCenterWing implemented. 2017-05-11 14:10:49 +02:00
FlightControl
98fb15dfb7 Documentation 2017-05-11 12:50:19 +02:00
FlightControl
675e8e7f31 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	docs/Documentation/Task_Cargo.html
2017-05-11 12:49:11 +02:00
FlightControl
15c52e03d9 Documentation updates 2017-05-11 12:48:10 +02:00
Sven Van de Velde
9fbd9000b9 Merge pull request #506 from FlightControl-Master/New-ai-formation
AI_FORMATION documentation
2017-05-11 12:45:41 +02:00
FlightControl
80a88058c0 Documentation 2017-05-11 12:45:01 +02:00
FlightControl
578630f2f2 Merge remote-tracking branch 'refs/remotes/origin/master' into New-ai-formation 2017-05-11 12:39:40 +02:00
Sven Van de Velde
cc7b2fd061 Merge pull request #505 from FlightControl-Master/New-ai-formation
AI_FORMATION class
2017-05-11 12:39:15 +02:00
FlightControl
2c4a33aacb Fixes 2017-05-11 12:38:24 +02:00
FlightControl
d4d5176f51 Merge remote-tracking branch 'refs/remotes/origin/master' into New-ai-formation 2017-05-11 11:47:35 +02:00
FlightControl
b7d37c42af Working Version! 2017-05-11 11:47:30 +02:00
Sven Van de Velde
e387ea5723 Merge pull request #503 from FlightControl-Master/New-ai-formation
Release of AI_FORMATION
2017-05-10 10:37:10 +02:00
FlightControl
b9c51ffc75 Release of AI_FORMATION 2017-05-10 10:33:23 +02:00
FlightControl
d4aa91300d Documentation updates 2017-05-10 09:52:11 +02:00
Sven Van de Velde
172696c3a5 Merge pull request #502 from FlightControl-Master/344-AI-Bomb-Zone
Attack map object added
2017-05-09 21:38:01 +02:00
FlightControl
7c9d6774c4 Documentation 2017-05-09 21:37:24 +02:00
FlightControl
4ed94d9051 Merge remote-tracking branch 'refs/remotes/origin/master' into 344-AI-Bomb-Zone
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-05-09 21:30:18 +02:00
FlightControl
f359c8c380 Attack map object as part of BA 2017-05-09 21:29:19 +02:00
FlightControl
299fef16c1 Fixes for tasking 2017-05-09 14:16:22 +02:00
FlightControl
03d215dc2a Home page change and BAI name changes 2017-05-09 11:25:33 +02:00
Sven Van de Velde
592689d494 Merge pull request #501 from FlightControl-Master/344-AI-Bomb-Zone
344 ai bomb zone
2017-05-09 10:49:00 +02:00
FlightControl
743fa8ced1 new AI_BAI class 2017-05-09 10:40:05 +02:00
FlightControl
f181101d8b Merge remote-tracking branch 'refs/remotes/origin/master' into 344-AI-Bomb-Zone 2017-05-09 09:29:43 +02:00
FlightControl
d8ba37af8d When cargo is destroyed, it will stop working... 2017-05-09 09:29:08 +02:00
FlightControl
ce1f85e09a Fixed menu and deployment of cargo
-- You can now deploy cargo anywhere in the battlefield.
-- The menu generation is improved.
---- No more first remove menu and then build, but "refresh"...
2017-05-08 16:28:36 +02:00
FlightControl
3329465fd3 Improved boarding process
Fixed boarding process when a carrier would ascend while boarding, the
boarding process would be cancelled by the cargo. the carrier is
notified of that event. When the carrier lands again, he can again board
the cargo using the cargo menu options.
2017-05-08 14:57:16 +02:00
FlightControl
2fadd949a6 Fixes 2017-05-07 15:37:27 +02:00
FlightControl
d2d59a7ba3 Fixes cargo 2017-05-06 23:06:21 +02:00
FlightControl
11c20d57fd Fixes
-- Cargo deployment
-- Mission text in menu
-- Event log decrease
2017-05-06 10:11:22 +02:00
FlightControl
192dbadd51 Cargo and smoke 2017-05-05 23:16:57 +02:00
FlightControl
c9121ed672 Menu fixes and Report Fixes
-- Added player count to plannes task menus
-- Detailed task report only shows the players in the task.
-- Added method GetPlayerNames for a Task
-- Added method GetPlayerCount for a Task
-- Started with a threat level implementation on the menus, but there is
a problem with the refresh...
2017-05-05 19:50:28 +02:00
132nd-Entropy
6d4eb818ba Merge pull request #499 from FlightControl-Master/Bugfix-132nd
Fix Missile Distance Message in Missile Trainer Menu
2017-05-05 16:52:53 +02:00
FlightControl
cb7ba702ff Correct handling of crashing player
when assigned to a task
2017-05-05 15:50:21 +02:00
FlightControl
9a54462164 Fixed problem upon mission success. 2017-05-05 14:37:55 +02:00
entropySG
dac4c48850 Fix Missile Distance Message in Missile Trainer Menu 2017-05-05 14:32:56 +02:00
FlightControl
625450ba12 Event prefix can be nil, if the event occurs on a non-spawned group with no # tag. 2017-05-05 13:37:04 +02:00
Sven Van de Velde
96aa49d682 Merge pull request #495 from FlightControl-Master/TASKING
Tasking
2017-05-05 12:47:50 +02:00
FlightControl
6f9bfc4211 Abort logic improvements 2017-05-05 12:40:16 +02:00
FlightControl
0b87b265c7 Fixing abort 2017-05-05 12:05:46 +02:00
FlightControl
1c4002fb37 Fixes abort 2017-05-05 11:50:24 +02:00
FlightControl
82477c93d2 Fixed abort logic and trace overhead on menus 2017-05-05 11:45:17 +02:00
FlightControl
02e2f21ec6 test good abort
when more than one player is still assigned to the task, the task should
not abort, only the player...
2017-05-05 10:57:29 +02:00
FlightControl
99cbe0c8bb Heavy rework of the menus and now it is much better 2017-05-05 10:50:12 +02:00
FlightControl
7a84b6cc35 Improvements on task assignment logic 2017-05-05 09:34:51 +02:00
FlightControl
16e6730dc1 Trace 2017-05-04 16:19:04 +02:00
FlightControl
e3a0a67fa5 Update Task Abort process 2017-05-04 15:53:25 +02:00
FlightControl
baa891c7f5 Merge remote-tracking branch 'refs/remotes/origin/master' into TASKING 2017-05-04 15:53:09 +02:00
FlightControl
4130b833fb Turn off default menu 2017-05-04 15:36:46 +02:00
Sven Van de Velde
cb33fde27b Merge pull request #493 from FlightControl-Master/TASKING
Tasking
2017-05-04 14:32:31 +02:00
FlightControl
5bb91646d7 Updates 2017-05-04 14:23:10 +02:00
FlightControl
a499c04fa4 Fix crash 2017-05-04 14:05:57 +02:00
FlightControl
b4107b14f8 Eliminate trace details 2017-05-04 13:33:13 +02:00
FlightControl
2519fcde48 No loop logic 2017-05-04 12:25:50 +02:00
FlightControl
559e668ff9 Updates 2017-05-04 12:22:05 +02:00
Sven Van de Velde
c998151a74 Merge pull request #491 from FlightControl-Master/Grey-Echo
Slate Documentation
2017-05-04 10:38:47 +02:00
FlightControl
0eb9d1917b Updates 2017-05-04 10:19:34 +02:00
FlightControl
4fcb7be9fc Merge remote-tracking branch 'refs/remotes/origin/master' into TASKING 2017-05-04 09:00:29 +02:00
Sven Van de Velde
92246b45d6 Merge pull request #492 from FlightControl-Master/489-Detection-Unit
Attempt to fix the count problem
2017-05-04 06:35:36 +02:00
FlightControl
a06c6176a2 Attempt to fix the count problem 2017-05-04 06:33:40 +02:00
Grey-Echo
0deab0c625 Add the deploy script
Dac update too
2017-05-03 18:04:41 +02:00
Grey-Echo
be983ccbd5 Doc 2017-05-03 16:58:31 +02:00
Grey-Echo
7b2f0fda9c Update to the documentation generation process
Include a doc update too.
2017-05-03 16:35:34 +02:00
Sven Van de Velde
9ca007ccf4 Merge pull request #490 from FlightControl-Master/489-Detection-Unit
Optimizations for detection. fixes issue #489
2017-05-03 12:07:40 +02:00
FlightControl
c7d6027734 Optimizations for detection
-- Detected range will now correctly update between detections.
-- Detected known or unknown type will now be correctly reported.
-- Detected distance is now correctly estimated or known.
-- Removed visual detection, because it just is not working correctly.
-- Cleaned up the code.
-- Added new fields in DetectedObject structure.
-- Added parameters for IsTargetDetected API
2017-05-03 12:05:15 +02:00
FlightControl
26033a4172 Check players 2017-04-27 12:11:09 +02:00
FlightControl
5a2594853c Remove static event trace of tires 2017-04-27 10:22:29 +02:00
FlightControl
c5587304f7 Trace every event. Some stuff is fishy on MP 2017-04-27 10:12:48 +02:00
FlightControl
90f614a5c0 Merge remote-tracking branch 'refs/remotes/origin/master' into TASKING 2017-04-27 10:01:31 +02:00
Sven Van de Velde
5c06aaf3ed Merge pull request #484 from FlightControl-Master/TASKING
Improvements... Fixes
2017-04-26 22:36:38 +02:00
FlightControl
858670ab80 Improvements 2017-04-26 22:34:17 +02:00
Sven Van de Velde
979bc8cf8b Merge pull request #483 from FlightControl-Master/480-tasks-added-fix
Fixed issue #480

-- The logic has been reviewed
-- There is now a direct link between the Detection ID and the Task in the A2G_TASK_DISPATCHER.
- The Task is searched by Detection ID. Thus, any task with a different name but already existing is either removed and re-added, or, left untouched. So, a BAI task will stay a BAI task if the task has been assigned to a group.
- If a Task is Planned, it will be evaluated to be deleted, but only then. Any other status will keep the task.
- Improved the message appearing of the available tasks of a Mission after a detection run.
2017-04-26 21:35:35 +02:00
FlightControl
8e9129b3b6 Fixed issue #480 2017-04-26 21:31:23 +02:00
Sven Van de Velde
3451ee837d Merge pull request #482 from FlightControl-Master/479-Task-Status-Reporting-updating
Fixeds for tasking
2017-04-26 11:34:15 +02:00
FlightControl
755343d02e Fixeds for tasking
- Fixed the hanging report (I think)
- Fixed the routing messages appearing every time again
- Fixed the Task menu
2017-04-26 11:33:48 +02:00
FlightControl
303b3a0efe First version 2017-04-26 09:59:10 +02:00
Sven Van de Velde
6e353cf893 Merge pull request #475 from FlightControl-Master/456-cargo-landing-event
Fixed #456
2017-04-26 06:29:46 +02:00
FlightControl
d369a1be9f Fixed #456
-- After landing the tasking menu is displayed again.
-- The cargo is boarded properly now. Every 15 seconds is checked if the
cargo is still moving.
2017-04-26 06:29:16 +02:00
Sven Van de Velde
a87ab0fd82 Merge pull request #474 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-25 21:45:01 +02:00
FlightControl
1977296a12 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-25 21:44:37 +02:00
FlightControl
664ce52ff0 R.2.1 update 2017-04-25 21:44:34 +02:00
Sven Van de Velde
f595fd4736 Merge pull request #473 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-25 21:30:14 +02:00
FlightControl
1219ee9445 Fixes Task Status Report 2017-04-25 21:28:32 +02:00
FlightControl
b2b1377962 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-25 21:28:09 +02:00
Sven Van de Velde
302a69ba48 Merge pull request #470 from FlightControl-Master/Grey-Echo
Remove MDES from repository
2017-04-25 21:14:20 +02:00
Sven Van de Velde
292642c1f5 Merge pull request #471 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-25 21:14:01 +02:00
FlightControl
ba53713f8d Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-25 21:13:32 +02:00
FlightControl
2066becb17 Fix for craigowen and fixing issue #424 2017-04-25 21:13:29 +02:00
dwpenney
13bb4345e2 Merge pull request #459 from FlightControl-Master/ForEachStatic
DATABASE:ForEachStatic
2017-04-25 13:13:33 -03:00
Grey-Echo
6cbf6ab158 Remove MDES from repository 2017-04-25 13:50:18 +02:00
FlightControl
d9091392cd Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-25 13:11:47 +02:00
Sven Van de Velde
417a6b2a06 Merge pull request #469 from FlightControl-Master/386-ai-designate
Publishing new Menu driven reporting structure for TASKING
2017-04-25 12:56:42 +02:00
FlightControl
0456deddd7 Publishing new Menu driven reporting structure for TASKING
-- Each group can now select from a menu to report a task overview or
only the task with a specific state...
-- Dactivate the flashing of the available tasks. A small message is
displayed now.
2017-04-25 12:56:02 +02:00
Sven Van de Velde
b966168be9 Merge pull request #468 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-25 10:19:42 +02:00
FlightControl
8d6b1940bb Play time
-- Improved menu system. Much shorter Detection menus now.
-- Improved Detection IDs. Each detection item has now an ID.
-- Added coordinate system.
-- Added menu system to manage coordinates. A system settings menu has
been added.
-- Coordinates can now be switched between LL Degrees, LL Decimal and
MGRS
-- COORDINATE class added.
2017-04-25 10:17:10 +02:00
FlightControl
9d68376abb Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-24 21:57:09 +02:00
FlightControl
f7c08e11f9 Coordinate stuff 2017-04-24 21:56:59 +02:00
Sven Van de Velde
94e092fb2e Merge pull request #466 from FlightControl-Master/386-ai-designate
fix in illumination
2017-04-24 20:29:06 +02:00
FlightControl
b4f4490805 fix in illumination 2017-04-24 20:28:25 +02:00
Sven Van de Velde
b6a48d0201 Merge pull request #465 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-24 14:01:46 +02:00
FlightControl
6459ee4329 Documentation 2017-04-24 14:01:17 +02:00
FlightControl
2244a2de24 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-24 14:01:00 +02:00
Sven Van de Velde
34cca8a4ba Merge pull request #464 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-24 13:25:23 +02:00
FlightControl
405033ecd0 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-24 13:24:50 +02:00
FlightControl
4d0740ca6f Fix MenuAttackGroup bug 2017-04-24 13:24:47 +02:00
Sven Van de Velde
884c8a233f Merge pull request #463 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-24 13:05:42 +02:00
FlightControl
456636601f Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-24 13:04:28 +02:00
FlightControl
6b3fe625e5 Important changes
-- Renamed AI_DESIGNATE to DESIGNATE
-- Added a parameter to the New() method: CC.
The declaration prototype is now:
`function DESIGNATE:New( CC, Detection, AttackSet )`

I've added a lot of good stuff in the clas now. Almost ready.
2017-04-24 13:04:25 +02:00
Sven Van de Velde
5cbc737727 Merge pull request #462 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-24 12:39:04 +02:00
FlightControl
f6b64a8170 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-24 12:38:26 +02:00
FlightControl
f410d2ae0b A lot of fixes
See #386
2017-04-24 12:38:24 +02:00
Sven Van de Velde
e1839f4b28 Merge pull request #460 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-23 21:34:05 +02:00
FlightControl
a8da12c09d Documentation 2017-04-23 21:33:15 +02:00
Fridge
431f810d21 Merge branch 'master' into ForEachStatic 2017-04-23 13:54:57 -03:00
Fridge
9e882104f0 Addition of DATABASE:ForEachStatic 2017-04-23 13:54:23 -03:00
FlightControl
3fb1d75151 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-23 17:49:05 +02:00
FlightControl
8761cc754c Changed documentaiton 2017-04-23 17:49:02 +02:00
Sven Van de Velde
b619ef6a3b Merge pull request #458 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-23 17:10:01 +02:00
FlightControl
e5b83aafe3 Documentation 2017-04-23 17:09:29 +02:00
FlightControl
6c018acc79 Documentation 2017-04-23 17:09:03 +02:00
Sven Van de Velde
9586ab9fc6 Merge pull request #457 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-23 13:51:05 +02:00
FlightControl
20b4ebfb2b Improvements 2017-04-23 13:49:32 +02:00
FlightControl
8a5a33d191 Progress 2017-04-23 10:04:11 +02:00
FlightControl
1cc89942d1 Progress 2017-04-23 08:49:12 +02:00
FlightControl
cfeec372d7 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-23 08:48:40 +02:00
FlightControl
7961ae90f4 Progress 2017-04-23 08:48:30 +02:00
Grey-Echo
45640b5316 Merge pull request #453 from FlightControl-Master/issue437
Add cool features related to Zones in SET_GROUP
2017-04-22 15:22:40 +02:00
Grey-Echo
7bb60f51bb Merge branch 'master' into issue437 2017-04-22 15:21:43 +02:00
Sven Van de Velde
cb50facd9a Merge pull request #454 from FlightControl-Master/386-ai-designate
386 ai designate

-- Working alpha version. It is FANTASTIC!!!!
PLEASE TRY gents, you don't know what you're missing if you don't.

Sven
2017-04-22 15:12:53 +02:00
FlightControl
e80b90fcf6 Progress 2017-04-22 15:11:02 +02:00
FlightControl
456b3f483f Progress 2017-04-22 15:10:31 +02:00
Grey-Echo
f1a9029bc6 Documentation update 2017-04-22 14:56:30 +02:00
Grey-Echo
09325a8615 Correct inprecise documentation 2017-04-22 14:54:13 +02:00
Grey-Echo
de3f8f529f SET_GROUP:CountUnitInZone() 2017-04-22 14:38:00 +02:00
Grey-Echo
d0e138b4c7 Implement GROUP:CountInZone() and SET_GROUP:CountInZone() 2017-04-22 14:35:51 +02:00
Grey-Echo
18756eb61e Implement the new SET_GROUP:AnyPartlyInZone() 2017-04-22 14:18:39 +02:00
FlightControl
036768d400 Progress! 2017-04-22 13:53:54 +02:00
Grey-Echo
fb6bb635c6 Documentation Update 2017-04-22 11:35:14 +02:00
Grey-Echo
28380a5c37 Merge branch 'master' into issue437 2017-04-22 11:33:45 +02:00
Grey-Echo
980053916b Solves a bug in GROUP:IsPartlyInZone()
If only the first UNITs of the GROUP where outside the ZONE, the function would still return false
This behaviour is fixed by this commit.
2017-04-22 11:15:16 +02:00
FlightControl
4138a54e6b Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-22 07:10:25 +02:00
Grey-Echo
497a2c17d0 Add @usage tags to all newly added methods 2017-04-22 01:22:48 +02:00
Grey-Echo
02bb76792a Improve documentation in newly added methods in SET_GROUP, correct faulty logic in SET_GROUP:AnyPartlyInZone() 2017-04-22 01:16:19 +02:00
Grey-Echo
a058556583 Implement SET_GROUP:NoneInZone() 2017-04-22 01:12:33 +02:00
Grey-Echo
bfda34e94d Implement SET_GROUP:AnyCompletelyInZone
Also renames the 2 previously implemented funcitons
2017-04-22 01:06:35 +02:00
Grey-Echo
56eaa16792 Implement SET_GROUP:IsCompletelyInZone() 2017-04-21 14:16:32 +02:00
Grey-Echo
0b39e1a911 Implement SET_GROUP:HasGroupCompletelyInZone() 2017-04-21 14:07:06 +02:00
Sven Van de Velde
1068393dde Merge pull request #452 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-21 14:02:16 +02:00
FlightControl
51022be4d4 Working version 2017-04-21 14:01:01 +02:00
FlightControl
a79bc11834 Progress 2017-04-21 06:58:28 +02:00
FlightControl
f4fd7d43f3 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-21 05:59:24 +02:00
Sven Van de Velde
e90de251b0 Merge pull request #451 from FlightControl-Master/Grey-Echo
Remove submodule
2017-04-21 05:19:22 +02:00
Grey-Echo
de2f60ad1f Rmove submodule 2017-04-21 00:43:14 +02:00
Sven Van de Velde
a304d53cf0 Merge pull request #450 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-20 22:00:31 +02:00
FlightControl
dbf95924eb Updated logic... 2017-04-20 21:59:09 +02:00
Sven Van de Velde
c5f64aeafc Merge pull request #449 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-20 20:55:45 +02:00
FlightControl
7e55dd8a7c Laser fix! 2017-04-20 20:55:11 +02:00
FlightControl
5b901babfa Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-20 20:54:51 +02:00
FlightControl
8dfd05a453 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-20 20:02:37 +02:00
Andrew Finegan
ece2d8a976 Merge pull request #448 from FlightControl-Master/bugfix-447-crash-caused-by-client-destroy
Bugfix 447 crash caused by client destroy
2017-04-20 13:24:02 -04:00
Andrew Finegan
a5e455a00f Revert "Commenting out client:destroy() to prevent server crash"
This reverts commit 8e02e784bc.
2017-04-20 13:08:21 -04:00
Andrew Finegan
96d97a6e51 Prevent Server Crash from Unit Destroy
Destroying a client unit while that client it on a multiplayer server
WILL crash the server. The proper way of handling this is to set a flag
and let MOOSE-SERVER handle the kicking part. This part hasnt been
written yet, but is being worked on
2017-04-20 13:03:42 -04:00
Andrew Finegan
8e02e784bc Commenting out client:destroy() to prevent server crash
Commenting out destroy client unit until MOOSE-SERVER can handle kicking
of people
2017-04-20 12:57:30 -04:00
FlightControl
e53303b71a regenerate documentation 2017-04-20 18:06:27 +02:00
Sven Van de Velde
872c0219ba Merge pull request #446 from FlightControl-Master/Grey-Echo
Solves problem after pull request #444
2017-04-20 17:17:26 +02:00
Grey-Echo
c172a03006 Solves problem after pull request #444 2017-04-20 17:03:46 +02:00
FlightControl
2e573a99e0 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-20 14:41:09 +02:00
Grey-Echo
635f9d1bee Merge pull request #444 from FlightControl-Master/beacons
Beacons
2017-04-20 14:39:27 +02:00
Sven Van de Velde
80857244a4 Merge pull request #445 from FlightControl-Master/386-ai-designate
386 ai designate
2017-04-20 14:15:27 +02:00
FlightControl
ac5686b9cc Final 2017-04-20 14:14:54 +02:00
FlightControl
ca3ee12c41 Finalized AI_DESIGNATE 2017-04-20 14:14:39 +02:00
Grey-Echo
ae93ea8b63 Documentation update 2017-04-20 12:53:00 +02:00
Grey-Echo
0d9f78e8bf Merge branch 'master' into beacons 2017-04-20 12:52:09 +02:00
Grey-Echo
23df0aaa68 Added documentation for BEACON 2017-04-20 12:49:18 +02:00
Grey-Echo
ed4b89dcbc Revamp of RADIO's doc 2017-04-20 12:29:58 +02:00
Grey-Echo
65cf152b4f Add loop functionnality to standard radio transmissions 2017-04-20 12:22:26 +02:00
Grey-Echo
e4145dbefd Small tweaks to module doc 2017-04-20 12:15:37 +02:00
Grey-Echo
94ad317e61 Small bufixes to BEACON 2017-04-20 12:10:36 +02:00
FlightControl
e946c6a863 Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-20 09:52:02 +02:00
Grey-Echo
510ff2f32f Implement BEACON:StopRadioBeacon 2017-04-20 00:19:52 +02:00
Grey-Echo
8c57d86bca Implement BEACON:RadioBeacon() 2017-04-20 00:07:50 +02:00
Grey-Echo
26cf190920 Laying the groundwork for BEACON:RadioBeacon() 2017-04-19 23:49:41 +02:00
Sven Van de Velde
ee4e9621c4 Merge pull request #443 from FlightControl-Master/386-ai-designate
386 ai designate
-- Built a target designate capability based on dynamically detected targets by Recces.
-- Added a AI_DESIGNATE class
-- Added a SPOT class
-- Added Lase functions for POSITIONABLES
-- Added demo mission DES-100

Please check it out!!!!
Sven
2017-04-19 19:43:29 +02:00
FlightControl
cb5510d047 Publish to master 2017-04-19 19:41:26 +02:00
FlightControl
b1c7e04422 Progress 2017-04-19 19:13:23 +02:00
Grey-Echo
adfe811291 Major Changes in BEACON
After tests, the beacon functionnality is even more limited in DCS than what I thought.
Those changes accomode the new data from these tests.
2017-04-19 16:59:05 +02:00
FlightControl
3a3869e095 Lasing is working 2017-04-19 16:53:35 +02:00
Grey-Echo
bbcf6c4717 Implements POSITIONNABLE:GetBeacon() 2017-04-19 15:46:53 +02:00
Grey-Echo
3c80fdafcd Implement BEACON:StopAATACAN() 2017-04-19 15:40:54 +02:00
Grey-Echo
42ec0d6332 Merge branch 'master' into beacons 2017-04-19 15:33:24 +02:00
FlightControl
a7a327285f Merge remote-tracking branch 'refs/remotes/origin/master' into 386-ai-designate 2017-04-19 14:41:50 +02:00
Sven Van de Velde
86715794d7 Merge pull request #441 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-19 14:34:14 +02:00
FlightControl
48ea8d33d5 Merge remote-tracking branch 'refs/remotes/origin/master' into master-353-task-cargo-transport 2017-04-18 19:08:47 +02:00
FlightControl
f4a15aa316 Fixed glitch in cargo transfer as a result of the rework 2017-04-18 19:08:44 +02:00
Sven Van de Velde
841e611e3c Merge pull request #439 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-18 10:24:43 +02:00
FlightControl
c8b4a9839d Merge remote-tracking branch 'refs/remotes/origin/master' into master-353-task-cargo-transport 2017-04-18 10:24:14 +02:00
FlightControl
f6f91a0f23 Fixed the boarding and unboarding process for CARGO_GROUP 2017-04-18 10:24:12 +02:00
Sven Van de Velde
83dd39d318 Merge pull request #436 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-17 18:54:39 +02:00
FlightControl
469e1a3c9b This fixes issue #433 2017-04-17 18:53:32 +02:00
FlightControl
59c89cab39 Merge remote-tracking branch 'refs/remotes/origin/master' into master-353-task-cargo-transport 2017-04-17 18:47:22 +02:00
FlightControl
e57fdc2135 Added google tracking ID 2017-04-17 11:51:03 +02:00
FlightControl
e0829ce986 Fixes Interceptor to Battleplane
SU-25 is  battleplane ... A2G plane with A2A capatilies.
Fixes issue #421
2017-04-17 11:42:10 +02:00
FlightControl
ecde6ad694 Made A2G_TASK_DISPATCHER only detect ground units.
This solves issue #425 ...
2017-04-17 11:34:12 +02:00
FlightControl
040a342e25 Updated documentation in AI_CAP, AI_CAS, AI_BALANCER, AI_PATROL 2017-04-17 11:18:01 +02:00
FlightControl
a89c469130 Updated documentation of SCHEDULER and ZONE and FSM 2017-04-17 07:49:11 +02:00
FlightControl
0e7ebff9a2 MENU documentation update 2017-04-16 17:07:26 +02:00
FlightControl
d8e8a31cf7 Updated MESSAGE documentation 2017-04-16 16:38:47 +02:00
FlightControl
9ccd0cb6dd POINT_VEC3 and POINT_VEC2 documentation update 2017-04-16 16:36:27 +02:00
Sven Van de Velde
465a1fa7e0 Merge pull request #432 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-16 08:10:06 +02:00
FlightControl
898976d437 Fixed for cargo hitting client helicopter
When unboarding, the cargo would it the client helicopter on the path,
this is fixed by positioning the cargo at the direction of the target
unboarding point. No helicopter anymore in between.
2017-04-16 08:09:20 +02:00
FlightControl
f1ba010611 Merge remote-tracking branch 'refs/remotes/origin/master' into master-353-task-cargo-transport 2017-04-15 13:43:37 +02:00
Sven Van de Velde
1b15732b69 Merge pull request #430 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-15 13:20:24 +02:00
FlightControl
1b7623baa6 Progress 2017-04-15 13:19:15 +02:00
FlightControl
59d9eb127d Progress 2017-04-15 12:13:34 +02:00
FlightControl
db58a1b922 Merge remote-tracking branch 'refs/remotes/origin/master' into master-353-task-cargo-transport 2017-04-14 17:05:08 +02:00
FlightControl
4761e7150a Update web site 2017-04-14 09:49:29 +02:00
FlightControl
b245ed0e1d Update web site 2017-04-14 09:48:00 +02:00
FlightControl
2ab00d22a6 Rename Task_Cargo 2017-04-14 09:43:29 +02:00
FlightControl
329c89f12f Rename Task_Cargo 2017-04-14 09:42:35 +02:00
Sven Van de Velde
978de23c28 Merge pull request #428 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
2017-04-14 09:34:33 +02:00
FlightControl
798996efd2 Documentation etc 2017-04-14 09:31:44 +02:00
FlightControl
9a2b56fb9f Optimized landing, messaging, flow 2017-04-14 08:26:53 +02:00
FlightControl
ff64255ea7 CARGO_GROUP working!!! 2017-04-14 05:43:09 +02:00
FlightControl
0b59fb87f2 Progress 2017-04-13 09:53:27 +02:00
FlightControl
1a5a74120b Progress 2017-04-13 09:42:22 +02:00
FlightControl
c20f13f0f8 Progress 2017-04-13 08:45:28 +02:00
FlightControl
92c5e0c592 Documentation update 2017-04-12 18:02:17 +02:00
Sven Van de Velde
ccdbed3159 Merge pull request #420 from FlightControl-Master/enhancement-353-task-cargo-transport
Enhancement 353 task cargo transport
2017-04-12 17:35:22 +02:00
Sven Van de Velde
d62cd7562b Merge branch 'master-353-task-cargo-transport' into enhancement-353-task-cargo-transport 2017-04-12 17:35:10 +02:00
FlightControl
c9602ab292 Documentation Update 2017-04-12 16:09:59 +02:00
FlightControl
853f780015 Fixes issue #398
-- I think this should fix it!
2017-04-12 15:15:37 +02:00
FlightControl
3d6e24b806 SPAWN fix issue #410 documentation update 2017-04-12 14:57:55 +02:00
FlightControl
989df023fb Fixes issue #410
-- SpawnScheduleStart and SpawnScheduleStop now return self
-- Proper documentation
-- SPA-023 test mission added.
2017-04-12 14:57:12 +02:00
FlightControl
58935ec1e2 Updated SPAWNSTATIC documentation 2017-04-12 14:45:54 +02:00
Sven Van de Velde
ed0a86647b Merge pull request #416 from FlightControl-Master/master-405-event-handling
Master 405 event handling

I have reworked event handling:
-- Avoid events not being handled whey they should.
-- Clean up the subscriptions when Groups or Units are dead.
-- Reinitiate the subscriptions when Groups or Units are respawned.
-- EVENT_HIT is only for Targets when the subscription is on UNIT or GROUP level.
-- MISSION_END should work now too ...
-- When a subscribed object is nillified, and the collectgarbage() is executed, it should clean the subscription.
-- Reworked and cleaned the event handling...
-- Cleaned up the code
2017-04-12 09:28:48 +02:00
FlightControl
573f444254 New dynamic loader 2017-04-12 09:27:52 +02:00
FlightControl
3bf9eab704 Merge remote-tracking branch 'refs/remotes/origin/master' into master-405-event-handling
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-04-12 09:26:27 +02:00
FlightControl
545034034e Fixes issue #412
-- wrong usage of IsCompletelyInZone() on UNIT level fixed -> Changed to
IsInZone()
2017-04-12 09:16:56 +02:00
Sven Van de Velde
e6b9da2fcb Merge pull request #418 from FlightControl-Master/master-415
Implemented :FilterCategories() method for DETECTION_ classes fixing issue #415
2017-04-12 09:01:16 +02:00
FlightControl
d7f1a74caf Implemented :FilterCategories() method for DETECTION_ classes fixing issue #415
--  Added:FilterCategories() method to DETECTION_BASE.
-- Reviewed documentation
-- Added documentation for FilterCategories method
-- Default detection methods are all ON. (They were only set to visual).
-- Created test missions. DET-30x
2017-04-12 09:00:00 +02:00
FlightControl
86fd99f356 Fixes #414 2017-04-12 07:18:26 +02:00
FlightControl
306ac64bd3 Updated SPAWN
-- Revised documentation
-- Initial delay OFF by default for SpawnScheduled() spawning. Use the
InitDelayOn() to activate the delays.
2017-04-11 20:35:46 +02:00
Sven Van de Velde
b1ff20f218 Merge pull request #417 from FlightControl-Master/master-enh-327-spawnstatic
Master enh 327 spawnstatic

SPAWNSTATIC is ADDED....

Try the new mission SPS-100 in the MOOSE_MISSIONS repository. Open the SPS-100 - Simple Spawning.lua and check the code (I listed it here):

local ZonePosition = ZONE:New( "Position" )

local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY )
local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY )

local ZonePointVec2 = ZonePosition:GetPointVec2()

local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 )

for Heading = 0, 360,60 do
  local Radial = Heading * ( math.pi*2 ) / 360
  local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150
  local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150
  SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 )
end

What this code does is:

    It identifies the Zone "Position" where to do the spawning.
    It creates two SPAWNSTATIC objects, one for a building and one for barracks.
    A building is created in the center of the Zone.
    Barracks are created around the center of the Zone.

A couple of points I would like to ask you to consider:

    For simplicity, I think it is the best to have one SPAWNSTATIC object per Static you want to spawn. => Is this ok?
    The only SPAWNSTATIC constructor working at this moment is NewFromStatic. The other planned constructor is NewFromType, but this will need more work to make.
    Two Spawn methods are created: SpawnFromPointVec2() and SpawnFromZone(). => Is this sufficient???
    There won't be any Init methods... => Is this ok???
    There won't be any Respawn methods... => Is this ok???
    What other Spawn APIs would you like to see... => Please think of the process or things you want to do with Statics....
    The naming of the created statics is the TemplateName#nnnnn, where nnnnn is the index of the static spawned. In the Spawn methods, you can give optionally a new name of the Static, overriding the template name.
    There is a question on Country. Each Static has a country. I can set it for default at the constructor, and optionally, if you really want that, I can allow to give an override CountryID parameter when Spawning (not my preference though, because then you'll get two optional parameters in the Spawn methods, one for the new name, and one for the country => confusing ).
    I see Pikey is looking for an additional check of the ground. To be honest, not so easy to implement and also, what is the value if the MD defines a wrong position???

pls test and consider the questions...
2017-04-11 09:05:54 +02:00
FlightControl
e65bfd28f3 Merge remote-tracking branch 'refs/remotes/origin/master' into master-enh-327-spawnstatic 2017-04-11 08:59:53 +02:00
FlightControl
b21bbb7cbd Reducing trace with one line 2017-04-11 08:52:24 +02:00
FlightControl
96de81fef3 Fixed Dead event and Crash event glitch
When a Dead or Crash event happens on UNIT or GROUP level, the
OnEventFunction is also called now!!!
2017-04-11 08:43:03 +02:00
FlightControl
8629b1c36f Merge remote-tracking branch 'refs/remotes/origin/master' into master-405-event-handling 2017-04-11 08:31:12 +02:00
FlightControl
af3558e2c0 Fixed Update All Test Missions .launch file 2017-04-11 08:29:24 +02:00
FlightControl
12948f583d Added Reset of event subscriptions after GROUP:Respawn() 2017-04-11 08:20:54 +02:00
FlightControl
51c1da3557 Added Event Reset for SPAWN, GROUP and UNIT on SPAWN:ReSpawn() 2017-04-11 08:19:06 +02:00
FlightControl
321a33f0f6 Fixed error with EventMeta 2017-04-11 07:02:01 +02:00
FlightControl
c8cf0e2cc5 Updated improved version ...
-- Fixed error in HIT processing. HIT events are only for the Target,
when set on UNIT or GROUP level!
2017-04-11 07:01:44 +02:00
FlightControl
785a297a69 Progress version 2 -- better version ... 2017-04-10 16:45:37 +02:00
FlightControl
553435bbcb Event fix, version 1 pre-alpha test version... 2017-04-10 16:14:27 +02:00
FlightControl
2b622c0a02 Progress 2017-04-09 07:53:34 +02:00
FlightControl
8440cb01ab First Version 2017-04-08 14:05:28 +02:00
Sven Van de Velde
73d1b3b439 Merge pull request #411 from FlightControl-Master/master-enh-125-spawn-schedule-delay
SPAWN Delay implementation

-- New methods SPAWN:InitDelayOnOff(), SPAWN:InitDelayOn(), SPAWN:InitDelayOff()
-- Default is delay is on, but only for :SpawnScheduled()
-- Did a large review of the SPAWN documentation (for dummies).
-- Moved the SPAWN class documentation to the SPAWN object, so that it becomes visible in intellisense.
-- Added Demo Mission links
-- Added Youtube channel links
2017-04-08 08:07:41 +02:00
FlightControl
9e2c66dae4 SPAWN Delay implementation
-- New methods SPAWN:InitDelayOnOff(), SPAWN:InitDelayOn(),
SPAWN:InitDelayOff()
-- Default is delay is on, but only for :SpawnScheduled()
-- Did a large review of the SPAWN documentation (for dummies).
-- Moved the SPAWN class documentation to the SPAWN object, so that it
becomes visible in intellisense.
-- Added Demo Mission links
-- Added Youtube channel links
2017-04-08 08:06:29 +02:00
Grey-Echo
fb4fc4add1 Merge pull request #401 from FlightControl-Master/Grey-Echo
Changes to the documentation generation
2017-04-05 14:27:21 +02:00
Grey-Echo
d5adf0a282 Resolve problems with Zone.lua
also generate Dynamic Loader (forgot to generate it after generating static for tests)
2017-04-05 09:35:06 +02:00
Grey-Echo
3ca84adb53 Merge branch 'master' into Grey-Echo 2017-04-05 01:31:01 +02:00
Grey-Echo
3b69cf992e This is an important refactor of the way documentation generation works
* Installs luarocks WITH it's executable (easy to install other rocks if necessary)
* Use Lua supplied with luarocks
* Create Utils/luadocumentor.bat, which works with RELATIVE PATH ! -> Everybody can generate the doc
* Updated launch files accordingly
2017-04-05 01:26:39 +02:00
Sven Van de Velde
0de157ebe1 Merge pull request #391 from FlightControl-Master/readme
Changed wrong link to Moose_Missions
2017-04-04 21:09:28 +02:00
Grey-Echo
35e88c27c5 Changed wrong link to Moose_Missions 2017-04-03 15:32:42 +02:00
Sven Van de Velde
c2517d399c Merge pull request #389 from FlightControl-Master/Usage-guide
Correct the link for test missions
2017-04-02 22:35:43 +02:00
Grey-Echo
0ef9a26222 Start of BEACON:StopAATACAN() 2017-04-02 22:12:34 +02:00
Grey-Echo
7263bdeaf0 Correct the link for test missions 2017-04-02 22:08:15 +02:00
Grey-Echo
411982d557 Implement AATACAN() 2017-04-02 19:21:15 +02:00
Grey-Echo
a7e3f1a961 Merge branch 'master' into beacons 2017-04-02 18:50:59 +02:00
Sven Van de Velde
43624e4067 Merge pull request #388 from FlightControl-Master/FlightControl-task-cargo-transport
Flightcontrol task cargo transport
2017-04-02 15:33:12 +02:00
FlightControl
118afde739 Merge remote-tracking branch 'refs/remotes/origin/enhancement-353-task-cargo-transport' into FlightControl-task-cargo-transport
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-04-02 15:32:09 +02:00
Grey-Echo
513a103947 Merge pull request #387 from FlightControl-Master/Grey-Echo
* Add a Utils folder with 7-Zip and lua
*  Changes Moose \Mission Setup\Moose Mission Update\Moose_Update_Missions.bat to use 7-Zip in Utils
* Removes 7-Zip in \Mission Setup\Moose Mission Update\
* Changes every .lauch file to use \Utils\lua\5.1\bin\lua.exe instead of PATH

Known Issue : Moose Development\LDT External Tools\Moose DOCUMENTATION Generate.launch does NOT work for contrbutors other than @FlightControl-Master , need to update \Utils\lua\5.1\bin\luadocumentor.bat with new paths
2017-04-02 14:47:16 +02:00
Grey-Echo
6d90661738 Merge branch 'master' into Grey-Echo 2017-04-02 12:46:41 +02:00
Grey-Echo
1a863261a8 Updates to lauch files, add Utils with 7-Zip and lua
Known bug : .lauch file Generate doc doesn't work, it needs an update to luadocumentor.bat
2017-04-02 12:37:25 +02:00
FlightControl
17a332cf16 Update .launch files 2017-04-02 11:48:17 +02:00
FlightControl
7e9b97dda0 Documentation 2017-04-02 09:39:00 +02:00
FlightControl
f8f68ea695 Progress 2017-04-02 09:16:34 +02:00
FlightControl
2e2aabdcc9 Progress 2017-04-02 08:04:43 +02:00
FlightControl
bad2e81c56 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-task-cargo-transport 2017-04-02 05:53:52 +02:00
Grey-Echo
b846757f4d Changes to BEACON 2017-04-01 22:45:52 +02:00
FlightControl
6c4c149349 Fix 368 2017-04-01 20:58:06 +02:00
Grey-Echo
f9afe8c937 Add a start for BEACON:AATACAN() 2017-04-01 19:33:42 +02:00
Grey-Echo
c752264325 Implement constructor an TACANToFrequecy to BEACON 2017-04-01 15:18:41 +02:00
FlightControl
293267f760 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-task-cargo-transport
# Conflicts:
#	Moose Development/Moose/Moose.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/TAD - Task Dispatching/TAD-100 - A2G Task
Dispatching DETECTION_AREAS/TAD-100 - A2G Task Dispatching
DETECTION_AREAS.lua
2017-04-01 15:02:51 +02:00
Sven Van de Velde
72603601b1 Merge pull request #385 from FlightControl-Master/master-release-prep
Release 2.0!!!! Note that this is the DYNAMIC loading Moose.lua that is published here!!!!
2017-04-01 11:08:02 +02:00
FlightControl
6c112193ed Ensure dynamic loading is enabled... 2017-04-01 11:03:44 +02:00
FlightControl
c5107f1b8a Merge remote-tracking branch 'refs/remotes/origin/master' into master-release-prep 2017-04-01 09:01:00 +02:00
Sven Van de Velde
bd0c78492a Set theme jekyll-theme-architect 2017-04-01 08:52:49 +02:00
Sven Van de Velde
c910a7a29b Set theme jekyll-theme-merlot 2017-04-01 08:51:11 +02:00
Sven Van de Velde
9085838189 Set theme jekyll-theme-architect 2017-04-01 08:41:27 +02:00
Sven Van de Velde
1b85fbfab3 Merge pull request #384 from FlightControl-Master/Tweaks-to-Readme
Tweaks to readme
2017-04-01 08:17:03 +02:00
Grey-Echo
a49c5b2dea Hope this works 2017-03-31 22:52:14 +02:00
Grey-Echo
756e5170a8 Merge pull request #383 from FlightControl-Master/usage_guide
Small tweaks to Usage_Guide.md
2017-03-31 21:20:23 +02:00
Grey-Echo
6de01e3303 Small tweaks to Usage_Guide.md 2017-03-31 17:45:43 +02:00
Grey-Echo
666e0b115b Small tweaks to README.md 2017-03-31 17:21:54 +02:00
FlightControl
64d2a49cc6 Merge remote-tracking branch 'refs/remotes/origin/master' into master-release-prep 2017-03-31 14:31:22 +02:00
FlightControl
0c7622969d Fixes in documentation 2017-03-31 14:31:00 +02:00
Sven Van de Velde
3405b3f203 Merge pull request #380 from FlightControl-Master/Contribution_Guide.md-Tweaks
Small tweaks to Contribution_Guide.md
2017-03-31 13:06:10 +02:00
FlightControl
2c5cc66826 Fixed a bug testing for partially in zone ... 2017-03-31 12:59:37 +02:00
Grey-Echo
94546fc2a5 Small tweaks to Contribution_Guide.md
Should be pretty final.
2017-03-31 12:46:34 +02:00
FlightControl
f68fec303a Fixing #281
I think this one liner fixes the problem...  The menu got removed. And
it shouldn't. It can stay ...
2017-03-31 11:48:47 +02:00
FlightControl
4dbab26b5f Merge remote-tracking branch 'refs/remotes/origin/master' into master-release-prep 2017-03-31 11:48:42 +02:00
Sven Van de Velde
5c51484e81 Merge pull request #379 from FlightControl-Master/Grey-Echo
Finished Contribution_Guide.md
2017-03-31 11:29:47 +02:00
FlightControl
24746644d3 Updated launch files 2017-03-31 11:15:18 +02:00
Grey-Echo
441a771c8a Finish Contribution_Guide.md 2017-03-31 11:08:14 +02:00
FlightControl
d3d113e2ba Merge remote-tracking branch 'refs/remotes/origin/master' into master-release-prep 2017-03-31 10:34:32 +02:00
FlightControl
a988a8da24 docs 2017-03-31 10:17:15 +02:00
FlightControl
29c6773da6 Readme 2017-03-31 10:14:39 +02:00
FlightControl
86cf86ef41 Updated documentation 2017-03-31 10:12:12 +02:00
Grey-Echo
5f87d9eeb6 Contribution_Guide is almost finished
Parts left to do are 1 and 6
2017-03-30 23:33:11 +02:00
FlightControl
51b28f990c Documentation update 2017-03-30 18:11:37 +02:00
Sven Van de Velde
614581222d Merge pull request #375 from FlightControl-Master/DocWork1
Small tweaks to Beta_Test_Guide.md
2017-03-30 13:09:08 +02:00
Grey-Echo
7e4ef10489 Small tweaks to Beta_Test_Guide.md
Turns out i need to mull request this !
2017-03-30 13:00:42 +02:00
Sven Van de Velde
4b56272b07 Merge pull request #374 from FlightControl-Master/Grey-Echo
Doc work on Beta_Test_Guide.md
2017-03-30 12:06:05 +02:00
FlightControl
47efa9b459 Demonstration missions added 2017-03-30 12:02:19 +02:00
FlightControl
edd4b66fa9 demonstration missions added. 2017-03-30 12:00:49 +02:00
Grey-Echo
263dc9b946 add a picture for MDES in Beta_Test_Guide.md 2017-03-30 11:58:32 +02:00
Sven Van de Velde
63f9cd9956 Merge pull request #373 from FlightControl-Master/FlightControl-Release-Prep
Flightcontrol release prep
2017-03-30 11:55:54 +02:00
FlightControl
042cbb4f24 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-Release-Prep 2017-03-30 11:54:30 +02:00
Grey-Echo
193ee81be6 Update Beta_Test_Guide.md. Almost finished ! 2017-03-30 11:48:38 +02:00
FlightControl
c1d15e2c55 Main site, deleted intro part, because it is repeated below. 2017-03-30 11:39:44 +02:00
FlightControl
6364ed55ed Readme for github. 2017-03-30 11:36:55 +02:00
FlightControl
5b6421e998 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-Release-Prep 2017-03-30 11:34:35 +02:00
Grey-Echo
cc99518f14 Merge branch 'master' into Grey-Echo 2017-03-30 09:41:26 +02:00
Grey-Echo
7f1ef89c98 Merge pull request #370 from FlightControl-Master/MDES
Moose Development Environment Setup (MDES)
2017-03-30 09:31:31 +02:00
FlightControl
6234588a1b Removed training mission 2017-03-30 07:53:18 +02:00
FlightControl
2d5970e75e Removed Test Missions from main repository 2017-03-30 07:51:16 +02:00
FlightControl
f692b2bc90 Removed training files 2017-03-30 06:40:01 +02:00
Grey-Echo
c31501bb55 Corrects poor wording and obvious mistakes in Beta_Test_Guide.md 2017-03-30 01:02:36 +02:00
Grey-Echo
f1553cc896 Work on the Beta_Test_Guide.md doc file. Around 2/3 done 2017-03-30 00:54:14 +02:00
Grey-Echo
00a60a6e56 Add the precompiled Lua 5.1, in order to be used by the install script.
Note tha LF had to be converted to CRLF. Doesn't seem to ba an issue though.
2017-03-29 23:03:03 +02:00
Grey-Echo
95ddd14ad6 Add script and executable fot the setup program 2017-03-29 22:56:02 +02:00
FlightControl
d5e1643a6c Removed logos and presentations 2017-03-29 19:30:45 +02:00
FlightControl
f21d498d99 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-Release-Prep 2017-03-29 18:04:20 +02:00
FlightControl
f1fc6511ca Updates 2017-03-29 18:01:37 +02:00
FlightControl
cdd66aa494 Manuals 2017-03-29 17:36:14 +02:00
FlightControl
2637b992b8 Cleanup of some files
-- Deleted Copy of Moose_Create.bat. Not needed anymore.
-- Deleted Moose.lua. Not needed as it will be generated upon release.
2017-03-29 09:52:36 +02:00
FlightControl
581414b259 Release automation preparation
-- Updated .launch files to work from workspace. So everybody can use
them from LDT.
-- Deleted obscolete .launch files.
-- Created new Moose_Create.lua script. Now lua makes the Dynamic and
Static Moose.lua stub.
-- One single file is the reference for the Moose sources: Moose.files
located in Moose Setup
-- Removed the l10n directory from Moose Setup\Moose Mission Update.
-- Removed the 7z and other outputs to update missions.
2017-03-29 09:50:39 +02:00
FlightControl
9cb661cf29 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-Release-Prep 2017-03-29 06:17:04 +02:00
Sven Van de Velde
d937d6668e Merge pull request #366 from FlightControl-Master/master-bugfix-#349
Fixed #349
2017-03-28 13:17:32 +02:00
FlightControl
f1d206d4ea Fixed #349
-- problem was with ipairs, should have been pairs... changed it.
2017-03-28 13:17:09 +02:00
FlightControl
a00311ed13 Progress on Transport
-- Created SET_CARGO
-- DATABASE handles CARGO
-- Event handles CARGO
-- Event triggers CARGO events
-- Menu system to pickup and deploy cargo
-- Menu system to board and unboard cargo
2017-03-28 12:20:15 +02:00
FlightControl
f74c660bf8 Merge remote-tracking branch 'refs/remotes/origin/FlightControl' into FlightControl-task-cargo-transport
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling -
Pickup/TSK-020 - Task Modelling - Pickup.miz
2017-03-28 06:34:03 +02:00
FlightControl
30734bf64f Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-28 06:16:55 +02:00
Grey-Echo
0753e48bee Merge pull request #364 from FlightControl-Master/Grey-Echo
Grey echo
2017-03-27 12:26:56 +02:00
Grey-Echo
6101965956 Generate Moose Static 2017-03-27 12:19:26 +02:00
Grey-Echo
0dffc350a1 Merge branch 'master' into Grey-Echo 2017-03-27 12:18:49 +02:00
Grey-Echo
cb8d75f044 Static Moose.lua Generation 2017-03-27 12:11:02 +02:00
Grey-Echo
080cadb8e0 Add a check for the Radius parameter in POSITIONABLE:GetRandomVec3(Radius) 2017-03-27 12:03:51 +02:00
Grey-Echo
1e60111ce5 Add polymorphic methods GROUP:GetPointVec2(), GROUP:GetRandomVec3(Radius), GROUP:GetHeading()
Also fix a Luadoc documentation issues in Wrapper.Group and Wrapper.Positionable
2017-03-27 11:48:54 +02:00
Sven Van de Velde
80a5b54980 Merge pull request #363 from FlightControl-Master/master-bugfix--#97
Fix of bug #97

**1) Fixed GROUP:IsAlive()**
Returns if the Group is alive.
The Group must:

    * Exist at run-time.
    * Has at least one unit.

When the first @{Unit} of the Group is active, it will return true.
If the first @{Unit} of the Group is inactive, it will return false.
@param #GROUP self
@return #boolean true if the Group is alive and active.
@return #boolean false if the Group is alive but inactive.
@return #nil if the group does not exist anymore.

**2) Fixed IDENTIFIABLEIsAlive()**
Returns if the Identifiable is alive.
If the Identifiable is not alive, nil is returned.
If the Identifiable is alive, true is returned.
@param #IDENTIFIABLE self
@return #boolean true if Identifiable is alive.
@return #nil if the Identifiable is not existing or is not alive.

**3) Fixed UNIT:IsAlive()**
Returns if the Unit is alive.
If the Unit is not alive, nil is returned.
If the Unit is alive and active, true is returned.
If the Unit is alive but not active, false is returned.
@param #UNIT self
@return #boolean true if Unit is alive and active.
@return #boolean false if Unit is alive but not active.
@return #nil if the Unit is not existing or is not alive.

**4) Updated all test missions, as this is a core change.**
2017-03-27 10:39:17 +02:00
FlightControl
0ebcbb4879 Fix of bug #97
-- Fixed GROUP:IsAlive()
--- Returns if the Group is alive.
-- The Group must:
--
--   * Exist at run-time.
--   * Has at least one unit.
--
-- When the first @{Unit} of the Group is active, it will return true.
-- If the first @{Unit} of the Group is inactive, it will return false.
--
-- @param #GROUP self
-- @return #boolean true if the Group is alive and active.
-- @return #boolean false if the Group is alive but inactive.
-- @return #nil if the group does not exist anymore.

-- Fixed Identifiable:IsAlive()
--- Returns if the Identifiable is alive.
-- If the Identifiable is not alive, nil is returned.
-- If the Identifiable is alive, true is returned.
-- @param #IDENTIFIABLE self
-- @return #boolean true if Identifiable is alive.
-- @return #nil if the Identifiable is not existing or is not alive.

-- Fixed UNIT:IsAlive()
--- Returns if the Unit is alive.
-- If the Unit is not alive, nil is returned.
-- If the Unit is alive and active, true is returned.
-- If the Unit is alive but not active, false is returned.
-- @param #UNIT self
-- @return #boolean true if Unit is alive and active.
-- @return #boolean false if Unit is alive but not active.
-- @return #nil if the Unit is not existing or is not alive.

-- Updated all test missions, as this is a core change.
2017-03-27 10:34:51 +02:00
FlightControl
d9c4716127 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl-task-cargo-transport
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-27 09:47:51 +02:00
Sven Van de Velde
3a453ca7d9 Merge pull request #352 from FlightControl-Master/master-bugfix-337
Master bugfix #337
2017-03-26 08:54:33 +02:00
FlightControl
6ce32af1ce Update 2017-03-26 08:53:56 +02:00
FlightControl
ff69012c8d Working 2017-03-26 08:47:50 +02:00
FlightControl
96546e21f5 Progress 2017-03-25 22:22:06 +01:00
Sven Van de Velde
d4ab9e3e8a Merge pull request #351 from FlightControl-Master/master-bugfix-330
Master bugfix #330 .
Please test.
-- Created test mission GRP-310 that simulates a ground group stopping to move and continuing to move.
2017-03-25 20:58:02 +01:00
FlightControl
82ae6011f0 Bug #330 fix 2017-03-25 20:57:01 +01:00
FlightControl
d1a7e5864d Progress 2017-03-25 11:59:20 +01:00
FlightControl
09c05057ae Progress 2017-03-25 07:56:37 +01:00
FlightControl
14ca38bc8b Progress 2017-03-25 07:31:47 +01:00
FlightControl
0539ae3b2f Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-25 06:42:18 +01:00
Sven Van de Velde
2be25298b8 Merge pull request #346 from FlightControl-Master/FlightControl
Bugfix in DETECTION_AREAS
2017-03-25 06:30:34 +01:00
FlightControl
1bb40824a2 Fix in detection of crash. 2017-03-25 06:23:15 +01:00
FlightControl
3e8824b89b Updated documentation 2017-03-24 14:47:51 +01:00
FlightControl
de87e1f557 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-24 06:34:56 +01:00
Sven Van de Velde
8f645617e4 Merge pull request #343 from FlightControl-Master/FlightControl
retry for easy
2017-03-23 21:04:41 +01:00
FlightControl
12b2974b19 retry 2017-03-23 21:04:10 +01:00
Sven Van de Velde
86669c9ed8 Merge pull request #342 from FlightControl-Master/FlightControl
WeaponType for CONTROLLABLE:TaskAttackUnit
2017-03-23 20:45:45 +01:00
FlightControl
7f43e958df WeaponType added in AttackUnit
--- WeaponType is added
2017-03-23 20:44:56 +01:00
FlightControl
6f1070cb72 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-23 20:14:06 +01:00
Sven Van de Velde
fad7291450 Merge pull request #341 from FlightControl-Master/FlightControl
SPAWN fixes
2017-03-23 19:56:31 +01:00
FlightControl
31cae70100 mission script fix 2017-03-23 19:55:01 +01:00
FlightControl
5216a31b47 fix in script 2017-03-23 19:34:44 +01:00
FlightControl
b7166a1295 Testing 2017-03-23 19:15:37 +01:00
FlightControl
f75f9512a2 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/RAD - Radio/RAD-002 - Transmission Tips and
Tricks/RAD-002 - Transmission Tips and Tricks.miz
2017-03-23 18:23:08 +01:00
FlightControl
69c88bc2a6 Working missions 2017-03-23 13:36:03 +01:00
FlightControl
aa806e19e1 Fixed spawn problems, i think ... 2017-03-23 12:57:46 +01:00
Grey-Echo
0c7358c718 Merge pull request #340 from FlightControl-Master/Grey-Echo
Small Tweaks to RADIO
2017-03-23 09:06:38 +01:00
FlightControl
f91d8fd07d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-23 05:35:12 +01:00
FlightControl
c4ba4760fc static moose.lua 2017-03-23 05:29:44 +01:00
FlightControl
63973e4e2d Merge remote-tracking branch 'refs/remotes/origin/master' into Grey-Echo
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-23 05:28:09 +01:00
Grey-Echo
24d7ed16b3 Generated Static Moose.lua (for real this time !) 2017-03-22 21:50:02 +01:00
Grey-Echo
f42a02e1f4 Generate Static Moose.lua 2017-03-22 21:41:08 +01:00
Grey-Echo
cd267b1ed5 Cleaned conditions with nil in RADIO 2017-03-22 21:28:57 +01:00
FlightControl
22562802cb Moose static 2017-03-22 18:12:25 +01:00
FlightControl
ef67ac7e8f Progress 2017-03-22 18:11:54 +01:00
Grey-Echo
ea3ca25c23 Update RAD-002 to use SCHEDULER properly 2017-03-22 18:05:38 +01:00
Grey-Echo
b1b0789113 Doc update for RADIO:StopBroadcast Fix 2017-03-22 10:40:22 +01:00
Grey-Echo
4563e7e300 in RADIO, use the MOOSE way to setCommand()
self.Positionable:GetDCSObject():getController():setCommand()  =>  self.Positionable:SetCommand()
2017-03-22 10:22:04 +01:00
Grey-Echo
24a166826a Add RADIO:StopBroadcast() 2017-03-22 10:17:53 +01:00
Grey-Echo
79518ed926 Merge pull request #332 from FlightControl-Master/RadioComs
Radio coms
2017-03-21 20:51:25 +01:00
Sven Van de Velde
871945a06b Merge pull request #333 from FlightControl-Master/master-scoring-fixes
-- Fixed ThreatLevel call resulting in a crash during S_EVENT_CRASH or S_EVENT_DEAD. Threatlevels are determined for Player and Targets during hit events and cached.
-- Fixed issue were a player1 hiting player2 would keep granting score for that player1. Now, when the player2 is dead, the hit timestamp is reset for player1. So when player 3 causes a dead event for player2, then only player3 will receive a score and not player1 also.
-- Scenery objects and static objects are now also taken into account for the scoring.
-- When a scenery object is hit, a message is displayed.
-- Only when scenery objects are set as a goal, the S_EVENT_DEAD will result in a message to the player and scores.
-- The player will now receive scores when eliminating a static target in multi-player mode!

That's it.
FC
2017-03-21 12:19:39 +01:00
FlightControl
b1a049f193 Final fixes 2017-03-21 12:13:56 +01:00
FlightControl
f1cdc23cf5 MP test 2017-03-21 11:58:00 +01:00
FlightControl
f2e28cb62d MP test 2017-03-21 11:48:29 +01:00
FlightControl
d1735689ca MP test 2017-03-21 11:41:44 +01:00
FlightControl
6183a9acab MP test 2017-03-21 11:36:13 +01:00
FlightControl
ffe04ff657 MP test 2017-03-21 11:25:33 +01:00
FlightControl
cb886229da MP test 2017-03-21 11:08:04 +01:00
FlightControl
5f70c62c80 MP Test 2017-03-21 11:06:24 +01:00
FlightControl
266a27d127 MP test 2017-03-21 10:31:06 +01:00
FlightControl
91cc18b467 MP test 2017-03-21 10:27:43 +01:00
FlightControl
ffeea0ee8b MP test 2017-03-21 10:12:58 +01:00
FlightControl
576394f18c MP test 2017-03-21 09:56:20 +01:00
FlightControl
f0c7c2026f test 2017-03-21 09:37:25 +01:00
FlightControl
384238fd36 Master Scoring Fixes 2017-03-21 09:34:49 +01:00
Grey-Echo
af6f942218 Merge branch 'master' into RadioComs 2017-03-20 22:23:03 +01:00
Grey-Echo
340c6d0820 Remove variable parameters in shortcuts functions in RADIO
Plus some other small tweaks
2017-03-20 21:38:33 +01:00
FlightControl
baa17a4cb7 @Grey-Echo I've done a review and created this branch.
I've done some minor changes, but there is one item that i think
requires your attention, and that is on line 82. It writes
*Positionable,*... Shouldn't that be some kind of a value there?

I am really impressed with the work you did. Excellent job!
2017-03-20 20:33:26 +01:00
FlightControl
c0dcc86405 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-20 20:13:26 +01:00
Sven Van de Velde
8ab75fb66d Merge pull request #331 from FlightControl-Master/FlightControl
documentation
2017-03-20 20:11:20 +01:00
FlightControl
716ffa8b0f documentation 2017-03-20 20:10:00 +01:00
FlightControl
13159f3ed3 Update detection documentation. 2017-03-20 20:07:51 +01:00
FlightControl
6d41c30831 Detection presentation upates. 2017-03-20 15:42:30 +01:00
FlightControl
1ae0d10009 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-20 15:42:11 +01:00
Grey-Echo
55cbd24588 LDoc final pass and HTML doc generation 2017-03-20 13:51:00 +01:00
Sven Van de Velde
761f1ded53 Merge pull request #328 from FlightControl-Master/FlightControl
Task dispatcher fine tunings.
2017-03-20 13:34:01 +01:00
FlightControl
1bd37b8eed Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-20 13:33:06 +01:00
FlightControl
664580e3f1 Updates after the presentation. 2017-03-20 13:33:02 +01:00
Sven Van de Velde
e50e08dc38 Merge pull request #325 from FlightControl-Master/FlightControl
Fixes for tasking
2017-03-20 12:54:30 +01:00
FlightControl
32c5227d71 Updated stuff in tasking
-- SET improved
-- Resolved bug with destroy scoring not granted.
-- Implemented LL for all detection reports
-- Testing
-- Added test mission TAD-220 for DETECTION_TYPES testing.
2017-03-20 12:53:36 +01:00
FlightControl
1dd8f523a1 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-20 09:36:53 +01:00
Grey-Echo
817274aa01 Add details in RAD-002 and small corrections to LDoc 2017-03-19 21:56:19 +01:00
Grey-Echo
4c7e839ef8 Add Test missions for RADIO
RAD-000 / RAD-001 / RAD-002
2017-03-19 18:06:14 +01:00
Sven Van de Velde
0f03dc2162 Merge pull request #324 from FlightControl-Master/FlightControl
Fixed accounting of targets in the new tasking system
2017-03-19 15:05:27 +01:00
FlightControl
ae4052ba2d Account for destroy events. 2017-03-19 15:03:07 +01:00
FlightControl
4dde14eba6 Fixes accounting of destroy and updated documentation
Destroy events were not correctly accounted for in the new tasking
system. this is now fixed.
2017-03-19 15:02:49 +01:00
FlightControl
bf489f6679 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-19 08:24:49 +01:00
Sven Van de Velde
f4f87f0a3d Merge pull request #321 from FlightControl-Master/FlightControl
Added scoring for A2G dispatcher
2017-03-19 08:03:59 +01:00
FlightControl
2e894df4c2 Updated the DETECTION_MANAGER
-- Added a scoring tailoring possibility for TASK_DISPATCHER class
tasks.
-- DETECTION_MANAGER has become an FSM
-- TASK_A2G_DISPATCHER has become an FSM. It implements an Assign Event,
that can be handled. In the Assign event handler, you can specify
scoring schemes etc.
2017-03-19 07:59:47 +01:00
FlightControl
90cb0dc012 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-19 05:52:21 +01:00
Sven Van de Velde
afc0a15080 Merge pull request #320 from FlightControl-Master/master-ai-cas-optimize-engage
AI_CAS optimization attempt
2017-03-19 05:51:13 +01:00
FlightControl
369ea1b6e6 AI_CAS optimization attempt 2017-03-19 05:50:46 +01:00
Sven Van de Velde
59f7b56ceb Merge pull request #319 from FlightControl-Master/FlightControl
Added test mission to test respawning
2017-03-19 05:40:12 +01:00
FlightControl
9a971d61cf Added test mission to test respawning 2017-03-19 05:34:36 +01:00
Grey-Echo
8561bced0a Corrects small typos in comments 2017-03-18 20:49:26 +01:00
FlightControl
441b3df3fb Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-18 20:26:34 +01:00
Sven Van de Velde
fe3ffae01c Merge pull request #318 from FlightControl-Master/master-missions-rework
Master missions rework
2017-03-18 14:43:41 +01:00
FlightControl
cd69b8a879 Publish reworked missions with global variables 2017-03-18 14:42:03 +01:00
FlightControl
553ceb462e first batch of missions 2017-03-18 14:18:14 +01:00
Sven Van de Velde
71374f0ce1 Merge pull request #316 from FlightControl-Master/FlightControl
Fixed weaponexpend problem for gunterlund in AI_CAS
-- The attack sequence was commented out. Put it back in.
-- Fixed documentation order glitch.
-- Documented the usage of AI.Task.WeaponExpend
-- Deleted weaponType from Controller Task
2017-03-18 07:44:17 +01:00
FlightControl
d216fc96da Fixed weaponexpend problem for gunterlund in AI_CAS.
-- The attack sequence was commented out. Put it back in.
-- Fixed documentation order glitch.
-- Documented the usage of AI.Task.WeaponExpend
-- Deleted weaponType from Controller Task
2017-03-18 07:42:41 +01:00
FlightControl
80ba6bf40d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-18 05:45:44 +01:00
Sven Van de Velde
46e8f30c4a Merge pull request #315 from FlightControl-Master/FlightControl
New tasking system
2017-03-17 21:53:41 +01:00
FlightControl
4e59f1a674 Final commit ... 2017-03-17 21:49:06 +01:00
FlightControl
ce00cbf83e Better 2017-03-17 18:46:00 +01:00
FlightControl
9f2179a428 Trying to get the dependency on EVENTs solved. 2017-03-17 18:33:08 +01:00
FlightControl
3f0c983194 Updates 2017-03-17 13:59:19 +01:00
FlightControl
7231492eaa Release prep 2017-03-17 11:50:24 +01:00
Sven Van de Velde
8c4ae420e2 Merge pull request #314 from FlightControl-Master/FlightControl-menu-optimization
Flightcontrol menu optimization
2017-03-17 11:30:09 +01:00
FlightControl
83ed29a90a OK. Menu is working again ... 2017-03-17 11:29:23 +01:00
FlightControl
af55214c52 Menu optimization 2017-03-17 06:57:32 +01:00
FlightControl
4c64548bea Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-16 05:03:43 +01:00
Sven Van de Velde
9b54e32b50 Merge pull request #313 from FlightControl-Master/master-bugfix-cas-engage
Fix of Engage trigger loosing given parameters when rerouting
2017-03-15 19:17:10 +01:00
FlightControl
0555ced241 Fix of Engage trigger loosing given parameters when rerouting
This is fixed now.
2017-03-15 19:16:29 +01:00
FlightControl
056bebe4c3 Updated all test missions 2017-03-15 19:09:33 +01:00
FlightControl
520ee6e459 Updated Mission, cleaned it up and removed stuff. 2017-03-15 11:49:47 +01:00
FlightControl
9fc3f7a601 Made user exits for Mission Completion evaluation...
Man, this is going to rock!
2017-03-15 10:08:03 +01:00
Sven Van de Velde
450892bfd9 Merge pull request #312 from FlightControl-Master/flightcontrol-nillification
Flightcontrol nillification
2017-03-15 09:40:59 +01:00
FlightControl
d77405bf9b nillification of the unit processes for tasks is fixed. 2017-03-15 09:35:41 +01:00
FlightControl
65c15281fd Merge remote-tracking branch 'refs/remotes/origin/master' into flightcontrol-nillification
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-15 05:06:23 +01:00
FlightControl
d7f75eaab6 Generate moose.lua 2017-03-14 15:30:37 +01:00
Sven Van de Velde
03d921831f Merge pull request #311 from FlightControl-Master/Whisper_TaskRouteToZone
TaskRouteToZone formation fix
2017-03-14 15:28:36 +01:00
kalbuth
dbb710a980 TaskRouteToZone formation fix
setting initial point of TaskRouteToZone mission waypoints to have
expected Formation set up.
2017-03-14 15:03:12 +01:00
FlightControl
d160b24b0d Commit 2017-03-14 09:31:17 +01:00
FlightControl
b7e5af772a Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air
Patrol/CAP-001 - Combat Air Patrol.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage
within Range/CAP-010 - CAP and Engage within Range.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage
within Zone/CAP-011 - CAP and Engage within Zone.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air
Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a ZONE-ME Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by
Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane
Group - Engage with Speed.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by
Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by
Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in
1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS
in 1 Radius Zone by Helicopter and AirPlane Groups.miz
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize
Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates
without Waypoints.miz
#	Moose Test Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize
Templates in Random Zones without Waypoints/SPA-020 - Ground Ops -
Randomize Templates in Random Zones without Waypoints.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn
with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn
with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	docs/Documentation/AI_Cas.html
2017-03-14 09:30:54 +01:00
FlightControl
ed81858f0c Move of header template 2017-03-14 09:19:26 +01:00
Sven Van de Velde
78625b0f7f Merge pull request #309 from FlightControl-Master/master-addon-spawn-InitSpawnRandomizeGroups
SPAWN: Added InitRandomizePosition API
2017-03-14 09:10:19 +01:00
FlightControl
a0100d0980 SPAWN: Added InitRandomizePosition API
-- SPAWN:InitRandomizePosition( RandomizePosition, OuterRadius,
InnerRadius ) added.
-- SPA-350 test missions
-- Documentation Update
-- testing.
2017-03-14 09:09:48 +01:00
Sven Van de Velde
8c8e95d8fb Merge pull request #308 from FlightControl-Master/master-bugfix-ai-cas-cap-abort
Fixed abort in AI_CAP_ZONE and CAI_CAS_ZONE
2017-03-14 06:45:39 +01:00
FlightControl
782af122dd Fixed abort in AI_CAP_ZONE and CAI_CAS_ZONE
-- When the event Abort was triggered, nothing happened.
Is fixed now. AI will fly back to the patrol zone and will continue
patrolling.
2017-03-14 06:45:14 +01:00
Sven Van de Velde
985a922d5f Merge pull request #307 from FlightControl-Master/master-addon-SPAWN
SPAWN: Keep unit names
2017-03-14 05:38:13 +01:00
FlightControl
8d535fa3dd SPAWN: Keep unit names
-- new method SPAWN:InitKeepUnitNames() added.
-- Added test mission SPA-021
-- Documentation
-- Testing
2017-03-14 05:37:36 +01:00
FlightControl
fe79821474 Fixing SCHEDULER - TO BE FURTHER STUDIES AND FIXED
TASK object should dissapear after nillified.
They are hooked to the SCHEDULER... SCHEDULEs should dissapear, but they
don't....

To be further studied.
2017-03-14 03:36:12 +01:00
FlightControl
32d23927b6 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	docs/Documentation/AI_Cas.html
2017-03-13 10:13:17 +01:00
Sven Van de Velde
9d67015649 Merge pull request #305 from FlightControl-Master/master-fix-ai-cap
Master fix ai cap
2017-03-13 10:00:52 +01:00
FlightControl
6b5fbc530b Updated documentation and test mission to show the mechanism. 2017-03-13 10:00:19 +01:00
FlightControl
e997e0769b Merge remote-tracking branch 'refs/remotes/origin/master' into master-fix-ai-cap 2017-03-13 08:39:20 +01:00
FlightControl
36123f02c7 Test of unit types detection 2017-03-12 19:35:28 +01:00
FlightControl
c07ac8e1ba DETECTION_TYPES working! 2017-03-12 19:32:36 +01:00
FlightControl
13ac7e0c41 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air
Patrol/CAP-001 - Combat Air Patrol.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage
within Range/CAP-010 - CAP and Engage within Range.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage
within Zone/CAP-011 - CAP and Engage within Zone.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air
Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a ZONE-ME Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by
Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane
Group - Engage with Speed.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by
Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by
Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in
1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS
in 1 Radius Zone by Helicopter and AirPlane Groups.miz
#	Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol
Zones/PAT-001 - Switching Patrol Zones.miz
2017-03-12 17:51:18 +01:00
FlightControl
052ca384a5 Progress 2017-03-12 17:48:19 +01:00
FlightControl
82f505ddb0 Progress
-- Got DETECTION_TYPES running with A2G_TASK_DISPATCHER
2017-03-12 17:14:00 +01:00
Sven Van de Velde
c53b3cd1e0 Merge pull request #303 from FlightControl-Master/master-fix-ai-cap
Fixes bug sending messages upon a Destroy event
2017-03-12 07:21:46 +01:00
FlightControl
e4fec6432d Fixes bug sending messages upon a Destroy event
-- Removed the Messages from the Destroy event handler.
-- AI_CAP_ZONE never got a Destroy event trigger because the Dead event
was never catched.
-- The Dead event handlers are now the default name to keep up with the
standard.
-- Check that ONLY the Destroy event is triggered for the targets in
scope.
2017-03-12 07:20:01 +01:00
Grey-Echo
e6e7d8b166 LDT pass on RADIO class 2017-03-11 14:52:09 +01:00
Grey-Echo
4df4223373 Implement RADIO:NewGenericTransmission() and RADIO:NewUnitTransmission() 2017-03-11 14:45:22 +01:00
FlightControl
e9a7898410 Updates on presentation 2017-03-11 09:22:03 +01:00
Grey-Echo
4b45476105 Every RADIO Setter is tested 2017-03-10 23:34:42 +01:00
Grey-Echo
894ed41374 RADIO:SetFileName() and RADIO:SetFrequency() both tested and fixed 2017-03-10 23:34:32 +01:00
Grey-Echo
4655a6413d Support for UNIT and GROUP in RADIO:SetTransmission() + indentation 2017-03-10 23:34:24 +01:00
Grey-Echo
396aa38c18 Move verifying logic in set methods in RADIO
Both RADIO:NewGenericTransmission() and RADIO:NewUnitTransmission() need to be redone to accomodate the change
2017-03-10 23:34:16 +01:00
Grey-Echo
e4343179b3 Add checks and trace for RADIO:NewGenericTransmission 2017-03-10 23:34:09 +01:00
Grey-Echo
a9c7cd4e18 Add checks and trace for RADIO:New 2017-03-10 23:33:56 +01:00
Grey-Echo
f35269936f Fixes in RADIO Class.
Every method implemented is now functionnal and tested
2017-03-10 23:33:38 +01:00
Grey-Echo
3754ea6c27 Change RADIO:NewGenericTransmission() and RADIO:NewUnitTransmission() to support optionnal parameters 2017-03-10 23:33:31 +01:00
Grey-Echo
65c61a15b4 Fix various bugs in RADIO
This is the first implementation that PLAY A SOUND !
The whole RADIO class isn't tested thoroughly though
2017-03-10 23:33:21 +01:00
Grey-Echo
b75d90092d Add Test Mission + Small Fixes to RADIO 2017-03-10 23:33:16 +01:00
Grey-Echo
c8a4c87226 Merge branch 'developer-configuration' into RadioComs 2017-03-10 23:33:11 +01:00
Grey-Echo
d7291d44fd Updates 2017-03-10 23:33:05 +01:00
Grey-Echo
5da73b220e Merge branch 'developer-configuration' into RadioComs 2017-03-10 23:32:58 +01:00
Grey-Echo
3478f8e749 Eclipse share configuration files 2017-03-10 23:32:51 +01:00
Grey-Echo
b73a48c4e0 Merge pull request #291 from FlightControl-Master/master-bugfix
Documentation refinement of Core Classes
2017-03-10 23:32:46 +01:00
Grey-Echo
ac0effe141 Documentation refinement of Core Classes 2017-03-10 23:32:39 +01:00
Grey-Echo
fc3ad53ebe Implement POSITIONABLE:GetRadio() and small fixes in Radio.lua 2017-03-10 23:32:33 +01:00
Grey-Echo
59bba1e17e Update Moose.lua to include Core/Radio.lua
With this, the first slice of Radio is done and testing can start
2017-03-10 23:32:27 +01:00
Grey-Echo
2365681438 Implements a first pass for RADIO:Broadcast() 2017-03-10 23:32:22 +01:00
Grey-Echo
ff5048a43f Implementation of RADIO:NewTransmissionUnit() 2017-03-10 23:32:17 +01:00
Grey-Echo
1a45b2bd44 Modified implementation of RADIO:NewTransmission() to make parameters optional 2017-03-10 23:32:11 +01:00
Grey-Echo
2437e45eec Remove RADIO.ConvertFrequency()
The implementataion didn't allow for WW2 style frequencies.
I might try to redo it later, but for now, the user is expected to input frequency in kHz
2017-03-10 23:32:05 +01:00
Grey-Echo
921743bf20 Implements RADIO:NewTransmission()
the implementation made me realize the need for RADIO.VerifyFileName() and RADIO.ConvertFrequency(),
so they are both implemented in this commit to.
2017-03-10 23:31:59 +01:00
Grey-Echo
c37d6e6f95 Implements RADIO's constructor 2017-03-10 23:31:53 +01:00
Grey-Echo
7866de2370 Declaration of RADIO Class 2017-03-10 23:31:47 +01:00
Grey-Echo
ad0cac8356 Laying the groundwork for the RADIO class
With a special emphasis on LDT Documentation
2017-03-10 23:31:32 +01:00
FlightControl
8add761982 Updated documentation 2017-03-10 23:05:02 +01:00
FlightControl
d70d13449d Regression Testing 2017-03-10 22:40:16 +01:00
FlightControl
b606041c11 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-10 20:45:06 +01:00
FlightControl
7ebf0cdb0f Updates 2017-03-10 14:50:14 +01:00
Sven Van de Velde
5e25851f36 Merge pull request #301 from FlightControl-Master/Logo
Logo
2017-03-10 14:13:04 +01:00
FlightControl
4100000edf New avatars etc 2017-03-10 14:12:17 +01:00
FlightControl
801d6a6f30 Merge remote-tracking branch 'refs/remotes/origin/master' into Logo 2017-03-10 14:11:11 +01:00
FlightControl
cfc4dd8846 Progress 2017-03-10 14:09:15 +01:00
FlightControl
907b9c9abb Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-03-10 06:23:51 +01:00
EasyEB
5b18773f6c Merge pull request #300 from FlightControl-Master/Logo
MOOSE Brand
2017-03-09 21:16:51 +01:00
EasyEB
fb3f6149c7 Add files via upload 2017-03-09 21:11:06 +01:00
FlightControl
df96c55c5a Logo placeholder 2017-03-09 20:53:28 +01:00
FlightControl
01e2aa5b5d Progress 2017-03-09 20:47:34 +01:00
dwpenney
958d97ad9d Merge pull request #299 from FlightControl-Master/Issue-292
Issue 292
2017-03-09 13:23:23 -04:00
FlightControl
3bd0cdbe32 Progress 2017-03-09 17:44:56 +01:00
David Penney
20239a1248 Update the static Moose w/ the component changes 2017-03-09 12:02:09 -04:00
David Penney
57099ad136 A random fix for code I notices
This relates to the Vec2/Vec3 redefinition of y. Vec3 is (x=Latitude, y=Altitude and z=Longitude). Vec2 is (x=Latitude, y=Longitude).
2017-03-09 11:49:20 -04:00
David Penney
29148cf8fd But fix for Issue-292
By accessing the values directly, we skip past the problem where GetY returns different values for POINT_VEC2 and POINT_VEC3 objects.
2017-03-09 11:47:40 -04:00
David Penney
670768df42 Addition of GetLat, GetLon, SetLat, SetLon for POINT_VEC2
This should help clarify the difference between Vec2 and Vec3. The original GetX, Gety, SetX and SetY functions remain so that it does not break other peoples stuff.
2017-03-09 11:46:31 -04:00
FlightControl
fbae55b9f9 Progress on tasking 2017-03-09 13:37:13 +01:00
FlightControl
40884cd411 removed trash 2017-03-09 10:39:20 +01:00
FlightControl
5d6ac9419f Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Development/Moose/Core/Event.lua
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Development/Moose/Wrapper/Controllable.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot
Example/EVT-100 - OnEventShot Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-101 - OnEventHit
Example/EVT-101 - OnEventHit Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-102 - OnEventTakeoff
Example/EVT-102 - OnEventTakeoff Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-103 - OnEventLand
Example/EVT-103 - OnEventLand Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-104 - OnEventCrash
Example/EVT-104 - OnEventCrash Example.miz
#	Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100
- Scoring of Statics.miz
#	Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to
Client/SCO-101 - Scoring Client to Client.miz
#	docs/Documentation/Controllable.html
#	docs/Documentation/Event.html
#	docs/Documentation/Point.html
#	docs/Documentation/Zone.html
2017-03-09 10:38:55 +01:00
Sven Van de Velde
d16b68e03a Merge pull request #298 from FlightControl-Master/master-bugfix
fixes of base and scoring
2017-03-08 21:41:04 +01:00
FlightControl
95b091c5d0 static moose 2017-03-08 21:40:02 +01:00
FlightControl
1c3e737d8e Bugfixes of BASE and SCORING 2017-03-08 21:39:41 +01:00
Sven Van de Velde
891ecf996c Merge pull request #297 from FlightControl-Master/master-bugfix
Events with initiator and target will now properly be handled for UNIT and GROUP level event handlers.
2017-03-08 20:50:48 +01:00
FlightControl
c6ad706c1e Fixed a potential glitch.
Now target will ALWAYS be tested too.
2017-03-08 20:49:19 +01:00
FlightControl
894854440b Test mission to test HIT event handling of target units 2017-03-08 20:37:18 +01:00
FlightControl
9354e23630 Fix to also handle events for UNIT and GROUP when the target is in the event data.
The target was never checked, and thus in a HIT event, a HIT event was
never called. This is fixed now.
2017-03-08 20:02:03 +01:00
FlightControl
bcb68e2d64 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-08 19:40:35 +01:00
Sven Van de Velde
7c38bbce2d Merge pull request #296 from FlightControl-Master/developer-configuration
Developer configuration
2017-03-08 19:38:43 +01:00
FlightControl
43848e8dc7 New launch files 2017-03-08 19:25:30 +01:00
FlightControl
9fee299e0f Updates 2017-03-08 14:00:43 +01:00
FlightControl
28f81990f5 Eclipse share configuration files 2017-03-08 13:44:07 +01:00
Sven Van de Velde
3077631bb4 Merge pull request #295 from FlightControl-Master/Grey-Echo
Test of Permissions
2017-03-08 13:42:06 +01:00
Grey_Echo
fc03ba4661 Test of Permissions 2017-03-08 13:33:13 +01:00
Sven Van de Velde
1bdacbdad9 Merge pull request #291 from FlightControl-Master/master-bugfix
Documentation refinement of Core Classes
2017-03-07 21:00:46 +01:00
FlightControl
0bfbf042b5 Documentation refinement of Core Classes 2017-03-07 20:58:53 +01:00
Sven Van de Velde
343de7fe69 Merge pull request #290 from FlightControl-Master/master-bugfix
Fix problem with AttackControllable as a result of a stupid rename problem.
2017-03-07 12:03:29 +01:00
FlightControl
f708d3d33d Fix problem with AttackControllable as a result of a stupid rename problem. 2017-03-07 12:02:58 +01:00
Sven Van de Velde
f4c2637d66 Merge pull request #289 from FlightControl-Master/master-bugfix
Fixed Client to Client SCORING problem.
The TargetPlayerName was not logged in the CSV file. This is now also added. So, now, both the PlayerName and the Target PlayerName will be logged in the CSV. So when Client to Client kills happen, both player names will be listed.
Nice for statistics.
2017-03-07 10:29:53 +01:00
FlightControl
e84c9cc83b Fixed a problem that the TargetPlayerName was not logged in the CSV.
I adapted the CSV file, and added as the second parameter the
TargetPlayerName.
Where relevant, the TargetPlayerName will be mentioned in the CSV
logging.
IMPORTANT, the method SCORING:ScoreCSV has been adapted!!! The second
parameter is now the TargetPlayerName. Provide a "" or nil, if there is
no TargetPlayerName, but ensure the order of the parameters is correct!

function SCORING:ScoreCSV( PlayerName, TargetPlayerName, ScoreType,
ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition,
PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition,
TargetUnitCategory, TargetUnitType )
2017-03-07 10:27:59 +01:00
FlightControl
2f7bcbe7c6 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-07 09:57:41 +01:00
Sven Van de Velde
ad90a08ec0 Merge pull request #288 from FlightControl-Master/master-adding
Master Bugfix
2017-03-07 09:44:00 +01:00
FlightControl
ef6885b63b Updated mission naming, documentation, briefing and tested all 2017-03-07 09:38:20 +01:00
FlightControl
02c44c158f Updated mission briefing 2017-03-07 09:26:25 +01:00
FlightControl
8dc13f7a0c Finalization of patch. 2017-03-07 09:24:10 +01:00
FlightControl
af85399975 Implemented event dispatching for GROUP
-- Created EVT-200 test mission
-- Documentation
2017-03-07 09:15:44 +01:00
FlightControl
ef67c82c0f AI_PATROL_ZONE
Added a Stop event and Stopped state to trigger a state transition from
* to Stopped when the AI process needs to be stopped.
2017-03-07 08:31:18 +01:00
FlightControl
e6db83047f Merge remote-tracking branch 'refs/remotes/origin/master' into master-adding 2017-03-07 08:27:35 +01:00
Sven Van de Velde
3a847fed9b Merge pull request #285 from FlightControl-Master/master-bugfix
New test mission to test OnEventHit for a SET_UNIT...
2017-03-06 16:38:36 +01:00
FlightControl
ef536022cc Removed smoke from AI_CAS 2017-03-06 16:32:14 +01:00
FlightControl
4b008f8879 New test mission demonstrating OnEventHit for a SET_UNIT object 2017-03-06 16:31:06 +01:00
FlightControl
454d96d4af Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-06 15:44:37 +01:00
FlightControl
a2f4ce1db5 Updates on missions 2017-03-06 14:34:34 +01:00
FlightControl
25bd0f8049 Fixed DETECTION_AREAS, working again and complete with test missions. 2017-03-06 13:56:34 +01:00
FlightControl
8d73df48ce Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100
- Scoring of Statics.miz
#	Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to
Client/SCO-101 - Scoring Client to Client.miz
#	docs/Documentation/Point.html
2017-03-06 12:28:27 +01:00
Sven Van de Velde
e6fcc15965 Merge pull request #284 from FlightControl-Master/master-adding
Renamed TaskRouteToVec2 and TaskRouteToVec3
2017-03-06 11:44:18 +01:00
FlightControl
9d0f264d5c Point optmized. 2017-03-06 11:43:13 +01:00
FlightControl
6f3e076f13 Merge remote-tracking branch 'refs/remotes/origin/master' into master-adding 2017-03-06 10:38:47 +01:00
FlightControl
0315bf5aa0 Fixed test mission 2017-03-05 14:52:12 +01:00
FlightControl
2cf27b3b0f SCO-500 Demo Mission for SCORING system demonstration on a MP server 2017-03-05 14:37:18 +01:00
FlightControl
a6c596f724 Check scoring test mission in master. 2017-03-05 14:23:13 +01:00
FlightControl
32d6233cf1 Progress Dispatcher 2017-03-05 12:37:56 +01:00
FlightControl
6710bfba26 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-05 10:28:54 +01:00
FlightControl
fc3b66c06c Removed trace from Zone.lua 2017-03-05 10:27:54 +01:00
FlightControl
b004f0f968 Removed trace 2017-03-05 10:27:29 +01:00
FlightControl
86e684dc63 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-05 10:26:36 +01:00
FlightControl
56c9401ce3 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-05 10:15:27 +01:00
FlightControl
3244f46e88 Moose.lua with the changes 2017-03-05 10:14:53 +01:00
FlightControl
b4527635d6 Progress 2017-03-05 10:14:29 +01:00
FlightControl
a1ae1cc519 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-05 10:05:36 +01:00
FlightControl
538e040fdf Updated Database 2017-03-05 10:05:12 +01:00
FlightControl
61cd592967 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-03-05 10:02:28 +01:00
Sven Van de Velde
158e41e04e Merge pull request #279 from FlightControl-Master/master-bugfix
Master bugfix
2017-03-05 10:01:58 +01:00
FlightControl
0d474b2286 Updated Database 2017-03-05 10:01:28 +01:00
FlightControl
79657efaf8 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-05 09:54:43 +01:00
FlightControl
8905a49d0c Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-05 09:52:13 +01:00
Sven Van de Velde
48841f2412 Merge pull request #278 from FlightControl-Master/master-bugfix
Master bugfix
2017-03-05 09:51:01 +01:00
FlightControl
0ebff60e8d Updated Set 2017-03-05 09:50:31 +01:00
FlightControl
5c5bedd794 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-05 09:46:00 +01:00
FlightControl
21c2dd8c80 Progress 2017-03-05 09:45:49 +01:00
FlightControl
de84accffa Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-03-05 09:37:06 +01:00
Sven Van de Velde
91bc509984 Merge pull request #277 from FlightControl-Master/master-adding
Zone boundaries by tires with a white flag.
2017-03-05 09:33:21 +01:00
FlightControl
f7bf997511 Implemented a new method on ZONE:BoundZone
Creates a visual boundary around a ZONE_* of tires with a white flag.
These tires will also move when the ZONE is "rebound".
2017-03-05 09:32:17 +01:00
FlightControl
5793e04aeb Merge remote-tracking branch 'refs/remotes/origin/master' into master-adding 2017-03-05 07:46:09 +01:00
FlightControl
cd3648f03d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 -
Caucasus.miz
#	Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 -
Nevada.miz
#	Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase
CleanUp/ACL-001 - Airbase CleanUp.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -
Spawned AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 -
Patrol AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions
InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when
Destroyed/AIB-004 - Respawn Test when Destroyed.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and
Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at
Airbases/AIB-006 - Declutter AI at Airbases.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air
Patrol/CAP-001 - Combat Air Patrol.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage
within Range/CAP-010 - CAP and Engage within Range.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage
within Zone/CAP-011 - CAP and Engage within Zone.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a ZONE-ME Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by
Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane
Group - Engage with Speed.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by
Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by
Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in
1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS
in 1 Radius Zone by Helicopter and AirPlane Groups.miz
#	Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit
Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 -
Unit Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 -
Unit Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 -
Group Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 -
Group Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 -
Group Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 -
Package Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 -
Package Unboarding.miz
#	Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001
- Detection Areas.miz
#	Moose Test Missions/DET - Detection/DET-101 - Detection
Reporting/DET-101 - Detection Reporting.miz
#	Moose Test Missions/ESC - Escorting/ESC-001 - Escorting
Helicopters/ESC-001 - Escorting Helicopters.miz
#	Moose Test Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001
- API Demo 1.miz
#	Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot
Example/EVT-100 - OnEventShot Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-101 - OnEventHit
Example/EVT-101 - OnEventHit Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-102 - OnEventTakeoff
Example/EVT-102 - OnEventTakeoff Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-103 - OnEventLand
Example/EVT-103 - OnEventLand Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-104 - OnEventCrash
Example/EVT-104 - OnEventCrash Example.miz
#	Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition
Explanation/FSM-100 - Transition Explanation.miz
#	Moose Test Missions/GRP - Group Commands/GRP-200 - Follow
Group/GRP-200 - Follow Group.miz
#	Moose Test Missions/GRP - Group Commands/GRP-300 - Switch
WayPoints/GRP-300 - Switch WayPoints.miz
#	Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz
#	Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 -
Menu Client.miz
#	Moose Test Missions/MEN - Menu Options/MEN-002 - Menu
Coalition/MEN-002 - Menu Coalition.miz
#	Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 -
Menu Group.miz
#	Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile
Trainer/MIT-001 - Missile Trainer.miz
#	Moose Test Missions/MOOSE_Test_Template.miz
#	Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol
Zones/PAT-001 - Switching Patrol Zones.miz
#	Moose Test Missions/SCH - Scheduler/SCH-000 - Simple
Scheduling/SCH-000 - Simple Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object
Scheduling/SCH-001 - Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat
Scheduling/SCH-100 - Simple Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat
Scheduling/SCH-110 - Object Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling
Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz
#	Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object
Scheduling/SCH-300 - GC Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat
Scheduling/SCH-310 - GC Object Repeat Scheduling.miz
#	Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100
- Scoring of Statics.miz
#	Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to
Client/SCO-101 - Scoring Client to Client.miz
#	Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 -
Airbase Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 -
Group Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 -
Client Sets.miz
#	Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001
- SEAD Evasion.miz
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching
Demo/TAD-010 - Task Dispatching Demo.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling -
SEAD/TSK-010 - Task Modelling - SEAD.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling -
Pickup/TSK-020 - Task Modelling - Pickup.miz
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 -
Polygon Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-510 - Send message if Clients fly
the first time in the Polygon Zones/ZON-510 - Send message if Clients
fly the first time in the Polygon Zones.miz
2017-03-05 07:45:08 +01:00
FlightControl
32e52731ae Detection Progress 2017-03-05 07:35:03 +01:00
Sven Van de Velde
b81bc550ec Merge pull request #267 from FlightControl-Master/master-bugfix
Master bugfix
2017-03-04 16:03:19 +01:00
FlightControl
f725866ef4 Docs 2017-03-04 16:02:37 +01:00
FlightControl
842aa878ad EVENTDATA structure was hidden in documentation. 2017-03-04 16:02:21 +01:00
FlightControl
bbc9ddf9a3 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-04 16:01:41 +01:00
FlightControl
bf5dce5b5f Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-03-04 15:48:12 +01:00
Sven Van de Velde
c9a3740ac7 Merge pull request #266 from FlightControl-Master/master-scoring
Master scoring - Bugfixes
2017-03-04 15:01:01 +01:00
FlightControl
942ae18290 BUGFIXES: Fixed problems
-- With menu
-- On destroy, sometimes the wrong target was scored. Is fixed, was
silly leftover statement that did that. Corrected.
-- Goals added.
2017-03-04 14:59:56 +01:00
FlightControl
a8d4e5e5e6 Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-04 09:10:35 +01:00
FlightControl
b46d61d865 Got Task_SEAD template working with all the variations and complexity! 2017-03-04 08:51:31 +01:00
Sven Van de Velde
1ec21942af Merge pull request #265 from FlightControl-Master/master-adding
Added methods Set and Add to the POINT_VEC3 and POINT_VEC2 classes + documentation
2017-03-03 13:35:53 +01:00
FlightControl
b75c1a92ad Added POINT_VEC3 and POINT_VEC2 Set and Add methods + documentation 2017-03-03 13:34:10 +01:00
FlightControl
5ddeb8d396 Progress on SEAD 2017-03-03 12:34:52 +01:00
FlightControl
22fdf034ee Progress on SEAD 2017-03-03 10:49:38 +01:00
FlightControl
a99924d9ed Progress on SEAD model 2017-03-03 10:27:09 +01:00
FlightControl
846edca815 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	docs/Documentation/Zone.html
2017-03-03 09:51:17 +01:00
FlightControl
ba1a08920f Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-03 08:34:38 +01:00
FlightControl
edaa5112a1 Merge remote-tracking branch 'refs/remotes/origin/master' into master-adding 2017-03-03 08:34:21 +01:00
Sven Van de Velde
d6afb5e6e7 Merge pull request #264 from FlightControl-Master/master-adding
Added methods to POINT_VEC3 and documentation
2017-03-03 08:33:30 +01:00
FlightControl
5d17cde83a Added methods to POINT_VEC3 and documented 2017-03-03 08:31:45 +01:00
FlightControl
83447468f8 Merge remote-tracking branch 'refs/remotes/origin/master' into master-adding 2017-03-03 08:14:34 +01:00
Sven Van de Velde
1af9ad46b9 Merge pull request #263 from FlightControl-Master/master-scoring
Added API to set Score GOALs
2017-03-03 08:09:19 +01:00
FlightControl
ef5f83034b Added API to set Goal Scores upon a condition 2017-03-03 08:08:29 +01:00
FlightControl
1b6d241acc Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-02 23:56:29 +01:00
Sven Van de Velde
9bc84264ef Merge pull request #262 from FlightControl-Master/master-scoring
Master scoring
2017-03-02 23:34:33 +01:00
FlightControl
c476c7df27 Fix of scheduler.
When trace is off, the scheduler removed the link to placed schedules.
This was wrong due to a wrong weak table. Corrected.
2017-03-02 23:33:54 +01:00
FlightControl
082e1d5e2e Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-02 17:53:34 +01:00
Sven Van de Velde
fbec9519ee Merge pull request #261 from FlightControl-Master/master-scoring
Master scoring
2017-03-02 17:45:14 +01:00
FlightControl
336f1781a7 Scoring scale change
-- Presentation update
-- Documentation updated
-- SetScale functions instead of multiplier
-- Updated proper scoring scaling formula!
2017-03-02 17:43:46 +01:00
FlightControl
4861c46e0d Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-02 17:43:18 +01:00
Sven Van de Velde
9ea2221c33 Merge pull request #260 from Kalbuth/master
Added TimeOut functionality for TASK, coded by whisper.
2017-03-02 13:39:45 +01:00
Kalbuth
f945018dfe Added TimeOut functionality for TASK
SetTimeOut( Timer ) method added, to have TASK go into Cancelled state is staying in Planned state for more than Timer seconds.
2017-03-02 13:21:30 +01:00
FlightControl
45c7f72732 Merge remote-tracking branch 'refs/remotes/origin/master' into master-scoring 2017-03-02 12:50:00 +01:00
Sven Van de Velde
f3d5b17548 Merge pull request #259 from FlightControl-Master/master-scoring
BIGFIX: Scoring Coalition change Fratricide
2017-03-02 12:30:21 +01:00
FlightControl
3789bf79c2 BIGFIX: Scoring Coalition change Fratricide
Fixed some bugs in the logging of fratricide.
2017-03-02 12:29:41 +01:00
Sven Van de Velde
7f3a2fa8e1 Merge pull request #257 from FlightControl-Master/master-bugfix-scoring-client-to-client
BUGFIX: Fixed a problem in AI_BALANCER. When the SPAWN object uses the InitLimit method to limit the amount of airplanes spawned, the OnAfterSpawned event would always be called, even when Spawn() would return an empty group, because the limit of spawned groups was reached. This resulted in the OnAfterSpawned event handler receiving an empty AIGroup object, with all the consequences you can imagine.
Now, the AI_BALANCER code has been adapted, that, if the SPAWN object returns en empty AIGroup, then the OnAfterSpawned event will **not** be triggered!
2017-03-02 10:00:46 +01:00
FlightControl
7c7aa76fdd Update to AI_Balancer 2017-03-02 09:56:47 +01:00
FlightControl
0a3db0034f Scoring maths 2017-03-01 10:16:44 +01:00
FlightControl
72d6b2b769 Presentation 2017-03-01 10:15:10 +01:00
FlightControl
36aac4162d Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix-scoring-client-to-client 2017-03-01 09:39:28 +01:00
FlightControl
8d65e6f05a New video from Gunterlund 2017-02-28 21:59:29 +01:00
Sven Van de Velde
d496b594ae Merge pull request #256 from FlightControl-Master/master-bugfix-scoring-client-to-client
New SCORING class
2017-02-28 18:54:00 +01:00
FlightControl
5dec4b137b Static moose.lua 2017-02-28 18:52:34 +01:00
FlightControl
a0029fd0bd Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix-scoring-client-to-client 2017-02-28 18:51:34 +01:00
FlightControl
ad3baa1f0d Static moose.lua 2017-02-28 18:50:35 +01:00
Sven Van de Velde
9d23c4943c Merge pull request #255 from FlightControl-Master/master-bugfix-scoring-client-to-client
New SCORING class release.
New SCORING class ...

-- Client to Client scoring working
-- CSV file working
-- Conditional display of messages
-- Set audience of messages (all or coalition)
-- Set additional scoring per unit, static
-- Set zones with additional scoring
-- Set fraticide levels
-- Set scoring multipliers
-- Set penalty scores when a player changes coalition.

New methods in MESSAGE class
-- ToAllIf() - Only send when a condition is true.
-- ToCoalitionIf() - Only send when a condition is true.

Important! Some ZONE methods have changed name!
-- 2017-02-28: ZONE_BASE:IsVec2InZone() replaces ZONE_BASE:IsPointVec2InZone().
-- 2017-02-28: ZONE_BASE:IsVec3InZone() replaces ZONE_BASE:IsPointVec3InZone().
-- 2017-02-28: ZONE_RADIUS:IsVec2InZone() replaces ZONE_RADIUS:IsPointVec2InZone().
-- 2017-02-28: ZONE_RADIUS:IsVec3InZone() replaces ZONE_RADIUS:IsPointVec3InZone().
-- 2017-02-28: ZONE_POLYGON:IsVec2InZone() replaces ZONE_POLYGON:IsPointVec2InZone().
-- 2017-02-28: ZONE_POLYGON:IsVec3InZone() replaces ZONE_POLYGON:IsPointVec3InZone().

The EVENTDISPATCHER:
-- now also processes SCENERY and STATICS.
-- Fields of EVENTDATA are now properly documented.
-- Fields are conditionallly filled, based on SCENERY, STATICS, UNIT.
-- Additional fields are added to EVENTDATA.

A new SCENERY class has been added.

Updated documentation.

SCO-100 has been updated. More test missions to be created.
2017-02-28 18:49:16 +01:00
FlightControl
438a587927 Wrap up updates. 2017-02-28 18:35:29 +01:00
FlightControl
b9bd76f387 Progress 2017-02-28 18:16:13 +01:00
FlightControl
316d7325bc Progress 2017-02-28 18:16:05 +01:00
FlightControl
d779fb4167 Event too 2017-02-28 14:01:57 +01:00
FlightControl
8edbb5ca23 Progress, a lot is working already. 2017-02-28 14:01:38 +01:00
FlightControl
e0254308d3 Progress 2017-02-27 16:27:21 +01:00
FlightControl
405c297cdf Documentation 2017-02-27 11:17:24 +01:00
FlightControl
1f109c3935 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix-scoring-client-to-client 2017-02-27 10:33:10 +01:00
FlightControl
1e143778bd Scoring updates 2017-02-26 22:55:36 +01:00
Sven Van de Velde
389659df0c Merge pull request #253 from FlightControl-Master/master-bugfix-scoring-client-to-client
Master bugfix scoring client to client
2017-02-26 15:31:55 +01:00
FlightControl
c9c3b11b14 Updated static scores 2017-02-26 15:31:23 +01:00
FlightControl
0f7bc2b663 First draft version new scoring 2017-02-26 15:25:32 +01:00
FlightControl
41eb39c2a5 Task Templates 2017-02-26 13:30:29 +01:00
Sven Van de Velde
490f1b47c7 SCORING new functions addons. 2017-02-26 11:58:26 +01:00
Sven Van de Velde
b8df0c433b bugfixes and cleanup of scoring code for player to player scoring 2017-02-26 07:58:02 +01:00
Sven Van de Velde
e29d486dfb Trace 2017-02-24 13:47:26 +01:00
Sven Van de Velde
5f6deff3fa BUGFIX of Scoring CLIENT to CLIENT.
Creation of test mission to test hits and kills client to client.
2017-02-24 13:45:56 +01:00
Sven Van de Velde
34cdfbad40 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-24 13:35:22 +01:00
Sven Van de Velde
20215d105f Merge pull request #251 from FlightControl-Master/master-bugfix-spawn-randomizetemplate
Master bugfix spawn randomizetemplate
2017-02-24 13:15:04 +01:00
Sven Van de Velde
152a3a789f BIGFIX: InitRandomizeTemplate is now correctly positioning the Spawned Units.
-- Fixed in spawn.lua
-- InitRandomizeTemplate is now correctly positioning the spawned units
according the initial position as modeled in the mission editor.
-- When combining InitRandomizeTemplate with InitRandomizeZone, the
spawned units are still positioned at their initial position according
the position modeled in the mission editor.

-- Added test missions SPA-019 and SPA-020.
2017-02-24 13:13:24 +01:00
Sven Van de Velde
f4b4a40d75 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-24 12:29:31 +01:00
Sven Van de Velde
0b034f476d Merge pull request #250 from FlightControl-Master/master-bugfix-ai-patrol
Fixed EngageZone documentation problem.
2017-02-24 12:24:40 +01:00
Sven Van de Velde
06409f6cd0 Fixed EngageZone documentation problem. 2017-02-24 12:23:42 +01:00
Sven Van de Velde
7b07c48ff8 Merge pull request #249 from FlightControl-Master/master-bugfix-scoring
Master bugfix scoring
2017-02-24 12:12:57 +01:00
Sven Van de Velde
604db7e53c BIGFIX: Reworked the code so that SCORING is working with STATIC objects.
The problems were in the EVENTDISPATCHER.

-- Reworked the Event Dispatcher code...
-- Added fields IniCategory and TgtCategory that indicate which Object
Category is involved in the Event.
-- Added fields IniPlayerName and TgtPlayerName that indicate which
Player Name is the initiator or Target (only when the Object Category is
a UNIT).

-- In the Event.lua, I poperly documented every field in EVENTDATA and
typed it correctly.

-- Reworked te Scoring code..
-- Incorporated the Event.* added fields into the Scoring Code.

-- Added a SCO-100 test mission
-- A shooting range with STATIC objects, so that a player can TEST the
scoring for STATIC objects in  a mission.

Hope this helps.
FC
2017-02-24 12:10:27 +01:00
Sven Van de Velde
3a5f4ccd55 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix-scoring
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2017-02-24 10:42:26 +01:00
Sven Van de Velde
a3aee1e154 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 -
Polygon Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-510 - Send message if Clients fly
the first time in the Polygon Zones/ZON-510 - Send message if Clients
fly the first time in the Polygon Zones.miz
2017-02-24 10:37:48 +01:00
Sven Van de Velde
35a2bb459c Merge pull request #248 from FlightControl-Master/master-bugfix-group-isalive
Master bugfix group isalive
2017-02-23 17:29:09 +01:00
Sven Van de Velde
6fb5a88953 Fixed GROUP:IsAlive() returning true even if all group members aredead
Fixed the mechanism by checking if the group has a :getUnit(1) ~= nil
2017-02-23 17:25:16 +01:00
Sven Van de Velde
d0b0ce7483 Scoring fix 2017-02-23 08:44:54 +01:00
Sven Van de Velde
d9e9ef887b Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-21 12:24:17 +01:00
Sven Van de Velde
e5457a906d Merge pull request #247 from FlightControl-Master/master-bugfix
Reviewed zone test missions
2017-02-21 12:18:58 +01:00
Sven Van de Velde
33f064141f Reviewed all the zone test missions 2017-02-21 12:17:14 +01:00
Sven Van de Velde
ede466c0bd Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-21 11:10:35 +01:00
Sven Van de Velde
8c4a6e2301 Progress 2017-02-21 11:09:40 +01:00
Sven Van de Velde
6d3a2b0f52 Progress 2017-02-20 14:43:55 +01:00
Sven Van de Velde
e56e81ee57 Progress SEAD Tasking 2017-02-20 14:38:50 +01:00
FlightControl
e243ff32fa Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Development/Moose/Core/Zone.lua
#	Moose Development/ReleaseNotes.txt
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 -
Polygon Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-510 - Send message if Clients fly
the first time in the Polygon Zones/ZON-510 - Send message if Clients
fly the first time in the Polygon Zones.miz
#	docs/Documentation/Zone.html
2017-02-19 13:43:44 +01:00
FlightControl
4ff9766690 Analysis of TASK_SEAD 2017-02-19 13:32:43 +01:00
Sven Van de Velde
e6e470e8d1 Merge pull request #246 from FlightControl-Master/master-bugfix
2017-02-08 - Reworked some vector functions.
-- POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added.
-- ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added.
-- ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added.
-- ZONE_POLYGON_BASE:GetRandomPointVec2() added.
-- ZONE_POLYGON_BASE:GetRandomPointVec3() added.
2017-02-18 22:39:38 +01:00
FlightControl
d7c2e0f900 Reworked zone and vector functions
2017-02-08 - Reworked some vector functions.
-- POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added.
-- ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added.
-- ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added.
-- ZONE_POLYGON_BASE:GetRandomPointVec2() added.
-- ZONE_POLYGON_BASE:GetRandomPointVec3() added.
2017-02-18 22:38:31 +01:00
FlightControl
b9b2caed65 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-18 19:54:20 +01:00
FlightControl
f9708de598 Progress 2017-02-18 19:51:20 +01:00
Sven Van de Velde
e788bc928d Merge pull request #245 from FlightControl-Master/CraigOwen
EVT-501 OnEventLanding LandingChallengeComplex
2017-02-16 19:26:56 +01:00
Sven Van de Velde
bc863c157e Merge pull request #244 from FlightControl-Master/Bugfix-132nd
Fix to Missile Trainer
2017-02-16 18:31:42 +01:00
entropySG
5cae3a9600 Fix to Missile Trainer 2017-02-16 10:58:35 +01:00
CraigOwen
b60526686f Moved the LandingChallenge
Created new folder EVT-501
Changed mission and script name to EVT-501 OnEventLand
LandingChallengeComplex
2017-02-15 22:08:21 +01:00
CraigOwen
423c45489e Full landing challenge
This mission combines eventmanagement with sets and scheduler for a full
landing challenge. Descriptions are given for each step.
2017-02-15 20:03:23 +01:00
FlightControl
5c090b108c Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 -
Caucasus.miz
#	Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 -
Nevada.miz
#	Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase
CleanUp/ACL-001 - Airbase CleanUp.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -
Spawned AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 -
Patrol AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions
InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when
Destroyed/AIB-004 - Respawn Test when Destroyed.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and
Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at
Airbases/AIB-006 - Declutter AI at Airbases.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air
Patrol/CAP-001 - Combat Air Patrol.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage
within Range/CAP-010 - CAP and Engage within Range.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage
within Zone/CAP-011 - CAP and Engage within Zone.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a ZONE-ME Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by
Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane
Group - Engage with Speed.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by
Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by
Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in
1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS
in 1 Radius Zone by Helicopter and AirPlane Groups.miz
#	Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit
Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 -
Unit Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 -
Unit Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 -
Group Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 -
Group Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 -
Group Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 -
Package Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 -
Package Unboarding.miz
#	Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001
- Detection Areas.miz
#	Moose Test Missions/DET - Detection/DET-101 - Detection
Reporting/DET-101 - Detection Reporting.miz
#	Moose Test Missions/ESC - Escorting/ESC-001 - Escorting
Helicopters/ESC-001 - Escorting Helicopters.miz
#	Moose Test Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001
- API Demo 1.miz
#	Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot
Example/EVT-100 - OnEventShot Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-101 - OnEventHit
Example/EVT-101 - OnEventHit Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-102 - OnEventTakeoff
Example/EVT-102 - OnEventTakeoff Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-103 - OnEventLand
Example/EVT-103 - OnEventLand Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-104 - OnEventCrash
Example/EVT-104 - OnEventCrash Example.miz
#	Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition
Explanation/FSM-100 - Transition Explanation.miz
#	Moose Test Missions/GRP - Group Commands/GRP-200 - Follow
Group/GRP-200 - Follow Group.miz
#	Moose Test Missions/GRP - Group Commands/GRP-300 - Switch
WayPoints/GRP-300 - Switch WayPoints.miz
#	Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz
#	Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 -
Menu Client.miz
#	Moose Test Missions/MEN - Menu Options/MEN-002 - Menu
Coalition/MEN-002 - Menu Coalition.miz
#	Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 -
Menu Group.miz
#	Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile
Trainer/MIT-001 - Missile Trainer.miz
#	Moose Test Missions/MOOSE_Test_Template.miz
#	Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol
Zones/PAT-001 - Switching Patrol Zones.miz
#	Moose Test Missions/SCH - Scheduler/SCH-000 - Simple
Scheduling/SCH-000 - Simple Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object
Scheduling/SCH-001 - Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat
Scheduling/SCH-100 - Simple Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat
Scheduling/SCH-110 - Object Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling
Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz
#	Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object
Scheduling/SCH-300 - GC Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat
Scheduling/SCH-310 - GC Object Repeat Scheduling.miz
#	Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 -
Airbase Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 -
Group Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 -
Client Sets.miz
#	Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001
- SEAD Evasion.miz
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 -
Repeat Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching
Demo/TAD-010 - Task Dispatching Demo.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling -
SEAD/TSK-010 - Task Modelling - SEAD.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling -
Pickup/TSK-020 - Task Modelling - Pickup.miz
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 -
Polygon Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-510 - Send message if Clients fly
the first time in the Polygon Zones/ZON-510 - Send message if Clients
fly the first time in the Polygon Zones.miz
2017-02-15 17:44:34 +01:00
FlightControl
beff62b864 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-15 10:09:52 +01:00
Sven Van de Velde
748e5cc8f8 Merge pull request #242 from FlightControl-Master/master-bugfix
Fix Event handling problem
2017-02-14 17:02:16 +01:00
FlightControl
3473076814 Fix for Delta, hopefully solves error in Event Handling. 2017-02-14 16:55:02 +01:00
FlightControl
fcf011a6f4 Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix 2017-02-14 15:24:46 +01:00
Sven Van de Velde
83d07017c3 Merge pull request #241 from FlightControl-Master/master-bugfix
Added EVENTHANDLER class for generic event handling
2017-02-14 13:15:49 +01:00
FlightControl
84b5f2dd68 Added EVENTHANDLER class for generic event handling 2017-02-14 13:15:11 +01:00
Sven Van de Velde
3776b57164 Merge pull request #240 from FlightControl-Master/master-bugfix
Master bugfix
2017-02-14 11:09:54 +01:00
FlightControl
d1877ba300 the rest 2017-02-14 11:04:39 +01:00
FlightControl
a174fa5169 the rest 2017-02-14 11:04:31 +01:00
FlightControl
2f50854c74 the rest 2017-02-14 11:04:25 +01:00
FlightControl
c72354a914 the rest 2017-02-14 11:03:57 +01:00
FlightControl
843759193f the rest 2017-02-14 11:03:53 +01:00
FlightControl
247abe57f3 the rest 2017-02-14 11:03:46 +01:00
FlightControl
88943f9c96 the rest 2017-02-14 10:59:23 +01:00
FlightControl
19842bd7f0 the rest 2017-02-14 10:59:10 +01:00
FlightControl
a50b497840 the rest 2017-02-14 10:58:56 +01:00
FlightControl
bd9d831b49 the rest 2017-02-14 10:58:48 +01:00
FlightControl
ff48d20c40 menu 2017-02-14 10:56:52 +01:00
FlightControl
4b65b944b3 group 2017-02-14 10:56:45 +01:00
FlightControl
1ac2dde262 fsm 2017-02-14 10:56:38 +01:00
FlightControl
b24c04f64e event handling 2017-02-14 10:56:30 +01:00
FlightControl
21ddf8f0c0 Escort 2017-02-14 10:56:18 +01:00
FlightControl
9cc04e31a1 Detection 2017-02-14 10:56:06 +01:00
FlightControl
17e3d51b56 Cargo test missions updated 2017-02-14 10:55:54 +01:00
FlightControl
085f7628fd CAS test missions updated 2017-02-14 10:55:36 +01:00
FlightControl
d4d521b432 AIB Test Missions Updated 2017-02-14 10:55:21 +01:00
FlightControl
a24717e30e Fix for delayed __Event( DelaySeconds ) trigger
DelaySeconds must ALWAYS be given!
2017-02-14 10:53:46 +01:00
FlightControl
62b668029b Updates 2017-02-14 08:49:59 +01:00
Sven Van de Velde
062d241c1c Merge pull request #238 from Delta-99/master
AI Balancers for all airports and both coalitions demo mission
2017-02-12 21:01:03 +01:00
Delta-99
71730c5b70 Merge pull request #8 from Delta-99/ai-balancer-demo
AI Balancers for all airports and both coalitions demo mission
2017-02-12 14:58:06 -05:00
Delta-99
895bff0121 AI Balancers for all airports and both coalitions demo mission
AI Balancers for all airports and both coalitions demo mission
2017-02-12 14:56:46 -05:00
Delta-99
90db41567d Merge pull request #7 from FlightControl-Master/master
Merge from FlightControl-Master
2017-02-12 14:54:45 -05:00
Sven Van de Velde
2f93e16566 Merge pull request #237 from FlightControl-Master/CraigOwen
Example for EventOnLand
2017-02-12 18:18:06 +01:00
CraigOwen
099697f582 Example for EventOnLand
In this example a client can land a plane in specified zones. In case of
success, there will be a message and a flaring unit.
2017-02-12 18:14:39 +01:00
Delta-99
b917e604b5 Merge pull request #6 from FlightControl-Master/master
Merge latest FlightControl-Master changes
2017-02-10 16:12:21 -05:00
FlightControl
a47195198e Fixes and framework stabilization 2017-02-08 22:40:26 +01:00
Sven Van de Velde
4a89d4fc78 Merge pull request #236 from FlightControl-Master/FlightControl
Fix for AI_CAS_ZONE
2017-02-08 15:07:22 +01:00
FlightControl
903d8dd628 Static moose 2017-02-08 15:06:17 +01:00
FlightControl
dd310b48d4 Fix for CAS, stopping when one plane crashed... 2017-02-08 15:04:27 +01:00
FlightControl
63d443802b Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-08 15:03:15 +01:00
Sven Van de Velde
48e382d999 Merge pull request #235 from FlightControl-Master/FlightControl
Fix for AI_CAP_ZONE
2017-02-08 11:59:24 +01:00
FlightControl
50f37d4dbe Fixed glitch in AI_CAP_ZONE 2017-02-08 11:58:35 +01:00
FlightControl
8c0adea841 Fixed glitch in AI_CAP 2017-02-08 10:24:50 +01:00
Delta-99
7be632ced0 Merge pull request #5 from FlightControl-Master/master
Update Delta-99 From FlightControl-Master
2017-02-07 17:37:49 -05:00
FlightControl
1d8d8b3e58 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-07 22:00:37 +01:00
Sven Van de Velde
3685b9418a Merge pull request #234 from FlightControl-Master/FlightControl
Event Documentation
2017-02-07 21:54:40 +01:00
FlightControl
24c896b535 Event Documentation 2017-02-07 21:53:23 +01:00
FlightControl
fa8fcfec89 Event Documentation 2017-02-07 20:20:58 +01:00
FlightControl
4b1f0014ab Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-07 14:36:11 +01:00
Sven Van de Velde
f115ec87d4 Merge pull request #233 from FlightControl-Master/FlightControl
Updated Event Handling
2017-02-07 13:48:34 +01:00
FlightControl
20f8a98cf0 Event documentation 2017-02-07 13:46:52 +01:00
FlightControl
1441d035d7 updated event handling 2017-02-07 13:44:59 +01:00
FlightControl
3db8062583 Event Handling Optimization
-- Created a HandleEvent method
-- Created an UnHandleEvent method
2017-02-07 13:33:29 +01:00
FlightControl
154f729788 Event Handling improved 2017-02-07 10:34:16 +01:00
FlightControl
e9a4429f7a Event handling presentation, first version. 2017-02-06 22:40:54 +01:00
FlightControl
3f2b47b82d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-06 20:21:37 +01:00
Sven Van de Velde
8fc7609932 Merge pull request #231 from FlightControl-Master/FlightControl
Flightcontrol
2017-02-06 17:19:38 +01:00
FlightControl
c512eaad04 InitRandomTemplates
test mission
2017-02-06 17:15:08 +01:00
FlightControl
ec299132ad Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-06 17:14:43 +01:00
Sven Van de Velde
985070b5f8 Merge pull request #230 from FlightControl-Master/FlightControl
AI_CAS_ZONE fixed
-- Added separate detection loop during engagement
-- Detection during patrolling is off.
-- Engage now has several parameters that specify how to engage within
the zone.
-- Using now the EngageUnit command instead of the AttackUnit command. Is better.
-- Created several additional test missions, more to come.
2017-02-06 15:02:30 +01:00
FlightControl
93e7fab116 Fixed AI_CAS_ZONE
-- Added separate detection loop during engagement
-- Detection during patrolling is off.
-- Engage now has several parameters that specify how to engage within
the zone.
-- Created several additional test missions, more to come.
2017-02-06 14:58:19 +01:00
FlightControl
9f63184a5e Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-05 18:22:09 +01:00
Sven Van de Velde
7d3729e556 Merge pull request #227 from FlightControl-Master/FlightControl
Fixed AI_CAP_ZONE engage with Engage Zone issue

-- Fixed AI_CAP_ZONE: Groups not engaging when an engage was "aborted",
but was actually erroneously set to "Accomplished". Is fixed now. An
engage that cannot be accomplished (due to no unit in the Engage Zone,
will be Aborted). Groups are engaging now when an Engage Zone is set.
-- Fixed FSM: There was a big issue with delayed function scheduling.
When creating "loops", meaning an Event handler calles again itself
delayed, would start propagating multiple times when the event was
scheduled, and another schedule of the event would be planned.... Thus 2
to x events handled and would end in chaos. Implemented delayed event
scheduling accepting a negative parameter in seconds, which would
check if an event would be already scheduled. If so, no new event would
be scheduled until the event handler would have been processed. In this
way, only maximum one event can be scheduled when this is wanted (this
is not always the case by the mission designer). So providing a negative
value as the seconds would make the event being scheduled only once!
-- Added EventPriority field in EVENT logging
-- Removed logging from POSITIONABLE
-- Moved the start of the detection to the Start event handler in
AI_CAP_ZONE
2017-02-05 18:13:19 +01:00
FlightControl
b9b829a09a Various fixes
-- Fixed AI_CAP_ZONE: Groups not engaging when an engage was "aborted",
but was actually erroneously set to "Accomplished". Is fixed now. An
engage that cannot be accomplished (due to no unit in the Engage Zone,
will be Aborted). Groups are engaging now when an Engage Zone is set.
-- Fixed FSM: There was a big issue with delayed function scheduling.
When creating "loops", meaning an Event handler calles again itself
delayed, would start propagating multiple times when the event was
scheduled, and another schedule of the event would be planned.... Thus 2
to x events handled and would end in chaos. Implemented delayed event
scheduling accepting a *negative* parameter in seconds, which would
check if an event would be already scheduled. If so, no new event would
be scheduled until the event handler would have been processed. In this
way, only maximum one event can be scheduled when this is wanted (this
is not always the case by the mission designer). So providing a negative
value as the seconds would make the event being scheduled only once!
-- Added EventPriority field in EVENT logging
-- Removed logging from POSITIONABLE
-- Moved the start of the detection to the Start event handler in
AI_CAP_ZONE
2017-02-05 18:06:29 +01:00
FlightControl
f1755fc3a4 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-05 12:08:27 +01:00
Sven Van de Velde
a9101750e5 Merge pull request #226 from FlightControl-Master/FlightControl
Bugfix of EVENT prioroty handling
2017-02-05 10:27:38 +01:00
FlightControl
a530cea326 Fixed glitch in EVENT with new EventPriority logic
The Init method was wrong. It is fixed now.
SPAWN and other event handling will now be correctly processed!
2017-02-05 10:26:07 +01:00
FlightControl
0adf349066 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-05 09:13:36 +01:00
FlightControl
8acfb79c0e USAF agressors fix (and also for other countries with _ names in country.id)
-- reworked the DATABASE template population logic
2017-02-05 08:31:03 +01:00
Sven Van de Velde
e5c3f2070f Merge pull request #225 from FlightControl-Master/FlightControl
Flightcontrol
2017-02-04 19:33:43 +01:00
FlightControl
a669ba5e5b bugfix with uncontrolled 2017-02-04 19:32:54 +01:00
FlightControl
7bb66c79aa Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-04 15:55:45 +01:00
FlightControl
f65cc1404a doc 2017-02-04 15:55:21 +01:00
Sven Van de Velde
e088edcfbc Merge pull request #224 from FlightControl-Master/FlightControl
Flightcontrol
-- Fixed documentation links
-- Added SPAWN:UnControlled( true/false )
-- Fixed glitch in MENU_CLIENT_COMMAND
-- New EVENT dispatching model
-- Implemented EVENT priorities in DATABASE, SET, UNIT, GROUP
-- Added BASE:SetEventPriority() and BASE:GetEVentPriority()
-- Made new test mission for UnControlled demonstration
2017-02-04 15:31:13 +01:00
FlightControl
52f4051901 Various Fixes
-- Documentation fixes with links not working.
-- MENU_CLIENT_COMMAND had a small glitch, fixed that one too.
-- Implemented new Event Dispatcher.
--
2017-02-04 15:16:32 +01:00
FlightControl
be4d51237b Improved the event handling
-- Removed the sort
-- Implemented the order in the existing table.
-- 5 levels
-- _DATABASE = 1
-- SET and SET_ derived classes = 2
-- UNIT = 3
-- GROUP = 4
-- all other = 5
2017-02-04 11:35:58 +01:00
FlightControl
ab345f5ad2 New Event Dispatching based on priorities
-- First _DATABASE
-- then SETS
-- then the rest
-- changed AIRBASEPOLICE
2017-02-03 22:18:51 +01:00
FlightControl
33af2b4f95 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-02-03 18:21:42 +01:00
FlightControl
8d2404b1e5 Update 2017-02-03 18:21:24 +01:00
Sven Van de Velde
8ba815a7ba Merge pull request #223 from Delta-99/master
Update Moose.lua for FlightControl
2017-02-03 08:02:03 +01:00
Delta-99
dc71032f7d Update Moose.lua to incorporate latest changes 2017-02-02 22:58:49 -05:00
Delta-99
e41b72196b Merge pull request #4 from FlightControl-Master/master
Update from FlighControl-Master
2017-02-02 22:55:20 -05:00
Sven Van de Velde
30c7fce430 comment 2nd line that makes menu crash 2017-02-02 08:37:57 +01:00
Sven Van de Velde
e4ad046bbf commented line that crashed menu... 2017-02-02 08:31:33 +01:00
Sven Van de Velde
2767026892 Merge pull request #219 from 132nd-etcher/master
add "inner" and "outer" parameter to ZONE_RADIUS:GetRandomVec2() method
Great job @132nd-etcher ok 👌
2017-02-02 05:18:16 +01:00
Delta-99
96516760ea Merge pull request #3 from FlightControl-Master/master
Update Delta-99 master
2017-02-01 23:17:59 -05:00
Sven Van de Velde
2550638bb3 Merge pull request #218 from Delta-99/add-radio-alt-type
Add radio alt type
2017-02-02 05:11:29 +01:00
Delta-99
e723a66f62 Add an Altitude type to the AI_PATROL, AI_CAP, AI_CAS New() calls. Can pass RADIO or BARO and defaults to RADIO (or AGL) if nothing passed. 2017-01-31 22:50:42 -05:00
Delta-99
273b5fc7e5 Merge pull request #2 from FlightControl-Master/master
Merge FlightControl-Master/master to Delta-99/master
2017-01-30 16:45:08 -05:00
132nd-etcher
ac7dd8cb2f add "inner" and "outer" parameter to ZONE_RADIUS:GetRandomVec2() method 2017-01-28 20:08:30 +01:00
FlightControl
e00e3104ab Presentations 2017-01-24 11:52:28 +01:00
FlightControl
3466f2d3b7 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-24 11:27:07 +01:00
Sven Van de Velde
fd1ed374cf Merge pull request #215 from FlightControl-Master/FlightControl
-- Added SPA-017 test mission
-- Added SPAWN:InitAIOnOff()
-- Added SPAWN:InitAIOn()
-- Added SPAWN:InitAIOff()
-- Added GROUP:SetAIOnOff( AIOnOff )
-- Added GROUP:SetAIOn()
-- Added GROUP:SetAIOff()
-- Documentation
2017-01-24 11:10:57 +01:00
FlightControl
98a77e2856 Added AI Off methods in SPAWN and GROUP
-- Added SPA-017 test mission
-- Added SPAWN:InitAIOnOff()
-- Added SPAWN:InitAIOn()
-- Added SPAWN:InitAIOff()
-- Added GROUP:SetAIOnOff( AIOnOff )
-- Added GROUP:SetAIOn()
-- Added GROUP:SetAIOff()
-- Documentation
2017-01-24 11:09:55 +01:00
FlightControl
0095e53b3a Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-24 07:10:24 +01:00
FlightControl
0cb456ef0c Set AI On or Off when spawning
-- Added AI On or Off functions for SPAWN
-- Added AI On or Off functions for GROUP
2017-01-24 07:10:20 +01:00
Sven Van de Velde
2a928765bb Merge pull request #214 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-23 15:32:37 +01:00
FlightControl
0c55d62763 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-23 15:31:15 +01:00
FlightControl
81b04bdbfb Trace off for mission 2017-01-23 15:30:54 +01:00
Sven Van de Velde
d6ff4221e7 Merge pull request #213 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-23 15:05:34 +01:00
FlightControl
8a1765141a Task Scores are now calculating correctly
The task scores are now working . Jippie!!!!
Demo time!!!
2017-01-23 15:04:20 +01:00
FlightControl
745e185f71 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-23 14:26:10 +01:00
FlightControl
0109f011e8 Static + documentation 2017-01-23 14:17:23 +01:00
FlightControl
d4497fbf5e Cleanup of logging volume in fsm.lua
-- replaced all self:E with self:T
2017-01-23 14:16:24 +01:00
FlightControl
faa64c9f4e Tasking and Documentation
-- Added possibility to abort a TASK
-- Revised documentation of the main site.
2017-01-23 14:05:59 +01:00
FlightControl
956c71bbaa documentation 2017-01-22 15:05:49 +01:00
FlightControl
a54c3f975a doc 2017-01-22 14:55:28 +01:00
FlightControl
553fab6b51 Intellisense picture 2017-01-22 14:54:12 +01:00
FlightControl
24de4655f6 Documentation 2017-01-22 14:49:26 +01:00
FlightControl
fa97ba6ed7 lua code block, next try 2017-01-22 14:08:20 +01:00
FlightControl
ca8920a429 Documentation 2017-01-22 14:00:42 +01:00
FlightControl
83f4b35bb3 Documentation 2017-01-22 13:30:32 +01:00
FlightControl
77c706a3c6 Installation documentation 2017-01-22 08:07:06 +01:00
Sven Van de Velde
bda23b2064 Set theme jekyll-theme-architect 2017-01-22 07:59:52 +01:00
FlightControl
8f5dec1da8 Installation documentation 2017-01-22 07:57:11 +01:00
Sven Van de Velde
4f6d81e0c8 Merge pull request #209 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-22 07:07:24 +01:00
FlightControl
0f278757de Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-22 07:06:35 +01:00
FlightControl
637e14798f static version 2017-01-22 07:05:21 +01:00
Sven Van de Velde
312696a385 Merge pull request #208 from FlightControl-Master/FlightControl
Flightcontrol
-- DCS Folder sync barch file (DCS_Folder_Sync.bat) stored in the root directory of MOOSE.
-- Allow task abort through the menu options (still need to fix the coalition problem)
-- Documented in BASE the SetState and the GetState methods.
2017-01-22 07:04:20 +01:00
FlightControl
10c8e67e37 Updated file name to sync DCS Folder 2017-01-22 06:57:44 +01:00
FlightControl
93bea9528d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-22 06:56:26 +01:00
Sven Van de Velde
34037c3a8c Merge pull request #206 from FlightControl-Master/Bugfix-132nd
Fixed 3 ZONE test missions that didnt work for me
2017-01-21 10:33:26 +01:00
FlightControl
9987b60c07 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-20 20:15:06 +01:00
FlightControl
84a1fc1ac7 Documentation of SetState and GetState and BASE documentation update.
-- SetState documented.
-- GetState documented.
-- BASE main documentation.
-- Test mission updated and documentation.
2017-01-20 20:15:02 +01:00
Sven Van de Velde
af37624d4f Merge pull request #207 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-20 18:26:48 +01:00
FlightControl
65f4902029 New test mission. 2017-01-20 18:22:32 +01:00
entropySG
8f2f69d7b9 Fixed Zone Test Missions 2017-01-20 17:41:44 +01:00
FlightControl
4b66d9db31 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-20 16:54:52 +01:00
FlightControl
fcf31a4d50 Setup Presentation 2017-01-20 16:54:24 +01:00
Sven Van de Velde
cacbc6f40c Merge pull request #204 from birgersp/master
Added Update.bat script to accommodate FlightControl-Master/MOOSE#203
2017-01-20 14:54:14 +01:00
Birger Skogeng Pedersen
e7d8aa528d Added Update.bat script to accommodate FlightControl-Master/MOOSE#203
This script pulls the latest changes from the remote repository, and
updates the submodules.
2017-01-20 09:51:27 +01:00
Sven Van de Velde
4e069b389d Merge pull request #202 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-19 20:10:24 +01:00
FlightControl
c48129d647 HTML generation 2017-01-19 20:07:34 +01:00
FlightControl
d04b0ed82b Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-19 20:07:22 +01:00
Sven Van de Velde
6ce40d0bbd Merge pull request #201 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-19 20:03:57 +01:00
FlightControl
0a2cdf999d Fixed case problem for pictures in documentation. 2017-01-19 20:03:11 +01:00
FlightControl
02fe5f6104 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-19 20:02:53 +01:00
Sven Van de Velde
e0f2c6c9fb Merge pull request #200 from FlightControl-Master/FlightControl
AI_CAP and AI_PATROL and AI_CAS fine-tuning.

-- ROE fine tuned.
-- Fixed performance problems.
-- Detection events cross firing and exploding...
-- Crash, Ejected, PilotDead is detected, makes the FSM stop.
-- FSM bug fixed. There was an issue with the onbefore and onleave
events returning false, which did not stop the transition! Fixed now.
-- Event calling can return errors, and these must be logged correctly
-> xpcall implemented.
-- Added help from moose club members as a reference in the
documentation. -> delta99 en whisper.
-- Fixed the presentations.
2017-01-19 19:54:48 +01:00
FlightControl
15fdb0fd45 Fixed AI_CAP
-- ROE fine tuned.
-- Detection events cross firing and exploding...
-- Crash, Ejected, PilotDead is detected, makes the FSM stop.
-- FSM bug fixed. There was an issue with the onbefore and onleave
events returning false, which did not stop the transition! Fixed now.
-- Event calling can return errors, and these must be logged correctly
-> xpcall implemented.
-- Added help from moose club members as a reference in the
documentation. -> delta99 en whisper.
-- ...
2017-01-19 19:51:37 +01:00
FlightControl
b52dd7cf57 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-19 19:01:50 +01:00
Sven Van de Velde
60e01b0d9c Merge pull request #199 from 132nd-etcher/master
Add optional AmmoCount to CONTROLLABLE:TaskFireAtPoint
2017-01-19 10:39:27 +01:00
132nd-etcher
8eb76e0da2 Add optional AmmoCount to CONTROLLABLE:TaskFireAtPoint 2017-01-19 08:19:17 +01:00
Sven Van de Velde
45d124065b Merge pull request #198 from FlightControl-Master/Bugfix-132nd
Bugfix 132nd, second fix from entropy fixing fireatpoint
2017-01-18 19:43:07 +01:00
entropySG
62930f39b1 Fixed FireAtPoint bug 2017-01-18 19:31:52 +01:00
entropySG
c54c3f275f Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix-132nd 2017-01-18 19:10:21 +01:00
entropySG
575626e44e Merge remote-tracking branch 'refs/remotes/origin/Bugfix-132nd' 2017-01-18 16:52:08 +01:00
Sven Van de Velde
9c81380b50 Merge pull request #195 from FlightControl-Master/FlightControl
-- AI_PATROL_ZONE rename
-- AI_CAS_ZONE new class
-- AI_CAP_ZONE new class
-- documentation
-- test missions
-- presentations
-- fixed errors in AI_PATROL_ZONE
  -- Fixed AI returning too early back to base
  -- When AI is respawned, the FSM is reset.
2017-01-17 12:22:21 +01:00
FlightControl
1206c51fe1 Final updates 2017-01-17 12:19:35 +01:00
FlightControl
b9c85d4cb7 Updated presentation 2017-01-16 14:43:17 +01:00
FlightControl
54becfe0b7 Updated test mission 2017-01-16 13:55:33 +01:00
FlightControl
131d2dd4a4 AI_CAP Created
-- Documentation
-- Coding
-- Test Missions
-- Presentations
2017-01-16 12:25:21 +01:00
FlightControl
4f6ed0c119 Updates 2017-01-15 22:21:47 +01:00
FlightControl
114517bb05 Documentation and embedding pictures in AI_CAS_ZONE 2017-01-15 22:18:39 +01:00
FlightControl
04c6d12247 Updates 2017-01-15 18:44:44 +01:00
FlightControl
6d4a7a21b9 Documentation review 2017-01-15 18:23:02 +01:00
FlightControl
b888a0e96a Progress CAS + PATROLZONE
-- Code
-- Documentation
-- Presentations
-- Dias
-- Test Missions
2017-01-15 18:08:58 +01:00
FlightControl
70a64e81a4 Presentations 2017-01-15 14:08:04 +01:00
FlightControl
6d5655e56a Progress on AI_CAS_ZONE and AI_PATROL_ZONE rework. 2017-01-15 11:11:58 +01:00
FlightControl
e552e70e2a Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-13 20:15:16 +01:00
Sven Van de Velde
3f6487c410 Merge pull request #194 from FlightControl-Master/FlightControl
commit
2017-01-13 20:08:37 +01:00
FlightControl
25b7c49842 Updates 2017-01-13 20:08:18 +01:00
FlightControl
3dfbc9a0f9 updates 2017-01-13 20:06:17 +01:00
FlightControl
3331c58e24 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-13 20:05:58 +01:00
FlightControl
eae00a0cb8 commit 2017-01-13 20:04:42 +01:00
Sven Van de Velde
cabedb65b7 Merge pull request #193 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-13 20:00:01 +01:00
FlightControl
f0e99225db Updates 2017-01-13 19:59:23 +01:00
FlightControl
f3d0f7233d Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-13 19:59:07 +01:00
Sven Van de Velde
8609cb50d3 Merge pull request #192 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-13 19:58:00 +01:00
FlightControl
54c3549bac Update 2017-01-13 19:57:30 +01:00
FlightControl
8439708cca Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-13 19:57:21 +01:00
Sven Van de Velde
368b396b2a Merge pull request #191 from FlightControl-Master/FlightControl
First AI_CAS_ZONE prototype ...
2017-01-13 14:14:15 +01:00
FlightControl
3e199fce90 Fixed the scoring (small fix) 2017-01-13 14:12:35 +01:00
FlightControl
60bb6de4a5 CAS first prototype 2017-01-13 14:05:09 +01:00
FlightControl
f5f59c4137 Test 2017-01-13 03:13:13 +01:00
FlightControl
5bdad983ad Updated the declutter lua file 2017-01-12 18:53:27 +01:00
FlightControl
f2f73ef71b Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-12 12:23:10 +01:00
Sven Van de Velde
cfca7dfc05 Merge pull request #190 from FlightControl-Master/FlightControl
Flightcontrol: Fixed AI_BALANCER problems.
- Problems were with the scheduler, and the SPAWNING.
- After a re-spawn, the route set by AI_PATROLZONE was erased for the new GROUP object.
- The SCHEDULER was completely wrong used for SetTask, GetTask and RouteTo.
2017-01-12 12:22:15 +01:00
FlightControl
1acdfc1798 Ensure merge is done correctly 2017-01-12 12:20:17 +01:00
FlightControl
db7b91bb5f Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-12 12:19:42 +01:00
FlightControl
6716f2907b Fixed AI_BALANCER problem with AI not patrolling...
-- Need to redo a video, because I gave the wrong example ...
2017-01-12 12:19:23 +01:00
FlightControl
f0d0b07cc0 Master page and introduction 2017-01-12 09:37:52 +01:00
Delta-99
8a16507adb Merge pull request #1 from FlightControl-Master/master
Refresh from master
2017-01-11 14:51:58 -05:00
FlightControl
cbd26b631a CARGO 2017-01-11 16:54:08 +01:00
FlightControl
792f006041 main site 2017-01-11 11:38:39 +01:00
FlightControl
4f7fb7ef1d Link to MOOSE in 5 minutes video 2017-01-11 11:35:22 +01:00
FlightControl
d274dc44e9 MOOSE in 5 minutes presentation 2017-01-11 11:27:59 +01:00
FlightControl
788e5dfa56 Master page update 2017-01-11 10:25:09 +01:00
FlightControl
b4c7e9cacf Master page update 2017-01-11 10:21:05 +01:00
FlightControl
2453fb6780 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-11 10:12:50 +01:00
Sven Van de Velde
3cff3ed761 Merge pull request #187 from FlightControl-Master/FlightControl
Flightcontrol
2017-01-10 12:57:02 +01:00
FlightControl
9258beffc8 Revised documentation for AI_BALANCER
-- Added new SPAWN test missions.
-- Added new AI_BALANCER test missions.
-- Revised the MOOSE launch page.
2017-01-10 12:56:03 +01:00
FlightControl
899d076399 Documentation and Videos 2017-01-09 16:48:30 +01:00
FlightControl
41ccfb35fc Modified documentation 2017-01-09 15:59:54 +01:00
FlightControl
5adc72fdb9 Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl 2017-01-09 15:59:40 +01:00
FlightControl
de4edad449 Documenting further 2017-01-09 11:27:37 +01:00
Sven Van de Velde
ccc10e5233 Merge pull request #186 from FlightControl-Master/FlightControl
-- Revised and Added documentation.
-- Added pictures to documentation.
-- Add/Exit clients is working. AI balances perfectly.
-- FSM bug fixed. SUBS should not execute OnAfter, OnEnter
2017-01-08 21:13:13 +01:00
FlightControl
51780b1d9b AI_BALANCER revised completely
-- Revised and Added documentation.
-- Added pictures to documentation.
-- Add/Exit clients is working. AI balances perfectly.
-- FSM bug fixed. SUBS should not execute OnAfter, OnEnter
2017-01-08 21:07:25 +01:00
FlightControl
1f90c0c766 Fixed respawn bug in AI_BALANCER + Scheduler bug
AI_BALANCER respawns back the AI. Bug was in the FSM. In a transition,
when states are the same, the events SHOULD execute.
Added spawn delay interval option API SetSpawnInterval().
Bug that prevented AI_BALANCER to start if multiple AI_BALANCERs is also
fixed.
Fixed bug in scheduler dispatcher. Multiple schedules for the same
scheduler work now too!
2017-01-08 03:53:05 +01:00
FlightControl
243f33764a Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl
# Conflicts:
#	Moose Mission Setup/Moose.lua
2017-01-07 16:46:50 +01:00
FlightControl
196f85f07b AI_BALANCER fixes and other stuff 2017-01-07 16:44:41 +01:00
entropySG
c6dc68cf0a Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix-132nd 2017-01-07 14:16:50 +01:00
Sven Van de Velde
8c45629dde Merge pull request #184 from FlightControl-Master/Bugfix-132nd
fix to missile trainer be 132nd
2017-01-07 14:15:48 +01:00
entropySG
ffe3325080 fix to missile trainer be 132nd
we had noticed that some weapons, like GBU-38 were destroyed by the
missile trainer. This insert would restrict the unspecific destruction
of weapons to the Tunguskas missile only and leave other weapons, like
GBU38 intact
2017-01-07 13:59:56 +01:00
FlightControl
fc100716e0 FSM Updates 2017-01-06 11:08:42 +01:00
FlightControl
44332595a4 And now putting them back to get them on the web page :-) 2017-01-06 07:42:50 +01:00
FlightControl
a5298a950f Deleting JPG Files ... 2017-01-06 07:42:08 +01:00
FlightControl
743609310b FSM Documentation 2017-01-06 07:37:20 +01:00
FlightControl
df0adff9f1 FSM Documentation 2017-01-05 22:12:09 +01:00
FlightControl
e60f686ec8 FSM Documentation 2017-01-05 16:12:29 +01:00
FlightControl
64092dbb2e FSM documentation 2017-01-05 16:12:07 +01:00
FlightControl
640af3d964 FSM documentation phase 1 done. 2017-01-05 08:42:07 +01:00
FlightControl
3017f10906 FSM Documentation 2017-01-05 08:34:15 +01:00
Sven Van de Velde
29401e0c95 Merge pull request #183 from birgersp/adding-dcs-api-submodule
Re-added DCS-API submodule
2017-01-04 14:45:28 +01:00
Birger Skogeng Pedersen
56a78f1f28 Added DCS-API submodule 2017-01-04 14:36:00 +01:00
FlightControl
f79539965f FSM documentation 2017-01-04 11:13:49 +01:00
FlightControl
6bd4442d84 FSM Documentation 2017-01-04 10:40:58 +01:00
FlightControl
ccbe79c00c Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2017-01-04 10:37:31 +01:00
FlightControl
048703a1e9 test 2017-01-04 10:37:02 +01:00
FlightControl
f080d4bac1 test 2017-01-04 10:36:42 +01:00
Sven Van de Velde
6856404126 Set theme jekyll-theme-architect 2017-01-04 10:35:01 +01:00
FlightControl
335ef0d471 FSM Documentation 2017-01-04 10:33:11 +01:00
FlightControl
4a45923c15 FSM doc 2016-12-23 07:17:24 +01:00
FlightControl
a5bc67b328 FSM 2016-12-23 07:16:32 +01:00
Sven Van de Velde
416f201742 Set theme jekyll-theme-architect 2016-12-23 07:14:48 +01:00
FlightControl
aa3a75350a FSM 2016-12-23 07:13:20 +01:00
FlightControl
d7e3d5fc79 FSM doc 2016-12-23 07:11:22 +01:00
FlightControl
54d0c20d5b FSM docs 2016-12-23 07:02:29 +01:00
FlightControl
7ad4db84bd FSM Documentation 2016-12-23 06:58:47 +01:00
Sven Van de Velde
80ed9fe3f8 Merge pull request #181 from FlightControl-Master/Moose-Release
FSM Documentation
2016-12-23 06:51:48 +01:00
FlightControl
13854370e4 Documentation FSM 2016-12-23 06:50:24 +01:00
FlightControl
4e1b06a50b Merge remote-tracking branch 'refs/remotes/origin/master' into Moose-Release 2016-12-23 06:50:06 +01:00
Sven Van de Velde
a0cf14cd4f Merge pull request #180 from birgersp/master
Dcs luadoc to separate repo
2016-12-22 12:45:43 +01:00
Birger Skogeng Pedersen
2f7dd91259 Added DCS-API submodule 2016-12-22 12:42:24 +01:00
Birger Skogeng Pedersen
6601f2217a Removed DCS luadoc, will be re-added as a submodule 2016-12-22 12:41:45 +01:00
FlightControl
8daf37ce8f Merge remote-tracking branch 'refs/remotes/origin/master' into Moose-Release 2016-12-21 17:33:57 +01:00
Sven Van de Velde
0ab77d24b0 Merge pull request #178 from FlightControl-Master/Moose-Release
Moose release
2016-12-21 17:33:24 +01:00
FlightControl
cff0d8bb2b FSM Documentation 2016-12-21 17:31:24 +01:00
FlightControl
513839ceaa First pages 2016-12-20 11:47:07 +01:00
FlightControl
b1cb90d08d Tasking Presentation Updated
-- Video made
2016-12-20 11:11:17 +01:00
FlightControl
a65438f692 Task testing, works. 2016-12-20 10:09:02 +01:00
FlightControl
23a84bc1a9 Updated SEAD modelling task with new FSMC templates 2016-12-20 10:04:47 +01:00
FlightControl
cb993c4df5 Switched for Event and State Transition handlers the parameter order
The parameters are now: From, Event, To
The old parameter order was: Event, From, To
2016-12-20 09:24:19 +01:00
FlightControl
dc3ce7226e Documentation 2016-12-19 21:42:17 +01:00
FlightControl
6969e52f67 Merge remote-tracking branch 'refs/remotes/origin/master' into Moose-Release 2016-12-19 21:18:57 +01:00
Sven Van de Velde
e2ec47a3f0 Merge pull request #177 from FlightControl-Master/Moose-Release
Documentation of the BASE class
Added documentation for:
-- EventOn functions
-- Tracing
-- Revised documentation.
-- Still need to do some cleanup.
2016-12-19 21:17:34 +01:00
FlightControl
b21f1144fb Documentation of the BASE class 2016-12-19 21:15:10 +01:00
FlightControl
5bdb7db268 Merge remote-tracking branch 'refs/remotes/origin/master' into Moose-Release 2016-12-19 14:40:37 +01:00
Sven Van de Velde
f829892f64 Merge pull request #176 from FlightControl-Master/Moose-Release
Moose release
2016-12-19 14:28:20 +01:00
FlightControl
9a4d31c82f Youtube presentation for Finite State Machines 2016-12-19 14:27:09 +01:00
FlightControl
5ef372eaa0 Creation of first concept Youtube Video for Finite State Machines 2016-12-19 14:25:26 +01:00
FlightControl
74bbd59dde Merge remote-tracking branch 'refs/remotes/origin/master' into Moose-Release 2016-12-19 10:48:10 +01:00
Sven Van de Velde
9e84ae538f Rename README to README.md 2016-12-18 22:18:53 +01:00
FlightControl
5e4ffdafc7 docs 2016-12-18 14:30:36 +01:00
FlightControl
8af0b052c6 doc 2016-12-18 14:21:07 +01:00
FlightControl
755eb9748b reset documentation 2016-12-18 14:20:18 +01:00
FlightControl
2de7726430 documentation 2016-12-18 14:19:10 +01:00
FlightControl
837796ed0b documentation 2016-12-18 14:17:26 +01:00
FlightControl
637b5113fa documentation 2016-12-18 14:12:54 +01:00
FlightControl
8749067b0a Documentation 2016-12-18 13:52:13 +01:00
Sven Van de Velde
b0f614248c Set theme jekyll-theme-architect 2016-12-18 13:51:08 +01:00
FlightControl
9e28fa9266 Documentation 2016-12-18 13:49:45 +01:00
FlightControl
d2e24c39c4 Publish updates 2016-12-18 13:47:20 +01:00
Sven Van de Velde
b213896ae7 Set theme jekyll-theme-architect 2016-12-18 13:18:59 +01:00
FlightControl
07f9cd2431 docs 2016-12-18 13:16:24 +01:00
FlightControl
ba7d8787f8 test 2016-12-18 13:15:32 +01:00
Sven Van de Velde
19eb51d8a3 Set theme jekyll-theme-architect 2016-12-18 13:12:42 +01:00
FlightControl
4b6edcceba update documentation 2016-12-18 13:11:58 +01:00
FlightControl
2717617419 docs folder 2016-12-18 13:05:05 +01:00
FlightControl
f9ffb4d592 Deleted docs 2016-12-18 13:01:44 +01:00
FlightControl
ad0e048d15 Documentation main page 2016-12-18 11:58:34 +01:00
Sven Van de Velde
8eaa6a39d9 Merge pull request #172 from FlightControl-Master/Moose-Release
-- Fixed DETECTION DISPATCHER
-- Need to test this in a group.
-- Revised messages adding @ signs, which represent to who the message
is targetted.
2016-12-18 11:42:38 +01:00
FlightControl
0f8ed48183 Fixed DETECTION_DISPATCHER (I think)..
-- Need to test this in a group.
-- Revised messages adding @ signs, which represent to who the message
is targetted.
2016-12-18 11:39:16 +01:00
FlightControl
ce0be4dcf7 Fixing TASK_DISPATCHER and optimizing reports 2016-12-18 06:09:27 +01:00
FlightControl
59640e8df4 Updated Test Missions 2016-12-17 22:13:07 +01:00
Sven Van de Velde
4c904309f6 Merge pull request #171 from FlightControl-Master/MOOSE-RELEASE-2
MOOSE-RELEASE
2016-12-17 22:09:00 +01:00
FlightControl
7046f39ea4 Release preparation 2016-12-17 22:06:00 +01:00
FlightControl
23f164e5ad Release preparation. 2016-12-17 21:55:33 +01:00
Sven Van de Velde
2e8fa76c0d Merge pull request #170 from FlightControl-Master/MR2-Fixing-Add-new-Player
Mr2 fixing add new player
2016-12-17 16:37:37 +01:00
FlightControl
23a039b58f Publish new release 2016-12-16 17:06:43 +01:00
FlightControl
e98d36e314 Fixed all files now 2016-12-16 16:33:58 +01:00
FlightControl
33f42351e4 Progress 2016-12-16 12:56:36 +01:00
FlightControl
995e21e200 Progress 2016-12-16 12:07:11 +01:00
FlightControl
d62acf421e Progress 2016-12-15 14:51:08 +01:00
FlightControl
74cee904cd Updated the Static moose 2016-12-15 11:24:46 +01:00
FlightControl
ef120c7397 Test MP 2016-12-15 10:39:15 +01:00
FlightControl
9e6fc16cce Test MP 2016-12-15 10:30:54 +01:00
FlightControl
cf4adbd8d5 Filter dynamically 2016-12-15 10:22:28 +01:00
FlightControl
80f7269651 MP bugfix 2016-12-15 10:14:53 +01:00
FlightControl
b65bdad54f Updated Menu Triggering 2016-12-15 10:07:07 +01:00
FlightControl
51d8e2b7d8 Progress 2016-12-15 09:50:21 +01:00
FlightControl
63e46ad029 Task documentation and event handler prototypes 2016-12-15 06:57:06 +01:00
FlightControl
7f7570429a Abort working now as it should... fiew... what a work was that ... 2016-12-14 20:05:45 +01:00
FlightControl
c966929933 Progress 2016-12-14 15:09:10 +01:00
FlightControl
104aa006e4 Merge remote-tracking branch 'refs/remotes/origin/MOOSE-RELEASE-2' into MR2-Fixing-Add-new-Player 2016-12-14 11:15:52 +01:00
Sven Van de Velde
14d592b8b9 Merge pull request #156 from FlightControl-Master/MR2-Solve-Garbage-Collection
Modified SCHEDULER, so that it gets garbage collected when the SCHEDULER is attached to an SchedulerObject that has been destroyed.

-- Modifed SCHEDULER
-- Created SCHEDULEDISPATCHER
-- New central MOOSE object _SCHEDULEDISPATCHER is created that dispatches the schedules.
-- Created the documentation.
-- Created various test mission for schedule testing and explanation.
2016-12-14 11:13:01 +01:00
FlightControl
365034ad69 Finalized the SCHEDULER and SCHEDULERDISPATCHER
- Done, time to remerge the work.
2016-12-14 11:10:00 +01:00
FlightControl
84e2361829 Progress 2016-12-14 06:59:43 +01:00
FlightControl
761053c95e Progress 2016-12-14 06:58:24 +01:00
FlightControl
02d4bbf3ff Getting somewhere, with the new schedulers, the TASK logic works now much better!
- Schedulers are stopped when the parent object is destroyed.
- Parent objects are garbage cleaned.
- Destructors are called.

Jippie! Results!!!
2016-12-13 13:05:21 +01:00
FlightControl
e98814e8d4 Progress
Fixed that schedulers, which are not attached to an object, after
garbage collect were removed also from the scheduler dispatcher. The
scheduler dispatcher now attaches the schedulers to 2 different tables.
- A weak table ObjectSchedulers, which contains scheduler attached to
objects. When the object is removed, the scheduler is removed also.
- A weak table with PersistentSchedulers, which contains schedulers not
attached to objects. These schedulers are persistent, even after garbage
collection.

I hope this now makes the circle round...
2016-12-13 12:29:28 +01:00
FlightControl
152c8a986d Pogress
- Still a problem, getting obscolete calls after a garbage collect where
i should not get them ...
2016-12-13 12:10:12 +01:00
FlightControl
6c6b26e33e Progress 2016-12-13 11:25:39 +01:00
FlightControl
e5b386b9e5 Progress 2016-12-13 10:24:19 +01:00
FlightControl
15134d7f4e Formidastic, now when nillifying the Test1 and Test 3, the destructor of the SCHEDULER is called
The references of nillified and garbage collected SCHEDULERS are removed
from the _TIMERDISPATCHER. This results now in schedules that are still
pending to be executed, but are nillified, that these schedules will
never be executed!!!

Sven
2016-12-12 17:41:58 +01:00
FlightControl
b81b483f0b First prototype of the scheduler dispatcher is ready... It works, but the code was very difficult...
So, when the Scheduler that is passed to the AddScheduler is nillified,
the internal arrays that keep the Scheduler reference are also
nillified. And it does what i need for further utilization in MOOSE
classes. When the Scheduler is nillified, but, a schedule was planned
for that Scheduler, once the scheduler fires off, it will ignore that
call... cool.

Sven
2016-12-12 16:44:56 +01:00
Sven Van de Velde
24a6d37500 Progress 2016-12-11 11:01:06 +01:00
Sven Van de Velde
46aa9ddf65 Progress 2016-12-10 09:38:35 +01:00
Sven Van de Velde
038c10c4d4 Progress 2016-12-10 08:40:49 +01:00
FlightControl
2582e7a90a Work in progress
- problem with UNIT tables... Unit not alive... Need to fix CLIENTs...
CLIENTs need to be copied into UNITs...
2016-12-09 14:48:49 +01:00
FlightControl
8cda04be45 Updates
- When joining a slot, you get a mission briefing.
- When task is successful, a message is displayed, and the task is
Success.
- HeadQuarters clears all menus of the involved groups back to Planned.
2016-12-09 13:35:36 +01:00
FlightControl
7c73b232ae Undone the Templating... 2016-12-09 12:34:43 +01:00
FlightControl
50e69e07fb Undone the Templating crap. It is much better now. Users will understand ... 2016-12-09 12:34:28 +01:00
Sven Van de Velde
618fdb8405 Further updating of Demonstration Missions 2016-12-08 14:19:29 +01:00
Sven Van de Velde
3b31fca7c0 Rename Missions, first batch. 2016-12-08 09:07:58 +01:00
FlightControl
d17a637515 Test missions updated with new MOOSE static loader... pre release... 2016-12-07 19:18:11 +01:00
FlightControl
a610b8b425 Patrol demo is done. It works perfectly and provides a fantastic system now! 2016-12-07 17:15:21 +01:00
FlightControl
f840b6f836 Demo missions update. 2016-12-07 17:01:37 +01:00
FlightControl
0d8936bcb0 Test Case documentation 2016-12-07 14:55:35 +01:00
FlightControl
6d640c8416 Fixes FSM parameter mixup... 2016-12-07 14:33:19 +01:00
FlightControl
2dc231eb9e AIBalancer, identified the problem now ...
- still need to fix it :-)
2016-12-07 10:56:36 +01:00
FlightControl
22f6cb8ecb Worked on Task Presentation ... 2016-12-06 21:03:30 +01:00
FlightControl
c8e8aecf34 Got PATROLZONE working with new FSM mechanism 2016-12-06 13:04:06 +01:00
FlightControl
b45f20579e Updates 2016-12-06 12:52:02 +01:00
FlightControl
3496550cb3 Got CARGO working now with new FSM mechanism 2016-12-06 12:05:02 +01:00
Sven Van de Velde
b72a1c5c6b Merge pull request #154 from FlightControl-Master/Template-the-Statemachines
Template the statemachines
- Lots of changes.
- Preparing MOOSE Release 2
- New Tasking System
- New Fsm System
- ...
2016-12-06 10:53:54 +01:00
FlightControl
4c8f920c61 Updates 2016-12-06 10:49:28 +01:00
FlightControl
5486a12c77 Restructuring 2016-12-06 10:41:41 +01:00
FlightControl
e46d7be91b FSM restructuring 2016-12-06 10:30:05 +01:00
FlightControl
0a4630bde6 Fsm restructuring 2016-12-06 10:24:24 +01:00
FlightControl
dd162831fa New File Structure Updates 2016-12-06 10:17:21 +01:00
FlightControl
931464dfec Merge remote-tracking branch 'refs/remotes/origin/master' into Template-the-Statemachines
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-12-06 08:37:32 +01:00
FlightControl
3319843888 Merge remote-tracking branch 'refs/remotes/origin/master' into Template-the-Statemachines 2016-12-06 08:31:12 +01:00
Sven Van de Velde
8c85f9319d Fixed a bug in TaskFollow and TaskEscort
- In TaskFollow method, controllerId was renamed back to groupId. Did
this in all required functions in the Controllable.lua where this
mistake was made during renaming.
- In TaskFollow method, fixed the lastWptIndexFlag bug, which needs to
be set to false if lastWptIndex is not given. Did this fix also in
TaskEscort method.
- Made an additional test mission to demonstrate the TaskFollow API.
2016-12-05 12:54:57 +01:00
FlightControl
4034461488 Templates progress, not perfect yet...
issues with smoke
issues with accounting
issues with scoring
minor things, should be solvable.
2016-12-02 14:47:58 +01:00
FlightControl
62b476144a Removed the Init function 2016-11-30 15:22:24 +01:00
FlightControl
9c4b147b6b First incomplete version 2016-11-30 12:00:32 +01:00
FlightControl
9ab3a2f74d STATEMACHINE_TEMPLATE is added to template statemachines...
It is working now, and NOW SWITCHING SLOTS of PLAYERS ALSO WORKS IN
TASKING!!!
Jippie!!!
The next thing is to debug the DETECTION_DISPATCHER...
And make STATEMACHINE_TEMPLATE now as a parameter to create new
STATEMACHINEs, instead of that ugly table construction.
The, I need to modify the New: Methods of each STATEMACHINE_PROCESS to
be initialized with a TEMPLATE... Maybe I can commit already and just
implement this later ...
2016-11-30 10:40:31 +01:00
FlightControl
54a861cc58 Further optimizatons 2016-11-29 10:48:38 +01:00
FlightControl
f9eb19e0f5 Failed is now working. Scoring working on Task level now ... 2016-11-29 10:40:01 +01:00
FlightControl
354a9333c6 GROUP menus are now working
- Caching the menus on the GROUP object.
- When a new menu is created, it will chech the cache
- When the menu is already in the cache, nothing will be done and the
self is returned.
- When the menu is not in the cache, the menu is created and the cache
is updated.
- The removal of menus now work flawlessly, because the cache is now
used to traverse the path of submenus during removal.
2016-11-29 08:38:19 +01:00
FlightControl
a5e3deb272 Menu 2016-11-28 15:45:27 +01:00
FlightControl
522ba96ca1 Menus optimized in function of Group menus 2016-11-28 15:44:50 +01:00
FlightControl
c86b9d1822 Sync 2016-11-28 15:03:47 +01:00
FlightControl
2d3ee93d9e Sync 2016-11-28 15:03:31 +01:00
FlightControl
68e3472c49 Updates 2016-11-27 20:06:49 +01:00
FlightControl
28802ba276 COMMANDCENTER class added, Event handlers added, HQs working with missions
- Handling menus
- Reporting missions
- ...
2016-11-25 14:08:06 +01:00
FlightControl
c27b6efe12 Got mission dispatching working again with SEAD_Task and A2G_Task ...
Next is debugging all, and ensuring the scoring and Failed / Abort is
working.
2016-11-24 14:55:07 +01:00
FlightControl
35ac87109b Starting to harmonize the new TASK logic with the old DETECTION_DISPATCHER 2016-11-23 18:37:12 +01:00
Sven Van de Velde
20dca5088a Merge pull request #152 from FlightControl-Master/Process-Templates
Process templates
2016-11-22 12:47:33 +01:00
FlightControl
4816cd2c57 Got tasking working again now, with the NEW API set!!!
This is really, really great!
Now document all, and optimize the code.
And start video making.
And re-test the test mission, all...

And PUBLISH!!!
2016-11-22 12:46:28 +01:00
FlightControl
2f4eb39156 Jippie! Finally got the Sub Statemachine declaration understandable for end-users.
Reworked the hierarchical state machine processing in terms of sub
processing.
Now, the declaration and usage of subs is completely understandable and
easy to implement.
I am excited to see how end-users will see the possibilities.
2016-11-22 08:45:38 +01:00
FlightControl
07f6760039 Got the process cleanup working now, when a task has finished.
ProcessStop is called for each process that is destructed... Actually, I
need to implement destructors upon a garbage collection event. Found the
method to do that, but need to implement it ... Next time ...
2016-11-11 15:42:08 +01:00
FlightControl
1bd61837f2 Updated Task Processing logic. 2016-11-08 18:38:30 +01:00
FlightControl
764266d552 Got SEAD tasking working now with new Process Templates... 2016-11-06 11:34:32 +01:00
FlightControl
6239b6263c Progress on tasking, processes to use templates ... 2016-11-02 10:00:21 +01:00
FlightControl
cd4d4af559 Last Updates 2016-09-12 12:29:20 +02:00
Sven Van de Velde
9126c8c0b2 GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
2016-09-04 10:52:44 +02:00
FlightControl
dac29f6356 Cargo Group is working... 2016-09-01 12:52:02 +02:00
Sven Van de Velde
0edb083d5d Progress on the new AISET_BALANCER class 2016-08-24 14:34:04 +02:00
Sven Van de Velde
167b0dd598 Branch release for first test with community members
Gents, please have a look at this development:
2016-08-21

- Made a new STATEMACHINE_CONTROLLABLE object, which models a base state
machine class to be inherited by AI controllable classes.
-- Created the class as such that intherited AI classes become "finite
state machines".
-- Each STATEMACHINE_CONTROLLABLE class contains a Controllable object,
which is one Unit, Client or Group object.
-- Added state transition functions that are called before and after the
state transition.
-- Event functions are automatically added to the class, based on the
FSMT.
-- Added immediate and delayed event processing as part of the
STATEMACHINE_CONTROLLABLE class.
--- Events that start with __Event are processed with a delay. The delay
is given in seconds as a parameter.

- Created a new AI_PATROLZONE class, which inherites
STATEMACHINE_CONTROLLABLE.
-- This class implements a complete new revamped patrol zone AI pattern.
-- Created a new test directory: Moose_Test_AI_PATROLZONE with test
missions.

2016-08-15

- Removed the old classes and moved into an "Old" folder in the
Moose/Development folder.
-- Cleaned Moose.lua + Documented class types
-- Cleaned Create_Moose.bat + Documented class types

- Extend the ZONE_BASE class with a probability randomization factor,
that can be used for zone randomization purposes.

- Documented the Zone module classes.

- Changed and removed the POINT_VEC3 SmokeColor and FlareColor
structure. Replaced with SMOKECOLOR and FLARECOLOR types.
-- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR
references.

- Added change logs of API changes in MOOSE documentation.

- Added ZONE_BASE:GetName() method.

- Added ZONE_BASE:GetZoneProbability() method.

- Added ZONE_BASE:SetZoneProbability() method.

- Added ZONE_BASE:GetZoneMaybe() method.

- Added SPAWN:InitRandomizeZones() method.

- Renamed SPAWN:CleanUp() method to SPAWN:InitCleanUp() method.

- Reviewed documentation of the PatrolZone module and PATROLZONE class.

2016-08-14

- Changed Spawn APIs to express Group position and Unit position
randomization.

- Changed the API protocol of SpawnInZone() method.
-- Removed OuterRadius and InnerRadius parameters !!!

- Changed the API protocol of SpawnFromUnit() method.
-- Removed OuterRadius and InnerRadius parameters !!!

- Added InitRandomizeUnits() method, taking 3 parameters:
-- RandomizeUnits given the value true, will randomize the units upon
spawning, false (default) will not randomize the untis.
-- OuterRadius is the outer radius of the band where the units will be
spawned, if RandomizeUnits is true.
-- InnerRadius is the inner radius of the band where the units will not
be spawned, if RandomizeUnits is true.

- Removed SpawnFunction() method.

- Added OnSpawnGroup() method as the new official CallBack function
method to catch when a new function will be called.
-- Documented OnSpawnGroup() method.

- Renamed Limit() method to InitLimit() method.

- Renamed Array() method to InitArray() method.

- Renamed RandomizeRoute() method to InitRandomizeRoute() method.

- Renamed RandomizeTemplate() method to InitRandomizeTemplate() method.

- Renamed UnControlled() method to InitUnControlled method.

- Reviewed all test missions for the changes executed and made adaptions
where necessary + re-tests.

2016-08-12

- Temporary release of the new cargo handling.
-- Released available functionality to handle one CARGO_UNIT loading,
boarding, unloading.
-- Created CARGO_UNIT test missions.

- Added Translate() method in POINT_VEC3, translating a 3D point over
the horizontal plane with a Distance and Angle coordinate.
2016-08-23 07:12:31 +02:00
Sven Van de Velde
91d0507b4d Progress AI_PATROLZONE 2016-08-21 14:22:05 +02:00
Sven Van de Velde
a800531ea0 Progress on the AI_PATROLZONE!!! Working test mission!!! 2016-08-21 10:56:56 +02:00
Sven Van de Velde
3861362ed9 Progress
- Added SPAWN:InitRandomizeZones() method.

- Renamed SPAWN:CleanUp() method to SPAWN:InitCleanUp() method.

- Reviewed documentation of the PatrolZone module and PATROLZONE class.

- Reviewed all test missions
2016-08-16 10:17:35 +02:00
Sven Van de Velde
0c15f92210 Progress
- Added change logs of API changes in MOOSE documentation.

- Added ZONE_BASE:GetName() method.

- Added ZONE_BASE:GetZoneProbability() method.

- Added ZONE_BASE:SetZoneProbability() method.

- Added ZONE_BASE:GetZoneMaybe() method.

- Added SPAWN:InitRandomizeZones() method.
2016-08-15 18:44:04 +02:00
Sven Van de Velde
0bfac2d2ed Test missions + documentation 2016-08-15 12:57:25 +02:00
Sven Van de Velde
7cda194f45 Progress
- Removed the old classes and moved into an "Old" folder in the
Moose/Development folder.
-- Cleaned Moose.lua + Documented class types
-- Cleaned Create_Moose.bat + Documented class types

- Extend the ZONE_BASE class with a probability randomization factor,
that can be used for zone randomization purposes.

- Documented the Zone module classes.

- Changed and removed the POINT_VEC3 SmokeColor and FlareColor
structure. Replaced with SMOKECOLOR and FLARECOLOR types.
-- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR
references.

- Renamed UnControlled() method to InitUnControlled method.
2016-08-15 12:30:36 +02:00
Sven Van de Velde
c000675471 Progress, changed and reworked protocols
2016-08-14

- Changed Spawn APIs to express Group position and Unit position
randomization.

- Changed the API protocol of SpawnInZone() method.
-- Removed OuterRadius and InnerRadius parameters !!!

- Changed the API protocol of SpawnFromUnit() method.
-- Removed OuterRadius and InnerRadius parameters !!!

- Added InitRandomizeUnits() method, taking 3 parameters:
-- RandomizeUnits given the value true, will randomize the units upon
spawning, false (default) will not randomize the untis.
-- OuterRadius is the outer radius of the band where the units will be
spawned, if RandomizeUnits is true.
-- InnerRadius is the inner radius of the band where the units will not
be spawned, if RandomizeUnits is true.

- Removed SpawnFunction() method.

- Added OnSpawnGroup() method as the new official CallBack function
method to catch when a new function will be called.
-- Documented OnSpawnGroup() method.

- Renamed Limit() method to InitLimit() method.

- Renamed Array() method to InitArray() method.

- Renamed RandomizeRoute() method to InitRandomizeRoute() method.

- Renamed RandomizeTemplate() method to InitRandomizeTemplate() method.

- Reviewed all test missions for the changes executed and made adaptions
where necessary + re-tests.
2016-08-14 21:37:11 +02:00
Sven Van de Velde
58124c0709 Progress 2016-08-13 07:01:28 +02:00
Sven Van de Velde
be55fdde9a Progress 2016-08-13 07:01:13 +02:00
Sven Van de Velde
e59caac2c7 Progress 2016-08-12 09:06:50 +02:00
Sven Van de Velde
d47e3183e3 Merge remote-tracking branch 'refs/remotes/origin/master' into Spawn-Randomization 2016-08-12 08:41:01 +02:00
Sven Van de Velde
aa4a487256 Merge pull request #143 from FlightControl-Master/PICKUP
Release Notes
2016-08-12 08:34:42 +02:00
Sven Van de Velde
5c8a99a412 Release Notes 2016-08-12 08:34:11 +02:00
Sven Van de Velde
fec2b39469 Merge pull request #142 from FlightControl-Master/PICKUP
2016-08-12
- Temporary release of the new cargo handling.
-- Released available functionality to handle one CARGO_UNIT loading, boarding, unloading.
-- Created CARGO_UNIT test missions.
- Removed PointVec3 field from POINT_VEC3 class and added x, y, z coordinates.
- Removed PointVec2 field from POINT_VEC2 class and added x, y, alt coordinates.
- Added Translate method in POINT_VEC2.

2016-08-06
- Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.
-- Replaced method PointVec3() to Vec3() where the code manages a Vec3. Replaced all references to the method.
-- Replaced method PointVec2() to Vec2() where the code manages a Vec2. Replaced all references to the method.
-- Replaced method RandomPointVec3() to RandomVec3() where the code manages a Vec3. Replaced all references to the method.
2016-08-12 08:20:55 +02:00
Sven Van de Velde
52e473204d Static moose.lua 2016-08-12 08:01:00 +02:00
Sven Van de Velde
619efb5c08 Merge remote-tracking branch 'refs/remotes/origin/master' into New-Cargo-Handling
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-08-12 08:00:28 +02:00
Sven Van de Velde
6741d978dd Progress 2016-08-12 07:56:20 +02:00
Sven Van de Velde
6c9842c691 Documentation 2016-08-12 07:16:36 +02:00
Sven Van de Velde
cf9bbc9ba7 Progress 2016-08-11 10:08:22 +02:00
Sven Van de Velde
bdbb1ea018 Progress 2016-08-11 09:01:47 +02:00
Sven Van de Velde
851ccf0a45 Publish changes done for Escort showing Briefing 2016-08-10 08:21:01 +02:00
Sven Van de Velde
9f37dde093 Progress 2016-08-10 08:15:37 +02:00
Sven Van de Velde
df90955347 Progress 2016-08-08 11:16:50 +02:00
Sven Van de Velde
152accb93d Merge remote-tracking branch 'refs/remotes/origin/master' into New-Cargo-Handling
# Conflicts:
#	Moose Development/Release Notes/2016-07 - ReleaseNotes.txt
2016-08-08 06:12:47 +02:00
Sven Van de Velde
66e1b02898 Added briefing to method ESCORT:New()
-- If no EscortBriefing is given, the New() method will show the default
briefing.
2016-08-08 06:00:55 +02:00
Sven Van de Velde
7ec2d3425c Progress 2016-08-06 21:22:19 +02:00
Sven Van de Velde
d2efc61ddc Progress 2016-08-06 19:27:17 +02:00
Sven Van de Velde
bd62df4d28 Progress 2016-08-06 12:44:23 +02:00
Sven Van de Velde
b9a94271b2 Progress 2016-08-06 11:33:50 +02:00
Sven Van de Velde
92f1f08d5f Progress 2016-08-05 09:26:34 +02:00
Sven Van de Velde
e1610330f4 Progress 2016-08-05 06:50:30 +02:00
Sven Van de Velde
75ea07fea0 Progress 2016-08-04 08:17:15 +02:00
Sven Van de Velde
a95d4b6caf Progress 2016-08-04 08:05:30 +02:00
Sven Van de Velde
8ca74ee7db Progress 2016-08-04 07:47:36 +02:00
Sven Van de Velde
0c5e1db39c Merge remote-tracking branch 'refs/remotes/origin/master' into New-Cargo-Handling 2016-08-04 05:36:31 +02:00
Sven Van de Velde
c6eff8b1ce Merge pull request #136 from FlightControl-Master/Spawn-RandomizeTemplate
Spawn randomizetemplate
2016-08-03 20:55:18 +02:00
Sven Van de Velde
9c5e132fab Release Notes 2016-08-03 20:54:44 +02:00
Sven Van de Velde
88e280fee3 Fixed error in SPAWN:RandomizeTemplate()
-- Units started in wrong x, y position (at the template, instead of at
the master template of the SPAWN).
-- Adjusted x, y and alt to the start position of the first unit of the
master template.
-- Added a test mission Moose_Test_SPAWN_RandomizeTemplate.
-- Regenerated MOOSE.lua
2016-08-03 20:51:48 +02:00
Sven Van de Velde
2d17825268 Progress 2016-08-03 11:41:52 +02:00
Sven Van de Velde
0a5d2a38c5 Merge remote-tracking branch 'refs/remotes/origin/master' into PICKUP 2016-08-02 07:36:27 +02:00
Sven Van de Velde
70f8234cd7 Merge pull request #134 from FlightControl-Master/Tasking-Documentation
Tasking documentation
2016-08-02 07:32:20 +02:00
Sven Van de Velde
50355778a8 Merge remote-tracking branch 'refs/remotes/origin/master' into Tasking-Documentation 2016-08-02 07:31:14 +02:00
Sven Van de Velde
26c01cba60 Commit moose.lua 2016-08-01 18:52:27 +02:00
Sven Van de Velde
fe8418884f Merge pull request #122 from FlightControl-Master/spawn-randomizeroute
- Added a SpawnHeight parameter to the SPAWN method RandomizeRoute(), based upon a bug report of David. Air units will now also have optionally the route height randomized.
2016-07-31 13:40:28 +02:00
Sven Van de Velde
72a76ecfd6 Updated Moose.lua 2016-07-31 13:38:48 +02:00
Sven Van de Velde
6eaf03a903 New Spawn.lua 2016-07-31 09:34:27 +02:00
Sven Van de Velde
6c85ac720b Updated release notes 2016-07-31 09:08:18 +02:00
Sven Van de Velde
4abdfcafeb Created Moose.lua 2016-07-31 09:06:28 +02:00
Sven Van de Velde
77909e10d2 Ready for test 2016-07-31 09:05:54 +02:00
Sven Van de Velde
70de346513 Updated documentation 2016-07-31 08:52:55 +02:00
Sven Van de Velde
d42a06bf94 Updated presentation for SEAD Tasking 2016-07-30 09:48:44 +02:00
Sven Van de Velde
09d1acf2aa Release notes update. 2016-07-29 08:24:46 +02:00
Sven Van de Velde
daef3e415f Added documentation in SPAWN
-- Added documentation for methods GetFirstAliveGroup,
GetNextAliveGroup, GetLastAliveGroup.
-- Added code snippets to the documentation for the methods
GetFirstAliveGroup, GetNextAliveGroup, GetLastAliveGroup.
2016-07-29 08:22:57 +02:00
Sven Van de Velde
54ff64aa94 Merge pull request #121 from FlightControl-Master/Detection
Detection bug fixes
2016-07-23 20:28:03 +02:00
FlightControl
a6da2ba441 Redo commit 2016-07-23 20:27:21 +02:00
FlightControl
84ed412ed7 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-23 20:26:38 +02:00
FlightControl
c10e293ff7 Fixed bug in Scheduler (a real nasty one) and SET_UNIT 2016-07-23 20:26:08 +02:00
Sven Van de Velde
d878c46d56 Merge pull request #120 from FlightControl-Master/Detection
Fixed bug in Scheduler
2016-07-23 17:24:45 +02:00
FlightControl
906045a027 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-23 17:23:29 +02:00
FlightControl
dc486be872 Fixed error in Scheduler (due to add Scheduler function this mornin) 2016-07-23 17:22:58 +02:00
FlightControl
c7061e98d7 Removed env.info from sources 2016-07-23 16:50:45 +02:00
FlightControl
9cd45e7abe Test 2016-07-23 16:49:08 +02:00
FlightControl
d005b5a048 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-23 15:19:09 +02:00
FlightControl
509407e63c Release notes 2016-07-23 15:18:48 +02:00
FlightControl
0a8d7a3fc5 Publish release notes of july 2016-07-23 14:49:50 +02:00
FlightControl
3a872827d5 Added ReleaseNotes.txt file 2016-07-23 14:28:11 +02:00
FlightControl
49bb059ee9 Added release notes file 2016-07-23 13:48:57 +02:00
FlightControl
a466daf1aa ensuring in missiletrainer that smoke is on the ground of missile getting destructed. 2016-07-23 12:36:37 +02:00
FlightControl
a76ec08499 Bugfix Missile trainer 2016-07-23 12:32:50 +02:00
FlightControl
5f02b5f764 Added tracing in the EVENT class 2016-07-23 12:14:24 +02:00
FlightControl
ea048ade54 Static loading 2016-07-23 11:30:53 +02:00
Sven Van de Velde
195f62f518 Merge pull request #119 from FlightControl-Master/Detection
-- Revised documentation
-- Added SCHEDULER:Schedule()
-- Reworked Process to ensure that when stopping the events, all Process events are stopped! (Relates to the added SCHEDULER:Schedule() method.)
-- Added class MENU_MISSION
-- Added class MENU_MISSION_COMMAND
-- Fixed bug in SCORING class with menu creation.
2016-07-23 11:03:34 +02:00
FlightControl
e55a7716fb Added MENU_MISSION classes and fixed bug in SCORING
-- Added class MENU_MISSION
-- Added class MENU_MISSION_COMMAND
-- Revised documentation of Menu
-- Fixed bug in SCORING class to set the scoring menu
2016-07-23 10:57:10 +02:00
FlightControl
2befd34681 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-23 10:38:15 +02:00
Sven Van de Velde
a4584a9185 Merge pull request #118 from FlightControl-Master/Spawn
-- Added SPAWN:SpawnFromVec3()
-- Added SPAWN:SpawnFromVec2()
-- Revised SPAWN:SpawnFromUnit()
-- Revised SPAWN:SpawnFromZone()
-- Added POINT_VEC3:GetVec2()
-- Added POINT_VEC3:GetRandomVec2InRadius()
-- Added POINT_VEC2:NewFromVec2()
-- Revised the STATIC class working with POSITIONABLE
-- Revised ZONE_RADIUS:GetPointVec3()
-- Revised the documentation.
2016-07-23 10:36:45 +02:00
FlightControl
ede7813a94 Updated documentation 2016-07-23 10:32:41 +02:00
FlightControl
231b382df1 New SPAWN class methods
-- Added SpawnFromVec3
-- Added SpawnFromVec2
-- Revised SpawnFromUnit
-- Revised SpawnFromZone
-- Added POINT_VEC3:GetVec2()
-- Added POINT_VEC3:GetRandomVec2InRadius()
-- Added POINT_VEC2:NewFromVec2()
-- Revised the STATIC class working with POISITIONABLE
-- Revised ZONE_RADIUS:GetPointVec3
--
2016-07-23 10:31:52 +02:00
FlightControl
b283406274 Updated Scheduler and documentation.
-- Added SCHEDULER.Schedule method.
-- Reworked SCHEDULER.New method.
-- Renamed Mechanic to Mechanist.
2016-07-23 07:10:59 +02:00
FlightControl
cf8d105b33 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-23 06:33:42 +02:00
Sven Van de Velde
a634fbb33c Merge pull request #117 from FlightControl-Master/Detection
Menu Restructuring and Documentation
2016-07-22 17:22:12 +02:00
FlightControl
ebfb034170 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-22 17:21:02 +02:00
FlightControl
a4fb512ad9 Updated menu documentation and restructured some of the menu functions...
- Updated documentation.
- _COMMAND:New methods now accept variable parameters.
- Revised some code.
2016-07-22 17:20:52 +02:00
FlightControl
ce789b9703 Commit 2016-07-21 21:44:50 +02:00
Sven Van de Velde
eac2a0b798 Merge pull request #116 from FlightControl-Master/Detection
Detection updates
2016-07-21 20:17:54 +02:00
FlightControl
70651777c5 Updated some of the MOOSE functions 2016-07-21 20:14:11 +02:00
FlightControl
a90098b30b Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-21 15:36:56 +02:00
FlightControl
2b421fc1f1 Changes 2016-07-21 15:36:52 +02:00
Sven Van de Velde
2a788ddaf2 Merge pull request #115 from FlightControl-Master/Detection
JTAC added. JTAC is an additional assigned task option when you select a CAS or BAI task from the A2G menu in DETECTION_DISPATCHER.
2016-07-21 15:30:10 +02:00
FlightControl
2eeaf7b92d Added JTAC to DETECTION_DISPATCHER
Added Process_JTAC to coordinate this activity during a CAS or BAI.
Removed TASK_CAS and TASK BAI into a generic TASK_A2G task.
2016-07-21 15:28:53 +02:00
FlightControl
8e8fcef266 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-21 10:30:38 +02:00
Sven Van de Velde
89727a00fb Merge pull request #114 from FlightControl-Master/Scheduler-bugfix-and-test-mission
Scheduler test mission
2016-07-21 09:01:09 +02:00
FlightControl
ffe8ef06d0 Commit new test mission 2016-07-21 09:00:32 +02:00
FlightControl
0c9162aca0 Merge remote-tracking branch 'refs/remotes/origin/master' into Scheduler-bugfix-and-test-mission
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-21 08:58:13 +02:00
Sven Van de Velde
5919e9a3ab Merge pull request #113 from FlightControl-Master/zone-group
Fixed bug with GetPointVec2 function that was renamed ...
2016-07-21 08:54:27 +02:00
FlightControl
bee6e8d7c6 Fixed bug with GetPointVec2 function that was renamed ... 2016-07-21 08:53:56 +02:00
FlightControl
01d0cd71f1 Commit 2016-07-21 08:34:42 +02:00
FlightControl
5d88e449be Update tracing 2016-07-21 07:14:03 +02:00
FlightControl
38f18d7b28 commit 2016-07-20 18:25:50 +02:00
FlightControl
0a9eb84264 Updated presentation 2016-07-19 23:31:45 +02:00
FlightControl
6e370b6065 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-19 22:04:52 +02:00
FlightControl
ffecff739b Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-07-19 22:04:32 +02:00
Sven Van de Velde
2bb4c41f62 Merge pull request #112 from FlightControl-Master/Detection
Fixed a bug in the event handler due to a stupid added trace. removed the trace.
2016-07-19 22:04:23 +02:00
FlightControl
5e77d30caa Fixed a bug in the event handler due to a stupid added trace. removed the trace. 2016-07-19 22:03:39 +02:00
Sven Van de Velde
054da51d97 Merge pull request #111 from FlightControl-Master/Detection
I am finally releasing the first alpha release of the DETECTION_DISPATCHER and DETECTION_AREAS classes!!! If you want to try out, have a look at the DETECTION_DISPATCHER test mission.
+ A lot of changes have been done at internal code also. MENU capabilities have been added, and also added a POINT_VEC3 and a POINT_VEC2 class to manage points better. There is still rework pending on points.

It can be that due to this release, you'll get errors in your previous missions, so please re-test them!
2016-07-19 18:22:38 +02:00
FlightControl
9b15ec1988 Removed flushes 2016-07-19 18:18:49 +02:00
FlightControl
d5671a5f65 Working version of the DETECTION classes 2016-07-19 18:12:26 +02:00
FlightControl
86b283c7f0 SEAD working correctly + readjust test missions not to loose anything. 2016-07-13 09:08:08 +02:00
FlightControl
ce19e3bc03 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test
Missions/Moose_Test_SPAWN_Limit_Scheduled/MOOSE_Test_SPAWN_Limit_Scheduled.miz
2016-07-13 06:14:36 +02:00
Sven Van de Velde
ca50a0af29 Merge pull request #109 from FlightControl-Master/Bugfix
Fixed SPAWN bug, where the amount of units spawned would exceed the Limit() parameters.
2016-07-12 08:59:41 +02:00
FlightControl
2096c67330 Fixed SpawnBug, and reduced amount of tracing and adjusted tracing levels. 2016-07-12 08:58:21 +02:00
FlightControl
947474eab0 Fixed SPAWN bug, where more units were spawned beyond the Limit() parameters. 2016-07-12 08:57:42 +02:00
FlightControl
99261765c4 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-07-12 07:05:51 +02:00
FlightControl
def75889ad Correct creation and interpretation of the HasRadar function for SET_UNIT.
Fixed SEAD_Process bug. Now the SEAD targets are correctly calculated.
2016-07-10 15:03:25 +02:00
FlightControl
153ff7bd58 Inform state changes 2016-07-10 14:44:55 +02:00
FlightControl
8a4b40303a Updated the explanation. 2016-07-10 13:47:12 +02:00
FlightControl
17abcb7b7f Updated detection algorithm
Now the detected sets are kept consistent to previous sets. New
algorithm developed. This is important to keep assigned tasks consistent
with the detected sets.
2016-07-10 09:11:05 +02:00
FlightControl
40a9c1f7d1 Improved it 2016-07-08 18:02:22 +02:00
FlightControl
e8a7200de7 Added velocity fix for AIBalancer
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-08 17:22:22 +02:00
Sven Van de Velde
9a4d9d059a Merge pull request #108 from FlightControl-Master/AIRBASEPOLICE
Airbasepolice - fixed velocity
2016-07-08 17:21:36 +02:00
FlightControl
11aef957b6 Removed message 2016-07-08 17:20:57 +02:00
FlightControl
6a82b223f6 Fixed velocity. had wrong formula but is now corrected. 2016-07-08 17:20:24 +02:00
FlightControl
93d496a1b1 Merge remote-tracking branch 'refs/remotes/origin/master' into AIRBASEPOLICE 2016-07-08 16:31:09 +02:00
FlightControl
0c13744309 First prototype of task dispatching with menu 2016-07-08 16:16:48 +02:00
FlightControl
6ba6390b5d Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test
Missions/Moose_Test_AIRBASEPOLICE/Moose_Test_AIRBASEPOLICE.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test
Missions/Moose_Test_GROUP_SwitchWayPoint/MOOSE_Test_GROUP_SwitchWayPoint.miz
2016-07-08 06:24:34 +02:00
Sven Van de Velde
a4a2843f13 Merge pull request #106 from FlightControl-Master/AIRBASEPOLICE
Airbasepolice - Fixed speed error and reduced # of warnings.
2016-07-08 05:47:34 +02:00
FlightControl
6f26394bcf Fixed speed, and # of warnings 2016-07-08 05:46:47 +02:00
FlightControl
8556ee5128 Static 2016-07-08 05:26:50 +02:00
FlightControl
9493072293 Reduced to 3 speed warnings and fixed km/h calculation error. 2016-07-08 05:26:21 +02:00
FlightControl
dc35fc6653 Merge remote-tracking branch 'refs/remotes/origin/master' into AIRBASEPOLICE
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-08 05:14:44 +02:00
FlightControl
e41d45e1eb Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
2016-07-08 05:13:56 +02:00
FlightControl
348130c993 Commit 2016-07-08 05:11:30 +02:00
HellRayzr
2faef0e85b Added ANAPA and 2nd runway at TBLISI-LOCHINI 2016-07-08 01:08:02 +02:00
HellRayzr
85f07c0807 Merge pull request #105 from FlightControl-Master/AIRBASEPOLICE
Airbasepolice
2016-07-07 21:47:49 +02:00
HellRayzr
59446a012d Merge remote-tracking branch 'refs/remotes/origin/master' into AIRBASEPOLICE 2016-07-07 21:45:32 +02:00
HellRayzr
ce553183c9 Static 2016-07-07 21:44:09 +02:00
Sven Van de Velde
ab8c8dee4d Merge pull request #104 from FlightControl-Master/AIRBASEPOLICE
Airbasepolice - Added the AIRBASEPOLICE_NEVADA class
2016-07-07 21:43:20 +02:00
HellRayzr
b1f7d02f25 Merge remote-tracking branch 'refs/remotes/origin/master' into AIRBASEPOLICE 2016-07-07 21:40:38 +02:00
HellRayzr
6a39f6f1e3 Added AirbasePolice for Nevada 2016-07-07 21:40:06 +02:00
FlightControl
c5cc069e46 Progress, got now task acceptance working 2016-07-07 13:11:31 +02:00
FlightControl
bba6aa8fb6 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Test
Missions/Moose_Test_DETECTION/Moose_Test_DETECTION_Laser.miz
2016-07-06 22:26:23 +02:00
FlightControl
c26f5e2dbc Deleted Moose_Test_DETECTION_Laser files 2016-07-06 15:39:07 +02:00
FlightControl
e0314a4598 Updated test missions 2016-07-06 10:41:46 +02:00
FlightControl
6f14927544 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz
#	Moose Test
Missions/Moose_Test_AIRBASEPOLICE/Moose_Test_AIRBASEPOLICE.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_with_Moose.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_without_Moose.miz
#	Moose Test Missions/Moose_Test_BASE/Moose_Test_BASE.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_DETECTION/Moose_Test_DETECTION.miz
#	Moose Test
Missions/Moose_Test_DETECTION/Moose_Test_DETECTION_Laser.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test Missions/Moose_Test_FAC/Moose_Test_FAC.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_PATROLZONE/MOOSE_Test_PATROLZONE.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SET_AIRBASE/Moose_Test_SET_AIRBASE.miz
#	Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz
#	Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-07-06 08:31:28 +02:00
Sven Van de Velde
b12372c758 Merge pull request #100 from FlightControl-Master/Bugfix
Added 3 new test missions and updated and fixed some documentation issues.
2016-07-06 08:18:55 +02:00
FlightControl
61d539b2d5 Regenerate Moose.lua 2016-07-06 08:18:18 +02:00
FlightControl
0938fc6d80 Added 3 new test missions and updated and fixed some documentation issues. 2016-07-06 08:17:36 +02:00
FlightControl
fd548484c9 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-07-06 06:20:10 +02:00
FlightControl
6acc1cfcb6 Updated MOOSE as static 2016-07-05 09:16:28 +02:00
Sven Van de Velde
5318597907 Merge pull request #99 from FlightControl-Master/Bugfix
Added a couple of functions to allow Respawning of a group morre efficiently.
2016-07-05 08:30:21 +02:00
FlightControl
49dd2b6f2a Added a couple of function to allow Respawning of GROUPS more efficiently. 2016-07-05 08:29:16 +02:00
FlightControl
50a770d755 Bugfixing 2016-07-05 06:25:36 +02:00
FlightControl
d39f38b524 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-07-05 06:25:19 +02:00
FlightControl
2218fdd0b2 Updates 2016-07-05 06:24:57 +02:00
FlightControl
06b2ba007e Updates 2016-07-05 06:24:35 +02:00
FlightControl
376b0d08a5 Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz
#	Moose Test
Missions/Moose_Test_AIRBASEPOLICE/Moose_Test_AIRBASEPOLICE.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_with_Moose.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_without_Moose.miz
#	Moose Test Missions/Moose_Test_BASE/Moose_Test_BASE.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_DETECTION/Moose_Test_DETECTION.miz
#	Moose Test
Missions/Moose_Test_DETECTION/Moose_Test_DETECTION_Laser.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test Missions/Moose_Test_FAC/Moose_Test_FAC.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_PATROLZONE/MOOSE_Test_PATROLZONE.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SET_AIRBASE/Moose_Test_SET_AIRBASE.miz
#	Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz
#	Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-07-04 19:43:53 +02:00
FlightControl
a9d54b7d02 Fixed bug with Restart Group after landing and engine shutdown...
- Due to rename GetDCSGroup to GetDCSObject.
2016-07-04 16:49:17 +02:00
FlightControl
093f12b57a Updated 2016-07-03 09:41:25 +02:00
FlightControl
d91ba031aa OK, SEADING is now working completely
with a target zone, and with routing and seading task active in
parallel.
2016-07-03 09:31:02 +02:00
Sven Van de Velde
eda2794373 Merge pull request #98 from FlightControl-Master/Bugfix
Bugfix for ZONE_UNIT
2016-07-03 07:55:17 +02:00
FlightControl
123dc13532 Fixed a bug in ZONE_UNIT
GetRandomVec2() did not work for ZONE_UNIT
2016-07-03 07:54:37 +02:00
FlightControl
23ea389b8f Progress on Route 2016-07-03 07:49:26 +02:00
FlightControl
4ac962a87a OK. got workiing prototype now, works! 2016-07-02 09:26:00 +02:00
FlightControl
ae1aeac6ce DONE! Prototype of hierarchical state machine is works!!! 2016-07-02 09:06:29 +02:00
FlightControl
d668b0a0f7 Progress hierarchical state machine
- sub fsm call is working
- return from fsm to parent fsm is in progress
2016-07-02 08:17:33 +02:00
FlightControl
7b66589cca Got a first test mission working 2016-07-01 09:16:16 +02:00
FlightControl
6b942590bd Cleaned 2016-07-01 06:15:43 +02:00
FlightControl
65391223d5 SEAD task is working! 2016-07-01 06:13:26 +02:00
FlightControl
e2250dc92f Statemachine 2016-06-30 10:52:37 +02:00
FlightControl
7ab52025fd Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-06-28 12:35:41 +02:00
FlightControl
626b95fb46 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-28 12:17:27 +02:00
Sven Van de Velde
eb863416ee Merge pull request #96 from FlightControl-Master/Bugfix
Fixed GetID bug
- Due to rework, the function GetID got "lost". Added it back.
- Also fixed the OBJECT class now owning the GetID() method.
- Derived methods IDENTIFIABLE and POSITIONABLE fixed.
- Fixed AIRBASE class
2016-06-28 12:02:13 +02:00
FlightControl
27bb51e69c Fixed GetID bug detected in missiletrainer class.
- Was part of a larger issue related to the class hierarchy between
Object -> Identifiable -> Positionable ...
- Also fixed AIRBASE class fitting now the class hierarchy.
2016-06-28 11:59:30 +02:00
FlightControl
dc644df47e Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-28 11:19:11 +02:00
FlightControl
3a01fb76bf progress 2016-06-28 11:19:01 +02:00
FlightControl
4056e5d66d Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-06-26 07:45:34 +02:00
Sven Van de Velde
1187e46e89 Merge pull request #95 from FlightControl-Master/Remove-routines.scheduleFunction
Removed completely routines.scheduleFunction
2016-06-26 07:41:37 +02:00
FlightControl
fefe5382af Removed completely routines.scheduleFunction 2016-06-26 07:41:01 +02:00
Sven Van de Velde
e842c7a042 Merge pull request #94 from FlightControl-Master/Bugfix-Polygon-zone-test
Fixed the raycasting of ZONE_POLYGON_BASE
2016-06-26 07:22:25 +02:00
FlightControl
9d7f196075 Fixed the raycasting of ZONE_POLYGON_BASE
- The raycasting was wrong when the vertices of the polygon were not
closed.
Now after this fix, the raycasting of the polygon is correctly
performed. The begin and end vertices of the polygon don't need to be
closed anymore within the mission editor. Check the test mission
Moose_Test_ZONE_POLYGON.miz
2016-06-26 07:21:56 +02:00
FlightControl
4a378129f1 Started with DETECTION and FAC presentation 2016-06-25 13:48:36 +02:00
Sven Van de Velde
d211bc084b Merge pull request #93 from FlightControl-Master/SLMOD-fix
Done fixed for SLMOD. Need to retest.
2016-06-25 13:30:32 +02:00
FlightControl
c3da8ac008 Done fixed for SLMOD. Need to retest. 2016-06-25 13:29:58 +02:00
FlightControl
8b57ab494b Documentation 2016-06-25 12:54:09 +02:00
Sven Van de Velde
7985cafdc0 Merge pull request #92 from FlightControl-Master/Detection
Large rework publish



    reworked the core moose class hierarchy
    DETECTION_UNITGROUPS
    FAC_REPORT
    fixes
2016-06-25 08:54:57 +02:00
FlightControl
c581fe1551 Implemented DETECTION and FAC first classes 2016-06-25 08:53:19 +02:00
FlightControl
a34c04e0f2 Updates in test 2016-06-24 21:22:18 +02:00
FlightControl
5e6043aeb3 Progress reworking object model. 2016-06-24 12:52:52 +02:00
FlightControl
b56210a03a Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-24 05:48:58 +02:00
FlightControl
e99458520a Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-06-24 05:48:30 +02:00
Sven Van de Velde
2b5140cec1 Merge pull request #87 from FlightControl-Master/Bugfix
Bugfix
2016-06-24 05:47:44 +02:00
FlightControl
e014cfce51 Bugfix
Fixed
2016-06-24 05:46:21 +02:00
FlightControl
7b8ef52ae0 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-24 05:44:15 +02:00
FlightControl
9dcfe83ed8 Updates 2016-06-23 14:46:51 +02:00
FlightControl
8d12cc2a4d Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-06-22 15:13:59 +02:00
FlightControl
12186bf2b0 Fixed AIBALANCER issue #86 2016-06-22 10:21:02 +02:00
Sven Van de Velde
d43a15a977 Merge pull request #85 from FlightControl-Master/Detection
Detection
2016-06-22 09:32:25 +02:00
FlightControl
062f34bd26 Fixed bug during detection, when i unit got destroyed, the detection stopped. Fixed now
Added a test :IsAlive
2016-06-22 09:31:44 +02:00
FlightControl
08116dab2c Merge remote-tracking branch 'refs/remotes/origin/master' into Detection
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Mission Setup/Moose_Create.bat
#	Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz
#	Moose Test
Missions/Moose_Test_AIRBASEPOLICE/Moose_Test_AIRBASEPOLICE.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_with_Moose.miz
#	Moose Test
Missions/Moose_Test_BASE/Moose_Test_AIRBLANCER_without_Moose.miz
#	Moose Test Missions/Moose_Test_BASE/Moose_Test_BASE.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz
#	Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-06-22 08:54:40 +02:00
HellRayzr
4bd4c6aa79 test 2016-06-20 21:49:24 +02:00
HellRayzr
fdefd87e88 AI BALANCE CHANGE DB 2016-06-20 21:44:01 +02:00
Sven Van de Velde
ca950e1599 Merge pull request #81 from FlightControl-Master/AI-Balancer
- Replaced range test for unit to range test for players.
- Ensure that players database is properly populated.
- Fixed some documentation.
- Removed smoke from trigger.
- Fixed name of RandomPointVec2 to RandomVec2 and fixed in all usages.
2016-06-20 13:14:00 +02:00
FlightControl
c8443f8798 Updates and fixes
- Replaced range test for unit to range test for players.
- Ensure that players database is properly populated.
- Fixed some documentation.
- Removed smoke from trigger.
- Fixed name of RandomPointVec2 to RandomVec2 and fixed in all usages.
2016-06-20 13:12:51 +02:00
FlightControl
8a3cdc6b85 Merge remote-tracking branch 'refs/remotes/origin/master' into AI-Balancer 2016-06-20 12:33:28 +02:00
FlightControl
ad56973b01 Presentation update 2016-06-20 12:29:11 +02:00
Sven Van de Velde
64f964bf70 Merge pull request #80 from FlightControl-Master/AI-Balancer
- Note that the SET_BASE and DATABASE ForEach implementation using multiple threads has been REMOVED! DCS seems not be able to handle multiple threads in a decent way. A scheduled function in a thread will make DCS crash once the coroutine is garbage cleaned...
The consequence of this change is only that the loops will not execute completely, and will not be broken into pieces.
- PATROLZONE added
- AIBALANCER is now using PATROLZONE
- Documentation added
- Presentation made of AIBALANCER and PATROLZONE
2016-06-19 15:08:37 +02:00
FlightControl
e0b32fe5d5 Finalized the AIBALANCER class + PATROLZONE class 2016-06-19 15:03:50 +02:00
FlightControl
ffbc4a838e PATROLZONE class + integration of PATROLZONE class in AIBALANCER class + documentation. 2016-06-18 23:13:33 +02:00
FlightControl
b2bd37edbc Create the PATROLZONE class 2016-06-18 12:24:05 +02:00
FlightControl
36b101fa6d Updated the SPAWN test mission, to ensure that ALL tests are working correctly.
- Fixed code in the mission to spawn vehicles from the Helicopters
(Chinooks), using the new APIs.
- Fixed code in the mission to spawn infantry from the army transport
vehicles using the new APIs.
2016-06-18 10:21:29 +02:00
FlightControl
325c20cb46 Small bugfix 2016-06-18 00:01:02 +02:00
FlightControl
87313a9204 Finetuned AIBALANCER documentation 2016-06-18 00:00:27 +02:00
FlightControl
c211f4f603 Documentation 2016-06-17 23:53:08 +02:00
Sven Van de Velde
396662657f Merge pull request #79 from FlightControl-Master/database-airbases
Database airbases
2016-06-17 23:31:55 +02:00
FlightControl
8edfb49358 Finalization for publishing 2016-06-17 23:27:27 +02:00
FlightControl
34e7015244 Updates 2016-06-17 23:18:02 +02:00
FlightControl
9ce7012c11 Presentations 2016-06-17 14:42:21 +02:00
FlightControl
9b4bc1195c Progress 2016-06-17 13:39:02 +02:00
FlightControl
e5f17213e1 Detection class, first teaser version ... 2016-06-15 22:50:08 +02:00
FlightControl
0ad7cbe2ea Merge remote-tracking branch 'refs/remotes/origin/master' into Detection 2016-06-15 20:28:40 +02:00
Sven Van de Velde
fe62197ba0 Merge pull request #75 from FlightControl-Master/Bugfix
Modified Moose_Test_SPAWN missions
2016-06-15 20:10:44 +02:00
FlightControl
ddab549fe0 Updated the Moose_Test_SPAWN test mission
In the south of Kobuleti, the tanks are driving to different routes when
spawned...
2016-06-15 20:09:40 +02:00
FlightControl
2a619c33ec Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-15 18:57:36 +02:00
FlightControl
cbbc4144e6 First version 2016-06-15 18:57:02 +02:00
FlightControl
0500915d11 Documentation update on SCHEDULER 2016-06-15 06:50:08 +02:00
Sven Van de Velde
75277bd249 Merge pull request #74 from FlightControl-Master/Airbase-Guard
First release of Alpha version of Airbase Polic class
2016-06-15 06:45:17 +02:00
FlightControl
f2407e357a Updated documentation + small bugfix SCHEDULER. 2016-06-15 06:42:22 +02:00
FlightControl
45140d6563 Merge remote-tracking branch 'refs/remotes/origin/master' into Airbase-Guard
# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Mission Setup/Moose_Create.bat
#	Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz
#	Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-06-15 06:00:06 +02:00
Sven Van de Velde
3253f31ed6 Merge pull request #73 from FlightControl-Master/Optimize-Tracing
Optimize tracing
2016-06-15 05:56:16 +02:00
FlightControl
b376091347 Updated Base 2016-06-15 05:55:19 +02:00
FlightControl
5bd0595b35 Updated tracing with loading static and improved SCHEDULER
- Tracing is by default switched off when using Moose in static mode.
- SCHEDULER is now correctly rescheduling when repeating the loop.
- Modified the loaders, adding the default trace on in case of dynamic
and off in case of static loading.
2016-06-15 05:54:21 +02:00
FlightControl
37510ab647 Made empty mission to benchmark frames per seconds to compare with logic containing moose 2016-06-15 04:10:24 +02:00
HellRayzr
91c5f467aa Revert "JAMES TEST"
This reverts commit a57f28a248.
2016-06-14 18:58:17 +02:00
HellRayzr
a57f28a248 JAMES TEST 2016-06-14 18:54:00 +02:00
FlightControl
d66a2ea429 First version of the airbase police 2016-06-14 18:36:29 +02:00
FlightControl
af020b4b6e Updates 2016-06-14 17:33:33 +02:00
FlightControl
ff44c70ea4 Merge remote-tracking branch 'refs/remotes/origin/master' into Airbase-Guard
# Conflicts:
#	Moose Development/Moose/Base.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/Moose_Test_AIBALANCER/Moose_Test_AIBALANCER.miz
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SET_CLIENT/Moose_Test_SET_CLIENT.miz
#	Moose Test Missions/Moose_Test_SET_GROUP/Moose_Test_SET_GROUP.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-06-14 17:00:02 +02:00
FlightControl
998a325554 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-14 16:56:01 +02:00
Sven Van de Velde
2657cc681f Merge pull request #69 from FlightControl-Master/Bugfix
ESCORT fixed + changes and bugfixes
2016-06-14 16:23:21 +02:00
FlightControl
ef003f1423 Fixed bugs with ESCORT
- Fixed SCHEDULER bug! This was a nasty one.
- Fixed bugs in DATABASE. After a respawn i should not create a new
GROUP object. Fixed now.
- Ensure that all removeFunction calls are out of the code.
- Fixed bug in T and F tracing methods
2016-06-14 15:33:08 +02:00
FlightControl
8de64bc95a ESCORT Updated 2016-06-14 15:04:08 +02:00
FlightControl
29652a0edb Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-13 18:48:04 +02:00
FlightControl
61f55b3bd8 Progress 2016-06-13 18:47:38 +02:00
FlightControl
32a179d0b6 Airbase Police 2016-06-11 21:31:44 +02:00
FlightControl
d8adfd01d7 Airbase police 2016-06-11 21:27:37 +02:00
FlightControl
55167e99c7 Creation of the first version of the airbase police ...
Monitoring airbase traffice at airports ...
2016-06-11 21:27:20 +02:00
Sven Van de Velde
85a419face Merge pull request #67 from FlightControl-Master/Bugfix
Bugfix of MISSILETRAINER, BASE, DATABASE, SET_CLIENT, SCHEDULER
2016-06-11 10:31:40 +02:00
FlightControl
dcce65edeb Updated Moose.lua 2016-06-11 10:29:39 +02:00
FlightControl
b335e99d5b Lots of bugs fixed
- MISSILETRAINER: is working now...
SET_CLIENT. Is working much better now. Had to rework DATABASE, SPAWN to
get this straight.
BASE: Fixed a bug that has been in de system for a very long time. the
parent should have never been deepcopied when inheriting from it.
- SCHEDULER: Fixed a nasty bug with the scheduler, when the
repeatparameters was nil, i was still repeating, very wrong. fixed now.
2016-06-11 10:28:57 +02:00
FlightControl
bd81d16327 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-10 17:56:48 +02:00
Sven Van de Velde
9e00b6e84b Merge pull request #66 from FlightControl-Master/Build-Sets
New class AIBALANCER + SET_CLIENT
2016-06-10 14:33:59 +02:00
FlightControl
cb4d8bbde3 SET_CLIENT made + AIBALANCER 2016-06-10 14:33:08 +02:00
FlightControl
bff0c0bf4e Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets 2016-06-10 11:27:44 +02:00
FlightControl
a6baed5478 Build sets 2016-06-10 11:27:40 +02:00
FlightControl
9e881530d8 Documentation 2016-06-09 13:04:27 +02:00
FlightControl
a0250cfdc4 Message documentation 2016-06-09 13:01:18 +02:00
FlightControl
cf80a89af0 Style 2016-06-09 12:55:54 +02:00
FlightControl
ce321c8cfe Stylesheet for documentation made. 2016-06-09 12:51:59 +02:00
Sven Van de Velde
72baf7091b Merge pull request #65 from FlightControl-Master/Bugfix
Updated MESSAGE and Include.File lines removed.
2016-06-09 12:48:14 +02:00
FlightControl
be8e76e7f1 Updates
- MESSAGE class finished and now properly documented. Changed New()
function API.
- Reworked Include.File lines. No Include.File line anymore in the
Modules. All included in Moose.lua for dynamic loading.
2016-06-09 12:47:15 +02:00
FlightControl
5211f06cba Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-09 11:03:58 +02:00
FlightControl
ea318f3c75 Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets 2016-06-09 10:56:28 +02:00
Sven Van de Velde
e3ca5e32cb Merge pull request #64 from FlightControl-Master/Build-Sets
Build sets
2016-06-08 17:55:44 +02:00
FlightControl
f7eef96c94 Updated SET_GROUP and SET 2016-06-08 17:53:06 +02:00
FlightControl
b925339f24 Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets 2016-06-08 09:33:29 +02:00
Sven Van de Velde
0dc9b2cf31 Merge pull request #63 from FlightControl-Master/Bugfix
Bugfix
2016-06-07 13:20:51 +02:00
FlightControl
a8a87be9c4 Bugfix for SET 2016-06-07 13:20:29 +02:00
FlightControl
0573ebb919 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-07 12:56:16 +02:00
Sven Van de Velde
fb8ce07a43 Merge pull request #62 from FlightControl-Master/Build-Sets
Build sets
2016-06-07 12:25:20 +02:00
FlightControl
fcfa91f700 SET_GROUP publish preparation 2016-06-07 12:24:31 +02:00
FlightControl
92e9f57b66 SET_GROUP is working! 2016-06-07 12:23:24 +02:00
FlightControl
afb71ecd26 Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets
# Conflicts:
#	Moose Development/Moose/Spawn.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/Moose_Test_CLEANUP/Moose_Test_CLEANUP.miz
#	Moose Test Missions/Moose_Test_DATABASE/Moose_Test_DATABASE.miz
#	Moose Test Missions/Moose_Test_DESTROY/MOOSE_Test_DESTROY.miz
#	Moose Test Missions/Moose_Test_ESCORT/MOOSE_Test_ESCORT.miz
#	Moose Test
Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
#	Moose Test Missions/Moose_Test_SEAD/MOOSE_Test_SEAD.miz
#	Moose Test Missions/Moose_Test_SPAWN/MOOSE_Test_SPAWN.miz
#	Moose Test
Missions/Moose_Test_SPAWN_Repeat/MOOSE_Test_SPAWN_Repeat.miz
#	Moose Test
Missions/Moose_Test_TASK_Pickup_and_Deploy/MOOSE_Test_TASK_Pickup_and_Deploy.miz
#	Moose Test Missions/Moose_Test_WRAPPER/Moose_Test_WRAPPER.miz
#	Moose Test Missions/Moose_Test_ZONE/Moose_Test_ZONE.miz
#	Moose Test
Missions/Moose_Test_ZONE_POLYGON/Moose_Test_ZONE_POLYGON.miz
#	Moose Test Missions/Moose_Test_ZONE_RADIUS/Moose_Test_ZONE_RADIUS.miz
#	Moose Test Missions/Moose_Test_ZONE_UNIT/Moose_Test_ZONE_UNIT.miz
2016-06-07 08:54:03 +02:00
Sven Van de Velde
3975aad967 Merge pull request #61 from FlightControl-Master/Bugfix
Bugfix
2016-06-07 08:50:44 +02:00
FlightControl
444304e57e Reverted some trial and error code to solve BUG in 1.5.3.
I accidentally published this code, but shouldn't have done that. Now,
it is back removed. The DCS Bug with ground troops is still in DCS.
2016-06-07 08:50:22 +02:00
FlightControl
431ec0c236 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-07 08:45:01 +02:00
FlightControl
2565939889 Group Set progresss
need to fix some bugs still
2016-06-07 00:32:53 +02:00
FlightControl
bf7422716c Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets 2016-06-06 20:10:22 +02:00
FlightControl
4de4983878 Forgot to add in the Moose.lua the new classes
STATIC
POINT
2016-06-06 15:17:46 +02:00
Sven Van de Velde
40d4ffda64 Merge pull request #60 from FlightControl-Master/Expand-Zone
Expand zone
2016-06-06 13:44:57 +02:00
FlightControl
4fc1fee911 Finished Test Missions for ZONE 2016-06-06 13:44:27 +02:00
FlightControl
e82ba13b8b Publishing a working version :-) 2016-06-06 13:43:32 +02:00
FlightControl
8777f516af Preparing for presentation 2016-06-05 11:27:18 +02:00
FlightControl
0d42c1670e Documentation + Zone functions
Implemented zone functions for GROUP and UNIT
Documentation improvement for GROUP, UNIT, CLIENT.
2016-06-05 09:37:27 +02:00
FlightControl
64f67e2ae0 ZONE_POLYGON 2016-06-05 00:06:09 +02:00
FlightControl
d5867a1c8c For those who want to test ZONES 2016-06-05 00:04:12 +02:00
FlightControl
d8790ad2f1 First test mission with ZONE_POLYGON working! 2016-06-05 00:03:27 +02:00
Sven Van de Velde
2ac9e76f5c Merge pull request #59 from FlightControl-Master/Bugfix
Bugfix
2016-06-03 12:50:42 +02:00
FlightControl
8da59c4395 Documentation 2016-06-03 12:19:22 +02:00
FlightControl
edb265948b Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-06-03 11:44:17 +02:00
FlightControl
99b90789e6 Updated SPAWN Test 2016-06-03 11:43:49 +02:00
Sven Van de Velde
3723b95563 Merge pull request #58 from FlightControl-Master/Expand-GROUP
Added lots of functions in GROUP
2016-06-02 14:50:14 +02:00
FlightControl
a34e4c68d0 Added lots of functions in GROUP 2016-06-02 14:49:10 +02:00
FlightControl
ade8135b5a Revert "Added lots of new GROUP functions"
This reverts commit 8b01579a42.
2016-06-02 14:47:14 +02:00
FlightControl
8b01579a42 Added lots of new GROUP functions 2016-06-02 14:47:05 +02:00
FlightControl
ac1d9485cd Small bugfixes in GroupSet.lua 2016-05-27 14:22:56 +02:00
FlightControl
69c11ca1c6 Bugfix GroupSet 2016-05-27 14:20:03 +02:00
FlightControl
5b598818b4 Merge remote-tracking branch 'refs/remotes/origin/master' into Build-Sets 2016-05-27 14:03:30 +02:00
FlightControl
41375f4491 Small bugfixes and documentation update for GroupSet.lua 2016-05-27 13:53:06 +02:00
Sven Van de Velde
f3b8835a16 Merge pull request #57 from FlightControl-Master/Build-Sets
Build sets
2016-05-27 13:42:34 +02:00
FlightControl
3173dfb42a Documentations 2016-05-27 13:41:51 +02:00
FlightControl
0438cabbb0 DATABASE and SETS publish first version. 2016-05-27 13:34:25 +02:00
FlightControl
7efbd60b9e DATABASE now also follows correctly the players. 2016-05-27 13:21:39 +02:00
FlightControl
645d074a7d GROUPSET and UNITSET are working now !!
- GROUPSET and UNITSET inherit SET
- DATABASE optimized
- Tracing levels tuned.
2016-05-27 11:32:49 +02:00
FlightControl
dc662849d4 Sets first version 2016-05-27 09:45:58 +02:00
Sven Van de Velde
6605682557 Merge pull request #56 from FlightControl-Master/Bugfix
Bugfix
2016-05-26 14:23:09 +02:00
FlightControl
4064caa743 Fixed bugs in MOOSE 2016-05-26 14:21:31 +02:00
FlightControl
611741d7af Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-05-26 09:13:19 +02:00
Sven Van de Velde
7fa2a64347 Merge pull request #55 from FlightControl-Master/Remove-Routines.Scheduler
Remove routines scheduler
2016-05-25 17:01:28 +02:00
FlightControl
8cdee7f611 Moose.lua 2016-05-25 17:00:19 +02:00
FlightControl
ed9c1b2185 Moose.lua 2016-05-25 16:55:45 +02:00
FlightControl
9afe0acd8d SCHEDULER:New() implemented and routines.scheduleFunction removed 2016-05-25 16:54:09 +02:00
FlightControl
bed2a339a1 Moose.lua updates. 2016-05-25 12:37:07 +02:00
FlightControl
9cd55e6f2a Added Web Site Markup Text 2016-05-25 12:04:23 +02:00
Sven Van de Velde
df9b05c270 Merge pull request #54 from FlightControl-Master/Embedded
Embedded
2016-05-25 11:24:19 +02:00
FlightControl
6a43e9da80 New Moose Structure + Created New Update Mission Method 2016-05-25 11:00:30 +02:00
FlightControl
2a97df7ef9 Merge remote-tracking branch 'refs/remotes/origin/master' into Embedded 2016-05-25 07:00:58 +02:00
Sven Van de Velde
4f1c0eaa8e Merge pull request #53 from FlightControl-Master/Rework-UNIT-and-CLIENT
Rework unit and client
2016-05-24 12:33:02 +02:00
FlightControl
90b902f3b3 Embedded 2016-05-24 12:28:20 +02:00
FlightControl
070c893940 Documentation, and test mission video + optimizations 2016-05-24 11:57:01 +02:00
svenvandevelde
d1b8eda700 Documentation 2016-05-23 11:56:40 +02:00
svenvandevelde
49e85a326c Presentation progress 2016-05-23 07:07:17 +02:00
svenvandevelde
accc982ee1 Presentation updated 2016-05-22 22:12:11 +02:00
Sven Van de Velde
b78187aaff Progress 2016-05-22 10:30:22 +02:00
svenvandevelde
7e375c4895 Optimizations and register the database 2016-05-21 14:43:48 +02:00
svenvandevelde
b086ef50f7 Added lots of DCS functions, reworked to the UNIT class
To enable tracing, error checking etc...
2016-05-21 11:13:55 +02:00
Sven Van de Velde
422e5b6eff Merge pull request #51 from FlightControl-Master/Bugfix
Bugfix
2016-05-20 16:31:24 +02:00
FlightControl
498505b7b8 Fixed a group not existing when building the _DATABASE 2016-05-20 16:29:57 +02:00
FlightControl
c50f98b8dd Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-05-20 11:14:41 +02:00
Sven Van de Velde
3e5836f9d4 Updated some documentation 2016-05-18 11:47:00 +02:00
Sven Van de Velde
27bdc65cd7 Merge pull request #48 from FlightControl-Master/MissileTrainer
Missiletrainer
2016-05-18 11:12:46 +02:00
Sven Van de Velde
1cb97aca38 Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer
# Conflicts:
#	Embedded/Moose_Embedded.lua
#	Moose/MissileTrainer.lua
#	Test Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.lua
#	Test Missions/Moose_Test_MISSILETRAINER/Moose_Test_MISSILETRAINER.miz
2016-05-18 11:09:21 +02:00
Sven Van de Velde
df783226cb Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer 2016-05-18 11:00:54 +02:00
Sven Van de Velde
62d04113d3 Revert "Embedded"
This reverts commit 6a06632a5e.
2016-05-18 11:00:50 +02:00
Sven Van de Velde
6a06632a5e Embedded 2016-05-18 10:44:26 +02:00
Sven Van de Velde
83d5338b16 Merge pull request #46 from FlightControl-Master/MissileTrainer
Missiletrainer
2016-05-17 10:58:53 +02:00
svenvandevelde
9b0879626f Fix bug where missiles were deleted client to client
Bug solve of the early deletion of missiles fired from client to client
(air to air f.e.).
Updated documentation.
Added API to change the frequency of tracking.
2016-05-17 10:57:51 +02:00
svenvandevelde
fe36e0ee2a Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer 2016-05-17 09:47:51 +02:00
Sven Van de Velde
d198da5ada Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer 2016-05-17 07:14:08 +02:00
Sven Van de Velde
2eb784abad Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer
# Conflicts:
#	Moose/MissileTrainer.lua
2016-05-17 07:13:50 +02:00
Sven Van de Velde
cbcc9b411f Documentation of MISSILETRAINER 2016-05-17 07:07:36 +02:00
Sven Van de Velde
1fef4793ca Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer
# Conflicts:
#	Moose/MissileTrainer.lua
2016-05-17 07:05:27 +02:00
Sven Van de Velde
ff689b05be Merge pull request #45 from FlightControl-Master/Documentation
Documentation
2016-05-17 06:35:13 +02:00
Sven Van de Velde
219f44e008 Embedded 2016-05-17 06:33:19 +02:00
Sven Van de Velde
7a91bdff72 Updated documentation to MISSILELAUNCHER 2016-05-17 06:32:34 +02:00
svenvandevelde
f20ba8985b Updates 2016-05-17 05:14:35 +02:00
svenvandevelde
75b2a668dd Updated documentation for missile trainer 2016-05-16 09:06:02 +02:00
Sven Van de Velde
37c8bb5477 Merge pull request #44 from FlightControl-Master/Database-Rework
Database rework
2016-05-14 07:11:39 +02:00
Sven Van de Velde
0a66cb6a59 Documentation 2016-05-14 07:10:19 +02:00
Sven Van de Velde
bca06c1dbf Updated documentation of Client 2016-05-14 06:47:22 +02:00
Sven Van de Velde
128bb0cc2c Documentation 2016-05-14 06:41:46 +02:00
Sven Van de Velde
fe8438648c Documentation + Added further APIs 2016-05-14 06:35:45 +02:00
Sven Van de Velde
d1b3de1940 Progress 2016-05-13 12:46:08 +02:00
Sven Van de Velde
6dd4bc638e Updates 2016-05-12 14:54:52 +02:00
Sven Van de Velde
971f5e9ca4 Updates 2016-05-12 14:53:28 +02:00
Sven Van de Velde
e486c80350 Got something working now 2016-05-12 12:38:35 +02:00
svenvandevelde
01531f0c73 Progress 2016-05-11 17:18:50 +02:00
Sven Van de Velde
4d40f28cf8 Revised client and database logic. Still work in progress. 2016-05-11 14:19:46 +02:00
Sven Van de Velde
e71c02b885 Merge remote-tracking branch 'refs/remotes/origin/master' into Database-Rework 2016-05-11 06:07:24 +02:00
Sven Van de Velde
15b189d747 commit 2016-05-11 06:07:05 +02:00
Sven Van de Velde
5990650529 Merge remote-tracking branch 'refs/remotes/origin/master' into MissileTrainer 2016-05-11 05:57:25 +02:00
Sven Van de Velde
b836ca5fcd Merge pull request #43 from FlightControl-Master/Clean-Web-Site
Removal of website from master
2016-05-11 05:51:22 +02:00
Sven Van de Velde
45cc120f76 Removal of website from master
(is still in the documentation branch)
2016-05-11 05:50:54 +02:00
Sven Van de Velde
db2cc49b85 Work in progress 2016-05-10 20:01:45 +02:00
Sven Van de Velde
37ec8c294f Merge remote-tracking branch 'refs/remotes/origin/master' into Database-Rework 2016-05-10 17:30:53 +02:00
Sven Van de Velde
b7a2e8b278 Embedded 2016-05-10 17:28:37 +02:00
Sven Van de Velde
4667e7c41c Solved bug in SCHEDULER 2016-05-10 17:28:14 +02:00
Sven Van de Velde
9f8bfa1603 Merge pull request #41 from FlightControl-Master/Rework-Scheduling-with-SCHEDULER-class
Rework scheduling with scheduler class
2016-05-10 15:49:37 +02:00
Sven Van de Velde
812c4216c5 Updated SPAWN with the SCHEDULER class 2016-05-10 15:48:53 +02:00
Sven Van de Velde
34d268b451 Optimized the scheduler 2016-05-10 12:05:07 +02:00
Sven Van de Velde
7e8090f772 Merge pull request #40 from FlightControl-Master/Anapa-Airbase-fixes
Anapa airbase fixes
2016-05-09 15:03:32 +02:00
Sven Van de Velde
bfb1bcc232 Anapa Airbase red Task Force 4 is working now :-)
You can pickup oil workers from the oil derrick with the helicopter in
mid sea...
2016-05-09 15:01:19 +02:00
Sven Van de Velde
8ef6ef14dd Updates 2016-05-08 16:16:41 +02:00
Sven Van de Velde
3965c5e254 Merge pull request #39 from FlightControl-Master/Anapa-Airbase-fixes
Anapa airbase fixes
2016-05-07 15:27:01 +02:00
Sven Van de Velde
aaa3ab07e3 Updated Anapa Airbase 2016-05-07 15:25:51 +02:00
Sven Van de Velde
38244f10dd Embedded 2016-05-07 07:18:54 +02:00
Sven Van de Velde
1949d69fa0 Updated Anapa 2016-05-07 06:59:15 +02:00
Sven Van de Velde
c68e4cd257 progress 2016-05-06 19:12:02 +02:00
Sven Van de Velde
4704afdc6c Merge remote-tracking branch 'refs/remotes/origin/master' into Anapa-Airbase-fixes 2016-05-06 16:44:59 +02:00
Sven Van de Velde
979de8901c Merge pull request #38 from FlightControl-Master/MissileTrainer
Missiletrainer
2016-05-06 16:43:48 +02:00
Sven Van de Velde
ad2c3ed83f commit 2016-05-06 16:41:59 +02:00
svenvandevelde
bfeaa961f6 Updates for Anapa. Fixed a bug in SPAWN (small bug) 2016-05-06 14:21:24 +02:00
svenvandevelde
4adf5aa188 Anapa airbase fixes 2016-05-06 10:12:30 +02:00
Sven Van de Velde
1d9da407b9 changed dynamic to embedded loading in mission 2016-05-03 19:54:53 +02:00
Sven Van de Velde
f981200409 MissileTrainer first version 2016-05-03 13:47:02 +02:00
Sven Van de Velde
f8a5ebdadb Included latest embedded file 2016-05-03 06:47:01 +02:00
Sven Van de Velde
f95555732d Updated the template... 2016-05-03 05:57:54 +02:00
Sven Van de Velde
d70162cf96 Merge pull request #33 from FlightControl-Master/Bugfix
Bugfix
2016-05-01 07:37:14 +02:00
FlightControl
25330755e2 Embedded 2016-05-01 07:36:39 +02:00
Sven Van de Velde
55eb06b2d9 Merge pull request #32 from FlightControl-Master/Bugfix
Bugfix
2016-04-30 15:31:50 +02:00
FlightControl
92289ecd16 Updated demos for youtube videos. 2016-04-30 15:31:22 +02:00
FlightControl
cbdd287833 Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-04-30 11:56:23 +02:00
Sven Van de Velde
bce2a40d63 Merge pull request #31 from FlightControl-Master/Bugfix
Bugfix
2016-04-30 11:05:18 +02:00
FlightControl
7bb367d3ff Added Moose.lua in embedded.lua file 2016-04-30 11:04:54 +02:00
FlightControl
a693ee76bf Merge remote-tracking branch 'refs/remotes/origin/master' into Bugfix 2016-04-30 11:02:00 +02:00
Sven Van de Velde
203d15cecb Merge pull request #29 from FlightControl-Master/Bugfix
Updated DATABASE test mission
2016-04-30 10:46:41 +02:00
Sven Van de Velde
f0a9bed293 Merge pull request #30 from FlightControl-Master/Embedded
Embedded
2016-04-30 10:46:15 +02:00
FlightControl
780a0e02cc Embedded 2016-04-30 10:44:59 +02:00
FlightControl
2f2aa5c0f8 Updated DATABASE test mission 2016-04-30 10:44:25 +02:00
853 changed files with 264590 additions and 46221 deletions

6
.gitignore vendored
View File

@@ -5,7 +5,6 @@
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
@@ -19,8 +18,6 @@ local.properties
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
@@ -47,7 +44,6 @@ local.properties
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
@@ -224,3 +220,5 @@ _gsdata_/
#GITHUB
.gitattributes
.gitignore
Moose Test Missions/MOOSE_Test_Template.miz
Moose.lua

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "Moose Development/Moose/Dcs"]
path = Moose Development/Moose/Dcs
url = https://github.com/FlightControl-Master/DCS-API.git
branch = master

4
DCS_Folder_Sync.bat Normal file
View File

@@ -0,0 +1,4 @@
rem This script will pull the latest changes from the remote repository, and update the submodules accordingly.
C:\Program Files (x86)\Git\bin\git pull
C:\Program Files (x86)\Git\bin\git submodule update --init

View File

@@ -1,54 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSAirbase
--- Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
-- @type Airbase
-- @extends DCSCoalitionObject#CoalitionObject
-- @field #Airbase.ID ID Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.
-- @field #Airbase.Category Category enum contains identifiers of airbase categories.
-- @field #Airbase.Desc Desc Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.
--- Enum contains identifiers of airbase categories.
-- @type Airbase.Category
-- @field AIRDROME
-- @field HELIPAD
-- @field SHIP
--- Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.
-- @type Airbase.Desc
-- @extends #Desc
-- @field #Airbase.Category category Category of the airbase type.
--- Returns airbase by its name. If no airbase found the function will return nil.
-- @function [parent=#Airbase] getByName
-- @param #string name
-- @return #Airbase
--- Returns airbase descriptor by type name. If no descriptor is found the function will return nil.
-- @function [parent=#Airbase] getDescByName
-- @param #TypeName typeName Airbase type name.
-- @return #Airbase.Desc
--- Returns Unit that is corresponded to the airbase. Works only for ships.
-- @function [parent=#Airbase] getUnit
-- @param self
-- @return Unit#Unit
--- Returns identifier of the airbase.
-- @function [parent=#Airbase] getID
-- @param self
-- @return #Airbase.ID
--- Returns the airbase's callsign - the localized string.
-- @function [parent=#Airbase] getCallsign
-- @param self
-- @return #string
--- Returns descriptor of the airbase.
-- @function [parent=#Airbase] getDesc
-- @param self
-- @return #Airbase.Desc
Airbase = {} --#Airbase

View File

@@ -1,28 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSCoalitionObject
--- @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 #CoalitionObject self
-- @return DCSTypes#coalition.side
--- Returns object country.
-- @function [parent=#CoalitionObject] getCountry
-- @param #CoalitionObject self
-- @return #country.id
CoalitionObject = {} --#CoalitionObject

View File

@@ -1,10 +0,0 @@
--- @module DCSCommand
--- @type Command
-- @field #string id
-- @field #Command.params params
--- @type Command.params
env.info( "Command defined" )

View File

@@ -1,115 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSController
--- Controller is an object that performs A.I.-routines. Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.
--
-- This class has 2 types of functions:
--
-- * Tasks
-- * Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
-- @type Controller
-- @field #Controller.Detection Detection Enum contains identifiers of surface types.
--- Enables and disables the controller.
-- Note: Now it works only for ground / naval groups!
-- @function [parent=#Controller] setOnOff
-- @param self
-- @param #boolean value Enable / Disable.
-- Tasks
--- Resets current task and then sets the task to the controller. Task is a table that contains task identifier and task parameters.
-- @function [parent=#Controller] setTask
-- @param self
-- @param #Task task
--- Resets current task of the controller.
-- @function [parent=#Controller] resetTask
-- @param self
--- Pushes the task to the front of the queue and makes the task active. Further call of function Controller.setTask() function will stop current task, clear the queue and set the new task active. If the task queue is empty the function will work like function Controller.setTask() function.
-- @function [parent=#Controller] pushTask
-- @param self
-- @param #Task task
--- Pops current (front) task from the queue and makes active next task in the queue (if exists). If no more tasks in the queue the function works like function Controller.resetTask() function. Does nothing if the queue is empty.
-- @function [parent=#Controller] popTask
-- @param self
--- Returns true if the controller has a task.
-- @function [parent=#Controller] hasTask
-- @param self
-- @return #boolean
-- Commands
--TODO: describe #Command structure
--- Sets the command to perform by controller.
-- @function [parent=#Controller] setCommand
-- @param self
-- @param #Command command Table that contains command identifier and command parameters.
-- Behaviours
--- Sets the option to the controller.
-- Option is a pair of identifier and value. Behavior options are global parameters those affect controller behavior in all tasks it performs.
-- Option identifiers and values are stored in table AI.Option in subtables Air, Ground and Naval.
--
-- OptionId = @{#AI.Option.Air.id} or @{#AI.Option.Ground.id} or @{#AI.Option.Naval.id}
-- OptionValue = AI.Option.Air.val[optionName] or AI.Option.Ground.val[optionName] or AI.Option.Naval.val[optionName]
--
-- @function [parent=#Controller] setOption
-- @param self
-- @param #OptionId optionId Option identifier.
-- @param #OptionValue optionValue Value of the option.
-- Detection
--- Enum contains identifiers of surface types.
-- @type Controller.Detection
-- @field VISUAL
-- @field OPTIC
-- @field RADAR
-- @field IRST
-- @field RWR
-- @field DLINK
--- Detected target.
-- @type DetectedTarget
-- @field Object#Object object The target
-- @field #boolean visible The target is visible
-- @field #boolean type The target type is known
-- @field #boolean distance Distance to the target is known
--- Checks if the target is detected or not. If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method.
-- @function [parent=#Controller] isTargetDetected
-- @param self
-- @param Object#Object target Target to check
-- @param #Controller.Detection detection Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN
-- @return #boolean detected True if the target is detected.
-- @return #boolean visible Has effect only if detected is true. True if the target is visible now.
-- @return #ModelTime lastTime Has effect only if visible is false. Last time when target was seen.
-- @return #boolean type Has effect only if detected is true. True if the target type is known.
-- @return #boolean distance Has effect only if detected is true. True if the distance to the target is known.
-- @return #Vec3 lastPos Has effect only if visible is false. Last position of the target when it was seen.
-- @return #Vec3 lastVel Has effect only if visible is false. Last velocity of the target when it was seen.
--- Returns list of detected targets. If one or more detection method is specified the function will return targets which were detected by at least one of these methods. If no detection methods are specified the function will return targets which were detected by any method.
-- @function [parent=#Controller] getDetectedTargets
-- @param self
-- @param #Controller.Detection detection Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN
-- @return #list<#DetectedTarget> array of DetectedTarget
--- Know a target.
-- @function [parent=#Controller] knowTarget
-- @param self
-- @param Object#Object object The target.
-- @param #boolean type Target type is known.
-- @param #boolean distance Distance to target is known.
Controller = {} --#Controller

View File

@@ -1,82 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSGroup
--- Represents group of Units.
-- @type Group
-- @field #ID ID Identifier of a group. It is assigned to a group by Mission Editor automatically.
-- @field #Group.Category Category Enum contains identifiers of group types.
--- Enum contains identifiers of group types.
-- @type Group.Category
-- @field AIRPLANE
-- @field HELICOPTER
-- @field GROUND
-- @field SHIP
-- Static Functions
--- Returns group by the name assigned to the group in Mission Editor.
-- @function [parent=#Group] getByName
-- @param #string name
-- @return #Group
-- Member Functions
--- returns true if the group exist or false otherwise.
-- @function [parent=#Group] isExist
-- @param #Group self
-- @return #boolean
--- Destroys the group and all of its units.
-- @function [parent=#Group] destroy
-- @param #Group self
--- Returns category of the group.
-- @function [parent=#Group] getCategory
-- @param #Group self
-- @return #Group.Category
--TODO check coalition.side
--- Returns coalition of the group.
-- @function [parent=#Group] getCoalition
-- @param #Group self
-- @return #coalition.side
--- Returns the group's name. This is the same name assigned to the group in Mission Editor.
-- @function [parent=#Group] getName
-- @param #Group self
-- @return #string
--- Returns the group identifier.
-- @function [parent=#Group] getID
-- @param #Group self
-- @return #ID
--- Returns the unit with number unitNumber. If the unit is not exists the function will return nil.
-- @function [parent=#Group] getUnit
-- @param #Group self
-- @param #number unitNumber
-- @return DCSUnit#Unit
--- Returns current size of the group. If some of the units will be destroyed, As units are destroyed the size of the group will be changed.
-- @function [parent=#Group] getSize
-- @param #Group self
-- @return #number
--- Returns initial size of the group. If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.
-- @function [parent=#Group] getInitialSize
-- @param #Group self
-- @return #number
--- Returns array of the units present in the group now. Destroyed units will not be enlisted at all.
-- @function [parent=#Group] getUnits
-- @param #Group self
-- @return #list<DCSUnit#Unit> array of Units
--- Returns controller of the group.
-- @function [parent=#Group] getController
-- @param #Group self
-- @return Controller#Controller
Group = {} --#Group

View File

@@ -1,73 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSObject
--- @type Object
-- @field #Object.Category Category
-- @field #Object.Desc Desc
--- @type Object.Category
-- @field UNIT
-- @field WEAPON
-- @field STATIC
-- @field SCENERY
-- @field BASE
--- @type Object.Desc
-- @extends #Desc
-- @field #number life initial life level
-- @field #Box3 box bounding box of collision geometry
--- @function [parent=#Object] isExist
-- @param #Object self
-- @return #boolean
--- @function [parent=#Object] destroy
-- @param #Object self
--- @function [parent=#Object] getCategory
-- @param #Object self
-- @return #Object.Category
--- Returns type name of the Object.
-- @function [parent=#Object] getTypeName
-- @param #Object self
-- @return #string
--- Returns object descriptor.
-- @function [parent=#Object] getDesc
-- @param #Object self
-- @return #Object.Desc
--- Returns true if the object belongs to the category.
-- @function [parent=#Object] hasAttribute
-- @param #Object self
-- @param #AttributeName attributeName Attribute name to check.
-- @return #boolean
--- Returns name of the object. This is the name that is assigned to the object in the Mission Editor.
-- @function [parent=#Object] getName
-- @param #Object self
-- @return #string
--- Returns object coordinates for current time.
-- @function [parent=#Object] getPoint
-- @param #Object self
-- @return #Vec3
--- Returns object position for current time.
-- @function [parent=#Object] getPosition
-- @param #Object self
-- @return #Position3
--- Returns the unit's velocity vector.
-- @function [parent=#Object] getVelocity
-- @param #Object self
-- @return #Vec3
--- Returns true if the unit is in air.
-- @function [parent=#Object] inAir
-- @param #Object self
-- @return #boolean
Object = {} --#Object

View File

@@ -1,34 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSStaticObject
-------------------------------------------------------------------------------
-- @module StaticObject
-- @extends CoalitionObject#CoalitionObject
--- Represents static object added in the Mission Editor.
-- @type StaticObject
-- @field #StaticObject.ID ID Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.
-- @field #StaticObject.Desc Desc Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.
--- StaticObject descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.
-- @type StaticObject.Desc
-- @extends Unit#Unit.Desc
--- Returns static object by its name. If no static object found nil will be returned.
-- @function [parent=#StaticObject] getByName
-- @param #string name Name of static object to find.
-- @return #StaticObject
--- returns identifier of the static object.
-- @function [parent=#StaticObject] getID
-- @param #StaticObject self
-- @return #StaticObject.ID
--- Returns descriptor of the StaticObject.
-- @function [parent=#StaticObject] getDesc
-- @param #StaticObject self
-- @return #StaticObject.Desc
StaticObject = {} --#StaticObject

View File

@@ -1,10 +0,0 @@
--- @module DCSTask
--- @type Task
-- @field #string id
-- @field #Task.param param
--- @type Task.param
env.info( "Task defined" )

View File

@@ -1,2 +0,0 @@
-- @type ModelTime
-- @extends #number

View File

@@ -1,236 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSTypes
--- Time is given in seconds.
-- @type Time
-- @extends #number
--- Model time is the time that drives the simulation. Model time may be stopped, accelerated and decelerated relative real time.
-- @type ModelTime
-- @extends #number
--- Mission time is a model time plus time of the mission start.
-- @type MissionTime
-- @extends #number
--- Distance is given in meters.
-- @type Distance
-- @extends #number
--- Angle is given in radians.
-- @type Angle
-- @extends #number
--- Azimuth is an angle of rotation around world axis y counter-clockwise.
-- @type Azimuth
-- @extends #number
--- Mass is given in kilograms.
-- @type Mass
-- @extends #number
--- Vec3 type is a 3D-vector.
-- DCS world has 3-dimensional coordinate system. DCS ground is an infinite plain.
-- @type Vec3
-- @field #Distance x is directed to the north
-- @field #Distance z is directed to the east
-- @field #Distance y is directed up
--- Vec2 is a 2D-vector for the ground plane as a reference plane.
-- @type Vec2
-- @field #Distance x Vec2.x = Vec3.x
-- @field #Distance y Vec2.y = Vec3.z
--- Position is a composite structure. It consists of both coordinate vector and orientation matrix. Position3 (also known as "Pos3" for short) is a table that has following format:
-- @type Position3
-- @field #Vec3 p
-- @field #Vec3 x
-- @field #Vec3 y
-- @field #Vec3 z
--- 3-dimensional box.
-- @type Box3
-- @field #Vec3 min
-- @field #Vec3 max
--- Each object belongs to a type. Object type is a named couple of properties those independent of mission and common for all units of the same type. Name of unit type is a string. Samples of unit type: "Su-27", "KAMAZ" and "M2 Bradley".
-- @type TypeName
-- @extends #string
--- @type AI
-- @field #AI.Skill Skill
-- @field #AI.Task Task
-- @field #AI.Option Option
--- @type AI.Skill
-- @field AVERAGE
-- @field GOOD
-- @field HIGH
-- @field EXCELLENT
-- @field PLAYER
-- @field CLIENT
--- @type AI.Task
-- @field #AI.Task.WeaponExpend WeaponExpend
-- @field #AI.Task.OrbitPattern OrbitPattern
-- @field #AI.Task.Designation Designation
-- @field #AI.Task.WaypointType WaypointType
-- @field #AI.Task.TurnMethod TurnMethod
-- @field #AI.Task.AltitudeType AltitudeType
-- @field #AI.Task.VehicleFormation VehicleFormation
--- @type AI.Task.WeaponExpend
-- @field ONE
-- @field TWO
-- @field FOUR
-- @field QUARTER
-- @field HALF
-- @field ALL
--- @type AI.Task.OrbitPattern
-- @field CIRCLE
-- @field RACE_TRACK
--- @type AI.Task.Designation
-- @field NO
-- @field AUTO
-- @field WP
-- @field IR_POINTER
-- @field LASER
--- @type AI.Task.WaypointType
-- @field TAKEOFF
-- @field TAKEOFF_PARKING
-- @field TURNING_POINT
-- @field LAND
--- @type AI.Task.TurnMethod
-- @field FLY_OVER_POINT
-- @field FIN_POINT
--- @type AI.Task.AltitudeType
-- @field BARO
-- @field RADIO
--- @type AI.Task.VehicleFormation
-- @field OFF_ROAD
-- @field ON_ROAD
-- @field RANK
-- @field CONE
-- @field DIAMOND
-- @field VEE
-- @field ECHELON_LEFT
-- @field ECHELON_RIGHT
--- @type AI.Option
-- @field #AI.Option.Air Air
-- @field #AI.Option.Ground Ground
-- @field #AI.Option.Naval Naval
--- @type AI.Option.Air
-- @field #AI.Option.Air.id id
-- @field #AI.Option.Air.val val
--- @type AI.Option.Ground
-- @field #AI.Option.Ground.id id
-- @field #AI.Option.Ground.val val
--- @type AI.Option.Naval
-- @field #AI.Option.Naval.id id
-- @field #AI.Option.Naval.val val
--TODO: work on formation
--- @type AI.Option.Air.id
-- @field NO_OPTION
-- @field ROE
-- @field REACTION_ON_THREAT
-- @field RADAR_USING
-- @field FLARE_USING
-- @field FORMATION
-- @field RTB_ON_BINGO
-- @field SILENCE
--- @type AI.Option.Air.val
-- @field #AI.Option.Air.val.ROE ROE
-- @field #AI.Option.Air.val.REACTION_ON_THREAT REACTION_ON_THREAT
-- @field #AI.Option.Air.val.RADAR_USING RADAR_USING
-- @field #AI.Option.Air.val.FLARE_USING FLARE_USING
--- @type AI.Option.Air.val.ROE
-- @field WEAPON_FREE
-- @field OPEN_FIRE_WEAPON_FREE
-- @field OPEN_FIRE
-- @field RETURN_FIRE
-- @field WEAPON_HOLD
--- @type AI.Option.Air.val.REACTION_ON_THREAT
-- @field NO_REACTION
-- @field PASSIVE_DEFENCE
-- @field EVADE_FIRE
-- @field BYPASS_AND_ESCAPE
-- @field ALLOW_ABORT_MISSION
--- @type AI.Option.Air.val.RADAR_USING
-- @field NEVER
-- @field FOR_ATTACK_ONLY
-- @field FOR_SEARCH_IF_REQUIRED
-- @field FOR_CONTINUOUS_SEARCH
--- @type AI.Option.Air.val.FLARE_USING
-- @field NEVER
-- @field AGAINST_FIRED_MISSILE
-- @field WHEN_FLYING_IN_SAM_WEZ
-- @field WHEN_FLYING_NEAR_ENEMIES
--- @type AI.Option.Ground.id
-- @field NO_OPTION
-- @field ROE @{#AI.Option.Ground.val.ROE}
-- @field DISPERSE_ON_ATTACK true or false
-- @field ALARM_STATE @{#AI.Option.Ground.val.ALARM_STATE}
--- @type AI.Option.Ground.val
-- @field #AI.Option.Ground.val.ROE ROE
-- @field #AI.Option.Ground.val.ALARM_STATE ALARM_STATE
--- @type AI.Option.Ground.val.ROE
-- @field OPEN_FIRE
-- @field RETURN_FIRE
-- @field WEAPON_HOLD
--- @type AI.Option.Ground.val.ALARM_STATE
-- @field AUTO
-- @field GREEN
-- @field RED
--- @type AI.Option.Naval.id
-- @field NO_OPTION
-- @field ROE
--- @type AI.Option.Naval.val
-- @field #AI.Option.Naval.val.ROE ROE
--- @type AI.Option.Naval.val.ROE
-- @field OPEN_FIRE
-- @field RETURN_FIRE
-- @field WEAPON_HOLD
AI = {} --#AI
--- @type Desc
-- @field #TypeName typeName type name
-- @field #string displayName localized display name
-- @field #table attributes object type attributes
--- A distance type
-- @type Distance
--- An angle type
-- @type Angle
env.info( 'AI types created' )

View File

@@ -1,241 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCSUnit
--- @type Unit
-- @extends DCSCoalitionObject#CoalitionObject
-- @field ID Identifier of an unit. It assigned to an unit by the Mission Editor automatically.
-- @field #Unit.Category Category
-- @field #Unit.RefuelingSystem RefuelingSystem
-- @field #Unit.SensorType SensorType
-- @field #Unit.OpticType OpticType
-- @field #Unit.RadarType RadarType
-- @field #Unit.Desc Desc
-- @field #Unit.DescAircraft DescAircraft
-- @field #Unit.DescAirplane DescAirplane
-- @field #Unit.DescHelicopter DescHelicopter
-- @field #Unit.DescVehicle DescVehicle
-- @field #Unit.DescShip DescShip
-- @field #Unit.AmmoItem AmmoItem
-- @field #list<#Unit.AmmoItem> Ammo
-- @field #Unit.Sensor Sensor
-- @field #Unit.Optic Optic
-- @field #Unit.Radar Radar
-- @field #Unit.IRST IRST
--- Enum that stores unit categories.
-- @type Unit.Category
-- @field AIRPLANE
-- @field HELICOPTER
-- @field GROUND_UNIT
-- @field SHIP
-- @field STRUCTURE
--- Enum that stores aircraft refueling system types.
-- @type Unit.RefuelingSystem
-- @field BOOM_AND_RECEPTACLE
-- @field PROBE_AND_DROGUE
--- Enum that stores sensor types.
-- @type Unit.SensorType
-- @field OPTIC
-- @field RADAR
-- @field IRST
-- @field RWR
--- Enum that stores types of optic sensors.
-- @type Unit.OpticType
-- @field TV TV-sensor
-- @field LLTV Low-level TV-sensor
-- @field IR Infra-Red optic sensor
--- Enum that stores radar types.
-- @type Unit.RadarType
-- @field AS air search radar
-- @field SS surface/land search radar
--- A unit descriptor.
-- @type Unit.Desc
-- @extends Object#Object.Desc
-- @field #Unit.Category category Unit Category
-- @field #Mass massEmpty mass of empty unit
-- @field #number speedMax istance / Time, --maximal velocity
--- An aircraft descriptor.
-- @type Unit.DescAircraft
-- @extends Unit#Unit.Desc
-- @field #Mass fuelMassMax maximal inner fuel mass
-- @field #Distance range Operational range
-- @field #Distance Hmax Ceiling
-- @field #number VyMax #Distance / #Time, --maximal climb rate
-- @field #number NyMin minimal safe acceleration
-- @field #number NyMax maximal safe acceleration
-- @field #Unit.RefuelingSystem tankerType refueling system type
--- An airplane descriptor.
-- @type Unit.DescAirplane
-- @extends Unit#Unit.DescAircraft
-- @field #number speedMax0 Distance / Time maximal TAS at ground level
-- @field #number speedMax10K Distance / Time maximal TAS at altitude of 10 km
--- A helicopter descriptor.
-- @type Unit.DescHelicopter
-- @extends Unit#Unit.DescAircraft
-- @field #Distance HmaxStat static ceiling
--- A vehicle descriptor.
-- @type Unit.DescVehicle
-- @extends Unit#Unit.Desc
-- @field #Angle maxSlopeAngle maximal slope angle
-- @field #boolean riverCrossing can the vehicle cross a rivers
--- A ship descriptor.
-- @type Unit.DescShip
-- @extends #Unit.Desc
--- ammunition item: "type-count" pair.
-- @type Unit.AmmoItem
-- @field #Weapon.Desc desc ammunition descriptor
-- @field #number count ammunition count
--- A unit sensor.
-- @type Unit.Sensor
-- @field #TypeName typeName
-- @field #Unit.SensorType type
--- An optic sensor.
-- @type Unit.Optic
-- @extends Unit#Unit.Sensor
-- @field #Unit.OpticType opticType
--- A radar.
-- @type Unit.Radar
-- @extends Unit#Unit.Sensor
-- @field #Distance detectionDistanceRBM detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search
-- @field #Distance detectionDistanceHRM detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM
-- @field #Unit.Radar.detectionDistanceAir detectionDistanceAir detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search
--- @type Unit.Radar.detectionDistanceAir
-- @field #Unit.Radar.detectionDistanceAir.upperHemisphere upperHemisphere
-- @field #Unit.Radar.detectionDistanceAir.lowerHemisphere lowerHemisphere
--- @type Unit.Radar.detectionDistanceAir.upperHemisphere
-- @field #Distance headOn
-- @field #Distance tailOn
--- @type Unit.Radar.detectionDistanceAir.lowerHemisphere
-- @field #Distance headOn
-- @field #Distance tailOn
--- An IRST.
-- @type Unit#Unit.IRST
-- @extends Unit.Sensor
-- @field #Distance detectionDistanceIdle detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle
-- @field #Distance detectionDistanceMaximal ..., engines are in maximal mode
-- @field #Distance detectionDistanceAfterburner ..., engines are in afterburner mode
--- An RWR.
-- @type Unit.RWR
-- @extends Unit#Unit.Sensor
--- table that stores all unit sensors.
-- TODO @type Sensors
--
--- Returns unit object by the name assigned to the unit in Mission Editor. If there is unit with such name or the unit is destroyed the function will return nil. The function provides access to non-activated units too.
-- @function [parent=#Unit] getByName
-- @param #string name
-- @return #Unit
--- Returns if the unit is activated.
-- @function [parent=#Unit] isActive
-- @param #Unit self
-- @return #boolean
--- Returns name of the player that control the unit or nil if the unit is controlled by A.I.
-- @function [parent=#Unit] getPlayerName
-- @param #Unit self
-- @return #string
--- returns the unit's unique identifier.
-- @function [parent=#Unit] getID
-- @param #Unit self
-- @return #Unit.ID
--- Returns the unit's number in the group. The number is the same number the unit has in ME. It may not be changed during the mission. If any unit in the group is destroyed, the numbers of another units will not be changed.
-- @function [parent=#Unit] getNumber
-- @param #Unit self
-- @return #number
--- Returns controller of the unit if it exist and nil otherwise
-- @function [parent=#Unit] getController
-- @param #Unit self
-- @return #Controller
--- Returns the unit's group if it exist and nil otherwise
-- @function [parent=#Unit] getGroup
-- @param #Unit self
-- @return DCSGroup#Group
--- Returns the unit's callsign - the localized string.
-- @function [parent=#Unit] getCallsign
-- @param #Unit self
-- @return #string
--- Returns the unit's health. Dead units has health <= 1.0
-- @function [parent=#Unit] getLife
-- @param #Unit self
-- @return #number
--- returns the unit's initial health.
-- @function [parent=#Unit] getLife0
-- @param #Unit self
-- @return #number
--- Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks. If there are additional fuel tanks the value may be greater than 1.0.
-- @function [parent=#Unit] getFuel
-- @param #Unit self
-- @return #number
--- Returns the unit ammunition.
-- @function [parent=#Unit] getAmmo
-- @param #Unit self
-- @return #Unit.Ammo
--- Returns the unit sensors.
-- @function [parent=#Unit] getSensors
-- @param #Unit self
-- @return #Unit.Sensors
--- Returns true if the unit has specified types of sensors. This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.
-- @function [parent=#Unit] hasSensors
-- @param #Unit self
-- @param #Unit.SensorType sensorType (= nil) Sensor type.
-- @param ... Additional parameters.
-- @return #boolean
-- @usage
-- If sensorType is Unit.SensorType.OPTIC, additional parameters are optic sensor types. Following example checks if the unit has LLTV or IR optics:
-- unit:hasSensors(Unit.SensorType.OPTIC, Unit.OpticType.LLTV, Unit.OpticType.IR)
-- If sensorType is Unit.SensorType.RADAR, additional parameters are radar types. Following example checks if the unit has air search radars:
-- unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS)
-- If no additional parameters are specified the function returns true if the unit has at least one sensor of specified type.
-- If sensor type is not specified the function returns true if the unit has at least one sensor of any type.
--
--- returns two values:
-- First value indicates if at least one of the unit's radar(s) is on.
-- Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
-- @function [parent=#Unit] getRadar
-- @param #Unit self
-- @return #boolean, Object#Object
--- Returns unit descriptor. Descriptor type depends on unit category.
-- @function [parent=#Unit] getDesc
-- @param #Unit self
-- @return #Unit.Desc
Unit = {} --#Unit

View File

@@ -1,27 +0,0 @@
-------------------------------------------------------------------------------
-- @module env
--- @type env
--- Add message to simulator log with caption "INFO". Message box is optional.
-- @function [parent=#env] info
-- @field #string message message string to add to log.
-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional.
--- Add message to simulator log with caption "WARNING". Message box is optional.
-- @function [parent=#env] warning
-- @field #string message message string to add to log.
-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional.
--- Add message to simulator log with caption "ERROR". Message box is optional.
-- @function [parent=#env] error
-- @field #string message message string to add to log.
-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional.
--- Enables/disables appearance of message box each time lua error occurs.
-- @function [parent=#env] setErrorMessageBoxEnabled
-- @field #boolean on if true message box appearance is enabled.
env = {} --#env

View File

@@ -1,20 +0,0 @@
-------------------------------------------------------------------------------
-- @module land
--- @type land
-- @field #land.SurfaceType SurfaceType
--- @type land.SurfaceType
-- @field LAND
-- @field SHALLOW_WATER
-- @field WATER
-- @field ROAD
-- @field RUNWAY
--- Returns altitude MSL of the point.
-- @function [parent=#land] getHeight
-- @param #Vec2 point point on the ground.
-- @return DCSTypes#Distance
land = {} --#land

View File

@@ -1,45 +0,0 @@
-------------------------------------------------------------------------------
-- @module DCStimer
--- @type timer
--- Returns model time in seconds.
-- @function [parent=#timer] getTime
-- @return #Time
--- Returns mission time in seconds.
-- @function [parent=#timer] getAbsTime
-- @return #Time
--- Returns mission start time in seconds.
-- @function [parent=#timer] getTime0
-- @return #Time
--- Schedules function to call at desired model time.
-- Time function FunctionToCall(any argument, Time time)
--
-- ...
--
-- return ...
--
-- end
--
-- Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again.
-- @function [parent=#timer] scheduleFunction
-- @param #FunctionToCall functionToCall Lua-function to call. Must have prototype of FunctionToCall.
-- @param functionArgument Function argument of any type to pass to functionToCall.
-- @param #Time time Model time of the function call.
-- @return functionId
--- Re-schedules function to call at another model time.
-- @function [parent=#timer] setFunctionTime
-- @param functionId Lua-function to call. Must have prototype of FunctionToCall.
-- @param #Time time Model time of the function call.
--- Removes the function from schedule.
-- @function [parent=#timer] removeFunction
-- @param functionId Function identifier to remove from schedule
timer = {} --#timer

View File

@@ -1,35 +0,0 @@
-------------------------------------------------------------------------------
-- @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

View File

@@ -1,967 +0,0 @@
<!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>Base</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><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>Base</code></h1>
<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">
<tr>
<td class="name" nowrap="nowrap"><a href="#BASE">BASE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#FORMATION">FORMATION</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(BASE)">Type <code>BASE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).AddEvent">BASE:AddEvent(Event, EventFunction)</a></td>
<td class="summary">
<p>Set a new listener for the class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).ClassID">BASE.ClassID</a></td>
<td class="summary">
<p>The ID number of the class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).ClassName">BASE.ClassName</a></td>
<td class="summary">
<p>The name of the class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).CreateEventBirth">BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)</a></td>
<td class="summary">
<p>Creation of a Birth Event.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).CreateEventCrash">BASE:CreateEventCrash(EventTime, Initiator)</a></td>
<td class="summary">
<p>Creation of a Crash Event.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).DisableEvents">BASE:DisableEvents()</a></td>
<td class="summary">
<p>Disable the event listeners for the class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).E">BASE:E(Arguments)</a></td>
<td class="summary">
<p>Log an exception which will be traced always.</p>
</td>
</tr>
<tr>
<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>
<td class="name" nowrap="nowrap"><a href="##(BASE).Events">BASE.Events</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).F">BASE:F(Arguments)</a></td>
<td class="summary">
<p>Trace a function call.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).F2">BASE:F2(Arguments)</a></td>
<td class="summary">
<p>Trace a function call level 2.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).F3">BASE:F3(Arguments)</a></td>
<td class="summary">
<p>Trace a function call level 3.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).GetClassID">BASE:GetClassID()</a></td>
<td class="summary">
<p>Get the ClassID of the class instance.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).GetClassName">BASE:GetClassName()</a></td>
<td class="summary">
<p>Get the ClassName of the class instance.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).GetClassNameAndID">BASE:GetClassNameAndID()</a></td>
<td class="summary">
<p>Get the ClassName + ClassID of the class instance.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).Inherit">BASE:Inherit(Child, Parent)</a></td>
<td class="summary">
<p>This is the worker method to inherit from a parent class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).Inherited">BASE:Inherited(Child)</a></td>
<td class="summary">
<p>This is the worker method to retrieve the Parent class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).New">BASE:New()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).T">BASE:T(Arguments)</a></td>
<td class="summary">
<p>Trace a function logic.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).T2">BASE:T2(Arguments)</a></td>
<td class="summary">
<p>Trace a function logic level 2.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).T3">BASE:T3(Arguments)</a></td>
<td class="summary">
<p>Trace a function logic level 3.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceClass">BASE:TraceClass(Class)</a></td>
<td class="summary">
<p>Set tracing for a class</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceClassMethod">BASE:TraceClassMethod(Class, Method)</a></td>
<td class="summary">
<p>Set tracing for a specific method of class</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceLevel">BASE:TraceLevel(Level)</a></td>
<td class="summary">
<p>Set trace level</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).onEvent">BASE:onEvent(event)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(FORMATION)">Type <code>FORMATION</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(FORMATION).Cone">FORMATION.Cone</a></td>
<td class="summary">
<p>A cone formation.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(BASE)">#BASE</a></em>
<a id="BASE" >
<strong>BASE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(FORMATION)">#FORMATION</a></em>
<a id="FORMATION" >
<strong>FORMATION</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Base)" >Type <code>Base</code></a></h2>
<h2><a id="#(BASE)" >Type <code>BASE</code></a></h2>
<p>The BASE Class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(BASE).AddEvent" >
<strong>BASE:AddEvent(Event, EventFunction)</strong>
</a>
</dt>
<dd>
<p>Set a new listener for the class.</p>
<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>#function EventFunction </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).ClassID" >
<strong>BASE.ClassID</strong>
</a>
</dt>
<dd>
<p>The ID number of the class.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).ClassName" >
<strong>BASE.ClassName</strong>
</a>
</dt>
<dd>
<p>The name of the class.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).CreateEventBirth" >
<strong>BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)</strong>
</a>
</dt>
<dd>
<p>Creation of a Birth Event.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="DCSTypes.html##(Time)">DCSTypes#Time</a> EventTime </em></code>:
The time stamp of the event.</p>
</li>
<li>
<p><code><em><a href="DCSObject.html##(Object)">DCSObject#Object</a> Initiator </em></code>:
The initiating object of the event.</p>
</li>
<li>
<p><code><em>#string IniUnitName </em></code>:
The initiating unit name.</p>
</li>
<li>
<p><code><em> place </em></code>: </p>
</li>
<li>
<p><code><em> subplace </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).CreateEventCrash" >
<strong>BASE:CreateEventCrash(EventTime, Initiator)</strong>
</a>
</dt>
<dd>
<p>Creation of a Crash Event.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="DCSTypes.html##(Time)">DCSTypes#Time</a> EventTime </em></code>:
The time stamp of the event.</p>
</li>
<li>
<p><code><em><a href="DCSObject.html##(Object)">DCSObject#Object</a> Initiator </em></code>:
The initiating object of the event.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).DisableEvents" >
<strong>BASE:DisableEvents()</strong>
</a>
</dt>
<dd>
<p>Disable the event listeners for the class.</p>
<h3>Return value</h3>
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).E" >
<strong>BASE:E(Arguments)</strong>
</a>
</dt>
<dd>
<p>Log an exception which will be traced always.</p>
<p>Can be anywhere within the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).EnableEvents" >
<strong>BASE:EnableEvents()</strong>
</a>
</dt>
<dd>
<p>Enable the event listeners for the class.</p>
<h3>Return value</h3>
<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">
<dt>
<em></em>
<a id="#(BASE).Events" >
<strong>BASE.Events</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).F" >
<strong>BASE:F(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function call.</p>
<p>Must be at the beginning of the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).F2" >
<strong>BASE:F2(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function call level 2.</p>
<p>Must be at the beginning of the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).F3" >
<strong>BASE:F3(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function call level 3.</p>
<p>Must be at the beginning of the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).GetClassID" >
<strong>BASE:GetClassID()</strong>
</a>
</dt>
<dd>
<p>Get the ClassID of the class instance.</p>
<h3>Return value</h3>
<p><em>#string:</em>
The ClassID of the class instance.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).GetClassName" >
<strong>BASE:GetClassName()</strong>
</a>
</dt>
<dd>
<p>Get the ClassName of the class instance.</p>
<h3>Return value</h3>
<p><em>#string:</em>
The ClassName of the class instance.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).GetClassNameAndID" >
<strong>BASE:GetClassNameAndID()</strong>
</a>
</dt>
<dd>
<p>Get the ClassName + ClassID of the class instance.</p>
<p>The ClassName + ClassID is formatted as '%s#%09d'. </p>
<h3>Return value</h3>
<p><em>#string:</em>
The ClassName + ClassID of the class instance.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).Inherit" >
<strong>BASE:Inherit(Child, Parent)</strong>
</a>
</dt>
<dd>
<p>This is the worker method to inherit from a parent class.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Child </em></code>:
is the Child class that inherits.</p>
</li>
<li>
<p><code><em><a href="##(BASE)">#BASE</a> Parent </em></code>:
is the Parent class that the Child inherits from.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(BASE)">#BASE</a>:</em>
Child</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).Inherited" >
<strong>BASE:Inherited(Child)</strong>
</a>
</dt>
<dd>
<p>This is the worker method to retrieve the Parent class.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(BASE)">#BASE</a> Child </em></code>:
is the Child class from which the Parent class needs to be retrieved.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(BASE)">#BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).New" >
<strong>BASE:New()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).T" >
<strong>BASE:T(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function logic.</p>
<p>Can be anywhere within the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).T2" >
<strong>BASE:T2(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function logic level 2.</p>
<p>Can be anywhere within the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).T3" >
<strong>BASE:T3(Arguments)</strong>
</a>
</dt>
<dd>
<p>Trace a function logic level 3.</p>
<p>Can be anywhere within the function logic.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).TraceClass" >
<strong>BASE:TraceClass(Class)</strong>
</a>
</dt>
<dd>
<p>Set tracing for a class</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Class </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).TraceClassMethod" >
<strong>BASE:TraceClassMethod(Class, Method)</strong>
</a>
</dt>
<dd>
<p>Set tracing for a specific method of class</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string Class </em></code>: </p>
</li>
<li>
<p><code><em>#string Method </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).TraceLevel" >
<strong>BASE:TraceLevel(Level)</strong>
</a>
</dt>
<dd>
<p>Set trace level</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Level </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).onEvent" >
<strong>BASE:onEvent(event)</strong>
</a>
</dt>
<dd>
<p> TODO: Complete DCSTypes#Event structure. <br/>
- The main event handling function... This function captures all events generated for the class.
@param #BASE self
@param DCSTypes#Event event</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> event </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(FORMATION)" >Type <code>FORMATION</code></a></h2>
<p>The Formation Class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(FORMATION).Cone" >
<strong>FORMATION.Cone</strong>
</a>
</dt>
<dd>
<p>A cone formation.</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,220 +0,0 @@
<!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>CARGO</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><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>CARGO</code></h1>
<p>CARGO Classes</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGO">CARGO</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGOS">CARGOS</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGO_GROUP">CARGO_GROUP</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGO_PACKAGE">CARGO_PACKAGE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGO_SLINGLOAD">CARGO_SLINGLOAD</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CARGO_ZONE">CARGO_ZONE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#CargoStatic">CargoStatic</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em></em>
<a id="CARGO" >
<strong>CARGO</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CARGOS" >
<strong>CARGOS</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CARGO_GROUP" >
<strong>CARGO_GROUP</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CARGO_PACKAGE" >
<strong>CARGO_PACKAGE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CARGO_SLINGLOAD" >
<strong>CARGO_SLINGLOAD</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CARGO_ZONE" >
<strong>CARGO_ZONE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="CargoStatic" >
<strong>CargoStatic</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(CARGO)" >Type <code>CARGO</code></a></h2>
</div>
</div>
</body>
</html>

View File

@@ -1,384 +0,0 @@
<!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>DEPLOYTASK</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>DEPLOYTASK</code></h1>
<p>A DEPLOYTASK orchestrates the deployment of CARGO within a specific landing zone.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DEPLOYTASK">DEPLOYTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DEPLOYTASK)" >Type <code>DEPLOYTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).AddCargoMenus">DEPLOYTASK:AddCargoMenus(Client, Cargos, TransportRadius)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).ClassName">DEPLOYTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).GoalVerb">DEPLOYTASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).InitCargo">DEPLOYTASK:InitCargo(InitCargos)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).LoadCargo">DEPLOYTASK:LoadCargo(LoadCargos)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).New">DEPLOYTASK.New(CargoType)</a></td>
<td class="summary">
<p>Creates a new DEPLOYTASK object, which models the sequence of STAGEs to unload a cargo.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).RemoveCargoMenus">DEPLOYTASK:RemoveCargoMenus(Client)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).SetCargoTargetZoneName">DEPLOYTASK.SetCargoTargetZoneName(string, self, TargetZoneName)</a></td>
<td class="summary">
<p>When the cargo is unloaded, it will move to the target zone name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).TEXT">DEPLOYTASK.TEXT</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DEPLOYTASK).ToZone">DEPLOYTASK:ToZone(LandingZone)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DEPLOYTASK)">#DEPLOYTASK</a></em>
<a id="DEPLOYTASK" >
<strong>DEPLOYTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(DEPLOYTASK)" >Type <code>DEPLOYTASK</code></a></h2>
<p>A DeployTask</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).AddCargoMenus" >
<strong>DEPLOYTASK:AddCargoMenus(Client, Cargos, TransportRadius)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Client </em></code>: </p>
</li>
<li>
<p><code><em> Cargos </em></code>: </p>
</li>
<li>
<p><code><em> TransportRadius </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DEPLOYTASK).ClassName" >
<strong>DEPLOYTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DEPLOYTASK).GoalVerb" >
<strong>DEPLOYTASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).InitCargo" >
<strong>DEPLOYTASK:InitCargo(InitCargos)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> InitCargos </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).LoadCargo" >
<strong>DEPLOYTASK:LoadCargo(LoadCargos)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> LoadCargos </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).New" >
<strong>DEPLOYTASK.New(CargoType)</strong>
</a>
</dt>
<dd>
<p>Creates a new DEPLOYTASK object, which models the sequence of STAGEs to unload a cargo.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string CargoType </em></code>:
Type of the Cargo.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DEPLOYTASK)">#DEPLOYTASK</a>:</em>
The created DeployTask</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).RemoveCargoMenus" >
<strong>DEPLOYTASK:RemoveCargoMenus(Client)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Client </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).SetCargoTargetZoneName" >
<strong>DEPLOYTASK.SetCargoTargetZoneName(string, self, TargetZoneName)</strong>
</a>
</dt>
<dd>
<p>When the cargo is unloaded, it will move to the target zone name.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> string </em></code>:
TargetZoneName Name of the Zone to where the Cargo should move after unloading.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> TargetZoneName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DEPLOYTASK).TEXT" >
<strong>DEPLOYTASK.TEXT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DEPLOYTASK).ToZone" >
<strong>DEPLOYTASK:ToZone(LandingZone)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> LandingZone </em></code>: </p>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,318 +0,0 @@
<!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>DESTROYBASETASK</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>DESTROYBASETASK</code></h1>
<p>A DESTROYBASETASK will monitor the destruction of Groups and Units.</p>
<p>This is a BASE class, other classes are derived from this class.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DESTROYBASETASK">DESTROYBASETASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DESTROYBASETASK)" >Type <code>DESTROYBASETASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).ClassName">DESTROYBASETASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).DestroyPercentage">DESTROYBASETASK.DestroyPercentage</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).Destroyed">DESTROYBASETASK.Destroyed</a></td>
<td class="summary">
</td>
</tr>
<tr>
<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>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).GoalVerb">DESTROYBASETASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<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>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYBASETASK).ReportGoalProgress">DESTROYBASETASK.ReportGoalProgress(DestroyGroup, DestroyUnit, self)</a></td>
<td class="summary">
<p>Validate task completeness of DESTROYBASETASK.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DESTROYBASETASK)">#DESTROYBASETASK</a></em>
<a id="DESTROYBASETASK" >
<strong>DESTROYBASETASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(DESTROYBASETASK)" >Type <code>DESTROYBASETASK</code></a></h2>
<p>The DESTROYBASETASK class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYBASETASK).ClassName" >
<strong>DESTROYBASETASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(DESTROYBASETASK).DestroyPercentage" >
<strong>DESTROYBASETASK.DestroyPercentage</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(DESTROYBASETASK).Destroyed" >
<strong>DESTROYBASETASK.Destroyed</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYBASETASK).EventDead" >
<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>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>:
structure of MOOSE.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYBASETASK).GoalVerb" >
<strong>DESTROYBASETASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYBASETASK).New" >
<strong>DESTROYBASETASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupPrefixes)</strong>
</a>
</dt>
<dd>
<p>Creates a new DESTROYBASETASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<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 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><a href="##(list)">#list</a> &lt; </em></code>:
string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed.</p>
</li>
<li>
<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>
</ul>
<h3>Return value</h3>
<p>DESTROYBASETASK</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYBASETASK).ReportGoalProgress" >
<strong>DESTROYBASETASK.ReportGoalProgress(DestroyGroup, DestroyUnit, self)</strong>
</a>
</dt>
<dd>
<p>Validate task completeness of DESTROYBASETASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> DestroyGroup </em></code>: </p>
<pre><code> Group structure describing the group to be evaluated.
</code></pre>
</li>
<li>
<p><code><em> DestroyUnit </em></code>: </p>
<pre><code> Unit structure describing the Unit to be evaluated.
</code></pre>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(list)" >Type <code>list</code></a></h2>
</div>
</div>
</body>
</html>

View File

@@ -1,240 +0,0 @@
<!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>DESTROYGROUPSTASK</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>DESTROYGROUPSTASK</code></h1>
<p>DESTROYGROUPSTASK</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DESTROYGROUPSTASK">DESTROYGROUPSTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DESTROYGROUPSTASK)" >Type <code>DESTROYGROUPSTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).ClassName">DESTROYGROUPSTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYGROUPSTASK).GoalVerb">DESTROYGROUPSTASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<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(DestroyGroup, DestroyUnit)</a></td>
<td class="summary">
<p>Report Goal Progress.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DESTROYGROUPSTASK)">#DESTROYGROUPSTASK</a></em>
<a id="DESTROYGROUPSTASK" >
<strong>DESTROYGROUPSTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(DESTROYGROUPSTASK)" >Type <code>DESTROYGROUPSTASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYGROUPSTASK).ClassName" >
<strong>DESTROYGROUPSTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYGROUPSTASK).GoalVerb" >
<strong>DESTROYGROUPSTASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYGROUPSTASK).New" >
<strong>DESTROYGROUPSTASK:New(DestroyGroupType, DestroyUnitType, <, DestroyPercentage, DestroyGroupNames)</strong>
</a>
</dt>
<dd>
<p>Creates a new DESTROYGROUPSTASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<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 DestroyUnitType </em></code>: </p>
<pre><code>String describing the unit to be destroyed.
</code></pre>
</li>
<li>
<p><code><em><a href="##(list)">#list</a> &lt; </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>#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> DestroyGroupNames </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYGROUPSTASK).ReportGoalProgress" >
<strong>DESTROYGROUPSTASK:ReportGoalProgress(DestroyGroup, DestroyUnit)</strong>
</a>
</dt>
<dd>
<p>Report Goal Progress.</p>
<h3>Parameters</h3>
<ul>
<li>
<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><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>
</body>
</html>

View File

@@ -1,237 +0,0 @@
<!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>DESTROYRADARSTASK</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>DESTROYRADARSTASK</code></h1>
<p>Task class to destroy radar installations.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DESTROYRADARSTASK">DESTROYRADARSTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DESTROYRADARSTASK)" >Type <code>DESTROYRADARSTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYRADARSTASK).ClassName">DESTROYRADARSTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYRADARSTASK).GoalVerb">DESTROYRADARSTASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYRADARSTASK).New">DESTROYRADARSTASK.New(table, self, DestroyGroupNames)</a></td>
<td class="summary">
<p>Creates a new DESTROYRADARSTASK.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYRADARSTASK).ReportGoalProgress">DESTROYRADARSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</a></td>
<td class="summary">
<p>Report Goal Progress.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DESTROYRADARSTASK)">#DESTROYRADARSTASK</a></em>
<a id="DESTROYRADARSTASK" >
<strong>DESTROYRADARSTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(DESTROYRADARSTASK)" >Type <code>DESTROYRADARSTASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYRADARSTASK).ClassName" >
<strong>DESTROYRADARSTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYRADARSTASK).GoalVerb" >
<strong>DESTROYRADARSTASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYRADARSTASK).New" >
<strong>DESTROYRADARSTASK.New(table, self, DestroyGroupNames)</strong>
</a>
</dt>
<dd>
<p>Creates a new DESTROYRADARSTASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> table </em></code>:
string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> DestroyGroupNames </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>DESTROYRADARSTASK</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYRADARSTASK).ReportGoalProgress" >
<strong>DESTROYRADARSTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</strong>
</a>
</dt>
<dd>
<p>Report Goal Progress.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Group </em></code>:
DestroyGroup 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>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,270 +0,0 @@
<!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>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>
<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>DESTROYUNITTYPESTASK</code></h1>
<p>Set TASK to destroy certain unit types.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#DESTROYUNITTYPESTASK">DESTROYUNITTYPESTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(DESTROYUNITTYPESTASK)" >Type <code>DESTROYUNITTYPESTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYUNITTYPESTASK).ClassName">DESTROYUNITTYPESTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYUNITTYPESTASK).GoalVerb">DESTROYUNITTYPESTASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYUNITTYPESTASK).New">DESTROYUNITTYPESTASK.New(string, string, table, string, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes)</a></td>
<td class="summary">
<p>Creates a new DESTROYUNITTYPESTASK.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESTROYUNITTYPESTASK).ReportGoalProgress">DESTROYUNITTYPESTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</a></td>
<td class="summary">
<p>Report Goal Progress.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(DESTROYUNITTYPESTASK)">#DESTROYUNITTYPESTASK</a></em>
<a id="DESTROYUNITTYPESTASK" >
<strong>DESTROYUNITTYPESTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(DESTROYUNITTYPESTASK)" >Type <code>DESTROYUNITTYPESTASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYUNITTYPESTASK).ClassName" >
<strong>DESTROYUNITTYPESTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(DESTROYUNITTYPESTASK).GoalVerb" >
<strong>DESTROYUNITTYPESTASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYUNITTYPESTASK).New" >
<strong>DESTROYUNITTYPESTASK.New(string, string, table, string, self, DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes)</strong>
</a>
</dt>
<dd>
<p>Creates a new DESTROYUNITTYPESTASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> string </em></code>:
DestroyGroupType String describing the group to be destroyed. f.e. "Radar Installations", "Fleet", "Batallion", "Command Centers".</p>
</li>
<li>
<p><code><em> string </em></code>:
DestroyUnitType String describing the unit to be destroyed. f.e. "radars", "ships", "tanks", "centers".</p>
</li>
<li>
<p><code><em> table </em></code>:
string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed.</p>
</li>
<li>
<p><code><em> string </em></code>:
DestroyUnitTypes Table of string containing the type names of the units to achieve mission success.</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> DestroyUnitTypes </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>DESTROYUNITTYPESTASK</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESTROYUNITTYPESTASK).ReportGoalProgress" >
<strong>DESTROYUNITTYPESTASK.ReportGoalProgress(Group, Unit, self, DestroyGroup, DestroyUnit)</strong>
</a>
</dt>
<dd>
<p>Report Goal Progress.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Group </em></code>:
DestroyGroup 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>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,168 +0,0 @@
<!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>GOHOMETASK</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>GOHOMETASK</code></h1>
<p>A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#GOHOMETASK">GOHOMETASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(GOHOMETASK)" >Type <code>GOHOMETASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(GOHOMETASK).ClassName">GOHOMETASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GOHOMETASK).New">GOHOMETASK.New(table, self, LandingZones)</a></td>
<td class="summary">
<p>Creates a new GOHOMETASK.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(GOHOMETASK)">#GOHOMETASK</a></em>
<a id="GOHOMETASK" >
<strong>GOHOMETASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(GOHOMETASK)" >Type <code>GOHOMETASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(GOHOMETASK).ClassName" >
<strong>GOHOMETASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GOHOMETASK).New" >
<strong>GOHOMETASK.New(table, self, LandingZones)</strong>
</a>
</dt>
<dd>
<p>Creates a new GOHOMETASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> table </em></code>:
string,...}|string LandingZones Table of Landing Zone names where Home(s) are located.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> LandingZones </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>GOHOMETASK</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,701 +0,0 @@
<!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>Menu</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>Menu</code></h1>
<p>Encapsulation of DCS World Menu system in a set of MENU classes.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#COMMANDMENU">COMMANDMENU</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU">MENU</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_CLIENT">MENU_CLIENT</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_CLIENT_COMMAND">MENU_CLIENT_COMMAND</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#SUBMENU">SUBMENU</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(COMMANDMENU)">Type <code>COMMANDMENU</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(COMMANDMENU).ClassName">COMMANDMENU.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COMMANDMENU).CommandMenuArgument">COMMANDMENU.CommandMenuArgument</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COMMANDMENU).CommandMenuFunction">COMMANDMENU.CommandMenuFunction</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COMMANDMENU).New">COMMANDMENU:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(MENU)">Type <code>MENU</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU).ClassName">MENU.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU).MenuParentPath">MENU.MenuParentPath</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU).MenuPath">MENU.MenuPath</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU).MenuText">MENU.MenuText</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU).New">MENU:New(MenuText, MenuParentPath)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(MENU_CLIENT)">Type <code>MENU_CLIENT</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).ClassName">MENU_CLIENT.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).New">MENU_CLIENT:New(MenuClient, MenuText, ParentMenu)</a></td>
<td class="summary">
<p>Creates a new menu item for a group</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).Remove">MENU_CLIENT:Remove()</a></td>
<td class="summary">
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).RemoveSubMenus">MENU_CLIENT:RemoveSubMenus()</a></td>
<td class="summary">
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_CLIENT_COMMAND)">Type <code>MENU_CLIENT_COMMAND</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).ClassName">MENU_CLIENT_COMMAND.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).New">MENU_CLIENT_COMMAND:New(MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</a></td>
<td class="summary">
<p>Creates a new radio command item for a group</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).Remove">MENU_CLIENT_COMMAND:Remove()</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(SUBMENU)">Type <code>SUBMENU</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(SUBMENU).ClassName">SUBMENU.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SUBMENU).New">SUBMENU:New(MenuText, ParentMenu)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(COMMANDMENU)">#COMMANDMENU</a></em>
<a id="COMMANDMENU" >
<strong>COMMANDMENU</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU)">#MENU</a></em>
<a id="MENU" >
<strong>MENU</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a></em>
<a id="MENU_CLIENT" >
<strong>MENU_CLIENT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_CLIENT_COMMAND)">#MENU_CLIENT_COMMAND</a></em>
<a id="MENU_CLIENT_COMMAND" >
<strong>MENU_CLIENT_COMMAND</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(SUBMENU)">#SUBMENU</a></em>
<a id="SUBMENU" >
<strong>SUBMENU</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Menu)" >Type <code>Menu</code></a></h2>
<h2><a id="#(COMMANDMENU)" >Type <code>COMMANDMENU</code></a></h2>
<p>The COMMANDMENU class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(COMMANDMENU).ClassName" >
<strong>COMMANDMENU.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COMMANDMENU).CommandMenuArgument" >
<strong>COMMANDMENU.CommandMenuArgument</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COMMANDMENU).CommandMenuFunction" >
<strong>COMMANDMENU.CommandMenuFunction</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COMMANDMENU).New" >
<strong>COMMANDMENU:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> ParentMenu </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuArgument </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(MENU)" >Type <code>MENU</code></a></h2>
<p>The MENU class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MENU).ClassName" >
<strong>MENU.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU).MenuParentPath" >
<strong>MENU.MenuParentPath</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU).MenuPath" >
<strong>MENU.MenuPath</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MENU).MenuText" >
<strong>MENU.MenuText</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU).New" >
<strong>MENU:New(MenuText, MenuParentPath)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> MenuParentPath </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(MENU_CLIENT)" >Type <code>MENU_CLIENT</code></a></h2>
<p>The MENU_CLIENT class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MENU_CLIENT).ClassName" >
<strong>MENU_CLIENT.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_CLIENT).New" >
<strong>MENU_CLIENT:New(MenuClient, MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<p>Creates a new menu item for a group</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Client.html##(CLIENT)">Client#CLIENT</a> MenuClient </em></code>:
The Client owning the menu.</p>
</li>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em>#table ParentMenu </em></code>:
The parent menu.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_CLIENT).Remove" >
<strong>MENU_CLIENT:Remove()</strong>
</a>
</dt>
<dd>
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
<h3>Return value</h3>
<p><em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_CLIENT).RemoveSubMenus" >
<strong>MENU_CLIENT:RemoveSubMenus()</strong>
</a>
</dt>
<dd>
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
<h3>Return value</h3>
<p><em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a>:</em>
self</p>
</dd>
</dl>
<h2><a id="#(MENU_CLIENT_COMMAND)" >Type <code>MENU_CLIENT_COMMAND</code></a></h2>
<p>The MENU<em>CLIENT</em>COMMAND class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(MENU_CLIENT_COMMAND).ClassName" >
<strong>MENU_CLIENT_COMMAND.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_CLIENT_COMMAND).New" >
<strong>MENU_CLIENT_COMMAND:New(MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)</strong>
</a>
</dt>
<dd>
<p>Creates a new radio command item for a group</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Client.html##(CLIENT)">Client#CLIENT</a> MenuClient </em></code>:
The Client owning the menu.</p>
</li>
<li>
<p><code><em> MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em> ParentMenu </em></code>:
The parent menu.</p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>:
A function that is called when the menu key is pressed.</p>
</li>
<li>
<p><code><em> CommandMenuArgument </em></code>:
An argument for the function.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Menu.html##(MENU_CLIENT_COMMAND)">Menu#MENU<em>CLIENT</em>COMMAND</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_CLIENT_COMMAND).Remove" >
<strong>MENU_CLIENT_COMMAND:Remove()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(SUBMENU)" >Type <code>SUBMENU</code></a></h2>
<p>The SUBMENU class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(SUBMENU).ClassName" >
<strong>SUBMENU.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SUBMENU).New" >
<strong>SUBMENU:New(MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> ParentMenu </em></code>: </p>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,147 +0,0 @@
<!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>NOTASK</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>NOTASK</code></h1>
<p>A NOTASK is a dummy activity...</p>
<p>But it will show a Mission Briefing...</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#NOTASK">NOTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(NOTASK)" >Type <code>NOTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(NOTASK).ClassName">NOTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(NOTASK).New">NOTASK:New()</a></td>
<td class="summary">
<p>Creates a new NOTASK.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(NOTASK)">#NOTASK</a></em>
<a id="NOTASK" >
<strong>NOTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(NOTASK)" >Type <code>NOTASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(NOTASK).ClassName" >
<strong>NOTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(NOTASK).New" >
<strong>NOTASK:New()</strong>
</a>
</dt>
<dd>
<p>Creates a new NOTASK.</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,392 +0,0 @@
<!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>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>
<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>PICKUPTASK</code></h1>
<p>A PICKUPTASK orchestrates the loading of CARGO at a specific landing zone.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#PICKUPTASK">PICKUPTASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(PICKUPTASK)" >Type <code>PICKUPTASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).AddCargoMenus">PICKUPTASK:AddCargoMenus(Client, Cargos, TransportRadius)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).ClassName">PICKUPTASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).FromZone">PICKUPTASK:FromZone(LandingZone)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).GoalVerb">PICKUPTASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).HasFailed">PICKUPTASK:HasFailed(ClientDead)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).InitCargo">PICKUPTASK:InitCargo(InitCargos)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).LoadCargo">PICKUPTASK:LoadCargo(LoadCargos)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).New">PICKUPTASK.New(table, CARGO_TYPE, number, self, CargoType, OnBoardSide)</a></td>
<td class="summary">
<p>Creates a new PICKUPTASK.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).RemoveCargoMenus">PICKUPTASK:RemoveCargoMenus(Client)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(PICKUPTASK).TEXT">PICKUPTASK.TEXT</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(PICKUPTASK)">#PICKUPTASK</a></em>
<a id="PICKUPTASK" >
<strong>PICKUPTASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(PICKUPTASK)" >Type <code>PICKUPTASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).AddCargoMenus" >
<strong>PICKUPTASK:AddCargoMenus(Client, Cargos, TransportRadius)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Client </em></code>: </p>
</li>
<li>
<p><code><em> Cargos </em></code>: </p>
</li>
<li>
<p><code><em> TransportRadius </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(PICKUPTASK).ClassName" >
<strong>PICKUPTASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).FromZone" >
<strong>PICKUPTASK:FromZone(LandingZone)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> LandingZone </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(PICKUPTASK).GoalVerb" >
<strong>PICKUPTASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).HasFailed" >
<strong>PICKUPTASK:HasFailed(ClientDead)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ClientDead </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).InitCargo" >
<strong>PICKUPTASK:InitCargo(InitCargos)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> InitCargos </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).LoadCargo" >
<strong>PICKUPTASK:LoadCargo(LoadCargos)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> LoadCargos </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).New" >
<strong>PICKUPTASK.New(table, CARGO_TYPE, number, self, CargoType, OnBoardSide)</strong>
</a>
</dt>
<dd>
<p>Creates a new PICKUPTASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> table </em></code>:
string,...}|string LandingZones Table of Zone names where Cargo is to be loaded.</p>
</li>
<li>
<p><code><em> CARGO_TYPE </em></code>:
CargoType Type of the Cargo. The type must be of the following Enumeration:..</p>
</li>
<li>
<p><code><em> number </em></code>:
OnBoardSide Reflects from which side the cargo Group will be on-boarded on the Carrier.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> CargoType </em></code>: </p>
</li>
<li>
<p><code><em> OnBoardSide </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(PICKUPTASK).RemoveCargoMenus" >
<strong>PICKUPTASK:RemoveCargoMenus(Client)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Client </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(PICKUPTASK).TEXT" >
<strong>PICKUPTASK.TEXT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,199 +0,0 @@
<!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>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>
<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>ROUTETASK</code></h1>
<p>A ROUTETASK orchestrates the travel to a specific zone defined within the ME.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#ROUTETASK">ROUTETASK</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(ROUTETASK)" >Type <code>ROUTETASK</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTETASK).ClassName">ROUTETASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTETASK).GoalVerb">ROUTETASK.GoalVerb</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ROUTETASK).New">ROUTETASK.New(table, string, self, LandingZones, TaskBriefing)</a></td>
<td class="summary">
<p>Creates a new ROUTETASK.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(ROUTETASK)">#ROUTETASK</a></em>
<a id="ROUTETASK" >
<strong>ROUTETASK</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(ROUTETASK)" >Type <code>ROUTETASK</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(ROUTETASK).ClassName" >
<strong>ROUTETASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(ROUTETASK).GoalVerb" >
<strong>ROUTETASK.GoalVerb</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ROUTETASK).New" >
<strong>ROUTETASK.New(table, string, self, LandingZones, TaskBriefing)</strong>
</a>
</dt>
<dd>
<p>Creates a new ROUTETASK.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> table </em></code>:
sring,...}|string LandingZones Table of Zone Names where the target is located.</p>
</li>
<li>
<p><code><em> string </em></code>:
TaskBriefing (optional) Defines a text describing the briefing of the task.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> LandingZones </em></code>: </p>
</li>
<li>
<p><code><em> TaskBriefing </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p>ROUTETASK</p>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,819 +0,0 @@
<!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>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>
<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>STAGE</code></h1>
<p>Stages within a <a href="TASK.html">TASK</a> within a <a href="MISSION.html">MISSION</a>.</p>
<p>All of the STAGE functionality is considered internally administered and not to be used by any Mission designer.</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#CargoStatic">CargoStatic</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGE">STAGE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEARRIVE">STAGEARRIVE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEBRIEF">STAGEBRIEF</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEDONE">STAGEDONE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEGROUPSDESTROYED">STAGEGROUPSDESTROYED</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGELANDED">STAGELANDED</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGELANDING">STAGELANDING</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGELOAD">STAGELOAD</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEROUTE">STAGEROUTE</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGESTART">STAGESTART</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGEUNLOAD">STAGEUNLOAD</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGE_CARGO_INIT">STAGE_CARGO_INIT</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#STAGE_CARGO_LOAD">STAGE_CARGO_LOAD</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#_TransportStage">_TransportStage</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#_TransportStageAction">_TransportStageAction</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#_TransportStageTime">_TransportStageTime</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(STAGE)" >Type <code>STAGE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).ClassName">STAGE.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).Execute">STAGE:Execute(Mission, Client, Task)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).Executing">STAGE:Executing(Mission, Client, Task)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).FREQUENCY">STAGE.FREQUENCY</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).Frequency">STAGE.Frequency</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MSG">STAGE.MSG</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MessageCount">STAGE.MessageCount</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MessageFlash">STAGE.MessageFlash</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MessageInterval">STAGE.MessageInterval</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MessageShow">STAGE.MessageShow</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).MessageShown">STAGE.MessageShown</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).Name">STAGE.Name</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).New">STAGE:New()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).StageType">STAGE.StageType</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).Validate">STAGE:Validate(Mission, Client, Task)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(STAGE).WaitTime">STAGE.WaitTime</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em></em>
<a id="CargoStatic" >
<strong>CargoStatic</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(STAGE)">#STAGE</a></em>
<a id="STAGE" >
<strong>STAGE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEARRIVE" >
<strong>STAGEARRIVE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEBRIEF" >
<strong>STAGEBRIEF</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEDONE" >
<strong>STAGEDONE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEGROUPSDESTROYED" >
<strong>STAGEGROUPSDESTROYED</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGELANDED" >
<strong>STAGELANDED</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGELANDING" >
<strong>STAGELANDING</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGELOAD" >
<strong>STAGELOAD</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEROUTE" >
<strong>STAGEROUTE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGESTART" >
<strong>STAGESTART</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGEUNLOAD" >
<strong>STAGEUNLOAD</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGE_CARGO_INIT" >
<strong>STAGE_CARGO_INIT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="STAGE_CARGO_LOAD" >
<strong>STAGE_CARGO_LOAD</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="_TransportStage" >
<strong>_TransportStage</strong>
</a>
</dt>
<dd>
<p> _TransportStage: Defines the different stages of which of transport missions can be in. This table is internal and is used to control the sequence of messages, actions and flow.</p>
<ul>
<li>_TransportStage.START</li>
<li>_TransportStage.ROUTE</li>
<li>_TransportStage.LAND</li>
<li>_TransportStage.EXECUTE</li>
<li>_TransportStage.DONE</li>
<li>_TransportStage.REMOVE
--</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="_TransportStageAction" >
<strong>_TransportStageAction</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="_TransportStageTime" >
<strong>_TransportStageTime</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(STAGE)" >Type <code>STAGE</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(STAGE).ClassName" >
<strong>STAGE.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(STAGE).Execute" >
<strong>STAGE:Execute(Mission, Client, Task)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Mission </em></code>: </p>
</li>
<li>
<p><code><em> Client </em></code>: </p>
</li>
<li>
<p><code><em> Task </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(STAGE).Executing" >
<strong>STAGE:Executing(Mission, Client, Task)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Mission </em></code>: </p>
</li>
<li>
<p><code><em> Client </em></code>: </p>
</li>
<li>
<p><code><em> Task </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(STAGE).FREQUENCY" >
<strong>STAGE.FREQUENCY</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(STAGE).Frequency" >
<strong>STAGE.Frequency</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(STAGE).MSG" >
<strong>STAGE.MSG</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(STAGE).MessageCount" >
<strong>STAGE.MessageCount</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(STAGE).MessageFlash" >
<strong>STAGE.MessageFlash</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(STAGE).MessageInterval" >
<strong>STAGE.MessageInterval</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#boolean</em>
<a id="#(STAGE).MessageShow" >
<strong>STAGE.MessageShow</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(STAGE).MessageShown" >
<strong>STAGE.MessageShown</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(STAGE).Name" >
<strong>STAGE.Name</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(STAGE).New" >
<strong>STAGE:New()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(STAGE).StageType" >
<strong>STAGE.StageType</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(STAGE).Validate" >
<strong>STAGE:Validate(Mission, Client, Task)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Mission </em></code>: </p>
</li>
<li>
<p><code><em> Client </em></code>: </p>
</li>
<li>
<p><code><em> Task </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(STAGE).WaitTime" >
<strong>STAGE.WaitTime</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(STAGEARRIVE)" >Type <code>STAGEARRIVE</code></a></h2>
<h2><a id="#(STAGELANDING)" >Type <code>STAGELANDING</code></a></h2>
<h2><a id="#(STAGEROUTE)" >Type <code>STAGEROUTE</code></a></h2>
<h2><a id="#(STAGEUNLOAD)" >Type <code>STAGEUNLOAD</code></a></h2>
</div>
</div>
</body>
</html>

View File

@@ -1,791 +0,0 @@
<!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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,887 +0,0 @@
<!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><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>Unit</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>Unit</code></h1>
<p>UNIT Classes</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#UNIT">UNIT</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(UNIT)">Type <code>UNIT</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).CategoryName">UNIT.CategoryName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).ClassName">UNIT.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).Flare">UNIT:Flare(FlareColor)</a></td>
<td class="summary">
<p>Signal a flare at the position of the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareColor">UNIT.FlareColor</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareGreen">UNIT:FlareGreen()</a></td>
<td class="summary">
<p>Signal a green flare at the position of the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareRed">UNIT:FlareRed()</a></td>
<td class="summary">
<p>Signal a red flare at the position of the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareWhite">UNIT:FlareWhite()</a></td>
<td class="summary">
<p>Signal a white flare at the position of the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).FlareYellow">UNIT:FlareYellow()</a></td>
<td class="summary">
<p>Signal a yellow flare at the position of the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetCallSign">UNIT:GetCallSign()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetCategoryName">UNIT:GetCategoryName()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetDCSUnit">UNIT:GetDCSUnit()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetID">UNIT:GetID()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetName">UNIT:GetName()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPointVec2">UNIT:GetPointVec2()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPositionVec3">UNIT:GetPositionVec3()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetPrefix">UNIT:GetPrefix()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).GetTypeName">UNIT:GetTypeName()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsAir">UNIT:IsAir()</a></td>
<td class="summary">
<p>Returns if the unit is of an air category.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsAlive">UNIT:IsAlive()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).New">UNIT:New(DCSUnit)</a></td>
<td class="summary">
<p>Create a new UNIT from DCSUnit.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).OtherUnitInRadius">UNIT:OtherUnitInRadius(AwaitUnit, Radius)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).Smoke">UNIT:Smoke(SmokeColor)</a></td>
<td class="summary">
<p>Smoke the UNIT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeBlue">UNIT:SmokeBlue()</a></td>
<td class="summary">
<p>Smoke the UNIT Blue.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeColor">UNIT.SmokeColor</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeGreen">UNIT:SmokeGreen()</a></td>
<td class="summary">
<p>Smoke the UNIT Green.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeOrange">UNIT:SmokeOrange()</a></td>
<td class="summary">
<p>Smoke the UNIT Orange.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeRed">UNIT:SmokeRed()</a></td>
<td class="summary">
<p>Smoke the UNIT Red.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).SmokeWhite">UNIT:SmokeWhite()</a></td>
<td class="summary">
<p>Smoke the UNIT White.</p>
</td>
</tr>
</table>
<h2><a id="#(UNIT.FlareColor)">Type <code>UNIT.FlareColor</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.FlareColor).Green">UNIT.FlareColor.Green</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.FlareColor).Red">UNIT.FlareColor.Red</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.FlareColor).White">UNIT.FlareColor.White</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.FlareColor).Yellow">UNIT.FlareColor.Yellow</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(UNIT.SmokeColor)">Type <code>UNIT.SmokeColor</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.SmokeColor).Blue">UNIT.SmokeColor.Blue</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.SmokeColor).Green">UNIT.SmokeColor.Green</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.SmokeColor).Orange">UNIT.SmokeColor.Orange</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.SmokeColor).Red">UNIT.SmokeColor.Red</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT.SmokeColor).White">UNIT.SmokeColor.White</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(UNIT)">#UNIT</a></em>
<a id="UNIT" >
<strong>UNIT</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Unit)" >Type <code>Unit</code></a></h2>
<h2><a id="#(UNIT)" >Type <code>UNIT</code></a></h2>
<p>The UNIT class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em></em>
<a id="#(UNIT).CategoryName" >
<strong>UNIT.CategoryName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(UNIT).ClassName" >
<strong>UNIT.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).Flare" >
<strong>UNIT:Flare(FlareColor)</strong>
</a>
</dt>
<dd>
<p>Signal a flare at the position of the UNIT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> FlareColor </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(UNIT.FlareColor)">#UNIT.FlareColor</a></em>
<a id="#(UNIT).FlareColor" >
<strong>UNIT.FlareColor</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).FlareGreen" >
<strong>UNIT:FlareGreen()</strong>
</a>
</dt>
<dd>
<p>Signal a green flare at the position of the UNIT.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).FlareRed" >
<strong>UNIT:FlareRed()</strong>
</a>
</dt>
<dd>
<p>Signal a red flare at the position of the UNIT.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).FlareWhite" >
<strong>UNIT:FlareWhite()</strong>
</a>
</dt>
<dd>
<p>Signal a white flare at the position of the UNIT.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).FlareYellow" >
<strong>UNIT:FlareYellow()</strong>
</a>
</dt>
<dd>
<p>Signal a yellow flare at the position of the UNIT.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetCallSign" >
<strong>UNIT:GetCallSign()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetCategoryName" >
<strong>UNIT:GetCategoryName()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetDCSUnit" >
<strong>UNIT:GetDCSUnit()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetID" >
<strong>UNIT:GetID()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetName" >
<strong>UNIT:GetName()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetPointVec2" >
<strong>UNIT:GetPointVec2()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetPositionVec3" >
<strong>UNIT:GetPositionVec3()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetPrefix" >
<strong>UNIT:GetPrefix()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).GetTypeName" >
<strong>UNIT:GetTypeName()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).IsAir" >
<strong>UNIT:IsAir()</strong>
</a>
</dt>
<dd>
<p>Returns if the unit is of an air category.</p>
<p>If the unit is a helicopter or a plane, then this method will return true, otherwise false.</p>
<h3>Return value</h3>
<p><em>#boolean:</em>
Air category evaluation result.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).IsAlive" >
<strong>UNIT:IsAlive()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).New" >
<strong>UNIT:New(DCSUnit)</strong>
</a>
</dt>
<dd>
<p>Create a new UNIT from DCSUnit.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="DCSUnit.html##(Unit)">DCSUnit#Unit</a> DCSUnit </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Unit.html##(UNIT)">Unit#UNIT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).OtherUnitInRadius" >
<strong>UNIT:OtherUnitInRadius(AwaitUnit, Radius)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> AwaitUnit </em></code>: </p>
</li>
<li>
<p><code><em> Radius </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).Smoke" >
<strong>UNIT:Smoke(SmokeColor)</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> SmokeColor </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).SmokeBlue" >
<strong>UNIT:SmokeBlue()</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT Blue.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(UNIT.SmokeColor)">#UNIT.SmokeColor</a></em>
<a id="#(UNIT).SmokeColor" >
<strong>UNIT.SmokeColor</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).SmokeGreen" >
<strong>UNIT:SmokeGreen()</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT Green.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).SmokeOrange" >
<strong>UNIT:SmokeOrange()</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT Orange.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).SmokeRed" >
<strong>UNIT:SmokeRed()</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT Red.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).SmokeWhite" >
<strong>UNIT:SmokeWhite()</strong>
</a>
</dt>
<dd>
<p>Smoke the UNIT White.</p>
</dd>
</dl>
<h2><a id="#(UNIT.FlareColor)" >Type <code>UNIT.FlareColor</code></a></h2>
<p>FlareColor</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(UNIT.FlareColor).Green" >
<strong>UNIT.FlareColor.Green</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.FlareColor).Red" >
<strong>UNIT.FlareColor.Red</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.FlareColor).White" >
<strong>UNIT.FlareColor.White</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.FlareColor).Yellow" >
<strong>UNIT.FlareColor.Yellow</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(UNIT.SmokeColor)" >Type <code>UNIT.SmokeColor</code></a></h2>
<p>SmokeColor</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(UNIT.SmokeColor).Blue" >
<strong>UNIT.SmokeColor.Blue</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.SmokeColor).Green" >
<strong>UNIT.SmokeColor.Green</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.SmokeColor).Orange" >
<strong>UNIT.SmokeColor.Orange</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.SmokeColor).Red" >
<strong>UNIT.SmokeColor.Red</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT.SmokeColor).White" >
<strong>UNIT.SmokeColor.White</strong>
</a>
</dt>
<dd>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,214 +0,0 @@
<!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><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>Zone</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>Zone</code></h1>
<p>ZONE Classes</p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#ZONE">ZONE</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(ZONE)">Type <code>ZONE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE).ClassName">ZONE.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE).GetPointVec2">ZONE:GetPointVec2()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE).GetRadius">ZONE:GetRadius()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE).GetRandomPointVec2">ZONE:GetRandomPointVec2()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(ZONE).New">ZONE:New(ZoneName)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(ZONE)">#ZONE</a></em>
<a id="ZONE" >
<strong>ZONE</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(Zone)" >Type <code>Zone</code></a></h2>
<h2><a id="#(ZONE)" >Type <code>ZONE</code></a></h2>
<p>The ZONE class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(ZONE).ClassName" >
<strong>ZONE.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE).GetPointVec2" >
<strong>ZONE:GetPointVec2()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE).GetRadius" >
<strong>ZONE:GetRadius()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE).GetRandomPointVec2" >
<strong>ZONE:GetRandomPointVec2()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(ZONE).New" >
<strong>ZONE:New(ZoneName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> ZoneName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
</div>
</div>
</body>
</html>

View File

@@ -1,100 +0,0 @@
<!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><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>env</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>env</code></h1>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#env">env</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(env)">#env</a></em>
<a id="env" >
<strong>env</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(env)" >Type <code>env</code></a></h2>
</div>
</div>
</body>
</html>

View File

@@ -1,331 +0,0 @@
<!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>
index
</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><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">
<h2>Module</h2>
<table class="module_list">
<tr>
<td class="name" nowrap="nowrap"><a href="Base.html">Base</a></td>
<td class="summary">
<p>BASE classes.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="CARGO.html">CARGO</a></td>
<td class="summary">
<p>CARGO Classes</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="CleanUp.html">CleanUp</a></td>
<td class="summary">
<p>The CLEANUP class keeps an area clean of crashing or colliding airplanes.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Client.html">Client</a></td>
<td class="summary">
<p>The CLIENT models client units in multi player missions.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSAirbase.html">DCSAirbase</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSCommand.html">DCSCommand</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSController.html">DCSController</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSGroup.html">DCSGroup</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSObject.html">DCSObject</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSTask.html">DCSTask</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DCSTypes.html">DCSTypes</a></td>
<td class="summary">
</td>
</tr>
<tr>
<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>
<td class="name" nowrap="nowrap"><a href="DCStimer.html">DCStimer</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DEPLOYTASK.html">DEPLOYTASK</a></td>
<td class="summary">
<p>A DEPLOYTASK orchestrates the deployment of CARGO within a specific landing zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></td>
<td class="summary">
<p>A DESTROYBASETASK will monitor the destruction of Groups and Units.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></td>
<td class="summary">
<p>DESTROYGROUPSTASK</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></td>
<td class="summary">
<p>Task class to destroy radar installations.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></td>
<td class="summary">
<p>Set TASK to destroy certain unit types.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Database.html">Database</a></td>
<td class="summary">
<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>
<td class="name" nowrap="nowrap"><a href="GOHOMETASK.html">GOHOMETASK</a></td>
<td class="summary">
<p>A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Group.html">Group</a></td>
<td class="summary">
<p>A GROUP class abstraction of a DCSGroup class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="MISSION.html">MISSION</a></td>
<td class="summary">
<p>A MISSION is the main owner of a Mission orchestration within MOOSE .</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="MOVEMENT.html">MOVEMENT</a></td>
<td class="summary">
<p>Limit the simultaneous movement of Groups within a running Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Menu.html">Menu</a></td>
<td class="summary">
<p>Encapsulation of DCS World Menu system in a set of MENU classes.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Message.html">Message</a></td>
<td class="summary">
<p>Message System to display Messages for Clients and Coalitions or All.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="NOTASK.html">NOTASK</a></td>
<td class="summary">
<p>A NOTASK is a dummy activity...</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="PICKUPTASK.html">PICKUPTASK</a></td>
<td class="summary">
<p>A PICKUPTASK orchestrates the loading of CARGO at a specific landing zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="ROUTETASK.html">ROUTETASK</a></td>
<td class="summary">
<p>A ROUTETASK orchestrates the travel to a specific zone defined within the ME.</p>
</td>
</tr>
<tr>
<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>
<td class="name" nowrap="nowrap"><a href="Sead.html">Sead</a></td>
<td class="summary">
<p>Provides defensive behaviour to a set of SAM sites within a running Mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Spawn.html">Spawn</a></td>
<td class="summary">
<p>Dynamic spawning of groups (and units).</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="StaticObject.html">StaticObject</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="TASK.html">TASK</a></td>
<td class="summary">
<p>The TASK Classes define major end-to-end activities within a MISSION.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Unit.html">Unit</a></td>
<td class="summary">
<p>UNIT Classes</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="Zone.html">Zone</a></td>
<td class="summary">
<p>ZONE Classes</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="env.html">env</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="land.html">land</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="routines.html">routines</a></td>
<td class="summary">
<p>Various routines</p>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

View File

@@ -1,32 +0,0 @@
del Moose_Embedded.lua
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

674
LICENSE Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Binary file not shown.

Binary file not shown.

View File

@@ -1,31 +0,0 @@
rem Generate Moose_Embedded.lua
copy Trace.lua ^
+ Routines.lua ^
+ Base.lua ^
+ Menu.lua ^
+ Group.lua ^
+ Unit.lua ^
+ Zone.lua ^
+ Database.lua ^
+ Cargo.lua ^
+ Client.lua ^
+ Message.lua ^
+ Stage.lua ^
+ Task.lua ^
+ GoHomeTask.lua ^
+ DestroyBaseTask.lua ^
+ DestroyGroupsTask.lua ^
+ DestroyRadarsTask.lua ^
+ DestroyUnitTypesTask.lua ^
+ PickupTask.lua ^
+ DeployTask.lua ^
+ NoTask.lua ^
+ RouteTask.lua ^
+ Mission.lua ^
+ CleanUp.lua ^
+ Spawn.lua ^
+ Movement.lua ^
+ Sead.lua ^
Moose_Embedded.lua

View File

@@ -1,43 +0,0 @@
local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() )
Include = {}
Include.Path = function()
local str = debug.getinfo(2, "S").source
return str:match("(.*/)"):sub(1,-2):gsub("\\","/")
end
Include.File = function( IncludeFile )
if not Include.Files[ IncludeFile ] then
Include.Files[IncludeFile] = IncludeFile
env.info( "Include:" .. IncludeFile .. " from " .. Include.ProgramPath )
local f = assert( base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" ) )
if f == nil then
env.info( "Include:" .. IncludeFile .. " from " .. Include.MissionPath )
local f = assert( base.loadfile( Include.MissionPath .. IncludeFile .. ".lua" ) )
if f == nil then
error ("Could not load MOOSE file " .. IncludeFile .. ".lua" )
else
env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.MissionPath )
return f()
end
else
env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.ProgramPath )
return f()
end
end
end
Include.ProgramPath = "Scripts/Moose/"
Include.MissionPath = Include.Path()
env.info( "Include.ProgramPath = " .. Include.ProgramPath)
env.info( "Include.MissionPath = " .. Include.MissionPath)
Include.Files = {}
Include.File( "Moose" )
env.info("Loaded MOOSE Include Engine")

View File

@@ -1,25 +0,0 @@
local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() )
Include = {}
Include.Path = function()
local str = debug.getinfo(2, "S").source
return str:match("(.*/)"):sub(1,-2):gsub("\\","/")
end
Include.File = function( IncludeFile )
end
Include.ProgramPath = "Scripts/Moose/Moose/"
Include.MissionPath = Include.Path()
env.info( "Include.ProgramPath = " .. Include.ProgramPath)
env.info( "Include.MissionPath = " .. Include.MissionPath)
Include.Files = {}
Include.File( "Moose" )
env.info("Loaded MOOSE Include Engine")

View File

@@ -1,37 +0,0 @@
--Initialization script for the Mission lua Environment (SSE)
dofile('Scripts/ScriptingSystem.lua')
Include = {}
Include.LoadPath = 'Scripts/MOOSE'
Include.Files = {}
Include.File = function( IncludeFile )
if not Include.Files[ IncludeFile ] then
Include.Files[IncludeFile] = IncludeFile
dofile( Include.LoadPath .. "/" .. IncludeFile .. ".lua" )
env.info( "Include:" .. IncludeFile .. " loaded." )
end
end
Include.File( "Database" )
--Include.File( "StatHandler" )
--Sanitize Mission Scripting environment
--This makes unavailable some unsecure functions.
--Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions.
--You can remove the code below and make availble these functions at your own risk.
local function sanitizeModule(name)
_G[name] = nil
package.loaded[name] = nil
end
do
--sanitizeModule('os')
--sanitizeModule('io')
sanitizeModule('lfs')
require = nil
loadlib = nil
end

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/Utils/GenerateDocumentations.bat}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework/Utils}"/>
</launchConfiguration>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/Utils/luarocks/lua5.1.exe}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose_Create.lua&quot; &#13;&#10;&quot;D&quot;&#13;&#10;&quot;${current_date}&quot; &#13;&#10;&quot;${workspace_loc:/Moose_Framework//Moose Development/Moose}&quot; &#13;&#10;&quot;${workspace_loc:/Moose_Framework/Moose Mission Setup}&quot;"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework/Moose Mission Setup}"/>
</launchConfiguration>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/Utils/luarocks/lua5.1.exe}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose_Create.lua&quot; &#13;&#10;&quot;S&quot;&#13;&#10;&quot;${current_date}&quot; &#13;&#10;&quot;${workspace_loc:/Moose_Framework//Moose Development/Moose}&quot; &#13;&#10;&quot;${workspace_loc:/Moose_Framework/Moose Mission Setup}&quot;"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework/Moose Mission Setup}"/>
</launchConfiguration>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/Moose Mission Setup/Moose Mission Update/Moose_Update_Missions.bat}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Missions}"/>
</launchConfiguration>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/Moose Mission Setup/Moose Mission Update/Moose_Update_Missions.bat}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;${selected_resource_loc}&quot;"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework/Moose Mission Setup/Moose Mission Update}"/>
</launchConfiguration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,674 @@
--- **AI** -- **Provide Battlefield Air Interdiction (bombing).**
--
-- ![Banner Image](..\Presentations\AI_BAI\Dia1.JPG)
--
-- ===
--
-- AI_BAI classes makes AI Controllables execute bombing tasks.
--
-- There are the following types of BAI classes defined:
--
-- * @{#AI_BAI_ZONE}: Perform a BAI in a zone.
--
-- ====
--
-- # Demo Missions
--
-- ### [AI_BAI Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/BOMB%20-%20Close%20Air%20Support)
--
-- ### [AI_BAI Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/BOMB%20-%20Close%20Air%20Support)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [AI_BAI YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2)
--
-- ===
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- 2017-01-15: Initial class and API.
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision.
--
-- ### Authors:
--
-- * **FlightControl**: Concept, Design & Programming.
--
-- @module AI_Bai
--- AI_BAI_ZONE class
-- @type AI_BAI_ZONE
-- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling.
-- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed.
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
--- # AI_BAI_ZONE class, extends @{AI_Patrol#AI_PATROL_ZONE}
--
-- AI_BAI_ZONE derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour.
--
-- The AI_BAI_ZONE class implements the core functions to provide BattleGround Air Interdiction in an Engage @{Zone} by an AIR @{Controllable} or @{Group}.
-- The AI_BAI_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.
--
-- ![HoldAndEngage](..\Presentations\AI_BAI\Dia3.JPG)
--
-- The AI_BAI_ZONE is assigned a @{Group} and this must be done before the AI_BAI_ZONE process can be started through the **Start** event.
--
-- ![Start Event](..\Presentations\AI_BAI\Dia4.JPG)
--
-- Upon started, The AI will **Route** itself towards the random 3D point within a patrol zone,
-- using a random speed within the given altitude and speed limits.
-- Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
-- This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
--
-- ![Route Event](..\Presentations\AI_BAI\Dia5.JPG)
--
-- When the AI is commanded to provide BattleGround Air Interdiction (through the event **Engage**), the AI will fly towards the Engage Zone.
-- Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia6.JPG)
--
-- The AI will detect the targets and will only destroy the targets within the Engage Zone.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia7.JPG)
--
-- Every target that is destroyed, is reported< by the AI.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia8.JPG)
--
-- Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia9.JPG)
--
-- Until it is notified through the event **Accomplish**, which is to be triggered by an observing party:
--
-- * a FAC
-- * a timed event
-- * a menu option selected by a human
-- * a condition
-- * others ...
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia10.JPG)
--
-- When the AI has accomplished the Bombing, it will fly back to the Patrol Zone.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia11.JPG)
--
-- It will keep patrolling there, until it is notified to RTB or move to another BOMB Zone.
-- It can be notified to go RTB through the **RTB** event.
--
-- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Engage Event](..\Presentations\AI_BAI\Dia12.JPG)
--
-- # 1. AI_BAI_ZONE constructor
--
-- * @{#AI_BAI_ZONE.New}(): Creates a new AI_BAI_ZONE object.
--
-- ## 2. AI_BAI_ZONE is a FSM
--
-- ![Process](..\Presentations\AI_BAI\Dia2.JPG)
--
-- ### 2.1. AI_BAI_ZONE States
--
-- * **None** ( Group ): The process is not started yet.
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
-- * **Engaging** ( Group ): The AI is engaging the targets in the Engage Zone, executing BOMB.
-- * **Returning** ( Group ): The AI is returning to Base..
--
-- ### 2.2. AI_BAI_ZONE Events
--
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
-- * **@{#AI_BAI_ZONE.Engage}**: Engage the AI to provide BOMB in the Engage Zone, destroying any target it finds.
-- * **@{#AI_BAI_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
-- * **@{#AI_BAI_ZONE.Destroy}**: The AI has destroyed a target @{Unit}.
-- * **@{#AI_BAI_ZONE.Destroyed}**: The AI has destroyed all target @{Unit}s assigned in the BOMB task.
-- * **Status**: The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
--
-- ## 3. Modify the Engage Zone behaviour to pinpoint a **map object** or **scenery object**
--
-- Use the method @{#AI_BAI_ZONE.SearchOff}() to specify that the EngageZone is not to be searched for potential targets (UNITs), but that the center of the zone
-- is the point where a map object is to be destroyed (like a bridge).
--
-- Example:
--
-- -- Tell the BAI not to search for potential targets in the BAIEngagementZone, but rather use the center of the BAIEngagementZone as the bombing location.
-- AIBAIZone:SearchOff()
--
-- Searching can be switched back on with the method @{#AI_BAI_ZONE.SearchOn}(). Use the method @{#AI_BAI_ZONE.SearchOnOff}() to flexibily switch searching on or off.
--
-- ===
--
-- @field #AI_BAI_ZONE
AI_BAI_ZONE = {
ClassName = "AI_BAI_ZONE",
}
--- Creates a new AI_BAI_ZONE object
-- @param #AI_BAI_ZONE self
-- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed.
-- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @param Core.Zone#ZONE_BASE EngageZone The zone where the engage will happen.
-- @param Dcs.DCSTypes#AltitudeType PatrolAltType The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO
-- @return #AI_BAI_ZONE self
function AI_BAI_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType )
-- Inherits from BASE
local self = BASE:Inherit( self, AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) ) -- #AI_BAI_ZONE
self.EngageZone = EngageZone
self.Accomplished = false
self:SetDetectionZone( self.EngageZone )
self:SearchOn()
self:AddTransition( { "Patrolling", "Engaging" }, "Engage", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
--- OnBefore Transition Handler for Event Engage.
-- @function [parent=#AI_BAI_ZONE] OnBeforeEngage
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Engage.
-- @function [parent=#AI_BAI_ZONE] OnAfterEngage
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Engage.
-- @function [parent=#AI_BAI_ZONE] Engage
-- @param #AI_BAI_ZONE self
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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.
-- Use the structure @{DCSTypes#AI.Task.WeaponExpend} to define the amount of weapons to be release at each attack.
-- @param #number EngageAttackQty (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 EngageDirection (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.
--- Asynchronous Event Trigger for Event Engage.
-- @function [parent=#AI_BAI_ZONE] __Engage
-- @param #AI_BAI_ZONE self
-- @param #number Delay The delay in seconds.
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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.
-- Use the structure @{DCSTypes#AI.Task.WeaponExpend} to define the amount of weapons to be release at each attack.
-- @param #number EngageAttackQty (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 EngageDirection (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.
--- OnLeave Transition Handler for State Engaging.
-- @function [parent=#AI_BAI_ZONE] OnLeaveEngaging
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Engaging.
-- @function [parent=#AI_BAI_ZONE] OnEnterEngaging
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
self:AddTransition( "Engaging", "Target", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
self:AddTransition( "Engaging", "Fired", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
--- OnBefore Transition Handler for Event Fired.
-- @function [parent=#AI_BAI_ZONE] OnBeforeFired
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Fired.
-- @function [parent=#AI_BAI_ZONE] OnAfterFired
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Fired.
-- @function [parent=#AI_BAI_ZONE] Fired
-- @param #AI_BAI_ZONE self
--- Asynchronous Event Trigger for Event Fired.
-- @function [parent=#AI_BAI_ZONE] __Fired
-- @param #AI_BAI_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Destroy", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
--- OnBefore Transition Handler for Event Destroy.
-- @function [parent=#AI_BAI_ZONE] OnBeforeDestroy
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Destroy.
-- @function [parent=#AI_BAI_ZONE] OnAfterDestroy
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_BAI_ZONE] Destroy
-- @param #AI_BAI_ZONE self
--- Asynchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_BAI_ZONE] __Destroy
-- @param #AI_BAI_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Abort", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
--- OnBefore Transition Handler for Event Abort.
-- @function [parent=#AI_BAI_ZONE] OnBeforeAbort
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Abort.
-- @function [parent=#AI_BAI_ZONE] OnAfterAbort
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Abort.
-- @function [parent=#AI_BAI_ZONE] Abort
-- @param #AI_BAI_ZONE self
--- Asynchronous Event Trigger for Event Abort.
-- @function [parent=#AI_BAI_ZONE] __Abort
-- @param #AI_BAI_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Accomplish", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_BAI_ZONE.
--- OnBefore Transition Handler for Event Accomplish.
-- @function [parent=#AI_BAI_ZONE] OnBeforeAccomplish
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Accomplish.
-- @function [parent=#AI_BAI_ZONE] OnAfterAccomplish
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_BAI_ZONE] Accomplish
-- @param #AI_BAI_ZONE self
--- Asynchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_BAI_ZONE] __Accomplish
-- @param #AI_BAI_ZONE self
-- @param #number Delay The delay in seconds.
return self
end
--- Set the Engage Zone where the AI is performing BOMB. Note that if the EngageZone is changed, the AI needs to re-detect targets.
-- @param #AI_BAI_ZONE self
-- @param Core.Zone#ZONE EngageZone The zone where the AI is performing BOMB.
-- @return #AI_BAI_ZONE self
function AI_BAI_ZONE:SetEngageZone( EngageZone )
self:F2()
if EngageZone then
self.EngageZone = EngageZone
else
self.EngageZone = nil
end
end
--- Specifies whether to search for potential targets in the zone, or let the center of the zone be the bombing coordinate.
-- AI_BAI_ZONE will search for potential targets by default.
-- @param #AI_BAI_ZONE self
-- @return #AI_BAI_ZONE
function AI_BAI_ZONE:SearchOnOff( Search )
self.Search = Search
return self
end
--- If Search is Off, the current zone coordinate will be the center of the bombing.
-- @param #AI_BAI_ZONE self
-- @return #AI_BAI_ZONE
function AI_BAI_ZONE:SearchOff()
self:SearchOnOff( false )
return self
end
--- If Search is On, BAI will search for potential targets in the zone.
-- @param #AI_BAI_ZONE self
-- @return #AI_BAI_ZONE
function AI_BAI_ZONE:SearchOn()
self:SearchOnOff( true )
return self
end
--- onafter State Transition for Event Start.
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_BAI_ZONE:onafterStart( Controllable, From, Event, To )
-- Call the parent Start event handler
self:GetParent(self).onafterStart( self, Controllable, From, Event, To )
self:HandleEvent( EVENTS.Dead )
self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable
function _NewEngageRoute( AIControllable )
AIControllable:T( "NewEngageRoute" )
local EngageZone = AIControllable:GetState( AIControllable, "EngageZone" ) -- AI.AI_BAI#AI_BAI_ZONE
EngageZone:__Engage( 1, EngageZone.EngageSpeed, EngageZone.EngageAltitude, EngageZone.EngageWeaponExpend, EngageZone.EngageAttackQty, EngageZone.EngageDirection )
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_BAI_ZONE:onbeforeEngage( Controllable, From, Event, To )
if self.Accomplished == true then
return false
end
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_BAI_ZONE:onafterTarget( Controllable, From, Event, To )
self:F({"onafterTarget",self.Search,Controllable:IsAlive()})
if Controllable:IsAlive() then
local AttackTasks = {}
if self.Search == true then
for DetectedUnit, Detected in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
if DetectedUnit:IsAlive() then
if DetectedUnit:IsInZone( self.EngageZone ) then
if Detected == true then
self:F( {"Target: ", DetectedUnit } )
self.DetectedUnits[DetectedUnit] = false
local AttackTask = Controllable:TaskAttackUnit( DetectedUnit, false, self.EngageWeaponExpend, self.EngageAttackQty, self.EngageDirection, self.EngageAltitude, nil )
self.Controllable:PushTask( AttackTask, 1 )
end
end
else
self.DetectedUnits[DetectedUnit] = nil
end
end
else
self:F("Attack zone")
local AttackTask = Controllable:TaskAttackMapObject(
self.EngageZone:GetPointVec2():GetVec2(),
true,
self.EngageWeaponExpend,
self.EngageAttackQty,
self.EngageDirection,
self.EngageAltitude
)
self.Controllable:PushTask( AttackTask, 1 )
end
self:__Target( -10 )
end
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_BAI_ZONE:onafterAbort( Controllable, From, Event, To )
Controllable:ClearTasks()
self:__Route( 1 )
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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 EngageAttackQty (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 EngageDirection (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.
function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To,
EngageSpeed,
EngageAltitude,
EngageWeaponExpend,
EngageAttackQty,
EngageDirection )
self:F("onafterEngage")
self.EngageSpeed = EngageSpeed or 400
self.EngageAltitude = EngageAltitude or 2000
self.EngageWeaponExpend = EngageWeaponExpend
self.EngageAttackQty = EngageAttackQty
self.EngageDirection = EngageDirection
if Controllable:IsAlive() then
local EngageRoute = {}
--- Calculate the current route point.
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
self.EngageSpeed,
true
)
EngageRoute[#EngageRoute+1] = CurrentRoutePoint
local AttackTasks = {}
if self.Search == true then
for DetectedUnitID, DetectedUnitData in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnitData -- Wrapper.Unit#UNIT
self:T( DetectedUnit )
if DetectedUnit:IsAlive() then
if DetectedUnit:IsInZone( self.EngageZone ) then
self:F( {"Engaging ", DetectedUnit } )
AttackTasks[#AttackTasks+1] = Controllable:TaskBombing(
DetectedUnit:GetPointVec2():GetVec2(),
true,
EngageWeaponExpend,
EngageAttackQty,
EngageDirection,
EngageAltitude
)
end
else
self.DetectedUnits[DetectedUnit] = nil
end
end
else
self:F("Attack zone")
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackMapObject(
self.EngageZone:GetPointVec2():GetVec2(),
true,
EngageWeaponExpend,
EngageAttackQty,
EngageDirection,
EngageAltitude
)
end
EngageRoute[#EngageRoute].task = Controllable:TaskCombo( AttackTasks )
--- Define a random point in the @{Zone}. The AI will fly to that point within the zone.
--- Find a random 2D point in EngageZone.
local ToTargetVec2 = self.EngageZone:GetRandomVec2()
self:T2( ToTargetVec2 )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
self.EngageSpeed,
true
)
EngageRoute[#EngageRoute+1] = ToTargetRoutePoint
Controllable:OptionROEOpenFire()
Controllable:OptionROTVertical()
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
Controllable:WayPointInitialize( EngageRoute )
--- Do a trick, link the NewEngageRoute function of the object to the AIControllable in a temporary variable ...
Controllable:SetState( Controllable, "EngageZone", self )
Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageRoute" )
--- NOW ROUTE THE GROUP!
Controllable:WayPointExecute( 1 )
self:SetDetectionInterval( 2 )
self:SetDetectionActivated()
self:__Target( -2 ) -- Start Targetting
end
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_BAI_ZONE:onafterAccomplish( Controllable, From, Event, To )
self.Accomplished = true
self:SetDetectionDeactivated()
end
--- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param Core.Event#EVENTDATA EventData
function AI_BAI_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
if EventData.IniUnit then
self.DetectedUnits[EventData.IniUnit] = nil
end
end
--- @param #AI_BAI_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_BAI_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )
if EventData.IniDCSUnit then
if self.DetectedUnits and self.DetectedUnits[EventData.IniUnit] then
self:__Destroy( 1, EventData )
end
end
end

View File

@@ -0,0 +1,322 @@
--- Single-Player:**No** / Multi-Player:**Yes** / AI:**Yes** / Human:**No** / Types:**All** -- **AI Balancing will replace in multi player missions
-- non-occupied human slots with AI groups, in order to provide an engaging simulation environment,
-- even when there are hardly any players in the mission.**
--
-- ![Banner Image](..\Presentations\AI_Balancer\Dia1.JPG)
--
-- ====
--
-- # Demo Missions
--
-- ### [AI_BALANCER Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/AIB%20-%20AI%20Balancing)
--
-- ### [AI_BALANCER Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AIB%20-%20AI%20Balancing)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [AI_BALANCER YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl2CJVIrL1TdAumuVS8n64B7)
--
-- ===
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- 2017-01-17: There is still a problem with AI being destroyed, but not respawned. Need to check further upon that.
--
-- 2017-01-08: AI_BALANCER:**InitSpawnInterval( Earliest, Latest )** added.
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * **[Dutch_Baron](https://forums.eagle.ru/member.php?u=112075)**: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
-- * **SNAFU**: Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. None of the script code has been used however within the new AI_BALANCER moose class.
--
-- ### Authors:
--
-- * FlightControl: Framework Design & Programming and Documentation.
--
-- @module AI_Balancer
--- @type AI_BALANCER
-- @field Core.Set#SET_CLIENT SetClient
-- @field Functional.Spawn#SPAWN SpawnAI
-- @field Wrapper.Group#GROUP Test
-- @extends Core.Fsm#FSM_SET
--- # AI_BALANCER class, extends @{Fsm#FSM_SET}
--
-- The AI_BALANCER class monitors and manages as many replacement AI groups as there are
-- CLIENTS in a SET_CLIENT collection, which are not occupied by human players.
-- In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.
--
-- The parent class @{Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM).
-- The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods.
-- An explanation about state and event transition methods can be found in the @{FSM} module documentation.
--
-- The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:
--
-- * @{#AI_BALANCER.OnAfterSpawned}( AISet, From, Event, To, AIGroup ): Define to add extra logic when an AI is spawned.
--
-- ## 1. AI_BALANCER construction
--
-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New}() method:
--
-- ## 2. AI_BALANCER is a FSM
--
-- ![Process](..\Presentations\AI_Balancer\Dia13.JPG)
--
-- ### 2.1. AI_BALANCER States
--
-- * **Monitoring** ( Set ): Monitoring the Set if all AI is spawned for the Clients.
-- * **Spawning** ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
-- * **Spawned** ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
-- * **Destroying** ( Set, AIGroup ): The AI is being destroyed.
-- * **Returning** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
--
-- ### 2.2. AI_BALANCER Events
--
-- * **Monitor** ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
-- * **Spawn** ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
-- * **Spawned** ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
-- * **Destroy** ( Set, AIGroup ): The AI is being destroyed.
-- * **Return** ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
--
-- ## 3. AI_BALANCER spawn interval for replacement AI
--
-- Use the method @{#AI_BALANCER.InitSpawnInterval}() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.
--
-- ## 4. AI_BALANCER returns AI to Airbases
--
-- By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default.
-- However, there are 2 additional options that you can use to customize the destroy behaviour.
-- When a human player joins a slot, you can configure to let the AI return to:
--
-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the **home** @{Airbase#AIRBASE}.
-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the **nearest friendly** @{Airbase#AIRBASE}.
--
-- Note that when AI returns to an airbase, the AI_BALANCER will trigger the **Return** event and the AI will return,
-- otherwise the AI_BALANCER will trigger a **Destroy** event, and the AI will be destroyed.
--
-- @field #AI_BALANCER
AI_BALANCER = {
ClassName = "AI_BALANCER",
PatrolZones = {},
AIGroups = {},
Earliest = 5, -- Earliest a new AI can be spawned is in 5 seconds.
Latest = 60, -- Latest a new AI can be spawned is in 60 seconds.
}
--- Creates a new AI_BALANCER object
-- @param #AI_BALANCER self
-- @param Core.Set#SET_CLIENT SetClient A SET\_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).
-- @param Functional.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed.
-- @return #AI_BALANCER
function AI_BALANCER:New( SetClient, SpawnAI )
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_SET:New( SET_GROUP:New() ) ) -- AI.AI_Balancer#AI_BALANCER
-- TODO: Define the OnAfterSpawned event
self:SetStartState( "None" )
self:AddTransition( "*", "Monitor", "Monitoring" )
self:AddTransition( "*", "Spawn", "Spawning" )
self:AddTransition( "Spawning", "Spawned", "Spawned" )
self:AddTransition( "*", "Destroy", "Destroying" )
self:AddTransition( "*", "Return", "Returning" )
self.SetClient = SetClient
self.SetClient:FilterOnce()
self.SpawnAI = SpawnAI
self.SpawnQueue = {}
self.ToNearestAirbase = false
self.ToHomeAirbase = false
self:__Monitor( 1 )
return self
end
--- Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.
-- Provide 2 identical seconds if the interval should be a fixed amount of seconds.
-- @param #AI_BALANCER self
-- @param #number Earliest The earliest a new AI can be spawned in seconds.
-- @param #number Latest The latest a new AI can be spawned in seconds.
-- @return self
function AI_BALANCER:InitSpawnInterval( Earliest, Latest )
self.Earliest = Earliest
self.Latest = Latest
return self
end
--- Returns the AI to the nearest friendly @{Airbase#AIRBASE}.
-- @param #AI_BALANCER self
-- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
-- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Set#SET_AIRBASE}s to evaluate where to return to.
function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet )
self.ToNearestAirbase = true
self.ReturnTresholdRange = ReturnTresholdRange
self.ReturnAirbaseSet = ReturnAirbaseSet
end
--- Returns the AI to the home @{Airbase#AIRBASE}.
-- @param #AI_BALANCER self
-- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Airbase#AIRBASE}.
function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange )
self.ToHomeAirbase = true
self.ReturnTresholdRange = ReturnTresholdRange
end
--- @param #AI_BALANCER self
-- @param Core.Set#SET_GROUP SetGroup
-- @param #string ClientName
-- @param Wrapper.Group#GROUP AIGroup
function AI_BALANCER:onenterSpawning( SetGroup, From, Event, To, ClientName )
-- OK, Spawn a new group from the default SpawnAI object provided.
local AIGroup = self.SpawnAI:Spawn() -- Wrapper.Group#GROUP
if AIGroup then
AIGroup:E( "Spawning new AIGroup" )
--TODO: need to rework UnitName thing ...
SetGroup:Add( ClientName, AIGroup )
self.SpawnQueue[ClientName] = nil
-- Fire the Spawned event. The first parameter is the AIGroup just Spawned.
-- Mission designers can catch this event to bind further actions to the AIGroup.
self:Spawned( AIGroup )
end
end
--- @param #AI_BALANCER self
-- @param Core.Set#SET_GROUP SetGroup
-- @param Wrapper.Group#GROUP AIGroup
function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, ClientName, AIGroup )
AIGroup:Destroy()
SetGroup:Flush()
SetGroup:Remove( ClientName )
SetGroup:Flush()
end
--- @param #AI_BALANCER self
-- @param Core.Set#SET_GROUP SetGroup
-- @param Wrapper.Group#GROUP AIGroup
function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup )
local AIGroupTemplate = AIGroup:GetTemplate()
if self.ToHomeAirbase == true then
local WayPointCount = #AIGroupTemplate.route.points
local SwitchWayPointCommand = AIGroup:CommandSwitchWayPoint( 1, WayPointCount, 1 )
AIGroup:SetCommand( SwitchWayPointCommand )
AIGroup:MessageToRed( "Returning to home base ...", 30 )
else
-- Okay, we need to send this Group back to the nearest base of the Coalition of the AI.
--TODO: i need to rework the POINT_VEC2 thing.
local PointVec2 = POINT_VEC2:New( AIGroup:GetVec2().x, AIGroup:GetVec2().y )
local ClosestAirbase = self.ReturnAirbaseSet:FindNearestAirbaseFromPointVec2( PointVec2 )
self:T( ClosestAirbase.AirbaseName )
AIGroup:MessageToRed( "Returning to " .. ClosestAirbase:GetName().. " ...", 30 )
local RTBRoute = AIGroup:RouteReturnToAirbase( ClosestAirbase )
AIGroupTemplate.route = RTBRoute
AIGroup:Respawn( AIGroupTemplate )
end
end
--- @param #AI_BALANCER self
function AI_BALANCER:onenterMonitoring( SetGroup )
self:T2( { self.SetClient:Count() } )
--self.SetClient:Flush()
self.SetClient:ForEachClient(
--- @param Wrapper.Client#CLIENT Client
function( Client )
self:T3(Client.ClientName)
local AIGroup = self.Set:Get( Client.UnitName ) -- Wrapper.Group#GROUP
if Client:IsAlive() then
if AIGroup and AIGroup:IsAlive() == true then
if self.ToNearestAirbase == false and self.ToHomeAirbase == false then
self:Destroy( Client.UnitName, AIGroup )
else
-- We test if there is no other CLIENT within the self.ReturnTresholdRange of the first unit of the AI group.
-- If there is a CLIENT, the AI stays engaged and will not return.
-- If there is no CLIENT within the self.ReturnTresholdRange, then the unit will return to the Airbase return method selected.
local PlayerInRange = { Value = false }
local RangeZone = ZONE_RADIUS:New( 'RangeZone', AIGroup:GetVec2(), self.ReturnTresholdRange )
self:T2( RangeZone )
_DATABASE:ForEachPlayer(
--- @param Wrapper.Unit#UNIT RangeTestUnit
function( RangeTestUnit, RangeZone, AIGroup, PlayerInRange )
self:T2( { PlayerInRange, RangeTestUnit.UnitName, RangeZone.ZoneName } )
if RangeTestUnit:IsInZone( RangeZone ) == true then
self:T2( "in zone" )
if RangeTestUnit:GetCoalition() ~= AIGroup:GetCoalition() then
self:T2( "in range" )
PlayerInRange.Value = true
end
end
end,
--- @param Core.Zone#ZONE_RADIUS RangeZone
-- @param Wrapper.Group#GROUP AIGroup
function( RangeZone, AIGroup, PlayerInRange )
if PlayerInRange.Value == false then
self:Return( AIGroup )
end
end
, RangeZone, AIGroup, PlayerInRange
)
end
self.Set:Remove( Client.UnitName )
end
else
if not AIGroup or not AIGroup:IsAlive() == true then
self:T( "Client " .. Client.UnitName .. " not alive." )
if not self.SpawnQueue[Client.UnitName] then
-- Spawn a new AI taking into account the spawn interval Earliest, Latest
self:__Spawn( math.random( self.Earliest, self.Latest ), Client.UnitName )
self.SpawnQueue[Client.UnitName] = true
self:E( "New AI Spawned for Client " .. Client.UnitName )
end
end
end
return true
end
)
self:__Monitor( 10 )
end

View File

@@ -0,0 +1,580 @@
--- **AI** - **Execute Combat Air Patrol (CAP).**
--
-- ![Banner Image](..\Presentations\AI_CAP\Dia1.JPG)
--
-- ===
--
-- AI CAP classes makes AI Controllables execute a Combat Air Patrol.
--
-- There are the following types of CAP classes defined:
--
-- * @{#AI_CAP_ZONE}: Perform a CAP in a zone.
--
-- ====
--
-- # Demo Missions
--
-- ### [AI_CAP Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAP%20-%20Combat%20Air%20Patrol)
--
-- ### [AI_CAP Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAP%20-%20Combat%20Air%20Patrol)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [AI_CAP YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1YCyPxJgoZn-CfhwyeW65L)
--
-- ====
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- 2017-01-15: Initial class and API.
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * **[Quax](https://forums.eagle.ru/member.php?u=90530)**: Concept, Advice & Testing.
-- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Concept, Advice & Testing.
-- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision.
-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing.
-- * **[Delta99](https://forums.eagle.ru/member.php?u=125166): Testing.
--
-- ### Authors:
--
-- * **FlightControl**: Concept, Design & Programming.
--
-- @module AI_Cap
--- @type AI_CAP_ZONE
-- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling.
-- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed.
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
--- # AI_CAP_ZONE class, extends @{AI_CAP#AI_PATROL_ZONE}
--
-- The AI_CAP_ZONE class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}
-- and automatically engage any airborne enemies that are within a certain range or within a certain zone.
--
-- ![Process](..\Presentations\AI_CAP\Dia3.JPG)
--
-- The AI_CAP_ZONE is assigned a @{Group} and this must be done before the AI_CAP_ZONE process can be started using the **Start** event.
--
-- ![Process](..\Presentations\AI_CAP\Dia4.JPG)
--
-- The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
-- Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
--
-- ![Process](..\Presentations\AI_CAP\Dia5.JPG)
--
-- This cycle will continue.
--
-- ![Process](..\Presentations\AI_CAP\Dia6.JPG)
--
-- During the patrol, the AI will detect enemy targets, which are reported through the **Detected** event.
--
-- ![Process](..\Presentations\AI_CAP\Dia9.JPG)
--
-- When enemies are detected, the AI will automatically engage the enemy.
--
-- ![Process](..\Presentations\AI_CAP\Dia10.JPG)
--
-- Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
-- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Process](..\Presentations\AI_CAP\Dia13.JPG)
--
-- ## 1. AI_CAP_ZONE constructor
--
-- * @{#AI_CAP_ZONE.New}(): Creates a new AI_CAP_ZONE object.
--
-- ## 2. AI_CAP_ZONE is a FSM
--
-- ![Process](..\Presentations\AI_CAP\Dia2.JPG)
--
-- ### 2.1 AI_CAP_ZONE States
--
-- * **None** ( Group ): The process is not started yet.
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
-- * **Engaging** ( Group ): The AI is engaging the bogeys.
-- * **Returning** ( Group ): The AI is returning to Base..
--
-- ### 2.2 AI_CAP_ZONE Events
--
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
-- * **@{#AI_CAP_ZONE.Engage}**: Let the AI engage the bogeys.
-- * **@{#AI_CAP_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
-- * **@{#AI_CAP_ZONE.Destroy}**: The AI has destroyed a bogey @{Unit}.
-- * **@{#AI_CAP_ZONE.Destroyed}**: The AI has destroyed all bogeys @{Unit}s assigned in the CAS task.
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
--
-- ## 3. Set the Range of Engagement
--
-- ![Range](..\Presentations\AI_CAP\Dia11.JPG)
--
-- An optional range can be set in meters,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- The range can be beyond or smaller than the range of the Patrol Zone.
-- The range is applied at the position of the AI.
-- Use the method @{AI_CAP#AI_CAP_ZONE.SetEngageRange}() to define that range.
--
-- ## 4. Set the Zone of Engagement
--
-- ![Zone](..\Presentations\AI_CAP\Dia12.JPG)
--
-- An optional @{Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI_Cap#AI_CAP_ZONE.SetEngageZone}() to define that Zone.
--
-- ===
--
-- @field #AI_CAP_ZONE
AI_CAP_ZONE = {
ClassName = "AI_CAP_ZONE",
}
--- Creates a new AI_CAP_ZONE object
-- @param #AI_CAP_ZONE self
-- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed.
-- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#AltitudeType PatrolAltType The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO
-- @return #AI_CAP_ZONE self
function AI_CAP_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
-- Inherits from BASE
local self = BASE:Inherit( self, AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) ) -- #AI_CAP_ZONE
self.Accomplished = false
self.Engaging = false
self:AddTransition( { "Patrolling", "Engaging" }, "Engage", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_CAP_ZONE.
--- OnBefore Transition Handler for Event Engage.
-- @function [parent=#AI_CAP_ZONE] OnBeforeEngage
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Engage.
-- @function [parent=#AI_CAP_ZONE] OnAfterEngage
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Engage.
-- @function [parent=#AI_CAP_ZONE] Engage
-- @param #AI_CAP_ZONE self
--- Asynchronous Event Trigger for Event Engage.
-- @function [parent=#AI_CAP_ZONE] __Engage
-- @param #AI_CAP_ZONE self
-- @param #number Delay The delay in seconds.
--- OnLeave Transition Handler for State Engaging.
-- @function [parent=#AI_CAP_ZONE] OnLeaveEngaging
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Engaging.
-- @function [parent=#AI_CAP_ZONE] OnEnterEngaging
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
self:AddTransition( "Engaging", "Fired", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_CAP_ZONE.
--- OnBefore Transition Handler for Event Fired.
-- @function [parent=#AI_CAP_ZONE] OnBeforeFired
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Fired.
-- @function [parent=#AI_CAP_ZONE] OnAfterFired
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Fired.
-- @function [parent=#AI_CAP_ZONE] Fired
-- @param #AI_CAP_ZONE self
--- Asynchronous Event Trigger for Event Fired.
-- @function [parent=#AI_CAP_ZONE] __Fired
-- @param #AI_CAP_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Destroy", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_CAP_ZONE.
--- OnBefore Transition Handler for Event Destroy.
-- @function [parent=#AI_CAP_ZONE] OnBeforeDestroy
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Destroy.
-- @function [parent=#AI_CAP_ZONE] OnAfterDestroy
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_CAP_ZONE] Destroy
-- @param #AI_CAP_ZONE self
--- Asynchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_CAP_ZONE] __Destroy
-- @param #AI_CAP_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Abort", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_CAP_ZONE.
--- OnBefore Transition Handler for Event Abort.
-- @function [parent=#AI_CAP_ZONE] OnBeforeAbort
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Abort.
-- @function [parent=#AI_CAP_ZONE] OnAfterAbort
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Abort.
-- @function [parent=#AI_CAP_ZONE] Abort
-- @param #AI_CAP_ZONE self
--- Asynchronous Event Trigger for Event Abort.
-- @function [parent=#AI_CAP_ZONE] __Abort
-- @param #AI_CAP_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Accomplish", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_CAP_ZONE.
--- OnBefore Transition Handler for Event Accomplish.
-- @function [parent=#AI_CAP_ZONE] OnBeforeAccomplish
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Accomplish.
-- @function [parent=#AI_CAP_ZONE] OnAfterAccomplish
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_CAP_ZONE] Accomplish
-- @param #AI_CAP_ZONE self
--- Asynchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_CAP_ZONE] __Accomplish
-- @param #AI_CAP_ZONE self
-- @param #number Delay The delay in seconds.
return self
end
--- Set the Engage Zone which defines where the AI will engage bogies.
-- @param #AI_CAP_ZONE self
-- @param Core.Zone#ZONE EngageZone The zone where the AI is performing CAP.
-- @return #AI_CAP_ZONE self
function AI_CAP_ZONE:SetEngageZone( EngageZone )
self:F2()
if EngageZone then
self.EngageZone = EngageZone
else
self.EngageZone = nil
end
end
--- Set the Engage Range when the AI will engage with airborne enemies.
-- @param #AI_CAP_ZONE self
-- @param #number EngageRange The Engage Range.
-- @return #AI_CAP_ZONE self
function AI_CAP_ZONE:SetEngageRange( EngageRange )
self:F2()
if EngageRange then
self.EngageRange = EngageRange
else
self.EngageRange = nil
end
end
--- onafter State Transition for Event Start.
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To )
-- Call the parent Start event handler
self:GetParent(self).onafterStart( self, Controllable, From, Event, To )
self:HandleEvent( EVENTS.Dead )
end
-- todo: need to fix this global function
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable
function _NewEngageCapRoute( AIControllable )
AIControllable:T( "NewEngageRoute" )
local EngageZone = AIControllable:GetState( AIControllable, "EngageZone" ) -- AI.AI_Cap#AI_CAP_ZONE
EngageZone:__Engage( 1 )
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onbeforeEngage( Controllable, From, Event, To )
if self.Accomplished == true then
return false
end
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
if From ~= "Engaging" then
local Engage = false
for DetectedUnit, Detected in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
self:T( DetectedUnit )
if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then
Engage = true
break
end
end
if Engage == true then
self:E( 'Detected -> Engaging' )
self:__Engage( 1 )
end
end
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
Controllable:ClearTasks()
self:__Route( 1 )
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
if Controllable:IsAlive() then
local EngageRoute = {}
--- Calculate the current route point.
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
ToEngageZoneSpeed,
true
)
EngageRoute[#EngageRoute+1] = CurrentRoutePoint
--- Find a random 2D point in PatrolZone.
local ToTargetVec2 = self.PatrolZone:GetRandomVec2()
self:T2( ToTargetVec2 )
--- Define Speed and Altitude.
local ToTargetAltitude = math.random( self.EngageFloorAltitude, self.EngageCeilingAltitude )
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
self:T2( { self.PatrolMinSpeed, self.PatrolMaxSpeed, ToTargetSpeed } )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToPatrolRoutePoint = ToTargetPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
ToTargetSpeed,
true
)
EngageRoute[#EngageRoute+1] = ToPatrolRoutePoint
Controllable:OptionROEOpenFire()
Controllable:OptionROTPassiveDefense()
local AttackTasks = {}
for DetectedUnit, Detected in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
self:T( { DetectedUnit, DetectedUnit:IsAlive(), DetectedUnit:IsAir() } )
if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then
if self.EngageZone then
if DetectedUnit:IsInZone( self.EngageZone ) then
self:E( {"Within Zone and Engaging ", DetectedUnit } )
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
end
else
if self.EngageRange then
if DetectedUnit:GetPointVec3():Get2DDistance(Controllable:GetPointVec3() ) <= self.EngageRange then
self:E( {"Within Range and Engaging", DetectedUnit } )
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
end
else
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit )
end
end
else
self.DetectedUnits[DetectedUnit] = nil
end
end
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
self.Controllable:WayPointInitialize( EngageRoute )
if #AttackTasks == 0 then
self:E("No targets found -> Going back to Patrolling")
self:__Abort( 1 )
self:__Route( 1 )
self:SetDetectionActivated()
else
EngageRoute[1].task = Controllable:TaskCombo( AttackTasks )
--- Do a trick, link the NewEngageRoute function of the object to the AIControllable in a temporary variable ...
self.Controllable:SetState( self.Controllable, "EngageZone", self )
self.Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageCapRoute" )
self:SetDetectionDeactivated()
end
--- NOW ROUTE THE GROUP!
self.Controllable:WayPointExecute( 1, 2 )
end
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To )
self.Accomplished = true
self:SetDetectionOff()
end
--- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param Core.Event#EVENTDATA EventData
function AI_CAP_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
if EventData.IniUnit then
self.DetectedUnits[EventData.IniUnit] = nil
end
end
--- @param #AI_CAP_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_CAP_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )
if EventData.IniDCSUnit then
if self.DetectedUnits and self.DetectedUnits[EventData.IniUnit] then
self:__Destroy( 1, EventData )
end
end
end

View File

@@ -0,0 +1,587 @@
--- **AI** -- **Provide Close Air Support to friendly ground troops.**
--
-- ![Banner Image](..\Presentations\AI_CAS\Dia1.JPG)
--
-- ===
--
-- AI CAS classes makes AI Controllables execute a Close Air Support.
--
-- There are the following types of CAS classes defined:
--
-- * @{#AI_CAS_ZONE}: Perform a CAS in a zone.
--
-- ====
--
-- # Demo Missions
--
-- ### [AI_CAS Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CAS%20-%20Close%20Air%20Support)
--
-- ### [AI_CAS Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAS%20-%20Close%20Air%20Support)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [AI_CAS YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3JBO1WDqqpyYRRmIkR2ir2)
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * **[Quax](https://forums.eagle.ru/member.php?u=90530)**: Concept, Advice & Testing.
-- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Concept, Advice & Testing.
-- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision.
--
-- ### Authors:
--
-- * **FlightControl**: Concept, Design & Programming.
--
-- @module AI_Cas
--- AI_CAS_ZONE class
-- @type AI_CAS_ZONE
-- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling.
-- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed.
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
--- # AI_CAS_ZONE class, extends @{AI_Patrol#AI_PATROL_ZONE}
--
-- AI_CAS_ZONE derives from the @{AI_Patrol#AI_PATROL_ZONE}, inheriting its methods and behaviour.
--
-- The AI_CAS_ZONE class implements the core functions to provide Close Air Support in an Engage @{Zone} by an AIR @{Controllable} or @{Group}.
-- The AI_CAS_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.
--
-- ![HoldAndEngage](..\Presentations\AI_CAS\Dia3.JPG)
--
-- The AI_CAS_ZONE is assigned a @{Group} and this must be done before the AI_CAS_ZONE process can be started through the **Start** event.
--
-- ![Start Event](..\Presentations\AI_CAS\Dia4.JPG)
--
-- Upon started, The AI will **Route** itself towards the random 3D point within a patrol zone,
-- using a random speed within the given altitude and speed limits.
-- Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
-- This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
--
-- ![Route Event](..\Presentations\AI_CAS\Dia5.JPG)
--
-- When the AI is commanded to provide Close Air Support (through the event **Engage**), the AI will fly towards the Engage Zone.
-- Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia6.JPG)
--
-- The AI will detect the targets and will only destroy the targets within the Engage Zone.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia7.JPG)
--
-- Every target that is destroyed, is reported< by the AI.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia8.JPG)
--
-- Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia9.JPG)
--
-- Until it is notified through the event **Accomplish**, which is to be triggered by an observing party:
--
-- * a FAC
-- * a timed event
-- * a menu option selected by a human
-- * a condition
-- * others ...
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia10.JPG)
--
-- When the AI has accomplished the CAS, it will fly back to the Patrol Zone.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia11.JPG)
--
-- It will keep patrolling there, until it is notified to RTB or move to another CAS Zone.
-- It can be notified to go RTB through the **RTB** event.
--
-- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Engage Event](..\Presentations\AI_CAS\Dia12.JPG)
--
-- # 1. AI_CAS_ZONE constructor
--
-- * @{#AI_CAS_ZONE.New}(): Creates a new AI_CAS_ZONE object.
--
-- ## 2. AI_CAS_ZONE is a FSM
--
-- ![Process](..\Presentations\AI_CAS\Dia2.JPG)
--
-- ### 2.1. AI_CAS_ZONE States
--
-- * **None** ( Group ): The process is not started yet.
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
-- * **Engaging** ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.
-- * **Returning** ( Group ): The AI is returning to Base..
--
-- ### 2.2. AI_CAS_ZONE Events
--
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
-- * **@{#AI_CAS_ZONE.Engage}**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.
-- * **@{#AI_CAS_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
-- * **@{#AI_CAS_ZONE.Destroy}**: The AI has destroyed a target @{Unit}.
-- * **@{#AI_CAS_ZONE.Destroyed}**: The AI has destroyed all target @{Unit}s assigned in the CAS task.
-- * **Status**: The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
--
-- ===
--
-- @field #AI_CAS_ZONE
AI_CAS_ZONE = {
ClassName = "AI_CAS_ZONE",
}
--- Creates a new AI_CAS_ZONE object
-- @param #AI_CAS_ZONE self
-- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed.
-- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @param Core.Zone#ZONE_BASE EngageZone The zone where the engage will happen.
-- @param Dcs.DCSTypes#AltitudeType PatrolAltType The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO
-- @return #AI_CAS_ZONE self
function AI_CAS_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType )
-- Inherits from BASE
local self = BASE:Inherit( self, AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) ) -- #AI_CAS_ZONE
self.EngageZone = EngageZone
self.Accomplished = false
self:SetDetectionZone( self.EngageZone )
self:AddTransition( { "Patrolling", "Engaging" }, "Engage", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
--- OnBefore Transition Handler for Event Engage.
-- @function [parent=#AI_CAS_ZONE] OnBeforeEngage
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Engage.
-- @function [parent=#AI_CAS_ZONE] OnAfterEngage
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Engage.
-- @function [parent=#AI_CAS_ZONE] Engage
-- @param #AI_CAS_ZONE self
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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.
-- Use the structure @{DCSTypes#AI.Task.WeaponExpend} to define the amount of weapons to be release at each attack.
-- @param #number EngageAttackQty (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 EngageDirection (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.
--- Asynchronous Event Trigger for Event Engage.
-- @function [parent=#AI_CAS_ZONE] __Engage
-- @param #AI_CAS_ZONE self
-- @param #number Delay The delay in seconds.
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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.
-- Use the structure @{DCSTypes#AI.Task.WeaponExpend} to define the amount of weapons to be release at each attack.
-- @param #number EngageAttackQty (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 EngageDirection (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.
--- OnLeave Transition Handler for State Engaging.
-- @function [parent=#AI_CAS_ZONE] OnLeaveEngaging
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Engaging.
-- @function [parent=#AI_CAS_ZONE] OnEnterEngaging
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
self:AddTransition( "Engaging", "Target", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
self:AddTransition( "Engaging", "Fired", "Engaging" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
--- OnBefore Transition Handler for Event Fired.
-- @function [parent=#AI_CAS_ZONE] OnBeforeFired
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Fired.
-- @function [parent=#AI_CAS_ZONE] OnAfterFired
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Fired.
-- @function [parent=#AI_CAS_ZONE] Fired
-- @param #AI_CAS_ZONE self
--- Asynchronous Event Trigger for Event Fired.
-- @function [parent=#AI_CAS_ZONE] __Fired
-- @param #AI_CAS_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Destroy", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
--- OnBefore Transition Handler for Event Destroy.
-- @function [parent=#AI_CAS_ZONE] OnBeforeDestroy
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Destroy.
-- @function [parent=#AI_CAS_ZONE] OnAfterDestroy
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_CAS_ZONE] Destroy
-- @param #AI_CAS_ZONE self
--- Asynchronous Event Trigger for Event Destroy.
-- @function [parent=#AI_CAS_ZONE] __Destroy
-- @param #AI_CAS_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Abort", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
--- OnBefore Transition Handler for Event Abort.
-- @function [parent=#AI_CAS_ZONE] OnBeforeAbort
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Abort.
-- @function [parent=#AI_CAS_ZONE] OnAfterAbort
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Abort.
-- @function [parent=#AI_CAS_ZONE] Abort
-- @param #AI_CAS_ZONE self
--- Asynchronous Event Trigger for Event Abort.
-- @function [parent=#AI_CAS_ZONE] __Abort
-- @param #AI_CAS_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "Engaging", "Accomplish", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_CAS_ZONE.
--- OnBefore Transition Handler for Event Accomplish.
-- @function [parent=#AI_CAS_ZONE] OnBeforeAccomplish
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Accomplish.
-- @function [parent=#AI_CAS_ZONE] OnAfterAccomplish
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_CAS_ZONE] Accomplish
-- @param #AI_CAS_ZONE self
--- Asynchronous Event Trigger for Event Accomplish.
-- @function [parent=#AI_CAS_ZONE] __Accomplish
-- @param #AI_CAS_ZONE self
-- @param #number Delay The delay in seconds.
return self
end
--- Set the Engage Zone where the AI is performing CAS. Note that if the EngageZone is changed, the AI needs to re-detect targets.
-- @param #AI_CAS_ZONE self
-- @param Core.Zone#ZONE EngageZone The zone where the AI is performing CAS.
-- @return #AI_CAS_ZONE self
function AI_CAS_ZONE:SetEngageZone( EngageZone )
self:F2()
if EngageZone then
self.EngageZone = EngageZone
else
self.EngageZone = nil
end
end
--- onafter State Transition for Event Start.
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To )
-- Call the parent Start event handler
self:GetParent(self).onafterStart( self, Controllable, From, Event, To )
self:HandleEvent( EVENTS.Dead )
self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable
function _NewEngageRoute( AIControllable )
AIControllable:T( "NewEngageRoute" )
local EngageZone = AIControllable:GetState( AIControllable, "EngageZone" ) -- AI.AI_Cas#AI_CAS_ZONE
EngageZone:__Engage( 1, EngageZone.EngageSpeed, EngageZone.EngageAltitude, EngageZone.EngageWeaponExpend, EngageZone.EngageAttackQty, EngageZone.EngageDirection )
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAS_ZONE:onbeforeEngage( Controllable, From, Event, To )
if self.Accomplished == true then
return false
end
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
self:E("onafterTarget")
if Controllable:IsAlive() then
local AttackTasks = {}
for DetectedUnit, Detected in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
if DetectedUnit:IsAlive() then
if DetectedUnit:IsInZone( self.EngageZone ) then
if Detected == true then
self:E( {"Target: ", DetectedUnit } )
self.DetectedUnits[DetectedUnit] = false
local AttackTask = Controllable:TaskAttackUnit( DetectedUnit, false, self.EngageWeaponExpend, self.EngageAttackQty, self.EngageDirection, self.EngageAltitude, nil )
self.Controllable:PushTask( AttackTask, 1 )
end
end
else
self.DetectedUnits[DetectedUnit] = nil
end
end
self:__Target( -10 )
end
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
Controllable:ClearTasks()
self:__Route( 1 )
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param #number EngageSpeed (optional) The speed the Group will hold when engaging to the target zone.
-- @param Dcs.DCSTypes#Distance EngageAltitude (optional) Desired altitude to perform the unit engagement.
-- @param Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend (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 EngageAttackQty (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 EngageDirection (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.
function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To,
EngageSpeed,
EngageAltitude,
EngageWeaponExpend,
EngageAttackQty,
EngageDirection )
self:F("onafterEngage")
self.EngageSpeed = EngageSpeed or 400
self.EngageAltitude = EngageAltitude or 2000
self.EngageWeaponExpend = EngageWeaponExpend
self.EngageAttackQty = EngageAttackQty
self.EngageDirection = EngageDirection
if Controllable:IsAlive() then
local EngageRoute = {}
--- Calculate the current route point.
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
self.EngageSpeed,
true
)
EngageRoute[#EngageRoute+1] = CurrentRoutePoint
local AttackTasks = {}
for DetectedUnitID, DetectedUnit in pairs( self.DetectedUnits ) do
local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT
self:T( DetectedUnit )
if DetectedUnit:IsAlive() then
if DetectedUnit:IsInZone( self.EngageZone ) then
self:E( {"Engaging ", DetectedUnit } )
AttackTasks[#AttackTasks+1] = Controllable:TaskAttackUnit( DetectedUnit,
true,
EngageWeaponExpend,
EngageAttackQty,
EngageDirection
)
end
else
self.DetectedUnits[DetectedUnit] = nil
end
end
EngageRoute[1].task = Controllable:TaskCombo( AttackTasks )
--- Define a random point in the @{Zone}. The AI will fly to that point within the zone.
--- Find a random 2D point in EngageZone.
local ToTargetVec2 = self.EngageZone:GetRandomVec2()
self:T2( ToTargetVec2 )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
self.EngageSpeed,
true
)
EngageRoute[#EngageRoute+1] = ToTargetRoutePoint
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
Controllable:WayPointInitialize( EngageRoute )
--- Do a trick, link the NewEngageRoute function of the object to the AIControllable in a temporary variable ...
Controllable:SetState( Controllable, "EngageZone", self )
Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageRoute" )
--- NOW ROUTE THE GROUP!
Controllable:WayPointExecute( 1 )
Controllable:OptionROEOpenFire()
Controllable:OptionROTVertical()
self:SetDetectionInterval( 2 )
self:SetDetectionActivated()
self:__Target( -2 ) -- Start Targetting
end
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To )
self.Accomplished = true
self:SetDetectionDeactivated()
end
--- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param Core.Event#EVENTDATA EventData
function AI_CAS_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
if EventData.IniUnit then
self.DetectedUnits[EventData.IniUnit] = nil
end
end
--- @param #AI_CAS_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_CAS_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )
if EventData.IniDCSUnit then
if self.DetectedUnits and self.DetectedUnits[EventData.IniUnit] then
self:__Destroy( 1, EventData )
end
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,964 @@
--- **AI** -- **Air Patrolling or Staging.**
--
-- ![Banner Image](..\Presentations\AI_PATROL\Dia1.JPG)
--
-- ===
--
-- AI PATROL classes makes AI Controllables execute an Patrol.
--
-- There are the following types of PATROL classes defined:
--
-- * @{#AI_PATROL_ZONE}: Perform a PATROL in a zone.
--
-- ====
--
-- # Demo Missions
--
-- ### [AI_PATROL Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/PAT%20-%20Patrolling)
--
-- ### [AI_PATROL Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/PAT%20-%20Patrolling)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [AI_PATROL YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl35HvYZKA6G22WMt7iI3zky)
--
-- ====
--
-- # **OPEN ISSUES**
--
-- 2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.
--
-- 2016-01-17:
-- -- Fixed problem with AI returning to base too early and unexpected.
-- -- ReSpawning of AI will reset the AI_PATROL and derived classes.
-- -- Checked the correct workings of SCHEDULER, and it DOES work correctly.
--
-- ====
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- 2017-01-17: Rename of class: **AI\_PATROL\_ZONE** is the new name for the old _AI\_PATROLZONE_.
--
-- 2017-01-15: Complete revision. AI_PATROL_ZONE is the base class for other AI_PATROL like classes.
--
-- 2016-09-01: Initial class and API.
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * **[Dutch_Baron](https://forums.eagle.ru/member.php?u=112075)**: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
-- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Testing and API concept review.
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming.
--
-- @module AI_Patrol
--- AI_PATROL_ZONE class
-- @type AI_PATROL_ZONE
-- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling.
-- @field Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed.
-- @field Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @field Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @field Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @field Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @field Functional.Spawn#SPAWN CoordTest
-- @extends Core.Fsm#FSM_CONTROLLABLE
--- # AI_PATROL_ZONE class, extends @{Fsm#FSM_CONTROLLABLE}
--
-- The AI_PATROL_ZONE class implements the core functions to patrol a @{Zone} by an AI @{Controllable} or @{Group}.
--
-- ![Process](..\Presentations\AI_PATROL\Dia3.JPG)
--
-- The AI_PATROL_ZONE is assigned a @{Group} and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event.
--
-- ![Process](..\Presentations\AI_PATROL\Dia4.JPG)
--
-- The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.
-- Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
--
-- ![Process](..\Presentations\AI_PATROL\Dia5.JPG)
--
-- This cycle will continue.
--
-- ![Process](..\Presentations\AI_PATROL\Dia6.JPG)
--
-- During the patrol, the AI will detect enemy targets, which are reported through the **Detected** event.
--
-- ![Process](..\Presentations\AI_PATROL\Dia9.JPG)
--
---- Note that the enemy is not engaged! To model enemy engagement, either tailor the **Detected** event, or
-- use derived AI_ classes to model AI offensive or defensive behaviour.
--
-- ![Process](..\Presentations\AI_PATROL\Dia10.JPG)
--
-- Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.
-- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Process](..\Presentations\AI_PATROL\Dia11.JPG)
--
-- ## 1. AI_PATROL_ZONE constructor
--
-- * @{#AI_PATROL_ZONE.New}(): Creates a new AI_PATROL_ZONE object.
--
-- ## 2. AI_PATROL_ZONE is a FSM
--
-- ![Process](..\Presentations\AI_PATROL\Dia2.JPG)
--
-- ### 2.1. AI_PATROL_ZONE States
--
-- * **None** ( Group ): The process is not started yet.
-- * **Patrolling** ( Group ): The AI is patrolling the Patrol Zone.
-- * **Returning** ( Group ): The AI is returning to Base.
-- * **Stopped** ( Group ): The process is stopped.
-- * **Crashed** ( Group ): The AI has crashed or is dead.
--
-- ### 2.2. AI_PATROL_ZONE Events
--
-- * **Start** ( Group ): Start the process.
-- * **Stop** ( Group ): Stop the process.
-- * **Route** ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
-- * **RTB** ( Group ): Route the AI to the home base.
-- * **Detect** ( Group ): The AI is detecting targets.
-- * **Detected** ( Group ): The AI has detected new targets.
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
--
-- ## 3. Set or Get the AI controllable
--
-- * @{#AI_PATROL_ZONE.SetControllable}(): Set the AIControllable.
-- * @{#AI_PATROL_ZONE.GetControllable}(): Get the AIControllable.
--
-- ## 4. Set the Speed and Altitude boundaries of the AI controllable
--
-- * @{#AI_PATROL_ZONE.SetSpeed}(): Set the patrol speed boundaries of the AI, for the next patrol.
-- * @{#AI_PATROL_ZONE.SetAltitude}(): Set altitude boundaries of the AI, for the next patrol.
--
-- ## 5. Manage the detection process of the AI controllable
--
-- The detection process of the AI controllable can be manipulated.
-- Detection requires an amount of CPU power, which has an impact on your mission performance.
-- Only put detection on when absolutely necessary, and the frequency of the detection can also be set.
--
-- * @{#AI_PATROL_ZONE.SetDetectionOn}(): Set the detection on. The AI will detect for targets.
-- * @{#AI_PATROL_ZONE.SetDetectionOff}(): Set the detection off, the AI will not detect for targets. The existing target list will NOT be erased.
--
-- The detection frequency can be set with @{#AI_PATROL_ZONE.SetDetectionInterval}( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection.
-- Use the method @{#AI_PATROL_ZONE.GetDetectedUnits}() to obtain a list of the @{Unit}s detected by the AI.
--
-- The detection can be filtered to potential targets in a specific zone.
-- Use the method @{#AI_PATROL_ZONE.SetDetectionZone}() to set the zone where targets need to be detected.
-- Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected
-- according the weather conditions.
--
-- ## 6. Manage the "out of fuel" in the AI_PATROL_ZONE
--
-- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
-- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
-- When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit,
-- while a new AI is targetted to the AI_PATROL_ZONE.
-- Once the time is finished, the old AI will return to the base.
-- Use the method @{#AI_PATROL_ZONE.ManageFuel}() to have this proces in place.
--
-- ## 7. Manage "damage" behaviour of the AI in the AI_PATROL_ZONE
--
-- When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on.
-- Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB).
-- Use the method @{#AI_PATROL_ZONE.ManageDamage}() to have this proces in place.
--
-- ===
--
-- @field #AI_PATROL_ZONE
AI_PATROL_ZONE = {
ClassName = "AI_PATROL_ZONE",
}
--- Creates a new AI_PATROL_ZONE object
-- @param #AI_PATROL_ZONE self
-- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed.
-- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#AltitudeType PatrolAltType The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to RADIO
-- @return #AI_PATROL_ZONE self
-- @usage
-- -- Define a new AI_PATROL_ZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
-- PatrolZone = ZONE:New( 'PatrolZone' )
-- PatrolSpawn = SPAWN:New( 'Patrol Group' )
-- PatrolArea = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 600, 900 )
function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_CONTROLLABLE:New() ) -- #AI_PATROL_ZONE
self.PatrolZone = PatrolZone
self.PatrolFloorAltitude = PatrolFloorAltitude
self.PatrolCeilingAltitude = PatrolCeilingAltitude
self.PatrolMinSpeed = PatrolMinSpeed
self.PatrolMaxSpeed = PatrolMaxSpeed
-- defafult PatrolAltType to "RADIO" if not specified
self.PatrolAltType = PatrolAltType or "RADIO"
self:SetDetectionInterval( 30 )
self.CheckStatus = true
self:ManageFuel( .2, 60 )
self:ManageDamage( 1 )
self.DetectedUnits = {} -- This table contains the targets detected during patrol.
self:SetStartState( "None" )
self:AddTransition( "*", "Stop", "Stopped" )
--- OnLeave Transition Handler for State Stopped.
-- @function [parent=#AI_PATROL_ZONE] OnLeaveStopped
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Stopped.
-- @function [parent=#AI_PATROL_ZONE] OnEnterStopped
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- OnBefore Transition Handler for Event Stop.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeStop
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Stop.
-- @function [parent=#AI_PATROL_ZONE] OnAfterStop
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Stop.
-- @function [parent=#AI_PATROL_ZONE] Stop
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Stop.
-- @function [parent=#AI_PATROL_ZONE] __Stop
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "None", "Start", "Patrolling" )
--- OnBefore Transition Handler for Event Start.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeStart
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Start.
-- @function [parent=#AI_PATROL_ZONE] OnAfterStart
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Start.
-- @function [parent=#AI_PATROL_ZONE] Start
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Start.
-- @function [parent=#AI_PATROL_ZONE] __Start
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
--- OnLeave Transition Handler for State Patrolling.
-- @function [parent=#AI_PATROL_ZONE] OnLeavePatrolling
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Patrolling.
-- @function [parent=#AI_PATROL_ZONE] OnEnterPatrolling
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
self:AddTransition( "Patrolling", "Route", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
--- OnBefore Transition Handler for Event Route.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeRoute
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Route.
-- @function [parent=#AI_PATROL_ZONE] OnAfterRoute
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Route.
-- @function [parent=#AI_PATROL_ZONE] Route
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Route.
-- @function [parent=#AI_PATROL_ZONE] __Route
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Status", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
--- OnBefore Transition Handler for Event Status.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeStatus
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Status.
-- @function [parent=#AI_PATROL_ZONE] OnAfterStatus
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Status.
-- @function [parent=#AI_PATROL_ZONE] Status
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Status.
-- @function [parent=#AI_PATROL_ZONE] __Status
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Detect", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
--- OnBefore Transition Handler for Event Detect.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeDetect
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Detect.
-- @function [parent=#AI_PATROL_ZONE] OnAfterDetect
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Detect.
-- @function [parent=#AI_PATROL_ZONE] Detect
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Detect.
-- @function [parent=#AI_PATROL_ZONE] __Detect
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "Detected", "*" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
--- OnBefore Transition Handler for Event Detected.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeDetected
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Detected.
-- @function [parent=#AI_PATROL_ZONE] OnAfterDetected
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event Detected.
-- @function [parent=#AI_PATROL_ZONE] Detected
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event Detected.
-- @function [parent=#AI_PATROL_ZONE] __Detected
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
self:AddTransition( "*", "RTB", "Returning" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
--- OnBefore Transition Handler for Event RTB.
-- @function [parent=#AI_PATROL_ZONE] OnBeforeRTB
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event RTB.
-- @function [parent=#AI_PATROL_ZONE] OnAfterRTB
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
--- Synchronous Event Trigger for Event RTB.
-- @function [parent=#AI_PATROL_ZONE] RTB
-- @param #AI_PATROL_ZONE self
--- Asynchronous Event Trigger for Event RTB.
-- @function [parent=#AI_PATROL_ZONE] __RTB
-- @param #AI_PATROL_ZONE self
-- @param #number Delay The delay in seconds.
--- OnLeave Transition Handler for State Returning.
-- @function [parent=#AI_PATROL_ZONE] OnLeaveReturning
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnEnter Transition Handler for State Returning.
-- @function [parent=#AI_PATROL_ZONE] OnEnterReturning
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE.
self:AddTransition( "*", "Eject", "*" )
self:AddTransition( "*", "Crash", "Crashed" )
self:AddTransition( "*", "PilotDead", "*" )
return self
end
--- Sets (modifies) the minimum and maximum speed of the patrol.
-- @param #AI_PATROL_ZONE self
-- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h.
-- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed )
self:F2( { PatrolMinSpeed, PatrolMaxSpeed } )
self.PatrolMinSpeed = PatrolMinSpeed
self.PatrolMaxSpeed = PatrolMaxSpeed
end
--- Sets the floor and ceiling altitude of the patrol.
-- @param #AI_PATROL_ZONE self
-- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol.
-- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude )
self:F2( { PatrolFloorAltitude, PatrolCeilingAltitude } )
self.PatrolFloorAltitude = PatrolFloorAltitude
self.PatrolCeilingAltitude = PatrolCeilingAltitude
end
-- * @{#AI_PATROL_ZONE.SetDetectionOn}(): Set the detection on. The AI will detect for targets.
-- * @{#AI_PATROL_ZONE.SetDetectionOff}(): Set the detection off, the AI will not detect for targets. The existing target list will NOT be erased.
--- Set the detection on. The AI will detect for targets.
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionOn()
self:F2()
self.DetectOn = true
end
--- Set the detection off. The AI will NOT detect for targets.
-- However, the list of already detected targets will be kept and can be enquired!
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionOff()
self:F2()
self.DetectOn = false
end
--- Set the status checking off.
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetStatusOff()
self:F2()
self.CheckStatus = false
end
--- Activate the detection. The AI will detect for targets if the Detection is switched On.
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionActivated()
self:F2()
self:ClearDetectedUnits()
self.DetectActivated = true
self:__Detect( -self.DetectInterval )
end
--- Deactivate the detection. The AI will NOT detect for targets.
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionDeactivated()
self:F2()
self:ClearDetectedUnits()
self.DetectActivated = false
end
--- Set the interval in seconds between each detection executed by the AI.
-- The list of already detected targets will be kept and updated.
-- Newly detected targets will be added, but already detected targets that were
-- not detected in this cycle, will NOT be removed!
-- The default interval is 30 seconds.
-- @param #AI_PATROL_ZONE self
-- @param #number Seconds The interval in seconds.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionInterval( Seconds )
self:F2()
if Seconds then
self.DetectInterval = Seconds
else
self.DetectInterval = 30
end
end
--- Set the detection zone where the AI is detecting targets.
-- @param #AI_PATROL_ZONE self
-- @param Core.Zone#ZONE DetectionZone The zone where to detect targets.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:SetDetectionZone( DetectionZone )
self:F2()
if DetectionZone then
self.DetectZone = DetectionZone
else
self.DetectZone = nil
end
end
--- Gets a list of @{Unit#UNIT}s that were detected by the AI.
-- No filtering is applied, so, ANY detected UNIT can be in this list.
-- It is up to the mission designer to use the @{Unit} class and methods to filter the targets.
-- @param #AI_PATROL_ZONE self
-- @return #table The list of @{Unit#UNIT}s
function AI_PATROL_ZONE:GetDetectedUnits()
self:F2()
return self.DetectedUnits
end
--- Clears the list of @{Unit#UNIT}s that were detected by the AI.
-- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:ClearDetectedUnits()
self:F2()
self.DetectedUnits = {}
end
--- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.
-- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
-- When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROL_ZONE.
-- Once the time is finished, the old AI will return to the base.
-- @param #AI_PATROL_ZONE self
-- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
-- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime )
self.PatrolManageFuel = true
self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage
self.PatrolOutOfFuelOrbitTime = PatrolOutOfFuelOrbitTime
return self
end
--- When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.
-- However, damage cannot be foreseen early on.
-- Therefore, when the damage treshold is reached,
-- the AI will return immediately to the home base (RTB).
-- Note that for groups, the average damage of the complete group will be calculated.
-- So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.
-- @param #AI_PATROL_ZONE self
-- @param #number PatrolDamageTreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
-- @return #AI_PATROL_ZONE self
function AI_PATROL_ZONE:ManageDamage( PatrolDamageTreshold )
self.PatrolManageDamage = true
self.PatrolDamageTreshold = PatrolDamageTreshold
return self
end
--- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings.
-- @param #AI_PATROL_ZONE self
-- @return #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To )
self:F2()
self:__Route( 1 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live.
self:__Status( 60 ) -- Check status status every 30 seconds.
self:SetDetectionActivated()
self:HandleEvent( EVENTS.PilotDead, self.OnPilotDead )
self:HandleEvent( EVENTS.Crash, self.OnCrash )
self:HandleEvent( EVENTS.Ejection, self.OnEjection )
Controllable:OptionROEHoldFire()
Controllable:OptionROTVertical()
self.Controllable:OnReSpawn(
function( PatrolGroup )
self:E( "ReSpawn" )
self:__Reset( 1 )
self:__Route( 5 )
end
)
self:SetDetectionOn()
end
--- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable
function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To )
return self.DetectOn and self.DetectActivated
end
--- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable
function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To )
local Detected = false
local DetectedTargets = Controllable:GetDetectedTargets()
for TargetID, Target in pairs( DetectedTargets or {} ) do
local TargetObject = Target.object
if TargetObject and TargetObject:isExist() and TargetObject.id_ < 50000000 then
local TargetUnit = UNIT:Find( TargetObject )
local TargetUnitName = TargetUnit:GetName()
if self.DetectionZone then
if TargetUnit:IsInZone( self.DetectionZone ) then
self:T( {"Detected ", TargetUnit } )
if self.DetectedUnits[TargetUnit] == nil then
self.DetectedUnits[TargetUnit] = true
end
Detected = true
end
else
if self.DetectedUnits[TargetUnit] == nil then
self.DetectedUnits[TargetUnit] = true
end
Detected = true
end
end
end
self:__Detect( -self.DetectInterval )
if Detected == true then
self:__Detected( 1.5 )
end
end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable
-- This statis method is called from the route path within the last task at the last waaypoint of the Controllable.
-- Note that this method is required, as triggers the next route when patrolling for the Controllable.
function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable )
local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#AI_PATROL_ZONE
PatrolZone:__Route( 1 )
end
--- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings.
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
self:F2()
-- When RTB, don't allow anymore the routing.
if From == "RTB" then
return
end
if self.Controllable:IsAlive() then
-- Determine if the AIControllable is within the PatrolZone.
-- If not, make a waypoint within the to that the AIControllable will fly at maximum speed to that point.
local PatrolRoute = {}
-- Calculate the current route point of the controllable as the start point of the route.
-- However, when the controllable is not in the air,
-- the controllable current waypoint is probably the airbase...
-- Thus, if we would take the current waypoint as the startpoint, upon take-off, the controllable flies
-- immediately back to the airbase, and this is not correct.
-- Therefore, when on a runway, get as the current route point a random point within the PatrolZone.
-- This will make the plane fly immediately to the patrol zone.
if self.Controllable:InAir() == false then
self:E( "Not in the air, finding route path within PatrolZone" )
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TakeOffParking,
POINT_VEC3.RoutePointAction.FromParkingArea,
ToPatrolZoneSpeed,
true
)
PatrolRoute[#PatrolRoute+1] = CurrentRoutePoint
else
self:E( "In the air, finding route path within PatrolZone" )
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
ToPatrolZoneSpeed,
true
)
PatrolRoute[#PatrolRoute+1] = CurrentRoutePoint
end
--- Define a random point in the @{Zone}. The AI will fly to that point within the zone.
--- Find a random 2D point in PatrolZone.
local ToTargetVec2 = self.PatrolZone:GetRandomVec2()
self:T2( ToTargetVec2 )
--- Define Speed and Altitude.
local ToTargetAltitude = math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude )
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
self:T2( { self.PatrolMinSpeed, self.PatrolMaxSpeed, ToTargetSpeed } )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
ToTargetSpeed,
true
)
--self.CoordTest:SpawnFromVec3( ToTargetPointVec3:GetVec3() )
--ToTargetPointVec3:SmokeRed()
PatrolRoute[#PatrolRoute+1] = ToTargetRoutePoint
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
self.Controllable:WayPointInitialize( PatrolRoute )
--- Do a trick, link the NewPatrolRoute function of the PATROLGROUP object to the AIControllable in a temporary variable ...
self.Controllable:SetState( self.Controllable, "PatrolZone", self )
self.Controllable:WayPointFunction( #PatrolRoute, 1, "AI_PATROL_ZONE:_NewPatrolRoute" )
--- NOW ROUTE THE GROUP!
self.Controllable:WayPointExecute( 1, 2 )
end
end
--- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onbeforeStatus()
return self.CheckStatus
end
--- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterStatus()
self:F2()
if self.Controllable and self.Controllable:IsAlive() then
local RTB = false
local Fuel = self.Controllable:GetUnit(1):GetFuel()
if Fuel < self.PatrolFuelTresholdPercentage then
self:E( self.Controllable:GetName() .. " is out of fuel:" .. Fuel .. ", RTB!" )
local OldAIControllable = self.Controllable
local AIControllableTemplate = self.Controllable:GetTemplate()
local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
local TimedOrbitTask = OldAIControllable:TaskControlled( OrbitTask, OldAIControllable:TaskCondition(nil,nil,nil,nil,self.PatrolOutOfFuelOrbitTime,nil ) )
OldAIControllable:SetTask( TimedOrbitTask, 10 )
RTB = true
else
end
-- TODO: Check GROUP damage function.
local Damage = self.Controllable:GetLife()
if Damage <= self.PatrolDamageTreshold then
self:E( self.Controllable:GetName() .. " is damaged:" .. Damage .. ", RTB!" )
RTB = true
end
if RTB == true then
self:RTB()
else
self:__Status( 60 ) -- Execute the Patrol event after 30 seconds.
end
end
end
--- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterRTB()
self:F2()
if self.Controllable and self.Controllable:IsAlive() then
self:SetDetectionOff()
self.CheckStatus = false
local PatrolRoute = {}
--- Calculate the current route point.
local CurrentVec2 = self.Controllable:GetVec2()
--TODO: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:RoutePointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
ToPatrolZoneSpeed,
true
)
PatrolRoute[#PatrolRoute+1] = CurrentRoutePoint
--- Now we're going to do something special, we're going to call a function from a waypoint action at the AIControllable...
self.Controllable:WayPointInitialize( PatrolRoute )
--- NOW ROUTE THE GROUP!
self.Controllable:WayPointExecute( 1, 1 )
end
end
--- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterDead()
self:SetDetectionOff()
self:SetStatusOff()
end
--- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnCrash( EventData )
if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then
self:E( self.Controllable:GetUnits() )
if #self.Controllable:GetUnits() == 1 then
self:__Crash( 1, EventData )
end
end
end
--- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnEjection( EventData )
if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then
self:__Eject( 1, EventData )
end
end
--- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnPilotDead( EventData )
if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then
self:__PilotDead( 1, EventData )
end
end

View File

@@ -0,0 +1,250 @@
--- **Actions** - ACT_ACCOUNT_ classes **account for** (detect, count & report) various DCS events occuring on @{Unit}s.
--
-- ![Banner Image](..\Presentations\ACT_ACCOUNT\Dia1.JPG)
--
-- ===
--
-- @module Account
do -- ACT_ACCOUNT
--- # @{#ACT_ACCOUNT} FSM class, extends @{Fsm#FSM_PROCESS}
--
-- ## ACT_ACCOUNT state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.
-- All derived classes from this class will start with the class name, followed by a \_. See the relevant derived class descriptions below.
-- Each derived class follows exactly the same process, using the same events and following the same state transitions,
-- but will have **different implementation behaviour** upon each event or state transition.
--
-- ### ACT_ACCOUNT States
--
-- * **Asigned**: The player is assigned.
-- * **Waiting**: Waiting for an event.
-- * **Report**: Reporting.
-- * **Account**: Account for an event.
-- * **Accounted**: All events have been accounted for, end of the process.
-- * **Failed**: Failed the process.
--
-- ### ACT_ACCOUNT Events
--
-- * **Start**: Start the process.
-- * **Wait**: Wait for an event.
-- * **Report**: Report the status of the accounting.
-- * **Event**: An event happened, process the event.
-- * **More**: More targets.
-- * **NoMore (*)**: No more targets.
-- * **Fail (*)**: The action process has failed.
--
-- (*) End states of the process.
--
-- ### ACT_ACCOUNT state transition methods:
--
-- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state.
-- There are 2 moments when state transition methods will be called by the state machine:
--
-- * **Before** the state transition.
-- The state transition method needs to start with the name **OnBefore + the name of the state**.
-- If the state transition method returns false, then the processing of the state transition will not be done!
-- If you want to change the behaviour of the AIControllable at this event, return false,
-- but then you'll need to specify your own logic using the AIControllable!
--
-- * **After** the state transition.
-- The state transition method needs to start with the name **OnAfter + the name of the state**.
-- These state transition methods need to provide a return value, which is specified at the function description.
--
-- @type ACT_ACCOUNT
-- @field Set#SET_UNIT TargetSetUnit
-- @extends Core.Fsm#FSM_PROCESS
ACT_ACCOUNT = {
ClassName = "ACT_ACCOUNT",
TargetSetUnit = nil,
}
--- Creates a new DESTROY process.
-- @param #ACT_ACCOUNT self
-- @return #ACT_ACCOUNT
function ACT_ACCOUNT:New()
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_PROCESS:New() ) -- Core.Fsm#FSM_PROCESS
self:AddTransition( "Assigned", "Start", "Waiting")
self:AddTransition( "*", "Wait", "Waiting")
self:AddTransition( "*", "Report", "Report")
self:AddTransition( "*", "Event", "Account")
self:AddTransition( "Account", "More", "Wait")
self:AddTransition( "Account", "NoMore", "Accounted")
self:AddTransition( "*", "Fail", "Failed")
self:AddEndState( "Accounted" )
self:AddEndState( "Failed" )
self:SetStartState( "Assigned" )
return self
end
--- Process Events
--- StateMachine callback function
-- @param #ACT_ACCOUNT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT:onafterStart( ProcessUnit, From, Event, To )
self:HandleEvent( EVENTS.Dead, self.onfuncEventDead )
self:__Wait( 1 )
end
--- StateMachine callback function
-- @param #ACT_ACCOUNT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT:onenterWaiting( ProcessUnit, From, Event, To )
if self.DisplayCount >= self.DisplayInterval then
self:Report()
self.DisplayCount = 1
else
self.DisplayCount = self.DisplayCount + 1
end
return true -- Process always the event.
end
--- StateMachine callback function
-- @param #ACT_ACCOUNT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To, Event )
self:__NoMore( 1 )
end
end -- ACT_ACCOUNT
do -- ACT_ACCOUNT_DEADS
--- # @{#ACT_ACCOUNT_DEADS} FSM class, extends @{Fsm.Account#ACT_ACCOUNT}
--
-- The ACT_ACCOUNT_DEADS class accounts (detects, counts and reports) successful kills of DCS units.
-- The process is given a @{Set} of units that will be tracked upon successful destruction.
-- The process will end after each target has been successfully destroyed.
-- Each successful dead will trigger an Account state transition that can be scored, modified or administered.
--
--
-- ## ACT_ACCOUNT_DEADS constructor:
--
-- * @{#ACT_ACCOUNT_DEADS.New}(): Creates a new ACT_ACCOUNT_DEADS object.
--
-- @type ACT_ACCOUNT_DEADS
-- @field Set#SET_UNIT TargetSetUnit
-- @extends #ACT_ACCOUNT
ACT_ACCOUNT_DEADS = {
ClassName = "ACT_ACCOUNT_DEADS",
TargetSetUnit = nil,
}
--- Creates a new DESTROY process.
-- @param #ACT_ACCOUNT_DEADS self
-- @param Set#SET_UNIT TargetSetUnit
-- @param #string TaskName
function ACT_ACCOUNT_DEADS:New( TargetSetUnit, TaskName )
-- Inherits from BASE
local self = BASE:Inherit( self, ACT_ACCOUNT:New() ) -- #ACT_ACCOUNT_DEADS
self.TargetSetUnit = TargetSetUnit
self.TaskName = TaskName
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
self.DisplayCategory = "HQ" -- Targets is the default display category
return self
end
function ACT_ACCOUNT_DEADS:Init( FsmAccount )
self.TargetSetUnit = FsmAccount.TargetSetUnit
self.TaskName = FsmAccount.TaskName
end
--- Process Events
--- StateMachine callback function
-- @param #ACT_ACCOUNT_DEADS self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, Task, From, Event, To )
self:E( { ProcessUnit, From, Event, To } )
self:Message( "Your group with assigned " .. self.TaskName .. " task has " .. self.TargetSetUnit:GetUnitTypesText() .. " targets left to be destroyed." )
end
--- StateMachine callback function
-- @param #ACT_ACCOUNT_DEADS self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, Task, From, Event, To, EventData )
self:T( { ProcessUnit, EventData, From, Event, To } )
self:T({self.Controllable})
self.TargetSetUnit:Flush()
self:T( { "Before sending Message", EventData.IniUnitName, self.TargetSetUnit:FindUnit( EventData.IniUnitName ) } )
if self.TargetSetUnit:FindUnit( EventData.IniUnitName ) then
self:T( "Sending Message" )
local TaskGroup = ProcessUnit:GetGroup()
self.TargetSetUnit:Remove( EventData.IniUnitName )
self:Message( "You hit a target. Your group with assigned " .. self.TaskName .. " task has " .. self.TargetSetUnit:Count() .. " targets ( " .. self.TargetSetUnit:GetUnitTypesText() .. " ) left to be destroyed." )
end
self:T( { "After sending Message" } )
end
--- StateMachine callback function
-- @param #ACT_ACCOUNT_DEADS self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, Task, From, Event, To )
if self.TargetSetUnit:Count() > 0 then
self:__More( 1 )
else
self:__NoMore( 1 )
end
end
--- DCS Events
--- @param #ACT_ACCOUNT_DEADS self
-- @param Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:onfuncEventDead( EventData )
self:T( { "EventDead", EventData } )
if EventData.IniDCSUnit then
self:Event( EventData )
end
end
end -- ACT_ACCOUNT DEADS

View File

@@ -0,0 +1,291 @@
--- (SP) (MP) (FSM) Accept or reject process for player (task) assignments.
--
-- ===
--
-- # @{#ACT_ASSIGN} FSM template class, extends @{Fsm#FSM_PROCESS}
--
-- ## ACT_ASSIGN state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.
-- All derived classes from this class will start with the class name, followed by a \_. See the relevant derived class descriptions below.
-- Each derived class follows exactly the same process, using the same events and following the same state transitions,
-- but will have **different implementation behaviour** upon each event or state transition.
--
-- ### ACT_ASSIGN **Events**:
--
-- These are the events defined in this class:
--
-- * **Start**: Start the tasking acceptance process.
-- * **Assign**: Assign the task.
-- * **Reject**: Reject the task..
--
-- ### ACT_ASSIGN **Event methods**:
--
-- Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process.
-- There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:
--
-- * **Immediate**: The event method has exactly the name of the event.
-- * **Delayed**: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
--
-- ### ACT_ASSIGN **States**:
--
-- * **UnAssigned**: The player has not accepted the task.
-- * **Assigned (*)**: The player has accepted the task.
-- * **Rejected (*)**: The player has not accepted the task.
-- * **Waiting**: The process is awaiting player feedback.
-- * **Failed (*)**: The process has failed.
--
-- (*) End states of the process.
--
-- ### ACT_ASSIGN state transition methods:
--
-- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state.
-- There are 2 moments when state transition methods will be called by the state machine:
--
-- * **Before** the state transition.
-- The state transition method needs to start with the name **OnBefore + the name of the state**.
-- If the state transition method returns false, then the processing of the state transition will not be done!
-- If you want to change the behaviour of the AIControllable at this event, return false,
-- but then you'll need to specify your own logic using the AIControllable!
--
-- * **After** the state transition.
-- The state transition method needs to start with the name **OnAfter + the name of the state**.
-- These state transition methods need to provide a return value, which is specified at the function description.
--
-- ===
--
-- # 1) @{#ACT_ASSIGN_ACCEPT} class, extends @{Fsm.Assign#ACT_ASSIGN}
--
-- The ACT_ASSIGN_ACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.
--
-- ## 1.1) ACT_ASSIGN_ACCEPT constructor:
--
-- * @{#ACT_ASSIGN_ACCEPT.New}(): Creates a new ACT_ASSIGN_ACCEPT object.
--
-- ===
--
-- # 2) @{#ACT_ASSIGN_MENU_ACCEPT} class, extends @{Fsm.Assign#ACT_ASSIGN}
--
-- The ACT_ASSIGN_MENU_ACCEPT class accepts a task when the player accepts the task through an added menu option.
-- This assignment type is useful to conditionally allow the player to choose whether or not he would accept the task.
-- The assignment type also allows to reject the task.
--
-- ## 2.1) ACT_ASSIGN_MENU_ACCEPT constructor:
-- -----------------------------------------
--
-- * @{#ACT_ASSIGN_MENU_ACCEPT.New}(): Creates a new ACT_ASSIGN_MENU_ACCEPT object.
--
-- ===
--
-- @module Assign
do -- ACT_ASSIGN
--- ACT_ASSIGN class
-- @type ACT_ASSIGN
-- @field Tasking.Task#TASK Task
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Zone#ZONE_BASE TargetZone
-- @extends Core.Fsm#FSM_PROCESS
ACT_ASSIGN = {
ClassName = "ACT_ASSIGN",
}
--- Creates a new task assignment state machine. The process will accept the task by default, no player intervention accepted.
-- @param #ACT_ASSIGN self
-- @return #ACT_ASSIGN The task acceptance process.
function ACT_ASSIGN:New()
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_PROCESS:New( "ACT_ASSIGN" ) ) -- Core.Fsm#FSM_PROCESS
self:AddTransition( "UnAssigned", "Start", "Waiting" )
self:AddTransition( "Waiting", "Assign", "Assigned" )
self:AddTransition( "Waiting", "Reject", "Rejected" )
self:AddTransition( "*", "Fail", "Failed" )
self:AddEndState( "Assigned" )
self:AddEndState( "Rejected" )
self:AddEndState( "Failed" )
self:SetStartState( "UnAssigned" )
return self
end
end -- ACT_ASSIGN
do -- ACT_ASSIGN_ACCEPT
--- ACT_ASSIGN_ACCEPT class
-- @type ACT_ASSIGN_ACCEPT
-- @field Tasking.Task#TASK Task
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Zone#ZONE_BASE TargetZone
-- @extends #ACT_ASSIGN
ACT_ASSIGN_ACCEPT = {
ClassName = "ACT_ASSIGN_ACCEPT",
}
--- Creates a new task assignment state machine. The process will accept the task by default, no player intervention accepted.
-- @param #ACT_ASSIGN_ACCEPT self
-- @param #string TaskBriefing
function ACT_ASSIGN_ACCEPT:New( TaskBriefing )
local self = BASE:Inherit( self, ACT_ASSIGN:New() ) -- #ACT_ASSIGN_ACCEPT
self.TaskBriefing = TaskBriefing
return self
end
function ACT_ASSIGN_ACCEPT:Init( FsmAssign )
self.TaskBriefing = FsmAssign.TaskBriefing
end
--- StateMachine callback function
-- @param #ACT_ASSIGN_ACCEPT self
-- @param Wrapper.Unit#UNIT ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, From, Event, To )
self:E( { ProcessUnit, From, Event, To } )
self:__Assign( 1 )
end
--- StateMachine callback function
-- @param #ACT_ASSIGN_ACCEPT self
-- @param Wrapper.Unit#UNIT ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, From, Event, To )
env.info( "in here" )
self:E( { ProcessUnit, From, Event, To } )
local ProcessGroup = ProcessUnit:GetGroup()
self.Task:Assign( ProcessUnit, ProcessUnit:GetPlayerName() )
end
end -- ACT_ASSIGN_ACCEPT
do -- ACT_ASSIGN_MENU_ACCEPT
--- ACT_ASSIGN_MENU_ACCEPT class
-- @type ACT_ASSIGN_MENU_ACCEPT
-- @field Tasking.Task#TASK Task
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Zone#ZONE_BASE TargetZone
-- @extends #ACT_ASSIGN
ACT_ASSIGN_MENU_ACCEPT = {
ClassName = "ACT_ASSIGN_MENU_ACCEPT",
}
--- Init.
-- @param #ACT_ASSIGN_MENU_ACCEPT self
-- @param #string TaskName
-- @param #string TaskBriefing
-- @return #ACT_ASSIGN_MENU_ACCEPT self
function ACT_ASSIGN_MENU_ACCEPT:New( TaskName, TaskBriefing )
-- Inherits from BASE
local self = BASE:Inherit( self, ACT_ASSIGN:New() ) -- #ACT_ASSIGN_MENU_ACCEPT
self.TaskName = TaskName
self.TaskBriefing = TaskBriefing
return self
end
function ACT_ASSIGN_MENU_ACCEPT:Init( FsmAssign )
self.TaskName = FsmAssign.TaskName
self.TaskBriefing = FsmAssign.TaskBriefing
end
--- Creates a new task assignment state machine. The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.
-- @param #ACT_ASSIGN_MENU_ACCEPT self
-- @param #string TaskName
-- @param #string TaskBriefing
-- @return #ACT_ASSIGN_MENU_ACCEPT self
function ACT_ASSIGN_MENU_ACCEPT:Init( TaskName, TaskBriefing )
self.TaskBriefing = TaskBriefing
self.TaskName = TaskName
return self
end
--- StateMachine callback function
-- @param #ACT_ASSIGN_MENU_ACCEPT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, From, Event, To )
self:E( { ProcessUnit, From, Event, To } )
self:Message( "Access the radio menu to accept the task. You have 30 seconds or the assignment will be cancelled." )
local ProcessGroup = ProcessUnit:GetGroup()
self.Menu = MENU_GROUP:New( ProcessGroup, "Task " .. self.TaskName .. " acceptance" )
self.MenuAcceptTask = MENU_GROUP_COMMAND:New( ProcessGroup, "Accept task " .. self.TaskName, self.Menu, self.MenuAssign, self )
self.MenuRejectTask = MENU_GROUP_COMMAND:New( ProcessGroup, "Reject task " .. self.TaskName, self.Menu, self.MenuReject, self )
end
--- Menu function.
-- @param #ACT_ASSIGN_MENU_ACCEPT self
function ACT_ASSIGN_MENU_ACCEPT:MenuAssign()
self:E( )
self:__Assign( 1 )
end
--- Menu function.
-- @param #ACT_ASSIGN_MENU_ACCEPT self
function ACT_ASSIGN_MENU_ACCEPT:MenuReject()
self:E( )
self:__Reject( 1 )
end
--- StateMachine callback function
-- @param #ACT_ASSIGN_MENU_ACCEPT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, From, Event, To )
self:E( { ProcessUnit.UnitNameFrom, Event, To } )
self.Menu:Remove()
end
--- StateMachine callback function
-- @param #ACT_ASSIGN_MENU_ACCEPT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, From, Event, To )
self:E( { ProcessUnit.UnitName, From, Event, To } )
self.Menu:Remove()
--TODO: need to resolve this problem ... it has to do with the events ...
--self.Task:UnAssignFromUnit( ProcessUnit )needs to become a callback funtion call upon the event
ProcessUnit:Destroy()
end
end -- ACT_ASSIGN_MENU_ACCEPT

View File

@@ -0,0 +1,217 @@
--- (SP) (MP) (FSM) Route AI or players through waypoints or to zones.
--
-- ===
--
-- # @{#ACT_ASSIST} FSM class, extends @{Fsm#FSM_PROCESS}
--
-- ## ACT_ASSIST state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.
-- All derived classes from this class will start with the class name, followed by a \_. See the relevant derived class descriptions below.
-- Each derived class follows exactly the same process, using the same events and following the same state transitions,
-- but will have **different implementation behaviour** upon each event or state transition.
--
-- ### ACT_ASSIST **Events**:
--
-- These are the events defined in this class:
--
-- * **Start**: The process is started.
-- * **Next**: The process is smoking the targets in the given zone.
--
-- ### ACT_ASSIST **Event methods**:
--
-- Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process.
-- There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:
--
-- * **Immediate**: The event method has exactly the name of the event.
-- * **Delayed**: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
--
-- ### ACT_ASSIST **States**:
--
-- * **None**: The controllable did not receive route commands.
-- * **AwaitSmoke (*)**: The process is awaiting to smoke the targets in the zone.
-- * **Smoking (*)**: The process is smoking the targets in the zone.
-- * **Failed (*)**: The process has failed.
--
-- (*) End states of the process.
--
-- ### ACT_ASSIST state transition methods:
--
-- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state.
-- There are 2 moments when state transition methods will be called by the state machine:
--
-- * **Before** the state transition.
-- The state transition method needs to start with the name **OnBefore + the name of the state**.
-- If the state transition method returns false, then the processing of the state transition will not be done!
-- If you want to change the behaviour of the AIControllable at this event, return false,
-- but then you'll need to specify your own logic using the AIControllable!
--
-- * **After** the state transition.
-- The state transition method needs to start with the name **OnAfter + the name of the state**.
-- These state transition methods need to provide a return value, which is specified at the function description.
--
-- ===
--
-- # 1) @{#ACT_ASSIST_SMOKE_TARGETS_ZONE} class, extends @{Fsm.Route#ACT_ASSIST}
--
-- The ACT_ASSIST_SMOKE_TARGETS_ZONE class implements the core functions to smoke targets in a @{Zone}.
-- The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour.
-- At random intervals, a new target is smoked.
--
-- # 1.1) ACT_ASSIST_SMOKE_TARGETS_ZONE constructor:
--
-- * @{#ACT_ASSIST_SMOKE_TARGETS_ZONE.New}(): Creates a new ACT_ASSIST_SMOKE_TARGETS_ZONE object.
--
-- ===
--
-- @module Smoke
do -- ACT_ASSIST
--- ACT_ASSIST class
-- @type ACT_ASSIST
-- @extends Core.Fsm#FSM_PROCESS
ACT_ASSIST = {
ClassName = "ACT_ASSIST",
}
--- Creates a new target smoking state machine. The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.
-- @param #ACT_ASSIST self
-- @return #ACT_ASSIST
function ACT_ASSIST:New()
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_PROCESS:New( "ACT_ASSIST" ) ) -- Core.Fsm#FSM_PROCESS
self:AddTransition( "None", "Start", "AwaitSmoke" )
self:AddTransition( "AwaitSmoke", "Next", "Smoking" )
self:AddTransition( "Smoking", "Next", "AwaitSmoke" )
self:AddTransition( "*", "Stop", "Success" )
self:AddTransition( "*", "Fail", "Failed" )
self:AddEndState( "Failed" )
self:AddEndState( "Success" )
self:SetStartState( "None" )
return self
end
--- Task Events
--- StateMachine callback function
-- @param #ACT_ASSIST self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIST:onafterStart( ProcessUnit, From, Event, To )
local ProcessGroup = ProcessUnit:GetGroup()
local MissionMenu = self:GetMission():GetMenu( ProcessGroup )
local function MenuSmoke( MenuParam )
self:E( MenuParam )
local self = MenuParam.self
local SmokeColor = MenuParam.SmokeColor
self.SmokeColor = SmokeColor
self:__Next( 1 )
end
self.Menu = MENU_GROUP:New( ProcessGroup, "Target acquisition", MissionMenu )
self.MenuSmokeBlue = MENU_GROUP_COMMAND:New( ProcessGroup, "Drop blue smoke on targets", self.Menu, MenuSmoke, { self = self, SmokeColor = SMOKECOLOR.Blue } )
self.MenuSmokeGreen = MENU_GROUP_COMMAND:New( ProcessGroup, "Drop green smoke on targets", self.Menu, MenuSmoke, { self = self, SmokeColor = SMOKECOLOR.Green } )
self.MenuSmokeOrange = MENU_GROUP_COMMAND:New( ProcessGroup, "Drop Orange smoke on targets", self.Menu, MenuSmoke, { self = self, SmokeColor = SMOKECOLOR.Orange } )
self.MenuSmokeRed = MENU_GROUP_COMMAND:New( ProcessGroup, "Drop Red smoke on targets", self.Menu, MenuSmoke, { self = self, SmokeColor = SMOKECOLOR.Red } )
self.MenuSmokeWhite = MENU_GROUP_COMMAND:New( ProcessGroup, "Drop White smoke on targets", self.Menu, MenuSmoke, { self = self, SmokeColor = SMOKECOLOR.White } )
end
--- StateMachine callback function
-- @param #ACT_ASSIST self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIST:onafterStop( ProcessUnit, From, Event, To )
self.Menu:Remove() -- When stopped, remove the menus
end
end
do -- ACT_ASSIST_SMOKE_TARGETS_ZONE
--- ACT_ASSIST_SMOKE_TARGETS_ZONE class
-- @type ACT_ASSIST_SMOKE_TARGETS_ZONE
-- @field Set#SET_UNIT TargetSetUnit
-- @field Core.Zone#ZONE_BASE TargetZone
-- @extends #ACT_ASSIST
ACT_ASSIST_SMOKE_TARGETS_ZONE = {
ClassName = "ACT_ASSIST_SMOKE_TARGETS_ZONE",
}
-- function ACT_ASSIST_SMOKE_TARGETS_ZONE:_Destructor()
-- self:E("_Destructor")
--
-- self.Menu:Remove()
-- self:EventRemoveAll()
-- end
--- Creates a new target smoking state machine. The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.
-- @param #ACT_ASSIST_SMOKE_TARGETS_ZONE self
-- @param Set#SET_UNIT TargetSetUnit
-- @param Core.Zone#ZONE_BASE TargetZone
function ACT_ASSIST_SMOKE_TARGETS_ZONE:New( TargetSetUnit, TargetZone )
local self = BASE:Inherit( self, ACT_ASSIST:New() ) -- #ACT_ASSIST
self.TargetSetUnit = TargetSetUnit
self.TargetZone = TargetZone
return self
end
function ACT_ASSIST_SMOKE_TARGETS_ZONE:Init( FsmSmoke )
self.TargetSetUnit = FsmSmoke.TargetSetUnit
self.TargetZone = FsmSmoke.TargetZone
end
--- Creates a new target smoking state machine. The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.
-- @param #ACT_ASSIST_SMOKE_TARGETS_ZONE self
-- @param Set#SET_UNIT TargetSetUnit
-- @param Core.Zone#ZONE_BASE TargetZone
-- @return #ACT_ASSIST_SMOKE_TARGETS_ZONE self
function ACT_ASSIST_SMOKE_TARGETS_ZONE:Init( TargetSetUnit, TargetZone )
self.TargetSetUnit = TargetSetUnit
self.TargetZone = TargetZone
return self
end
--- StateMachine callback function
-- @param #ACT_ASSIST_SMOKE_TARGETS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To )
self.TargetSetUnit:ForEachUnit(
--- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit )
if math.random( 1, ( 100 * self.TargetSetUnit:Count() ) / 4 ) <= 100 then
SCHEDULER:New( self,
function()
if SmokeUnit:IsAlive() then
SmokeUnit:Smoke( self.SmokeColor, 150 )
end
end, {}, math.random( 10, 60 )
)
end
end
)
end
end

View File

@@ -0,0 +1,198 @@
--- @module Process_JTAC
--- PROCESS_JTAC class
-- @type PROCESS_JTAC
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Set#SET_UNIT TargetSetUnit
-- @extends Core.Fsm#FSM_PROCESS
PROCESS_JTAC = {
ClassName = "PROCESS_JTAC",
Fsm = {},
TargetSetUnit = nil,
}
--- Creates a new DESTROY process.
-- @param #PROCESS_JTAC self
-- @param Tasking.Task#TASK Task
-- @param Wrapper.Unit#UNIT ProcessUnit
-- @param Core.Set#SET_UNIT TargetSetUnit
-- @param Wrapper.Unit#UNIT FACUnit
-- @return #PROCESS_JTAC self
function PROCESS_JTAC:New( Task, ProcessUnit, TargetSetUnit, FACUnit )
-- Inherits from BASE
local self = BASE:Inherit( self, PROCESS:New( "JTAC", Task, ProcessUnit ) ) -- #PROCESS_JTAC
self.TargetSetUnit = TargetSetUnit
self.FACUnit = FACUnit
self.DisplayInterval = 60
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
self.DisplayCategory = "HQ" -- Targets is the default display category
self.Fsm = FSM_PROCESS:New( self, {
initial = 'Assigned',
events = {
{ name = 'Start', from = 'Assigned', to = 'CreatedMenu' },
{ name = 'JTACMenuUpdate', from = 'CreatedMenu', to = 'AwaitingMenu' },
{ name = 'JTACMenuAwait', from = 'AwaitingMenu', to = 'AwaitingMenu' },
{ name = 'JTACMenuSpot', from = 'AwaitingMenu', to = 'AwaitingMenu' },
{ name = 'JTACMenuCancel', from = 'AwaitingMenu', to = 'AwaitingMenu' },
{ name = 'JTACStatus', from = 'AwaitingMenu', to = 'AwaitingMenu' },
{ name = 'Fail', from = 'AwaitingMenu', to = 'Failed' },
{ name = 'Fail', from = 'CreatedMenu', to = 'Failed' },
},
callbacks = {
onStart = self.OnStart,
onJTACMenuUpdate = self.OnJTACMenuUpdate,
onJTACMenuAwait = self.OnJTACMenuAwait,
onJTACMenuSpot = self.OnJTACMenuSpot,
onJTACMenuCancel = self.OnJTACMenuCancel,
},
endstates = { 'Failed' }
} )
self:HandleEvent( EVENTS.Dead, self.EventDead )
return self
end
--- Process Events
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_JTAC self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_JTAC:OnStart( Fsm, From, Event, To )
self:NextEvent( Fsm.JTACMenuUpdate )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_JTAC self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_JTAC:OnJTACMenuUpdate( Fsm, From, Event, To )
local function JTACMenuSpot( MenuParam )
self:E( MenuParam.TargetUnit.UnitName )
local self = MenuParam.self
local TargetUnit = MenuParam.TargetUnit
self:NextEvent( self.Fsm.JTACMenuSpot, TargetUnit )
end
local function JTACMenuCancel( MenuParam )
self:E( MenuParam )
local self = MenuParam.self
local TargetUnit = MenuParam.TargetUnit
self:NextEvent( self.Fsm.JTACMenuCancel, TargetUnit )
end
-- Loop each unit in the target set, and determine the threat levels map table.
local UnitThreatLevels = self.TargetSetUnit:GetUnitThreatLevels()
self:E( {"UnitThreadLevels", UnitThreatLevels } )
local JTACMenu = self.ProcessGroup:GetState( self.ProcessGroup, "JTACMenu" )
if not JTACMenu then
JTACMenu = MENU_GROUP:New( self.ProcessGroup, "JTAC", self.MissionMenu )
for ThreatLevel, ThreatLevelTable in pairs( UnitThreatLevels ) do
local JTACMenuThreatLevel = MENU_GROUP:New( self.ProcessGroup, ThreatLevelTable.UnitThreatLevelText, JTACMenu )
for ThreatUnitName, ThreatUnit in pairs( ThreatLevelTable.Units ) do
local JTACMenuUnit = MENU_GROUP:New( self.ProcessGroup, ThreatUnit:GetTypeName(), JTACMenuThreatLevel )
MENU_GROUP_COMMAND:New( self.ProcessGroup, "Lase Target", JTACMenuUnit, JTACMenuSpot, { self = self, TargetUnit = ThreatUnit } )
MENU_GROUP_COMMAND:New( self.ProcessGroup, "Cancel Target", JTACMenuUnit, JTACMenuCancel, { self = self, TargetUnit = ThreatUnit } )
end
end
end
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_JTAC self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_JTAC:OnJTACMenuAwait( Fsm, From, Event, To )
if self.DisplayCount >= self.DisplayInterval then
local TaskJTAC = self.Task -- Tasking.Task#TASK_JTAC
TaskJTAC.Spots = TaskJTAC.Spots or {}
for TargetUnitName, SpotData in pairs( TaskJTAC.Spots) do
local TargetUnit = UNIT:FindByName( TargetUnitName )
self.FACUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. " with laser code " .. SpotData:getCode(), 15, self.ProcessGroup )
end
self.DisplayCount = 1
else
self.DisplayCount = self.DisplayCount + 1
end
self:NextEvent( Fsm.JTACMenuAwait )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_JTAC self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT TargetUnit
function PROCESS_JTAC:OnJTACMenuSpot( Fsm, From, Event, To, TargetUnit )
local TargetUnitName = TargetUnit:GetName()
local TaskJTAC = self.Task -- Tasking.Task#TASK_JTAC
TaskJTAC.Spots = TaskJTAC.Spots or {}
TaskJTAC.Spots[TargetUnitName] = TaskJTAC.Spots[TargetUnitName] or {}
local DCSFACObject = self.FACUnit:GetDCSObject()
local TargetVec3 = TargetUnit:GetVec3()
TaskJTAC.Spots[TargetUnitName] = Spot.createInfraRed( self.FACUnit:GetDCSObject(), { x = 0, y = 1, z = 0 }, TargetUnit:GetVec3(), math.random( 1000, 9999 ) )
local SpotData = TaskJTAC.Spots[TargetUnitName]
self.FACUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. " with laser code " .. SpotData:getCode(), 15, self.ProcessGroup )
self:NextEvent( Fsm.JTACMenuAwait )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_JTAC self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT TargetUnit
function PROCESS_JTAC:OnJTACMenuCancel( Fsm, From, Event, To, TargetUnit )
local TargetUnitName = TargetUnit:GetName()
local TaskJTAC = self.Task -- Tasking.Task#TASK_JTAC
TaskJTAC.Spots = TaskJTAC.Spots or {}
if TaskJTAC.Spots[TargetUnitName] then
TaskJTAC.Spots[TargetUnitName]:destroy() -- destroys the spot
TaskJTAC.Spots[TargetUnitName] = nil
end
self.FACUnit:MessageToGroup( "Stopped lasing " .. TargetUnit:GetTypeName(), 15, self.ProcessGroup )
self:NextEvent( Fsm.JTACMenuAwait )
end

View File

@@ -0,0 +1,173 @@
--- @module Process_Pickup
--- PROCESS_PICKUP class
-- @type PROCESS_PICKUP
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Set#SET_UNIT TargetSetUnit
-- @extends Core.Fsm#FSM_PROCESS
PROCESS_PICKUP = {
ClassName = "PROCESS_PICKUP",
Fsm = {},
TargetSetUnit = nil,
}
--- Creates a new DESTROY process.
-- @param #PROCESS_PICKUP self
-- @param Tasking.Task#TASK Task
-- @param Wrapper.Unit#UNIT ProcessUnit
-- @param Core.Set#SET_UNIT TargetSetUnit
-- @return #PROCESS_PICKUP self
function PROCESS_PICKUP:New( Task, ProcessName, ProcessUnit )
-- Inherits from BASE
local self = BASE:Inherit( self, PROCESS:New( ProcessName, Task, ProcessUnit ) ) -- #PROCESS_PICKUP
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
self.DisplayCategory = "HQ" -- Targets is the default display category
self.Fsm = FSM_PROCESS:New( self, {
initial = 'Assigned',
events = {
{ name = 'Start', from = 'Assigned', to = 'Navigating' },
{ name = 'Start', from = 'Navigating', to = 'Navigating' },
{ name = 'Nearby', from = 'Navigating', to = 'Preparing' },
{ name = 'Pickup', from = 'Preparing', to = 'Loading' },
{ name = 'Load', from = 'Loading', to = 'Success' },
{ name = 'Fail', from = 'Assigned', to = 'Failed' },
{ name = 'Fail', from = 'Navigating', to = 'Failed' },
{ name = 'Fail', from = 'Preparing', to = 'Failed' },
},
callbacks = {
onStart = self.OnStart,
onNearby = self.OnNearby,
onPickup = self.OnPickup,
onLoad = self.OnLoad,
},
endstates = { 'Success', 'Failed' }
} )
return self
end
--- Process Events
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_PICKUP:OnStart( Fsm, From, Event, To )
self:NextEvent( Fsm.Start )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_PICKUP:OnNavigating( Fsm, From, Event, To )
local TaskGroup = self.ProcessUnit:GetGroup()
if self.DisplayCount >= self.DisplayInterval then
MESSAGE:New( "Your group with assigned " .. self.Task:GetName() .. " task has " .. self.TargetSetUnit:GetUnitTypesText() .. " targets left to be destroyed.", 5, "HQ" ):ToGroup( TaskGroup )
self.DisplayCount = 1
else
self.DisplayCount = self.DisplayCount + 1
end
return true -- Process always the event.
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Event#EVENTDATA Event
function PROCESS_PICKUP:OnHitTarget( Fsm, From, Event, To, Event )
self.TargetSetUnit:Flush()
if self.TargetSetUnit:FindUnit( Event.IniUnitName ) then
self.TargetSetUnit:RemoveUnitsByName( Event.IniUnitName )
local TaskGroup = self.ProcessUnit:GetGroup()
MESSAGE:New( "You hit a target. Your group with assigned " .. self.Task:GetName() .. " task has " .. self.TargetSetUnit:Count() .. " targets ( " .. self.TargetSetUnit:GetUnitTypesText() .. " ) left to be destroyed.", 15, "HQ" ):ToGroup( TaskGroup )
end
if self.TargetSetUnit:Count() > 0 then
self:NextEvent( Fsm.MoreTargets )
else
self:NextEvent( Fsm.Destroyed )
end
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_PICKUP:OnMoreTargets( Fsm, From, Event, To )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Event#EVENTDATA DCSEvent
function PROCESS_PICKUP:OnKilled( Fsm, From, Event, To )
self:NextEvent( Fsm.Restart )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_PICKUP:OnRestart( Fsm, From, Event, To )
self:NextEvent( Fsm.Menu )
end
--- StateMachine callback function for a PROCESS
-- @param #PROCESS_PICKUP self
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @param #string Event
-- @param #string From
-- @param #string To
function PROCESS_PICKUP:OnDestroyed( Fsm, From, Event, To )
end
--- DCS Events
--- @param #PROCESS_PICKUP self
-- @param Core.Event#EVENTDATA Event
function PROCESS_PICKUP:EventDead( Event )
if Event.IniDCSUnit then
self:NextEvent( self.Fsm.HitTarget, Event )
end
end

View File

@@ -0,0 +1,449 @@
--- (SP) (MP) (FSM) Route AI or players through waypoints or to zones.
--
-- ===
--
-- # @{#ACT_ROUTE} FSM class, extends @{Fsm#FSM_PROCESS}
--
-- ## ACT_ROUTE state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.
-- All derived classes from this class will start with the class name, followed by a \_. See the relevant derived class descriptions below.
-- Each derived class follows exactly the same process, using the same events and following the same state transitions,
-- but will have **different implementation behaviour** upon each event or state transition.
--
-- ### ACT_ROUTE **Events**:
--
-- These are the events defined in this class:
--
-- * **Start**: The process is started. The process will go into the Report state.
-- * **Report**: The process is reporting to the player the route to be followed.
-- * **Route**: The process is routing the controllable.
-- * **Pause**: The process is pausing the route of the controllable.
-- * **Arrive**: The controllable has arrived at a route point.
-- * **More**: There are more route points that need to be followed. The process will go back into the Report state.
-- * **NoMore**: There are no more route points that need to be followed. The process will go into the Success state.
--
-- ### ACT_ROUTE **Event methods**:
--
-- Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process.
-- There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:
--
-- * **Immediate**: The event method has exactly the name of the event.
-- * **Delayed**: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
--
-- ### ACT_ROUTE **States**:
--
-- * **None**: The controllable did not receive route commands.
-- * **Arrived (*)**: The controllable has arrived at a route point.
-- * **Aborted (*)**: The controllable has aborted the route path.
-- * **Routing**: The controllable is understay to the route point.
-- * **Pausing**: The process is pausing the routing. AI air will go into hover, AI ground will stop moving. Players can fly around.
-- * **Success (*)**: All route points were reached.
-- * **Failed (*)**: The process has failed.
--
-- (*) End states of the process.
--
-- ### ACT_ROUTE state transition methods:
--
-- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state.
-- There are 2 moments when state transition methods will be called by the state machine:
--
-- * **Before** the state transition.
-- The state transition method needs to start with the name **OnBefore + the name of the state**.
-- If the state transition method returns false, then the processing of the state transition will not be done!
-- If you want to change the behaviour of the AIControllable at this event, return false,
-- but then you'll need to specify your own logic using the AIControllable!
--
-- * **After** the state transition.
-- The state transition method needs to start with the name **OnAfter + the name of the state**.
-- These state transition methods need to provide a return value, which is specified at the function description.
--
-- ===
--
-- # 1) @{#ACT_ROUTE_ZONE} class, extends @{Fsm.Route#ACT_ROUTE}
--
-- The ACT_ROUTE_ZONE class implements the core functions to route an AIR @{Controllable} player @{Unit} to a @{Zone}.
-- The player receives on perioding times messages with the coordinates of the route to follow.
-- Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.
--
-- # 1.1) ACT_ROUTE_ZONE constructor:
--
-- * @{#ACT_ROUTE_ZONE.New}(): Creates a new ACT_ROUTE_ZONE object.
--
-- ===
--
-- @module Route
do -- ACT_ROUTE
--- ACT_ROUTE class
-- @type ACT_ROUTE
-- @field Tasking.Task#TASK TASK
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Zone#ZONE_BASE Zone
-- @field Core.Point#COORDINATE Coordinate
-- @extends Core.Fsm#FSM_PROCESS
ACT_ROUTE = {
ClassName = "ACT_ROUTE",
}
--- Creates a new routing state machine. The process will route a CLIENT to a ZONE until the CLIENT is within that ZONE.
-- @param #ACT_ROUTE self
-- @return #ACT_ROUTE self
function ACT_ROUTE:New()
-- Inherits from BASE
local self = BASE:Inherit( self, FSM_PROCESS:New( "ACT_ROUTE" ) ) -- Core.Fsm#FSM_PROCESS
self:AddTransition( "*", "Reset", "None" )
self:AddTransition( "None", "Start", "Routing" )
self:AddTransition( "*", "Report", "*" )
self:AddTransition( "Routing", "Route", "Routing" )
self:AddTransition( "Routing", "Pause", "Pausing" )
self:AddTransition( "Routing", "Arrive", "Arrived" )
self:AddTransition( "*", "Cancel", "Cancelled" )
self:AddTransition( "Arrived", "Success", "Success" )
self:AddTransition( "*", "Fail", "Failed" )
self:AddTransition( "", "", "" )
self:AddTransition( "", "", "" )
self:AddEndState( "Arrived" )
self:AddEndState( "Failed" )
self:AddEndState( "Cancelled" )
self:SetStartState( "None" )
self:SetRouteMode( "C" )
return self
end
--- Set a Cancel Menu item.
-- @param #ACT_ROUTE self
-- @return #ACT_ROUTE
function ACT_ROUTE:SetMenuCancel( MenuGroup, MenuText, ParentMenu, MenuTime )
MENU_GROUP_COMMAND:New(
MenuGroup,
MenuText,
ParentMenu,
self.MenuCancel,
self
):SetTime(MenuTime)
return self
end
--- Set the route mode.
-- There are 2 route modes supported:
--
-- * SetRouteMode( "B" ): Route mode is Bearing and Range.
-- * SetRouteMode( "C" ): Route mode is LL or MGRS according coordinate system setup.
--
-- @param #ACT_ROUTE self
-- @return #ACT_ROUTE
function ACT_ROUTE:SetRouteMode( RouteMode )
self.RouteMode = RouteMode
return self
end
--- Get the routing text to be displayed.
-- The route mode determines the text displayed.
-- @param #ACT_ROUTE self
-- @return #string
function ACT_ROUTE:GetRouteText( FromCoordinate )
local RouteText = ""
if self.Coordinate and self.RouteMode == "B" then
RouteText = "Route to " .. FromCoordinate:GetBRText( self.Coordinate ) .. " km."
end
if self.Coordinate and self.RouteMode == "C" then
RouteText = "Route to " .. self.Coordinate:ToString()
end
if self.Zone and self.RouteMode == "B" then
local Coordinate = self.Zone:GetCoordinate()
RouteText = "Route to zone bearing " .. FromCoordinate:GetBRText( Coordinate ) .. " km."
end
if self.Zone and self.RouteMode == "C" then
local Coordinate = self.Zone:GetCoordinate()
RouteText = "Route to zone at " .. Coordinate:ToString()
end
return RouteText
end
function ACT_ROUTE:MenuCancel()
self:Cancel()
end
--- Task Events
--- StateMachine callback function
-- @param #ACT_ROUTE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ROUTE:onafterStart( ProcessUnit, From, Event, To )
self:__Route( 1 )
end
--- Check if the controllable has arrived.
-- @param #ACT_ROUTE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @return #boolean
function ACT_ROUTE:onfuncHasArrived( ProcessUnit )
return false
end
--- StateMachine callback function
-- @param #ACT_ROUTE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ROUTE:onbeforeRoute( ProcessUnit, From, Event, To )
self:F( { "BeforeRoute 1", self.DisplayCount, self.DisplayInterval } )
if ProcessUnit:IsAlive() then
self:F( "BeforeRoute 2" )
local HasArrived = self:onfuncHasArrived( ProcessUnit ) -- Polymorphic
if self.DisplayCount >= self.DisplayInterval then
self:T( { HasArrived = HasArrived } )
if not HasArrived then
self:Report()
end
self.DisplayCount = 1
else
self.DisplayCount = self.DisplayCount + 1
end
self:T( { DisplayCount = self.DisplayCount } )
if HasArrived then
self:__Arrive( 1 )
else
self:__Route( 1 )
end
return HasArrived -- if false, then the event will not be executed...
end
return false
end
end -- ACT_ROUTE
do -- ACT_ROUTE_POINT
--- ACT_ROUTE_POINT class
-- @type ACT_ROUTE_POINT
-- @field Tasking.Task#TASK TASK
-- @extends #ACT_ROUTE
ACT_ROUTE_POINT = {
ClassName = "ACT_ROUTE_POINT",
}
--- Creates a new routing state machine.
-- The task will route a controllable to a Coordinate until the controllable is within the Range.
-- @param #ACT_ROUTE_POINT self
-- @param Core.Point#COORDINATE The Coordinate to Target.
-- @param #number Range The Distance to Target.
-- @param Core.Zone#ZONE_BASE Zone
function ACT_ROUTE_POINT:New( Coordinate, Range )
local self = BASE:Inherit( self, ACT_ROUTE:New() ) -- #ACT_ROUTE_POINT
self.Coordinate = Coordinate
self.Range = Range or 0
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
return self
end
--- Creates a new routing state machine.
-- The task will route a controllable to a Coordinate until the controllable is within the Range.
-- @param #ACT_ROUTE_POINT self
function ACT_ROUTE_POINT:Init( FsmRoute )
self.Coordinate = FsmRoute.Coordinate
self.Range = FsmRoute.Range or 0
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
self:SetStartState("None")
end
--- Set Coordinate
-- @param #ACT_ROUTE_POINT self
-- @param Core.Point#COORDINATE Coordinate The Coordinate to route to.
function ACT_ROUTE_POINT:SetCoordinate( Coordinate )
self:F2( { Coordinate } )
self.Coordinate = Coordinate
end
--- Get Coordinate
-- @param #ACT_ROUTE_POINT self
-- @return Core.Point#COORDINATE Coordinate The Coordinate to route to.
function ACT_ROUTE_POINT:GetCoordinate()
self:F2( { self.Coordinate } )
return self.Coordinate
end
--- Set Range around Coordinate
-- @param #ACT_ROUTE_POINT self
-- @param #number Range The Range to consider the arrival. Default is 10000 meters.
function ACT_ROUTE_POINT:SetRange( Range )
self:F2( { self.Range } )
self.Range = Range or 10000
end
--- Get Range around Coordinate
-- @param #ACT_ROUTE_POINT self
-- @return #number The Range to consider the arrival. Default is 10000 meters.
function ACT_ROUTE_POINT:GetRange()
return self.Range
end
--- Method override to check if the controllable has arrived.
-- @param #ACT_ROUTE_POINT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @return #boolean
function ACT_ROUTE_POINT:onfuncHasArrived( ProcessUnit )
if ProcessUnit:IsAlive() then
local Distance = self.Coordinate:Get2DDistance( ProcessUnit:GetCoordinate() )
if Distance <= self.Range then
local RouteText = "You have arrived."
self:Message( RouteText )
return true
end
end
return false
end
--- Task Events
--- StateMachine callback function
-- @param #ACT_ROUTE_POINT self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ROUTE_POINT:onafterReport( ProcessUnit, From, Event, To )
local TaskUnitCoordinate = ProcessUnit:GetCoordinate()
local RouteText = self:GetRouteText( TaskUnitCoordinate )
self:Message( RouteText )
end
end -- ACT_ROUTE_POINT
do -- ACT_ROUTE_ZONE
--- ACT_ROUTE_ZONE class
-- @type ACT_ROUTE_ZONE
-- @field Tasking.Task#TASK TASK
-- @field Wrapper.Unit#UNIT ProcessUnit
-- @field Core.Zone#ZONE_BASE Zone
-- @extends #ACT_ROUTE
ACT_ROUTE_ZONE = {
ClassName = "ACT_ROUTE_ZONE",
}
--- Creates a new routing state machine. The task will route a controllable to a ZONE until the controllable is within that ZONE.
-- @param #ACT_ROUTE_ZONE self
-- @param Core.Zone#ZONE_BASE Zone
function ACT_ROUTE_ZONE:New( Zone )
local self = BASE:Inherit( self, ACT_ROUTE:New() ) -- #ACT_ROUTE_ZONE
self.Zone = Zone
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
return self
end
function ACT_ROUTE_ZONE:Init( FsmRoute )
self.Zone = FsmRoute.Zone
self.DisplayInterval = 30
self.DisplayCount = 30
self.DisplayMessage = true
self.DisplayTime = 10 -- 10 seconds is the default
end
--- Set Zone
-- @param #ACT_ROUTE_ZONE self
-- @param Core.Zone#ZONE_BASE Zone The Zone object where to route to.
function ACT_ROUTE_ZONE:SetZone( Zone )
self.Zone = Zone
end
--- Get Zone
-- @param #ACT_ROUTE_ZONE self
-- @return Core.Zone#ZONE_BASE Zone The Zone object where to route to.
function ACT_ROUTE_ZONE:GetZone()
return self.Zone
end
--- Method override to check if the controllable has arrived.
-- @param #ACT_ROUTE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @return #boolean
function ACT_ROUTE_ZONE:onfuncHasArrived( ProcessUnit )
if ProcessUnit:IsInZone( self.Zone ) then
local RouteText = "You have arrived within the zone."
self:Message( RouteText )
end
return ProcessUnit:IsInZone( self.Zone )
end
--- Task Events
--- StateMachine callback function
-- @param #ACT_ROUTE_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE ProcessUnit
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ROUTE_ZONE:onafterReport( ProcessUnit, From, Event, To )
local ZoneVec2 = self.Zone:GetVec2()
local ZoneCoordinate = COORDINATE:New( ZoneVec2.x, ZoneVec2.y )
local TaskUnitVec2 = ProcessUnit:GetVec2()
local TaskUnitCoordinate = COORDINATE:New( TaskUnitVec2.x, TaskUnitVec2.y )
local RouteText = self:GetRouteText( TaskUnitCoordinate )
self:Message( RouteText )
end
end -- ACT_ROUTE_ZONE

View File

@@ -0,0 +1,921 @@
--- **Core** - BASE forms **the basis of the MOOSE framework**. Each class within the MOOSE framework derives from BASE.
--
-- ![Banner Image](..\Presentations\BASE\Dia1.JPG)
--
-- ===
--
-- The @{#BASE} class is the core root class from where every other class in moose is derived.
--
-- ===
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params )
-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added
--
-- Hereby the change log:
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * None.
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming
--
-- @module Base
local _TraceOnOff = true
local _TraceLevel = 1
local _TraceAll = false
local _TraceClass = {}
local _TraceClassMethod = {}
local _ClassID = 0
--- @type BASE
-- @field ClassName The name of the class.
-- @field ClassID The ID number of the class.
-- @field ClassNameAndID The name of the class concatenated with the ID number of the class.
--- # 1) #BASE class
--
-- All classes within the MOOSE framework are derived from the BASE class.
--
-- BASE provides facilities for :
--
-- * The construction and inheritance of MOOSE classes.
-- * The class naming and numbering system.
-- * The class hierarchy search system.
-- * The tracing of information or objects during mission execution for debuggin purposes.
-- * The subscription to DCS events for event handling in MOOSE objects.
--
-- Note: The BASE class is an abstract class and is not meant to be used directly.
--
-- ## 1.1) BASE constructor
--
-- Any class derived from BASE, will use the @{Base#BASE.New} constructor embedded in the @{Base#BASE.Inherit} method.
-- See an example at the @{Base#BASE.New} method how this is done.
--
-- ## 1.2) Trace information for debugging
--
-- The BASE class contains trace methods to trace progress within a mission execution of a certain object.
-- These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.
--
-- Any type of information can be passed to these tracing methods. See the following examples:
--
-- self:E( "Hello" )
--
-- Result in the word "Hello" in the dcs.log.
--
-- local Array = { 1, nil, "h", { "a","b" }, "x" }
-- self:E( Array )
--
-- Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log.
--
-- local Object1 = "Object1"
-- local Object2 = 3
-- local Object3 = { Object 1, Object 2 }
-- self:E( { Object1, Object2, Object3 } )
--
-- Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.
--
-- local SpawnObject = SPAWN:New( "Plane" )
-- local GroupObject = GROUP:FindByName( "Group" )
-- self:E( { Spawn = SpawnObject, Group = GroupObject } )
--
-- Results with the text [1]={Spawn={....),Group={...}} in the dcs.log.
--
-- Below a more detailed explanation of the different method types for tracing.
--
-- ### 1.2.1) Tracing methods categories
--
-- There are basically 3 types of tracing methods available:
--
-- * @{#BASE.F}: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.
-- * @{#BASE.T}: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.
-- * @{#BASE.E}: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.
--
-- ### 1.2.2) 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.
--
-- ### 1.2.3) Trace activation.
--
-- Tracing can be activated in several ways:
--
-- * Switch tracing on or off through the @{#BASE.TraceOnOff}() method.
-- * Activate all tracing through the @{#BASE.TraceAll}() method.
-- * Activate only the tracing of a certain class (name) through the @{#BASE.TraceClass}() method.
-- * Activate only the tracing of a certain method of a certain class through the @{#BASE.TraceClassMethod}() method.
-- * Activate only the tracing of a certain level through the @{#BASE.TraceLevel}() method.
--
-- ### 1.2.4) Check if tracing is on.
--
-- The method @{#BASE.IsTrace}() will validate if tracing is activated or not.
--
-- ## 1.3 DCS simulator Event Handling
--
-- The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator,
-- and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.
--
-- ### 1.3.1 Subscribe / Unsubscribe to DCS Events
--
-- At first, the mission designer will need to **Subscribe** to a specific DCS event for the class.
-- So, when the DCS event occurs, the class will be notified of that event.
-- There are two methods which you use to subscribe to or unsubscribe from an event.
--
-- * @{#BASE.HandleEvent}(): Subscribe to a DCS Event.
-- * @{#BASE.UnHandleEvent}(): Unsubscribe from a DCS Event.
--
-- ### 1.3.2 Event Handling of DCS Events
--
-- Once the class is subscribed to the event, an **Event Handling** method on the object or class needs to be written that will be called
-- when the DCS event occurs. The Event Handling method receives an @{Event#EVENTDATA} structure, which contains a lot of information
-- about the event that occurred.
--
-- Find below an example of the prototype how to write an event handling function for two units:
--
-- local Tank1 = UNIT:FindByName( "Tank A" )
-- local Tank2 = UNIT:FindByName( "Tank B" )
--
-- -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
-- Tank1:HandleEvent( EVENTS.Dead )
-- Tank2:HandleEvent( EVENTS.Dead )
--
-- --- This function is an Event Handling function that will be called when Tank1 is Dead.
-- -- @param Wrapper.Unit#UNIT self
-- -- @param Core.Event#EVENTDATA EventData
-- function Tank1:OnEventDead( EventData )
--
-- self:SmokeGreen()
-- end
--
-- --- This function is an Event Handling function that will be called when Tank2 is Dead.
-- -- @param Wrapper.Unit#UNIT self
-- -- @param Core.Event#EVENTDATA EventData
-- function Tank2:OnEventDead( EventData )
--
-- self:SmokeBlue()
-- end
--
--
--
-- See the @{Event} module for more information about event handling.
--
-- ## 1.4) Class identification methods
--
-- BASE provides methods to get more information of each object:
--
-- * @{#BASE.GetClassID}(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.
-- * @{#BASE.GetClassName}(): Gets the name of the object, which is the name of the class the object was instantiated from.
-- * @{#BASE.GetClassNameAndID}(): Gets the name and ID of the object.
--
-- ## 1.5) All objects derived from BASE can have "States"
--
-- A mechanism is in place in MOOSE, that allows to let the objects administer **states**.
-- States are essentially properties of objects, which are identified by a **Key** and a **Value**.
--
-- The method @{#BASE.SetState}() can be used to set a Value with a reference Key to the object.
-- To **read or retrieve** a state Value based on a Key, use the @{#BASE.GetState} method.
--
-- These two methods provide a very handy way to keep state at long lasting processes.
-- Values can be stored within the objects, and later retrieved or changed when needed.
-- There is one other important thing to note, the @{#BASE.SetState}() and @{#BASE.GetState} methods
-- receive as the **first parameter the object for which the state needs to be set**.
-- Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same
-- object name to the method.
--
-- ## 1.10) Inheritance
--
-- The following methods are available to implement inheritance
--
-- * @{#BASE.Inherit}: Inherits from a class.
-- * @{#BASE.GetParent}: Returns the parent object from the object it is handling, or nil if there is no parent object.
--
-- ===
--
-- @field #BASE BASE
--
BASE = {
ClassName = "BASE",
ClassID = 0,
Events = {},
States = {},
_ = {},
}
--- The Formation Class
-- @type FORMATION
-- @field Cone A cone formation.
FORMATION = {
Cone = "Cone",
Vee = "Vee"
}
--- BASE constructor.
--
-- This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
--
-- function EVENT:New()
-- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
-- return self
-- end
--
-- @param #BASE self
-- @return #BASE
function BASE:New()
local self = routines.utils.deepCopy( self ) -- Create a new self instance
local MetaTable = {}
setmetatable( self, MetaTable )
self.__index = self
_ClassID = _ClassID + 1
self.ClassID = _ClassID
return self
end
function BASE:_Destructor()
--self:E("_Destructor")
--self:EventRemoveAll()
end
-- THIS IS WHY WE NEED LUA 5.2 ...
function BASE:_SetDestructor()
-- TODO: Okay, this is really technical...
-- When you set a proxy to a table to catch __gc, weak tables don't behave like weak...
-- Therefore, I am parking this logic until I've properly discussed all this with the community.
local proxy = newproxy(true)
local proxyMeta = getmetatable(proxy)
proxyMeta.__gc = function ()
env.info("In __gc for " .. self:GetClassNameAndID() )
if self._Destructor then
self:_Destructor()
end
end
-- keep the userdata from newproxy reachable until the object
-- table is about to be garbage-collected - then the __gc hook
-- will be invoked and the destructor called
rawset( self, '__proxy', proxy )
end
--- This is the worker method to inherit from a parent class.
-- @param #BASE self
-- @param Child is the Child class that inherits.
-- @param #BASE Parent is the Parent class that the Child inherits from.
-- @return #BASE Child
function BASE:Inherit( Child, Parent )
local Child = routines.utils.deepCopy( Child )
--local Parent = routines.utils.deepCopy( Parent )
--local Parent = Parent
if Child ~= nil then
setmetatable( Child, Parent )
Child.__index = Child
--Child:_SetDestructor()
end
--self:T( 'Inherited from ' .. Parent.ClassName )
return Child
end
--- This is the worker method to retrieve the Parent class.
-- Note that the Parent class must be passed to call the parent class method.
--
-- self:GetParent(self):ParentMethod()
--
--
-- @param #BASE self
-- @param #BASE Child is the Child class from which the Parent class needs to be retrieved.
-- @return #BASE
function BASE:GetParent( Child )
local Parent = getmetatable( Child )
-- env.info('Inherited class of ' .. Child.ClassName .. ' is ' .. Parent.ClassName )
return Parent
end
--- Get the ClassName + ClassID of the class instance.
-- The ClassName + ClassID is formatted as '%s#%09d'.
-- @param #BASE self
-- @return #string The ClassName + ClassID of the class instance.
function BASE:GetClassNameAndID()
return string.format( '%s#%09d', self.ClassName, self.ClassID )
end
--- Get the ClassName of the class instance.
-- @param #BASE self
-- @return #string The ClassName of the class instance.
function BASE:GetClassName()
return self.ClassName
end
--- Get the ClassID of the class instance.
-- @param #BASE self
-- @return #string The ClassID of the class instance.
function BASE:GetClassID()
return self.ClassID
end
do -- Event Handling
--- Returns the event dispatcher
-- @param #BASE self
-- @return Core.Event#EVENT
function BASE:EventDispatcher()
return _EVENTDISPATCHER
end
--- Get the Class @{Event} processing Priority.
-- The Event processing Priority is a number from 1 to 10,
-- reflecting the order of the classes subscribed to the Event to be processed.
-- @param #BASE self
-- @return #number The @{Event} processing Priority.
function BASE:GetEventPriority()
return self._.EventPriority or 5
end
--- Set the Class @{Event} processing Priority.
-- The Event processing Priority is a number from 1 to 10,
-- reflecting the order of the classes subscribed to the Event to be processed.
-- @param #BASE self
-- @param #number EventPriority The @{Event} processing Priority.
-- @return self
function BASE:SetEventPriority( EventPriority )
self._.EventPriority = EventPriority
end
--- Remove all subscribed events
-- @param #BASE self
-- @return #BASE
function BASE:EventRemoveAll()
self:EventDispatcher():RemoveAll( self )
return self
end
--- Subscribe to a DCS Event.
-- @param #BASE self
-- @param Core.Event#EVENTS Event
-- @param #function EventFunction (optional) The function to be called when the event occurs for the unit.
-- @return #BASE
function BASE:HandleEvent( Event, EventFunction )
self:EventDispatcher():OnEventGeneric( EventFunction, self, Event )
return self
end
--- UnSubscribe to a DCS event.
-- @param #BASE self
-- @param Core.Event#EVENTS Event
-- @return #BASE
function BASE:UnHandleEvent( Event )
self:EventDispatcher():Remove( self, Event )
return self
end
-- Event handling function prototypes
--- Occurs whenever any unit in a mission fires a weapon. But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.
-- @function [parent=#BASE] OnEventShot
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs whenever an object is hit by a weapon.
-- initiator : The unit object the fired the weapon
-- weapon: Weapon object that hit the target
-- target: The Object that was hit.
-- @function [parent=#BASE] OnEventHit
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an aircraft takes off from an airbase, farp, or ship.
-- initiator : The unit that tookoff
-- place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
-- @function [parent=#BASE] OnEventTakeoff
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an aircraft lands at an airbase, farp or ship
-- initiator : The unit that has landed
-- place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
-- @function [parent=#BASE] OnEventLand
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any aircraft crashes into the ground and is completely destroyed.
-- initiator : The unit that has crashed
-- @function [parent=#BASE] OnEventCrash
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a pilot ejects from an aircraft
-- initiator : The unit that has ejected
-- @function [parent=#BASE] OnEventEjection
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an aircraft connects with a tanker and begins taking on fuel.
-- initiator : The unit that is receiving fuel.
-- @function [parent=#BASE] OnEventRefueling
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an object is dead.
-- initiator : The unit that is dead.
-- @function [parent=#BASE] OnEventDead
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an object is completely destroyed.
-- initiator : The unit that is was destroyed.
-- @function [parent=#BASE] OnEvent
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when the pilot of an aircraft is killed. Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane.
-- initiator : The unit that the pilot has died in.
-- @function [parent=#BASE] OnEventPilotDead
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a ground unit captures either an airbase or a farp.
-- initiator : The unit that captured the base
-- place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
-- @function [parent=#BASE] OnEventBaseCaptured
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a mission starts
-- @function [parent=#BASE] OnEventMissionStart
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a mission ends
-- @function [parent=#BASE] OnEventMissionEnd
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an aircraft is finished taking fuel.
-- initiator : The unit that was receiving fuel.
-- @function [parent=#BASE] OnEventRefuelingStop
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any object is spawned into the mission.
-- initiator : The unit that was spawned
-- @function [parent=#BASE] OnEventBirth
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any system fails on a human controlled aircraft.
-- initiator : The unit that had the failure
-- @function [parent=#BASE] OnEventHumanFailure
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any aircraft starts its engines.
-- initiator : The unit that is starting its engines.
-- @function [parent=#BASE] OnEventEngineStartup
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any aircraft shuts down its engines.
-- initiator : The unit that is stopping its engines.
-- @function [parent=#BASE] OnEventEngineShutdown
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any player assumes direct control of a unit.
-- initiator : The unit that is being taken control of.
-- @function [parent=#BASE] OnEventPlayerEnterUnit
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any player relieves control of a unit to the AI.
-- initiator : The unit that the player left.
-- @function [parent=#BASE] OnEventPlayerLeaveUnit
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any unit begins firing a weapon that has a high rate of fire. Most common with aircraft cannons (GAU-8), autocannons, and machine guns.
-- initiator : The unit that is doing the shooing.
-- target: The unit that is being targeted.
-- @function [parent=#BASE] OnEventShootingStart
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when any unit stops firing its weapon. Event will always correspond with a shooting start event.
-- initiator : The unit that was doing the shooing.
-- @function [parent=#BASE] OnEventShootingEnd
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
end
--- Creation of a Birth Event.
-- @param #BASE self
-- @param Dcs.DCSTypes#Time EventTime The time stamp of the event.
-- @param Dcs.DCSWrapper.Object#Object Initiator The initiating object of the event.
-- @param #string IniUnitName The initiating unit name.
-- @param place
-- @param subplace
function BASE:CreateEventBirth( EventTime, Initiator, IniUnitName, place, subplace )
self:F( { EventTime, Initiator, IniUnitName, place, subplace } )
local Event = {
id = world.event.S_EVENT_BIRTH,
time = EventTime,
initiator = Initiator,
IniUnitName = IniUnitName,
place = place,
subplace = subplace
}
world.onEvent( Event )
end
--- Creation of a Crash Event.
-- @param #BASE self
-- @param Dcs.DCSTypes#Time EventTime The time stamp of the event.
-- @param Dcs.DCSWrapper.Object#Object Initiator The initiating object of the event.
function BASE:CreateEventCrash( EventTime, Initiator )
self:F( { EventTime, Initiator } )
local Event = {
id = world.event.S_EVENT_CRASH,
time = EventTime,
initiator = Initiator,
}
world.onEvent( Event )
end
-- TODO: Complete Dcs.DCSTypes#Event structure.
--- The main event handling function... This function captures all events generated for the class.
-- @param #BASE self
-- @param Dcs.DCSTypes#Event event
function BASE:onEvent(event)
--self:F( { BaseEventCodes[event.id], event } )
if self then
for EventID, EventObject in pairs( self.Events ) do
if EventObject.EventEnabled then
--env.info( 'onEvent Table EventObject.Self = ' .. tostring(EventObject.Self) )
--env.info( 'onEvent event.id = ' .. tostring(event.id) )
--env.info( 'onEvent EventObject.Event = ' .. tostring(EventObject.Event) )
if event.id == EventObject.Event then
if self == EventObject.Self then
if event.initiator and event.initiator:isExist() then
event.IniUnitName = event.initiator:getName()
end
if event.target and event.target:isExist() then
event.TgtUnitName = event.target:getName()
end
--self:T( { BaseEventCodes[event.id], event } )
--EventObject.EventFunction( self, event )
end
end
end
end
end
end
--- Set a state or property of the Object given a Key and a Value.
-- Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.
-- @param #BASE self
-- @param Object The object that will hold the Value set by the Key.
-- @param Key The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
-- @param Value The value to is stored in the object.
-- @return The Value set.
-- @return #nil The Key was not found and thus the Value could not be retrieved.
function BASE:SetState( Object, Key, Value )
local ClassNameAndID = Object:GetClassNameAndID()
self.States[ClassNameAndID] = self.States[ClassNameAndID] or {}
self.States[ClassNameAndID][Key] = Value
self:T2( { ClassNameAndID, Key, Value } )
return self.States[ClassNameAndID][Key]
end
--- Get a Value given a Key from the Object.
-- Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.
-- @param #BASE self
-- @param Object The object that holds the Value set by the Key.
-- @param Key The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
-- @param Value The value to is stored in the Object.
-- @return The Value retrieved.
function BASE:GetState( Object, Key )
local ClassNameAndID = Object:GetClassNameAndID()
if self.States[ClassNameAndID] then
local Value = self.States[ClassNameAndID][Key] or false
self:T2( { ClassNameAndID, Key, Value } )
return Value
end
return nil
end
function BASE:ClearState( Object, StateName )
local ClassNameAndID = Object:GetClassNameAndID()
if self.States[ClassNameAndID] then
self.States[ClassNameAndID][StateName] = nil
end
end
-- Trace section
-- Log a trace (only shown when trace is on)
-- TODO: Make trace function using variable parameters.
--- Set trace on or off
-- Note that when trace is off, no debug statement is performed, increasing performance!
-- When Moose is loaded statically, (as one file), tracing is switched off by default.
-- So tracing must be switched on manually in your mission if you are using Moose statically.
-- When moose is loading dynamically (for moose class development), tracing is switched on by default.
-- @param #BASE self
-- @param #boolean TraceOnOff Switch the tracing on or off.
-- @usage
-- -- Switch the tracing On
-- BASE:TraceOnOff( true )
--
-- -- Switch the tracing Off
-- BASE:TraceOnOff( false )
function BASE:TraceOnOff( TraceOnOff )
_TraceOnOff = TraceOnOff
end
--- Enquires if tracing is on (for the class).
-- @param #BASE self
-- @return #boolean
function BASE:IsTrace()
if debug and ( _TraceAll == true ) or ( _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName] ) then
return true
else
return false
end
end
--- Set trace level
-- @param #BASE self
-- @param #number Level
function BASE:TraceLevel( Level )
_TraceLevel = Level
self:E( "Tracing level " .. Level )
end
--- Trace all methods in MOOSE
-- @param #BASE self
-- @param #boolean TraceAll true = trace all methods in MOOSE.
function BASE:TraceAll( TraceAll )
_TraceAll = TraceAll
if _TraceAll then
self:E( "Tracing all methods in MOOSE " )
else
self:E( "Switched off tracing all methods in MOOSE" )
end
end
--- Set tracing for a class
-- @param #BASE self
-- @param #string Class
function BASE:TraceClass( Class )
_TraceClass[Class] = true
_TraceClassMethod[Class] = {}
self:E( "Tracing class " .. Class )
end
--- Set tracing for a specific method of class
-- @param #BASE self
-- @param #string Class
-- @param #string Method
function BASE:TraceClassMethod( Class, Method )
if not _TraceClassMethod[Class] then
_TraceClassMethod[Class] = {}
_TraceClassMethod[Class].Method = {}
end
_TraceClassMethod[Class].Method[Method] = true
self:E( "Tracing method " .. Method .. " of class " .. Class )
end
--- Trace a function call. This function is private.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:_F( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if debug and ( _TraceAll == true ) or ( _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName] ) then
local DebugInfoCurrent = DebugInfoCurrentParam and DebugInfoCurrentParam or debug.getinfo( 2, "nl" )
local DebugInfoFrom = DebugInfoFromParam and DebugInfoFromParam or debug.getinfo( 3, "l" )
local Function = "function"
if DebugInfoCurrent.name then
Function = DebugInfoCurrent.name
end
if _TraceAll == true or _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName].Method[Function] then
local LineCurrent = 0
if DebugInfoCurrent.currentline then
LineCurrent = DebugInfoCurrent.currentline
end
local LineFrom = 0
if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%20s%05d.%s(%s)" , LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) )
end
end
end
--- Trace a function call. Must be at the beginning of the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:F( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 1 then
self:_F( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Trace a function call level 2. Must be at the beginning of the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:F2( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 2 then
self:_F( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Trace a function call level 3. Must be at the beginning of the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:F3( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 3 then
self:_F( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Trace a function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:_T( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if debug and ( _TraceAll == true ) or ( _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName] ) then
local DebugInfoCurrent = DebugInfoCurrentParam and DebugInfoCurrentParam or debug.getinfo( 2, "nl" )
local DebugInfoFrom = DebugInfoFromParam and DebugInfoFromParam or debug.getinfo( 3, "l" )
local Function = "function"
if DebugInfoCurrent.name then
Function = DebugInfoCurrent.name
end
if _TraceAll == true or _TraceClass[self.ClassName] or _TraceClassMethod[self.ClassName].Method[Function] then
local LineCurrent = 0
if DebugInfoCurrent.currentline then
LineCurrent = DebugInfoCurrent.currentline
end
local LineFrom = 0
if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%20s%05d.%s" , LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, routines.utils.oneLineSerialize( Arguments ) ) )
end
end
end
--- Trace a function logic level 1. Can be anywhere within the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:T( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 1 then
self:_T( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Trace a function logic level 2. Can be anywhere within the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:T2( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 2 then
self:_T( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Trace a function logic level 3. Can be anywhere within the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:T3( Arguments )
if debug and _TraceOnOff then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
if _TraceLevel >= 3 then
self:_T( Arguments, DebugInfoCurrent, DebugInfoFrom )
end
end
end
--- Log an exception which will be traced always. Can be anywhere within the function logic.
-- @param #BASE self
-- @param Arguments A #table or any field.
function BASE:E( Arguments )
if debug then
local DebugInfoCurrent = debug.getinfo( 2, "nl" )
local DebugInfoFrom = debug.getinfo( 3, "l" )
local Function = "function"
if DebugInfoCurrent.name then
Function = DebugInfoCurrent.name
end
local LineCurrent = DebugInfoCurrent.currentline
local LineFrom = -1
if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%20s%05d.%s(%s)" , LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) )
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,982 @@
--- This module contains the DATABASE class, managing the database of mission objects.
--
-- ====
--
-- 1) @{#DATABASE} class, extends @{Base#BASE}
-- ===================================================
-- Mission designers can use the DATABASE class to refer to:
--
-- * STATICS
-- * UNITS
-- * GROUPS
-- * CLIENTS
-- * AIRBASES
-- * PLAYERSJOINED
-- * PLAYERS
-- * CARGOS
--
-- On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.
--
-- Moose will automatically create one instance of the DATABASE class into the **global** object _DATABASE.
-- Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.
--
-- 1.1) DATABASE iterators
-- -----------------------
-- You can iterate the database with the available iterator methods.
-- The iterator methods will walk the DATABASE set, and call for each element within the set a function that you provide.
-- The following iterator methods are currently available within the DATABASE:
--
-- * @{#DATABASE.ForEachUnit}: Calls a function for each @{UNIT} it finds within the DATABASE.
-- * @{#DATABASE.ForEachGroup}: Calls a function for each @{GROUP} it finds within the DATABASE.
-- * @{#DATABASE.ForEachPlayer}: Calls a function for each alive player it finds within the DATABASE.
-- * @{#DATABASE.ForEachPlayerJoined}: Calls a function for each joined player it finds within the DATABASE.
-- * @{#DATABASE.ForEachClient}: Calls a function for each @{CLIENT} it finds within the DATABASE.
-- * @{#DATABASE.ForEachClientAlive}: Calls a function for each alive @{CLIENT} it finds within the DATABASE.
--
-- ===
--
-- @module Database
-- @author FlightControl
--- DATABASE class
-- @type DATABASE
-- @extends Core.Base#BASE
DATABASE = {
ClassName = "DATABASE",
Templates = {
Units = {},
Groups = {},
Statics = {},
ClientsByName = {},
ClientsByID = {},
},
UNITS = {},
UNITS_Index = {},
STATICS = {},
GROUPS = {},
PLAYERS = {},
PLAYERSJOINED = {},
CLIENTS = {},
CARGOS = {},
AIRBASES = {},
COUNTRY_ID = {},
COUNTRY_NAME = {},
NavPoints = {},
}
local _DATABASECoalition =
{
[1] = "Red",
[2] = "Blue",
}
local _DATABASECategory =
{
["plane"] = Unit.Category.AIRPLANE,
["helicopter"] = Unit.Category.HELICOPTER,
["vehicle"] = Unit.Category.GROUND_UNIT,
["ship"] = Unit.Category.SHIP,
["static"] = Unit.Category.STRUCTURE,
}
--- Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.
-- @param #DATABASE self
-- @return #DATABASE
-- @usage
-- -- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
-- DBObject = DATABASE:New()
function DATABASE:New()
-- Inherits from BASE
local self = BASE:Inherit( self, BASE:New() ) -- #DATABASE
self:SetEventPriority( 1 )
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.NewCargo )
self:HandleEvent( EVENTS.DeleteCargo )
-- Follow alive players and clients
-- self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
self:_RegisterTemplates()
self:_RegisterGroupsAndUnits()
self:_RegisterClients()
self:_RegisterStatics()
self:_RegisterPlayers()
self:_RegisterAirbases()
self.UNITS_Position = 0
--- @param #DATABASE self
local function CheckPlayers( self )
local UNITS_Count = #self.UNITS_Index
if UNITS_Count > 0 then
self.UNITS_Position = ( ( self.UNITS_Position <= UNITS_Count ) and self.UNITS_Position + 1 ) or 1
local PlayerUnit = self.UNITS[self.UNITS_Index[self.UNITS_Position]]
if PlayerUnit then
local UnitName = PlayerUnit:GetName()
local PlayerName = PlayerUnit:GetPlayerName()
--self:E( { UNITS_Count, self.UNITS_Position, UnitName, PlayerName } )
if PlayerName and PlayerName ~= "" then
if self.PLAYERS[PlayerName] == nil or self.PLAYERS[PlayerName] ~= UnitName then
self:E( { "Add player for unit:", UnitName, PlayerName } )
self:AddPlayer( UnitName, PlayerName )
--_EVENTDISPATCHER:CreateEventPlayerEnterUnit( PlayerUnit )
end
end
end
end
end
self:E( "Scheduling" )
--local PlayerCheckSchedule = SCHEDULER:New( nil, CheckPlayers, { self }, 2, 0.1 )
return self
end
--- Finds a Unit based on the Unit Name.
-- @param #DATABASE self
-- @param #string UnitName
-- @return Wrapper.Unit#UNIT The found Unit.
function DATABASE:FindUnit( UnitName )
local UnitFound = self.UNITS[UnitName]
return UnitFound
end
--- Adds a Unit based on the Unit Name in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddUnit( DCSUnitName )
if not self.UNITS[DCSUnitName] then
local UnitRegister = UNIT:Register( DCSUnitName )
self.UNITS[DCSUnitName] = UNIT:Register( DCSUnitName )
table.insert( self.UNITS_Index, DCSUnitName )
end
return self.UNITS[DCSUnitName]
end
--- Deletes a Unit from the DATABASE based on the Unit Name.
-- @param #DATABASE self
function DATABASE:DeleteUnit( DCSUnitName )
self.UNITS[DCSUnitName] = nil
end
--- Adds a Static based on the Static Name in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddStatic( DCSStaticName )
if not self.STATICS[DCSStaticName] then
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
end
end
--- Deletes a Static from the DATABASE based on the Static Name.
-- @param #DATABASE self
function DATABASE:DeleteStatic( DCSStaticName )
--self.STATICS[DCSStaticName] = nil
end
--- Finds a STATIC based on the StaticName.
-- @param #DATABASE self
-- @param #string StaticName
-- @return Wrapper.Static#STATIC The found STATIC.
function DATABASE:FindStatic( StaticName )
local StaticFound = self.STATICS[StaticName]
return StaticFound
end
--- Adds a Airbase based on the Airbase Name in the DATABASE.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase
function DATABASE:AddAirbase( AirbaseName )
if not self.AIRBASES[AirbaseName] then
self.AIRBASES[AirbaseName] = AIRBASE:Register( AirbaseName )
end
end
--- Deletes a Airbase from the DATABASE based on the Airbase Name.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase
function DATABASE:DeleteAirbase( AirbaseName )
self.AIRBASES[AirbaseName] = nil
end
--- Finds an AIRBASE based on the AirbaseName.
-- @param #DATABASE self
-- @param #string AirbaseName
-- @return Wrapper.Airbase#AIRBASE The found AIRBASE.
function DATABASE:FindAirbase( AirbaseName )
local AirbaseFound = self.AIRBASES[AirbaseName]
return AirbaseFound
end
--- Adds a Cargo based on the Cargo Name in the DATABASE.
-- @param #DATABASE self
-- @param #string CargoName The name of the airbase
function DATABASE:AddCargo( Cargo )
if not self.CARGOS[Cargo.Name] then
self.CARGOS[Cargo.Name] = Cargo
end
end
--- Deletes a Cargo from the DATABASE based on the Cargo Name.
-- @param #DATABASE self
-- @param #string CargoName The name of the airbase
function DATABASE:DeleteCargo( CargoName )
self.CARGOS[CargoName] = nil
end
--- Finds an CARGO based on the CargoName.
-- @param #DATABASE self
-- @param #string CargoName
-- @return Wrapper.Cargo#CARGO The found CARGO.
function DATABASE:FindCargo( CargoName )
local CargoFound = self.CARGOS[CargoName]
return CargoFound
end
--- Finds a CLIENT based on the ClientName.
-- @param #DATABASE self
-- @param #string ClientName
-- @return Wrapper.Client#CLIENT The found CLIENT.
function DATABASE:FindClient( ClientName )
local ClientFound = self.CLIENTS[ClientName]
return ClientFound
end
--- Adds a CLIENT based on the ClientName in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddClient( ClientName )
if not self.CLIENTS[ClientName] then
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
end
return self.CLIENTS[ClientName]
end
--- Finds a GROUP based on the GroupName.
-- @param #DATABASE self
-- @param #string GroupName
-- @return Wrapper.Group#GROUP The found GROUP.
function DATABASE:FindGroup( GroupName )
local GroupFound = self.GROUPS[GroupName]
return GroupFound
end
--- Adds a GROUP based on the GroupName in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddGroup( GroupName )
if not self.GROUPS[GroupName] then
self:E( { "Add GROUP:", GroupName } )
self.GROUPS[GroupName] = GROUP:Register( GroupName )
end
return self.GROUPS[GroupName]
end
--- Adds a player based on the Player Name in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddPlayer( UnitName, PlayerName )
if PlayerName then
self:E( { "Add player for unit:", UnitName, PlayerName } )
self.PLAYERS[PlayerName] = UnitName
self.PLAYERSJOINED[PlayerName] = PlayerName
end
end
--- Deletes a player from the DATABASE based on the Player Name.
-- @param #DATABASE self
function DATABASE:DeletePlayer( PlayerName )
if PlayerName then
self:E( { "Clean player:", PlayerName } )
self.PLAYERS[PlayerName] = nil
end
end
--- Instantiate new Groups within the DCSRTE.
-- This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined:
-- SpawnCountryID, SpawnCategoryID
-- This method is used by the SPAWN class.
-- @param #DATABASE self
-- @param #table SpawnTemplate
-- @return #DATABASE self
function DATABASE:Spawn( SpawnTemplate )
self:F( SpawnTemplate.name )
self:T( { SpawnTemplate.SpawnCountryID, SpawnTemplate.SpawnCategoryID } )
-- Copy the spawn variables of the template in temporary storage, nullify, and restore the spawn variables.
local SpawnCoalitionID = SpawnTemplate.CoalitionID
local SpawnCountryID = SpawnTemplate.CountryID
local SpawnCategoryID = SpawnTemplate.CategoryID
-- Nullify
SpawnTemplate.CoalitionID = nil
SpawnTemplate.CountryID = nil
SpawnTemplate.CategoryID = nil
self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID )
self:T3( SpawnTemplate )
coalition.addGroup( SpawnCountryID, SpawnCategoryID, SpawnTemplate )
-- Restore
SpawnTemplate.CoalitionID = SpawnCoalitionID
SpawnTemplate.CountryID = SpawnCountryID
SpawnTemplate.CategoryID = SpawnCategoryID
local SpawnGroup = self:AddGroup( SpawnTemplate.name )
return SpawnGroup
end
--- Set a status to a Group within the Database, this to check crossing events for example.
function DATABASE:SetStatusGroup( GroupName, Status )
self:F2( Status )
self.Templates.Groups[GroupName].Status = Status
end
--- Get a status to a Group within the Database, this to check crossing events for example.
function DATABASE:GetStatusGroup( GroupName )
self:F2( Status )
if self.Templates.Groups[GroupName] then
return self.Templates.Groups[GroupName].Status
else
return ""
end
end
--- Private method that registers new Group Templates within the DATABASE Object.
-- @param #DATABASE self
-- @param #table GroupTemplate
-- @return #DATABASE self
function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionID, CategoryID, CountryID )
local GroupTemplateName = env.getValueDictByKey(GroupTemplate.name)
local TraceTable = {}
if not self.Templates.Groups[GroupTemplateName] then
self.Templates.Groups[GroupTemplateName] = {}
self.Templates.Groups[GroupTemplateName].Status = nil
end
-- Delete the spans from the route, it is not needed and takes memory.
if GroupTemplate.route and GroupTemplate.route.spans then
GroupTemplate.route.spans = nil
end
GroupTemplate.CategoryID = CategoryID
GroupTemplate.CoalitionID = CoalitionID
GroupTemplate.CountryID = CountryID
self.Templates.Groups[GroupTemplateName].GroupName = GroupTemplateName
self.Templates.Groups[GroupTemplateName].Template = GroupTemplate
self.Templates.Groups[GroupTemplateName].groupId = GroupTemplate.groupId
self.Templates.Groups[GroupTemplateName].UnitCount = #GroupTemplate.units
self.Templates.Groups[GroupTemplateName].Units = GroupTemplate.units
self.Templates.Groups[GroupTemplateName].CategoryID = CategoryID
self.Templates.Groups[GroupTemplateName].CoalitionID = CoalitionID
self.Templates.Groups[GroupTemplateName].CountryID = CountryID
TraceTable[#TraceTable+1] = "Group"
TraceTable[#TraceTable+1] = self.Templates.Groups[GroupTemplateName].GroupName
TraceTable[#TraceTable+1] = "Coalition"
TraceTable[#TraceTable+1] = self.Templates.Groups[GroupTemplateName].CoalitionID
TraceTable[#TraceTable+1] = "Category"
TraceTable[#TraceTable+1] = self.Templates.Groups[GroupTemplateName].CategoryID
TraceTable[#TraceTable+1] = "Country"
TraceTable[#TraceTable+1] = self.Templates.Groups[GroupTemplateName].CountryID
TraceTable[#TraceTable+1] = "Units"
for unit_num, UnitTemplate in pairs( GroupTemplate.units ) do
UnitTemplate.name = env.getValueDictByKey(UnitTemplate.name)
self.Templates.Units[UnitTemplate.name] = {}
self.Templates.Units[UnitTemplate.name].UnitName = UnitTemplate.name
self.Templates.Units[UnitTemplate.name].Template = UnitTemplate
self.Templates.Units[UnitTemplate.name].GroupName = GroupTemplateName
self.Templates.Units[UnitTemplate.name].GroupTemplate = GroupTemplate
self.Templates.Units[UnitTemplate.name].GroupId = GroupTemplate.groupId
self.Templates.Units[UnitTemplate.name].CategoryID = CategoryID
self.Templates.Units[UnitTemplate.name].CoalitionID = CoalitionID
self.Templates.Units[UnitTemplate.name].CountryID = CountryID
if UnitTemplate.skill and (UnitTemplate.skill == "Client" or UnitTemplate.skill == "Player") then
self.Templates.ClientsByName[UnitTemplate.name] = UnitTemplate
self.Templates.ClientsByName[UnitTemplate.name].CategoryID = CategoryID
self.Templates.ClientsByName[UnitTemplate.name].CoalitionID = CoalitionID
self.Templates.ClientsByName[UnitTemplate.name].CountryID = CountryID
self.Templates.ClientsByID[UnitTemplate.unitId] = UnitTemplate
end
TraceTable[#TraceTable+1] = self.Templates.Units[UnitTemplate.name].UnitName
end
self:E( TraceTable )
end
function DATABASE:GetGroupTemplate( GroupName )
local GroupTemplate = self.Templates.Groups[GroupName].Template
GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID
GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID
GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID
return GroupTemplate
end
--- Private method that registers new Static Templates within the DATABASE Object.
-- @param #DATABASE self
-- @param #table GroupTemplate
-- @return #DATABASE self
function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, CategoryID, CountryID )
local TraceTable = {}
local StaticTemplateName = env.getValueDictByKey(StaticTemplate.name)
self.Templates.Statics[StaticTemplateName] = self.Templates.Statics[StaticTemplateName] or {}
StaticTemplate.CategoryID = CategoryID
StaticTemplate.CoalitionID = CoalitionID
StaticTemplate.CountryID = CountryID
self.Templates.Statics[StaticTemplateName].StaticName = StaticTemplateName
self.Templates.Statics[StaticTemplateName].GroupTemplate = StaticTemplate
self.Templates.Statics[StaticTemplateName].UnitTemplate = StaticTemplate.units[1]
self.Templates.Statics[StaticTemplateName].CategoryID = CategoryID
self.Templates.Statics[StaticTemplateName].CoalitionID = CoalitionID
self.Templates.Statics[StaticTemplateName].CountryID = CountryID
TraceTable[#TraceTable+1] = "Static"
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].GroupName
TraceTable[#TraceTable+1] = "Coalition"
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CoalitionID
TraceTable[#TraceTable+1] = "Category"
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CategoryID
TraceTable[#TraceTable+1] = "Country"
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CountryID
self:E( TraceTable )
end
--- @param #DATABASE self
function DATABASE:GetStaticUnitTemplate( StaticName )
local StaticTemplate = self.Templates.Statics[StaticName].UnitTemplate
StaticTemplate.SpawnCoalitionID = self.Templates.Statics[StaticName].CoalitionID
StaticTemplate.SpawnCategoryID = self.Templates.Statics[StaticName].CategoryID
StaticTemplate.SpawnCountryID = self.Templates.Statics[StaticName].CountryID
return StaticTemplate
end
function DATABASE:GetGroupNameFromUnitName( UnitName )
return self.Templates.Units[UnitName].GroupName
end
function DATABASE:GetGroupTemplateFromUnitName( UnitName )
return self.Templates.Units[UnitName].GroupTemplate
end
function DATABASE:GetCoalitionFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CoalitionID
end
function DATABASE:GetCategoryFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CategoryID
end
function DATABASE:GetCountryFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CountryID
end
--- Airbase
function DATABASE:GetCoalitionFromAirbase( AirbaseName )
return self.AIRBASES[AirbaseName]:GetCoalition()
end
function DATABASE:GetCategoryFromAirbase( AirbaseName )
return self.AIRBASES[AirbaseName]:GetCategory()
end
--- Private method that registers all alive players in the mission.
-- @param #DATABASE self
-- @return #DATABASE self
function DATABASE:_RegisterPlayers()
local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) }
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
for UnitId, UnitData in pairs( CoalitionData ) do
self:T3( { "UnitData:", UnitData } )
if UnitData and UnitData:isExist() then
local UnitName = UnitData:getName()
local PlayerName = UnitData:getPlayerName()
if not self.PLAYERS[PlayerName] then
self:E( { "Add player for unit:", UnitName, PlayerName } )
self:AddPlayer( UnitName, PlayerName )
end
end
end
end
return self
end
--- Private method that registers all Groups and Units within in the mission.
-- @param #DATABASE self
-- @return #DATABASE self
function DATABASE:_RegisterGroupsAndUnits()
local CoalitionsData = { GroupsRed = coalition.getGroups( coalition.side.RED ), GroupsBlue = coalition.getGroups( coalition.side.BLUE ) }
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
for DCSGroupId, DCSGroup in pairs( CoalitionData ) do
if DCSGroup:isExist() then
local DCSGroupName = DCSGroup:getName()
self:E( { "Register Group:", DCSGroupName } )
self:AddGroup( DCSGroupName )
for DCSUnitId, DCSUnit in pairs( DCSGroup:getUnits() ) do
local DCSUnitName = DCSUnit:getName()
self:E( { "Register Unit:", DCSUnitName } )
self:AddUnit( DCSUnitName )
end
else
self:E( { "Group does not exist: ", DCSGroup } )
end
end
end
return self
end
--- Private method that registers all Units of skill Client or Player within in the mission.
-- @param #DATABASE self
-- @return #DATABASE self
function DATABASE:_RegisterClients()
for ClientName, ClientTemplate in pairs( self.Templates.ClientsByName ) do
self:E( { "Register Client:", ClientName } )
self:AddClient( ClientName )
end
return self
end
--- @param #DATABASE self
function DATABASE:_RegisterStatics()
local CoalitionsData = { GroupsRed = coalition.getStaticObjects( coalition.side.RED ), GroupsBlue = coalition.getStaticObjects( coalition.side.BLUE ) }
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
for DCSStaticId, DCSStatic in pairs( CoalitionData ) do
if DCSStatic:isExist() then
local DCSStaticName = DCSStatic:getName()
self:E( { "Register Static:", DCSStaticName } )
self:AddStatic( DCSStaticName )
else
self:E( { "Static does not exist: ", DCSStatic } )
end
end
end
return self
end
--- @param #DATABASE self
function DATABASE:_RegisterAirbases()
local CoalitionsData = { AirbasesRed = coalition.getAirbases( coalition.side.RED ), AirbasesBlue = coalition.getAirbases( coalition.side.BLUE ), AirbasesNeutral = coalition.getAirbases( coalition.side.NEUTRAL ) }
for CoalitionId, CoalitionData in pairs( CoalitionsData ) do
for DCSAirbaseId, DCSAirbase in pairs( CoalitionData ) do
local DCSAirbaseName = DCSAirbase:getName()
self:E( { "Register Airbase:", DCSAirbaseName } )
self:AddAirbase( DCSAirbaseName )
end
end
return self
end
--- Events
--- Handles the OnBirth event for the alive units set.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnBirth( Event )
self:F2( { Event } )
if Event.IniDCSUnit then
if Event.IniObjectCategory == 3 then
self:AddStatic( Event.IniDCSUnitName )
else
if Event.IniObjectCategory == 1 then
self:AddUnit( Event.IniDCSUnitName )
self:AddGroup( Event.IniDCSGroupName )
end
end
self:_EventOnPlayerEnterUnit( Event )
end
end
--- Handles the OnDead or OnCrash event for alive units set.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnDeadOrCrash( Event )
self:F2( { Event } )
if Event.IniDCSUnit then
if Event.IniObjectCategory == 3 then
if self.STATICS[Event.IniDCSUnitName] then
self:DeleteStatic( Event.IniDCSUnitName )
end
else
if Event.IniObjectCategory == 1 then
if self.UNITS[Event.IniDCSUnitName] then
self:DeleteUnit( Event.IniDCSUnitName )
end
end
end
end
end
--- Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnPlayerEnterUnit( Event )
self:F2( { Event } )
if Event.IniUnit then
if Event.IniObjectCategory == 1 then
self:AddUnit( Event.IniDCSUnitName )
self:AddGroup( Event.IniDCSGroupName )
local PlayerName = Event.IniUnit:GetPlayerName()
if not self.PLAYERS[PlayerName] then
self:AddPlayer( Event.IniUnitName, PlayerName )
end
end
end
end
--- Handles the OnPlayerLeaveUnit event to clean the active players table.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnPlayerLeaveUnit( Event )
self:F2( { Event } )
if Event.IniUnit then
if Event.IniObjectCategory == 1 then
local PlayerName = Event.IniUnit:GetPlayerName()
if self.PLAYERS[PlayerName] then
self:DeletePlayer( PlayerName )
end
end
end
end
--- Iterators
--- Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the database.
-- @return #DATABASE self
function DATABASE:ForEach( IteratorFunction, FinalizeFunction, arg, Set )
self:F2( arg )
local function CoRoutine()
local Count = 0
for ObjectID, Object in pairs( Set ) do
self:T2( Object )
IteratorFunction( Object, unpack( arg ) )
Count = Count + 1
-- if Count % 100 == 0 then
-- coroutine.yield( false )
-- end
end
return true
end
-- local co = coroutine.create( CoRoutine )
local co = CoRoutine
local function Schedule()
-- local status, res = coroutine.resume( co )
local status, res = co()
self:T3( { status, res } )
if status == false then
error( res )
end
if res == false then
return true -- resume next time the loop
end
if FinalizeFunction then
FinalizeFunction( unpack( arg ) )
end
return false
end
local Scheduler = SCHEDULER:New( self, Schedule, {}, 0.001, 0.001, 0 )
return self
end
--- Iterate the DATABASE and call an iterator function for each **alive** STATIC, providing the STATIC and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a STATIC parameter.
-- @return #DATABASE self
function DATABASE:ForEachStatic( IteratorFunction, FinalizeFunction, ... ) --R2.1
self:F2( arg )
self:ForEach( IteratorFunction, FinalizeFunction, arg, self.STATICS )
return self
end
--- Iterate the DATABASE and call an iterator function for each **alive** UNIT, providing the UNIT and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
-- @return #DATABASE self
function DATABASE:ForEachUnit( IteratorFunction, FinalizeFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, FinalizeFunction, arg, self.UNITS )
return self
end
--- Iterate the DATABASE and call an iterator function for each **alive** GROUP, providing the GROUP and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a GROUP parameter.
-- @return #DATABASE self
function DATABASE:ForEachGroup( IteratorFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, arg, self.GROUPS )
return self
end
--- Iterate the DATABASE and call an iterator function for each **ALIVE** player, providing the player name and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept the player name.
-- @return #DATABASE self
function DATABASE:ForEachPlayer( IteratorFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, arg, self.PLAYERS )
return self
end
--- Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
-- @return #DATABASE self
function DATABASE:ForEachPlayerJoined( IteratorFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, arg, self.PLAYERSJOINED )
return self
end
--- Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called object in the database. The function needs to accept a CLIENT parameter.
-- @return #DATABASE self
function DATABASE:ForEachClient( IteratorFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, arg, self.CLIENTS )
return self
end
--- Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.
-- @return #DATABASE self
function DATABASE:ForEachCargo( IteratorFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, arg, self.CARGOS )
return self
end
--- Handles the OnEventNewCargo event.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA EventData
function DATABASE:OnEventNewCargo( EventData )
self:F2( { EventData } )
if EventData.Cargo then
self:AddCargo( EventData.Cargo )
end
end
--- Handles the OnEventDeleteCargo.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA EventData
function DATABASE:OnEventDeleteCargo( EventData )
self:F2( { EventData } )
if EventData.Cargo then
self:DeleteCargo( EventData.Cargo.Name )
end
end
--- @param #DATABASE self
function DATABASE:_RegisterTemplates()
self:F2()
self.Navpoints = {}
self.UNITS = {}
--Build routines.db.units and self.Navpoints
for CoalitionName, coa_data in pairs(env.mission.coalition) do
if (CoalitionName == 'red' or CoalitionName == 'blue') and type(coa_data) == 'table' then
--self.Units[coa_name] = {}
local CoalitionSide = coalition.side[string.upper(CoalitionName)]
----------------------------------------------
-- build nav points DB
self.Navpoints[CoalitionName] = {}
if coa_data.nav_points then --navpoints
for nav_ind, nav_data in pairs(coa_data.nav_points) do
if type(nav_data) == 'table' then
self.Navpoints[CoalitionName][nav_ind] = routines.utils.deepCopy(nav_data)
self.Navpoints[CoalitionName][nav_ind]['name'] = nav_data.callsignStr -- name is a little bit more self-explanatory.
self.Navpoints[CoalitionName][nav_ind]['point'] = {} -- point is used by SSE, support it.
self.Navpoints[CoalitionName][nav_ind]['point']['x'] = nav_data.x
self.Navpoints[CoalitionName][nav_ind]['point']['y'] = 0
self.Navpoints[CoalitionName][nav_ind]['point']['z'] = nav_data.y
end
end
end
-------------------------------------------------
if coa_data.country then --there is a country table
for cntry_id, cntry_data in pairs(coa_data.country) do
local CountryName = string.upper(cntry_data.name)
local CountryID = cntry_data.id
self.COUNTRY_ID[CountryName] = CountryID
self.COUNTRY_NAME[CountryID] = CountryName
--self.Units[coa_name][countryName] = {}
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id
if type(cntry_data) == 'table' then --just making sure
for obj_type_name, obj_type_data in pairs(cntry_data) do
if obj_type_name == "helicopter" or obj_type_name == "ship" or obj_type_name == "plane" or obj_type_name == "vehicle" or obj_type_name == "static" then --should be an unncessary check
local CategoryName = obj_type_name
if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then --there's a group!
--self.Units[coa_name][countryName][category] = {}
for group_num, Template in pairs(obj_type_data.group) do
if obj_type_name ~= "static" and Template and Template.units and type(Template.units) == 'table' then --making sure again- this is a valid group
self:_RegisterGroupTemplate(
Template,
CoalitionSide,
_DATABASECategory[string.lower(CategoryName)],
CountryID
)
else
self:_RegisterStaticTemplate(
Template,
CoalitionSide,
_DATABASECategory[string.lower(CategoryName)],
CountryID
)
end --if GroupTemplate and GroupTemplate.units then
end --for group_num, GroupTemplate in pairs(obj_type_data.group) do
end --if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then
end --if obj_type_name == "helicopter" or obj_type_name == "ship" or obj_type_name == "plane" or obj_type_name == "vehicle" or obj_type_name == "static" then
end --for obj_type_name, obj_type_data in pairs(cntry_data) do
end --if type(cntry_data) == 'table' then
end --for cntry_id, cntry_data in pairs(coa_data.country) do
end --if coa_data.country then --there is a country table
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
return self
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,944 @@
--- **Core** -- MENU_ classes model the definition of **hierarchical menu structures** and **commands for players** within a mission.
--
-- ===
--
-- DCS Menus can be managed using the MENU classes.
-- The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scanerios where you need to
-- set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing
-- menus is not a easy feat if you have complex menu hierarchies defined.
-- Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy.
-- On top, MOOSE implements **variable parameter** passing for command menus.
--
-- There are basically two different MENU class types that you need to use:
--
-- ### To manage **main menus**, the classes begin with **MENU_**:
--
-- * @{Menu#MENU_MISSION}: Manages main menus for whole mission file.
-- * @{Menu#MENU_COALITION}: Manages main menus for whole coalition.
-- * @{Menu#MENU_GROUP}: Manages main menus for GROUPs.
-- * @{Menu#MENU_CLIENT}: Manages main menus for CLIENTs. This manages menus for units with the skill level "Client".
--
-- ### To manage **command menus**, which are menus that allow the player to issue **functions**, the classes begin with **MENU_COMMAND_**:
--
-- * @{Menu#MENU_MISSION_COMMAND}: Manages command menus for whole mission file.
-- * @{Menu#MENU_COALITION_COMMAND}: Manages command menus for whole coalition.
-- * @{Menu#MENU_GROUP_COMMAND}: Manages command menus for GROUPs.
-- * @{Menu#MENU_CLIENT_COMMAND}: Manages command menus for CLIENTs. This manages menus for units with the skill level "Client".
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming
--
-- @module Menu
do -- MENU_BASE
--- @type MENU_BASE
-- @extends Base#BASE
--- # MENU_BASE class, extends @{Base#BASE}
-- The MENU_BASE class defines the main MENU class where other MENU classes are derived from.
-- This is an abstract class, so don't use it.
-- @field #MENU_BASE
MENU_BASE = {
ClassName = "MENU_BASE",
MenuPath = nil,
MenuText = "",
MenuParentPath = nil
}
--- Consructor
-- @param #MENU_BASE
-- @return #MENU_BASE
function MENU_BASE:New( MenuText, ParentMenu )
local MenuParentPath = {}
if ParentMenu ~= nil then
MenuParentPath = ParentMenu.MenuPath
end
local self = BASE:Inherit( self, BASE:New() )
self.MenuPath = nil
self.MenuText = MenuText
self.MenuParentPath = MenuParentPath
self.Menus = {}
self.MenuCount = 0
self.MenuRemoveParent = false
self.MenuTime = timer.getTime()
return self
end
--- Gets a @{Menu} from a parent @{Menu}
-- @param #MENU_BASE self
-- @param #string MenuText The text of the child menu.
-- @return #MENU_BASE
function MENU_BASE:GetMenu( MenuText )
self:F2( { Menu = self.Menus[MenuText] } )
return self.Menus[MenuText]
end
--- Sets a @{Menu} to remove automatically the parent menu when the menu removed is the last child menu of that parent @{Menu}.
-- @param #MENU_BASE self
-- @param #boolean RemoveParent If true, the parent menu is automatically removed when this menu is the last child menu of that parent @{Menu}.
-- @return #MENU_BASE
function MENU_BASE:SetRemoveParent( RemoveParent )
self:F2( { RemoveParent } )
self.MenuRemoveParent = RemoveParent
return self
end
--- Sets a time stamp for later prevention of menu removal.
-- @param #MENU_BASE self
-- @param MenuTime
-- @return #MENU_BASE
function MENU_BASE:SetTime( MenuTime )
self.MenuTime = MenuTime
return self
end
end
do -- MENU_COMMAND_BASE
--- @type MENU_COMMAND_BASE
-- @field #function MenuCallHandler
-- @extends Core.Menu#MENU_BASE
--- # MENU_COMMAND_BASE class, extends @{Base#BASE}
-- ----------------------------------------------------------
-- The MENU_COMMAND_BASE class defines the main MENU class where other MENU COMMAND_
-- classes are derived from, in order to set commands.
-- @field #MENU_COMMAND_BASE
MENU_COMMAND_BASE = {
ClassName = "MENU_COMMAND_BASE",
CommandMenuFunction = nil,
CommandMenuArgument = nil,
MenuCallHandler = nil,
}
--- Constructor
-- @param #MENU_COMMAND_BASE
-- @return #MENU_COMMAND_BASE
function MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments )
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
self.CommandMenuFunction = CommandMenuFunction
self.MenuCallHandler = function( CommandMenuArguments )
self.CommandMenuFunction( unpack( CommandMenuArguments ) )
end
return self
end
end
do -- MENU_MISSION
--- @type MENU_MISSION
-- @extends Core.Menu#MENU_BASE
--- # MENU_MISSION class, extends @{Menu#MENU_BASE}
--
-- The MENU_MISSION class manages the main menus for a complete mission.
-- You can add menus with the @{#MENU_MISSION.New} method, which constructs a MENU_MISSION object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_MISSION.Remove}.
-- @field #MENU_MISSION
MENU_MISSION = {
ClassName = "MENU_MISSION"
}
--- MENU_MISSION constructor. Creates a new MENU_MISSION object and creates the menu for a complete mission file.
-- @param #MENU_MISSION self
-- @param #string MenuText The text for the menu.
-- @param #table ParentMenu The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).
-- @return #MENU_MISSION
function MENU_MISSION:New( MenuText, ParentMenu )
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
self:F( { MenuText, ParentMenu } )
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self.Menus = {}
self:T( { MenuText } )
self.MenuPath = missionCommands.addSubMenu( MenuText, self.MenuParentPath )
self:T( { self.MenuPath } )
if ParentMenu and ParentMenu.Menus then
ParentMenu.Menus[self.MenuPath] = self
end
return self
end
--- Removes the sub menus recursively of this MENU_MISSION. Note that the main menu is kept!
-- @param #MENU_MISSION self
-- @return #MENU_MISSION
function MENU_MISSION:RemoveSubMenus()
self:F( self.MenuPath )
for MenuID, Menu in pairs( self.Menus ) do
Menu:Remove()
end
end
--- Removes the main menu and the sub menus recursively of this MENU_MISSION.
-- @param #MENU_MISSION self
-- @return #nil
function MENU_MISSION:Remove()
self:F( self.MenuPath )
self:RemoveSubMenus()
missionCommands.removeItem( self.MenuPath )
if self.ParentMenu then
self.ParentMenu.Menus[self.MenuPath] = nil
end
return nil
end
end
do -- MENU_MISSION_COMMAND
--- @type MENU_MISSION_COMMAND
-- @extends Core.Menu#MENU_COMMAND_BASE
--- # MENU_MISSION_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
--
-- The MENU_MISSION_COMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
-- You can add menus with the @{#MENU_MISSION_COMMAND.New} method, which constructs a MENU_MISSION_COMMAND object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_MISSION_COMMAND.Remove}.
--
-- @field #MENU_MISSION_COMMAND
MENU_MISSION_COMMAND = {
ClassName = "MENU_MISSION_COMMAND"
}
--- MENU_MISSION constructor. Creates a new radio command item for a complete mission file, which can invoke a function with parameters.
-- @param #MENU_MISSION_COMMAND self
-- @param #string MenuText The text for the menu.
-- @param Menu#MENU_MISSION ParentMenu The parent menu.
-- @param CommandMenuFunction A function that is called when the menu key is pressed.
-- @param CommandMenuArgument An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.
-- @return #MENU_MISSION_COMMAND self
function MENU_MISSION_COMMAND:New( MenuText, ParentMenu, CommandMenuFunction, ... )
local self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self:T( { MenuText, CommandMenuFunction, arg } )
self.MenuPath = missionCommands.addCommand( MenuText, self.MenuParentPath, self.MenuCallHandler, arg )
ParentMenu.Menus[self.MenuPath] = self
return self
end
--- Removes a radio command item for a coalition
-- @param #MENU_MISSION_COMMAND self
-- @return #nil
function MENU_MISSION_COMMAND:Remove()
self:F( self.MenuPath )
missionCommands.removeItem( self.MenuPath )
if self.ParentMenu then
self.ParentMenu.Menus[self.MenuPath] = nil
end
return nil
end
end
do -- MENU_COALITION
--- @type MENU_COALITION
-- @extends Core.Menu#MENU_BASE
--- # MENU_COALITION class, extends @{Menu#MENU_BASE}
--
-- The @{Menu#MENU_COALITION} class manages the main menus for coalitions.
-- You can add menus with the @{#MENU_COALITION.New} method, which constructs a MENU_COALITION object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION.Remove}.
--
--
-- @usage
-- -- This demo creates a menu structure for the planes within the red coalition.
-- -- To test, join the planes, then look at the other radio menus (Option F10).
-- -- Then switch planes and check if the menu is still there.
--
-- local Plane1 = CLIENT:FindByName( "Plane 1" )
-- local Plane2 = CLIENT:FindByName( "Plane 2" )
--
--
-- -- This would create a menu for the red coalition under the main DCS "Others" menu.
-- local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )
--
--
-- local function ShowStatus( StatusText, Coalition )
--
-- MESSAGE:New( Coalition, 15 ):ToRed()
-- Plane1:Message( StatusText, 15 )
-- Plane2:Message( StatusText, 15 )
-- end
--
-- local MenuStatus -- Menu#MENU_COALITION
-- local MenuStatusShow -- Menu#MENU_COALITION_COMMAND
--
-- local function RemoveStatusMenu()
-- MenuStatus:Remove()
-- end
--
-- local function AddStatusMenu()
--
-- -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-- MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
-- MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
-- end
--
-- local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
-- local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
--
-- @field #MENU_COALITION
MENU_COALITION = {
ClassName = "MENU_COALITION"
}
--- MENU_COALITION constructor. Creates a new MENU_COALITION object and creates the menu for a complete coalition.
-- @param #MENU_COALITION self
-- @param Dcs.DCSCoalition#coalition.side Coalition The coalition owning the menu.
-- @param #string MenuText The text for the menu.
-- @param #table ParentMenu The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).
-- @return #MENU_COALITION self
function MENU_COALITION:New( Coalition, MenuText, ParentMenu )
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
self:F( { Coalition, MenuText, ParentMenu } )
self.Coalition = Coalition
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self.Menus = {}
self:T( { MenuText } )
self.MenuPath = missionCommands.addSubMenuForCoalition( Coalition, MenuText, self.MenuParentPath )
self:T( { self.MenuPath } )
if ParentMenu and ParentMenu.Menus then
ParentMenu.Menus[self.MenuPath] = self
end
return self
end
--- Removes the sub menus recursively of this MENU_COALITION. Note that the main menu is kept!
-- @param #MENU_COALITION self
-- @return #MENU_COALITION
function MENU_COALITION:RemoveSubMenus()
self:F( self.MenuPath )
for MenuID, Menu in pairs( self.Menus ) do
Menu:Remove()
end
end
--- Removes the main menu and the sub menus recursively of this MENU_COALITION.
-- @param #MENU_COALITION self
-- @return #nil
function MENU_COALITION:Remove()
self:F( self.MenuPath )
self:RemoveSubMenus()
missionCommands.removeItemForCoalition( self.Coalition, self.MenuPath )
if self.ParentMenu then
self.ParentMenu.Menus[self.MenuPath] = nil
end
return nil
end
end
do -- MENU_COALITION_COMMAND
--- @type MENU_COALITION_COMMAND
-- @extends Core.Menu#MENU_COMMAND_BASE
--- # MENU_COALITION_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
--
-- The MENU_COALITION_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-- You can add menus with the @{#MENU_COALITION_COMMAND.New} method, which constructs a MENU_COALITION_COMMAND object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION_COMMAND.Remove}.
--
-- @field #MENU_COALITION_COMMAND
MENU_COALITION_COMMAND = {
ClassName = "MENU_COALITION_COMMAND"
}
--- MENU_COALITION constructor. Creates a new radio command item for a coalition, which can invoke a function with parameters.
-- @param #MENU_COALITION_COMMAND self
-- @param Dcs.DCSCoalition#coalition.side Coalition The coalition owning the menu.
-- @param #string MenuText The text for the menu.
-- @param Menu#MENU_COALITION ParentMenu The parent menu.
-- @param CommandMenuFunction A function that is called when the menu key is pressed.
-- @param CommandMenuArgument An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.
-- @return #MENU_COALITION_COMMAND
function MENU_COALITION_COMMAND:New( Coalition, MenuText, ParentMenu, CommandMenuFunction, ... )
local self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
self.MenuCoalition = Coalition
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self:T( { MenuText, CommandMenuFunction, arg } )
self.MenuPath = missionCommands.addCommandForCoalition( self.MenuCoalition, MenuText, self.MenuParentPath, self.MenuCallHandler, arg )
ParentMenu.Menus[self.MenuPath] = self
return self
end
--- Removes a radio command item for a coalition
-- @param #MENU_COALITION_COMMAND self
-- @return #nil
function MENU_COALITION_COMMAND:Remove()
self:F( self.MenuPath )
missionCommands.removeItemForCoalition( self.MenuCoalition, self.MenuPath )
if self.ParentMenu then
self.ParentMenu.Menus[self.MenuPath] = nil
end
return nil
end
end
do -- MENU_CLIENT
-- This local variable is used to cache the menus registered under clients.
-- Menus don't dissapear when clients are destroyed and restarted.
-- So every menu for a client created must be tracked so that program logic accidentally does not create
-- the same menus twice during initialization logic.
-- These menu classes are handling this logic with this variable.
local _MENUCLIENTS = {}
--- MENU_COALITION constructor. Creates a new radio command item for a coalition, which can invoke a function with parameters.
-- @type MENU_CLIENT
-- @extends Core.Menu#MENU_BASE
--- # MENU_CLIENT class, extends @{Menu#MENU_BASE}
--
-- The MENU_CLIENT class manages the main menus for coalitions.
-- You can add menus with the @{#MENU_CLIENT.New} method, which constructs a MENU_CLIENT object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_CLIENT.Remove}.
--
-- @usage
-- -- This demo creates a menu structure for the two clients of planes.
-- -- Each client will receive a different menu structure.
-- -- To test, join the planes, then look at the other radio menus (Option F10).
-- -- Then switch planes and check if the menu is still there.
-- -- And play with the Add and Remove menu options.
--
-- -- Note that in multi player, this will only work after the DCS clients bug is solved.
--
-- local function ShowStatus( PlaneClient, StatusText, Coalition )
--
-- MESSAGE:New( Coalition, 15 ):ToRed()
-- PlaneClient:Message( StatusText, 15 )
-- end
--
-- local MenuStatus = {}
--
-- local function RemoveStatusMenu( MenuClient )
-- local MenuClientName = MenuClient:GetName()
-- MenuStatus[MenuClientName]:Remove()
-- end
--
-- --- @param Wrapper.Client#CLIENT MenuClient
-- local function AddStatusMenu( MenuClient )
-- local MenuClientName = MenuClient:GetName()
-- -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-- MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" )
-- MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" )
-- end
--
-- SCHEDULER:New( nil,
-- function()
-- local PlaneClient = CLIENT:FindByName( "Plane 1" )
-- if PlaneClient and PlaneClient:IsAlive() then
-- local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
-- MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient )
-- MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient )
-- end
-- end, {}, 10, 10 )
--
-- SCHEDULER:New( nil,
-- function()
-- local PlaneClient = CLIENT:FindByName( "Plane 2" )
-- if PlaneClient and PlaneClient:IsAlive() then
-- local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
-- MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient )
-- MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient )
-- end
-- end, {}, 10, 10 )
--
-- @field #MENU_CLIENT
MENU_CLIENT = {
ClassName = "MENU_CLIENT"
}
--- MENU_CLIENT constructor. Creates a new radio menu item for a client.
-- @param #MENU_CLIENT self
-- @param Wrapper.Client#CLIENT Client The Client owning the menu.
-- @param #string MenuText The text for the menu.
-- @param #table ParentMenu The parent menu.
-- @return #MENU_CLIENT self
function MENU_CLIENT:New( Client, MenuText, ParentMenu )
-- Arrange meta tables
local MenuParentPath = {}
if ParentMenu ~= nil then
MenuParentPath = ParentMenu.MenuPath
end
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, MenuParentPath ) )
self:F( { Client, MenuText, ParentMenu } )
self.MenuClient = Client
self.MenuClientGroupID = Client:GetClientGroupID()
self.MenuParentPath = MenuParentPath
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self.Menus = {}
if not _MENUCLIENTS[self.MenuClientGroupID] then
_MENUCLIENTS[self.MenuClientGroupID] = {}
end
local MenuPath = _MENUCLIENTS[self.MenuClientGroupID]
self:T( { Client:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText } )
local MenuPathID = table.concat(MenuParentPath) .. "/" .. MenuText
if MenuPath[MenuPathID] then
missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), MenuPath[MenuPathID] )
end
self.MenuPath = missionCommands.addSubMenuForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath )
MenuPath[MenuPathID] = self.MenuPath
self:T( { Client:GetClientGroupName(), self.MenuPath } )
if ParentMenu and ParentMenu.Menus then
ParentMenu.Menus[self.MenuPath] = self
end
return self
end
--- Removes the sub menus recursively of this @{#MENU_CLIENT}.
-- @param #MENU_CLIENT self
-- @return #MENU_CLIENT self
function MENU_CLIENT:RemoveSubMenus()
self:F( self.MenuPath )
for MenuID, Menu in pairs( self.Menus ) do
Menu:Remove()
end
end
--- Removes the sub menus recursively of this MENU_CLIENT.
-- @param #MENU_CLIENT self
-- @return #nil
function MENU_CLIENT:Remove()
self:F( self.MenuPath )
self:RemoveSubMenus()
if not _MENUCLIENTS[self.MenuClientGroupID] then
_MENUCLIENTS[self.MenuClientGroupID] = {}
end
local MenuPath = _MENUCLIENTS[self.MenuClientGroupID]
if MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] then
MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] = nil
end
missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), self.MenuPath )
self.ParentMenu.Menus[self.MenuPath] = nil
return nil
end
--- @type MENU_CLIENT_COMMAND
-- @extends Core.Menu#MENU_COMMAND
--- # MENU_CLIENT_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
--
-- The MENU_CLIENT_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-- You can add menus with the @{#MENU_CLIENT_COMMAND.New} method, which constructs a MENU_CLIENT_COMMAND object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_CLIENT_COMMAND.Remove}.
--
-- @field #MENU_CLIENT_COMMAND
MENU_CLIENT_COMMAND = {
ClassName = "MENU_CLIENT_COMMAND"
}
--- MENU_CLIENT_COMMAND constructor. Creates a new radio command item for a client, which can invoke a function with parameters.
-- @param #MENU_CLIENT_COMMAND self
-- @param Wrapper.Client#CLIENT Client The Client owning the menu.
-- @param #string MenuText The text for the menu.
-- @param #MENU_BASE ParentMenu The parent menu.
-- @param CommandMenuFunction A function that is called when the menu key is pressed.
-- @return Menu#MENU_CLIENT_COMMAND self
function MENU_CLIENT_COMMAND:New( Client, MenuText, ParentMenu, CommandMenuFunction, ... )
-- Arrange meta tables
local MenuParentPath = {}
if ParentMenu ~= nil then
MenuParentPath = ParentMenu.MenuPath
end
local self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, MenuParentPath, CommandMenuFunction, arg ) ) -- Menu#MENU_CLIENT_COMMAND
self.MenuClient = Client
self.MenuClientGroupID = Client:GetClientGroupID()
self.MenuParentPath = MenuParentPath
self.MenuText = MenuText
self.ParentMenu = ParentMenu
if not _MENUCLIENTS[self.MenuClientGroupID] then
_MENUCLIENTS[self.MenuClientGroupID] = {}
end
local MenuPath = _MENUCLIENTS[self.MenuClientGroupID]
self:T( { Client:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText, CommandMenuFunction, arg } )
local MenuPathID = table.concat(MenuParentPath) .. "/" .. MenuText
if MenuPath[MenuPathID] then
missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), MenuPath[MenuPathID] )
end
self.MenuPath = missionCommands.addCommandForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath, self.MenuCallHandler, arg )
MenuPath[MenuPathID] = self.MenuPath
if ParentMenu and ParentMenu.Menus then
ParentMenu.Menus[self.MenuPath] = self
end
return self
end
--- Removes a menu structure for a client.
-- @param #MENU_CLIENT_COMMAND self
-- @return #nil
function MENU_CLIENT_COMMAND:Remove()
self:F( self.MenuPath )
if not _MENUCLIENTS[self.MenuClientGroupID] then
_MENUCLIENTS[self.MenuClientGroupID] = {}
end
local MenuPath = _MENUCLIENTS[self.MenuClientGroupID]
if MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] then
MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] = nil
end
missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), self.MenuPath )
self.ParentMenu.Menus[self.MenuPath] = nil
return nil
end
end
--- MENU_GROUP
do
-- This local variable is used to cache the menus registered under groups.
-- Menus don't dissapear when groups for players are destroyed and restarted.
-- So every menu for a client created must be tracked so that program logic accidentally does not create.
-- the same menus twice during initialization logic.
-- These menu classes are handling this logic with this variable.
local _MENUGROUPS = {}
--- @type MENU_GROUP
-- @extends Core.Menu#MENU_BASE
--- #MENU_GROUP class, extends @{Menu#MENU_BASE}
--
-- The MENU_GROUP class manages the main menus for coalitions.
-- You can add menus with the @{#MENU_GROUP.New} method, which constructs a MENU_GROUP object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP.Remove}.
--
-- @usage
-- -- This demo creates a menu structure for the two groups of planes.
-- -- Each group will receive a different menu structure.
-- -- To test, join the planes, then look at the other radio menus (Option F10).
-- -- Then switch planes and check if the menu is still there.
-- -- And play with the Add and Remove menu options.
--
-- -- Note that in multi player, this will only work after the DCS groups bug is solved.
--
-- local function ShowStatus( PlaneGroup, StatusText, Coalition )
--
-- MESSAGE:New( Coalition, 15 ):ToRed()
-- PlaneGroup:Message( StatusText, 15 )
-- end
--
-- local MenuStatus = {}
--
-- local function RemoveStatusMenu( MenuGroup )
-- local MenuGroupName = MenuGroup:GetName()
-- MenuStatus[MenuGroupName]:Remove()
-- end
--
-- --- @param Wrapper.Group#GROUP MenuGroup
-- local function AddStatusMenu( MenuGroup )
-- local MenuGroupName = MenuGroup:GetName()
-- -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-- MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
-- MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
-- end
--
-- SCHEDULER:New( nil,
-- function()
-- local PlaneGroup = GROUP:FindByName( "Plane 1" )
-- if PlaneGroup and PlaneGroup:IsAlive() then
-- local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
-- MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
-- MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
-- end
-- end, {}, 10, 10 )
--
-- SCHEDULER:New( nil,
-- function()
-- local PlaneGroup = GROUP:FindByName( "Plane 2" )
-- if PlaneGroup and PlaneGroup:IsAlive() then
-- local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
-- MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
-- MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
-- end
-- end, {}, 10, 10 )
--
-- @field #MENU_GROUP
MENU_GROUP = {
ClassName = "MENU_GROUP"
}
--- MENU_GROUP constructor. Creates a new radio menu item for a group.
-- @param #MENU_GROUP self
-- @param Wrapper.Group#GROUP MenuGroup The Group owning the menu.
-- @param #string MenuText The text for the menu.
-- @param #table ParentMenu The parent menu.
-- @return #MENU_GROUP self
function MENU_GROUP:New( MenuGroup, MenuText, ParentMenu )
-- Determine if the menu was not already created and already visible at the group.
-- If it is visible, then return the cached self, otherwise, create self and cache it.
MenuGroup._Menus = MenuGroup._Menus or {}
local Path = ( ParentMenu and ( table.concat( ParentMenu.MenuPath or {}, "@" ) .. "@" .. MenuText ) ) or MenuText
if MenuGroup._Menus[Path] then
self = MenuGroup._Menus[Path]
else
self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
--if MenuGroup:IsAlive() then
MenuGroup._Menus[Path] = self
--end
self.MenuGroup = MenuGroup
self.Path = Path
self.MenuGroupID = MenuGroup:GetID()
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self:T( { "Adding Menu ", MenuText, self.MenuParentPath } )
self.MenuPath = missionCommands.addSubMenuForGroup( self.MenuGroupID, MenuText, self.MenuParentPath )
if self.ParentMenu and self.ParentMenu.Menus then
self.ParentMenu.Menus[MenuText] = self
self:F( { self.ParentMenu.Menus, MenuText } )
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount + 1
end
end
--self:F( { MenuGroup:GetName(), MenuText, ParentMenu.MenuPath } )
return self
end
--- Removes the sub menus recursively of this MENU_GROUP.
-- @param #MENU_GROUP self
-- @param MenuTime
-- @return #MENU_GROUP self
function MENU_GROUP:RemoveSubMenus( MenuTime )
--self:F2( { self.MenuPath, MenuTime, self.MenuTime } )
--self:T( { "Removing Group SubMenus:", self.MenuGroup:GetName(), self.MenuPath } )
for MenuText, Menu in pairs( self.Menus ) do
Menu:Remove( MenuTime )
end
end
--- Removes the main menu and sub menus recursively of this MENU_GROUP.
-- @param #MENU_GROUP self
-- @param MenuTime
-- @return #nil
function MENU_GROUP:Remove( MenuTime )
--self:F2( { self.MenuGroupID, self.MenuPath, MenuTime, self.MenuTime } )
self:RemoveSubMenus( MenuTime )
if not MenuTime or self.MenuTime ~= MenuTime then
if self.MenuGroup._Menus[self.Path] then
self = self.MenuGroup._Menus[self.Path]
missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath )
if self.ParentMenu then
self.ParentMenu.Menus[self.MenuText] = nil
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount - 1
if self.ParentMenu.MenuCount == 0 then
if self.MenuRemoveParent == true then
self:T2( "Removing Parent Menu " )
self.ParentMenu:Remove()
end
end
end
self:T( { "Removing Group Menu:", MenuGroup = self.MenuGroup:GetName(), MenuPath = self.MenuGroup._Menus[self.Path].Path } )
self.MenuGroup._Menus[self.Path] = nil
self = nil
end
end
return nil
end
--- @type MENU_GROUP_COMMAND
-- @extends Core.Menu#MENU_BASE
--- # MENU_GROUP_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
--
-- The @{Menu#MENU_GROUP_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-- You can add menus with the @{#MENU_GROUP_COMMAND.New} method, which constructs a MENU_GROUP_COMMAND object and returns you the object reference.
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP_COMMAND.Remove}.
--
-- @field #MENU_GROUP_COMMAND
MENU_GROUP_COMMAND = {
ClassName = "MENU_GROUP_COMMAND"
}
--- Creates a new radio command item for a group
-- @param #MENU_GROUP_COMMAND self
-- @param Wrapper.Group#GROUP MenuGroup The Group owning the menu.
-- @param MenuText The text for the menu.
-- @param ParentMenu The parent menu.
-- @param CommandMenuFunction A function that is called when the menu key is pressed.
-- @param CommandMenuArgument An argument for the function.
-- @return #MENU_GROUP_COMMAND
function MENU_GROUP_COMMAND:New( MenuGroup, MenuText, ParentMenu, CommandMenuFunction, ... )
MenuGroup._Menus = MenuGroup._Menus or {}
local Path = ( ParentMenu and ( table.concat( ParentMenu.MenuPath or {}, "@" ) .. "@" .. MenuText ) ) or MenuText
if MenuGroup._Menus[Path] then
self = MenuGroup._Menus[Path]
self:F2( { "Re-using Group Command Menu:", MenuGroup:GetName(), MenuText } )
else
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
--if MenuGroup:IsAlive() then
MenuGroup._Menus[Path] = self
--end
self.Path = Path
self.MenuGroup = MenuGroup
self.MenuGroupID = MenuGroup:GetID()
self.MenuText = MenuText
self.ParentMenu = ParentMenu
self:F( { "Adding Group Command Menu:", MenuGroup = MenuGroup:GetName(), MenuText = MenuText, MenuPath = self.MenuParentPath } )
self.MenuPath = missionCommands.addCommandForGroup( self.MenuGroupID, MenuText, self.MenuParentPath, self.MenuCallHandler, arg )
if self.ParentMenu and self.ParentMenu.Menus then
self.ParentMenu.Menus[MenuText] = self
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount + 1
self:F2( { ParentMenu.Menus, MenuText } )
end
end
return self
end
--- Removes a menu structure for a group.
-- @param #MENU_GROUP_COMMAND self
-- @param MenuTime
-- @return #nil
function MENU_GROUP_COMMAND:Remove( MenuTime )
--self:F2( { self.MenuGroupID, self.MenuPath, MenuTime, self.MenuTime } )
if not MenuTime or self.MenuTime ~= MenuTime then
if self.MenuGroup._Menus[self.Path] then
self = self.MenuGroup._Menus[self.Path]
missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath )
self:T( { "Removing Group Command Menu:", MenuGroup = self.MenuGroup:GetName(), MenuText = self.MenuText, MenuPath = self.Path } )
self.ParentMenu.Menus[self.MenuText] = nil
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount - 1
if self.ParentMenu.MenuCount == 0 then
if self.MenuRemoveParent == true then
self:T2( "Removing Parent Menu " )
self.ParentMenu:Remove()
end
end
self.MenuGroup._Menus[self.Path] = nil
self = nil
end
end
return nil
end
end

View File

@@ -1,17 +1,45 @@
--- Message System to display Messages for Clients and Coalitions or All.
-- Messages are grouped on the display panel per Category to improve readability for the players.
-- Messages are shown on the display panel for an amount of seconds, and will then disappear.
-- Messages are identified by an ID. The messages with the same ID belonging to the same category will be overwritten if they were still being displayed on the display panel.
-- Messages are created with MESSAGE:@{New}().
-- Messages are sent to Clients with MESSAGE:@{ToClient}().
-- Messages are sent to Coalitions with MESSAGE:@{ToCoalition}().
-- Messages are sent to All Players with MESSAGE:@{ToAll}().
--- **Core** - MESSAGE class takes are of the **real-time notifications** and **messages to players** during a simulation.
--
-- ![Banner Image](..\Presentations\MESSAGE\Dia1.JPG)
--
-- ===
--
-- @module Message
Include.File( "Base" )
--- The MESSAGE class
-- @type MESSAGE
-- @extends Core.Base#BASE
--- # MESSAGE class, extends @{Base#BASE}
--
-- Message System to display Messages to Clients, Coalitions or All.
-- Messages are shown on the display panel for an amount of seconds, and will then disappear.
-- Messages can contain a category which is indicating the category of the message.
--
-- ## MESSAGE construction
--
-- Messages are created with @{Message#MESSAGE.New}. Note that when the MESSAGE object is created, no message is sent yet.
-- To send messages, you need to use the To functions.
--
-- ## Send messages to an audience
--
-- Messages are sent:
--
-- * To a @{Client} using @{Message#MESSAGE.ToClient}().
-- * To a @{Group} using @{Message#MESSAGE.ToGroup}()
-- * To a coalition using @{Message#MESSAGE.ToCoalition}().
-- * To the red coalition using @{Message#MESSAGE.ToRed}().
-- * To the blue coalition using @{Message#MESSAGE.ToBlue}().
-- * To all Players using @{Message#MESSAGE.ToAll}().
--
-- ## Send conditionally to an audience
--
-- Messages can be sent conditionally to an audience (when a condition is true):
--
-- * To all players using @{Message#MESSAGE.ToAllIf}().
-- * To a coalition using @{Message#MESSAGE.ToCoalitionIf}().
--
-- @field #MESSAGE
MESSAGE = {
ClassName = "MESSAGE",
MessageCategory = 0,
@@ -22,9 +50,8 @@ MESSAGE = {
--- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{ToClient} or @{ToCoalition} or @{ToAll} to send these Messages to the respective recipients.
-- @param self
-- @param #string MessageText is the text of the Message.
-- @param #string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability.
-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel.
-- @param #string MessageID is a string expressing the ID of the Message.
-- @param #string MessageCategory (optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".
-- @return #MESSAGE
-- @usage
-- -- Create a series of new Messages.
@@ -32,23 +59,26 @@ MESSAGE = {
-- -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID )
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
function MESSAGE:New( MessageText, MessageDuration, MessageCategory )
local self = BASE:Inherit( self, BASE:New() )
self:F( { MessageText, MessageCategory, MessageDuration, MessageID } )
self:F( { MessageText, MessageDuration, MessageCategory } )
-- When no messagecategory is given, we don't show it as a title...
-- When no MessageCategory is given, we don't show it as a title...
if MessageCategory and MessageCategory ~= "" then
self.MessageCategory = MessageCategory .. ": "
if MessageCategory:sub(-1) ~= "\n" then
self.MessageCategory = MessageCategory .. ": "
else
self.MessageCategory = MessageCategory:sub( 1, -2 ) .. ":\n"
end
else
self.MessageCategory = ""
end
self.MessageDuration = MessageDuration
self.MessageID = MessageID
self.MessageDuration = MessageDuration or 5
self.MessageTime = timer.getTime()
self.MessageText = MessageText
@@ -61,7 +91,7 @@ end
--- Sends a MESSAGE to a Client Group. Note that the Group needs to be defined within the ME with the skillset "Client" or "Player".
-- @param #MESSAGE self
-- @param Client#CLIENT Client is the Group of the Client.
-- @param Wrapper.Client#CLIENT Client is the Group of the Client.
-- @return #MESSAGE
-- @usage
-- -- Send the 2 messages created with the @{New} method to the Client Group.
@@ -91,6 +121,21 @@ function MESSAGE:ToClient( Client )
return self
end
--- Sends a MESSAGE to a Group.
-- @param #MESSAGE self
-- @param Wrapper.Group#GROUP Group is the Group.
-- @return #MESSAGE
function MESSAGE:ToGroup( Group )
self:F( Group.GroupName )
if Group then
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
trigger.action.outTextForGroup( Group:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration )
end
return self
end
--- Sends a MESSAGE to the Blue coalition.
-- @param #MESSAGE self
-- @return #MESSAGE
@@ -152,6 +197,20 @@ function MESSAGE:ToCoalition( CoalitionSide )
return self
end
--- Sends a MESSAGE to a Coalition if the given Condition is true.
-- @param #MESSAGE self
-- @param CoalitionSide needs to be filled out by the defined structure of the standard scripting engine @{coalition.side}.
-- @return #MESSAGE
function MESSAGE:ToCoalitionIf( CoalitionSide, Condition )
self:F( CoalitionSide )
if Condition and Condition == true then
self:ToCoalition( CoalitionSide )
end
return self
end
--- Sends a MESSAGE to all players.
-- @param #MESSAGE self
-- @return #MESSAGE
@@ -164,84 +223,24 @@ end
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
-- MessageAll:ToAll()
function MESSAGE:ToAll()
self:F()
self:F()
self:ToCoalition( coalition.side.RED )
self:ToCoalition( coalition.side.BLUE )
self:ToCoalition( coalition.side.RED )
self:ToCoalition( coalition.side.BLUE )
return self
end
--- Sends a MESSAGE to all players if the given Condition is true.
-- @param #MESSAGE self
-- @return #MESSAGE
function MESSAGE:ToAllIf( Condition )
if Condition and Condition == true then
self:ToCoalition( coalition.side.RED )
self:ToCoalition( coalition.side.BLUE )
end
return self
end
--- The MESSAGEQUEUE class
-- @type MESSAGEQUEUE
MESSAGEQUEUE = {
ClientGroups = {},
CoalitionSides = {}
}
function MESSAGEQUEUE:New( RefreshInterval )
local self = BASE:Inherit( self, BASE:New() )
self:F( { RefreshInterval } )
self.RefreshInterval = RefreshInterval
self.DisplayFunction = routines.scheduleFunction( self._DisplayMessages, { self }, 0, RefreshInterval )
return self
end
--- This function is called automatically by the MESSAGEQUEUE scheduler.
function MESSAGEQUEUE:_DisplayMessages()
-- First we display all messages that a coalition needs to receive... Also those who are not in a client (CA module clients...).
for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
if MessageData.MessageSent == false then
--trigger.action.outTextForCoalition( CoalitionSideID, MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
MessageData.MessageSent = true
end
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
if MessageTimeLeft <= 0 then
MessageData = nil
end
end
end
-- Then we send the messages for each individual client, but also to be included are those Coalition messages for the Clients who belong to a coalition.
-- Because the Client messages will overwrite the Coalition messages (for that Client).
for ClientGroupName, ClientGroupData in pairs( self.ClientGroups ) do
for MessageID, MessageData in pairs( ClientGroupData.Messages ) do
if MessageData.MessageGroup == false then
trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
MessageData.MessageGroup = true
end
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
if MessageTimeLeft <= 0 then
MessageData = nil
end
end
-- Now check if the Client also has messages that belong to the Coalition of the Client...
for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
local CoalitionGroup = Group.getByName( ClientGroupName )
if CoalitionGroup and CoalitionGroup:getCoalition() == CoalitionSideID then
if MessageData.MessageCoalition == false then
trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
MessageData.MessageCoalition = true
end
end
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
if MessageTimeLeft <= 0 then
MessageData = nil
end
end
end
end
end
--- The _MessageQueue object is created when the MESSAGE class module is loaded.
--_MessageQueue = MESSAGEQUEUE:New( 0.5 )

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,586 @@
--- **Core** - The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...
--
-- ![Banner Image](..\Presentations\RADIO\Dia1.JPG)
--
-- ===
--
-- The Radio contains 2 classes : RADIO and BEACON
--
-- What are radio communications in DCS ?
--
-- * Radio transmissions consist of **sound files** that are broadcasted on a specific **frequency** (e.g. 115MHz) and **modulation** (e.g. AM),
-- * They can be **subtitled** for a specific **duration**, the **power** in Watts of the transmiter's antenna can be set, and the transmission can be **looped**.
--
-- How to supply DCS my own Sound Files ?
--
-- * Your sound files need to be encoded in **.ogg** or .wav,
-- * Your sound files should be **as tiny as possible**. It is suggested you encode in .ogg with low bitrate and sampling settings,
-- * They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),
-- * For simplicty sake, you can **let DCS' Mission Editor add the file** itself, by creating a new Trigger with the action "Sound to Country", and choosing your sound file and a country you don't use in your mission.
--
-- Due to weird DCS quirks, **radio communications behave differently** if sent by a @{Unit#UNIT} or a @{Group#GROUP} or by any other @{Positionable#POSITIONABLE}
--
-- * If the transmitter is a @{Unit#UNIT} or a @{Group#GROUP}, DCS will set the power of the transmission automatically,
-- * If the transmitter is any other @{Positionable#POSITIONABLE}, the transmisison can't be subtitled or looped.
--
-- Note that obviously, the **frequency** and the **modulation** of the transmission are important only if the players are piloting an **Advanced System Modelling** enabled aircraft,
-- like the A10C or the Mirage 2000C. They will **hear the transmission** if they are tuned on the **right frequency and modulation** (and if they are close enough - more on that below).
-- If a FC3 airacraft is used, it will **hear every communication, whatever the frequency and the modulation** is set to. The same is true for TACAN beacons. If your aircaft isn't compatible,
-- you won't hear/be able to use the TACAN beacon informations.
--
-- ===
--
-- ### Author: Hugues "Grey_Echo" Bousquet
--
-- @module Radio
--- # RADIO class, extends @{Base#BASE}
--
-- ## RADIO usage
--
-- There are 3 steps to a successful radio transmission.
--
-- * First, you need to **"add a @{#RADIO} object** to your @{Positionable#POSITIONABLE}. This is done using the @{Positionable#POSITIONABLE.GetRadio}() function,
-- * Then, you will **set the relevant parameters** to the transmission (see below),
-- * When done, you can actually **broadcast the transmission** (i.e. play the sound) with the @{RADIO.Broadcast}() function.
--
-- Methods to set relevant parameters for both a @{Unit#UNIT} or a @{Group#GROUP} or any other @{Positionable#POSITIONABLE}
--
-- * @{#RADIO.SetFileName}() : Sets the file name of your sound file (e.g. "Noise.ogg"),
-- * @{#RADIO.SetFrequency}() : Sets the frequency of your transmission.
-- * @{#RADIO.SetModulation}() : Sets the modulation of your transmission.
-- * @{#RADIO.SetLoop}() : Choose if you want the transmission to be looped. If you need your transmission to be looped, you might need a @{#BEACON} instead...
--
-- Additional Methods to set relevant parameters if the transmiter is a @{Unit#UNIT} or a @{Group#GROUP}
--
-- * @{#RADIO.SetSubtitle}() : Set both the subtitle and its duration,
-- * @{#RADIO.NewUnitTransmission}() : Shortcut to set all the relevant parameters in one method call
--
-- Additional Methods to set relevant parameters if the transmiter is any other @{Positionable#POSITIONABLE}
--
-- * @{#RADIO.SetPower}() : Sets the power of the antenna in Watts
-- * @{#RADIO.NewGenericTransmission}() : Shortcut to set all the relevant parameters in one method call
--
-- What is this power thing ?
--
-- * If your transmission is sent by a @{Positionable#POSITIONABLE} other than a @{Unit#UNIT} or a @{Group#GROUP}, you can set the power of the antenna,
-- * Otherwise, DCS sets it automatically, depending on what's available on your Unit,
-- * If the player gets **too far** from the transmiter, or if the antenna is **too weak**, the transmission will **fade** and **become noisyer**,
-- * This an automated DCS calculation you have no say on,
-- * For reference, a standard VOR station has a 100W antenna, a standard AA TACAN has a 120W antenna, and civilian ATC's antenna usually range between 300 and 500W,
-- * Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission.
--
-- @type RADIO
-- @field Positionable#POSITIONABLE Positionable The transmiter
-- @field #string FileName Name of the sound file
-- @field #number Frequency Frequency of the transmission in Hz
-- @field #number Modulation Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)
-- @field #string Subtitle Subtitle of the transmission
-- @field #number SubtitleDuration Duration of the Subtitle in seconds
-- @field #number Power Power of the antenna is Watts
-- @field #boolean Loop
-- @extends Core.Base#BASE
RADIO = {
ClassName = "RADIO",
FileName = "",
Frequency = 0,
Modulation = radio.modulation.AM,
Subtitle = "",
SubtitleDuration = 0,
Power = 100,
Loop = 0,
}
--- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{#RADIO.Broadcast} to actually broadcast
-- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead
-- @param #RADIO self
-- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities.
-- @return #RADIO Radio
-- @return #nil If Positionable is invalid
function RADIO:New(Positionable)
local self = BASE:Inherit( self, BASE:New() ) -- Core.Radio#RADIO
self:F(Positionable)
if Positionable:GetPointVec2() then -- It's stupid, but the only way I found to make sure positionable is valid
self.Positionable = Positionable
return self
end
self:E({"The passed positionable is invalid, no RADIO created", Positionable})
return nil
end
--- Check validity of the filename passed and sets RADIO.FileName
-- @param #RADIO self
-- @param #string FileName File name of the sound file (i.e. "Noise.ogg")
-- @return #RADIO self
function RADIO:SetFileName(FileName)
self:F2(FileName)
if type(FileName) == "string" then
if FileName:find(".ogg") or FileName:find(".wav") then
if not FileName:find("l10n/DEFAULT/") then
FileName = "l10n/DEFAULT/" .. FileName
end
self.FileName = FileName
return self
end
end
self:E({"File name invalid. Maybe something wrong with the extension ?", self.FileName})
return self
end
--- Check validity of the frequency passed and sets RADIO.Frequency
-- @param #RADIO self
-- @param #number Frequency in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)
-- @return #RADIO self
function RADIO:SetFrequency(Frequency)
self:F2(Frequency)
if type(Frequency) == "number" then
-- If frequency is in range
if (Frequency >= 30 and Frequency < 88) or (Frequency >= 108 and Frequency < 152) or (Frequency >= 225 and Frequency < 400) then
self.Frequency = Frequency * 1000000 -- Conversion in Hz
-- If the RADIO is attached to a UNIT or a GROUP, we need to send the DCS Command "SetFrequency" to change the UNIT or GROUP frequency
if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then
self.Positionable:SetCommand({
id = "SetFrequency",
params = {
frequency = self.Frequency,
modulation = self.Modulation,
}
})
end
return self
end
end
self:E({"Frequency is outside of DCS Frequency ranges (30-80, 108-152, 225-400). Frequency unchanged.", self.Frequency})
return self
end
--- Check validity of the frequency passed and sets RADIO.Modulation
-- @param #RADIO self
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
-- @return #RADIO self
function RADIO:SetModulation(Modulation)
self:F2(Modulation)
if type(Modulation) == "number" then
if Modulation == radio.modulation.AM or Modulation == radio.modulation.FM then --TODO Maybe make this future proof if ED decides to add an other modulation ?
self.Modulation = Modulation
return self
end
end
self:E({"Modulation is invalid. Use DCS's enum radio.modulation. Modulation unchanged.", self.Modulation})
return self
end
--- Check validity of the power passed and sets RADIO.Power
-- @param #RADIO self
-- @param #number Power in W
-- @return #RADIO self
function RADIO:SetPower(Power)
self:F2(Power)
if type(Power) == "number" then
self.Power = math.floor(math.abs(Power)) --TODO Find what is the maximum power allowed by DCS and limit power to that
return self
end
self:E({"Power is invalid. Power unchanged.", self.Power})
return self
end
--- Check validity of the loop passed and sets RADIO.Loop
-- @param #RADIO self
-- @param #boolean Loop
-- @return #RADIO self
-- @usage
function RADIO:SetLoop(Loop)
self:F2(Loop)
if type(Loop) == "boolean" then
self.Loop = Loop
return self
end
self:E({"Loop is invalid. Loop unchanged.", self.Loop})
return self
end
--- Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration
-- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration
-- @param #RADIO self
-- @param #string Subtitle
-- @param #number SubtitleDuration in s
-- @return #RADIO self
-- @usage
-- -- create the broadcaster and attaches it a RADIO
-- local MyUnit = UNIT:FindByName("MyUnit")
-- local MyUnitRadio = MyUnit:GetRadio()
--
-- -- add a subtitle for the next transmission, which will be up for 10s
-- MyUnitRadio:SetSubtitle("My Subtitle, 10)
function RADIO:SetSubtitle(Subtitle, SubtitleDuration)
self:F2({Subtitle, SubtitleDuration})
if type(Subtitle) == "string" then
self.Subtitle = Subtitle
else
self.Subtitle = ""
self:E({"Subtitle is invalid. Subtitle reset.", self.Subtitle})
end
if type(SubtitleDuration) == "number" then
if math.floor(math.abs(SubtitleDuration)) == SubtitleDuration then
self.SubtitleDuration = SubtitleDuration
return self
end
end
self.SubtitleDuration = 0
self:E({"SubtitleDuration is invalid. SubtitleDuration reset.", self.SubtitleDuration})
end
--- Create a new transmission, that is to say, populate the RADIO with relevant data
-- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
-- but it will work with a UNIT or a GROUP anyway.
-- Only the #RADIO and the Filename are mandatory
-- @param #RADIO self
-- @param #string FileName
-- @param #number Frequency in MHz
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
-- @param #number Power in W
-- @return #RADIO self
function RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop)
self:F({FileName, Frequency, Modulation, Power})
self:SetFileName(FileName)
if Frequency then self:SetFrequency(Frequency) end
if Modulation then self:SetModulation(Modulation) end
if Power then self:SetPower(Power) end
if Loop then self:SetLoop(Loop) end
return self
end
--- Create a new transmission, that is to say, populate the RADIO with relevant data
-- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
-- but it will work for any @{Positionable#POSITIONABLE}.
-- Only the RADIO and the Filename are mandatory.
-- @param #RADIO self
-- @param #string FileName
-- @param #string Subtitle
-- @param #number SubtitleDuration in s
-- @param #number Frequency in MHz
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
-- @param #boolean Loop
-- @return #RADIO self
function RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop)
self:F({FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop})
self:SetFileName(FileName)
if Subtitle then self:SetSubtitle(Subtitle) end
if SubtitleDuration then self:SetSubtitleDuration(SubtitleDuration) end
if Frequency then self:SetFrequency(Frequency) end
if Modulation then self:SetModulation(Modulation) end
if Loop then self:SetLoop(Loop) end
return self
end
--- Actually Broadcast the transmission
-- * The Radio has to be populated with the new transmission before broadcasting.
-- * Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
-- * This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
-- * If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
-- * If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
-- * If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
-- * If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored
-- @param #RADIO self
-- @return #RADIO self
function RADIO:Broadcast()
self:F()
-- If the POSITIONABLE is actually a UNIT or a GROUP, use the more complicated DCS command system
if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then
self:T2("Broadcasting from a UNIT or a GROUP")
self.Positionable:SetCommand({
id = "TransmitMessage",
params = {
file = self.FileName,
duration = self.SubtitleDuration,
subtitle = self.Subtitle,
loop = self.Loop,
}
})
else
-- If the POSITIONABLE is anything else, we revert to the general singleton function
-- I need to give it a unique name, so that the transmission can be stopped later. I use the class ID
self:T2("Broadcasting from a POSITIONABLE")
trigger.action.radioTransmission(self.FileName, self.Positionable:GetPositionVec3(), self.Modulation, self.Loop, self.Frequency, self.Power, tostring(self.ID))
end
return self
end
--- Stops a transmission
-- This function is especially usefull to stop the broadcast of looped transmissions
-- @param #RADIO self
-- @return #RADIO self
function RADIO:StopBroadcast()
self:F()
-- If the POSITIONABLE is a UNIT or a GROUP, stop the transmission with the DCS "StopTransmission" command
if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then
self.Positionable:SetCommand({
id = "StopTransmission",
params = {}
})
else
-- Else, we use the appropriate singleton funciton
trigger.action.stopRadioTransmission(tostring(self.ID))
end
return self
end
--- # BEACON class, extends @{Base#BASE}
--
-- After attaching a @{#BEACON} to your @{Positionable#POSITIONABLE}, you need to select the right function to activate the kind of beacon you want.
-- There are two types of BEACONs available : the AA TACAN Beacon and the general purpose Radio Beacon.
-- Note that in both case, you can set an optional parameter : the `BeaconDuration`. This can be very usefull to simulate the battery time if your BEACON is
-- attach to a cargo crate, for exemple.
--
-- ## AA TACAN Beacon usage
--
-- This beacon only works with airborne @{Unit#UNIT} or a @{Group#GROUP}. Use @{#BEACON:AATACAN}() to set the beacon parameters and start the beacon.
-- Use @#BEACON:StopAATACAN}() to stop it.
--
-- ## General Purpose Radio Beacon usage
--
-- This beacon will work with any @{Positionable#POSITIONABLE}, but **it won't follow the @{Positionable#POSITIONABLE}** ! This means that you should only use it with
-- @{Positionable#POSITIONABLE} that don't move, or move very slowly. Use @{#BEACON:RadioBeacon}() to set the beacon parameters and start the beacon.
-- Use @{#BEACON:StopRadioBeacon}() to stop it.
--
-- @type BEACON
-- @extends Core.Base#BASE
BEACON = {
ClassName = "BEACON",
}
--- Create a new BEACON Object. This doesn't activate the beacon, though, use @{#BEACON.AATACAN} or @{#BEACON.Generic}
-- If you want to create a BEACON, you probably should use @{Positionable#POSITIONABLE.GetBeacon}() instead.
-- @param #BEACON self
-- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities.
-- @return #BEACON Beacon
-- @return #nil If Positionable is invalid
function BEACON:New(Positionable)
local self = BASE:Inherit(self, BASE:New())
self:F(Positionable)
if Positionable:GetPointVec2() then -- It's stupid, but the only way I found to make sure positionable is valid
self.Positionable = Positionable
return self
end
self:E({"The passed positionable is invalid, no BEACON created", Positionable})
return nil
end
--- Converts a TACAN Channel/Mode couple into a frequency in Hz
-- @param #BEACON self
-- @param #number TACANChannel
-- @param #string TACANMode
-- @return #number Frequecy
-- @return #nil if parameters are invalid
function BEACON:_TACANToFrequency(TACANChannel, TACANMode)
self:F3({TACANChannel, TACANMode})
if type(TACANChannel) ~= "number" then
if TACANMode ~= "X" and TACANMode ~= "Y" then
return nil -- error in arguments
end
end
-- This code is largely based on ED's code, in DCS World\Scripts\World\Radio\BeaconTypes.lua, line 137.
-- I have no idea what it does but it seems to work
local A = 1151 -- 'X', channel >= 64
local B = 64 -- channel >= 64
if TACANChannel < 64 then
B = 1
end
if TACANMode == 'Y' then
A = 1025
if TACANChannel < 64 then
A = 1088
end
else -- 'X'
if TACANChannel < 64 then
A = 962
end
end
return (A + TACANChannel - B) * 1000000
end
--- Activates a TACAN BEACON on an Aircraft.
-- @param #BEACON self
-- @param #number TACANChannel (the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels
-- @param #string Message The Message that is going to be coded in Morse and broadcasted by the beacon
-- @param #boolean Bearing Can the BEACON be homed on ?
-- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever.
-- @return #BEACON self
-- @usage
-- -- Let's create a TACAN Beacon for a tanker
-- local myUnit = UNIT:FindByName("MyUnit")
-- local myBeacon = myUnit:GetBeacon() -- Creates the beacon
--
-- myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon
function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration)
self:F({TACANChannel, Message, Bearing, BeaconDuration})
local IsValid = true
if not self.Positionable:IsAir() then
self:E({"The POSITIONABLE you want to attach the AA Tacan Beacon is not an aircraft ! The BEACON is not emitting", self.Positionable})
IsValid = false
end
local Frequency = self:_TACANToFrequency(TACANChannel, "Y")
if not Frequency then
self:E({"The passed TACAN channel is invalid, the BEACON is not emitting"})
IsValid = false
end
-- I'm using the beacon type 4 (BEACON_TYPE_TACAN). For System, I'm using 5 (TACAN_TANKER_MODE_Y) if the bearing shows its bearing
-- or 14 (TACAN_AA_MODE_Y) if it does not
local System
if Bearing then
System = 5
else
System = 14
end
if IsValid then -- Starts the BEACON
self:T2({"AA TACAN BEACON started !"})
self.Positionable:SetCommand({
id = "ActivateBeacon",
params = {
type = 4,
system = System,
callsign = Message,
frequency = Frequency,
}
})
if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD
SCHEDULER:New( nil,
function()
self:StopAATACAN()
end, {}, BeaconDuration)
end
end
return self
end
--- Stops the AA TACAN BEACON
-- @param #BEACON self
-- @return #BEACON self
function BEACON:StopAATACAN()
self:F()
if not self.Positionable then
self:E({"Start the beacon first before stoping it !"})
else
self.Positionable:SetCommand({
id = 'DeactivateBeacon',
params = {
}
})
end
end
--- Activates a general pupose Radio Beacon
-- This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.
-- Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8.
-- They can home in on these specific frequencies :
-- * **Mi8**
-- * R-828 -> 20-60MHz
-- * ARKUD -> 100-150MHz (canal 1 : 114166, canal 2 : 114333, canal 3 : 114583, canal 4 : 121500, canal 5 : 123100, canal 6 : 124100) AM
-- * ARK9 -> 150-1300KHz
-- * **Huey**
-- * AN/ARC-131 -> 30-76 Mhz FM
-- @param #BEACON self
-- @param #string FileName The name of the audio file
-- @param #number Frequency in MHz
-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM
-- @param #number Power in W
-- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever.
-- @return #BEACON self
-- @usage
-- -- Let's create a beacon for a unit in distress.
-- -- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131)
-- -- The beacon they use is battery-powered, and only lasts for 5 min
-- local UnitInDistress = UNIT:FindByName("Unit1")
-- local UnitBeacon = UnitInDistress:GetBeacon()
--
-- -- Set the beacon and start it
-- UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60)
function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration)
self:F({FileName, Frequency, Modulation, Power, BeaconDuration})
local IsValid = false
-- Check the filename
if type(FileName) == "string" then
if FileName:find(".ogg") or FileName:find(".wav") then
if not FileName:find("l10n/DEFAULT/") then
FileName = "l10n/DEFAULT/" .. FileName
end
IsValid = true
end
end
if not IsValid then
self:E({"File name invalid. Maybe something wrong with the extension ? ", FileName})
end
-- Check the Frequency
if type(Frequency) ~= "number" and IsValid then
self:E({"Frequency invalid. ", Frequency})
IsValid = false
end
Frequency = Frequency * 1000000 -- Conversion to Hz
-- Check the modulation
if Modulation ~= radio.modulation.AM and Modulation ~= radio.modulation.FM and IsValid then --TODO Maybe make this future proof if ED decides to add an other modulation ?
self:E({"Modulation is invalid. Use DCS's enum radio.modulation.", Modulation})
IsValid = false
end
-- Check the Power
if type(Power) ~= "number" and IsValid then
self:E({"Power is invalid. ", Power})
IsValid = false
end
Power = math.floor(math.abs(Power)) --TODO Find what is the maximum power allowed by DCS and limit power to that
if IsValid then
self:T2({"Activating Beacon on ", Frequency, Modulation})
-- Note that this is looped. I have to give this transmission a unique name, I use the class ID
trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power, tostring(self.ID))
if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD
SCHEDULER:New( nil,
function()
self:StopRadioBeacon()
end, {}, BeaconDuration)
end
end
end
--- Stops the AA TACAN BEACON
-- @param #BEACON self
-- @return #BEACON self
function BEACON:StopRadioBeacon()
self:F()
-- The unique name of the transmission is the class ID
trigger.action.stopRadioTransmission(tostring(self.ID))
end

View File

@@ -0,0 +1,227 @@
--- This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.
--
-- ===
--
-- Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.
--
-- This class is tricky and needs some thorought explanation.
-- SCHEDULE classes are used to schedule functions for objects, or as persistent objects.
-- The SCHEDULEDISPATCHER class ensures that:
--
-- - Scheduled functions are planned according the SCHEDULER object parameters.
-- - Scheduled functions are repeated when requested, according the SCHEDULER object parameters.
-- - Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.
--
-- The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection:
-- - When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER
-- object is _persistent_ within memory.
-- - When a SCHEDULER object *is* attached to another object, then the SCHEDULER object is _not persistent_ within memory after a garbage collection!
-- The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected.
-- Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
-- these will not be executed anymore when the SCHEDULER object has been destroyed.
--
-- The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object.
-- The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER.
-- The SCHEDULER object plans new scheduled functions through the @{Scheduler#SCHEDULER.Schedule}() method.
-- The Schedule() method returns the CallID that is the reference ID for each planned schedule.
--
-- ===
--
-- ===
--
-- ### Contributions: -
-- ### Authors: FlightControl : Design & Programming
--
-- @module ScheduleDispatcher
--- The SCHEDULEDISPATCHER structure
-- @type SCHEDULEDISPATCHER
SCHEDULEDISPATCHER = {
ClassName = "SCHEDULEDISPATCHER",
CallID = 0,
}
function SCHEDULEDISPATCHER:New()
local self = BASE:Inherit( self, BASE:New() )
self:F3()
return self
end
--- Add a Schedule to the ScheduleDispatcher.
-- The development of this method was really tidy.
-- It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified.
-- Nothing of this code should be modified without testing it thoroughly.
-- @param #SCHEDULEDISPATCHER self
-- @param Core.Scheduler#SCHEDULER Scheduler
function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop )
self:F2( { Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop } )
self.CallID = self.CallID + 1
-- Initialize the ObjectSchedulers array, which is a weakly coupled table.
-- If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.
self.PersistentSchedulers = self.PersistentSchedulers or {}
-- Initialize the ObjectSchedulers array, which is a weakly coupled table.
-- If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.
self.ObjectSchedulers = self.ObjectSchedulers or setmetatable( {}, { __mode = "v" } ) -- or {}
if Scheduler.MasterObject then
self.ObjectSchedulers[self.CallID] = Scheduler
self:F3( { CallID = self.CallID, ObjectScheduler = tostring(self.ObjectSchedulers[self.CallID]), MasterObject = tostring(Scheduler.MasterObject) } )
else
self.PersistentSchedulers[self.CallID] = Scheduler
self:F3( { CallID = self.CallID, PersistentScheduler = self.PersistentSchedulers[self.CallID] } )
end
self.Schedule = self.Schedule or setmetatable( {}, { __mode = "k" } )
self.Schedule[Scheduler] = self.Schedule[Scheduler] or {}
self.Schedule[Scheduler][self.CallID] = {}
self.Schedule[Scheduler][self.CallID].Function = ScheduleFunction
self.Schedule[Scheduler][self.CallID].Arguments = ScheduleArguments
self.Schedule[Scheduler][self.CallID].StartTime = timer.getTime() + ( Start or 0 )
self.Schedule[Scheduler][self.CallID].Start = Start + .1
self.Schedule[Scheduler][self.CallID].Repeat = Repeat
self.Schedule[Scheduler][self.CallID].Randomize = Randomize
self.Schedule[Scheduler][self.CallID].Stop = Stop
self:T3( self.Schedule[Scheduler][self.CallID] )
self.Schedule[Scheduler][self.CallID].CallHandler = function( CallID )
self:F2( CallID )
local ErrorHandler = function( errmsg )
env.info( "Error in timer function: " .. errmsg )
if debug ~= nil then
env.info( debug.traceback() )
end
return errmsg
end
local Scheduler = self.ObjectSchedulers[CallID]
if not Scheduler then
Scheduler = self.PersistentSchedulers[CallID]
end
self:T3( { Scheduler = Scheduler } )
if Scheduler then
local Schedule = self.Schedule[Scheduler][CallID]
self:T3( { Schedule = Schedule } )
local ScheduleObject = Scheduler.SchedulerObject
--local ScheduleObjectName = Scheduler.SchedulerObject:GetNameAndClassID()
local ScheduleFunction = Schedule.Function
local ScheduleArguments = Schedule.Arguments
local Start = Schedule.Start
local Repeat = Schedule.Repeat or 0
local Randomize = Schedule.Randomize or 0
local Stop = Schedule.Stop or 0
local ScheduleID = Schedule.ScheduleID
local Status, Result
if ScheduleObject then
local function Timer()
return ScheduleFunction( ScheduleObject, unpack( ScheduleArguments ) )
end
Status, Result = xpcall( Timer, ErrorHandler )
else
local function Timer()
return ScheduleFunction( unpack( ScheduleArguments ) )
end
Status, Result = xpcall( Timer, ErrorHandler )
end
local CurrentTime = timer.getTime()
local StartTime = CurrentTime + Start
if Status and (( Result == nil ) or ( Result and Result ~= false ) ) then
if Repeat ~= 0 and ( Stop == 0 ) or ( Stop ~= 0 and CurrentTime <= StartTime + Stop ) then
local ScheduleTime =
CurrentTime +
Repeat +
math.random(
- ( Randomize * Repeat / 2 ),
( Randomize * Repeat / 2 )
) +
0.01
self:T3( { Repeat = CallID, CurrentTime, ScheduleTime, ScheduleArguments } )
return ScheduleTime -- returns the next time the function needs to be called.
else
self:Stop( Scheduler, CallID )
end
else
self:Stop( Scheduler, CallID )
end
else
self:E( "Scheduled obscolete call for CallID: " .. CallID )
end
return nil
end
self:Start( Scheduler, self.CallID )
return self.CallID
end
function SCHEDULEDISPATCHER:RemoveSchedule( Scheduler, CallID )
self:F2( { Remove = CallID, Scheduler = Scheduler } )
if CallID then
self:Stop( Scheduler, CallID )
self.Schedule[Scheduler][CallID] = nil
end
end
function SCHEDULEDISPATCHER:Start( Scheduler, CallID )
self:F2( { Start = CallID, Scheduler = Scheduler } )
if CallID then
local Schedule = self.Schedule[Scheduler]
-- Only start when there is no ScheduleID defined!
-- This prevents to "Start" the scheduler twice with the same CallID...
if not Schedule[CallID].ScheduleID then
Schedule[CallID].ScheduleID = timer.scheduleFunction(
Schedule[CallID].CallHandler,
CallID,
timer.getTime() + Schedule[CallID].Start
)
end
else
for CallID, Schedule in pairs( self.Schedule[Scheduler] or {} ) do
self:Start( Scheduler, CallID ) -- Recursive
end
end
end
function SCHEDULEDISPATCHER:Stop( Scheduler, CallID )
self:F2( { Stop = CallID, Scheduler = Scheduler } )
if CallID then
local Schedule = self.Schedule[Scheduler]
-- Only stop when there is a ScheduleID defined for the CallID.
-- So, when the scheduler was stopped before, do nothing.
if Schedule[CallID].ScheduleID then
timer.removeFunction( Schedule[CallID].ScheduleID )
Schedule[CallID].ScheduleID = nil
end
else
for CallID, Schedule in pairs( self.Schedule[Scheduler] or {} ) do
self:Stop( Scheduler, CallID ) -- Recursive
end
end
end
function SCHEDULEDISPATCHER:Clear( Scheduler )
self:F2( { Scheduler = Scheduler } )
for CallID, Schedule in pairs( self.Schedule[Scheduler] or {} ) do
self:Stop( Scheduler, CallID ) -- Recursive
end
end

View File

@@ -0,0 +1,316 @@
--- **Core** - SCHEDULER prepares and handles the **execution of functions over scheduled time (intervals)**.
--
-- ![Banner Image](..\Presentations\SCHEDULER\Dia1.JPG)
--
-- ===
--
-- SCHEDULER manages the **scheduling of functions**:
--
-- * optionally in an optional specified time interval,
-- * optionally **repeating** with a specified time repeat interval,
-- * optionally **randomizing** with a specified time interval randomization factor,
-- * optionally **stop** the repeating after a specified time interval.
--
-- ===
--
-- # Demo Missions
--
-- ### [SCHEDULER Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/SCH%20-%20Scheduler)
--
-- ### [SCHEDULER Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCH%20-%20Scheduler)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [SCHEDULER YouTube Channel (none)]()
--
-- ====
--
-- ### Contributions:
--
-- * FlightControl : Concept & Testing
--
-- ### Authors:
--
-- * FlightControl : Design & Programming
--
-- ===
--
-- @module Scheduler
--- The SCHEDULER class
-- @type SCHEDULER
-- @field #number ScheduleID the ID of the scheduler.
-- @extends Core.Base#BASE
--- # SCHEDULER class, extends @{Base#BASE}
--
-- The SCHEDULER class creates schedule.
--
-- A SCHEDULER can manage **multiple** (repeating) schedules. Each planned or executing schedule has a unique **ScheduleID**.
-- The ScheduleID is returned when the method @{#SCHEDULER.Schedule}() is called.
-- It is recommended to store the ScheduleID in a variable, as it is used in the methods @{SCHEDULER.Start}() and @{SCHEDULER.Stop}(),
-- which can start and stop specific repeating schedules respectively within a SCHEDULER object.
--
-- ## SCHEDULER constructor
--
-- The SCHEDULER class is quite easy to use, but note that the New constructor has variable parameters:
--
-- The @{#SCHEDULER.New}() method returns 2 variables:
--
-- 1. The SCHEDULER object reference.
-- 2. The first schedule planned in the SCHEDULER object.
--
-- To clarify the different appliances, lets have a look at the following examples:
--
-- ### Construct a SCHEDULER object without a persistent schedule.
--
-- * @{#SCHEDULER.New}( nil ): Setup a new SCHEDULER object, which is persistently executed after garbage collection.
--
-- SchedulerObject = SCHEDULER:New()
-- SchedulerID = SchedulerObject:Schedule( nil, ScheduleFunction, {} )
--
-- The above example creates a new SchedulerObject, but does not schedule anything.
-- A separate schedule is created by using the SchedulerObject using the method :Schedule..., which returns a ScheduleID
--
-- ### Construct a SCHEDULER object without a volatile schedule, but volatile to the Object existence...
--
-- * @{#SCHEDULER.New}( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
--
-- ZoneObject = ZONE:New( "ZoneName" )
-- SchedulerObject = SCHEDULER:New( ZoneObject )
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} )
-- ...
-- ZoneObject = nil
-- garbagecollect()
--
-- The above example creates a new SchedulerObject, but does not schedule anything, and is bound to the existence of ZoneObject, which is a ZONE.
-- A separate schedule is created by using the SchedulerObject using the method :Schedule()..., which returns a ScheduleID
-- Later in the logic, the ZoneObject is put to nil, and garbage is collected.
-- As a result, the ScheduleObject will cancel any planned schedule.
--
-- ### Construct a SCHEDULER object with a persistent schedule.
--
-- * @{#SCHEDULER.New}( nil, Function, FunctionArguments, Start, ... ): Setup a new persistent SCHEDULER object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
--
-- SchedulerObject, SchedulerID = SCHEDULER:New( nil, ScheduleFunction, {} )
--
-- The above example creates a new SchedulerObject, and does schedule the first schedule as part of the call.
-- Note that 2 variables are returned here: SchedulerObject, ScheduleID...
--
-- ### Construct a SCHEDULER object without a schedule, but volatile to the Object existence...
--
-- * @{#SCHEDULER.New}( Object, Function, FunctionArguments, Start, ... ): Setup a new SCHEDULER object, linked to Object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
--
-- ZoneObject = ZONE:New( "ZoneName" )
-- SchedulerObject, SchedulerID = SCHEDULER:New( ZoneObject, ScheduleFunction, {} )
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} )
-- ...
-- ZoneObject = nil
-- garbagecollect()
--
-- The above example creates a new SchedulerObject, and schedules a method call (ScheduleFunction),
-- and is bound to the existence of ZoneObject, which is a ZONE object (ZoneObject).
-- Both a ScheduleObject and a SchedulerID variable are returned.
-- Later in the logic, the ZoneObject is put to nil, and garbage is collected.
-- As a result, the ScheduleObject will cancel the planned schedule.
--
-- ## SCHEDULER timer stopping and (re-)starting.
--
-- The SCHEDULER can be stopped and restarted with the following methods:
--
-- * @{#SCHEDULER.Start}(): (Re-)Start the schedules within the SCHEDULER object. If a CallID is provided to :Start(), only the schedule referenced by CallID will be (re-)started.
-- * @{#SCHEDULER.Stop}(): Stop the schedules within the SCHEDULER object. If a CallID is provided to :Stop(), then only the schedule referenced by CallID will be stopped.
--
-- ZoneObject = ZONE:New( "ZoneName" )
-- SchedulerObject, SchedulerID = SCHEDULER:New( ZoneObject, ScheduleFunction, {} )
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 10 )
-- ...
-- SchedulerObject:Stop( SchedulerID )
-- ...
-- SchedulerObject:Start( SchedulerID )
--
-- The above example creates a new SchedulerObject, and does schedule the first schedule as part of the call.
-- Note that 2 variables are returned here: SchedulerObject, ScheduleID...
-- Later in the logic, the repeating schedule with SchedulerID is stopped.
-- A bit later, the repeating schedule with SchedulerId is (re)-started.
--
-- ## Create a new schedule
--
-- With the method @{#SCHEDULER.Schedule}() a new time event can be scheduled.
-- This method is used by the :New() constructor when a new schedule is planned.
--
-- Consider the following code fragment of the SCHEDULER object creation.
--
-- ZoneObject = ZONE:New( "ZoneName" )
-- SchedulerObject = SCHEDULER:New( ZoneObject )
--
-- Several parameters can be specified that influence the behaviour of a Schedule.
--
-- ### A single schedule, immediately executed
--
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} )
--
-- The above example schedules a new ScheduleFunction call to be executed asynchronously, within milleseconds ...
--
-- ### A single schedule, planned over time
--
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10 )
--
-- The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds ...
--
-- ### A schedule with a repeating time interval, planned over time
--
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60 )
--
-- The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds,
-- and repeating 60 every seconds ...
--
-- ### A schedule with a repeating time interval, planned over time, with time interval randomization
--
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5 )
--
-- The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds,
-- and repeating 60 seconds, with a 50% time interval randomization ...
-- So the repeating time interval will be randomized using the **0.5**,
-- and will calculate between **60 - ( 60 * 0.5 )** and **60 + ( 60 * 0.5 )** for each repeat,
-- which is in this example between **30** and **90** seconds.
--
-- ### A schedule with a repeating time interval, planned over time, with time interval randomization, and stop after a time interval
--
-- SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5, 300 )
--
-- The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds,
-- The schedule will repeat every 60 seconds.
-- So the repeating time interval will be randomized using the **0.5**,
-- and will calculate between **60 - ( 60 * 0.5 )** and **60 + ( 60 * 0.5 )** for each repeat,
-- which is in this example between **30** and **90** seconds.
-- The schedule will stop after **300** seconds.
--
-- @field #SCHEDULER
SCHEDULER = {
ClassName = "SCHEDULER",
Schedules = {},
}
--- SCHEDULER constructor.
-- @param #SCHEDULER self
-- @param #table SchedulerObject Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.
-- @param #function SchedulerFunction The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
-- @param #table SchedulerArguments Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
-- @param #number Start Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
-- @param #number Repeat Specifies the interval in seconds when the scheduler will call the event function.
-- @param #number RandomizeFactor Specifies a randomization factor between 0 and 1 to randomize the Repeat.
-- @param #number Stop Specifies the amount of seconds when the scheduler will be stopped.
-- @return #SCHEDULER self.
-- @return #number The ScheduleID of the planned schedule.
function SCHEDULER:New( SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop )
local self = BASE:Inherit( self, BASE:New() )
self:F2( { Start, Repeat, RandomizeFactor, Stop } )
local ScheduleID = nil
self.MasterObject = SchedulerObject
if SchedulerFunction then
ScheduleID = self:Schedule( SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop )
end
return self, ScheduleID
end
--function SCHEDULER:_Destructor()
-- --self:E("_Destructor")
--
-- _SCHEDULEDISPATCHER:RemoveSchedule( self.CallID )
--end
--- Schedule a new time event. Note that the schedule will only take place if the scheduler is *started*. Even for a single schedule event, the scheduler needs to be started also.
-- @param #SCHEDULER self
-- @param #table SchedulerObject Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.
-- @param #function SchedulerFunction The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
-- @param #table SchedulerArguments Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
-- @param #number Start Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
-- @param #number Repeat Specifies the interval in seconds when the scheduler will call the event function.
-- @param #number RandomizeFactor Specifies a randomization factor between 0 and 1 to randomize the Repeat.
-- @param #number Stop Specifies the amount of seconds when the scheduler will be stopped.
-- @return #number The ScheduleID of the planned schedule.
function SCHEDULER:Schedule( SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop )
self:F2( { Start, Repeat, RandomizeFactor, Stop } )
self:T3( { SchedulerArguments } )
local ObjectName = "-"
if SchedulerObject and SchedulerObject.ClassName and SchedulerObject.ClassID then
ObjectName = SchedulerObject.ClassName .. SchedulerObject.ClassID
end
self:F3( { "Schedule :", ObjectName, tostring( SchedulerObject ), Start, Repeat, RandomizeFactor, Stop } )
self.SchedulerObject = SchedulerObject
local ScheduleID = _SCHEDULEDISPATCHER:AddSchedule(
self,
SchedulerFunction,
SchedulerArguments,
Start,
Repeat,
RandomizeFactor,
Stop
)
self.Schedules[#self.Schedules+1] = ScheduleID
return ScheduleID
end
--- (Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.
-- @param #SCHEDULER self
-- @param #number ScheduleID (optional) The ScheduleID of the planned (repeating) schedule.
function SCHEDULER:Start( ScheduleID )
self:F3( { ScheduleID } )
_SCHEDULEDISPATCHER:Start( self, ScheduleID )
end
--- Stops the schedules or a specific schedule if a valid ScheduleID is provided.
-- @param #SCHEDULER self
-- @param #number ScheduleID (optional) The ScheduleID of the planned (repeating) schedule.
function SCHEDULER:Stop( ScheduleID )
self:F3( { ScheduleID } )
_SCHEDULEDISPATCHER:Stop( self, ScheduleID )
end
--- Removes a specific schedule if a valid ScheduleID is provided.
-- @param #SCHEDULER self
-- @param #number ScheduleID (optional) The ScheduleID of the planned (repeating) schedule.
function SCHEDULER:Remove( ScheduleID )
self:F3( { ScheduleID } )
_SCHEDULEDISPATCHER:Remove( self, ScheduleID )
end
--- Clears all pending schedules.
-- @param #SCHEDULER self
function SCHEDULER:Clear()
self:F3( )
_SCHEDULEDISPATCHER:Clear( self )
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,177 @@
--- (R2.1) **Core** -- Spawn dynamically new STATICs in your missions.
--
-- ![Banner Image](..\Presentations\SPAWNSTATIC\Dia1.JPG)
--
-- ====
--
-- SPAWNSTATIC spawns static structures in your missions dynamically. See below the SPAWNSTATIC class documentation.
--
-- ====
--
-- # Demo Missions
--
-- ### [SPAWNSTATIC Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/SPS - Spawning Statics)
--
-- ### [SPAWNSTATIC Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SPS%20-%20Spawning%20Statics)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [SPAWNSTATIC YouTube Channel]()
--
-- ====
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming
--
-- @module SpawnStatic
--- @type SPAWNSTATIC
-- @extends Core.Base#BASE
--- # SPAWNSTATIC class, extends @{Base#BASE}
--
-- The SPAWNSTATIC class allows to spawn dynamically new @{Static}s.
-- Through creating a copy of an existing static object template as defined in the Mission Editor (ME),
-- SPAWNSTATIC can retireve the properties of the defined static object template (like type, category etc), and "copy"
-- these properties to create a new static object and place it at the desired coordinate.
--
-- New spawned @{Static}s get **the same name** as the name of the template Static,
-- or gets the given name when a new name is provided at the Spawn method.
-- By default, spawned @{Static}s will follow a naming convention at run-time:
--
-- * Spawned @{Static}s will have the name _StaticName_#_nnn_, where _StaticName_ is the name of the **Template Static**,
-- and _nnn_ is a **counter from 0 to 99999**.
--
--
-- ## SPAWNSTATIC construction methods
--
-- Create a new SPAWNSTATIC object with the @{#SPAWNSTATIC.NewFromStatic}():
--
-- * @{#SPAWNSTATIC.NewFromStatic}(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
--
-- ## **Spawn** methods
--
-- Groups can be spawned at different times and methods:
--
-- * @{#SPAWNSTATIC.SpawnFromPointVec2}(): Spawn a new group from a POINT_VEC2 coordinate.
-- (The group will be spawned at land height ).
-- * @{#SPAWNSTATIC.SpawnFromZone}(): Spawn a new group in a @{Zone}.
--
-- @field #SPAWNSTATIC SPAWNSTATIC
--
SPAWNSTATIC = {
ClassName = "SPAWNSTATIC",
}
--- @type SPAWNSTATIC.SpawnZoneTable
-- @list <Core.Zone#ZONE_BASE> SpawnZone
--- Creates the main object to spawn a @{Static} defined in the ME.
-- @param #SPAWNSTATIC self
-- @param #string SpawnTemplatePrefix is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.
-- @return #SPAWNSTATIC
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID ) --R2.1
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
self:F( { SpawnTemplatePrefix } )
local TemplateStatic = StaticObject.getByName( SpawnTemplatePrefix )
if TemplateStatic then
self.SpawnTemplatePrefix = SpawnTemplatePrefix
self.CountryID = CountryID
self.SpawnIndex = 0
else
error( "SPAWNSTATIC:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
end
self:SetEventPriority( 5 )
return self
end
--- Creates the main object to spawn a @{Static} based on a type name.
-- @param #SPAWNSTATIC self
-- @param #string SpawnTypeName is the name of the type.
-- @return #SPAWNSTATIC
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID ) --R2.1
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
self:F( { SpawnTypeName } )
self.SpawnTypeName = SpawnTypeName
self.CountryID = CountryID
self.SpawnIndex = 0
self:SetEventPriority( 5 )
return self
end
--- Creates a new @{Static} from a POINT_VEC2.
-- @param #SPAWNSTATIC self
-- @param Core.Point#POINT_VEC2 PointVec2 The 2D coordinate where to spawn the static.
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
-- @param #string (optional) The name of the new static.
-- @return #SPAWNSTATIC
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1
self:F( { PointVec2, Heading, NewName } )
local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID]
local StaticTemplate = _DATABASE:GetStaticUnitTemplate( self.SpawnTemplatePrefix )
StaticTemplate.x = PointVec2:GetLat()
StaticTemplate.y = PointVec2:GetLon()
StaticTemplate.name = NewName or string.format("%s#%05d", self.SpawnTemplatePrefix, self.SpawnIndex )
StaticTemplate.heading = ( Heading / 180 ) * math.pi
StaticTemplate.CountryID = nil
StaticTemplate.CoalitionID = nil
StaticTemplate.CategoryID = nil
local Static = coalition.addStaticObject( self.CountryID, StaticTemplate )
self.SpawnIndex = self.SpawnIndex + 1
return Static
end
--- Creates a new @{Static} from a @{Zone}.
-- @param #SPAWNSTATIC self
-- @param Core.Zone#ZONE_BASE Zone The Zone where to spawn the static.
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
-- @param #string (optional) The name of the new static.
-- @return #SPAWNSTATIC
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1
self:F( { Zone, Heading, NewName } )
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
return Static
end

View File

@@ -0,0 +1,295 @@
--- **Core 2.1** -- Management of SPOT logistics, that can be transported from and to transportation carriers.
--
-- ![Banner Image](..\Presentations\SPOT\Dia1.JPG)
--
-- ===
--
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
--
-- * Spot 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.
--
-- ====
--
-- # Demo Missions
--
-- ### [SPOT Demo Missions source code]()
--
-- ### [SPOT Demo Missions, only for beta testers]()
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
-- ====
--
-- # YouTube Channel
--
-- ### [SPOT YouTube Channel]()
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
--
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming
--
-- @module Spot
do
--- @type SPOT
-- @extends Core.Fsm#FSM
--- # SPOT class, extends @{Fsm#FSM}
--
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
--
-- * 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}(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object.
--
-- ## 2. SPOT is a FSM
--
-- ![Process]()
--
-- ### 2.1 SPOT States
--
-- * **Off**: Lasing is switched off.
-- * **On**: Lasing is switched on.
-- * **Destroyed**: Target is destroyed.
--
-- ### 2.2 SPOT Events
--
-- * **@{#SPOT.LaseOn}(Target, LaserCode, Duration)**: Lase to a target.
-- * **@{#SPOT.LaseOff}()**: Stop lasing the target.
-- * **@{#SPOT.Lasing}()**: Target is being lased.
-- * **@{#SPOT.Destroyed}()**: Triggered when target is destroyed.
--
-- ## 3. Check if a Target is being lased
--
-- The method @{#SPOT.IsLasing}() indicates whether lasing is on or off.
--
-- @field #SPOT
SPOT = {
ClassName = "SPOT",
}
--- SPOT Constructor.
-- @param #SPOT self
-- @param Wrapper.Unit#UNIT Recce
-- @param #number LaserCode
-- @param #number Duration
-- @return #SPOT
function SPOT:New( Recce )
local self = BASE:Inherit( self, FSM:New() ) -- #SPOT
self:F( {} )
self:SetStartState( "Off" )
self:AddTransition( "Off", "LaseOn", "On" )
--- LaseOn Handler OnBefore for SPOT
-- @function [parent=#SPOT] OnBeforeLaseOn
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- LaseOn Handler OnAfter for SPOT
-- @function [parent=#SPOT] OnAfterLaseOn
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
--- LaseOn Trigger for SPOT
-- @function [parent=#SPOT] LaseOn
-- @param #SPOT self
--- LaseOn Asynchronous Trigger for SPOT
-- @function [parent=#SPOT] __LaseOn
-- @param #SPOT self
-- @param #number Delay
self:AddTransition( "On", "Lasing", "On" )
self:AddTransition( { "On", "Destroyed" } , "LaseOff", "Off" )
--- LaseOff Handler OnBefore for SPOT
-- @function [parent=#SPOT] OnBeforeLaseOff
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- LaseOff Handler OnAfter for SPOT
-- @function [parent=#SPOT] OnAfterLaseOff
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
--- LaseOff Trigger for SPOT
-- @function [parent=#SPOT] LaseOff
-- @param #SPOT self
--- LaseOff Asynchronous Trigger for SPOT
-- @function [parent=#SPOT] __LaseOff
-- @param #SPOT self
-- @param #number Delay
self:AddTransition( "*" , "Destroyed", "Destroyed" )
--- Destroyed Handler OnBefore for SPOT
-- @function [parent=#SPOT] OnBeforeDestroyed
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Destroyed Handler OnAfter for SPOT
-- @function [parent=#SPOT] OnAfterDestroyed
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Destroyed Trigger for SPOT
-- @function [parent=#SPOT] Destroyed
-- @param #SPOT self
--- Destroyed Asynchronous Trigger for SPOT
-- @function [parent=#SPOT] __Destroyed
-- @param #SPOT self
-- @param #number Delay
self.Recce = Recce
self.LaseScheduler = SCHEDULER:New( self )
self:SetEventPriority( 5 )
self.Lasing = false
return self
end
--- @param #SPOT self
-- @param From
-- @param Event
-- @param To
-- @param Wrapper.Positionable#POSITIONABLE Target
-- @param #number LaserCode
-- @param #number Duration
function SPOT:onafterLaseOn( From, Event, To, Target, LaserCode, Duration )
self:E( { "LaseOn", Target, LaserCode, Duration } )
local function StopLase( self )
self:LaseOff()
end
self.Target = Target
self.LaserCode = LaserCode
self.Lasing = true
local RecceDcsUnit = self.Recce:GetDCSObject()
self.SpotIR = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3() )
self.SpotLaser = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3(), LaserCode )
if Duration then
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
end
self:HandleEvent( EVENTS.Dead )
self:__Lasing( -0.2 )
end
--- @param #SPOT self
-- @param Core.Event#EVENTDATA EventData
function SPOT:OnEventDead(EventData)
self:E( { Dead = EventData.IniDCSUnitName, Target = self.Target } )
if self.Target then
if EventData.IniDCSUnitName == self.Target:GetName() then
self:E( {"Target dead ", self.Target:GetName() } )
self:Destroyed()
self:LaseOff()
end
end
end
--- @param #SPOT self
-- @param From
-- @param Event
-- @param To
function SPOT:onafterLasing( From, Event, To )
if self.Target:IsAlive() then
self.SpotIR:setPoint( self.Target:GetPointVec3():AddY(1):AddY(math.random(-100,100)/100):AddX(math.random(-100,100)/100):GetVec3() )
self.SpotLaser:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() )
self:__Lasing( -0.2 )
else
self:E( { "Target is not alive", self.Target:IsAlive() } )
end
end
--- @param #SPOT self
-- @param From
-- @param Event
-- @param To
-- @return #SPOT
function SPOT:onafterLaseOff( From, Event, To )
self:E( {"Stopped lasing for ", self.Target:GetName() , SpotIR = self.SportIR, SpotLaser = self.SpotLaser } )
self.Lasing = false
self.SpotIR:destroy()
self.SpotLaser:destroy()
self.SpotIR = nil
self.SpotLaser = nil
if self.ScheduleID then
self.LaseScheduler:Stop(self.ScheduleID)
end
self.ScheduleID = nil
self.Target = nil
return self
end
--- Check if the SPOT is lasing
-- @param #SPOT self
-- @return #boolean true if it is lasing
function SPOT:IsLasing()
return self.Lasing
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,15 +2,15 @@
-- @module CleanUp
-- @author Flightcontrol
Include.File( "Routines" )
Include.File( "Base" )
Include.File( "Mission" )
Include.File( "Client" )
Include.File( "Task" )
--- The CLEANUP class.
-- @type CLEANUP
-- @extends Base#BASE
-- @extends Core.Base#BASE
CLEANUP = {
ClassName = "CLEANUP",
ZoneNames = {},
@@ -29,7 +29,9 @@ CLEANUP = {
-- or
-- CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 )
-- CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 )
function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self, BASE:New() )
function CLEANUP:New( ZoneNames, TimeInterval )
local self = BASE:Inherit( self, BASE:New() ) -- #CLEANUP
self:F( { ZoneNames, TimeInterval } )
if type( ZoneNames ) == 'table' then
@@ -41,9 +43,9 @@ function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self,
self.TimeInterval = TimeInterval
end
_EVENTDISPATCHER:OnBirth( self._OnEventBirth, self )
self:HandleEvent( EVENTS.Birth )
self.CleanUpScheduler = routines.scheduleFunction( self._CleanUpScheduler, { self }, timer.getTime() + 1, TimeInterval )
self.CleanUpScheduler = SCHEDULER:New( self, self._CleanUpScheduler, {}, 1, TimeInterval )
return self
end
@@ -51,27 +53,25 @@ end
--- Destroys a group from the simulator, but checks first if it is still existing!
-- @param #CLEANUP self
-- @param DCSGroup#Group GroupObject The object to be destroyed.
-- @param Dcs.DCSWrapper.Group#Group GroupObject The object to be destroyed.
-- @param #string CleanUpGroupName The groupname...
function CLEANUP:_DestroyGroup( GroupObject, CleanUpGroupName )
self:F( { GroupObject, CleanUpGroupName } )
if GroupObject then -- and GroupObject:isExist() then
--MESSAGE:New( "Destroy Group " .. CleanUpGroupName, CleanUpGroupName, 1, CleanUpGroupName ):ToAll()
trigger.action.deactivateGroup(GroupObject)
self:T( { "GroupObject Destroyed", GroupObject } )
end
end
--- Destroys a @{DCSUnit#Unit} from the simulator, but checks first if it is still existing!
--- Destroys a @{DCSWrapper.Unit#Unit} from the simulator, but checks first if it is still existing!
-- @param #CLEANUP self
-- @param DCSUnit#Unit CleanUpUnit The object to be destroyed.
-- @param Dcs.DCSWrapper.Unit#Unit CleanUpUnit The object to be destroyed.
-- @param #string CleanUpUnitName The Unit name ...
function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName )
self:F( { CleanUpUnit, CleanUpUnitName } )
if CleanUpUnit then
--MESSAGE:New( "Destroy " .. CleanUpUnitName, CleanUpUnitName, 1, CleanUpUnitName ):ToAll()
local CleanUpGroup = Unit.getGroup(CleanUpUnit)
-- TODO Client bug in 1.5.3
if CleanUpGroup and CleanUpGroup:isExist() then
@@ -91,10 +91,10 @@ function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName )
end
end
-- TODO check DCSTypes#Weapon
-- TODO check Dcs.DCSTypes#Weapon
--- Destroys a missile from the simulator, but checks first if it is still existing!
-- @param #CLEANUP self
-- @param DCSTypes#Weapon MissileObject
-- @param Dcs.DCSTypes#Weapon MissileObject
function CLEANUP:_DestroyMissile( MissileObject )
self:F( { MissileObject } )
@@ -104,44 +104,35 @@ function CLEANUP:_DestroyMissile( MissileObject )
end
end
function CLEANUP:_OnEventBirth( Event )
self:F( { Event } )
--- @param #CLEANUP self
-- @param Core.Event#EVENTDATA EventData
function CLEANUP:_OnEventBirth( EventData )
self:F( { EventData } )
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()
self.CleanUpList[EventData.IniDCSUnitName] = {}
self.CleanUpList[EventData.IniDCSUnitName].CleanUpUnit = EventData.IniDCSUnit
self.CleanUpList[EventData.IniDCSUnitName].CleanUpGroup = EventData.IniDCSGroup
self.CleanUpList[EventData.IniDCSUnitName].CleanUpGroupName = EventData.IniDCSGroupName
self.CleanUpList[EventData.IniDCSUnitName].CleanUpUnitName = EventData.IniDCSUnitName
EventData.IniUnit:HandleEvent( EVENTS.EngineShutdown , self._EventAddForCleanUp )
EventData.IniUnit:HandleEvent( EVENTS.EngineStartup, self._EventAddForCleanUp )
EventData.IniUnit:HandleEvent( EVENTS.Hit, self._EventAddForCleanUp )
EventData.IniUnit:HandleEvent( EVENTS.PilotDead, self._EventCrash )
EventData.IniUnit:HandleEvent( EVENTS.Dead, self._EventCrash )
EventData.IniUnit:HandleEvent( EVENTS.Crash, self._EventCrash )
EventData.IniUnit:HandleEvent( EVENTS.Shot, self._EventShot )
end
--- Detects if a crash event occurs.
-- Crashed units go into a CleanUpList for removal.
-- @param #CLEANUP self
-- @param DCSTypes#Event event
-- @param Dcs.DCSTypes#Event 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
-- self:T("after getGroup")
@@ -160,7 +151,7 @@ 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
-- @param Dcs.DCSTypes#Event event
function CLEANUP:_EventShot( Event )
self:F( { Event } )
@@ -170,14 +161,14 @@ function CLEANUP:_EventShot( Event )
if ( CurrentLandingZoneID ) then
-- Okay, the missile was fired within the CLEANUP.ZoneNames, destroy the fired weapon.
--_SEADmissile:destroy()
routines.scheduleFunction( CLEANUP._DestroyMissile, { self, Event.Weapon }, timer.getTime() + 0.1)
SCHEDULER:New( self, CLEANUP._DestroyMissile, { Event.Weapon }, 0.1 )
end
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
-- @param Dcs.DCSTypes#Event event
function CLEANUP:_EventHitCleanUp( Event )
self:F( { Event } )
@@ -186,7 +177,7 @@ function CLEANUP:_EventHitCleanUp( Event )
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)
SCHEDULER:New( self, CLEANUP._DestroyUnit, { Event.IniDCSUnit }, 0.1 )
end
end
end
@@ -196,13 +187,13 @@ function CLEANUP:_EventHitCleanUp( Event )
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 )
SCHEDULER:New( self, CLEANUP._DestroyUnit, { Event.TgtDCSUnit }, 0.1 )
end
end
end
end
--- Add the @{DCSUnit#Unit} to the CleanUpList for CleanUp.
--- Add the @{DCSWrapper.Unit#Unit} to the CleanUpList for CleanUp.
function CLEANUP:_AddForCleanUp( CleanUpUnit, CleanUpUnitName )
self:F( { CleanUpUnit, CleanUpUnitName } )
@@ -220,7 +211,7 @@ 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
-- @param Dcs.DCSTypes#Event event
function CLEANUP:_EventAddForCleanUp( Event )
if Event.IniDCSUnit then
@@ -273,7 +264,6 @@ function CLEANUP:_CleanUpScheduler()
--self:T( CleanUpUnitVec2 )
local CleanUpSurfaceType = land.getSurfaceType(CleanUpUnitVec2)
--self:T( CleanUpSurfaceType )
--MESSAGE:New( "Surface " .. CleanUpUnitName .. " = " .. CleanUpSurfaceTypeText[CleanUpSurfaceType], CleanUpUnitName, 10, CleanUpUnitName ):ToAll()
if CleanUpUnit and CleanUpUnit:getLife() <= CleanUpUnit:getLife0() * 0.95 then
if CleanUpSurfaceType == land.SurfaceType.RUNWAY then
@@ -305,7 +295,6 @@ function CLEANUP:_CleanUpScheduler()
else
UnitData.CleanUpTime = timer.getTime()
UnitData.CleanUpMoved = true
--MESSAGE:New( "Moved " .. CleanUpUnitName, CleanUpUnitName, 10, CleanUpUnitName ):ToAll()
end
end
@@ -319,5 +308,7 @@ function CLEANUP:_CleanUpScheduler()
end
end
self:T(CleanUpCount)
return true
end

View File

@@ -0,0 +1,924 @@
--- **Funtional R2.1** -- Management of target **Designation**.
--
-- --![Banner Image](..\Presentations\DESIGNATE\Dia1.JPG)
--
-- ===
--
-- DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
-- and communicates these to a dedicated attacking group of players,
-- so that following a dynamically generated menu system,
-- each detected set of potential targets can be lased or smoked...
--
-- Targets can be:
--
-- * **Lased** for a period of time.
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
-- ### Contributions:
--
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing
-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing
--
--
-- ### Authors:
--
-- * **FlightControl**: Design & Programming
--
-- @module Designate
do -- DESIGNATE
--- @type DESIGNATE
-- @extends Core.Fsm#FSM_PROCESS
--- # DESIGNATE class, extends @{Fsm#FSM}
--
-- DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
-- and communicates these to a dedicated attacking group of players,
-- so that following a dynamically generated menu system,
-- each detected set of potential targets can be lased or smoked...
--
-- Targets can be:
--
-- * **Lased** for a period of time.
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
--
-- The following terminology is being used throughout this document:
--
-- * The **DesignateObject** is the object of the DESIGNATE class, which is this class explained in the document.
-- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_.
-- * **DetectionItems** is the list of detected target groupings by the _DetectionObject_. Each _DetectionItem_ contains a _TargetSet_.
-- * **DetectionItem** is one element of the _DetectionItems_ list, and contains a _TargetSet_.
-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_.
-- * A **Target** is a detected UNIT object by the _DetectionObject_.
-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
-- * The **RecceSet** is a SET_GROUP collection that contains the **RecceGroups**.
-- * A **RecceGroup** is a GROUP object containing the **Recces**.
-- * A **Recce** is a UNIT object executing the reconnaissance as part the _DetectionObject_. A Recce can be of any UNIT type.
-- * An **AttackGroup** is a GROUP object that contain _Players_.
-- * A **Player** is an active CLIENT object containing a human player.
-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_.
--
-- The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject.
-- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**.
--
-- As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:
--
-- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition.
-- * **Menu options** are created and updated for each AttackGroup, containing the Threat Level and the TargetSet composition.
--
-- A Player can then select an action from the Designate Menu.
--
-- **Note that each selected action will be executed for a TargetSet, thus the Target grouping done by the DetectionObject.**
--
-- Each **Menu Option** in the Designate Menu has two modes:
--
-- 1. If the TargetSet **is not being designated**, then the **Designate Menu** option for the target Set will provide options to **Lase** or **Smoke** the targets.
-- 2. If the Target Set **is being designated**, then the **Designate Menu** option will provide an option to stop or cancel the designation.
--
-- While designating, the RecceGroups will report any change in TargetSet composition or Target presence.
--
-- The following logic is executed when a TargetSet is selected to be *lased* from the Designation Menu:
--
-- * The RecceSet is searched for any Recce that is within *designation distance* from a Target in the TargetSet that is currently not being designated.
-- * If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
-- * During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
-- * When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
-- * When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
-- * When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.
--
-- In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!
--
-- Have FUN!
--
-- ## 1. DESIGNATE constructor
--
-- * @{#DESIGNATE.New}(): Creates a new DESIGNATE object.
--
-- ## 2. DESIGNATE is a FSM
--
-- ![Process](..\Presentations\DESIGNATE\Dia2.JPG)
--
-- ### 2.1 DESIGNATE States
--
-- * **Designating** ( Group ): The process is not started yet.
--
-- ### 2.2 DESIGNATE Events
--
-- * **@{#DESIGNATE.Detect}**: Detect targets.
-- * **@{#DESIGNATE.LaseOn}**: Lase the targets with the specified Index.
-- * **@{#DESIGNATE.LaseOff}**: Stop lasing the targets with the specified Index.
-- * **@{#DESIGNATE.Smoke}**: Smoke the targets with the specified Index.
-- * **@{#DESIGNATE.Status}**: Report designation status.
--
-- ## 3. Laser codes
--
-- ### 3.1 Set possible laser codes
--
-- An array of laser codes can be provided, that will be used by the DESIGNATE when lasing.
-- The laser code is communicated by the Recce when it is lasing a larget.
-- Note that the default laser code is 1113.
-- Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237
--
-- Use the method @{#DESIGNATE.SetLaserCodes}() to set the possible laser codes to be selected from.
-- One laser code can be given or an sequence of laser codes through an table...
--
-- Designate:SetLaserCodes( 1214 )
--
-- The above sets one laser code with the value 1214.
--
-- Designate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )
--
-- 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 @{#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.
-- The **auto lase** function can be activated through the Designation Menu.
-- Use the method @{#DESIGNATE.SetAutoLase}() to activate or deactivate the auto lase function programmatically.
-- Note that autolase will automatically activate lasing for ALL DetectedItems. Individual items can be switched-off if required using the Designation Menu.
--
-- Designate:SetAutoLase( true )
--
-- Activate the auto lasing.
--
-- ## 5. Target prioritization on threat level
--
-- Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context.
-- SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first,
-- and will continue this until the remaining vehicles with the lowest threat have been reached.
--
-- This threat level prioritization can be activated using the method @{#DESIGNATE.SetThreatLevelPrioritization}().
-- If not activated, Targets will be selected in a random order, but most like those first which are the closest to the Recce marking the Target.
--
-- Designate:SetThreatLevelPrioritization( true )
--
-- The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target.
--
-- ## 6. Status Report
--
-- A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.
--
-- * The status report can be shown by selecting "Status" -> "Report Status" from the Designation menu .
-- * The status report can be automatically flashed by selecting "Status" -> "Flash Status On".
-- * The automatic flashing of the status report can be deactivated by selecting "Status" -> "Flash Status Off".
-- * The flashing of the status menu is disabled by default.
-- * The method @{#DESIGNATE.FlashStatusMenu}() can be used to enable or disable to flashing of the status menu.
--
-- Designate:FlashStatusMenu( true )
--
-- The example will activate the flashing of the status menu for this Designate object.
--
-- @field #DESIGNATE
--
DESIGNATE = {
ClassName = "DESIGNATE",
}
--- DESIGNATE Constructor. This class is an abstract class and should not be instantiated.
-- @param #DESIGNATE self
-- @param Tasking.CommandCenter#COMMANDCENTER CC
-- @param Functional.Detection#DETECTION_BASE Detection
-- @param Core.Set#SET_GROUP AttackSet The Attack collection of GROUP objects to designate and report for.
-- @return #DESIGNATE
function DESIGNATE:New( CC, Detection, AttackSet )
local self = BASE:Inherit( self, FSM:New() ) -- #DESIGNATE
self:F( { Detection } )
self:SetStartState( "Designating" )
self:AddTransition( "*", "Detect", "*" )
--- Detect Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE] OnBeforeDetect
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Detect Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE] OnAfterDetect
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Detect Trigger for DESIGNATE
-- @function [parent=#DESIGNATE] Detect
-- @param #DESIGNATE self
--- Detect Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE] __Detect
-- @param #DESIGNATE self
-- @param #number Delay
self:AddTransition( "*", "LaseOn", "Lasing" )
--- LaseOn Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE ] OnBeforeLaseOn
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- LaseOn Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE ] OnAfterLaseOn
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- LaseOn Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] LaseOn
-- @param #DESIGNATE self
--- LaseOn Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] __LaseOn
-- @param #DESIGNATE self
-- @param #number Delay
self:AddTransition( "Lasing", "Lasing", "Lasing" )
self:AddTransition( "*", "LaseOff", "Designate" )
--- LaseOff Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE ] OnBeforeLaseOff
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- LaseOff Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE ] OnAfterLaseOff
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- LaseOff Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] LaseOff
-- @param #DESIGNATE self
--- LaseOff Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] __LaseOff
-- @param #DESIGNATE self
-- @param #number Delay
self:AddTransition( "*", "Smoke", "*" )
--- Smoke Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE ] OnBeforeSmoke
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Smoke Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE ] OnAfterSmoke
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Smoke Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] Smoke
-- @param #DESIGNATE self
--- Smoke Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] __Smoke
-- @param #DESIGNATE self
-- @param #number Delay
self:AddTransition( "*", "Illuminate", "*" )
--- Illuminate Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE] OnBeforeIlluminate
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Illuminate Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE] OnAfterIlluminate
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Illuminate Trigger for DESIGNATE
-- @function [parent=#DESIGNATE] Illuminate
-- @param #DESIGNATE self
--- Illuminate Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE] __Illuminate
-- @param #DESIGNATE self
-- @param #number Delay
self:AddTransition( "*", "Done", "*" )
self:AddTransition( "*", "Status", "*" )
--- Status Handler OnBefore for DESIGNATE
-- @function [parent=#DESIGNATE ] OnBeforeStatus
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Status Handler OnAfter for DESIGNATE
-- @function [parent=#DESIGNATE ] OnAfterStatus
-- @param #DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Status Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] Status
-- @param #DESIGNATE self
--- Status Asynchronous Trigger for DESIGNATE
-- @function [parent=#DESIGNATE ] __Status
-- @param #DESIGNATE self
-- @param #number Delay
self.CC = CC
self.Detection = Detection
self.AttackSet = AttackSet
self.RecceSet = Detection:GetDetectionSetGroup()
self.Recces = {}
self.Designating = {}
self.LaseDuration = 60
self:SetFlashStatusMenu( false )
self:SetDesignateMenu()
self:SetLaserCodes( 1688 ) -- set self.LaserCodes
self:SetAutoLase( false ) -- set self.Autolase
self:SetThreatLevelPrioritization( false ) -- self.ThreatLevelPrioritization, default is threat level priorization off
self.LaserCodesUsed = {}
self.Detection:__Start( 2 )
return self
end
--- Set the flashing of the status menu.
-- @param #DESIGNATE self
-- @param #boolean FlashMenu true: the status menu will be flashed every detection run; false: no flashing of the menu.
-- @return #DESIGNATE
function DESIGNATE:SetFlashStatusMenu( FlashMenu ) --R2.1
self.FlashStatusMenu = {}
self.AttackSet:ForEachGroup(
--- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
self.FlashStatusMenu[AttackGroup] = FlashMenu
end
)
return self
end
--- Set an array of possible laser codes.
-- Each new lase will select a code from this table.
-- @param #DESIGNATE self
-- @param #list<#number> LaserCodes
-- @return #DESIGNATE
function DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
self:E(self.LaserCodes)
self.LaserCodesUsed = {}
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 #DESIGNATE self
-- @return #DESIGNATE
function 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 #DESIGNATE self
-- @param #boolean AutoLase
-- @return #DESIGNATE
function DESIGNATE:SetAutoLase( AutoLase ) --R2.1
self.AutoLase = AutoLase
local AutoLaseOnOff = ( AutoLase == true ) and "On" or "Off"
local CC = self.CC:GetPositionable()
if CC then
CC:MessageToSetGroup( "Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet )
end
self:ActivateAutoLase()
self:SetDesignateMenu()
return self
end
--- Set priorization of Targets based on the **Threat Level of the Target** in an Air to Ground context.
-- @param #DESIGNATE self
-- @param #boolean Prioritize
-- @return #DESIGNATE
function DESIGNATE:SetThreatLevelPrioritization( Prioritize ) --R2.1
self.ThreatLevelPrioritization = Prioritize
return self
end
---
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterDetect()
self:__Detect( -60 )
self:ActivateAutoLase()
self:SendStatus()
self:SetDesignateMenu()
return self
end
--- Sends the status to the Attack Groups.
-- @param #DESIGNATE self
-- @param Wrapper.Group#GROUP AttackGroup
-- @param #number Duration The time in seconds the report should be visible.
-- @return #DESIGNATE
function DESIGNATE:SendStatus( MenuAttackGroup, Duration )
Duration = Duration or 10
self.AttackSet:ForEachGroup(
--- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then
local DetectedReport = REPORT:New( "Targets designated:\n" )
local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do
local Report = self.Detection:DetectedItemReportSummary( Index )
DetectedReport:Add(" - " .. Report)
end
local CC = self.CC:GetPositionable()
CC:MessageToGroup( DetectedReport:Text( "\n" ), Duration, AttackGroup )
local DesignationReport = REPORT:New( "Targets marked:\n" )
self.RecceSet:ForEachGroup(
function( RecceGroup )
local RecceUnits = RecceGroup:GetUnits()
for UnitID, RecceData in pairs( RecceUnits ) do
local Recce = RecceData -- Wrapper.Unit#UNIT
if Recce:IsLasing() then
DesignationReport:Add( " - " .. Recce:GetMessageText( "Marking " .. Recce:GetSpot().Target:GetTypeName() .. " with laser " .. Recce:GetSpot().LaserCode .. "." ) )
end
end
end
)
CC:MessageToGroup( DesignationReport:Text(), Duration, AttackGroup )
end
end
)
return self
end
--- Coordinates the Auto Lase.
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:ActivateAutoLase()
self.AttackSet:Flush()
self.AttackSet:ForEachGroup(
--- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do
if self.AutoLase then
if not self.Designating[Index] then
self:LaseOn( Index, self.LaseDuration )
end
end
end
end
)
return self
end
--- Sets the Designate Menu.
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:SetDesignateMenu()
self.AttackSet:Flush()
self.AttackSet:ForEachGroup(
--- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
local DesignateMenu = AttackGroup:GetState( AttackGroup, "DesignateMenu" ) -- Core.Menu#MENU_GROUP
if DesignateMenu then
DesignateMenu:Remove()
DesignateMenu = nil
self:E("Remove Menu")
end
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate" )
self:E(DesignateMenu)
AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu )
-- Set Menu option for auto lase
if self.AutoLase then
MENU_GROUP_COMMAND:New( AttackGroup, "Auto Lase Off", DesignateMenu, self.MenuAutoLase, self, false )
else
MENU_GROUP_COMMAND:New( AttackGroup, "Auto Lase On", DesignateMenu, self.MenuAutoLase, self, true )
end
local StatusMenu = MENU_GROUP:New( AttackGroup, "Status", DesignateMenu )
MENU_GROUP_COMMAND:New( AttackGroup, "Report Status 15s", StatusMenu, self.MenuStatus, self, AttackGroup, 15 )
MENU_GROUP_COMMAND:New( AttackGroup, "Report Status 30s", StatusMenu, self.MenuStatus, self, AttackGroup, 30 )
MENU_GROUP_COMMAND:New( AttackGroup, "Report Status 60s", StatusMenu, self.MenuStatus, self, AttackGroup, 60 )
if self.FlashStatusMenu[AttackGroup] then
MENU_GROUP_COMMAND:New( AttackGroup, "Flash Status Report Off", StatusMenu, self.MenuFlashStatus, self, AttackGroup, false )
else
MENU_GROUP_COMMAND:New( AttackGroup, "Flash Status Report On", StatusMenu, self.MenuFlashStatus, self, AttackGroup, true )
end
local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do
local Report = self.Detection:DetectedItemMenu( Index )
if not self.Designating[Index] then
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 60 secs", DetectedMenu, self.MenuLaseOn, self, Index, 60 )
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 120 secs", DetectedMenu, self.MenuLaseOn, self, Index, 120 )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke red", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Red )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke blue", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Blue )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke green", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Green )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke white", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.White )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke orange", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Orange )
MENU_GROUP_COMMAND:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, Index )
else
if self.Designating[Index] == "Laser" then
Report = "Lasing " .. Report
elseif self.Designating[Index] == "Smoke" then
Report = "Smoking " .. Report
elseif self.Designating[Index] == "Illuminate" then
Report = "Illuminating " .. Report
end
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
if self.Designating[Index] == "Laser" then
MENU_GROUP_COMMAND:New( AttackGroup, "Stop lasing", DetectedMenu, self.MenuLaseOff, self, Index )
else
end
end
end
end
)
return self
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuStatus( AttackGroup, Duration )
self:E("Status")
self:SendStatus( AttackGroup, Duration )
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuFlashStatus( AttackGroup, Flash )
self:E("Flash Status")
self.FlashStatusMenu[AttackGroup] = Flash
self:SetDesignateMenu()
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuAutoLase( AutoLase )
self:E("AutoLase")
self:SetAutoLase( AutoLase )
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuSmoke( Index, Color )
self:E("Designate through Smoke")
self.Designating[Index] = "Smoke"
self:__Smoke( 1, Index, Color )
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuIlluminate( Index )
self:E("Designate through Illumination")
self.Designating[Index] = "Illuminate"
self:__Illuminate( 1, Index )
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuLaseOn( Index, Duration )
self:E("Designate through Lase")
self:__LaseOn( 1, Index, Duration )
end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuLaseOff( Index, Duration )
self:E("Lasing off")
self.Designating[Index] = nil
self:__LaseOff( 1, Index )
end
---
-- @param #DESIGNATE self
function DESIGNATE:onafterLaseOn( From, Event, To, Index, Duration )
self.Designating[Index] = "Laser"
self:Lasing( Index, Duration )
end
---
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterLasing( From, Event, To, Index, Duration )
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
TargetSetUnit:Flush()
for TargetUnit, RecceData in pairs( self.Recces ) do
local Recce = RecceData -- Wrapper.Unit#UNIT
if not Recce:IsLasing() then
local LaserCode = Recce:GetLaserCode() --(Not deleted when stopping with lasing).
self.LaserCodesUsed[LaserCode] = nil
self.Recces[TargetUnit] = nil
end
end
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit
function( TargetUnit )
self:E("In procedure")
if TargetUnit:IsAlive() then
local Recce = self.Recces[TargetUnit]
if not Recce then
for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do
for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
if RecceUnit:IsLasing() == false then
if RecceUnit:IsDetected( TargetUnit ) and RecceUnit:IsLOS( TargetUnit ) then
local LaserCodeIndex = math.random( 1, #self.LaserCodes )
local LaserCode = self.LaserCodes[LaserCodeIndex]
if not self.LaserCodesUsed[LaserCode] then
self.LaserCodesUsed[LaserCode] = LaserCodeIndex
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
local AttackSet = self.AttackSet
function Spot:OnAfterDestroyed( From, Event, To )
self:E( "Destroyed Message" )
self.Recce:MessageToSetGroup( "Target " .. TargetUnit:GetTypeName() .. " destroyed. " .. TargetSetUnit:Count() .. " targets left.", 5, AttackSet )
end
self.Recces[TargetUnit] = RecceUnit
RecceUnit:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.", 5, self.AttackSet )
break
end
else
RecceUnit:MessageToSetGroup( "Can't mark " .. TargetUnit:GetTypeName(), 5, self.AttackSet )
end
else
-- The Recce is lasing, but the Target is not detected or within LOS. So stop lasing and send a report.
if not RecceUnit:IsDetected( TargetUnit ) or not RecceUnit:IsLOS( TargetUnit ) then
local Recce = self.Recces[TargetUnit] -- Wrapper.Unit#UNIT
if Recce then
Recce:LaseOff()
Recce:MessageToGroup( "Target " .. TargetUnit:GetTypeName() "out of LOS. Cancelling lase!", 5, self.AttackSet )
end
end
end
end
end
else
Recce:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. Recce.LaserCode .. ".", 5, self.AttackSet )
end
end
end
)
self:__Lasing( 15, Index, Duration )
self:SetDesignateMenu()
end
---
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterLaseOff( From, Event, To, Index )
local CC = self.CC:GetPositionable()
if CC then
CC:MessageToSetGroup( "Stopped lasing.", 5, self.AttackSet )
end
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
local Recces = self.Recces
for TargetID, RecceData in pairs( Recces ) do
local Recce = RecceData -- Wrapper.Unit#UNIT
Recce:MessageToSetGroup( "Stopped lasing " .. Recce:GetSpot().Target:GetTypeName() .. ".", 5, self.AttackSet )
Recce:LaseOff()
end
Recces = nil
self.Recces = {}
self.LaserCodesUsed = {}
self:SetDesignateMenu()
end
---
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterSmoke( From, Event, To, Index, Color )
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
local TargetSetUnitCount = TargetSetUnit:Count()
TargetSetUnit:ForEachUnit(
--- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit )
self:E("In procedure")
if math.random( 1, TargetSetUnitCount ) == math.random( 1, TargetSetUnitCount ) then
local RecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(SmokeUnit:GetPointVec2())
local RecceUnit = RecceGroup:GetUnit( 1 )
if RecceUnit then
RecceUnit:MessageToSetGroup( "Smoking " .. SmokeUnit:GetTypeName() .. ".", 5, self.AttackSet )
SCHEDULER:New( self,
function()
if SmokeUnit:IsAlive() then
SmokeUnit:Smoke( Color, 150 )
end
self:Done( Index )
end, {}, math.random( 5, 20 )
)
end
end
end
)
end
--- Illuminating
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterIlluminate( From, Event, To, Index )
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
local TargetUnit = TargetSetUnit:GetFirst()
if TargetUnit then
local RecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(TargetUnit:GetPointVec2())
local RecceUnit = RecceGroup:GetUnit( 1 )
if RecceUnit then
RecceUnit:MessageToSetGroup( "Illuminating " .. TargetUnit:GetTypeName() .. ".", 5, self.AttackSet )
SCHEDULER:New( self,
function()
if TargetUnit:IsAlive() then
TargetUnit:GetPointVec3():AddY(300):IlluminationBomb()
end
self:Done( Index )
end, {}, math.random( 5, 20 )
)
end
end
end
--- Done
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterDone( From, Event, To, Index )
self.Designating[Index] = nil
self:SetDesignateMenu()
end
end
-- Help from Ciribob

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,706 @@
--- This module contains the MISSILETRAINER class.
--
-- ===
--
-- 1) @{MissileTrainer#MISSILETRAINER} class, extends @{Base#BASE}
-- ===============================================================
-- The @{#MISSILETRAINER} class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft,
-- the class will destroy the missile within a certain range, to avoid damage to your aircraft.
-- It suports the following functionality:
--
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range <20>
-- * Provide alerts when a missile would have killed your aircraft.
-- * Provide alerts when the missile self destructs.
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
--
-- When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:
--
-- * **Messages**: Menu to configure all messages.
-- * **Messages On**: Show all messages.
-- * **Messages Off**: Disable all messages.
-- * **Tracking**: Menu to configure missile tracking messages.
-- * **To All**: Shows missile tracking messages to all players.
-- * **To Target**: Shows missile tracking messages only to the player where the missile is targetted at.
-- * **Tracking On**: Show missile tracking messages.
-- * **Tracking Off**: Disable missile tracking messages.
-- * **Frequency Increase**: Increases the missile tracking message frequency with one second.
-- * **Frequency Decrease**: Decreases the missile tracking message frequency with one second.
-- * **Alerts**: Menu to configure alert messages.
-- * **To All**: Shows alert messages to all players.
-- * **To Target**: Shows alert messages only to the player where the missile is (was) targetted at.
-- * **Hits On**: Show missile hit alert messages.
-- * **Hits Off**: Disable missile hit alert messages.
-- * **Launches On**: Show missile launch messages.
-- * **Launches Off**: Disable missile launch messages.
-- * **Details**: Menu to configure message details.
-- * **Range On**: Shows range information when a missile is fired to a target.
-- * **Range Off**: Disable range information when a missile is fired to a target.
-- * **Bearing On**: Shows bearing information when a missile is fired to a target.
-- * **Bearing Off**: Disable bearing information when a missile is fired to a target.
-- * **Distance**: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured.
-- * **50 meter**: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.
-- * **100 meter**: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
-- * **150 meter**: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
-- * **200 meter**: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
--
--
-- 1.1) MISSILETRAINER construction methods:
-- -----------------------------------------
-- Create a new MISSILETRAINER object with the @{#MISSILETRAINER.New} method:
--
-- * @{#MISSILETRAINER.New}: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
--
-- MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.
--
-- 1.2) MISSILETRAINER initialization methods:
-- -------------------------------------------
-- A MISSILETRAINER object will behave differently based on the usage of initialization methods:
--
-- * @{#MISSILETRAINER.InitMessagesOnOff}: Sets by default the display of any message to be ON or OFF.
-- * @{#MISSILETRAINER.InitTrackingToAll}: Sets by default the missile tracking report for all players or only for those missiles targetted to you.
-- * @{#MISSILETRAINER.InitTrackingOnOff}: Sets by default the display of missile tracking report to be ON or OFF.
-- * @{#MISSILETRAINER.InitTrackingFrequency}: Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.
-- * @{#MISSILETRAINER.InitAlertsToAll}: Sets by default the display of alerts to be shown to all players or only to you.
-- * @{#MISSILETRAINER.InitAlertsHitsOnOff}: Sets by default the display of hit alerts ON or OFF.
-- * @{#MISSILETRAINER.InitAlertsLaunchesOnOff}: Sets by default the display of launch alerts ON or OFF.
-- * @{#MISSILETRAINER.InitRangeOnOff}: Sets by default the display of range information of missiles ON of OFF.
-- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF.
-- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu.
--
-- ===
--
-- CREDITS
-- =======
-- **Stuka (Danny)** Who you can search on the Eagle Dynamics Forums.
-- Working together with Danny has resulted in the MISSILETRAINER class.
-- Danny has shared his ideas and together we made a design.
-- Together with the **476 virtual team**, we tested the MISSILETRAINER class, and got much positive feedback!
--
-- @module MissileTrainer
-- @author FlightControl
--- The MISSILETRAINER class
-- @type MISSILETRAINER
-- @field Core.Set#SET_CLIENT DBClients
-- @extends Core.Base#BASE
MISSILETRAINER = {
ClassName = "MISSILETRAINER",
TrackingMissiles = {},
}
function MISSILETRAINER._Alive( Client, self )
if self.Briefing then
Client:Message( self.Briefing, 15, "Trainer" )
end
if self.MenusOnOff == true then
Client:Message( "Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "Trainer" )
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil ) -- Menu#MENU_CLIENT
Client.MenuMessages = MENU_CLIENT:New( Client, "Messages", Client.MainMenu )
Client.MenuOn = MENU_CLIENT_COMMAND:New( Client, "Messages On", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = true } )
Client.MenuOff = MENU_CLIENT_COMMAND:New( Client, "Messages Off", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = false } )
Client.MenuTracking = MENU_CLIENT:New( Client, "Tracking", Client.MainMenu )
Client.MenuTrackingToAll = MENU_CLIENT_COMMAND:New( Client, "To All", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingToAll = true } )
Client.MenuTrackingToTarget = MENU_CLIENT_COMMAND:New( Client, "To Target", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingToAll = false } )
Client.MenuTrackOn = MENU_CLIENT_COMMAND:New( Client, "Tracking On", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingOnOff = true } )
Client.MenuTrackOff = MENU_CLIENT_COMMAND:New( Client, "Tracking Off", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingOnOff = false } )
Client.MenuTrackIncrease = MENU_CLIENT_COMMAND:New( Client, "Frequency Increase", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingFrequency = -1 } )
Client.MenuTrackDecrease = MENU_CLIENT_COMMAND:New( Client, "Frequency Decrease", Client.MenuTracking, self._MenuMessages, { MenuSelf = self, TrackingFrequency = 1 } )
Client.MenuAlerts = MENU_CLIENT:New( Client, "Alerts", Client.MainMenu )
Client.MenuAlertsToAll = MENU_CLIENT_COMMAND:New( Client, "To All", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsToAll = true } )
Client.MenuAlertsToTarget = MENU_CLIENT_COMMAND:New( Client, "To Target", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsToAll = false } )
Client.MenuHitsOn = MENU_CLIENT_COMMAND:New( Client, "Hits On", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsHitsOnOff = true } )
Client.MenuHitsOff = MENU_CLIENT_COMMAND:New( Client, "Hits Off", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsHitsOnOff = false } )
Client.MenuLaunchesOn = MENU_CLIENT_COMMAND:New( Client, "Launches On", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsLaunchesOnOff = true } )
Client.MenuLaunchesOff = MENU_CLIENT_COMMAND:New( Client, "Launches Off", Client.MenuAlerts, self._MenuMessages, { MenuSelf = self, AlertsLaunchesOnOff = false } )
Client.MenuDetails = MENU_CLIENT:New( Client, "Details", Client.MainMenu )
Client.MenuDetailsDistanceOn = MENU_CLIENT_COMMAND:New( Client, "Range On", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsRangeOnOff = true } )
Client.MenuDetailsDistanceOff = MENU_CLIENT_COMMAND:New( Client, "Range Off", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsRangeOnOff = false } )
Client.MenuDetailsBearingOn = MENU_CLIENT_COMMAND:New( Client, "Bearing On", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsBearingOnOff = true } )
Client.MenuDetailsBearingOff = MENU_CLIENT_COMMAND:New( Client, "Bearing Off", Client.MenuDetails, self._MenuMessages, { MenuSelf = self, DetailsBearingOnOff = false } )
Client.MenuDistance = MENU_CLIENT:New( Client, "Set distance to plane", Client.MainMenu )
Client.MenuDistance50 = MENU_CLIENT_COMMAND:New( Client, "50 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 50 / 1000 } )
Client.MenuDistance100 = MENU_CLIENT_COMMAND:New( Client, "100 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 100 / 1000 } )
Client.MenuDistance150 = MENU_CLIENT_COMMAND:New( Client, "150 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 150 / 1000 } )
Client.MenuDistance200 = MENU_CLIENT_COMMAND:New( Client, "200 meter", Client.MenuDistance, self._MenuMessages, { MenuSelf = self, Distance = 200 / 1000 } )
else
if Client.MainMenu then
Client.MainMenu:Remove()
end
end
local ClientID = Client:GetID()
self:T( ClientID )
if not self.TrackingMissiles[ClientID] then
self.TrackingMissiles[ClientID] = {}
end
self.TrackingMissiles[ClientID].Client = Client
if not self.TrackingMissiles[ClientID].MissileData then
self.TrackingMissiles[ClientID].MissileData = {}
end
end
--- Creates the main object which is handling missile tracking.
-- When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.
-- @param #MISSILETRAINER self
-- @param #number Distance The distance in meters when a tracked missile needs to be destroyed when close to a player.
-- @param #string Briefing (Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes.
-- @return #MISSILETRAINER
function MISSILETRAINER:New( Distance, Briefing )
local self = BASE:Inherit( self, BASE:New() )
self:F( Distance )
if Briefing then
self.Briefing = Briefing
end
self.Schedulers = {}
self.SchedulerID = 0
self.MessageInterval = 2
self.MessageLastTime = timer.getTime()
self.Distance = Distance / 1000
self:HandleEvent( EVENTS.Shot )
self.DBClients = SET_CLIENT:New():FilterStart()
-- for ClientID, Client in pairs( self.DBClients.Database ) do
-- self:E( "ForEach:" .. Client.UnitName )
-- Client:Alive( self._Alive, self )
-- end
--
self.DBClients:ForEachClient(
function( Client )
self:E( "ForEach:" .. Client.UnitName )
Client:Alive( self._Alive, self )
end
)
-- self.DB:ForEachClient(
-- --- @param Wrapper.Client#CLIENT Client
-- function( Client )
--
-- ... actions ...
--
-- end
-- )
self.MessagesOnOff = true
self.TrackingToAll = false
self.TrackingOnOff = true
self.TrackingFrequency = 3
self.AlertsToAll = true
self.AlertsHitsOnOff = true
self.AlertsLaunchesOnOff = true
self.DetailsRangeOnOff = true
self.DetailsBearingOnOff = true
self.MenusOnOff = true
self.TrackingMissiles = {}
self.TrackingScheduler = SCHEDULER:New( self, self._TrackMissiles, {}, 0.5, 0.05, 0 )
return self
end
-- Initialization methods.
--- Sets by default the display of any message to be ON or OFF.
-- @param #MISSILETRAINER self
-- @param #boolean MessagesOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitMessagesOnOff( MessagesOnOff )
self:F( MessagesOnOff )
self.MessagesOnOff = MessagesOnOff
if self.MessagesOnOff == true then
MESSAGE:New( "Messages ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Messages OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the missile tracking report for all players or only for those missiles targetted to you.
-- @param #MISSILETRAINER self
-- @param #boolean TrackingToAll true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitTrackingToAll( TrackingToAll )
self:F( TrackingToAll )
self.TrackingToAll = TrackingToAll
if self.TrackingToAll == true then
MESSAGE:New( "Missile tracking to all players ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Missile tracking to all players OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of missile tracking report to be ON or OFF.
-- @param #MISSILETRAINER self
-- @param #boolean TrackingOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitTrackingOnOff( TrackingOnOff )
self:F( TrackingOnOff )
self.TrackingOnOff = TrackingOnOff
if self.TrackingOnOff == true then
MESSAGE:New( "Missile tracking ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Missile tracking OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.
-- The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.
-- @param #MISSILETRAINER self
-- @param #number TrackingFrequency Provide a negative or positive value in seconds to incraese or decrease the display frequency.
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitTrackingFrequency( TrackingFrequency )
self:F( TrackingFrequency )
self.TrackingFrequency = self.TrackingFrequency + TrackingFrequency
if self.TrackingFrequency < 0.5 then
self.TrackingFrequency = 0.5
end
if self.TrackingFrequency then
MESSAGE:New( "Missile tracking frequency is " .. self.TrackingFrequency .. " seconds.", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of alerts to be shown to all players or only to you.
-- @param #MISSILETRAINER self
-- @param #boolean AlertsToAll true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitAlertsToAll( AlertsToAll )
self:F( AlertsToAll )
self.AlertsToAll = AlertsToAll
if self.AlertsToAll == true then
MESSAGE:New( "Alerts to all players ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Alerts to all players OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of hit alerts ON or OFF.
-- @param #MISSILETRAINER self
-- @param #boolean AlertsHitsOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitAlertsHitsOnOff( AlertsHitsOnOff )
self:F( AlertsHitsOnOff )
self.AlertsHitsOnOff = AlertsHitsOnOff
if self.AlertsHitsOnOff == true then
MESSAGE:New( "Alerts Hits ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Alerts Hits OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of launch alerts ON or OFF.
-- @param #MISSILETRAINER self
-- @param #boolean AlertsLaunchesOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitAlertsLaunchesOnOff( AlertsLaunchesOnOff )
self:F( AlertsLaunchesOnOff )
self.AlertsLaunchesOnOff = AlertsLaunchesOnOff
if self.AlertsLaunchesOnOff == true then
MESSAGE:New( "Alerts Launches ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Alerts Launches OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of range information of missiles ON of OFF.
-- @param #MISSILETRAINER self
-- @param #boolean DetailsRangeOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitRangeOnOff( DetailsRangeOnOff )
self:F( DetailsRangeOnOff )
self.DetailsRangeOnOff = DetailsRangeOnOff
if self.DetailsRangeOnOff == true then
MESSAGE:New( "Range display ON", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Range display OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Sets by default the display of bearing information of missiles ON of OFF.
-- @param #MISSILETRAINER self
-- @param #boolean DetailsBearingOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitBearingOnOff( DetailsBearingOnOff )
self:F( DetailsBearingOnOff )
self.DetailsBearingOnOff = DetailsBearingOnOff
if self.DetailsBearingOnOff == true then
MESSAGE:New( "Bearing display OFF", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Bearing display OFF", 15, "Menu" ):ToAll()
end
return self
end
--- Enables / Disables the menus.
-- @param #MISSILETRAINER self
-- @param #boolean MenusOnOff true or false
-- @return #MISSILETRAINER self
function MISSILETRAINER:InitMenusOnOff( MenusOnOff )
self:F( MenusOnOff )
self.MenusOnOff = MenusOnOff
if self.MenusOnOff == true then
MESSAGE:New( "Menus are ENABLED (only when a player rejoins a slot)", 15, "Menu" ):ToAll()
else
MESSAGE:New( "Menus are DISABLED", 15, "Menu" ):ToAll()
end
return self
end
-- Menu functions
function MISSILETRAINER._MenuMessages( MenuParameters )
local self = MenuParameters.MenuSelf
if MenuParameters.MessagesOnOff ~= nil then
self:InitMessagesOnOff( MenuParameters.MessagesOnOff )
end
if MenuParameters.TrackingToAll ~= nil then
self:InitTrackingToAll( MenuParameters.TrackingToAll )
end
if MenuParameters.TrackingOnOff ~= nil then
self:InitTrackingOnOff( MenuParameters.TrackingOnOff )
end
if MenuParameters.TrackingFrequency ~= nil then
self:InitTrackingFrequency( MenuParameters.TrackingFrequency )
end
if MenuParameters.AlertsToAll ~= nil then
self:InitAlertsToAll( MenuParameters.AlertsToAll )
end
if MenuParameters.AlertsHitsOnOff ~= nil then
self:InitAlertsHitsOnOff( MenuParameters.AlertsHitsOnOff )
end
if MenuParameters.AlertsLaunchesOnOff ~= nil then
self:InitAlertsLaunchesOnOff( MenuParameters.AlertsLaunchesOnOff )
end
if MenuParameters.DetailsRangeOnOff ~= nil then
self:InitRangeOnOff( MenuParameters.DetailsRangeOnOff )
end
if MenuParameters.DetailsBearingOnOff ~= nil then
self:InitBearingOnOff( MenuParameters.DetailsBearingOnOff )
end
if MenuParameters.Distance ~= nil then
self.Distance = MenuParameters.Distance
MESSAGE:New( "Hit detection distance set to " .. self.Distance * 1000 .. " meters", 15, "Menu" ):ToAll()
end
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.
-- @param #MISSILETRAINER self
-- @param Core.Event#EVENTDATA EventData
function MISSILETRAINER:OnEventShot( EVentData )
self:F( { EVentData } )
local TrainerSourceDCSUnit = EVentData.IniDCSUnit
local TrainerSourceDCSUnitName = EVentData.IniDCSUnitName
local TrainerWeapon = EVentData.Weapon -- Identify the weapon fired
local TrainerWeaponName = EVentData.WeaponName -- return weapon type
self:T( "Missile Launched = " .. TrainerWeaponName )
local TrainerTargetDCSUnit = TrainerWeapon:getTarget() -- Identify target
if TrainerTargetDCSUnit then
local TrainerTargetDCSUnitName = Unit.getName( TrainerTargetDCSUnit )
local TrainerTargetSkill = _DATABASE.Templates.Units[TrainerTargetDCSUnitName].Template.skill
self:T(TrainerTargetDCSUnitName )
local Client = self.DBClients:FindClient( TrainerTargetDCSUnitName )
if Client then
local TrainerSourceUnit = UNIT:Find( TrainerSourceDCSUnit )
local TrainerTargetUnit = UNIT:Find( TrainerTargetDCSUnit )
if self.MessagesOnOff == true and self.AlertsLaunchesOnOff == true then
local Message = MESSAGE:New(
string.format( "%s launched a %s",
TrainerSourceUnit:GetTypeName(),
TrainerWeaponName
) .. self:_AddRange( Client, TrainerWeapon ) .. self:_AddBearing( Client, TrainerWeapon ), 5, "Launch Alert" )
if self.AlertsToAll then
Message:ToAll()
else
Message:ToClient( Client )
end
end
local ClientID = Client:GetID()
self:T( ClientID )
local MissileData = {}
MissileData.TrainerSourceUnit = TrainerSourceUnit
MissileData.TrainerWeapon = TrainerWeapon
MissileData.TrainerTargetUnit = TrainerTargetUnit
MissileData.TrainerWeaponTypeName = TrainerWeapon:getTypeName()
MissileData.TrainerWeaponLaunched = true
table.insert( self.TrackingMissiles[ClientID].MissileData, MissileData )
--self:T( self.TrackingMissiles )
end
else
-- TODO: some weapons don't know the target unit... Need to develop a workaround for this.
if ( TrainerWeapon:getTypeName() == "9M311" ) then
SCHEDULER:New( TrainerWeapon, TrainerWeapon.destroy, {}, 1 )
else
end
end
end
function MISSILETRAINER:_AddRange( Client, TrainerWeapon )
local RangeText = ""
if self.DetailsRangeOnOff then
local PositionMissile = TrainerWeapon:getPoint()
local TargetVec3 = Client:GetVec3()
local Range = ( ( PositionMissile.x - TargetVec3.x )^2 +
( PositionMissile.y - TargetVec3.y )^2 +
( PositionMissile.z - TargetVec3.z )^2
) ^ 0.5 / 1000
RangeText = string.format( ", at %4.2fkm", Range )
end
return RangeText
end
function MISSILETRAINER:_AddBearing( Client, TrainerWeapon )
local BearingText = ""
if self.DetailsBearingOnOff then
local PositionMissile = TrainerWeapon:getPoint()
local TargetVec3 = Client:GetVec3()
self:T2( { TargetVec3, PositionMissile })
local DirectionVector = { x = PositionMissile.x - TargetVec3.x, y = PositionMissile.y - TargetVec3.y, z = PositionMissile.z - TargetVec3.z }
local DirectionRadians = math.atan2( DirectionVector.z, DirectionVector.x )
--DirectionRadians = DirectionRadians + routines.getNorthCorrection( PositionTarget )
if DirectionRadians < 0 then
DirectionRadians = DirectionRadians + 2 * math.pi
end
local DirectionDegrees = DirectionRadians * 180 / math.pi
BearingText = string.format( ", %d degrees", DirectionDegrees )
end
return BearingText
end
function MISSILETRAINER:_TrackMissiles()
self:F2()
local ShowMessages = false
if self.MessagesOnOff and self.MessageLastTime + self.TrackingFrequency <= timer.getTime() then
self.MessageLastTime = timer.getTime()
ShowMessages = true
end
-- ALERTS PART
-- Loop for all Player Clients to check the alerts and deletion of missiles.
for ClientDataID, ClientData in pairs( self.TrackingMissiles ) do
local Client = ClientData.Client
self:T2( { Client:GetName() } )
for MissileDataID, MissileData in pairs( ClientData.MissileData ) do
self:T3( MissileDataID )
local TrainerSourceUnit = MissileData.TrainerSourceUnit
local TrainerWeapon = MissileData.TrainerWeapon
local TrainerTargetUnit = MissileData.TrainerTargetUnit
local TrainerWeaponTypeName = MissileData.TrainerWeaponTypeName
local TrainerWeaponLaunched = MissileData.TrainerWeaponLaunched
if Client and Client:IsAlive() and TrainerSourceUnit and TrainerSourceUnit:IsAlive() and TrainerWeapon and TrainerWeapon:isExist() and TrainerTargetUnit and TrainerTargetUnit:IsAlive() then
local PositionMissile = TrainerWeapon:getPosition().p
local TargetVec3 = Client:GetVec3()
local Distance = ( ( PositionMissile.x - TargetVec3.x )^2 +
( PositionMissile.y - TargetVec3.y )^2 +
( PositionMissile.z - TargetVec3.z )^2
) ^ 0.5 / 1000
if Distance <= self.Distance then
-- Hit alert
TrainerWeapon:destroy()
if self.MessagesOnOff == true and self.AlertsHitsOnOff == true then
self:T( "killed" )
local Message = MESSAGE:New(
string.format( "%s launched by %s killed %s",
TrainerWeapon:getTypeName(),
TrainerSourceUnit:GetTypeName(),
TrainerTargetUnit:GetPlayerName()
), 15, "Hit Alert" )
if self.AlertsToAll == true then
Message:ToAll()
else
Message:ToClient( Client )
end
MissileData = nil
table.remove( ClientData.MissileData, MissileDataID )
self:T(ClientData.MissileData)
end
end
else
if not ( TrainerWeapon and TrainerWeapon:isExist() ) then
if self.MessagesOnOff == true and self.AlertsLaunchesOnOff == true then
-- Weapon does not exist anymore. Delete from Table
local Message = MESSAGE:New(
string.format( "%s launched by %s self destructed!",
TrainerWeaponTypeName,
TrainerSourceUnit:GetTypeName()
), 5, "Tracking" )
if self.AlertsToAll == true then
Message:ToAll()
else
Message:ToClient( Client )
end
end
MissileData = nil
table.remove( ClientData.MissileData, MissileDataID )
self:T( ClientData.MissileData )
end
end
end
end
if ShowMessages == true and self.MessagesOnOff == true and self.TrackingOnOff == true then -- Only do this when tracking information needs to be displayed.
-- TRACKING PART
-- For the current client, the missile range and bearing details are displayed To the Player Client.
-- For the other clients, the missile range and bearing details are displayed To the other Player Clients.
-- To achieve this, a cross loop is done for each Player Client <-> Other Player Client missile information.
-- Main Player Client loop
for ClientDataID, ClientData in pairs( self.TrackingMissiles ) do
local Client = ClientData.Client
self:T2( { Client:GetName() } )
ClientData.MessageToClient = ""
ClientData.MessageToAll = ""
-- Other Players Client loop
for TrackingDataID, TrackingData in pairs( self.TrackingMissiles ) do
for MissileDataID, MissileData in pairs( TrackingData.MissileData ) do
self:T3( MissileDataID )
local TrainerSourceUnit = MissileData.TrainerSourceUnit
local TrainerWeapon = MissileData.TrainerWeapon
local TrainerTargetUnit = MissileData.TrainerTargetUnit
local TrainerWeaponTypeName = MissileData.TrainerWeaponTypeName
local TrainerWeaponLaunched = MissileData.TrainerWeaponLaunched
if Client and Client:IsAlive() and TrainerSourceUnit and TrainerSourceUnit:IsAlive() and TrainerWeapon and TrainerWeapon:isExist() and TrainerTargetUnit and TrainerTargetUnit:IsAlive() then
if ShowMessages == true then
local TrackingTo
TrackingTo = string.format( " -> %s",
TrainerWeaponTypeName
)
if ClientDataID == TrackingDataID then
if ClientData.MessageToClient == "" then
ClientData.MessageToClient = "Missiles to You:\n"
end
ClientData.MessageToClient = ClientData.MessageToClient .. TrackingTo .. self:_AddRange( ClientData.Client, TrainerWeapon ) .. self:_AddBearing( ClientData.Client, TrainerWeapon ) .. "\n"
else
if self.TrackingToAll == true then
if ClientData.MessageToAll == "" then
ClientData.MessageToAll = "Missiles to other Players:\n"
end
ClientData.MessageToAll = ClientData.MessageToAll .. TrackingTo .. self:_AddRange( ClientData.Client, TrainerWeapon ) .. self:_AddBearing( ClientData.Client, TrainerWeapon ) .. " ( " .. TrainerTargetUnit:GetPlayerName() .. " )\n"
end
end
end
end
end
end
-- Once the Player Client and the Other Player Client tracking messages are prepared, show them.
if ClientData.MessageToClient ~= "" or ClientData.MessageToAll ~= "" then
local Message = MESSAGE:New( ClientData.MessageToClient .. ClientData.MessageToAll, 1, "Tracking" ):ToClient( Client )
end
end
end
return true
end

View File

@@ -3,12 +3,11 @@
-- Performance: If in a DCSRTE there are a lot of moving GROUND units, then in a multi player mission, this WILL create lag if
-- the main DCS execution core of your CPU is fully utilized. So, this class will limit the amount of simultaneous moving GROUND units
-- on defined intervals (currently every minute).
-- @module MOVEMENT
Include.File( "Routines" )
-- @module Movement
--- the MOVEMENT class
-- @type
-- @type MOVEMENT
-- @extends Core.Base#BASE
MOVEMENT = {
ClassName = "MOVEMENT",
}
@@ -22,7 +21,7 @@ MOVEMENT = {
-- Movement_US_Platoons = MOVEMENT:New( { 'US Tank Platoon Left', 'US Tank Platoon Middle', 'US Tank Platoon Right', 'US CH-47D Troops' }, 15 )
function MOVEMENT:New( MovePrefixes, MoveMaximum )
local self = BASE:Inherit( self, BASE:New() )
local self = BASE:Inherit( self, BASE:New() ) -- #MOVEMENT
self:F( { MovePrefixes, MoveMaximum } )
if type( MovePrefixes ) == 'table' then
@@ -35,7 +34,7 @@ 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.
_EVENTDISPATCHER:OnBirth( self.OnBirth, self )
self:HandleEvent( EVENTS.Birth )
-- self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth )
--
@@ -49,7 +48,8 @@ end
--- Call this function to start the MOVEMENT scheduling.
function MOVEMENT:ScheduleStart()
self:F()
self.MoveFunction = routines.scheduleFunction( self._Scheduler, { self }, timer.getTime() + 1, 120 )
--self.MoveFunction = routines.scheduleFunction( self._Scheduler, { self }, timer.getTime() + 1, 120 )
self.MoveFunction = SCHEDULER:New( self, self._Scheduler, {}, 1, 120 )
end
--- Call this function to stop the MOVEMENT scheduling.
@@ -61,24 +61,26 @@ 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 } )
-- @param #MOVEMENT self
-- @param Core.Event#EVENTDATA self
function MOVEMENT:OnEventBirth( EventData )
self:F( { EventData } )
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.IniDCSUnit then
self:T( "Birth object : " .. Event.IniDCSUnitName )
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
if EventData.IniDCSUnit then
self:T( "Birth object : " .. EventData.IniDCSUnitName )
if EventData.IniDCSGroup and EventData.IniDCSGroup:isExist() then
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
if string.find( Event.IniDCSUnitName, MovePrefix, 1, true ) then
if string.find( EventData.IniDCSUnitName, MovePrefix, 1, true ) then
self.AliveUnits = self.AliveUnits + 1
self.MoveUnits[Event.IniDCSUnitName] = Event.IniDCSGroupName
self.MoveUnits[EventData.IniDCSUnitName] = EventData.IniDCSGroupName
self:T( self.AliveUnits )
end
end
end
end
_EVENTDISPATCHER:OnCrashForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
_EVENTDISPATCHER:OnDeadForUnit( Event.IniDCSUnitName, self.OnDeadOrCrash, self )
EventData.IniUnit:HandleEvent( EVENTS.DEAD, self.OnDeadOrCrash )
end
end
@@ -125,4 +127,5 @@ function MOVEMENT:_Scheduler()
end
end
end
return true
end

File diff suppressed because it is too large Load Diff

View File

@@ -3,16 +3,9 @@
-- @author to be searched on the forum
-- @author (co) Flightcontrol (Modified and enriched with functionality)
Include.File( "Routines" )
Include.File( "Event" )
Include.File( "Base" )
Include.File( "Mission" )
Include.File( "Client" )
Include.File( "Task" )
--- The SEAD class
-- @type SEAD
-- @extends Base#BASE
-- @extends Core.Base#BASE
SEAD = {
ClassName = "SEAD",
TargetSkill = {
@@ -43,31 +36,33 @@ function SEAD:New( SEADGroupPrefixes )
else
self.SEADGroupNames[SEADGroupPrefixes] = SEADGroupPrefixes
end
_EVENTDISPATCHER:OnShot( self.EventShot, self )
self:HandleEvent( EVENTS.Shot )
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 } )
-- @param #SEAD
-- @param Core.Event#EVENTDATA EventData
function SEAD:OnEventShot( EventData )
self:F( { EventData } )
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
local SEADUnit = EventData.IniDCSUnit
local SEADUnitName = EventData.IniDCSUnitName
local SEADWeapon = EventData.Weapon -- Identify the weapon fired
local SEADWeaponName = EventData.WeaponName -- return weapon type
-- 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 = Event.Weapon:getTarget() -- Identify target
local _targetMim = EventData.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.Templates.Units[_targetMimname].Template.skill
self:T( self.SEADGroupPrefixes )
self:T( _targetMimgroupName )
local SEADGroupFound = false
@@ -83,10 +78,10 @@ function SEAD:EventShot( Event )
local Skills = { "Average", "Good", "High", "Excellent" }
_targetskill = Skills[ math.random(1,4) ]
end
self:T( _targetskill ) -- debug message for skill check
self:T( _targetskill )
if self.TargetSkill[_targetskill] then
if (_evade > self.TargetSkill[_targetskill].Evade) then
self:T( string.format("Evading, target skill " ..string.format(_targetskill)) ) --debug message
self:T( string.format("Evading, target skill " ..string.format(_targetskill)) )
local _targetMim = Weapon.getTarget(SEADWeapon)
local _targetMimname = Unit.getName(_targetMim)
local _targetMimgroup = Unit.getGroup(Weapon.getTarget(SEADWeapon))

Some files were not shown because too many files have changed in this diff Show More