Compare commits

...

2222 Commits

Author SHA1 Message Date
Applevangelist
217b8fe71e Merge remote-tracking branch 'origin/master' into develop 2023-11-17 11:05:53 +01:00
Applevangelist
65a729a2d6 Merge remote-tracking branch 'origin/master' 2023-11-17 11:05:26 +01:00
Applevangelist
7868930fcb ATIS 2023-11-17 11:05:22 +01:00
Applevangelist
67248a290c ATIS small fix 2023-11-17 11:04:33 +01:00
Thomas
32ae4986ca Update PlayerTask.lua
Weapon check for bomb runway task
2023-11-17 06:28:33 +01:00
Frank
2a0086d3fe Merge branch 'master' into develop 2023-11-17 00:26:33 +01:00
Frank
0bc52eb331 DCS stable
- Added check that ` Airbase.getWarehouse`  method exists because it causes problems with DCS stable as this method does not exist there.
2023-11-17 00:26:21 +01:00
Frank
75a6a798ac Update OpsZone.lua
- Fix for new `getCategory` behaviour
2023-11-16 22:52:13 +01:00
Frank
067285f870 Merge branch 'master' into develop 2023-11-16 22:32:17 +01:00
Frank
5353be482e getCategory behaviour
- Fixed several classes for new `getCategory` behaviour (should be backwards compatible to earlier DCS versions).
2023-11-16 22:32:01 +01:00
Applevangelist
8075be92a7 Merge remote-tracking branch 'origin/master' into develop 2023-11-16 18:11:58 +01:00
Applevangelist
826ae86cb7 #MANTIS
* Added IDF data
2023-11-16 18:11:30 +01:00
Applevangelist
f453619c78 Merge remote-tracking branch 'origin/master' into develop 2023-11-16 16:11:20 +01:00
Applevangelist
475153be4c #RANGE
* Added coalition option to `New()`
2023-11-16 16:10:47 +01:00
Applevangelist
ca20e059a6 #PLAYERRECCE
* Fixes for new Gazelle models
2023-11-16 14:08:33 +01:00
Applevangelist
2044068393 Merge remote-tracking branch 'origin/master' into develop 2023-11-15 18:17:23 +01:00
Applevangelist
5f734a0d17 #MESSAGE
* Fixes for ToSRS() for MS Desktop
2023-11-15 18:16:46 +01:00
Thomas
2c3e9e992d Update PlayerTask.lua
Bugfix
2023-11-15 07:24:01 +01:00
Applevangelist
ef27daa282 Merge remote-tracking branch 'origin/master' into develop 2023-11-14 12:15:48 +01:00
Applevangelist
1b8c9367a3 #MANTIS/#SEAD/#SHORAD
* Added shoot and scoot for MANTIS and SHORAD
* Added detection of TALD ADM-141A (all)
2023-11-14 11:57:58 +01:00
Applevangelist
e36ade55d2 Merge remote-tracking branch 'origin/master' into develop 2023-11-12 16:54:07 +01:00
Applevangelist
19047843cc #SEAD
* Added data and actions for TALD ADM_141
2023-11-12 16:53:34 +01:00
Applevangelist
2d631cba3f #AUTOLASE - Menu for smoking 2023-11-12 12:13:12 +01:00
Applevangelist
9ccfcb8fb1 Merge remote-tracking branch 'origin/develop' into develop 2023-11-11 19:02:34 +01:00
Applevangelist
a8e58b8121 #AUTOLASE
* Added menu to change the laser code
2023-11-11 19:02:26 +01:00
kaltokri
dcc968c290 Merge branch 'master' into develop 2023-11-11 16:06:52 +01:00
kaltokri
174454b8c5 Migrated Text-To-Speech guide to docs 2023-11-11 16:06:22 +01:00
kaltokri
36aa697936 Merge branch 'master' into develop 2023-11-10 16:54:58 +01:00
kaltokri
d30a53333c Migration of eclipse installation guide from wiki to docs 2023-11-10 16:53:41 +01:00
kaltokri
8bace684c2 Merge branch 'master' into develop 2023-11-10 16:23:27 +01:00
kaltokri
30b89328f1 Extension of the build documentation 2023-11-10 16:22:58 +01:00
kaltokri
aa5163fe3a Merge branch 'master' into develop 2023-11-10 15:37:20 +01:00
kaltokri
b38dc62be7 Restructure of the docs content 2023-11-10 15:36:54 +01:00
kaltokri
097e0a3214 Merge branch 'master' into develop 2023-11-10 10:52:53 +01:00
kaltokri
6d9333aa94 Added new README.md 2023-11-10 10:50:20 +01:00
kaltokri
b5c9598cb0 Merge branch 'master' into develop 2023-11-09 16:39:15 +01:00
kaltokri
6947bcfcf2 Used newest Discord link and small enhancements 2023-11-09 16:38:50 +01:00
Applevangelist
bc454fdec2 #docu changes 2023-11-09 15:16:51 +01:00
Applevangelist
166a7ab7db #DATABASE
* Register players joining CA slots as CLIENTs
2023-11-09 15:09:39 +01:00
Applevangelist
db06154ad7 #DATABASE
* Register players joining CA slots as CLIENTs
2023-11-09 15:09:01 +01:00
Applevangelist
f459372720 #CLIENTMENUMANAGER
* Added `CLIENTMENUMANAGER:InitAutoPropagation()`

#PLAYERTASK
* Some menu fixes
2023-11-09 15:08:28 +01:00
Applevangelist
f5d2439d69 Merge remote-tracking branch 'origin/master' into develop 2023-11-08 17:54:08 +01:00
Applevangelist
fa43a6c40b Symlink fix 2023-11-08 17:53:43 +01:00
Applevangelist
04c092b9ef Merge remote-tracking branch 'origin/develop' into develop 2023-11-08 17:44:12 +01:00
Applevangelist
7af920891d Merge remote-tracking branch 'origin/master' into develop 2023-11-08 17:44:08 +01:00
Applevangelist
5056187fb9 #GROUP #UNIT
* Added `FindByMatching(Pattern)` and `FindAllByMatching(Pattern)`
2023-11-08 17:43:29 +01:00
kaltokri
d9d333a7af Merge branch 'master' into develop 2023-11-08 17:39:40 +01:00
kaltokri
72c5c2ee4d Parameter has different behaviour on Windows and Linux 2023-11-08 17:39:19 +01:00
kaltokri
8f73a4c27c Merge branch 'master' into develop 2023-11-08 17:33:57 +01:00
kaltokri
25936a526d Fixed small typo in gh-pages.yml 2023-11-08 17:33:25 +01:00
kaltokri
f4b83a97a9 Merge branch 'master' into develop 2023-11-08 17:27:30 +01:00
kaltokri
8bc735288f Skip java.com when checking links. Seems to be blocked for GitHub 2023-11-08 17:27:04 +01:00
Applevangelist
3360f511ee Merge remote-tracking branch 'origin/develop' into develop 2023-11-08 17:01:57 +01:00
Applevangelist
f64ec74d1c #PLAYERRECCE
* Added doku for OnAfter.. calls
2023-11-08 17:01:50 +01:00
kaltokri
b885ef7767 Merge branch 'master' into develop 2023-11-08 16:59:31 +01:00
kaltokri
f8afa1cb78 Renamed old-guides into archive 2023-11-08 16:59:20 +01:00
kaltokri
22f5104805 Merge branch 'master' into develop 2023-11-08 16:23:47 +01:00
kaltokri
e95eb2768d Replaced absolute links with relative ones to fix problem on GitHub pages 2023-11-08 16:23:31 +01:00
kaltokri
266e34a92d Merge branch 'master' into develop 2023-11-08 13:45:53 +01:00
kaltokri
f6091cd117 Migrated old documentation to just-the-docs 2023-11-08 13:44:56 +01:00
Applevangelist
500a7f938f Merge remote-tracking branch 'origin/master' into develop 2023-11-08 11:24:00 +01:00
Applevangelist
f408c11506 Merge remote-tracking branch 'origin/develop' into develop 2023-11-08 11:23:38 +01:00
Applevangelist
9fafdea0bb #EVENT #NET
* On a MP server, added IniPlayerUCID and TgtPlayerUCID to the EventData structure (filled in applicable Events)
2023-11-08 11:23:01 +01:00
Applevangelist
b4058ecab2 #FLIGHTCONTROL
* Fix for shelters, puts the guy out front and not on top.
2023-11-08 11:09:39 +01:00
Frank
21aadc14b1 Merge branch 'master' into develop 2023-11-06 22:01:26 +01:00
Frank
fbf2c4c721 Update Event.lua
- Improved getCategory behaviour
2023-11-06 22:01:05 +01:00
Applevangelist
eed6119193 #FLIGHTGROUP
* Resolve a stalemate when all jobs are done but _CheckGroupDone isn't called any longer
2023-11-06 18:36:02 +01:00
Applevangelist
6db2e333ad Merge remote-tracking branch 'origin/master' into develop 2023-11-05 13:01:59 +01:00
Applevangelist
9d3cb4cc1b #MESSAGE
* SRS label correction
2023-11-05 13:01:27 +01:00
kaltokri
0eb9dfc7de Merge branch 'master' into develop 2023-11-03 16:34:36 +01:00
kaltokri
9d500186d1 Enhancement of build-docs to remove old files 2023-11-03 16:33:45 +01:00
kaltokri
f80265786d Fix broken links SetEngageRange 2023-11-03 15:52:53 +01:00
Applevangelist
4eb0f8e9ca Merge remote-tracking branch 'origin/master' into develop 2023-11-03 13:39:02 +01:00
Applevangelist
5a583671a7 #SRS - Improvements, set also a coordinate 2023-11-03 13:38:37 +01:00
Applevangelist
7b9d8d375d #SRS Improvements 2023-11-03 13:37:59 +01:00
Applevangelist
e560c3ffdd Merge remote-tracking branch 'origin/master' into develop 2023-11-02 19:25:50 +01:00
Applevangelist
7393cb2cbe #ATIS
* Some fixes
2023-11-02 19:25:28 +01:00
Applevangelist
74bd41743b Merge remote-tracking branch 'origin/develop' into develop 2023-11-02 18:20:49 +01:00
Applevangelist
56d4143a05 Merge remote-tracking branch 'origin/master' into develop 2023-11-02 18:20:45 +01:00
Applevangelist
1093e55ea8 #OPSGROUP #FLIGHTCONTROL
* Added setting coordinate for SRS
2023-11-02 18:19:55 +01:00
Applevangelist
bcbe872c7d #ATIS
* Added coordinate for SRS
* Added SRS calling out take off AND landing runway (if set)
2023-11-02 18:18:55 +01:00
kaltokri
cc95c45fb0 Merge branch 'master' into develop 2023-11-02 15:16:41 +01:00
kaltokri
bf60c535bc Merge branch 'master' of github.com:FlightControl-Master/MOOSE
# Conflicts:
#	Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua
2023-11-02 15:16:12 +01:00
kaltokri
feb99e9405 Fix for SetEngageRange documentation in AI_A2A and A2G classes 2023-11-02 15:14:57 +01:00
Frank
6c36910ac7 Update FlightGroup.lua
#2033
2023-11-02 01:41:39 +01:00
Frank
d60f20a162 Merge branch 'master' into develop 2023-11-02 01:40:01 +01:00
Frank
9fde88d61a Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2023-11-02 01:39:42 +01:00
Frank
430b4a274c Update Warehouse.lua
#2033
2023-11-02 01:39:40 +01:00
Thomas
dc26134845 Merge from master (#2036)
* Update Storage.lua

* Update Storage.lua (#2035)
2023-11-01 06:21:56 +01:00
Thomas
5996426119 Update Storage.lua (#2035) 2023-11-01 06:20:36 +01:00
Thomas
36d9460cdf Update Storage.lua 2023-11-01 06:19:53 +01:00
Frank
adad7ef901 Merge branch 'master' into develop 2023-10-31 19:53:35 +01:00
Frank
1561f49c9c Lings
- Fixed link in Core.Condition (will add demo miz)
- Fixed lings in Task_Cargo_CSAR und Task_Cargo_Transport
2023-10-31 19:53:20 +01:00
kaltokri
bb6bb20179 Merge branch 'master' into develop 2023-10-31 16:37:19 +01:00
kaltokri
e032781a92 Changed Core.Group to Wrapper.Group 2023-10-31 16:36:51 +01:00
kaltokri
07cac604cf Merge branch 'master' into develop 2023-10-31 16:31:01 +01:00
kaltokri
aa7d0b1e25 Fixed broken links 2023-10-31 16:30:48 +01:00
kaltokri
28cb44874f Merge branch 'master' into develop 2023-10-31 16:06:06 +01:00
kaltokri
13a8babe75 Fixed broken links 2023-10-31 16:05:48 +01:00
kaltokri
616f204f5b Merge branch 'master' into develop 2023-10-31 15:44:22 +01:00
kaltokri
87dda49113 Fixed broken links 2023-10-31 15:44:07 +01:00
kaltokri
211e1b41b0 Merge branch 'master' into develop 2023-10-31 15:23:53 +01:00
kaltokri
018830b539 Merge branch 'master' of github.com:FlightControl-Master/MOOSE
# Conflicts:
#	Moose Development/Moose/AI/AI_Air_Engage.lua
2023-10-31 15:23:26 +01:00
kaltokri
d92d2d07c5 Fixed broken links 2023-10-31 15:21:15 +01:00
Frank
cd316e6719 Merge branch 'master' into develop 2023-10-31 13:44:56 +01:00
Frank
046e49ac6b Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2023-10-31 13:35:41 +01:00
Frank
52e66ae969 Broken Links
- AI_A2A_Gci Removed reference to SetEngageZone
- Fixed link to #AI_A2G_SEAD.SetEngageRange #2025
- AI_Air_Engage removed reference to SetEngageZone. Does not seem to exist any more.
- AI_Air_Patrol removed reference to SetEngageZone. Does not seem to exist any more or is passed as argument now.
- AI_FORMATION Fixed DCSTypes#AI.Option.Air.val.ROE OptionROE #2029
- SETTINGS Fixed link to Message #2021
- Fixed wrong indent of "Developer Note" in various classes
2023-10-31 13:33:45 +01:00
kaltokri
0fb8fd8886 Merge branch 'master' into develop 2023-10-31 13:07:02 +01:00
kaltokri
ca15d7cb00 Merge branch 'master' of github.com:FlightControl-Master/MOOSE 2023-10-31 13:05:29 +01:00
kaltokri
1086c61ccf Fixed broken links 2023-10-31 13:04:48 +01:00
Frank
77f9721102 AI
- Fixed various `@extends` errors pointing to non-existing classes for AI_*
2023-10-31 11:44:45 +01:00
kaltokri
261a389ca5 Merge branch 'master' into develop 2023-10-31 10:25:38 +01:00
kaltokri
b05683d384 Fixed some broken links 2023-10-31 10:25:00 +01:00
kaltokri
708838c404 Merge branch 'master' into develop 2023-10-30 18:02:27 +01:00
kaltokri
d7df08d754 Fixed broken links in documentation 2023-10-30 18:01:57 +01:00
kaltokri
974a56b135 Merge branch 'master' into develop 2023-10-30 14:56:32 +01:00
kaltokri
92b21aa5c1 Fixed broken links in documentation 2023-10-30 14:48:49 +01:00
kaltokri
85c551cc59 Merge branch 'master' into develop 2023-10-29 23:06:31 +01:00
kaltokri
0e2dff4e6b Fixed some dead links in Ops.Airboss 2023-10-29 23:06:09 +01:00
kaltokri
f33ccee7b1 Merge branch 'master' into develop 2023-10-29 19:44:24 +01:00
kaltokri
5c9e3570e2 Added more docker jobs and apply same naming convention as build jobs 2023-10-29 19:43:55 +01:00
Applevangelist
7277221905 Merge remote-tracking branch 'origin/master' into develop 2023-10-29 17:45:23 +01:00
Applevangelist
497ac367ba #CTLD
* Adding re-packing dropped units
2023-10-29 17:45:02 +01:00
Applevangelist
51102e47ae #CTLD
* Adding re-packing dropped units
2023-10-29 17:44:31 +01:00
Xavier V
92e2414612 Added pack crates (#2019) 2023-10-29 17:29:01 +01:00
kaltokri
3ca4898860 Merge branch 'master' into develop 2023-10-27 17:49:14 +02:00
kaltokri
7643568706 Fixed dead links in documentation 2023-10-27 17:48:41 +02:00
kaltokri
e4d6e6d80e Merge branch 'master' into develop 2023-10-27 17:28:19 +02:00
kaltokri
3684a023da Fixed dead link 2023-10-27 17:27:38 +02:00
kaltokri
99ebebe13c Merge branch 'master' into develop 2023-10-27 17:05:11 +02:00
kaltokri
b0c8f05f38 Build optimization
- Remove appveyor
- Added docker compose for building docs locally
- Added manuall run of GitHub Action builds
- Added paths to trigger builds
2023-10-27 17:01:51 +02:00
Applevangelist
bf604da2ae Merge remote-tracking branch 'origin/master' into develop 2023-10-27 09:10:04 +02:00
Applevangelist
d8c2b8b719 #UTILS
* Added new tanke callsigns
2023-10-27 09:09:36 +02:00
Applevangelist
bca3abe2c2 Merge remote-tracking branch 'origin/develop' into develop 2023-10-26 12:46:20 +02:00
Applevangelist
3a06f6314e Merge remote-tracking branch 'origin/master' into develop 2023-10-26 12:46:16 +02:00
Applevangelist
31075f7c04 #UNIT
* Typos in IsTanker, added some typenames
2023-10-26 12:45:45 +02:00
kaltokri
6bf6b933cc Fixed last broken link 2023-10-25 15:52:11 +02:00
kaltokri
5681244941 Fix for canonical link 2023-10-25 15:45:20 +02:00
kaltokri
e7f7199a39 Merge branch 'master' into develop 2023-10-25 15:35:59 +02:00
kaltokri
788108c5b8 Added check for dead links and fixed dead links 2023-10-25 15:34:06 +02:00
Applevangelist
6e1dabfe9b #FLIGHTCONTROL
* Added option to switch subs on/off per instance
2023-10-25 13:47:11 +02:00
Applevangelist
e48a823560 #EASYGCICAP, CONTROLLABLE, OPSGROUP, AUFTRAG
* Changed patrol race track alt to be ASL not AGL by default
2023-10-25 08:46:52 +02:00
Applevangelist
8f1e2a1d54 Merge remote-tracking branch 'origin/develop' into develop 2023-10-24 18:25:09 +02:00
Applevangelist
74d54637d5 #PLAYERTASK
* Remove client from task, even if only player name is available
2023-10-24 18:25:02 +02:00
kaltokri
1126b7753a Merge branch 'master' into develop 2023-10-24 17:04:00 +02:00
kaltokri
3fbc76e37f Documentation of the build system added 2023-10-24 17:03:01 +02:00
Applevangelist
e24acb28f7 Merge remote-tracking branch 'origin/master' into develop 2023-10-24 13:46:35 +02:00
Applevangelist
4e5b483cc0 #CONTROLLABLE
* Added PatrolRaceTrack
2023-10-24 13:45:43 +02:00
Applevangelist
f28f807ee7 #EASYGCICAP
* Closer turning cap routes
2023-10-24 13:45:15 +02:00
Applevangelist
375a564446 Merge remote-tracking branch 'origin/master' into develop 2023-10-21 12:43:48 +02:00
Applevangelist
ab068670cc #RECOVERYTANKER
* Added option to set unlimited fuel
2023-10-21 12:43:20 +02:00
kaltokri
c00da0f925 Merge branch 'master' into develop 2023-10-20 23:37:57 +02:00
kaltokri
456c002c3c Fix for missing w3.css in DOCS repo 2023-10-20 23:37:29 +02:00
kaltokri
6161da3a22 Merge branch 'master' into develop 2023-10-20 22:52:07 +02:00
kaltokri
038b89776d Added replacement of head tag again 2023-10-20 22:45:52 +02:00
Applevangelist
54e44299d8 Merge remote-tracking branch 'origin/develop' into develop 2023-10-20 18:45:05 +02:00
Applevangelist
f71d6f3f30 Merge remote-tracking branch 'origin/master' into develop 2023-10-20 18:45:02 +02:00
Applevangelist
df6d968ebe #CONTROLLABLE
* Added `CommandSetUnlimitedFuel()`
* Added `TaskStrafing()`
2023-10-20 18:44:28 +02:00
kaltokri
daae77def5 Merge branch 'master' into develop 2023-10-20 16:15:43 +02:00
kaltokri
4d9197b3cc First version of the new GitHub pages 2023-10-20 16:13:30 +02:00
kaltokri
b808f2f568 Merge branch 'master' into develop 2023-10-20 09:59:06 +02:00
kaltokri
10dffb0689 Changed mail from MooseBotter 2023-10-20 09:58:35 +02:00
kaltokri
91aa2eb9f2 Merge branch 'master' into develop 2023-10-19 18:54:17 +02:00
kaltokri
722c33df62 Fixed wrong git config entries in build-docs.yml 2023-10-19 18:53:52 +02:00
kaltokri
3d697211bd Merge branch 'master' into develop 2023-10-19 18:25:07 +02:00
kaltokri
dc54cc82af Fixed wrong repository owner 2023-10-19 18:24:46 +02:00
kaltokri
4fced3416a Merge branch 'master' into develop 2023-10-19 18:17:12 +02:00
kaltokri
d4a46606fd Switched from env.FORCE_PUSH to vars.FORCE_PUSH 2023-10-19 18:16:45 +02:00
Thomas
015af9774c Update build-includes.yml 2023-10-19 16:17:48 +02:00
Thomas
f0a37172b9 Update build-includes.yml (#2018) 2023-10-19 16:14:59 +02:00
Thomas
2dd2e593e8 Update README.md (#2017) 2023-10-19 15:48:50 +02:00
Applevangelist
49fd78abe7 #SRS
* Typo
2023-10-19 15:22:13 +02:00
Rolf Geuenich
1b5067088f Merge branch 'master' into develop
Added new build system with GitHub Action Workflows
2023-10-19 14:00:22 +02:00
Rolf Geuenich
7c8cca7f56 Added new build system with GitHub Action Workflows 2023-10-19 13:59:33 +02:00
Rolf Geuenich
2986a33a56 Merge branch 'master' into develop
Align Moose_Create.lua with the dev branch
2023-10-19 11:39:33 +02:00
Rolf Geuenich
0658f6dc2b Align Moose_Create.lua with the develop branch
Needed for later build system enhancements
2023-10-19 11:39:07 +02:00
Rolf Geuenich
ce6624fe0b Merge branch 'master' into develop
Preperation for new build system
2023-10-19 11:11:46 +02:00
Rolf Geuenich
75558078ee Cleanup and extension for GitHub Action Workflow build and act 2023-10-19 11:11:23 +02:00
Applevangelist
3ba868b3b9 Merge remote-tracking branch 'origin/master' into develop 2023-10-17 16:58:40 +02:00
Applevangelist
f6b5c69d4e #Triggers - docu changes 2023-10-17 16:58:14 +02:00
Applevangelist
85b10fb1c9 Merge remote-tracking branch 'origin/master' into develop 2023-10-17 16:03:24 +02:00
Applevangelist
a7f01eb04a #ZONE and #SET_ZONE watch trigger 2023-10-17 16:02:01 +02:00
Applevangelist
e578a673d9 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-10-17 11:08:13 +02:00
Applevangelist
65f9db8efa #MSRS
* Added loading of a config file
2023-10-17 11:05:09 +02:00
Applevangelist
3f04249d07 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-10-13 16:15:23 +02:00
Applevangelist
2ebad9ce96 #MSRS
* Fixes for alternative backend
2023-10-13 16:13:12 +02:00
Applevangelist
b8a2b28462 Merge remote-tracking branch 'origin/master' into develop 2023-10-12 18:02:33 +02:00
Applevangelist
9ccde838e7 #AUFTRAG
* More Bryce fixes
2023-10-12 18:01:56 +02:00
Applevangelist
6ba62e3e04 #AUFTRAG
* bear trap for Bryce using RECON Auftrags
2023-10-12 17:56:31 +02:00
Applevangelist
b9cc66004d #WAREHOUSE
* Syntax
2023-10-12 17:55:41 +02:00
Applevangelist
fb1b5b209e Merge remote-tracking branch 'origin/master' into develop 2023-10-06 15:50:10 +02:00
Applevangelist
17838e7fe7 #MESSAGE
* Docu adds and corrections
2023-10-06 15:49:42 +02:00
Applevangelist
9493570e6b Merge remote-tracking branch 'origin/master' into develop 2023-10-06 13:18:50 +02:00
Applevangelist
b0d0dbfe72 #MESSAGE
* Added `ToSRS()`
2023-10-06 13:18:28 +02:00
Applevangelist
439c11c376 Merge remote-tracking branch 'origin/master' into develop 2023-10-06 11:43:50 +02:00
Applevangelist
2d081dfc03 CTLD/CSAR - Added sound file location 2023-10-06 11:42:51 +02:00
Applevangelist
a6c244f670 Merge remote-tracking branch 'origin/master' into develop 2023-10-06 11:31:59 +02:00
Applevangelist
8c44cf8fca #EasyGCICAP
* Added Recon Patrol points
2023-10-06 11:31:35 +02:00
Applevangelist
4a594f41b0 #SET_ZONE
* Added GetAverageCoordinate()
2023-10-06 11:30:59 +02:00
Frank
ffea9708d1 Merge branch 'master' into develop 2023-09-29 15:39:28 +02:00
Frank
04b4af58f7 Update ATIS.lua
#2010
2023-09-29 14:26:22 +02:00
Applevangelist
b108bd9ac6 Merge branch 'master' into develop 2023-09-29 10:20:27 +02:00
Applevangelist
f44ba39ec5 Fox/Missiletrainers 2023-09-29 10:20:01 +02:00
Applevangelist
a54b785ca3 #EasyGCICAP
* Docu additions
2023-09-28 13:28:35 +02:00
Applevangelist
6c3f3cf0d2 #EasyGCICAP
* Added option for an AWACS patrol point and Squad
* Added option to make Tanker and AWACS invisible
2023-09-28 13:15:56 +02:00
Frank
bd79750efa Merge branch 'master' into develop 2023-09-27 22:28:58 +02:00
Frank
05df765c5c Merge pull request #2006 from FlightControl-Master/FF/MasterDevel
Update Airboss.lua
2023-09-27 22:28:21 +02:00
Frank
04a7c912ea Update Airboss.lua
- Improved into wind
2023-09-27 22:21:17 +02:00
Applevangelist
39fc112e53 Merge remote-tracking branch 'origin/master' into develop 2023-09-27 18:08:25 +02:00
Applevangelist
55fb8f2064 nil check added 2023-09-27 18:08:02 +02:00
Applevangelist
5dc5736976 #EasyGCICAP
* Added success criteria if intruder leaves monitored zones
2023-09-27 18:07:50 +02:00
Applevangelist
1f23525799 Merge remote-tracking branch 'origin/develop' into develop 2023-09-27 15:42:26 +02:00
Applevangelist
f390616e41 Merge remote-tracking branch 'origin/master' into develop 2023-09-27 15:42:23 +02:00
Applevangelist
912c162eee Logic fixes for GetRandomCoordinateWithoutBuildings() 2023-09-27 15:41:52 +02:00
Frank
dfc7f17308 NAVYGROUP
- Improved heading into wind
2023-09-27 10:57:12 +02:00
Applevangelist
c4e8ad50c8 Docu adds 2023-09-26 13:29:09 +02:00
Applevangelist
652df5570a #EasyGCICAP
* initial release
2023-09-26 13:07:41 +02:00
Applevangelist
bb8e6eb7a1 Merge remote-tracking branch 'origin/master' into develop 2023-09-25 08:43:50 +02:00
Applevangelist
2efb6a624f #SCORING
* Rechtschreibung
2023-09-25 08:43:24 +02:00
Frank
b7b369e78f Merge pull request #2003 from FlightControl-Master/FF/Ops
LEGION
2023-09-20 21:55:03 +02:00
Frank
b1436b66d4 LEGION
- Added random asset score
- Added nil check for request.cargogroupset in :onafterAssetDead
2023-09-20 21:52:28 +02:00
Applevangelist
d2107466cc Merge remote-tracking branch 'origin/develop' into develop 2023-09-20 17:17:43 +02:00
Applevangelist
3975e1961e Merge remote-tracking branch 'origin/master' into develop 2023-09-20 17:17:40 +02:00
Applevangelist
ca84fa11cd #ATIS
* Added Spanish TTS locale ("es")
2023-09-20 17:17:12 +02:00
Frank
78ffaf6e0a Update OpsGroup.lua
- Fix that loading is never done
2023-09-20 14:38:24 +02:00
Applevangelist
7c3c39c1ba Merge remote-tracking branch 'origin/master' into develop 2023-09-19 18:08:16 +02:00
Applevangelist
ed614767e6 #ATIS
* Added localization option
2023-09-19 18:07:51 +02:00
Applevangelist
147f39981b Merge remote-tracking branch 'origin/master' into develop 2023-09-19 12:14:19 +02:00
Applevangelist
6d94a0c776 Smaller fixes 2023-09-19 12:13:39 +02:00
Applevangelist
80fdbc4960 Merge remote-tracking branch 'origin/master' into develop 2023-09-19 11:31:18 +02:00
Applevangelist
81fd5cb605 One Typo Less 2023-09-19 11:30:46 +02:00
Applevangelist
fc9ddae9b2 Merge remote-tracking branch 'origin/master' into develop 2023-09-19 11:10:33 +02:00
Applevangelist
b70bf3b9af #SEAD
* Better calculation of switch-on again time
2023-09-19 11:10:06 +02:00
Applevangelist
d0330cc696 Merge remote-tracking branch 'origin/master' into develop 2023-09-17 17:16:30 +02:00
Applevangelist
250d640e76 #SPAWN
* Added option for Modex pre- and postfix strings
* Added string check for SpawnAtParkingSpot when Airbase is handed as string
2023-09-17 17:15:12 +02:00
Frank
dca70eaa05 Merge branch 'master' into develop 2023-09-17 16:13:50 +02:00
Frank
6a05789db5 Update Controllable.lua
- Fixed wrong id of task`EnrouteTaskEngageGroup`
- Fixed wrong id of task `EnrouteTaskFAC_EngageGroup`
2023-09-17 16:13:28 +02:00
Applevangelist
5048201771 #Startup
* Re-instate suppression of error box.
2023-09-15 09:12:17 +02:00
Applevangelist
5e20874dca #Startup
* Re-instate suppression of error box.
2023-09-15 09:11:32 +02:00
Applevangelist
5e36425058 #PLAYERTASKCONTROLLER
* Fix a problem that sometimes the object event is called prior to the SET_CLIENT event for players joining, leading to false negatives on specifically filtered SET_CLIENT objects
2023-09-14 12:36:51 +02:00
Applevangelist
bc16970d96 #SET_CLIENT
* Small fix for FilterCallsign string search
2023-09-14 12:36:15 +02:00
Applevangelist
3f1ad24f6a Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Functional/MissileTrainer.lua
2023-09-13 16:04:23 +02:00
Applevangelist
674fef554d Intellisense docu fixes 2023-09-13 16:03:32 +02:00
Applevangelist
f8f4bac77e Intellisense docu fixes 2023-09-13 16:03:05 +02:00
Frank
3e2d312202 Merge branch 'master' into develop 2023-09-13 11:11:43 +02:00
Frank
5aa8338c59 Update Airboss.lua
- Adjust into wind angle
2023-09-13 11:10:35 +02:00
Frank
6ccfd499c8 Update SRS.lua
- Fixed bug in GRPC backend
2023-09-10 22:42:39 +02:00
Frank
468a8fed8b Merge branch 'master' into develop 2023-09-10 22:40:17 +02:00
Frank
1362fe9019 Update SRS.lua 2023-09-10 22:40:05 +02:00
Applevangelist
ef3127fdab Merge remote-tracking branch 'origin/master' into develop 2023-09-10 15:42:48 +02:00
Applevangelist
ba361e7eff #RAT
* Try more than once to get coord in status loop
2023-09-10 15:41:54 +02:00
Applevangelist
ab1e3e6c60 #AICSAR
* Force LoadingDone, UnloadingDone since changes in OPSTRANSPORT
2023-09-09 13:09:20 +02:00
Thomas
515764bb88 Update Group.lua
Docu fix
2023-09-09 11:56:28 +02:00
Thomas
31fb9bc169 Update Group.lua
Docu fix
2023-09-09 11:54:45 +02:00
Applevangelist
917f06fe04 Revert "Auxiliary commit to revert individual files from e5e81dbc35d61a32f5f6308b275eef278c970f2c"
This reverts commit 4f771489b473634ca3c758a02fd090e0cd26a964, reversing
changes made to c5f3bfe4a9.
2023-09-08 11:21:25 +02:00
Applevangelist
e5e81dbc35 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2023-09-08 11:20:11 +02:00
Applevangelist
e95a9525c6 #GENERAL
* Remove dependencies from UTILS.Routines
* Remove UTILS.Routines
2023-09-08 11:14:41 +02:00
Applevangelist
c5f3bfe4a9 Merge remote-tracking branch 'origin/master' into develop 2023-09-07 16:15:08 +02:00
Applevangelist
326d4b3135 Merge remote-tracking branch 'origin/master' 2023-09-07 16:14:45 +02:00
Applevangelist
c4fad08d58 Act 2023-09-07 16:14:42 +02:00
Applevangelist
5a57d05fd6 Deprecated flags 2023-09-07 16:14:21 +02:00
Applevangelist
5329745325 Merge remote-tracking branch 'origin/develop' into develop 2023-09-07 12:45:30 +02:00
Applevangelist
792222f567 #PLAYERTASK, #CLIENTMENU
* Fixes
2023-09-07 12:45:26 +02:00
Frank
a8f14fca70 Merge branch 'master' into develop 2023-09-06 21:33:29 +02:00
Frank
8a7fa326cd Update MissileTrainer.lua
- Docs: Class deprecated ==> use FOX instead
2023-09-06 21:33:05 +02:00
Frank
02105b1efc Update Airboss.lua
Fixed bug missing end in if statement
2023-09-05 20:53:02 +02:00
Applevangelist
93fd9e5d42 #CLIENTMENU
* Catch error on Menu removes
2023-09-05 10:35:12 +02:00
Applevangelist
65c384622c #AIRBOSS
* Suppress unnecessary SRS TTS calls with empty text
2023-09-01 09:46:52 +02:00
Applevangelist
18afe9ad7a #AIRBOSS
* Suppress unnecessary SRS TTS calls with empty text
2023-09-01 09:44:12 +02:00
Applevangelist
d7b87b63d8 #MANTIS
* Added zone filter option.
2023-09-01 08:52:46 +02:00
Applevangelist
253cf0f5a5 #MANTIS
* Added zone filter option.
2023-09-01 08:52:13 +02:00
Frank
b5b079d75f Merge pull request #2001 from ttrebuchon/tt/auftrag-newcap-nil-ref-bugfix
Fix error in AUFTRAG:NewCAP when Altitude is not explicitly provided
2023-08-31 14:57:31 +02:00
ttrebuchon
d0421f5226 Ensure Altitude is not nil in NewCAP to avoid breaking KnotsToAltKIAS. 2023-08-31 08:48:08 -04:00
Applevangelist
79ddc01bf7 Merge remote-tracking branch 'origin/master' into develop 2023-08-30 16:47:19 +02:00
Applevangelist
c5a85456c0 #MANTIS
* CHM Assets
2023-08-30 16:46:13 +02:00
Applevangelist
9a383826e7 Merge remote-tracking branch 'origin/master' 2023-08-29 15:49:52 +02:00
Applevangelist
1e6731830e #MANTIS
* Added two more CH mod types
2023-08-29 15:49:48 +02:00
Applevangelist
c4b874e3f9 #MANTIS
* Added two more CH mod types
2023-08-29 15:49:20 +02:00
Applevangelist
d9aff32a36 #MANTIS
* Added two more CH mod types
2023-08-29 15:48:36 +02:00
Frank
8b04d32839 Merge pull request #2000 from FlightControl-Master/FF/Ops
Update OpsGroup.lua
2023-08-28 20:27:39 +02:00
Frank
382605d4cf Update OpsGroup.lua
- Fixed bug loading opsgroups as cargo
2023-08-28 20:23:51 +02:00
Frank
1337815f05 Merge pull request #1999 from FlightControl-Master/FF/Ops
OPSTRANSPORT
2023-08-27 18:46:50 +02:00
Frank
1cd3b6a26b OPSTRANSPORT
- Docs
2023-08-27 15:13:07 +02:00
Frank
f34dcdb3db OPSGROUP
- Added parameter to selfdestruct single element
2023-08-27 12:03:26 +02:00
Frank
e3b7a85956 OPSTRANSPORT
- Improved storage transport
2023-08-26 23:55:21 +02:00
Frank
655282a034 Merge branch 'develop' into FF/Ops 2023-08-26 14:06:15 +02:00
Frank
94dde73561 Merge branch 'master' into develop 2023-08-26 14:05:51 +02:00
Frank
38cb8fb88e Merge pull request #1998 from FlightControl-Master/FF/MasterDevel
STORAGE
2023-08-26 14:00:26 +02:00
Frank
ad5488784f Update Storage.lua
**STORAGE**
- Added easier functions to add, set and remove items and liquids.
- Added checks if warehouse items are limited or unlimited.
2023-08-26 13:56:45 +02:00
Frank
a4cdd62aff Merge branch 'master' into FF/MasterDevel 2023-08-26 10:27:18 +02:00
Frank
45008c9d57 Update OpsGroup.lua 2023-08-26 10:26:11 +02:00
Frank
92b0ab3c8d Update OpsGroup.lua
- Storage transport
2023-08-25 22:15:50 +02:00
Frank
7074b70e86 Merge branch 'develop' into FF/Ops 2023-08-25 20:46:52 +02:00
Frank
e15d335f3f OPSTRANSPORT
- Storage
2023-08-25 20:46:42 +02:00
Frank
840b14f4ce OPSTRANSPORT
- Storage transport improved
2023-08-24 23:37:33 +02:00
Frank
887f7aa3e9 OPSTRANSPORT
- Storage
2023-08-23 23:37:23 +02:00
Thomas
a8daf70dad Update Set.lua Docu (#1995) (#1996)
* Update Set.lua Docu

Added regex explanation

* Update Set.lua
2023-08-23 11:43:37 +02:00
Thomas
9a9de9306e Update Set.lua Docu (#1995)
* Update Set.lua Docu

Added regex explanation

* Update Set.lua
2023-08-23 11:39:45 +02:00
Applevangelist
3e36e5f2b2 #Controllable
* Added Aerobtics tasks
2023-08-22 10:25:26 +02:00
Applevangelist
cf824b912d #Controllable
* Added Aerobtics tasks
2023-08-22 10:24:40 +02:00
Frank
c3f5405288 OPSTRANSPORT
Storage
2023-08-22 01:41:34 +02:00
Thomas
084b47edb7 ENUMS error (#1993)
* Storages Enum

* Update Enums.lua

Error in ENUM
2023-08-21 11:36:15 +02:00
Thomas
8d2e291deb Update Enums.lua
Error in ENUM
2023-08-21 11:35:01 +02:00
Frank
f84e2ede66 OPSTRANSPORT
Storage
2023-08-21 01:02:04 +02:00
Applevangelist
0a8782c890 Storages enum 2023-08-20 15:23:09 +02:00
Applevangelist
3a432782b2 Storages Enum 2023-08-20 15:22:49 +02:00
Applevangelist
5dd32d92c0 Merge remote-tracking branch 'origin/master' into develop 2023-08-20 15:13:18 +02:00
Applevangelist
d96cc26cd8 ENUMS.Storage.weapons 2023-08-20 15:12:59 +02:00
Applevangelist
bda1fac923 #ENUMS
* Added enumerator for ENUMS.Storage.weapons
2023-08-20 15:12:47 +02:00
Applevangelist
be5c1bed3b #PLAYERRECCE
* QoL Fixes for menu, smoke, reports etc
2023-08-20 14:18:43 +02:00
Thomas
ef40b1c524 Range fix for #1984 (#1992)
Range fix for #1984
2023-08-20 13:41:20 +02:00
Frank
a4c81736aa Update DCS.lua 2023-08-20 11:57:37 +02:00
Applevangelist
2eafadcedf Merge remote-tracking branch 'origin/master' into develop 2023-08-20 11:19:24 +02:00
Applevangelist
045c49679d #ATIS
* Fix explicitly set RWY not reported via SRS
2023-08-20 11:18:58 +02:00
Applevangelist
6b4c08d53f Merge remote-tracking branch 'origin/master' into develop 2023-08-18 11:08:47 +02:00
Applevangelist
f40442d309 #POSITIONABLE
* Make cargo weights an enumerator
2023-08-18 11:07:43 +02:00
ttrebuchon
83bae9c2f7 Make default cargo bay capacity values configurable (#1989)
* Add POSITIONABLE.CargoBayCapacityValues for manual configuration of cargo capacities.

* Add comment documenting local variable

* Remove extraneous semicolon

* Update Positionable.lua

Updated a bit plus documentation and working enumerator

---------

Co-authored-by: Thomas <72444570+Applevangelist@users.noreply.github.com>
2023-08-18 11:01:38 +02:00
Frank
944ef6332b Merge branch 'develop' into FF/Ops 2023-08-17 19:14:23 +02:00
Frank
1329cd23fd Merge branch 'master' into develop 2023-08-17 19:13:47 +02:00
Frank
fe7acecdd3 Merge pull request #1991 from FlightControl-Master/FF/MasterDevel
STORAGE - DCS Warehouse
2023-08-17 19:11:01 +02:00
Frank
4471ec9b96 DCS Warehouse 2023-08-17 18:46:09 +02:00
Frank
32e1d4f8fa DCS Warehouse 2023-08-16 23:58:32 +02:00
Frank
dbd78f35a4 Merge pull request #1987 from ttrebuchon/tt/misc-bug-fixes
Misc Bug Fixes
2023-08-13 22:57:06 +02:00
ttrebuchon
a2772c97d5 Merge branch 'develop' into tt/misc-bug-fixes 2023-08-13 15:34:40 -04:00
ttrebuchon
4f8e65b515 Merge branch 'tt/warehouse-asset-size-fix' into tt/misc-bug-fixes 2023-08-13 15:27:29 -04:00
ttrebuchon
1d6437f9e2 Merge branch 'tt/commander-incorrect-argument-ordering' into tt/misc-bug-fixes 2023-08-13 15:27:25 -04:00
ttrebuchon
a733b17840 Merge branch 'tt/auftrag-UpdateMarker-null-ref-check' into tt/misc-bug-fixes 2023-08-13 15:27:16 -04:00
ttrebuchon
3adf6d635a Handle OPSGROUP:MarkWaypoints() when waypoint altitude is nil 2023-08-13 15:22:05 -04:00
ttrebuchon
2e9320df03 Add check for whether targetcoord is nil in UpdateMarker() call 2023-08-13 15:18:09 -04:00
ttrebuchon
d08219f9d9 Add missing "Mission.escortMissionType" argument to call to AssignAssetsForEscort 2023-08-13 15:16:46 -04:00
ttrebuchon
f929951dbe Fix WAREHOUSE.AssetItem size calculation 2023-08-13 15:12:51 -04:00
Frank
76a36cb9f9 Merge branch 'develop' into FF/Ops 2023-08-13 18:20:23 +02:00
Frank
56aebfbee8 Merge branch 'master' into develop 2023-08-13 18:20:09 +02:00
Frank
747e5d801a Merge pull request #1986 from FlightControl-Master/FF/MasterDevel
COORDINATE
2023-08-13 18:19:16 +02:00
Frank
29ed630536 COORDINATE
- Generalized MarkupToAllFreeForm

UTILS
- Added some functions from MIST
2023-08-13 17:40:28 +02:00
Applevangelist
ffdcfa0129 Merge remote-tracking branch 'origin/master' into develop 2023-08-02 18:03:03 +02:00
Applevangelist
c5757ffd22 #CONTROLLABLE
* Added EnRouteTaskCAP()
2023-08-02 18:02:34 +02:00
Applevangelist
9cc08cb088 # 2023-08-01 16:26:29 +02:00
Applevangelist
268b7ef80c Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Scenery.lua
2023-08-01 16:26:14 +02:00
Applevangelist
172004b822 Merge remote-tracking branch 'origin/master' into develop 2023-08-01 16:19:33 +02:00
Applevangelist
6aa4683080 #PLAYERTASK 2023-08-01 16:19:03 +02:00
Applevangelist
2771e7f856 #SCENERY, SET_SCENERY
* Reworked COORDINATE scan as this doesn't seem to work
* Added SET_SCENERY Filters, and FilterOnce() to apply them
2023-08-01 16:18:23 +02:00
Thomas
7c4dd8160d Update Set.lua (#1982)
Intellisense updates
2023-08-01 11:53:00 +02:00
Thomas
677a64c3dc Update Scenery.lua (#1980) (#1981)
_id might be nil in :FindByZoneName()
2023-08-01 10:38:39 +02:00
Thomas
1fdc50b0da Update Scenery.lua (#1980)
_id might be nil in :FindByZoneName()
2023-08-01 10:00:42 +02:00
phr0gz
56fcd8f37f Add RemoveGciCapZone in Chief (#1973)
This will add the ability to remove CGI CAP zone from chief.
2023-08-01 10:00:17 +02:00
Thomas
09d4e155de Update PlayerTask.lua (#1977)
Prevent Events being available before the menu structure has been created
2023-07-31 14:24:47 +02:00
Applevangelist
65703d1092 Debugs 2023-07-29 17:19:51 +02:00
Applevangelist
2afd09b878 Merge remote-tracking branch 'origin/master' into develop 2023-07-29 16:48:08 +02:00
Thomas
f87a676e4b Update Scoring.lua (#1976)
Add report Spaces
2023-07-29 16:45:00 +02:00
Applevangelist
4ed2b0610d #AWACS
* ensure tactical frequencies are handed back

#PlayerTask
* Add'l check for stale tasks to rebuild menu
2023-07-29 16:44:25 +02:00
phr0gz
cbd371b40f Chief zone removal Tanker, AWACS (#1975)
Add the ability to remove a zone for Tanker and AWACS.
2023-07-29 15:44:13 +02:00
phr0gz
80e9cb692c Add FSM OnAfter and OnBefore (#1974)
Add FSM Function OnAfter and OnBefore in FlightGroup.
2023-07-29 13:37:07 +02:00
Frank
3c74aef378 Merge branch 'master' into develop 2023-07-26 17:23:34 +02:00
Frank
8bf56b8b1a Update Airboss.lua
- Fixed AI handling (got lost in some merge with develop branch and was using FLIGHTGROUPS)
2023-07-26 16:36:44 +02:00
Frank
7e2233d8c7 Merge branch 'develop' into FF/Ops 2023-07-26 16:11:27 +02:00
Thomas
065717b2f5 Update FlightGroup.lua
coord might be nil in GetParking(airbase)
2023-07-26 15:36:09 +02:00
Applevangelist
63a524f25c #AWACS
* Remove tactical subscription when client logs out or dies
2023-07-26 07:49:35 +02:00
Applevangelist
838e11de05 #AWACS
* Added tactical radio option
2023-07-25 14:50:29 +02:00
Applevangelist
2a56da4bb3 Merge remote-tracking branch 'origin/master' into develop 2023-07-25 12:01:48 +02:00
Applevangelist
f31741f934 #AI_ESCORT
* Improve documentation
2023-07-25 12:01:18 +02:00
Applevangelist
f84d02d8a1 Merge remote-tracking branch 'origin/master' into develop 2023-07-23 12:42:59 +02:00
Applevangelist
7d3a08cde2 #CLIENTMENU, #PLAYERTASK
* Fixes for "No current task" not being deleted later on
2023-07-23 12:42:36 +02:00
Applevangelist
46258492bd #AIRBASE, #ATIS
* Additions
2023-07-23 12:37:57 +02:00
Frank
a7857670d3 Merge branch 'develop' into FF/Ops 2023-07-22 10:16:40 +02:00
Frank
c41b256775 Update SRS.lua 2023-07-22 10:16:31 +02:00
Applevangelist
e2929a78c4 #AICSAR - correct code version 2023-07-19 16:06:44 +02:00
Applevangelist
15bf379cdc #AICSAR
* Added FSM Event "HeloOnDuty"
2023-07-19 09:56:27 +02:00
Applevangelist
8a8e40e810 #PLAYERTASK
* Refactored menubuilds to use new CLIENTMENU/CLIENTMENUCONTROLLER classes
2023-07-17 16:27:54 +02:00
Applevangelist
2c8adf58cb #CLIENTMENU
* Rewrite with a different data approach
2023-07-17 16:26:53 +02:00
Applevangelist
bb579fff5b Merge remote-tracking branch 'origin/master' into develop 2023-07-16 11:28:24 +02:00
Applevangelist
6481f66e27 #MANTIS
* Added IDs for Current Hill Assets, keyword "CHM" for group names
2023-07-16 11:27:34 +02:00
Thomas
1ad538ea9f Commits from master (#1972)
* #SPAWN

* Update Spot.lua

Fix
2023-07-15 09:46:55 +02:00
Thomas
5954b8692f Update Spot.lua
Fix
2023-07-15 09:36:24 +02:00
Applevangelist
f6fdecf892 Merge remote-tracking branch 'origin/master' 2023-07-13 16:15:11 +02:00
Applevangelist
53fb77b50d #SPAWN 2023-07-13 16:15:06 +02:00
Applevangelist
191f7a7377 Merge remote-tracking branch 'origin/master' into develop 2023-07-13 16:13:26 +02:00
Applevangelist
04a9dc3a8c #SPAWN
* Added method to init spawn position
2023-07-13 16:13:00 +02:00
Applevangelist
77d2804fce Merge remote-tracking branch 'origin/master' into develop 2023-07-12 17:55:07 +02:00
Applevangelist
10b9a32f29 #SPOT
* Fix for switching laser off and on again not follwing unit any more
2023-07-12 17:54:17 +02:00
Applevangelist
63ba50a83a #CLIENTMENUMANAGER Docu 2023-07-11 16:10:40 +02:00
Applevangelist
fb8f804af2 # CLIENTMENU
* Initial release
2023-07-11 15:41:06 +02:00
Applevangelist
ffbab7453c Merge remote-tracking branch 'origin/master' into develop 2023-07-07 15:15:09 +02:00
Applevangelist
40fa929eb0 * Added omissed DetectedItem.Name found by @Nocke 2023-07-07 15:14:33 +02:00
Applevangelist
10872918bb #AUFTRAG
* Added GROUNDESCORT from the DCS Task with same name
2023-07-03 17:29:06 +02:00
Applevangelist
8979097fd7 Merge remote-tracking branch 'origin/master' into develop 2023-07-03 17:06:47 +02:00
Applevangelist
71b2cc1ee5 #AMMOTRUCK
* Added TTL
2023-07-03 17:06:31 +02:00
Applevangelist
8c8ef19f01 #CONTROLLABLE
* Added TaskGroundEscort
2023-07-03 16:44:46 +02:00
Applevangelist
389d5c7e5b Merge remote-tracking branch 'origin/master' into develop 2023-07-01 13:17:19 +02:00
Applevangelist
1eaa3d309d #SCORING
* typo
2023-07-01 13:15:59 +02:00
Applevangelist
178005346d Merge remote-tracking branch 'origin/master' into develop 2023-07-01 13:12:54 +02:00
Applevangelist
a52cd5612a Merge remote-tracking branch 'origin/master' 2023-07-01 13:12:29 +02:00
Applevangelist
041c21a883 Merge remote-tracking branch 'origin/master' into develop 2023-07-01 13:12:03 +02:00
Applevangelist
e82ed762be Merge remote-tracking branch 'origin/master' 2023-07-01 13:11:46 +02:00
Applevangelist
0bb16ec827 #AIRBASE
* Fix for nil error in finding parking for a group

#MANTIS
* Added SAM type "SHORAD" as designator

#SCORING
* fix for non local problem

#UTILS
* fix for OneLineSerialize
2023-07-01 13:11:21 +02:00
Applevangelist
fd946e971a #AWACS
* Bugfixes
2023-07-01 13:08:27 +02:00
Thomas
0dab316514 Point - BRAANATO (#1969) (#1970)
corrected Track to be direction of travel of bogey (self in this case)
2023-06-26 13:29:34 +02:00
Thomas
a978420a67 Point - BRAANATO (#1969)
corrected Track to be direction of travel of bogey (self in this case)
2023-06-26 13:25:23 +02:00
Applevangelist
248228720e Merge remote-tracking branch 'origin/master' into develop 2023-06-24 14:04:32 +02:00
Applevangelist
f59326bf10 #ATIS
* Fix for airbases which have no runways, e.g. Naqoura Syria
2023-06-24 14:03:43 +02:00
Applevangelist
e9c1b6d268 Merge remote-tracking branch 'origin/master' into develop 2023-06-22 13:52:19 +02:00
Thomas
08be2d6e93 CTLD (#1967) (#1968)
* Added option for troops subcategories in menu
2023-06-22 13:49:21 +02:00
Thomas
d937ab2679 CTLD (#1967)
* Added option for troops subcategories in menu
2023-06-22 13:46:11 +02:00
Applevangelist
ac386d5ebe #AIRBOSS
* Bug fix
2023-06-22 09:34:02 +02:00
Frank
74c1e9d991 Merge branch 'develop' into FF/Ops 2023-06-21 22:00:14 +02:00
Frank
0e72717cdb OPSGROUP
Track
2023-06-21 22:00:04 +02:00
Applevangelist
1df525b9c5 #NAVY
* Min speed 4kn due to rudder effectiveness
2023-06-21 14:05:17 +02:00
Applevangelist
cdbbad809a Merge remote-tracking branch 'origin/master' into develop 2023-06-21 10:43:40 +02:00
Applevangelist
7164e211f2 #AIRBASE
- Nicosia unused atm
2023-06-21 10:42:35 +02:00
Applevangelist
970275e96e #AIRBOSS
* Added adjustment degrees for wind speed
2023-06-21 10:25:00 +02:00
Applevangelist
5456cd04c3 #PLAYERTASKCONTROLLER
* Menu build lock
2023-06-18 13:29:07 +02:00
Applevangelist
1cdbe55cdd Merge remote-tracking branch 'origin/develop' into develop 2023-06-18 12:19:37 +02:00
Applevangelist
0577e5171b #AIRBOSS
* SRS: Remove lines starting with # from being spelled out
2023-06-18 12:19:28 +02:00
Frank
97376320f4 Merge pull request #1965 from ttrebuchon/tt/ops-auftrag-transport-attributes-and-properties
AUFTRAG Transport Attributes, Categories, and Properties Filters
2023-06-18 01:08:10 +02:00
ttrebuchon
9c1acc731a Make Attributes parameter documentation conform to other similar descriptions 2023-06-17 17:32:49 -04:00
ttrebuchon
92f81614ba Update/fix lua docs for new AUFTRAG transport fields 2023-06-17 17:09:50 -04:00
ttrebuchon
2a11c4c98a Rename AUFTRAG.transportCategories/etc to carrierCategories/etc 2023-06-17 17:07:56 -04:00
ttrebuchon
e284773492 Move transport categories/etc to SetRequiredCarriers, to allow for specifying them without always needing to specify zones 2023-06-17 17:06:16 -04:00
ttrebuchon
b3d46618c2 Missed 2 spots in Legion/Commander for transport filters. 2023-06-17 16:56:46 -04:00
ttrebuchon
4e36e2011f Add categories/attributes/properties filters for AUFTRAG transports 2023-06-17 15:35:11 -04:00
Applevangelist
a3876c296e #AIRBOSS
* Added option to set Airboss voice for SRS etc
* Nicer read out of weather info and carrier info
2023-06-17 15:01:33 +02:00
Applevangelist
c80213b4cf #AIRBOSS
* Initial SRS addition
2023-06-16 18:18:18 +02:00
Applevangelist
bfe7bf1af5 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
2023-06-16 11:11:37 +02:00
Applevangelist
dae78d7ac1 #Positionable, Unit - remove pcall 2023-06-16 11:06:46 +02:00
Frank
f28d92e865 Merge pull request #1963 from FlightControl-Master/FF/Ops
OPS
2023-06-15 19:15:34 +02:00
Frank
bffb3e7778 OPS
UNIT and POSITIONABLE
- Removed pcall for GetVec3 and GetAmmo

CHIEF
- Deploy resources if zone is empty and owned by itself
2023-06-15 19:12:26 +02:00
Applevangelist
d4c2de9dd1 Merge remote-tracking branch 'origin/develop' into develop 2023-06-15 14:52:09 +02:00
Applevangelist
ab5425bd83 Merge remote-tracking branch 'origin/master' into develop 2023-06-15 14:52:02 +02:00
Applevangelist
254468c723 #NET
* Improvements
2023-06-15 14:51:36 +02:00
Applevangelist
aec3eee3a5 #NET
* Slight improvements
2023-06-15 14:50:11 +02:00
Frank
eec7e5f8d9 Merge branch 'develop' into FF/Ops 2023-06-15 01:25:10 +02:00
Frank
a9b51cca93 Update Auftrag.lua 2023-06-15 01:24:59 +02:00
Frank
14ddba69b0 Merge pull request #1962 from ttrebuchon/tt/ops-chief-RecruitAssetsForZone-nmin-nmax-typo-fix
Fix typo (Nmax -> Nmin) in CHIEF:RecruitAssetsForZone
2023-06-15 00:39:45 +02:00
ttrebuchon
a7806deb76 Recruit assets using resource Nmin and Nmax, rather than Nmax and Nmax. 2023-06-14 12:41:05 -04:00
Applevangelist
0cf35b664f Merge remote-tracking branch 'origin/master' into develop 2023-06-14 17:41:13 +02:00
Applevangelist
71be4d99d6 #POSITIONABLE:GetRelativeCoordinate( x, y, z ) 2023-06-14 17:40:33 +02:00
Frank
c3ffffbb52 Merge branch 'master' into develop 2023-06-13 21:53:29 +02:00
Frank
f86fc845e7 Update Timer.lua
- Timer stop is using protected call now because it can crash the whole script.
2023-06-13 21:53:19 +02:00
Frank
d96a55d83c Merge pull request #1961 from ttrebuchon/tt/flightgroup-getparkingspot-ship-fix
FLIGHTGROUP:GetParkingSpot Carrier Issue Fix
2023-06-13 19:09:42 +02:00
ttrebuchon
83353d710d Use GetRelativeCoordinate in FLIGHTGROUP:GetParkingSpot 2023-06-13 13:04:24 -04:00
Frank
9a4c09d249 Merge branch 'master' into develop 2023-06-13 19:03:11 +02:00
Frank
cc907b9c14 Update Unit.lua
- UNIT:IsAlive() fixed so it is consistent with GROUP:IsAlive()
2023-06-13 19:02:55 +02:00
ttrebuchon
c825191556 Add POSITIONABLE:GetRelativeCoordinate 2023-06-13 12:54:38 -04:00
Applevangelist
27e85e921f Merge remote-tracking branch 'origin/develop' into develop 2023-06-13 18:00:18 +02:00
Applevangelist
c120a48879 #UNIT
* Test to not return a stored DCS Object if the API doesn't think it's still there
2023-06-13 18:00:15 +02:00
Frank
4a03074571 Merge branch 'develop' of https://github.com/FlightControl-Master/MOOSE into develop 2023-06-13 16:02:00 +02:00
Frank
8855b117a8 Update OpsGroup.lua
- exists check for ammo and vec3
2023-06-13 16:01:47 +02:00
Applevangelist
2cedb5e996 Merge remote-tracking branch 'origin/master' into develop 2023-06-13 08:40:21 +02:00
Applevangelist
241b2beee1 * Makes calls for GetAmmo() and GetVec3() safer with pcall()
* Small docu fix Ben-Gurion
2023-06-13 08:39:56 +02:00
Frank
0af68cd780 Merge branch 'master' into develop 2023-06-12 23:01:36 +02:00
Frank
12f260e857 Update Unit.lua
- Added `UNIT:IsExist` function.
2023-06-12 23:01:19 +02:00
Thomas
6a58748cd1 Airbase (#1954)
* #UTILS
* Sinai TIme

* fix

* Update Airbase.lua

Corrected enumerator for Ben-Gurion (Ben_Gurion)

* Update Airbase.lua (#1957)

Deleted raj al … airbases #1955
2023-06-12 06:27:52 +02:00
Thomas
096d145cf9 Update Airbase.lua (#1957)
Deleted raj al … airbases #1955
2023-06-12 06:22:51 +02:00
Frank
d31db1351a Merge pull request #1956 from FlightControl-Master/FF/Ops
AUFTRAG
2023-06-11 22:52:28 +02:00
Frank
0f33603ecc AUFTRAG
- Changed ingress waypoint of CASENHANCED
2023-06-11 22:45:59 +02:00
Thomas
b3883301a2 Update Airbase.lua
Corrected enumerator for Ben-Gurion (Ben_Gurion)
2023-06-11 12:33:01 +02:00
Frank
3bbd55cfc2 Merge pull request #1953 from ttrebuchon/tt/fix-opsgroup-getlifepoints-typo
Set life0 based on itself, rather than off of life
2023-06-11 00:52:13 +02:00
ttrebuchon
163273096c Set life0 based on itself, rather than off of life 2023-06-10 18:08:29 -04:00
Applevangelist
3a7521c492 #UTILS
* Sinai TIme
2023-06-10 19:08:46 +02:00
Applevangelist
caa5a96235 fix 2023-06-10 19:06:22 +02:00
Applevangelist
cee1c592ba #UTILS
* Sinai TIme
2023-06-10 19:04:40 +02:00
Frank
6d1030925c Merge branch 'master' into develop 2023-06-10 10:08:35 +02:00
Frank
f1fc9f0b27 Update Utils.lua
- Added parameters time zone and magvar for Sinai map
2023-06-10 10:08:22 +02:00
Applevangelist
dabe8a58d1 Merge remote-tracking branch 'origin/develop' into develop 2023-06-09 15:16:41 +02:00
Applevangelist
16cf6693ab Merge remote-tracking branch 'origin/master' into develop 2023-06-09 15:16:38 +02:00
Applevangelist
e9adcb0dd5 #AIRBASE
* Sinai airfield enumerator
2023-06-09 15:13:45 +02:00
Applevangelist
fd51ec6932 #FIX 2023-06-09 13:25:29 +02:00
Frank
7a16a5dda8 Merge pull request #1952 from FlightControl-Master/FF/Ops
OPS
2023-06-08 19:55:30 +02:00
Frank
1b6648996c OPSGROUP
- Improved CAPTUREZONE for FLIGHTGROUP
2023-06-08 19:51:09 +02:00
Frank
f45a22fe78 Merge branch 'develop' into FF/Ops 2023-06-08 15:52:25 +02:00
Applevangelist
afe2b675e5 #RAT
* Fixes from dev
2023-06-08 13:59:59 +02:00
Applevangelist
2c14ee74b0 #SCORING
* Can leave text empty on some instances
2023-06-08 13:58:26 +02:00
Applevangelist
4314959cbb Merge remote-tracking branch 'origin/develop' into develop 2023-06-08 13:57:03 +02:00
Applevangelist
fad85ef7ed #PLAYERTASK
* Added basic scoring
2023-06-08 13:56:59 +02:00
Frank
569b3df6af Merge branch 'master' into develop 2023-06-08 09:46:24 +02:00
Frank
f351d2a37e Merge pull request #1951 from FlightControl-Master/FF/MasterDevel
Update RAT.lua
2023-06-08 09:45:49 +02:00
Frank
4cb0e70184 Update RAT.lua
- Fixed RATMANAGER spamming due to not accounting for planned/scheduled groups
2023-06-08 09:43:11 +02:00
Applevangelist
910da86caf Merge remote-tracking branch 'origin/develop' into develop 2023-06-07 17:25:49 +02:00
ttrebuchon
73ff2c576d Fix typo from TRANSPORT. to OPSTRANSPORT. (#1950) 2023-06-07 17:26:20 +02:00
Applevangelist
d5ffb48548 #PLAYERTASK
* Fix for one tts output
2023-06-07 17:25:45 +02:00
Frank
8ce371f898 WAREHOUSE
- Runway destroyed event only triggered if it was operational
2023-06-07 09:03:01 +02:00
Thomas
6f02f23240 PlayerTask.lua (#1948)
Small fix for one tts text
2023-06-06 16:20:16 +02:00
ttrebuchon
0a1d469c68 Fix Offset values being saved to the ZONE_UNIT class itself (#1947) 2023-06-03 20:15:33 +02:00
Applevangelist
823f8fb4fb Merge remote-tracking branch 'origin/master' into develop 2023-06-03 12:35:05 +02:00
Applevangelist
41bb2551d3 #CTLD
* Ensure new menus can be build if player changes helos
2023-06-03 12:34:18 +02:00
Applevangelist
f7e64bc9b5 #UNIT #CTLD
* Stabilize that sometimes a unit coordinate cannot be found
2023-06-02 08:45:35 +02:00
Applevangelist
55ed394782 #UNIT #CTLD
* Stabilize that sometimes a unit coordinate cannot be found
2023-06-02 08:44:14 +02:00
Applevangelist
261f79851c Merge remote-tracking branch 'origin/master' into develop 2023-06-01 10:03:34 +02:00
Applevangelist
dd7a883a33 Fixes 2023-06-01 10:02:51 +02:00
Applevangelist
6773ac7841 #PLAYERTASK
* Added FSM event "Progress" that will be triggered if the targetcount goes down for a task, but is not yet zero. This will bubble up to PLAYERTASKCONTROLLER

#PLAYERTASKCONTROLLER
* Added FSM event"TaskProgess" (see above). The event function will recveive the PLAYERTASK and the current target count
* Changed the menu build strategy to ensure a lot less menu rebuilds. Menus are now only build if
	* A new player joins (for the joining single player)
	* On joining a task (for the joining single player)
	* When aborting a task (for the aborting single player)
	* On Task succes (for all players)
	* Removal of time based builds: The status loop will now only enforce the menu build if the task count in the queue is smaller than the menu item limit. This effectively enforces a time-based order of tasks, and newer, even higher prio task will not bubble into the task list of pilots automatically.
2023-05-30 12:06:03 +02:00
Applevangelist
39f29b066b Merge remote-tracking branch 'origin/master' into develop 2023-05-30 07:38:48 +02:00
Applevangelist
f7acbc3928 #CSAR
* Corrected flare distance to kms
2023-05-30 07:38:19 +02:00
Applevangelist
246879c003 Merge remote-tracking branch 'origin/master' into develop 2023-05-28 15:28:37 +02:00
Applevangelist
2318578126 #SPAWN
* Logic fix for the last parameter of `NewFromTemplate()`
2023-05-28 15:27:34 +02:00
Frank
709621967d Merge pull request #1945 from FlightControl-Master/FF/Ops
OPSTRANSPORT
2023-05-27 14:38:30 +02:00
Frank
0c376aec63 OPSTRANSPORT
Fixed loaded not correctly checked in OPSGROUP
2023-05-27 14:28:53 +02:00
Frank
725efc3e70 Merge pull request #1944 from FlightControl-Master/FF/Ops
AUFTRAG
2023-05-26 11:42:26 +02:00
Frank
81abe422de Merge branch 'develop' into FF/Ops 2023-05-26 11:38:26 +02:00
Frank
fb202012da AUFTRAG
Reinforcing
- improved check if reinforcing is still ongoing
- improved handling by commander/chief
- added check that assets are not added to a mission twice
2023-05-26 11:37:19 +02:00
Applevangelist
89223ae142 Merge remote-tracking branch 'origin/master' into develop 2023-05-26 08:28:45 +02:00
Applevangelist
2967de8f6e #CONTROLLER
* Fix for Link4
2023-05-25 08:57:54 +02:00
Applevangelist
9c5260f801 Merge remote-tracking branch 'origin/develop' into develop 2023-05-25 08:24:35 +02:00
Applevangelist
4d9ce80c98 Merge remote-tracking branch 'origin/master' into develop 2023-05-25 08:24:16 +02:00
Frank
ee055531b6 Merge branch 'master' into develop 2023-05-24 11:16:36 +02:00
Frank
c9b90e884d Merge pull request #1943 from FlightControl-Master/FF/Ops
OPS
2023-05-23 01:46:51 +02:00
Frank
21db80afad Merge branch 'develop' into FF/Ops 2023-05-23 01:29:04 +02:00
Frank
d9d5458450 OPS
**AUFTRAG**
- New type `FAC`

**OPSZONE**
- Improved drawzone on capture
2023-05-23 01:28:52 +02:00
Applevangelist
0575b366dd #SPAWN
* Tweaked NewFromTemplate, and gave a better example
2023-05-22 17:57:50 +02:00
Applevangelist
034b2444ff Merge remote-tracking branch 'origin/master' into develop 2023-05-20 12:13:35 +02:00
Applevangelist
7901d53d54 #POINT
* Added FindClosestStatic()
2023-05-19 17:13:17 +02:00
Applevangelist
88f34e5bb0 Merge remote-tracking branch 'origin/master' into develop 2023-05-17 10:28:11 +02:00
Applevangelist
49f3e3fc2f Merge remote-tracking branch 'origin/develop' into develop 2023-05-17 09:41:32 +02:00
Applevangelist
cae084a352 Merge remote-tracking branch 'origin/master' into develop 2023-05-17 09:41:27 +02:00
Frank
6d07f7c48c Merge branch 'develop' into FF/Ops 2023-05-13 23:36:36 +02:00
Frank
014fea5f10 Merge branch 'master' into develop 2023-05-13 23:36:12 +02:00
Frank
d07709a167 Update Auftrag.lua 2023-05-13 23:06:56 +02:00
Frank
ac4db4a392 Merge branch 'develop' into FF/Ops 2023-05-13 17:57:23 +02:00
Applevangelist
b30cdd073b Merge remote-tracking branch 'origin/master' into develop 2023-05-11 18:23:01 +02:00
Applevangelist
a12e93c7cb Merge remote-tracking branch 'origin/master' into develop 2023-05-09 09:49:47 +02:00
Applevangelist
bd01946f88 #AI_A2X...
* Fixes
2023-05-09 09:49:13 +02:00
Applevangelist
8d25bdec7c Merge remote-tracking branch 'origin/master' into develop 2023-05-05 10:33:55 +02:00
Applevangelist
8da228c9a2 #COORDINATE
* Added `IsInSteepArea()`and `IsInFlatArea()`
2023-05-05 10:31:00 +02:00
Applevangelist
74abcce956 Merge remote-tracking branch 'origin/develop' into develop 2023-04-27 10:34:21 +02:00
Applevangelist
2032c2cfbf # AUFTRAG
* Bring options for afterburner usage down to AUFTRAG level

# OpsGroup (Flightgroup)
* Follow setting option for AB usage from mission, if set, generally and for execution phase of the AUFTRAG
2023-04-27 10:34:17 +02:00
Frank
fb070a0c86 Merge branch 'develop' into FF/Ops 2023-04-25 21:54:04 +02:00
Frank
817c69bb11 Merge branch 'master' into develop 2023-04-25 21:53:39 +02:00
Applevangelist
6cd56e4de4 Merge remote-tracking branch 'origin/master' into develop 2023-04-25 09:13:27 +02:00
Applevangelist
19a4ec48bb Merge remote-tracking branch 'origin/master' into develop 2023-04-24 16:45:31 +02:00
Thomas
c7d990850a AIRBASE - add Normandy AFBs (#1937) (#1938)
Add Normandy AFBs
2023-04-24 11:16:45 +02:00
Frank
885d3b5228 Merge branch 'develop' into FF/Ops 2023-04-22 14:29:18 +02:00
Frank
7379b8135a Merge branch 'master' into develop 2023-04-22 14:08:05 +02:00
Applevangelist
549c9b9ce5 #CTLD
* Docu changes
2023-04-20 08:22:31 +02:00
Applevangelist
f4080d93e8 #SET
- Minus one log entry
2023-04-20 08:06:57 +02:00
Applevangelist
94b74b7056 Merge remote-tracking branch 'origin/develop' into develop 2023-04-20 08:05:15 +02:00
Applevangelist
6886107934 #SET
* Active Zone Filtering
2023-04-20 08:05:11 +02:00
Thomas
f65783ed6c SET - added continous zone filtering (#1934)
SET - added continous zone filtering for SET_GROUP, SET_UNIT and SET_CLIENT. Adresses request #1933
2023-04-18 12:28:17 +02:00
Applevangelist
d8e765a9b1 Fixes for getPlayerName() errors if DCS object is not a UNIT 2023-04-18 10:28:00 +02:00
Frank
526f241dc3 Merge branch 'develop' into FF/Ops 2023-04-17 17:18:54 +02:00
Applevangelist
dffb1c0768 Merge remote-tracking branch 'origin/master' into develop 2023-04-16 16:11:12 +02:00
Frank
f30f32732c Merge branch 'master' into develop 2023-04-16 12:30:19 +02:00
Frank
9cd3027ea6 Update FlightGroup.lua 2023-04-16 11:16:54 +02:00
Applevangelist
b4c7b63381 #CTLD
* Small fix allowing minus signs in template names for repairs
2023-04-15 16:17:39 +02:00
Applevangelist
0782532763 Merge remote-tracking branch 'origin/master' into develop 2023-04-13 15:51:55 +02:00
Applevangelist
6fa9e5894e #DATABASE
* Small fix for CLIENT:FindByName()
2023-04-04 10:33:41 +02:00
Applevangelist
c0bc9b393c #NET
* Fix for ucid can be nil
2023-04-03 12:16:25 +02:00
Applevangelist
a97e844aca Added Init Methods to set Unit Positions on Spawn 2023-03-30 12:23:07 +02:00
Applevangelist
d2e91ffcd2 Small fix for SET_UNIT if used in capture zone coalition with a polygon zone 2023-03-30 09:24:48 +02:00
Applevangelist
d9eee7ea46 SET_STATIC - Added GetClosestStatic() 2023-03-28 11:03:34 +02:00
Applevangelist
b1e233421e Fix possible DCS Unit not existing in OPSGROUP:onafterElementDamaged(From, Event, To, Element) 2023-03-24 10:28:36 +01:00
Applevangelist
7157836eb1 Merge remote-tracking branch 'origin/master' into develop 2023-03-23 09:21:58 +01:00
Applevangelist
53fa850d66 Add'l check in UNIT:GetLife() 2023-03-23 08:46:29 +01:00
Applevangelist
033c52ae54 Merge remote-tracking branch 'origin/develop' into develop 2023-03-16 08:45:17 +01:00
Applevangelist
e08b44187e #AIRBASE
* Added/changed:
  ["Hipico_Flying_Club"] = "Hipico Flying Club",
  ["Aeropuerto_de_Gobernador_Gregores"] = "Aeropuerto de Gobernador Gregores",
  ["Aerodromo_O_Higgins"] = "Aerodromo O'Higgins",
  ["Cullen_Airport"] = "Cullen Airport",
  ["Gull_Point"] = "Gull Point",
2023-03-16 08:45:14 +01:00
Thomas
0d29c39724 Drop crates from herc as CTLD_Cargo (#1929) (#1930)
Adds option to drop crates from a herc via parachute drop as CTLD_Cargo that needs proper unpacking - can be picked up be a helo.

Co-authored-by: UglySkyfire <69476075+UglySkyfire@users.noreply.github.com>
2023-03-15 21:07:19 +01:00
Applevangelist
6946d8d185 Merge remote-tracking branch 'origin/master' into develop 2023-03-10 10:09:40 +01:00
Applevangelist
6ac1d66aae #GROUP
* Fix for GetMaxHeight()
2023-03-09 08:49:53 +01:00
Applevangelist
a67bae4f0d #UTILS
* Added UTILS.PlotRacetrack courtesy of Buur!
2023-03-07 10:55:42 +01:00
Applevangelist
4e7c689f7a Merge branch 'master' into develop 2023-03-05 11:04:22 +01:00
Anthony De Vellis
f73ff10edb Refactored GROUP:GetCustomCallSign so that bespoke callsigns override parsing player name and playername overrides vanilla callsigns. Previously Bespoke callsigns would never be used if names contained # or |. If CallsignTranslations is unset, previous priority will be applied. (#1927) 2023-03-05 11:01:37 +01:00
Applevangelist
949e2f9ff3 #SPAWN
* clarified docu for SpawnScheduled()
* Added parameter to SpawnScheduled() for a delayed spawn
2023-02-28 08:00:43 +01:00
Thomas
cb9ab26522 Update Enums.lua (#1925) 2023-02-26 19:06:45 +01:00
Frank
7aa4aaf371 Update Auftrag.lua
- Fixed wrong IAS to TAS convertion for orbit missions
2023-02-26 01:02:39 +01:00
Frank
901480d99c Merge branch 'FF/Ops' into develop 2023-02-24 23:29:32 +01:00
Frank
84dbda6f2b OPS
- Rm laser marker
2023-02-24 23:29:03 +01:00
Applevangelist
9d00ec0c25 Merge remote-tracking branch 'origin/master' into develop 2023-02-24 14:04:53 +01:00
Applevangelist
0d08d732a5 #AWACS - do not convert speed to IAS, as already done in AUFTRAG 2023-02-23 11:12:05 +01:00
Applevangelist
8c0f960e39 Merge remote-tracking branch 'origin/master' into develop 2023-02-23 10:32:38 +01:00
Frank
b0978b362e Merge pull request #1924 from FlightControl-Master/FF/Ops
OPS
2023-02-22 23:18:29 +01:00
Frank
ffef3183c7 OpsGroup
- Fixed bug in checklos
2023-02-22 23:01:47 +01:00
Frank
20a9857fcf Merge branch 'FF/OpsDev' into FF/Ops 2023-02-22 22:17:49 +01:00
Frank
828395c398 Merge branch 'develop' into FF/Ops 2023-02-22 22:17:35 +01:00
Frank
462e29da6e RANGE and OPS
** RANGE**
- Added scenery as target

**OPSGROUP**
- Added option that group does not return to its legion

**AUFTRAG**
- Added option that assets do not return to its legion
2023-02-22 22:16:42 +01:00
Applevangelist
29ebe94015 #CTLD logic correction for loading 2023-02-21 11:39:23 +01:00
Applevangelist
ce7b30b54e Merge remote-tracking branch 'origin/master' into develop 2023-02-19 17:16:34 +01:00
Applevangelist
feeb0c01f2 Merge remote-tracking branch 'origin/master' into develop 2023-02-19 12:32:29 +01:00
Applevangelist
bef8e53347 #AICSAR - added option to use eject event 2023-02-19 12:30:00 +01:00
Applevangelist
46c3ed72c3 Merge remote-tracking branch 'origin/master' into develop 2023-02-18 15:04:36 +01:00
Applevangelist
1fd8f4d837 #AICSAR
* Named functions for the events
2023-02-18 11:04:49 +01:00
Applevangelist
6f3fbb25cf Merge remote-tracking branch 'origin/master' into develop 2023-02-17 16:42:10 +01:00
Applevangelist
05b8df0d88 Merge remote-tracking branch 'origin/master' into develop 2023-02-17 16:24:21 +01:00
Applevangelist
a4dcb643bd #NET Fixes 2023-02-17 15:41:33 +01:00
Applevangelist
9e23cda02a #NET Fixes 2023-02-17 15:01:49 +01:00
Applevangelist
c29b67df55 #NET small fix 2023-02-17 14:33:32 +01:00
Applevangelist
bd312b86d2 Merge remote-tracking branch 'origin/master' into develop 2023-02-17 13:23:10 +01:00
Applevangelist
822b95e8aa Merge remote-tracking branch 'origin/master' into develop 2023-02-17 08:55:27 +01:00
Applevangelist
a7e45338e3 #AICSAR - Added alt/speed options 2023-02-17 08:54:54 +01:00
Applevangelist
7637f0c6ce Merge remote-tracking branch 'origin/develop' into develop 2023-02-16 18:22:10 +01:00
Applevangelist
6ec43b72ce #AICSAR
* Added PlayerName to `OnAfterPilotRescued(From,Event,To,PilotName)` if available
2023-02-16 18:22:06 +01:00
Frank
91e80bf1a6 Merge branch 'FF/Ops' into FF/OpsDev 2023-02-16 17:30:47 +01:00
Frank
e6464dc5cb Merge branch 'develop' into FF/Ops 2023-02-16 17:30:15 +01:00
Frank
34c799b668 Merge branch 'master' into develop 2023-02-16 17:29:54 +01:00
Applevangelist
dbd7634f0e #NET
* Added event management for clients and block/unblock functions
2023-02-16 11:42:46 +01:00
Frank
baa1dcbf8f OPSGROUP
- mission nothing is cancelled if transport is due
2023-02-15 23:06:34 +01:00
Applevangelist
660ebeadfe Merge remote-tracking branch 'origin/master' into develop 2023-02-15 12:24:09 +01:00
Applevangelist
ef0ddddb46 #PLAYERTASK
* added group/unit check for UseTypeNames
2023-02-15 10:32:30 +01:00
Applevangelist
77a39364f4 #PLAYERTASKCONTROLLER
* Added ship detail types
2023-02-14 12:58:23 +01:00
Frank
dc0a2bccd6 Update Legion.lua
- Increase score for nearby ground groups
2023-02-12 15:19:34 +01:00
Frank
ac1b458eb4 Merge branch 'FF/Ops' into FF/OpsDev 2023-02-12 13:53:47 +01:00
Frank
f5938bc235 Merge branch 'develop' into FF/Ops 2023-02-12 13:53:25 +01:00
Frank
7280c17506 Merge branch 'master' into develop 2023-02-12 13:04:32 +01:00
Frank
4e280f02b6 Merge branch 'FF/Ops' into FF/OpsDev 2023-02-12 11:53:42 +01:00
Frank
854f6ae6ae Merge branch 'develop' into FF/Ops 2023-02-12 11:52:13 +01:00
Frank
0487487e7c Merge branch 'master' into develop 2023-02-12 11:51:16 +01:00
Frank
9ec66912c8 Update OpsGroup.lua
- Added SetCargoBayLimit function
2023-02-12 09:36:35 +01:00
Thomas
960f261ddd Master merge (#1920)
* #NET
* Initial release

* Update MarkerOps_Base.lua (#1919)
2023-02-11 22:17:24 +01:00
Frank
e55f96f393 OPSTRANSPORT 2023-02-11 00:21:15 +01:00
Applevangelist
713a5b067f #PLAYERTASKCONTROLLER
* Added `AddAgentSet()`
2023-02-10 11:40:15 +01:00
Applevangelist
d6aa7ec17c #Net
* Initial Release
2023-02-10 10:45:23 +01:00
Applevangelist
2da2ddb5bb #DETECTION
* Docu fixes
2023-02-09 16:12:39 +01:00
Applevangelist
608033f38f #AICSAR
* Docu additions
2023-02-09 13:17:49 +01:00
Applevangelist
28c25816a6 #AICSAR
* Fixed issue with underlying OpsTransport
* Added FSM Transition OnAfterPilotUnloaded()
* Added options for SRS TTS output - no sound files
* Added voice options for downed pilot and operator - these can have different voices
2023-02-09 11:57:28 +01:00
Frank
709fccd96c OSPTRANSPORT 2023-02-09 01:06:36 +01:00
Frank
2c24e56aa5 Merge branch 'FF/MasterDevel' into FF/OpsDev 2023-02-08 16:35:49 +01:00
Frank
f104ddbe64 Merge branch 'FF/Ops' into FF/OpsDev 2023-02-08 16:15:22 +01:00
Frank
bbd8ceb8c0 Merge branch 'develop' into FF/Ops 2023-02-08 16:15:06 +01:00
Frank
b8498fa58f Merge branch 'FF/MasterDevel' into FF/OpsDev 2023-02-08 16:14:45 +01:00
Frank
34c26c44bc Merge branch 'develop' into FF/OpsDev 2023-02-07 22:53:19 +01:00
Applevangelist
c97f1791b0 Merge remote-tracking branch 'origin/master' into develop 2023-02-07 08:01:34 +01:00
Applevangelist
63b16e5bd4 Merge remote-tracking branch 'origin/master' into develop 2023-02-06 08:17:05 +01:00
dogjutsu
184f93168b MSRS_BACKEND_DCSGRPC bug fix (#1916)
* Add another DCS-gRPC example for MSRS docu (ATIS)

* Fixes MSRS_BACKEND_DCSGRPC bad _GetLatLongAlt call
2023-02-06 08:16:14 +01:00
Frank
0400f1a23e Merge branch 'FF/Ops' into FF/OpsDev 2023-02-05 00:23:42 +01:00
Frank
d3d60757c1 Merge branch 'develop' into FF/Ops 2023-02-05 00:23:25 +01:00
Frank
57079e5104 Merge branch 'master' into develop 2023-02-04 23:34:14 +01:00
Frank
6d967358da WEAPON v0.1.0
**WEAPON**
- Improments of class
- ARTY works
- FOX works
- RANGE should work, not tested.
2023-02-04 23:28:45 +01:00
Applevangelist
095121d83c Merge remote-tracking branch 'origin/develop' into develop 2023-02-04 21:51:39 +01:00
Applevangelist
a415b131c4 Merge remote-tracking branch 'origin/master' into develop 2023-02-04 21:51:35 +01:00
Thomas
54a1ea9f56 Scoring credits a kill to player who hit the same unit before it spawned (#1905) (#1907)
Co-authored-by: Mr.Alien <124381209+MrAlien753@users.noreply.github.com>
2023-02-04 21:50:17 +01:00
Applevangelist
23091ff851 #CTLD
* Added method `CTLD:PreloadCrates(Unit,Cratesname,NumberOfCrates)`
2023-02-04 17:21:52 +01:00
Applevangelist
5571b49b4f Merge remote-tracking branch 'origin/master' into develop 2023-02-04 17:16:10 +01:00
Frank
4b4708e2a8 Weapon 2023-02-02 23:50:00 +01:00
Applevangelist
789a4c4b7f Merge remote-tracking branch 'origin/develop' into develop 2023-02-02 09:47:29 +01:00
Applevangelist
3775053609 PLAYERRECCE - bug fix 2023-02-02 09:47:25 +01:00
Applevangelist
35da50b67a Merge remote-tracking branch 'origin/develop' into develop-2 2023-02-02 09:38:32 +01:00
Applevangelist
9be30338a5 Herc fix 2023-02-02 09:37:47 +01:00
Applevangelist
6510cca837 Merge remote-tracking branch 'origin/develop' into develop 2023-02-02 09:36:48 +01:00
Applevangelist
08b8dfbe0e Merge remote-tracking branch 'origin/master' into develop 2023-02-02 09:36:44 +01:00
Frank
9af242854a Weapon 2023-02-01 23:51:47 +01:00
Frank
bfe9a1888e Merge pull request #1899 from ttrebuchon/tt/airwing-sortpayloads-fix
Airwing sortpayloads criteria fix
2023-02-01 19:07:46 +01:00
ttrebuchon
fec496f154 Fix missing check for b.unlimited~=true in sortpayloads function. 2023-02-01 12:30:52 -05:00
Thomas
28fd35ad7e PlayerRecce - Added Shark_3 as type 2023-02-01 12:17:54 +01:00
Frank
c5deb09c2c WEAPON v0.0.1
- New class
2023-01-31 23:22:48 +01:00
Applevangelist
ee6d34a9bd #CTLD
* Added Subcategories for static cargo objects
2023-01-31 11:28:00 +01:00
Frank
6e6bb1e88d RANGE 2023-01-30 23:29:03 +01:00
Frank
0b3aea2bf3 Scenery 2023-01-30 21:52:22 +01:00
Applevangelist
f731ec7b2f #POINT
* Added COORDINATE:SetAtLandheight()
2023-01-30 18:01:04 +01:00
Applevangelist
5b8f840d6e Merge remote-tracking branch 'origin/master' into develop 2023-01-29 18:37:19 +01:00
Frank
694ad5d33d Merge branch 'develop' into FF/Ops 2023-01-29 12:57:09 +01:00
Frank
383ee00e71 Merge branch 'master' into develop 2023-01-29 12:54:13 +01:00
Frank
c279ab6311 Update Auftrag.lua 2023-01-29 12:19:04 +01:00
Frank
4cc1db1365 Update Auftrag.lua
- condition success and failure evaluation
2023-01-28 22:31:53 +01:00
Frank
f3d1378692 Merge branch 'master' into develop 2023-01-28 18:42:57 +01:00
Frank
cfb3004142 Merge pull request #1893 from FlightControl-Master/FF/Ops
OPS
2023-01-28 10:47:49 +01:00
Thomas
016643e494 Merge from. Master (#1892)
* #CSAR - Add Persistence (#1889)

* Adds a modified version of ops.CTLD's Persistence to ops.CSAR

* Update Marker.lua

* Changed documentation for Marker.lua and MarkerOps_Base.lua (#1891)

---------

Co-authored-by: Jason du Plessis <33880363+TheChosenOn3@users.noreply.github.com>
Co-authored-by: grandpaSam <wouldyukindly@gmail.com>
2023-01-28 09:05:23 +01:00
Thomas
5ec18d45a2 Merge (#1890)
* #CSAR - Add Persistence (#1889)

* Adds a modified version of ops.CTLD's Persistence to ops.CSAR

* Update Marker.lua

---------

Co-authored-by: Jason du Plessis <33880363+TheChosenOn3@users.noreply.github.com>
2023-01-27 18:36:38 +01:00
dogjutsu
f4c9bced45 Add another DCS-gRPC example for MSRS docu (ATIS) (#1883) 2023-01-26 11:25:01 +01:00
Applevangelist
e106ca3da5 * AIRBASE added airfields Falklands
* RANGE  added google key usage
2023-01-25 17:55:34 +01:00
Applevangelist
262c8ffc59 Merge remote-tracking branch 'origin/develop' into develop 2023-01-25 17:19:03 +01:00
Applevangelist
affde2f030 Merge remote-tracking branch 'origin/master' into develop 2023-01-25 17:18:59 +01:00
Thomas
a4982bd24e Update Utils.lua (#1886) (#1887) 2023-01-24 20:58:24 +01:00
Applevangelist
1099e8e876 #CTLD added documentation 2023-01-24 15:27:09 +01:00
Applevangelist
6a4356fa94 #1885
#PSEUDOATC - Menu shows Waypoint name if it has been set
2023-01-24 10:06:40 +01:00
Applevangelist
2ec8d94e38 #CONTROLLABLE
* Added CommandActivateACLS()
* Added CommandDeactivateACLS()
2023-01-23 17:12:01 +01:00
Applevangelist
24d47ef353 Merge remote-tracking branch 'origin/master' into develop 2023-01-22 13:11:13 +01:00
Frank
76ebf8df07 Merge branch 'develop' into FF/Ops 2023-01-21 22:43:11 +01:00
Frank
a4e52c6c3c Legion
- Added enroute task SEAD to escort
2023-01-21 22:42:57 +01:00
Applevangelist
285f8d102b #AUFTRAG
* Added checking of bespoke conditions within the status call of AUFTRAG and not only when AUFTRAG is done already
2023-01-21 15:39:44 +01:00
Frank
d0d21a6b5d Merge branch 'master' into develop 2023-01-19 19:11:09 +01:00
Applevangelist
ff58a47244 #FG - added nil check on GetClosestAirbase() 2023-01-19 17:01:59 +01:00
Applevangelist
6e666b0ac8 #UTILS - make LoadSetOfGroups save(r) for groups spawned with SpawnScheduled 2023-01-19 15:00:49 +01:00
Applevangelist
47684e8717 Merge remote-tracking branch 'origin/master' into develop 2023-01-19 10:35:02 +01:00
Applevangelist
0d0292385f #OPSGROUP - added docu 2023-01-19 10:33:26 +01:00
Applevangelist
83e20f8062 #Controllable - docu changes 2023-01-17 12:09:23 +01:00
Applevangelist
5943ae0a46 #ATIS docu fix 2023-01-17 09:25:58 +01:00
Applevangelist
56c4a11626 #CSAR
* Docu corrections
2023-01-15 17:39:28 +01:00
Applevangelist
f0f42df374 #CTLD - Adde Shark III typename 2023-01-12 13:20:44 +01:00
Applevangelist
5898bc7f07 #PLAYERTASK
* Even nicer MGRS readouts
2023-01-10 17:09:17 +01:00
Applevangelist
0d8b94c7fd #AIRBASE - docu fixes 2023-01-10 13:09:25 +01:00
Applevangelist
0fa4be7c4a #AWACS
* Fixed initial screen text on bogey dope just being x group(s)
#PLAYERTASK
* Improved logic to declare task succes even if not player is assigned
2023-01-10 12:45:17 +01:00
Applevangelist
a7bad8e9f4 #PSEUDOATC
* Fix for debug messages
2023-01-10 07:49:02 +01:00
Frank
40276d190a Merge pull request #1882 from FlightControl-Master/FF/Ops
OPSZONE
2023-01-09 23:12:49 +01:00
Frank
71ccd23953 Merge branch 'develop' into FF/Ops 2023-01-09 23:03:12 +01:00
Frank
4e68e33ec7 Update OpsZone.lua
- Remove marker
2023-01-09 23:03:01 +01:00
Applevangelist
79c8b31042 #GROUP
* Improve functionality of GetUnit(x)
* Added GetFirstUnit()
2023-01-09 17:08:48 +01:00
Frank
cee72c1d09 Merge branch 'master' into develop 2023-01-08 19:32:50 +01:00
Applevangelist
a7c8954740 Docu typo 2023-01-08 18:38:12 +01:00
Applevangelist
a21b9b382e Merge remote-tracking branch 'origin/develop' into develop 2023-01-08 18:09:26 +01:00
Applevangelist
ef0b76a632 #PLAYERTASK
* Added FSM events PlayerJoinedTask and PlayerAbortedTask
2023-01-08 18:09:22 +01:00
Mike
2806d3a191 Merge pull request #1880 from dogjutsu/dogjutsu/MSRS-gRPC-docs-cleanup
Doc fixes related to MSRS w/ DCS-gRPC alt backend
2023-01-08 16:41:38 +00:00
dogjutsu
9688c7ef01 Doc fixes related to MSRS w/ DCS-gRPC alt backend 2023-01-08 08:34:52 -08:00
dogjutsu
d6181d26f8 Add DCS-gRPC TTS altnerate backend for MSRS (#1879) 2023-01-08 08:37:11 +01:00
Frank
aa5e8662ed Merge pull request #1877 from FlightControl-Master/FF/Ops
OPSGROUP
2023-01-07 17:19:34 +01:00
Frank
ca11e724ab Merge branch 'develop' into FF/Ops 2023-01-07 17:12:04 +01:00
Frank
ab272da46e FLIGHTGROUP
- Increased dealy before Route to base to 1.0 sec. Previous delay of 0.1 sec was apparently too short for the stop flag to take effect and the task was not called done. Hence the mission was also not done.
2023-01-07 17:04:34 +01:00
Frank
584e932769 ARMYGROUP
- No retreat on out-of-ammo if rearming mission is in the queue
2023-01-07 10:53:46 +01:00
Applevangelist
691a500381 Merge remote-tracking branch 'origin/master' into develop 2023-01-05 11:00:06 +01:00
Applevangelist
21a2df0830 Merge remote-tracking branch 'origin/master' into develop 2023-01-05 10:49:13 +01:00
Thomas
4773a83a24 AWACS -correct error in SetAwacsDetails (#1873)
Corrected setting of Angels
2023-01-04 09:21:00 +01:00
Frank
09e9377e54 Merge pull request #1872 from FlightControl-Master/FF/Ops
OPS
2023-01-03 22:13:28 +01:00
Frank
19a90b7d9d Merge branch 'develop' into FF/Ops 2023-01-03 22:10:09 +01:00
Frank
dbaed1e97b OPS
**CHIEF**
- Fixed bugs of polygon opszones
- Added option to use CAPTUREZONE auftrag for opszones

**OPSZONE**
- Fixed bug when marker off

**ZONE_POLYGON_BASE**
- Added `GetRadius()` function

**LEGION**
- Improved Reinforcement
2023-01-03 22:09:56 +01:00
Applevangelist
9695789843 #FG
* make us AB the default
2023-01-03 10:33:51 +01:00
Applevangelist
75ddd2e1e0 Merge remote-tracking branch 'origin/master' into develop 2023-01-03 10:23:34 +01:00
Applevangelist
43c81afd12 Merge remote-tracking branch 'origin/master' into develop 2023-01-03 10:17:48 +01:00
Applevangelist
88a837b769 #FlightGroup
* Added options to allow afterburner, jettison of empty tanks and jettison of weapons
2023-01-03 10:15:35 +01:00
Applevangelist
55656761d2 #FIXES 2023-01-02 17:28:20 +01:00
Frank
92710f4625 Merge pull request #1866 from FlightControl-Master/FF/Ops
Zones
2023-01-02 12:08:37 +01:00
Frank
58dc353bcd ZONE 2023-01-02 11:54:05 +01:00
Frank
b194985827 Merge branch 'develop' into FF/Ops 2023-01-01 20:10:28 +01:00
Frank
bdd283956c AUFTRAG CAP
- Fixed mission speed (unit conversion)
2023-01-01 20:07:14 +01:00
Frank
a9b0017c04 OPS
request
2023-01-01 20:01:36 +01:00
Applevangelist
8f185d1291 #TIMER
* Added `StartIf()`
2023-01-01 12:34:32 +01:00
Frank
9564d9d893 Merge pull request #1861 from FlightControl-Master/FF/Ops
Update FlightGroup.lua
2023-01-01 09:30:15 +01:00
Frank
fe01c6196e Update FlightGroup.lua
- fixed bug that mission does not exist
2023-01-01 09:27:05 +01:00
Frank
c8d9377dbb Merge pull request #1860 from FlightControl-Master/FF/Ops
OPS
2023-01-01 01:08:59 +01:00
Frank
d53f01232d OPS 2023-01-01 01:06:02 +01:00
Applevangelist
e3f9a27f87 # FF changes from today 2022-12-31 18:07:35 +01:00
Applevangelist
e25b9155b4 Merge remote-tracking branch 'origin/develop' into develop 2022-12-31 18:02:35 +01:00
Applevangelist
b769568df1 #FG - let planes not limp around 2022-12-31 18:02:15 +01:00
Thomas
daa60ac501 Update Auftrag.lua 2022-12-31 18:01:28 +01:00
Applevangelist
0340d17ab8 #PLAYERTASKCONTROLLER
* honing the menu build a bit
2022-12-31 15:56:01 +01:00
Frank
c33f637717 Merge pull request #1859 from FlightControl-Master/FF/Ops
OPS
2022-12-31 12:42:02 +01:00
Frank
334af52ddf Merge branch 'develop' into FF/Ops 2022-12-31 12:35:59 +01:00
Frank
9a949c02c5 OPS
- Fixed bug task for recoverytanker mission
- Improved capturezone auftrag
2022-12-31 12:35:48 +01:00
Applevangelist
095c36b3ba #AWACS
* Block Helos from getting CAP assignments
2022-12-31 12:24:49 +01:00
Frank
ff7ebb4f92 Merge pull request #1858 from FlightControl-Master/FF/Ops
OPS Capture Zone
2022-12-30 22:30:57 +01:00
Frank
3834991e6a Merge branch 'develop' into FF/Ops 2022-12-30 22:08:41 +01:00
Frank
67af073b95 OPS
Capture
2022-12-30 22:08:27 +01:00
Applevangelist
5a44948050 #FLIGHTGROUP
* Make one is local
2022-12-30 17:40:10 +01:00
Frank
3011d625b2 OPS
Capture Zone
2022-12-30 02:44:16 +01:00
Applevangelist
d25efe2293 #ATIS
* Make SRS say TACAN and FARP and not spell the single characters
2022-12-29 16:34:11 +01:00
Applevangelist
8202791518 #AWACS
* Added option for helos to sign-in

#ATIS
* Make SRS say TACAN and FARP and not spell the single characters
2022-12-29 16:33:43 +01:00
Applevangelist
9871bf82d3 #UTILS
* Load/Save Improvements
2022-12-28 15:48:46 +01:00
Applevangelist
f9c1d62173 #ATIS
* FARP support
2022-12-25 14:20:25 +01:00
Applevangelist
89d854f5be #EVENT
* Small fix for hit event on coordinates
2022-12-24 12:04:08 +01:00
phr0gz
f1e0bacadb CAPGROUP (#1853)
Fix help typo
2022-12-23 13:44:38 +01:00
Applevangelist
1b0131bd9d Merge remote-tracking branch 'origin/master' into develop 2022-12-23 13:43:43 +01:00
Applevangelist
2f6cd20cbd Merge remote-tracking branch 'origin/master' into develop 2022-12-21 14:12:23 +01:00
Applevangelist
d66d99a24e #CTLD
* Added option to inject troops into helo cargo
2022-12-21 14:07:21 +01:00
Applevangelist
9e823f12c2 #SET_SCENERY
* Added GetAliveSet
2022-12-21 12:55:38 +01:00
Applevangelist
ef5ea01bc1 #TARGET
* Fixes for Scenery and Static Objects
2022-12-21 12:53:08 +01:00
Frank
30e6542887 OPS 2022-12-20 23:51:18 +01:00
Applevangelist
b501eec306 #AUFTRAG
* Fix Orbit w&w/o racetrack
2022-12-20 18:18:24 +01:00
Applevangelist
79e99dcb38 #PLAYERTASK
* Added `GetTarget()`
2022-12-20 16:05:50 +01:00
Applevangelist
f6eccba966 #SET_UNIT - docu fixes
#UNIT - Improved GetGroup() as after the Dec/22 patch getGroup() might be nil
2022-12-19 16:14:41 +01:00
Applevangelist
fa1f67420d #CTLD
* Fix to also save crates which have not been moved
2022-12-19 14:05:21 +01:00
Applevangelist
6e26e7eac3 #AUFTRAG
* Fix for orbit racetrack missing coordinate object
2022-12-19 13:08:35 +01:00
Applevangelist
0a04ff4f3c #AIRBASE
* Added Rio Chico
2022-12-16 18:45:21 +01:00
Applevangelist
99023a3053 #UTILS
* UTILS.LoadSetOfStatics(Path,Filename) ignore statics which do not exist
2022-12-15 18:29:46 +01:00
Applevangelist
a3fd583d9d #PLAYERTASK
* additions for multiple setups
2022-12-15 11:50:05 +01:00
Applevangelist
a6e7ea6590 #SET_CLIENT
* Added FilterCallsigns()
* Added FilterPlayernames()
2022-12-14 14:50:06 +01:00
Applevangelist
178e4ceb7f #PLAYERTASKCONTROLLER
* Added PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent,TaskFilter) TaskFilter switch
2022-12-14 11:42:12 +01:00
Applevangelist
e12455d154 #AI GCI DISPATCHER
* Fix demo mission link
2022-12-14 09:43:34 +01:00
Applevangelist
71d5983adf #AIRBASE
* docu typo
2022-12-12 16:25:07 +01:00
Applevangelist
696569f749 #PLAYERTASK
* Added typename combos as option for menu entries
2022-12-12 16:24:25 +01:00
Applevangelist
4892a58084 #SET
* improve GetRandom() a bit
2022-12-11 15:51:22 +01:00
Applevangelist
75d8d55691 #AWACS
* Skip Task Assignement Menus if PlayerCapAssignement is false
2022-12-11 15:50:36 +01:00
Applevangelist
614cfcd7f7 Merge remote-tracking branch 'origin/master' into develop 2022-12-09 12:38:02 +01:00
phr0gz
8eef039312 New CAP auftrag (#1850)
Add Ability to CAP escort Ground group or helo with a new auftrag: AUFTRAG:NewCAPGROUP
2022-12-08 13:15:07 +01:00
Applevangelist
f6a88db46b #CTLD Fix for Beacon Zone disappearing too fast 2022-12-07 18:58:56 +01:00
Applevangelist
9c5847153a Merge remote-tracking branch 'origin/develop' into develop 2022-12-07 18:58:11 +01:00
Applevangelist
cdfb47448f #AWACS
* Fix setting of CapVoices according to documentation
#PLAYERRECCE
* Speed up Marker Build
#PLAYERTASK
* Improve menu build
2022-12-07 18:58:07 +01:00
Frank
0adca414ce Merge branch 'develop' into FF/Ops 2022-12-07 18:36:04 +01:00
Frank
16bfbabf19 Merge branch 'master' into develop 2022-12-07 18:35:27 +01:00
Frank
539dfd6a38 OPS Operation
- Condition
- Armygroup
- Auftrag
- OPS
2022-12-07 18:32:50 +01:00
Applevangelist
525666be7c #PLAYERRECCE
* Smoke own position on ground, not mid-air
2022-12-06 18:05:41 +01:00
Applevangelist
386171bcab #PLAYERTASKCONTROLLER
* Make callout of MGRS coordinates slower
2022-12-06 12:50:08 +01:00
Applevangelist
55383575e0 #PLAYERTASKCONTROLLER
* Make callout of MGRS coordinates slower
2022-12-06 12:48:20 +01:00
Applevangelist
9659bfa553 #CTLD Fix for Beacon Zone disappearing too fast 2022-12-03 14:38:57 +01:00
Applevangelist
85504fbe62 Small Fixes 2022-12-03 14:36:28 +01:00
Applevangelist
de8dcc4024 Merge remote-tracking branch 'origin/master' into develop 2022-12-02 16:39:45 +01:00
Applevangelist
620c8eaa27 Merge remote-tracking branch 'origin/master' into develop 2022-12-01 13:29:20 +01:00
Frank
3f296554ed Merge branch 'develop' into FF/Ops 2022-11-30 18:37:51 +01:00
Frank
2a8d166c54 Merge branch 'master' into develop 2022-11-30 18:37:28 +01:00
Frank
6bc263bd2b CONDITON and OPERATION 2022-11-30 13:36:13 +01:00
Applevangelist
907d62c4e7 Merge remote-tracking branch 'origin/master' into develop 2022-11-29 17:54:15 +01:00
Applevangelist
6965d319ef #CTLD
* Fix for BEACON zones
2022-11-29 15:42:49 +01:00
Applevangelist
d674f55343 #PLAYERTASK
* Added Silent option for PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent)
2022-11-29 15:42:04 +01:00
Thomas
75bc95167f Update RAT.lua (#1849)
Fix #1848
2022-11-28 17:45:47 +01:00
Applevangelist
66bf32351a Merge remote-tracking branch 'origin/master' into develop 2022-11-27 17:35:42 +01:00
Applevangelist
fe9a5aea2a #AUFTRAG
* Fix for orbit task not able to get a Vec2 from a Vec2...
2022-11-23 12:57:54 +01:00
Applevangelist
b99d963cd5 #SPAWN
* Fix callsign dupplication of numbers introduced with 2.8
2022-11-23 09:56:37 +01:00
Frank
b8398af5a3 Merge branch 'master' into develop 2022-11-20 20:56:07 +01:00
Frank
10d8af2536 Merge branch 'master' into develop 2022-11-19 19:37:54 +01:00
Frank
e79941bb8b Merge pull request #1846 from FlightControl-Master/FF/Ops
OPS
2022-11-18 20:02:15 +01:00
Frank
4124b6d084 OPS
**LEGION**
- Added `Captured` event

**COMMANDER**
- Improved behaviour when legion/warehouse is captured
- Added `LegionLost` event
- Added `RemoveLegion` function

**CHIEF**
- Improved behaviour when legion/warehouse is captured
- Added `LegionLost` event
- Added `RemoveLegion` function
2022-11-18 19:56:30 +01:00
Applevangelist
ae9c258531 Merge remote-tracking branch 'origin/master' into develop 2022-11-18 11:29:45 +01:00
Applevangelist
df17a3d2a3 # TaskRecoveryTanker 2022-11-18 11:28:33 +01:00
Applevangelist
b47737bda3 #GROUP
* Added additional push of tanker task to GROUP:SetAsRecoveryTanker() for a working setup
2022-11-18 11:24:36 +01:00
Applevangelist
96bb475306 #GROUP/CONTROLLABLE
* Added RecoveryTanker Task
2022-11-18 09:59:43 +01:00
Applevangelist
7490796637 #AIRBASE
* Added enumerators for
-- * AIRBASE.SouthAtlantic.Puerto_Santa_Cruz
-- * AIRBASE.SouthAtlantic.Comandante_Luis_Piedrabuena
-- * AIRBASE.SouthAtlantic.Aerodromo_De_Tolhuin
-- * AIRBASE.SouthAtlantic.Porvenir_Airfield
-- * AIRBASE.SouthAtlantic.Almirante_Schroeders
-- * AIRBASE.SouthAtlantic.Rio_Turbio
2022-11-17 17:14:52 +01:00
Applevangelist
a9f2df83ff #CSAR
* Make rescued pilot's weight configureable
2022-11-17 13:55:42 +01:00
Applevangelist
50aca57112 #PLAYERTASK
* Extended use of marker ops:
-- Enable the function like so:
--          mycontroller:EnableMarkerOps("TASK")
-- Then as a player in a client slot, you can add a map marker on the F10 map. Next edit the text
-- in the marker to make it identifiable, e.g
--
-- TASK Name=Tanks Sochi, Text=Destroy tank group located near Sochi!
--
-- Where **TASK** is the tag that tells the controller this mark is a target location (must).
-- **Name=** ended by a comma **,** tells the controller the supposed menu entry name (optional). No extra spaces! End with a comma!
-- **Text=** tells the controller the supposed free text task description (optional, only taken if **Name=** is present first). No extra spaces!
function PLAYERTASKCONTROLLER:EnableMarkerOps(Tag)
2022-11-17 13:22:34 +01:00
Applevangelist
5011269586 #SPAWN
* Ensure we have a numbered table for InitRandomizeTemplate/Zone so math.random actually works
* Also, pre-shuffle tables
2022-11-16 11:17:19 +01:00
Frank
bd42032e3a Merge pull request #1844 from FlightControl-Master/FF/Ops
OPS
2022-11-16 10:44:00 +01:00
Frank
1256cc3bd1 OPS
**FLIGHTGROUP**
- Waypoint altitude for helos is not radar (AGL)
- Increased cruise speed thresholds for helos to 110 kts and 380 kts for fixed wing
2022-11-16 10:41:33 +01:00
Applevangelist
62122a15bc #MESSAGE
* Added ToCountry()
* Added country names in country.id enum
2022-11-16 09:42:36 +01:00
Applevangelist
f86db5f134 #PLAYERTASK
* Verbose to false
* Verbose add message for marker ops showing coordinate as per _SETTINGS
2022-11-15 17:56:29 +01:00
Thomas
2acb841539 Update PlayerTask.lua
Feature added #1841 `PLAYERTASKCONTROLLER:SetInfoShowsCoordinate(OnOff,LLDDM)`
2022-11-15 15:59:03 +01:00
Applevangelist
6724bb8edd # Bug fixes 2022-11-14 18:17:27 +01:00
Applevangelist
7b5b5e0bd2 #ATIS
* Honor Stop() function
2022-11-14 17:38:46 +01:00
Applevangelist
243ac3027f #PLAYERTASK
* Added a couple of QOL functions for internal INTEL object
2022-11-14 17:38:07 +01:00
Applevangelist
79a4af44d3 Merge remote-tracking branch 'origin/master' into develop 2022-11-13 13:51:59 +01:00
Applevangelist
180a0b39d1 Merge remote-tracking branch 'origin/develop' into develop 2022-11-13 13:38:13 +01:00
Applevangelist
2664c36a14 #CTLD
* Change call order to move troops, vehicle on `onafter..` internally
* added pseudo-function for "OnBefore..."
2022-11-13 13:37:55 +01:00
Rolln
911f4523a1 F10 Marker text fix (#1840) 2022-11-11 20:01:32 +01:00
Applevangelist
09b86d6fdf #OPSGROUP
* Fix for NewHover
2022-11-11 15:40:03 +01:00
Applevangelist
5ec8a4674c Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/DCS.lua
2022-11-11 11:42:30 +01:00
Applevangelist
2a567c9f74 Docu Headlines part II 2022-11-11 11:40:22 +01:00
Applevangelist
b9a7fc9409 #AUFTRAG
* Corrected speed setting in NewHover
2022-11-11 10:00:13 +01:00
Applevangelist
0db13b6cdf Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua
#	Moose Development/Moose/Functional/ZoneGoalCoalition.lua
2022-11-11 09:38:27 +01:00
Applevangelist
08c7409627 Docu Headlines 2022-11-11 09:22:48 +01:00
Applevangelist
c38cb046cd #AMMOTRUCK
* Added demo mission link
2022-11-10 17:53:29 +01:00
Applevangelist
037b168825 Merge remote-tracking branch 'origin/master' into develop 2022-11-10 17:33:52 +01:00
Applevangelist
41a928b775 #Docu fixes 2022-11-10 17:29:19 +01:00
Applevangelist
27598406d1 #AMMOTRUCK
* Initial Release
2022-11-10 17:11:29 +01:00
Applevangelist
a0ad5292b9 #AWACS
* SRS output for "ShowTask"
* Some minor bug fixing
2022-11-10 12:18:18 +01:00
Frank
a1a258f48e Merge pull request #1838 from FlightControl-Master/FF/Ops
OPS
2022-11-10 00:40:15 +01:00
Frank
4a0040a12f Merge branch 'develop' into FF/Ops 2022-11-10 00:36:14 +01:00
Frank
ab13b5f198 Update Intelligence.lua
- Added check for filter categories.
2022-11-10 00:36:02 +01:00
Applevangelist
788d2d49b9 Merge remote-tracking branch 'origin/master' into develop 2022-11-09 16:11:44 +01:00
Frank
6c342ef910 Merge pull request #1834 from FlightControl-Master/FF/Ops
OPS
2022-11-08 22:11:21 +01:00
Frank
a4b5362347 Update Cohort.lua
- Added functions to get and set attributes
- Added function to get category and properties
2022-11-08 22:01:44 +01:00
Frank
0e78be86e4 CHIEF
- Added resource.carrierProperties for LEGION.AssignAssetsForTransport
- Ensure table for carrier categories, attributes and properties
2022-11-08 20:29:51 +01:00
Applevangelist
e348bbc344 #AWACS
* Minor Enhancements
2022-11-08 17:24:32 +01:00
Applevangelist
bad17c39d1 * POINT/PLAYERTASK
* Added option to get BR/BRA with add'l magnetic heading
2022-11-08 15:43:46 +01:00
Applevangelist
8ed30da473 * POINT/PLAYERTASK
* Added option to get BR/BRA with add'l magnetic heading
2022-11-08 15:43:14 +01:00
Applevangelist
af1083d0f1 #MSRS
* Docu corrections
* Added `AddFrequencies()` and `AddModulations()`
2022-11-08 10:11:28 +01:00
Applevangelist
4fff842c90 #CTLD Fix Ship Zones 2022-11-07 19:14:09 +01:00
Applevangelist
7f81039f46 #CTLD - Added Bronco support 2022-11-07 18:21:36 +01:00
Applevangelist
b63be6dd28 #PLAYERTASK
* Fix #1826 CTLD/CSAR closing immediately
2022-11-07 17:39:11 +01:00
Applevangelist
565a5294e2 Merge remote-tracking branch 'origin/master' into develop 2022-11-07 16:09:00 +01:00
Frank
254d43fef1 AIRWING/WAREHOUSE
- Improved parking spot check if explicitly given for an airwing or squadron
- Improved parking check if airstart is requested.
2022-11-06 12:17:07 +01:00
Applevangelist
5819884c98 #SCORING
* Added option to switch AutoSave
2022-11-06 11:27:27 +01:00
Frank
cb43f9c392 CHIEF
- cleaned up resources
2022-11-05 23:48:42 +01:00
Applevangelist
ed677b7682 Merge remote-tracking branch 'origin/master' into develop 2022-11-05 14:04:06 +01:00
Frank
ead8411454 Merge pull request #1824 from FlightControl-Master/FF/Ops
OPS
2022-11-04 22:55:24 +01:00
Frank
1fc9f13919 Version 2022-11-04 22:36:20 +01:00
Frank
6bf077e0aa Merge branch 'develop' into FF/Ops 2022-11-04 19:47:52 +01:00
Applevangelist
0de8c0beb2 #INTEL
* Added `INTEL:GetHighestThreatContact(Cluster)`
2022-11-04 13:31:33 +01:00
Frank
39f690f2b4 OPS
- AUFTRAG: Orbit is now in KIAS
- CHIEF: fixes for resource
2022-11-03 22:46:10 +01:00
Frank
1a575d9364 Update OpsGroup.lua
- Improved mission ingreess on-off-road waypoint
2022-11-02 23:51:53 +01:00
Frank
fe58253a44 Update Chief.lua
added remove conflict zone
2022-11-02 23:30:19 +01:00
Frank
65cc72e28b Merge branch 'develop' into FF/Ops 2022-11-02 22:59:19 +01:00
Frank
00f8fccfae Update ArmyGroup.lua
- Improved updateroute waypoints
2022-11-02 22:57:05 +01:00
Applevangelist
1fea016ac1 Merge remote-tracking branch 'origin/master' into develop 2022-11-02 17:33:34 +01:00
Applevangelist
35057b9d05 Merge remote-tracking branch 'origin/develop' into develop 2022-11-02 17:32:20 +01:00
Applevangelist
b2fdcd5cf0 #CHIEF
* Fix to auto-create CAS/CAS-Enhanced Missions from detected targets; Added BAI mission option for TANKS as target
2022-11-02 17:32:12 +01:00
Thomas
2b3363de40 Documentation fixes. (#1820) (#1821)
* Documentation fixes.

* Update Airboss.lua

Escape links.

Co-authored-by: TommyC81 <tommyc81@gmail.com>
2022-11-02 11:24:59 +01:00
Frank
d031651b58 Fixes for OPSTRANSPOTRT formation 2022-11-01 23:35:18 +01:00
Applevangelist
8fb66ed329 #ZONE_POLYGON
* Scan for Scenery - changed scan strategy as box seems not to work properly all the time
2022-11-01 16:32:40 +01:00
Applevangelist
e841a38866 #CTLD
* added option for build time delay
2022-11-01 14:33:06 +01:00
Frank
addb7ba36a restore 2022-10-31 20:53:20 +01:00
Frank
d4b5e24364 ARMYGROUP
- Fixed opstransport not being readded to brigade
2022-10-31 20:50:35 +01:00
Applevangelist
dd32d2e53c #CTLD_HERCULES
* Fix for `CTLD_HERCULES:Cargo_Track(cargo, initiator)` when flying very low
2022-10-31 16:07:25 +01:00
Applevangelist
cc1e071e35 #EVENT
* Added events from 2.8.0
2022-10-31 15:44:29 +01:00
Frank
3f8efae23f Update Chief.lua
resources
2022-10-31 13:26:35 +01:00
Applevangelist
8ee8898a78 #AWACS
* Added airborne check for detected groups
2022-10-31 12:22:34 +01:00
Applevangelist
fc77df4b5d Merge remote-tracking branch 'origin/master' into develop 2022-10-31 10:26:45 +01:00
Applevangelist
13018ed96a Merge remote-tracking branch 'origin/master' into develop 2022-10-31 08:02:21 +01:00
Frank
236e7afcfc AUFTRAG
- New mission type ORBIT_GROUP
- Updated mission type RECOVERYTANKER
2022-10-30 14:10:55 +01:00
Thomas
946a1de931 Merge docu changes (#1818)
* Documentation fixes. (#1810)

Fix documentation references.
Correct spelling errors.
Remove empty whitespaces.
Correct a single mis-spelled ZONE_BASE variable, see 'Core/Zone.lua' (variable "Sureface" -> "Surface", no references to mis-spelled "Sureface" throughout the codebase).
Correct mis-spelling of "coaltion" in 'Functional/Mantis.lua', corrected to "coalition".

* Documentation fixes. (#1811)

Update documentation text and links.
Fix spelling errors.
Other minor adjustments where appropriate, such as remove whitespaces and format code.

* Documentation fixes. (#1815)

Minor documentation and code formatting fixes.
This is mostly intended to have something re-trigger the documentation generation to see if the filename capitalization is resolved.

* Code formatting preparation. (#1817)

Use EmmyLuaCodeStyle that comes with "Lua" VS Code extension (https://marketplace.visualstudio.com/items?itemName=sumneko.lua). More features and configurability than LuaFormatter, and no need for additional extension (beyond "Lua").
Formatting file set up from default template with some tweaks to correspond to most common coding style observed in the code base. Further tweaks are likely required.

* Documentation fixes. (#1816)

Co-authored-by: TommyC81 <tommyc81@gmail.com>
2022-10-29 10:49:18 +02:00
Frank
2840865b83 Up 2022-10-27 23:19:35 +02:00
Applevangelist
1411309204 Fixes 2022-10-21 15:15:51 +02:00
Applevangelist
60927e6728 Merge remote-tracking branch 'origin/master' into develop 2022-10-21 15:11:46 +02:00
Applevangelist
4b11a6a304 #OPS - typos 2022-10-21 15:09:35 +02:00
Applevangelist
37a00f25bc #OPERATION
* Added GetTargets()

#TARGET
* Also call Dead() when no targets left over

#PLAYERTASKCONTROLLER
* Added FSM events for Flaring, Smoking, and Illumination
* Added Illumination of targets in menu if it is night
* Rename menu parent setting to SetParentMenu(Menu)
2022-10-21 09:51:44 +02:00
Applevangelist
1fc541a9df Merge remote-tracking branch 'origin/master' into develop 2022-10-21 08:58:48 +02:00
Applevangelist
c3cd732254 #MANTIS
* Add systems from SMA mod
2022-10-20 11:40:57 +02:00
Applevangelist
8f7694111b #TARGET
* Docu additions
2022-10-19 19:13:55 +02:00
Applevangelist
2854a2d93e #TARGET
* Some QOL additions, docu, stuff for SCENERY
2022-10-19 17:26:40 +02:00
Applevangelist
78c209a96f #PLAYERTASKCONTROLLER
* No spaces in callsign numbers on pilot list in task info screen
2022-10-19 13:05:19 +02:00
Applevangelist
9809f08954 Merge remote-tracking branch 'origin/master' into develop 2022-10-19 12:46:17 +02:00
Applevangelist
4e671ce995 Merge remote-tracking branch 'origin/master' into develop 2022-10-19 12:28:26 +02:00
Rolln
b5fd737cea Playertaskcontroller parent menu (#1806)
* Ability to set parent menu of PlayerTaskController

* Updated Docmentation

* Update PlayerTask.lua

Co-authored-by: Thomas <72444570+Applevangelist@users.noreply.github.com>
2022-10-19 12:21:16 +02:00
Frank
6f82fd7eb6 Merge branch 'develop' into FF/Ops 2022-10-18 22:33:07 +02:00
Applevangelist
542fe20782 #CTLD
* added a check for zones; not added when zone does not exist
2022-10-18 17:26:24 +02:00
Applevangelist
92591432d3 #CSAR
* Added use of custom callsigns
* Added cargo weight for rescued pilots
* Improved o'clock calculation

#CTLD
* Docu additions
2022-10-18 17:01:32 +02:00
Applevangelist
a20cdac9c3 #CSAR
* Added use of custom callsigns
* Added cargo weight for rescued pilots
* Improved o'clock calculation

#CTLD
* Docu additions
2022-10-18 17:00:56 +02:00
Applevangelist
23f45359f8 #PLAYERTASK - show freetext briefing also if not using SRS 2022-10-18 13:32:18 +02:00
Applevangelist
0bc09548cf #PLAYERRECCE - add picture 2022-10-18 10:27:25 +02:00
Applevangelist
ee30ab48ae #SET_SCENERY
* additions
2022-10-17 18:07:55 +02:00
Applevangelist
3028a384a4 #TARGET
* Added SET_SCENERY
2022-10-17 18:07:04 +02:00
Thomas
f17db43501 CTLD - No radius check (#1800) (#1801)
Get rid of radius check in IsUnitInZone()
2022-10-17 12:44:27 +02:00
Applevangelist
7dd46ec24f #PLAYERTASKCONTROLLER
* Show Freetext as Briefing in all tasks when available
* TARGET - added Average coordinate option from GROUP
2022-10-16 13:47:52 +02:00
Applevangelist
cefb5d98f0 #GROUP
* Added function to obtain *average* Vec3 of the GROUP
* Added function to obtain *average* Coordinate of the GROUP

#TARGET
* Make use of new coordinate function in GROUP
2022-10-16 13:38:54 +02:00
Thomas
e750a99636 Update PlayerRecce.lua
Event Handler simplification
2022-10-16 09:30:55 +02:00
Applevangelist
798684e300 #Docu additions 2022-10-14 16:51:59 +02:00
Applevangelist
7c004ee37c #docu 2022-10-14 16:50:16 +02:00
Applevangelist
0a4bc23fb8 #PLAYERRECCE
* Added switchable smoking of own position
* Changed smoking - now laser target single, other targets as combined coordinate
* Added battle field illumination
* Added support for the KA-50. Note - camera is seen as "always on". For lasing, target needs to be head-on 12 o'clock
2022-10-14 16:19:53 +02:00
Applevangelist
13a5146010 #PLAYERRECCE
* Added switchable smoking of own position
* Changed smoking - now laser target single, other targets as combined coordinate
* Added battle field illumination
* Added support for the KA-50. Note - camera is seen as "always on". For lasing, target needs to be head-on 12 o'clock
2022-10-14 16:19:21 +02:00
Frank
55fe3630c5 Update FlightGroup.lua
- Fixed bug that function `:GetAirWing` was renamed to `:GetAirwing()`
2022-10-13 23:11:09 +02:00
Applevangelist
265196398a #PLAYERTASK - CSAR, CTLD integration 2022-10-13 17:45:33 +02:00
Applevangelist
141d00e160 Merge remote-tracking branch 'origin/master' into develop 2022-10-13 17:44:04 +02:00
Applevangelist
5c8d90f50e #SCENERY
* Improvements
2022-10-13 12:54:10 +02:00
Applevangelist
351a2463a2 #SCENERY - Improvements 2022-10-13 10:49:58 +02:00
Applevangelist
f604f0f913 Merge remote-tracking branch 'origin/master' into develop 2022-10-12 16:22:37 +02:00
Applevangelist
7afe76212d #CTLD
* Added connection to PlayerTask/Controller
#PLAYERTASK
* Added helper functions
2022-10-12 12:36:33 +02:00
Applevangelist
a777b40613 #PLAYERTASKCONTROLLER
* Initial additions for CTLD tasks
2022-10-12 10:14:40 +02:00
Applevangelist
11ef7c6a00 #STATIC
* Added GetLife() GetLife0()
#TARGET
* Added usesage of Life functions to TARGET
2022-10-12 09:36:42 +02:00
Applevangelist
b5bc881d52 Merge remote-tracking branch 'origin/master' into develop 2022-10-10 17:44:55 +02:00
Applevangelist
66d5ba9981 #Core.Point
* Cleanup GetClosestAirbase()
2022-10-10 17:44:20 +02:00
Applevangelist
eecef9a0aa #PLAYERRECCE
* minor enhancements
2022-10-09 12:56:54 +02:00
Applevangelist
7e6aa20168 #PLAYERRECCE
* Minor Enhancement
2022-10-09 12:56:00 +02:00
Applevangelist
69a80a6c38 #PLAYERRECCE
* Added setting of laser distance as camera sight calc is a non-starter
* Added specific laser zone of 20m x length to catch targets to lase
* Reworked detection of hit on lased target
2022-10-07 14:33:38 +02:00
Applevangelist
d63ab1138c #PLAYERTASKCONTROLLER
* Enable PLAYERTASKCONTROLLER:EnableBuddyLasing(Recce) - buddy lasing precision bombing tasks with a PLAYERRECCE connection
2022-10-06 17:05:16 +02:00
Applevangelist
f790c4fb9e #PLAYERRECCE
* Gazelle optics refinement
* Added Shack FSM event
2022-10-06 13:29:58 +02:00
Applevangelist
40427c75b9 #FlightGroup dual naming in functions 2022-10-06 13:28:19 +02:00
Applevangelist
e18a5e4832 #PLAYERTASKCONTROLLER
* Switch comms on opening task
2022-10-06 08:15:39 +02:00
Applevangelist
4d2a58e428 Fixes 2022-10-06 08:07:37 +02:00
Applevangelist
005d6d2b06 Merge remote-tracking branch 'origin/master' into develop 2022-10-06 08:03:07 +02:00
Thomas
7ada57033a Update PlayerRecce.lua (#1796)
* Update PlayerRecce.lua

* Update PlayerRecce.lua
2022-10-06 07:25:24 +02:00
Applevangelist
1a332ae6ab Merge remote-tracking branch 'origin/master' into develop 2022-10-05 07:33:46 +02:00
Frank
064e082a12 Airwing
- Added `:IncreasePayloadAmount` function
2022-10-03 19:12:19 +02:00
Frank
10eec8a47b Update FlightGroup.lua
- Added `GetSquadronName` and `GetAirwingName` functions
2022-10-03 16:32:55 +02:00
Frank
db469d1b84 Merge branch 'develop' into FF/Ops 2022-10-02 22:10:52 +02:00
Frank
1e04aaa77d Update Airboss.lua
- reenabled ai handling
2022-10-02 19:45:48 +02:00
Applevangelist
e97753125d Merge remote-tracking branch 'origin/master' into develop 2022-10-02 19:35:15 +02:00
Applevangelist
1474ff9b88 Merge remote-tracking branch 'origin/develop' into develop 2022-10-02 19:34:09 +02:00
Applevangelist
39bb95f127 #PLAYERRECCE
-- DONE: Sort for multiple targets in one direction
-- DONE: Targets with forget timeout, also report
2022-10-02 19:34:04 +02:00
Frank
42baf6c8d2 AIRBOSS v1.3.0
- Added Invincible parameters from master branch
- Increased version number
2022-10-02 19:13:51 +02:00
Frank
73b9552b5c Merge branch 'master' into develop 2022-10-02 16:55:47 +02:00
Frank
60cf7506f8 Update Airboss.lua
- Added `landingdist` as carrier parameter and into LSO result
- Case III does not check groove time for unicorns
2022-10-02 16:10:14 +02:00
Applevangelist
894062c757 #POINT
* Added COORDINATE:ToStringFromRPShort
2022-10-02 13:16:56 +02:00
Applevangelist
165a5d7364 #PLAYERRECCE
* Message improvements
* Laser Distance 8km
* Option to set RP Reference Point
2022-10-02 13:16:00 +02:00
Applevangelist
405e66ea72 #PLAYERTASK
* SRS transmit option only when players are on
2022-10-01 16:36:29 +02:00
Applevangelist
a42ff85406 #PLAYERRECCE
* Integrated SRS
* Integrated PLAYERTASKCONTROLLER (optional), can upload target data from Recce
2022-10-01 16:03:05 +02:00
Applevangelist
2eba68b35c #ATIS, MSRSQUEUE
* Added option to only transmit via SRS if there are active Players
2022-10-01 11:58:28 +02:00
Frank
efe7673c4c Merge branch 'develop' into FF/Ops 2022-09-30 19:34:23 +02:00
Applevangelist
ca92d7d569 #PLAYERRECCE
* Some nicefications
2022-09-30 19:07:12 +02:00
Applevangelist
0ee2baadce #AWACS
* Make Markers and Drawings strictly coalition specific
2022-09-30 19:03:26 +02:00
Applevangelist
43856341e6 #PLAYERRECCE
* Initial Release
2022-09-30 18:49:08 +02:00
Applevangelist
61aed403d9 #SET
* Added code to`SET:IsInSet(Object)` to be functional
2022-09-30 14:48:35 +02:00
Applevangelist
a8a92c00fe #AUTOLASE
* Don't forget min threatlevel 0 on unit targets
2022-09-30 14:41:38 +02:00
Applevangelist
84c41aa554 Merge remote-tracking branch 'origin/master' into develop 2022-09-29 16:45:29 +02:00
Applevangelist
de415384f3 #PLAYERTASK - a target can only be smoked again after 5 mins (that's how long smoke lasts)
#PLAYERTASKCONTROLLER - added option to hide smoke&flare menus
2022-09-28 13:07:37 +02:00
Applevangelist
8a9ee747c1 #ZONE_CAPTURE_COALITION - allow zone to be a ZONE_POLYGON
#1789
2022-09-28 11:51:22 +02:00
Applevangelist
2eeb918c8a #ATIS
* Fixed SetILS report not working
* Use new AIRBASE additions to set takeoff/landing runway
* Fixed Visibility is reported twice
* Added SetReportmBar() to report for mBar/hpa QNH/QFE even if not metric
* Added option to output additional freetext information when using SRS SetAdditionalInformation()

#1792
2022-09-27 11:17:04 +02:00
Applevangelist
72aa596317 #1790 Fix for error in GetCustomCallsign if the player name contains a |-sign but no string at the end or just numbers 2022-09-27 09:31:08 +02:00
Frank
6de3a45a51 CHIEF
**CHIEF** v0.5.0
- Added `CHIEF:AddTransportToResource` function

**OPSZONE**
- Added `Undraw` option

**UTILS**
- Added `UTILS.EnsureTable` function
2022-09-26 19:00:26 +02:00
Applevangelist
28a826b35d #CSAR
* Added mycsar.ADFRadioPwr = 1000 for ADF beacon radio sending power
2022-09-26 17:03:08 +02:00
Applevangelist
41813dcc53 #AWACS - corrected aggressive 2022-09-25 15:04:39 +02:00
Applevangelist
6290409e54 #ATIS - added google option
#SRS - corrected enumerator
2022-09-25 14:42:51 +02:00
Applevangelist
25033f4f6b #FlightControl - Option to set Google key once on New() 2022-09-25 14:40:17 +02:00
Applevangelist
b8fae00c1e #MSRS - put "" around frequencies and modulations 2022-09-25 14:16:19 +02:00
Applevangelist
6d4e4e2f69 #AWACS - give full radio freq in info 2022-09-25 14:12:46 +02:00
Applevangelist
1cde688fbb #RANGE
* Added 2 more SRS outputs
2022-09-24 10:11:23 +02:00
Applevangelist
e3493fbe3e #CSAR
* Added option to change top menu name
2022-09-23 10:29:41 +02:00
Applevangelist
1b691a3dd7 #FOX
* Typo in Event function fixed
2022-09-23 10:00:09 +02:00
Applevangelist
3022dce26e #CTLD
* check on loadable mass when loading troops added
2022-09-22 17:32:43 +02:00
Applevangelist
9780a65f09 #AIRBOSS, #UTILS
* Alitude to Altitude
* Deck height Nimitz class to 18.30m
2022-09-22 15:51:28 +02:00
Applevangelist
34dd864c8b #SPAWN
* Fix for InitCleanup()
2022-09-22 10:58:50 +02:00
Applevangelist
9b16519a7e #ATIS
* Added MSRSQueue to avoid overlapping speech
2022-09-20 17:18:00 +02:00
Applevangelist
76321343c2 #AIRBASE, ATIS
* less noise in log

#SRS
* Added enumerator for voices MSRS.Voices.Microsoft... and MSRS.Voices.Google...

#RANGE
* Added SRS support, some bug fixing
2022-09-20 15:53:09 +02:00
Applevangelist
0159ce5b1d Merge remote-tracking branch 'origin/master' into develop 2022-09-20 10:27:06 +02:00
Applevangelist
5abec25c58 #UTILS
* Fix for loading back set of groups. Thanks to @BlueEcko!
2022-09-20 08:24:50 +02:00
Applevangelist
d9de1e866f Merge remote-tracking branch 'origin/master' into develop 2022-09-19 18:26:56 +02:00
Applevangelist
1ae8e7d55e Merge remote-tracking branch 'origin/master' into develop 2022-09-19 13:22:18 +02:00
Applevangelist
67dc4521e9 Merge remote-tracking branch 'origin/master' into develop 2022-09-19 11:44:59 +02:00
Applevangelist
852ebba530 #AUTOLASE
* also show A2G BR Settings
2022-09-19 11:42:50 +02:00
jojom4n
79669d9a69 Make AWACS SRS talk as own coalition; Typo (#1784)
* Make AWACS SRS talk as own coalition

Set MSRS coalition to make AWACS talk only to its coalition, not to spectators

* Typo

SetModernEraAgressive() function should be SetModernEraAggressive() (two 'g')
2022-09-18 19:04:40 +02:00
Applevangelist
11d37bcb93 #CSAR
- triple try to get coordinate for beacon
2022-09-15 19:54:36 +02:00
Applevangelist
c95d5dc320 #PLAYERTASK
* coord text fix
2022-09-15 19:50:45 +02:00
Applevangelist
92044c7797 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 14:02:09 +02:00
Applevangelist
7084d9e084 #OPSGROUP
* Allow for customized CallSigns

#PLAYERTASK
* SRS output finetuning
2022-09-15 13:59:16 +02:00
Applevangelist
af96e2f143 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 13:52:20 +02:00
Applevangelist
f7560714e7 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 08:18:19 +02:00
Applevangelist
785c5e66ec bump number 2022-09-14 18:07:53 +02:00
Applevangelist
f281e5aa95 #AWACS
* Align CallSign Generation
2022-09-14 18:06:36 +02:00
Applevangelist
55f0f5271d #PLAYERTASKCONTROLLER
* Clean up menu builds
2022-09-13 17:19:44 +02:00
Applevangelist
b60d3a771d Merge remote-tracking branch 'origin/master' into develop 2022-09-13 10:55:57 +02:00
Applevangelist
d2132b2e64 #PLAYERTASKCONTROLLER
* Align creation of (player) callsigns with what is used in AWACS
2022-09-13 10:11:10 +02:00
Applevangelist
95494c0d03 Merge remote-tracking branch 'origin/master' into develop 2022-09-12 17:34:21 +02:00
Applevangelist
76a8286c04 Merge remote-tracking branch 'origin/master' into develop 2022-09-12 17:29:47 +02:00
Applevangelist
eca8d6dd8d #AWACS
* Fixed AWACS custom callsigns not observed
2022-09-11 18:21:58 +02:00
Applevangelist
e6ae034f7e Merge remote-tracking branch 'origin/develop' into develop 2022-09-11 14:22:52 +02:00
Applevangelist
236b4efb9b #PLAYERTASKCONTROLLER
* Various fixes and improvements
2022-09-11 14:22:47 +02:00
Frank
4b4c9ba959 Merge branch 'master' into develop 2022-09-11 13:38:40 +02:00
Applevangelist
6bf05741a9 Merge remote-tracking branch 'origin/master' into develop 2022-09-10 15:16:47 +02:00
Applevangelist
5d1998accb #CONTROLLABLE
*Foreign class definiton removed
2022-09-10 15:14:41 +02:00
Applevangelist
3aa9ffc241 #MODULES
* ordered list
2022-09-10 12:54:37 +02:00
Applevangelist
8ab5575e0a Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2022-09-10 12:19:23 +02:00
Applevangelist
3980b8a9c8 Merge remote-tracking branch 'origin/master' into develop 2022-09-10 11:34:56 +02:00
Thomas
27550d7ec9 Merge changes from master into dev for GROUP (#1781)
* #GROUP
* changes from Dev
#UNIT
* changes from Dev

* #GROUP
Fix GetSpeedMax() always returns zero
2022-09-09 17:50:18 +02:00
Thomas
35513e1e21 #GROUP (#1779)
* changes from Dev
#UNIT
* changes from Dev
2022-09-08 16:10:38 +02:00
Applevangelist
15496aed44 Merge remote-tracking branch 'origin/Apple/Develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Autolase.lua
2022-09-08 11:58:29 +02:00
Applevangelist
27408c191d #AUTOLASE
* Added option for blacklist atttributes
* Added higher priority for radar units
* Removed the "#001-01" appendix of spawned Recce on messages
2022-09-08 11:55:29 +02:00
Applevangelist
4b6c6717ad #Autolase
* SetMinThreatLevel
2022-09-08 09:11:26 +02:00
Applevangelist
c0bc3d8061 Merge remote-tracking branch 'origin/develop' into develop 2022-09-08 08:45:16 +02:00
Thomas
fe5f252bc9 Update Autolase.lua (#1778) 2022-09-07 15:22:00 +02:00
Applevangelist
e25af085fc Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
#	Moose Development/Moose/AI/AI_A2G_Dispatcher.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
#	Moose Development/Moose/Core/Base.lua
#	Moose Development/Moose/Core/Beacon.lua
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Core/Fsm.lua
#	Moose Development/Moose/Core/MarkerOps_Base.lua
#	Moose Development/Moose/Core/Menu.lua
#	Moose Development/Moose/Core/Message.lua
#	Moose Development/Moose/Core/Point.lua
#	Moose Development/Moose/Core/ScheduleDispatcher.lua
#	Moose Development/Moose/Core/Scheduler.lua
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Core/Spawn.lua
#	Moose Development/Moose/Core/Zone.lua
#	Moose Development/Moose/DCS.lua
#	Moose Development/Moose/Functional/Detection.lua
#	Moose Development/Moose/Functional/Mantis.lua
#	Moose Development/Moose/Functional/Range.lua
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Development/Moose/Functional/Sead.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/ATIS.lua
#	Moose Development/Moose/Ops/Airboss.lua
#	Moose Development/Moose/Sound/UserSound.lua
#	Moose Development/Moose/Utilities/Enums.lua
#	Moose Development/Moose/Utilities/FiFo.lua
#	Moose Development/Moose/Utilities/Profiler.lua
#	Moose Development/Moose/Utilities/Routines.lua
#	Moose Development/Moose/Utilities/STTS.lua
#	Moose Development/Moose/Utilities/Utils.lua
#	Moose Development/Moose/Wrapper/Airbase.lua
#	Moose Development/Moose/Wrapper/Controllable.lua
#	Moose Development/Moose/Wrapper/Group.lua
#	Moose Development/Moose/Wrapper/Marker.lua
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
#	Moose Setup/Moose.files
2022-09-06 13:51:59 +02:00
Applevangelist
400da676fa UTILS 2022-09-06 10:48:37 +02:00
Applevangelist
bf9f02e53a DATABASE 2022-09-06 10:47:33 +02:00
Applevangelist
a437da76ec Merge remote-tracking branch 'origin/Apple/Develop' into develop
# Conflicts:
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Utilities/Profiler.lua
2022-09-06 10:43:48 +02:00
Applevangelist
8cceee49ea Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
#	Moose Development/Moose/AI/AI_A2G_Dispatcher.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
#	Moose Development/Moose/Core/Base.lua
#	Moose Development/Moose/Core/Beacon.lua
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Core/Fsm.lua
#	Moose Development/Moose/Core/MarkerOps_Base.lua
#	Moose Development/Moose/Core/Menu.lua
#	Moose Development/Moose/Core/Message.lua
#	Moose Development/Moose/Core/Point.lua
#	Moose Development/Moose/Core/ScheduleDispatcher.lua
#	Moose Development/Moose/Core/Scheduler.lua
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Core/Spawn.lua
#	Moose Development/Moose/Core/Zone.lua
#	Moose Development/Moose/DCS.lua
#	Moose Development/Moose/Functional/Detection.lua
#	Moose Development/Moose/Functional/Mantis.lua
#	Moose Development/Moose/Functional/Range.lua
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Development/Moose/Functional/Sead.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/ATIS.lua
#	Moose Development/Moose/Ops/Airboss.lua
#	Moose Development/Moose/Sound/UserSound.lua
#	Moose Development/Moose/Utilities/Enums.lua
#	Moose Development/Moose/Utilities/FiFo.lua
#	Moose Development/Moose/Utilities/Profiler.lua
#	Moose Development/Moose/Utilities/Routines.lua
#	Moose Development/Moose/Utilities/STTS.lua
#	Moose Development/Moose/Utilities/Utils.lua
#	Moose Development/Moose/Wrapper/Airbase.lua
#	Moose Development/Moose/Wrapper/Controllable.lua
#	Moose Development/Moose/Wrapper/Group.lua
#	Moose Development/Moose/Wrapper/Marker.lua
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
#	Moose Setup/Moose.files
2022-09-06 10:27:28 +02:00
Applevangelist
34ff03936a Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
#	Moose Development/Moose/AI/AI_A2G_Dispatcher.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
#	Moose Development/Moose/Core/Base.lua
#	Moose Development/Moose/Core/Beacon.lua
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Core/Fsm.lua
#	Moose Development/Moose/Core/MarkerOps_Base.lua
#	Moose Development/Moose/Core/Menu.lua
#	Moose Development/Moose/Core/Message.lua
#	Moose Development/Moose/Core/Point.lua
#	Moose Development/Moose/Core/ScheduleDispatcher.lua
#	Moose Development/Moose/Core/Scheduler.lua
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Core/Spawn.lua
#	Moose Development/Moose/Core/Zone.lua
#	Moose Development/Moose/DCS.lua
#	Moose Development/Moose/Functional/Detection.lua
#	Moose Development/Moose/Functional/Mantis.lua
#	Moose Development/Moose/Functional/Range.lua
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Development/Moose/Functional/Sead.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/ATIS.lua
#	Moose Development/Moose/Ops/Airboss.lua
#	Moose Development/Moose/Sound/UserSound.lua
#	Moose Development/Moose/Utilities/Enums.lua
#	Moose Development/Moose/Utilities/FiFo.lua
#	Moose Development/Moose/Utilities/Profiler.lua
#	Moose Development/Moose/Utilities/Routines.lua
#	Moose Development/Moose/Utilities/STTS.lua
#	Moose Development/Moose/Utilities/Utils.lua
#	Moose Development/Moose/Wrapper/Airbase.lua
#	Moose Development/Moose/Wrapper/Controllable.lua
#	Moose Development/Moose/Wrapper/Group.lua
#	Moose Development/Moose/Wrapper/Marker.lua
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
#	Moose Setup/Moose.files
2022-09-06 09:53:22 +02:00
Thomas
bf3ee93c23 Update PlayerTask.lua (#1777) 2022-09-05 06:14:58 +02:00
Frank
a3260b4ce3 Merge pull request #1776 from FlightControl-Master/FF/Ops
OPS
2022-09-04 21:04:59 +02:00
Frank
ea8cf7b62a OPS
**OPSZONE**
- Added `:SetTimeCapture()` function to set time interval until a zone is captured.

**FLIGHTCONTROL**
- Added coalition to tower and pilot msrs.
2022-09-04 21:01:32 +02:00
Applevangelist
7168681918 #PLAYERTASKCONTROLLER
* Delay auto-start between 5 to 10 secs

#ATIS
* Add label to SRS
2022-09-04 14:48:06 +02:00
Applevangelist
233291b30c #AWACS
* added option for AWACS to send messages on multiple frequencies
2022-09-04 12:19:06 +02:00
Applevangelist
e53ff167ee #PLAYERTASKCONTROLLER
* Menu build changed slightly to delayed
2022-09-03 16:28:32 +02:00
dogjutsu
df54d09494 Fix usage example comment for ZONE_BASE:GetProperty() (#1775)
* Fixed some typos of forms of the word 'strategy'.

* Fix ZONE_BASE:GetProperty() usage example comment

Co-authored-by: dogjutsu <dogjutsu@mattjay.net>
2022-09-02 18:28:18 +02:00
Applevangelist
4aa3edc508 Errors
added docu
2022-09-02 17:01:39 +02:00
Applevangelist
4ea1b93f8d #PLAYERTASKCONTROLLER
* All map markers to be deleteable
2022-09-02 16:32:29 +02:00
Applevangelist
361ca2cece #MARKEROPS
* Added option to enforce case sensitive matches on Tagname

#PLAYERTASKCONTROLLER
* Text tweaking
* Fixed "mark on map" not showing subtitles
* Revamped menu build to have less rebuilds
* Added option to show additional info menu for tasks before joining
2022-09-02 13:12:52 +02:00
dogjutsu
fa0d076a09 Dogjutsu/develop/feature/zone properties (#1774)
* Fixed some typos of forms of the word 'strategy'.

* Retrieve Zone 'properties' with ZONE_BASE.

* Extraneous comment cleanup.

Co-authored-by: dogjutsu <dogjutsu@mattjay.net>
2022-09-02 06:19:50 +02:00
Frank
da5a1e0945 Merge pull request #1773 from FlightControl-Master/FF/Ops
Update Socket.lua
2022-09-01 23:50:04 +02:00
Frank
6d187f0d9a Update Socket.lua 2022-09-01 23:44:45 +02:00
Frank
85eca4c464 Merge pull request #1772 from FlightControl-Master/FF/Ops
SOCKET
2022-09-01 22:44:43 +02:00
Frank
1efbce7661 Update Airboss.lua
- Removed output
2022-09-01 22:37:31 +02:00
Frank
edf69d1ef1 Removed
Removed MOOSE_INCLUDE subdirectory
2022-09-01 22:34:48 +02:00
Frank
375e7db449 Merge branch 'develop' into FF/Ops 2022-09-01 22:31:52 +02:00
Frank
ac71e38d96 FunkMan
**RANGE**
- Changed keyword in result tables to "command" for compatibility with DCSServerBot

**AIRBOSS**
- Changed keyword in result tables to "command" for compatibility with DCSServerBot
- Fix bug in Alt and AoA data round function when creating trapsheet data

**SOCKET**
- Changed for compatibility with DCSServerBot
2022-09-01 22:27:25 +02:00
Applevangelist
ae5fd91cd4 #PLAYERTASK
* Fix to avoid double failed messages
2022-09-01 15:50:35 +02:00
Applevangelist
14e8b2ef17 #PLAYERTASK
* Added logging Errors and Documentation for trying to set zones before set up of detection
2022-09-01 09:22:18 +02:00
Applevangelist
5bacea8b50 UNIT - added optical tracker to HasSEAD() 2022-09-01 08:36:21 +02:00
Applevangelist
15dff87200 #GROUP
* Added Optical Tracker to ID SAMs, corrected logic error in ID'ing SAMs

#PLAYERTASKCONTROLLER
* Added documentation in MarkerOps
* Corrected Cluster radius to be in KM
* Corrected set up of SEAD attribute table to work
2022-09-01 08:07:40 +02:00
Applevangelist
ae45c77523 UTILS - added NDB 305kHz in frequency generator 2022-08-31 18:10:57 +02:00
Applevangelist
7c834993f6 Slight change of attack order 2022-08-31 17:40:15 +02:00
Applevangelist
5f5749ac8f bugfix 2022-08-31 17:32:41 +02:00
Thomas
c99a7b6666 PlayerTaskController - SEAD attributes configure (#1769)
Making SEAD attributes for the task decision tree configure-able. Added ` PLAYERTASKCONTROLLER:SetSEADAttributes(Attributes)`
2022-08-31 16:57:20 +02:00
Applevangelist
b4e2d3edfe #ZONE
* Added `ZONE_RADIUS:GetRandomCoordinateWithoutBuildings(...)`

#MARKEROPS
* Some documentation improvement

#PLAYTASKCONTROLLER
* Added `PLAYERTASKCONTROLLER:EnableMarkerOps(Tag)`

#OPSGROUP
* Changed offset to 2m for lasing ground units

*AUFTRAG
* Documentation correction `NewARMOREDGUARD`
2022-08-30 14:29:41 +02:00
Frank
8f9308f349 Update Airboss.lua 2022-08-29 23:10:12 +02:00
Frank
fc48473e40 Merge branch 'develop' into FF/Ops 2022-08-29 00:37:34 +02:00
Frank
71317db4cb FunkMan
**SOCKET**
- Changed port to 10042.
- Removed port as optional parameter in functions.

**AIRBOSS**
- Added FunkMan function
- Added onAfterLSOGrade which sends results table to socket

**RANGE**
- Compat to FunkMan.
2022-08-29 00:37:21 +02:00
Applevangelist
23815429e2 #PLAYERTASK
* remove two filters for task state where they do not belong
2022-08-27 18:26:04 +02:00
Applevangelist
b468134432 #PLAYERTASK
* Remove filtering for task state preventing further players to join
2022-08-27 16:05:47 +02:00
Applevangelist
3e38db16f6 #PLAYERTASK
* Added option to use ArmyGroup as lasing unit
* Added TTS output to task info report for PRECISIONBOMBING to tell if unit is in reach and is lasing
2022-08-26 18:46:07 +02:00
Applevangelist
bf591cc01e #RANGE
* Minor updates

#AWACS
* Added localisation
2022-08-26 14:23:55 +02:00
Applevangelist
3178cbc563 #RANGE
- fix for #1753
2022-08-25 16:00:03 +02:00
Applevangelist
1c54f6b2f4 #AUTOLASE
* Fix for "self" error after start
2022-08-25 13:28:20 +02:00
Applevangelist
7743456d7d #PLAYERTASK
* Short playername usage for broadcast
2022-08-25 12:10:20 +02:00
Applevangelist
4dc43263a5 usage correction 2022-08-25 11:41:27 +02:00
Applevangelist
5d84f1c523 #AIRBASE
* Added 3 new airports to the enumerator
2022-08-25 10:38:04 +02:00
Applevangelist
8289ebbe50 #PLAYERTASK
* added coalition check to event handler
2022-08-25 09:44:45 +02:00
Applevangelist
94741f1b4a #PLAYERTASK
* Added precision bombing option

#AUTOLASE
* Added "nomenu" option

#MENU_GROUP
* Added MENU_GROUP:RefreshAndOrderByTag()
2022-08-24 19:22:33 +02:00
Applevangelist
a5b394aa93 #AWACS
- added docu on PikesSpecialSwitch
- added option to read callsign from playername
2022-08-23 12:44:42 +02:00
Applevangelist
9f3d152d8c #AWACS
* Fixed logic for CallSignTranslations which now applies to both AI and Players, a set overwrite in the group name for a player still takes precedence.
* Added a switch self.PikesSpecialSwitch to omit "doing xy knots" from the station assignment
2022-08-23 09:58:06 +02:00
Applevangelist
94c91614d6 #Range
* Fix F10 Sheet
* Fix Typos
2022-08-22 17:28:01 +02:00
Applevangelist
02a59b0742 #UTILS
* Fix for GetOSTime
2022-08-22 17:05:02 +02:00
Applevangelist
882c2e2378 #ATC_GROUND
* Added universally working ATC_GROUND_UNIVERSAL as base class, can be used on any map without further changes
* Kept sub-class names for compatibility
* Added `:SetAirbaseBoundaries(Airbase, Zone)`
* Added `:DrawBoundaries( Color )`
2022-08-21 19:46:01 +02:00
Applevangelist
f6b56735b6 #PLAYERTASK
* Speak "BR" as "Bee, Arr"
2022-08-20 09:45:09 +02:00
Applevangelist
8aec463eb4 #PLAYERTASK
* Some changes to SRS call order, documentation
2022-08-20 09:24:52 +02:00
Applevangelist
37cdcf93e6 #PLAYERTASK
* Demo mission link added
2022-08-19 10:34:36 +02:00
Applevangelist
9547a06f39 #PLAYERTASK
* Slight text change for TASKADDED
2022-08-19 08:12:06 +02:00
Applevangelist
a8d5d2ace1 fix typos 2022-08-18 18:24:37 +02:00
Applevangelist
e8a0464f6c Docu corrections 2022-08-18 18:19:27 +02:00
Applevangelist
85a39e64c1 #PLAYERTASKCONTROLLER
* Own picture for header
* Some docu additions
2022-08-18 18:06:41 +02:00
Applevangelist
e18cf759f9 #PLAYERTASKCONTROLLER
* Add'l docu
2022-08-18 16:43:39 +02:00
Applevangelist
7e1ab1e6b0 #PLAYERTASKCONTROLLER
* Added base documentation
2022-08-18 16:01:34 +02:00
Frank
eed74d72cd SOCKEt
- Added new SOCKET class
- Fixed bug in RANGE that self.PlayerSetti**n**gs was misspelled.
2022-08-18 01:33:09 +02:00
Applevangelist
fa8c96af13 #AUTOLASE
* Update SRS stuff

#PLAYERTASKCONTROLLER
* Fix SRS to actually use Gender, Culture, Voice, Port
2022-08-17 17:33:29 +02:00
Applevangelist
18ec2ff458 #PLAYERTASK
* Corrected usage example on `SetTaskWhiteList()`
* Mark on map will add some basic info text
2022-08-17 16:23:37 +02:00
Applevangelist
c38a737421 #PLAYERTASK
* Added option to whitelist task types
* Added localization. Contains "en" and "de" texts and tts texts
2022-08-17 15:38:20 +02:00
Applevangelist
0166b53e21 #PLAYERTASKCONTROLLER
* Added option to suppress screen output
* Added target information via SRS
* Added target radius for BAI vs CAS and target type COORDINATE to be configureable
* Refined SRS output
* Added STATIC targets to get task type BOMBING
* Added solution to detect bombing runways (kind of, bombing occuring in AFB zone)
* Added solution for COORDINATE and ZONE type TARGETs (find enemy GROUP and/or STATIC objects in target radius)
* Refined documentation
2022-08-16 16:48:13 +02:00
Applevangelist
724da4e500 #PLAYERTASKCONTROLLER
* Added Accept and Reject Zones to detection
* Added SRS Stuff
* Tasks sorted by priority
2022-08-15 19:07:05 +02:00
Applevangelist
ce15e8dfe0 #PLAYERTASKCONTROLLER
* Set menu name
* Better menu buildup and refresh
2022-08-15 13:11:09 +02:00
Applevangelist
b968d0d694 #PLAYERTASKCONTROLLER
* Added detection setup
* Added number of joined players in join task overview, and a star when it's new
2022-08-14 16:50:57 +02:00
Frank
fa0549f34f Merge pull request #1756 from FlightControl-Master/FF/Ops
Update Airboss.lua
2022-08-04 22:13:18 +02:00
Frank
999ef36963 Update Airboss.lua
#1755
2022-08-04 21:18:38 +02:00
Frank
7affd05247 Merge pull request #1754 from FlightControl-Master/FF/Ops
Updates
2022-08-03 09:14:12 +02:00
Frank
2ccf4011ed Merge branch 'develop' into FF/Ops 2022-08-03 09:12:32 +02:00
Frank
61f3908d33 Updates
**AIRBOSS**
- Stennis now takes dimensions of other super carriers

**FLIGHTCONTROL**
- Added queue for sounds
- Fixed bugs and minor improvements

**ZONE**
- Added defaults when getting colors if not set

**SRS**
- Added new class `MSRSQUEUE`
2022-08-03 09:12:22 +02:00
Applevangelist
08e429210a Update Unit.lua 2022-07-31 09:16:46 +02:00
Frank
f94944c41a Merge pull request #1750 from FlightControl-Master/FF/Ops
ZONE
2022-07-31 01:16:55 +02:00
Frank
200631e57e Merge branch 'develop' into FF/Ops 2022-07-31 01:13:53 +02:00
Frank
9c83d5e752 ZONE
- Added new class `ZONE_ELASTIC`
2022-07-31 01:13:42 +02:00
Applevangelist
894bff2e35 PLAYERTASK - added list of pilots to TaskInfo 2022-07-30 12:26:29 +02:00
Applevangelist
6ff0a699c0 #PLAYERTASKCONTROLLER
* Added Event handling stuff in case client leaves/ejects/dies
* A2A - removed menus for smoke/flare
* Task menu entries now refreshed more intelligently
* Added `PLAYERTASKCONTROLLER:OnAfterTaskAdded(From, Event, To, Task)`
2022-07-30 12:06:11 +02:00
Frank
5083428a06 Merge branch 'develop' into FF/Ops 2022-07-30 01:24:52 +02:00
Applevangelist
c74a14fcb0 PLAYERTASK - debugging 2022-07-29 15:31:56 +02:00
Applevangelist
d060c7535a PLAYERTASK - added a couple of FSM events so task events bubble up to the controller 2022-07-29 14:53:23 +02:00
Applevangelist
5eb134f7b5 PLAYERTASK - Additions 2022-07-29 14:14:22 +02:00
Applevangelist
c1c5117f01 Update Moose.files (#1749) 2022-07-29 12:25:45 +02:00
Applevangelist
8ce1f5884f PlayerTask Beta 2022-07-29 12:24:36 +02:00
Applevangelist
1f8b51fafe SET - fix for dead units 2022-07-29 08:51:00 +02:00
Applevangelist
80f73f0bb1 AUTOLASE - added per player settings observance, also 2022-07-27 19:41:20 +02:00
Applevangelist
88e7b3fb47 AUTOLASE - observe global _SETTINGS for coordinates 2022-07-27 19:28:36 +02:00
Frank
3bb36044c1 OPS
- Added check that cohorts cannot have the same name.
- Made clearer that cohorts cannot have the same name in the docs.
2022-07-25 22:45:43 +02:00
Applevangelist
f9ace54fab UNIT - added get altitude function with AGL option 2022-07-25 08:12:10 +02:00
Applevangelist
498d7e2f66 Airbase - added 2 AFB to SA map 2022-07-22 11:02:08 +02:00
Frank
420526df9d Merge pull request #1747 from FlightControl-Master/FF/Ops
OPS
2022-07-20 22:58:57 +02:00
Frank
ab00d9534d Merge branch 'develop' into FF/Ops 2022-07-20 22:21:17 +02:00
Frank
4bb9073ce1 OPS
- Increased selection score for GCICAP/INTERCEPT
2022-07-20 22:20:26 +02:00
Applevangelist
58cb0118b4 AWACS - added option for custom TTS callsigns 2022-07-19 09:34:40 +02:00
Applevangelist
f19740e376 Beacon - added deactivate Link4 2022-07-19 08:30:09 +02:00
Applevangelist
ab50d0a514 Controllable/Beacon - added function to switch on Link4
A2A - typo in documentation
2022-07-19 08:10:35 +02:00
Frank
e551212516 Merge branch 'develop' into FF/OpsDev 2022-07-18 23:00:01 +02:00
Frank
888734b7d1 OPS
- Fixed bug in parking spot distance for ships.
- Added enroute  anti-ship task for anti-ship missions.
2022-07-18 22:59:49 +02:00
Applevangelist
90d1a01998 AWACS - delete open tasks on player leaving unit 2022-07-14 14:06:20 +02:00
Anthony De Vellis
ab1dd2b374 AWACS - Tweaked escort logic to use one AUFTRAG per escort fighter and tweaked positioning logic. Allows more control over escort fighters which will support a future PR (#1746) 2022-07-12 08:18:47 +02:00
Anthony De Vellis
0e4d731068 AWACS - added the ability to use custom callsigns with TTS/messaging (#1745)
* AWACS - added the ability to use custom callsigns with TTS. Revised section 5.1 of documentation to demonstrate

* AWACS - Added nil check to callsign construction when looking for replacement
2022-07-12 08:13:24 +02:00
Frank
f23416dfb8 Merge branch 'develop' into FF/OpsDev 2022-07-11 23:23:11 +02:00
Frank
469cc3d508 OPS
CHIEF: SetResponseOnTarget
TRANSPORT: improved transfer of loaded cargo
2022-07-11 23:22:58 +02:00
Applevangelist
5ad88be997 AWACS - change setup as TACS slightly 2022-07-09 15:34:08 +02:00
Applevangelist
536341b6de AWACS allow startasgci to process a string instead of a GROUP 2022-07-09 15:02:14 +02:00
Applevangelist
18dcd0a5d2 AWACS - some additions 2022-07-09 14:52:49 +02:00
Applevangelist
5f8a0643f4 AWACS - added GCI plane-less option 2022-07-07 17:55:35 +02:00
Applevangelist
ccbf8b34ef Fix for #1736 2022-07-07 08:51:28 +02:00
Applevangelist
25915c077e Various fixes 2022-07-07 08:47:43 +02:00
Frank
bcb574e618 Merge branch 'develop' into FF/OpsDev 2022-07-01 23:19:02 +02:00
Frank
6cfa24340f Update Range.lua
- Fixed bug in strafing runs
2022-07-01 23:10:10 +02:00
Frank
0dc26216c2 OPS 2022-07-01 23:00:25 +02:00
Frank
8dd850d685 OPS Operation 2022-06-29 22:25:08 +02:00
Frank
638f261bf4 OPS
- Improved FLIGHTCONTROL and minor other classes
2022-06-28 18:55:43 +02:00
Applevangelist
ad5a0a5cd9 CSAR - hand back descriptive name as 3rd parameter on event Boarded() 2022-06-25 17:24:37 +02:00
Applevangelist
7dda54f36d UTILS - Fix for Gazelle Door Check 2022-06-25 14:28:04 +02:00
Frank
a8477940e2 Merge branch 'FF/Ops' into FF/OpsDev 2022-06-21 16:15:03 +02:00
Frank
6a26f62ca1 Merge branch 'develop' into FF/Ops 2022-06-21 16:14:31 +02:00
Frank
06d0bfadca FLIGHTCONTROL v0.6.0 2022-06-21 16:08:46 +02:00
Applevangelist
b805d7fe19 CSAR - fix for oncrash 2022-06-16 15:42:13 +02:00
Applevangelist
b784671397 CSAR - added event for "Landed" at a friendly/neutral AFB. Fixed Airbase rescue. 2022-06-16 13:40:35 +02:00
Applevangelist
4784a31513 UTILS - Falklands additions 2022-06-14 17:20:12 +02:00
Applevangelist
3eb9bfe9ee COORDINATE - additions to BRAANATO
AWACS - make bogey dope use the priority queue to avoid collisions. Say "very low" and not "zero thousand", drop "vanished" if not tags is requested
2022-06-14 13:08:18 +02:00
Applevangelist
ab31aecdac CSAR - some fixes for latest open beta 2022-06-14 12:37:56 +02:00
Applevangelist
5cb2bd1332 Update Beacon.lua 2022-06-13 15:41:19 +02:00
Applevangelist
8bff9efc5c Beacon - update docs (#1733)
Updated docs to point to ActivateTacan as better option to AAATACAN
2022-06-13 15:21:50 +02:00
Applevangelist
d01360ca19 CSAR - Put wounded group back into status green, so they run to the chopper 2022-06-12 12:47:10 +02:00
Applevangelist
f48c71f30c AWACS - Added option to use marker to create, move and delete a player station 2022-06-10 11:56:19 +02:00
Applevangelist
a2b3190b1d More docu 2022-06-09 12:12:45 +02:00
Applevangelist
913d5a532d CTLD - further documentation 2022-06-09 11:46:17 +02:00
Applevangelist
96c6c372fd Added documentation for CTLD_HERCULES 2022-06-09 10:56:33 +02:00
Frank
8926e06e44 Runways
**AIRBASE**
- Runways are now retrieved from DCS API function
2022-06-08 23:42:17 +02:00
Applevangelist
6636e89a0b AIRBASE added South Atlantic 2022-06-08 20:24:31 +02:00
Applevangelist
01e9e83641 AWACS - PlayerGuidance makes picture calls refer to asking player BRA, delete contact engagement label on checking out 2022-06-07 11:30:20 +02:00
Applevangelist
30dc338636 CSAR - added a couple of more lines to go out via TTS 2022-06-07 08:56:25 +02:00
Applevangelist
d4999de214 CSAR - added options to use Google TTS 2022-06-07 08:12:57 +02:00
Frank
a53595a055 OPS
Enhanced OPERATION and FLIGHTCONTROL features.
2022-06-06 22:05:57 +02:00
Applevangelist
0cb7415a4c AWACS -- enforce EPLRS 2022-06-05 18:03:39 +02:00
Applevangelist
9f287d0d7f AWACS 0.1.27
* Added options for NoMissileCals and PlayerCapAssignment
* Added documentation on options
2022-06-04 13:56:57 +02:00
Applevangelist
feddda2948 AWACS - added docu for speech queue padding options 2022-06-03 14:42:08 +02:00
Applevangelist
613b7eda8a AWACS 0.1.26 - corrected player picture call to use B/E references, bogey dope to announce only one group. ZipLip will also remove group tags. 2022-06-03 09:27:01 +02:00
Applevangelist
bd3364a3cf AWACS - limit merge calls 2022-06-02 17:39:39 +02:00
Applevangelist
3f918bd309 AWACS 0.1.25
* Added Function ZipLip
* Changed merge distance to 5nm for account for delay in speech generation
* Altered RadioQueue to not save all calls until a player connects
* Some bugfixes
2022-06-02 15:31:03 +02:00
Frank
9b3f2ae3c7 OPS 2022-05-31 22:54:37 +02:00
Applevangelist
6c33c5701f Awacs 2022-05-31 16:21:19 +02:00
Applevangelist
e731fe9b98 AWACS 0.1.24 - Added merge call, google now says "zero" not "oh", aligned some callouts to more realistic versions, bulls related calls without aspect now. 2022-05-31 14:02:14 +02:00
Frank
edbfa9117d OPS
- Added new **CONDITION** class
- Added new **OPERATION** class
2022-05-30 11:45:56 +02:00
Frank
ae54cd8fde OPS
** ARMYGROUP**
- Added suppression option

**COMMANDER**
- Added function to add targets with defined resources

**OPSGROUP**
- Added option to pause multiple missions

**INTEL**
- Fixed bug in cluster calc

**LEGION**
- Added function to get alive opsgroups

**TARGET**
* Added start condition
2022-05-27 22:14:21 +02:00
Applevangelist
91686e252c AWACS FSM Functions Docu 2022-05-24 16:05:04 +02:00
Applevangelist
88d132931e AWACS - Nicefy docs 2022-05-24 14:44:23 +02:00
Applevangelist
4afedcf126 AWACS - added documentation, added option to suppress group tags 2022-05-24 14:04:52 +02:00
Frank
d3d815f26a Merge branch 'FF/Ops' into FF/OpsDev 2022-05-23 23:11:37 +02:00
Frank
62725b1930 OPS
**AUFTRAG**
- Added *invisible* and *immortal* options

**TARGET**
- Added `AddResource` function

**OPSGROUP**
- Added *invisible* and *immortal* options

**LEGION**
- Fixed bug in properties requirement

**COMMANDER**
- Added `AddTarget` function (still **WIP**)

**ARMYGROUP**
- Fixed routing bug after teleporting
2022-05-23 23:11:23 +02:00
Frank
06d509b5ac Update Airboss.lua
- Improved Case III entry waypoint
2022-05-22 22:36:43 +02:00
Applevangelist
77aba38625 AWACS - added docu 2022-05-22 17:14:14 +02:00
Applevangelist
ce33e1d242 AWACS - Options to Draw Zones 2022-05-22 13:03:38 +02:00
Applevangelist
591cf29edf Update README.md 2022-05-22 11:17:20 +02:00
Frank
dd81823e29 FC
**FLIGHTCONTROL**
- Less output to dcs log file

**FLIGHTGROUP**
- Added function :SetReadyForTakeoff
2022-05-21 22:25:08 +02:00
Frank
15994e7be8 FC
- Changed holding point to holding pattern or stack
- Replaced MESSAGE by TextMessageToFlight
2022-05-20 20:53:45 +02:00
Frank
61f3b87dae Update Airboss.lua
- Wind is calculated at 15 m (not 50 m)
2022-05-20 20:15:11 +02:00
Frank
6279f1920e FC
**FLIGHTCONTROL**
- Improved menus
- Added more menus
- Improved radio messages overlap
- Added options to limit number of fights taxiing and taking off
2022-05-20 20:08:28 +02:00
Applevangelist
d169d60d8d AWACS BETA 0.1.22 - added some QOL functions, corrected standard TOS for AWACS and CAP, now 4 hours. 2022-05-20 19:31:11 +02:00
Applevangelist
f49cf43fb1 Awacs - Documentation 2022-05-20 16:19:51 +02:00
Applevangelist
aa94ae8759 AWACS moving to beta 1.22 - added documentation, some fixes 2022-05-20 15:51:54 +02:00
Applevangelist
8ad20b57fd TARGET - small typo 2022-05-19 14:41:06 +02:00
Frank
7c4cb5ea7f FC
- Improvements
2022-05-18 12:51:25 +02:00
Frank
23733bb1a6 Merge branch 'FF/Ops' into FF/OpsDev 2022-05-17 23:00:29 +02:00
Frank
5be3f333f3 Merge pull request #1731 from FlightControl-Master/FF/Ops
OPS
2022-05-17 22:53:10 +02:00
Frank
b14f3f53aa Merge branch 'develop' into FF/Ops 2022-05-17 22:51:02 +02:00
Frank
47c3fc35e3 OPS
**OPSGROUP**
- Improved routing for ground.

**NAVYGROUP**
- Fixed U-turn of turn into wind

**ARMYGROUP**
- Improved updateroute

**LEGION** and **COMMANDER**
- Set mission range LARGE for relocation mission

**AUFTRAG**
- Fixed bug in Nassets for relocation
2022-05-17 22:50:35 +02:00
Applevangelist
0fd1497496 AWACS 0.0.19 2022-05-15 12:49:36 +02:00
Applevangelist
6c9c983f72 Positionable - added 6 passengers (cargo weight) to Toyota HL/LC new with 2.7.2 OB 2022-05-14 13:11:17 +02:00
Applevangelist
0422eee9af SRS - added hints on using Google with TTS 2022-05-13 16:38:10 +02:00
Frank
97a4b79713 OPS FC
- Improved holding point
2022-05-12 21:19:55 +02:00
Applevangelist
0785ee3099 Point - added option to add an SSML tag to ToStringBRAANATO
AWACS - 0.0.18
2022-05-12 14:48:56 +02:00
Frank
d58d04d6a0 Merge branch 'FF/Ops' into FF/OpsDev 2022-05-12 11:04:13 +02:00
Frank
9bb2b17c77 Merge pull request #1730 from FlightControl-Master/FF/Ops
OPS
2022-05-12 10:50:47 +02:00
Frank
64e70d8e92 OPSGROUP
- #1677
- Fixed that damaged is triggered when group is despawned.
- Fixed total ammo calculation when group is dead
- Fixed assets do not carry out patrol zone after transport
2022-05-12 10:49:18 +02:00
Frank
6fa9eb558a Merge branch 'develop' into FF/Ops 2022-05-12 08:03:25 +02:00
Frank
ddcc851951 FC
- Improved FC
2022-05-12 08:03:08 +02:00
Applevangelist
dc2e5afe3e SRS - put volume in "" - just in case 2022-05-11 07:30:39 +02:00
Applevangelist
d8e9997987 SRS - actually pass the volume to the command line 2022-05-11 06:18:48 +02:00
Applevangelist
3d919cd937 AIRBASE - corrected ["Deir_ez_Zor"] = "Deir ez-Zor" (minus doesn't work in enum) 2022-05-10 19:40:44 +02:00
Applevangelist
b094c2d78f Correct link to demo missions 2022-05-10 16:17:46 +02:00
Applevangelist
9b699ba374 Update AI_Air.lua 2022-05-10 10:11:25 +02:00
Frank
f8e5efc874 Merge branch 'develop' into FF/Ops 2022-05-09 08:41:55 +02:00
Frank
2c61c695d5 Update Chief.lua
- Added target in zone check to abort missions
2022-05-09 08:41:33 +02:00
Frank
b6e806adbc Update FlightGroup.lua
-No despawn after player landed.
2022-05-08 00:29:36 +02:00
Applevangelist
e74aa160af Group - small change 2022-05-07 19:42:10 +02:00
Clément Fassot
6793228fbe Add an option to display arrows if clusters are moving (#1728) 2022-05-07 15:32:48 +02:00
Applevangelist
e83ea8124e GROUP - change to GetUnits(n) to make it more robust, now returns first alive unit,actually. Similar changes to GetHeading() 2022-05-07 11:54:48 +02:00
Frank
313f99d09d OPS
**AUFTRAG**
- Added option to specify mission type for escorts, *e.g.* `AUFTRAG.Type.SEAD`

**LEGION** and **COMMANDER**
- Improved handling of SEAD escorts.
2022-05-06 21:50:23 +02:00
Applevangelist
28de292107 ##AWACS Alpha 0.0.17
* Added RejectZone (foreign border)
* Option to suppress screen output
* Option to add google key in SetSRS
* Some corrections to callouts
* Menu option to show base info
* WIP - Basic player task assignment
2022-05-06 16:36:57 +02:00
Applevangelist
10efb98eb3 Fallout fixes 2022-05-06 11:44:59 +02:00
Applevangelist
8ac2241372 AI Patrol - life check on route 2022-05-06 10:36:51 +02:00
Applevangelist
092434a103 UNIT Register - small fix for trains 2022-05-06 08:01:18 +02:00
Applevangelist
a777997f79 AI_CAP - more fallout from the dead units in the API 2022-05-05 17:40:17 +02:00
Applevangelist
36cf7f718b AI_AIR - restrict AB on RTB 2022-05-05 16:41:15 +02:00
Applevangelist
7989267d51 AI/ZONE - Some fixes for units unreachable 2022-05-05 12:08:43 +02:00
Applevangelist
ef4398a5f1 SRS - adding volume setting and a test on OS and IO available
OpsGroup - added volume options for `SetSRS`
2022-05-05 11:35:27 +02:00
Applevangelist
0da8afc108 SRS - adding volume setting and a test on OS and IO available 2022-05-05 08:57:15 +02:00
Frank
0e74d36227 Update Range.lua
**RANGE** v2.4.0
- Copy from updated
2022-05-04 22:40:22 +02:00
Applevangelist
290cc151bc SET - further event related stuff not working any more
AWACS - update
2022-05-04 18:10:20 +02:00
Applevangelist
21f93aa7e8 AWACS - 0.0.12 2022-05-04 13:29:14 +02:00
Applevangelist
04c77e9760 Some fixes to make the SpawnScheduled work again 2022-05-04 09:58:30 +02:00
Frank
c6da6544da Merge pull request #1725 from FlightControl-Master/FF/Ops
Dead Event
2022-05-04 09:49:37 +02:00
Frank
94d3e38bc7 Merge branch 'develop' into FF/Ops 2022-05-04 09:47:30 +02:00
Frank
5fcf992920 Dead Event
**EVENT**
- Improved handling of delayed dead event

**SPAWN**
- Improved handling of delayed dead event
2022-05-04 09:46:00 +02:00
Frank
22cc9eabc0 Merge pull request #1724 from Ked57/develop
Replace log MESSAGE when updating cluster markers in INTEL with a log
2022-05-03 23:31:15 +02:00
Clément Fassot
b191c0d341 Replace log MESSAGE when updating cluster markers in INTEL with a log (#1) 2022-05-03 23:08:26 +02:00
Frank
d2d431ce2e OPS (#1723)
**INTEL**
- Added nil check for cluster position update

**OPSGROUP**
- Improved fire at point task to take only max avail shots and relative shot amount
- Fixed tasks not executed after teleport
2022-05-03 09:41:22 +02:00
Frank
3a6b58ea8c Merge branch 'develop' into FF/Ops 2022-05-03 09:25:15 +02:00
Frank
2d8fc40307 OPS
**INTEL**
- Added nil check for cluster position update

**OPSGROUP**
- Improved fire at point task to take only max avail shots and relative shot amount
- Fixed tasks not executed after teleport
2022-05-03 09:23:53 +02:00
Applevangelist
68dce2f247 extra nil checks for dead units 2022-05-03 08:46:23 +02:00
Applevangelist
bc03eb2e65 FIFO - FIFO:HasUniqueID(UniqueID)
GROUP - added GROUP:IsPlayer()
INTEL - added clustering by flight deck (10'k ft) for AIR
SET - added option to NOT set the cargo bay weight limit automatically on SET_GROUP:AddGroup( group, DontSetCargoBayLimit )
2022-05-02 17:18:48 +02:00
Frank
f725709e5b Merge pull request #1721 from FlightControl-Master/FF/Ops
OPS
2022-04-29 22:02:24 +02:00
Frank
ba591c9dc5 OPS
**AUFTRAG**
- Added new type `NOTHING` (similar to `ALERT5` but for ground/naval)
2022-04-29 22:00:23 +02:00
Applevangelist
def5d33055 GROUP - making GetCoordinate() a bit more resilient
POINT - slight changes to ToStringBRAANATO
2022-04-29 18:48:27 +02:00
Applevangelist
1aaa51c4be COORDINATE - added bogey option to COORDINATE:ToStringBRAANATO(FromCoordinate,Bogey,Spades) 2022-04-29 12:19:06 +02:00
Applevangelist
37206bcc83 Range - added nil check for playerData 2022-04-29 12:10:16 +02:00
Frank
c2b86bac4b Update Airboss.lua
- Fixed DATABASE:GetFlightGroup to DATABASE:GetOpsGroup
2022-04-28 20:52:47 +02:00
Frank
02dad179cd Recovery tanker 2022-04-28 20:50:30 +02:00
Applevangelist
adb94f8773 Nicefy docs 2022-04-28 17:10:49 +02:00
Applevangelist
035110df75 AWACS - removed banner from docs 2022-04-28 16:48:24 +02:00
Applevangelist
5adb65899c USERSOUND - added USERSOUND:ToUnit() 2022-04-28 16:48:07 +02:00
Applevangelist
764a373e7d POSITIONABLE - added POSITIONABLE:MessageToUnit(), and :MessageToSetUnit() 2022-04-28 16:47:42 +02:00
Applevangelist
8114327c7e MESSAGE - added MESSAGE:ToUnit(), altered MESSAGE:ToClient() to message the unit only 2022-04-28 16:46:28 +02:00
Applevangelist
6404417dad luacheck barking 2022-04-28 13:48:48 +02:00
Applevangelist
d89cb8f1e9 Added Awacs WIP to working tree, Enums - corrected Hawkeye, added Super_Hercules 2022-04-28 13:11:04 +02:00
Applevangelist
dee95c2f08 Update Moose.files 2022-04-28 13:04:22 +02:00
Frank
3a907ec7c2 Merge pull request #1720 from FlightControl-Master/FF/Ops
Ff/ops
2022-04-28 09:19:01 +02:00
Frank
851dff6e8c Update Intelligence.lua
- Added function to add detection group
- Added functions to retrieve contact details
2022-04-28 09:17:33 +02:00
Frank
47e7364976 Merge branch 'develop' into FF/Ops 2022-04-27 22:46:36 +02:00
Frank
41f8207b3a Merge pull request #1719 from FlightControl-Master/FF/Ops
**CHIEF**
- Added resources as parameters to `:AddStrategicZone` function

**COMMANDER**
- Added function to relocate cohorts `:RelocateCohort`

**AUFTRAG**
- Added new type `AIRDEFENSE`
- Added new type `EWR`
- Added option to teleport assets to the mission ingress waypoint via `:SetTeleport`
- Added `:SetRequiredAttribute` and `:SetRequiredProperty` functions
- Added `:SetEmission` function

**LEGION**
- Fixed bug that assets on GCI dont get additional score for INTERCEPT missions
- Assets on ONGUARD or PATROLZONE are not considered for ARTY and GROUNDATTACK missions
- Added option for transport to `RelocateCohort` function
- Ground/naval assets now automatically return when out of ammo

**OPSGROUP**
- Immobile groups are teleported to mission ingress point

**RECOVERYTANKER**
- Added parameter to set TACAN mode/band (e.g. "X")

**GROUP**
- Fixed bug in `:GetSpeedMax` function

**BEACON**
- Allowed TACAN "X" mode for AA
2022-04-27 22:38:34 +02:00
Frank
ed0a3a22ab OPS
**CHIEF**
- Added resources as parameters to `:AddStrategicZone` function

**COMMANDER**
- Added function to relocate cohorts `:RelocateCohort`

**AUFTRAG**
- Added new type `AIRDEFENSE`
- Added new type `EWR`
- Added option to teleport assets to the mission ingress waypoint via `:SetTeleport`
- Added `:SetRequiredAttribute` and `:SetRequiredProperty` functions
- Added `:SetEmission` function

**LEGION**
- Fixed bug that assets on GCI dont get additional score for INTERCEPT missions
- Assets on ONGUARD or PATROLZONE are not considered for ARTY and GROUNDATTACK missions
- Added option for transport to `RelocateCohort` function
- Ground/naval assets now automatically return when out of ammo

**OPSGROUP**
- Immobile groups are teleported to mission ingress point

**RECOVERYTANKER**
- Added parameter to set TACAN mode/band (e.g. "X")

**GROUP**
- Fixed bug in `:GetSpeedMax` function

**BEACON**
- Allowed TACAN "X" mode for AA
2022-04-27 22:36:13 +02:00
Applevangelist
3a513da942 Awacs next Alpha 2022-04-27 14:37:38 +02:00
Applevangelist
a4f1c60da2 Enums - added a couple of names 2022-04-26 10:09:05 +02:00
Applevangelist
de0bf7d814 typo 2022-04-25 10:36:10 +02:00
Applevangelist
71fd72e462 adding ZONE_POLYGON_BASE:IsVec3InZone( Vec3 ) (might be called from POSITIONABLE), closes gap for GROUP/UNIT:IsInZone(Zone_Polygon)
GROUP - better docu
2022-04-25 09:59:44 +02:00
Applevangelist
619cc3c047 various 2022-04-24 19:11:08 +02:00
Applevangelist
68c75a4e34 Menu Refresh cleanup 2022-04-24 14:06:24 +02:00
Applevangelist
37671cefa3 GROUP - overwrite GetHeight() inherited from POSITIONABLE with something that is actually working for groups 2022-04-24 13:50:23 +02:00
Applevangelist
d9f409069a INTEL - add platform type for AIR contacts (Foxbat ... ), defaults to Bogey for AIR and Unknown for everything else
SRS- added option to set a label for the SRS radio overlay
OpsGroup - added options to use said label, and option to override a frequency for an SRS (TTS) sender
2022-04-24 12:46:11 +02:00
Applevangelist
fd5a190490 AWACS Alpha 2022-04-23 18:58:27 +02:00
Applevangelist
2f4d5b32b6 GROUP/UNIT - added :GetNatoReportingName() 2022-04-23 16:41:47 +02:00
Applevangelist
4c7ac68858 UTILS - UTILS.GetReportingName(Typename)
ENUMS - added ENUMS.ReportingName
2022-04-23 15:09:02 +02:00
Applevangelist
ad3a3c5266 AWACS a0.0.7 - cleaned up AWACS calls, implemented DECLARE 2022-04-22 20:34:24 +02:00
Applevangelist
51d924c1b8 BRAANato - make bearing a 3digit number 2022-04-22 13:32:34 +02:00
Applevangelist
83491f535a Point - BRAANATO - will return BRA only if no aspect can be generated 2022-04-21 18:56:51 +02:00
Applevangelist
380731a244 AWACS 0.0.6 2022-04-21 18:56:09 +02:00
Applevangelist
60c78da0f6 Utils/Point - Corrections 2022-04-21 12:56:40 +02:00
Frank
2d02f4f962 Merge branch 'develop' into FF/Ops 2022-04-21 08:40:45 +02:00
Frank
982bd89924 Merge branch 'develop' into FF/Ops 2022-04-20 22:03:24 +02:00
Frank
04f60747d9 Merge pull request #1716 from FlightControl-Master/FF/Ops
OPS
2022-04-20 21:51:09 +02:00
Frank
28c107b089 OPS
**AIRWING**
- Added option to start in air `:SetTakeoffAir()`
- Added option to despawn near airbase `:SetDespawnAfterHolding()`
- Added option to despawn after landing `:SetDepawnAfterLanding()`

**SQUADRON**
- Added option to start in air `:SetTakeoffAir()`
- Added option to despawn near airbase `:SetDespawnAfterHolding()`
- Added option to despawn after landing `:SetDepawnAfterLanding()`
- Squadron settings overrule Airwing settings

**OPSGROUP**
- Improved `:Teleport()` function
2022-04-20 21:48:03 +02:00
Applevangelist
e6cc8757ac Utils typo 2022-04-20 19:14:19 +02:00
Applevangelist
9169bfc608 COORDINATE - Added Precision to GetDistanceText as an option 2022-04-20 19:04:37 +02:00
Applevangelist
610e33e4a4 COORDINATE - added ToStringBRAANATO (works hopfully ;)) 2022-04-20 18:54:51 +02:00
Applevangelist
77dd40fb4a SET - clarified return value of SET_GROUP:GetAliveSET() (table, not SET)
UTILS - BRAANATO
ZONE - added examples to ZONE_RADIUS:Scan()
2022-04-20 14:01:26 +02:00
Applevangelist
5a63c51316 Utils - docu spelling 2022-04-20 12:45:33 +02:00
Applevangelist
eabc8b5854 UTILS - added BearingToCardinal, added ToStringBRAANATO 2022-04-20 12:43:24 +02:00
Applevangelist
1a798886a2 AIRWING - added function to callback AWACS "onafterflightonmission" 2022-04-20 08:33:49 +02:00
Applevangelist
8735dadbca Awacs updates 2022-04-20 08:33:11 +02:00
Applevangelist
2c53ebc0e4 FIFO Added Routines 2022-04-20 08:32:57 +02:00
Applevangelist
f93033695d Alpha Updates 2022-04-19 15:38:29 +02:00
Applevangelist
2d0f5817d0 Minor Changes 2022-04-19 15:36:44 +02:00
Applevangelist
2033e22216 AWACS Alpha 0.0.2 (WIP) (#1714)
TBD
2022-04-18 16:57:33 +02:00
Applevangelist
bada6f64ae Update Moose.files (#1713) 2022-04-18 12:27:58 +02:00
Applevangelist
bc141698c8 FIFO - make own file in Utils
AUFTRAG - Add base missions params for NewNOTHING
Marker - typo
Modules - FiFo added
UTILS - removed FiFo code
2022-04-18 12:27:14 +02:00
Applevangelist
75fddd9349 FIFO/LIFO - Read functions. Count as alternative to GetSize() 2022-04-17 11:25:48 +02:00
Applevangelist
b1a417295f TextAndSound - Docu 2022-04-17 11:24:36 +02:00
Applevangelist
0522036b80 Docu 2022-04-16 18:58:43 +02:00
Applevangelist
061469840b FIFO 2022-04-14 15:55:51 +02:00
Applevangelist
6e218ed908 LIFO/FIFO - enforce unique ID 2022-04-14 15:05:49 +02:00
Applevangelist
626b48c3d1 Added LIFO/FIFO:HasUniqueID(UniqueID) 2022-04-14 11:11:18 +02:00
Applevangelist
dd957237e2 Nicefy docs 2022-04-14 08:54:42 +02:00
Applevangelist
fc9e237dbb UTILS - LiFo/FiFo Stacks 2022-04-14 08:12:02 +02:00
Frank
faac265373 Merge pull request #1712 from FlightControl-Master/FF/Ops
Ff/ops
2022-04-13 22:44:52 +02:00
Frank
998935e2a3 Merge branch 'develop' into FF/Ops 2022-04-13 22:40:19 +02:00
Frank
24f8116fce OPS
**ZONE**
- Fixed incorrect fillcolor alpha.

**COORDINATE**
- Fixed incorrect fillcolor alpha.

**AUFTRAG**
- Fixed `CASENHANCED` order of arguments wrong in docs.

**FLEET**
- Improved docs.
- Added ``:SetPathfinding` function

**OPSGROUP**
- Fixed RECON mission behaviour if not random.
- Improved stuck check if engaging.

**LEGION**
- Added weapon type as parameter for selecting cohort assets.

**COHORT**
- Added `:GetMissionRange` function that accounts for long range weapons.
- Added counting of asset ammo.
2022-04-13 22:39:48 +02:00
Applevangelist
3415330871 UTILS - added FiFo 2022-04-13 16:13:02 +02:00
Applevangelist
eadeaae6db CTLD Corrected imperial hover message to say ft not m 2022-04-13 15:30:43 +02:00
Penecruz
32bdaf4f24 Update Ops Airboss for develop (#1711)
* Update Airboss.lua

* Revert "Update Airboss.lua"

This reverts commit 61b0f843eb.

* Update Airboss.lua
2022-04-13 09:35:18 +02:00
Applevangelist
7525fe9357 UTILS - corrected door check for AH64 2022-04-12 08:23:37 +02:00
Applevangelist
b24f31922f Soundfile - missing backslash 2022-04-10 18:26:27 +02:00
Applevangelist
4c79349b8d MSRS - repair command string for .bat processing 2022-04-10 18:23:20 +02:00
Applevangelist
44f7a27387 AICSAR - missing \ in path 2022-04-10 18:22:31 +02:00
Applevangelist
369425bec1 Some SRS changes 2022-04-10 15:12:51 +02:00
Applevangelist
3dc284335e SoundOutput - Honor self.useSRS to find a path to sound files located inside the miz folder 2022-04-10 14:59:54 +02:00
Applevangelist
bfc284994a SRS - port set not honored 2022-04-10 14:59:05 +02:00
Applevangelist
277409a807 Text and Sound: Spelling error 2022-04-10 14:58:47 +02:00
Applevangelist
d1f1f14bc3 SRS - add port to docu 2022-04-10 10:18:26 +02:00
Applevangelist
5ee1f5d3af CSAR/AICSAR - added port options for SRS 2022-04-10 09:28:47 +02:00
Frank
f4569fb5cc Merge pull request #1710 from FlightControl-Master/FF/Ops
OPS
2022-04-08 22:19:42 +02:00
Frank
4ba0a2dafb OPS
**FLEET v0.0.1**
- New class for naval units corresponding to AIRWING and BRIGADE

**FLOTILLA v0.0.1**
- New class for naval units corresponding to SQUADRON and PLATOON
2022-04-08 22:18:35 +02:00
Applevangelist
c2b1c2b1d8 SET - logic correction in :Remove() 2022-04-08 11:26:59 +02:00
Frank
2e119e2efd Merge pull request #1709 from FlightControl-Master/FF/Ops
OPS
2022-04-07 12:39:49 +02:00
Frank
4641918486 OPS
**LEGION**
- Added function `:RelocateCohort()` to relocate cohorts from one legion to another.
2022-04-07 12:11:17 +02:00
Frank
407f6f2b0f Merge pull request #1707 from FlightControl-Master/FF/Ops
OPS
2022-04-04 22:31:33 +02:00
Frank
f01d7ecd96 OPS
**AUFTRAG v0.9.1**
- Added new mission type `CARGOTRANSPORT`
2022-04-04 22:30:30 +02:00
Frank
e3d987bbdf Update Database.lua
- Static templates saved under first unit name so they can be found.
2022-04-04 16:53:52 +02:00
Applevangelist
89845883d0 Some nil checks to the A2A dispatcher, keeping it from detecting nil units, added locale to Settings and use of it to TextAndSound 2022-04-04 12:57:31 +02:00
Frank
4e7ff94b33 Merge pull request #1706 from FlightControl-Master/FF/Ops
static spawn
2022-04-04 12:16:48 +02:00
Frank
2fb9a1b1d7 static spawn 2022-04-04 12:15:29 +02:00
Applevangelist
5c0ab36662 CTLD - Build object at the first crate location found, not randomly around the helo 2022-04-04 11:29:21 +02:00
Frank
fc6dac326d Merge pull request #1705 from FlightControl-Master/FF/Ops
OPS
2022-04-04 00:00:51 +02:00
Frank
426dcff085 OPS
FLIGHTGROUP
- Improved homebase for spawned units
- Enabled helo inAir check due to DCS bug that inAir returns true when spawned at airbase or farp

SET_ZONE
- Added DrawZone() function

ARMYGROUP
- Improved EngageTarget() function

AUFTRAG
- ARMORATTACK is not falling back to GROUNDATTACK
2022-04-03 23:59:43 +02:00
Applevangelist
e623f45c04 Update AICSAR.lua (#1704)
Added localization and fitting german (locale "de") texts
2022-04-02 12:49:09 +02:00
Applevangelist
3b9a9cb0fa some code cleanup 2022-04-01 19:37:55 +02:00
Applevangelist
c018a86bdb adding missing goshawk variable 2022-04-01 19:37:37 +02:00
Applevangelist
559be38baf Update TextAndSound.lua (#1703)
Slight doc changes
2022-04-01 19:36:00 +02:00
Applevangelist
e3e05e5003 Adding TextAndSound (#1702)
Adding TextAndSound localization class
2022-04-01 19:20:35 +02:00
Applevangelist
95649d7d46 Adding localisation class TEXTANDSOUND 2022-04-01 19:17:31 +02:00
Frank
61097de76d Merge pull request #1701 from FlightControl-Master/FF/Ops
OPS
2022-04-01 12:33:31 +02:00
Frank
e49fff5028 Update Auftrag.lua 2022-04-01 12:11:28 +02:00
Frank
20ae7945e0 Merge branch 'develop' into FF/Ops 2022-04-01 12:09:33 +02:00
Frank
c5a50d23b6 OPS
CHIEF
- Added option to customize reaction on strategic zones

AUFTRAG
- Added new type GROUNDATTACK
2022-04-01 11:17:43 +02:00
Applevangelist
ad37e5ca27 AIRBASE, added ["Deir_ez-Zor"] = "Deir ez-Zor", 2022-03-30 12:05:04 +02:00
Frank
e8303064b9 Update OpsGroup.lua 2022-03-29 16:32:50 +02:00
Applevangelist
f8a577749a OPS - Some changes to ARMORATTACK to update route if target is moving 2022-03-29 12:03:45 +02:00
Applevangelist
e113817293 CTLD - docu nicefy 2022-03-29 12:02:35 +02:00
Applevangelist
0d15cdd370 CTLD - corrected error in setting Hercules min and max drop height, added documentation 2022-03-29 08:52:21 +02:00
Applevangelist
b5db08eec3 AIRBASE - Add'l AB for the Channels map 2022-03-28 10:13:02 +02:00
Frank
c3591c1fae Merge pull request #1699 from FlightControl-Master/FF/Ops
OPS
2022-03-26 22:39:44 +01:00
Frank
e1a4d5497a Merge branch 'develop' into FF/Ops 2022-03-26 22:38:20 +01:00
Frank
4e83162adc OPS
CHIEF
- Added `:RemoveStrategicZone()` function
- Added `:SetLimitMission()` function to limit number of total or specific mission types.
- Improved Tactical Overview

OPSZONE
- Improved `Stop()` function
2022-03-26 22:38:03 +01:00
Applevangelist
42c6b8a016 And don't forget Fahrenheit 2022-03-26 14:47:10 +01:00
Applevangelist
48f9d808cf Correcting Celcius to Celsius 2022-03-26 14:42:36 +01:00
Applevangelist
6546c27cf5 OPS - added HOVER mission type 2022-03-25 17:54:02 +01:00
Frank
fc0c0f87dc Merge pull request #1697 from FlightControl-Master/FF/Ops
OPS
2022-03-25 12:52:31 +01:00
Frank
9d703c0af6 OPS
- CHIEF: added tactical overview
2022-03-25 12:50:45 +01:00
Frank
24559c475b Merge branch 'develop' into FF/Ops 2022-03-25 11:00:17 +01:00
Frank
f92e8a285a OPS
- Added nil check on vec3 for _UndateEngageTarget in ARMYGROUP and NAVYGROUP
2022-03-25 10:27:32 +01:00
Frank
0411120551 OPS
OPSGROUP
- Added damage check for groups that are not alive.
- Added `:ReturnToLegion` function.
- Added `:Teleport` function

LEGION
- Aircraft dont start hot if on Alert5 mission

AUFTRAG
- Added Formation parameter to PATROLZONE (for ground only)

ARMYGROUP
- Set Vee formation for engage group
2022-03-25 09:49:26 +01:00
Applevangelist
5f57d4ddcd docu changes 2022-03-23 07:57:06 +01:00
Applevangelist
4164bbeba8 CSAR/CTLD - added type to script 2022-03-22 10:38:07 +01:00
Frank
14dea99ccd Update Utils.lua
- Removed useless UTILS.GetDate() function
2022-03-22 09:31:16 +01:00
Frank
3ea1881ff5 OPS INTEL v0.3.0
- Added option to detect statics via `INTEL:SetDetectStatics` function.
- Added `INTEL:KnowObject` function to make intel aware of GROUPs or STATICs.
- Improved cluster analysis.
- Changed `NewCluster` event: removed contact as first parameter.
2022-03-20 22:20:09 +01:00
Applevangelist
5192c188f4 AIRBASE - added 10 new AB names in Syria 2022-03-18 09:49:06 +01:00
Applevangelist
c1ffa47e9d changed descriptions 2022-03-18 07:59:49 +01:00
Applevangelist
2808a9dcc5 CONTROLLABLE - added SetSpeed() and SetAltitude() from latest release 2022-03-18 07:41:10 +01:00
Applevangelist
e1ab6b6c93 CSAR - remove timer check for "open the door" message to make behaviour more realistic 2022-03-14 09:12:06 +01:00
Frank
229868bb20 OPS
AUFTRAG: Trooptransport set pickup radius to 100 meters.
OPSGROUP: enabled pickup radius for trooptransport auftrag
ARMYGOUP: removed GetPathOnRoad as it seems unncessary
2022-03-14 08:32:09 +01:00
Frank
520eb4cd1d OPS
- Improved recovery of retreated groups
2022-03-11 22:36:00 +01:00
Applevangelist
2d0b4d6ae5 SCORING: Corrected calc error in summary scoring functions 2022-03-11 10:19:30 +01:00
Frank
5dae9a197a OPS
- CHIEF: fixed bug in LEGION.RecruitCohortAssets() function call
- COMMANDER: added total weight to LEGION.RecruitCohortAssets() function call
- POSITIONABLE: fixed bug in relFuel calculation for cargo bay size
2022-03-10 10:05:21 +01:00
Frank
ff1ebf9775 OPS
- Legion: Improved max number of transport assets.
- OPSGROUP: fixed bugs in speed parameter
2022-03-09 19:07:24 +01:00
Applevangelist
e6f388518a Update CTLD.lua (#1693)
minor nil check
2022-03-09 10:28:26 +01:00
Frank
3557706e3a OPS
- Added new AUFTRAG type  CASENHANCED
- Improved capturing of OPSZONES by CHIEF
2022-03-05 14:43:39 +01:00
Applevangelist
f3d0d55a2f CTLD - small extra nil check in _GetUnitCargoMass(Unit 2022-03-03 12:34:55 +01:00
Applevangelist
b0c2bad1d8 CTLD - small fix for finding crates when using engineers 2022-03-03 11:02:14 +01:00
Applevangelist
53c9ca3b3a SEAD/MANTIS - added Silkworm ASM 2022-03-03 11:02:14 +01:00
Frank
e41ba1be45 Troop Transport
- Auftrag TROOPTRANSPORT: troops will wait in a zone and not at the exact position where the carrier lands.
2022-03-02 09:34:18 +01:00
Applevangelist
594febaece CSAR - remove double class 2022-02-21 19:36:13 +01:00
Applevangelist
890dae8ba7 SEAD - adding workaround for AGM_154 which lost target data 2022-02-21 08:35:56 +01:00
Applevangelist
8a3120be39 AUTOLASE - added nil check for CanLase() 2022-02-19 13:26:02 +01:00
Applevangelist
6b4975559d CSAR - added wet feet check if also using csarUsePara (no landing event triggered) 2022-02-18 08:22:57 +01:00
Applevangelist
3326550705 CSAR - added "wet feet" option for a 2nd template to be used over water 2022-02-17 17:41:20 +01:00
Frank
6be0d82fc6 Merge branch 'develop' into FF/Ops 2022-02-16 12:23:03 +01:00
Applevangelist
44ad841d05 CTLD - fix side effects in weight check - fixes #1688 (#1689)
Fixed _FindCratesNearby() to optionally ignore the helo's max load capacity, which prevented CTLD from finding, listing, building crates is weights are used. Fixes #1688
2022-02-16 10:02:44 +01:00
Applevangelist
53f45ace4c CTLD - corrected default weight limits when using CTLD:UnitCapabilities() - was setting loadable weight to zero 2022-02-15 18:07:14 +01:00
Applevangelist
42e9cae876 added back GROUP:GetHighestThreat() 2022-02-15 14:41:45 +01:00
Applevangelist
e46922d341 small correction 2022-02-15 07:30:41 +01:00
Applevangelist
21c242ee05 Added CTLD:SetTroopDropZoneRadius(Radius) 2022-02-13 12:07:57 +01:00
Frank
33b7a0cef2 Merge branch 'develop' into FF/Ops 2022-02-08 08:53:03 +01:00
Frank
9cddca1af5 AUFTRAG and WAREHOUSE
- Added check for AUFTRAG that if it is executing and all groups are dead, it's done
- Added check in WAREHOUSE find parking that units need to be alive
2022-02-08 08:52:47 +01:00
Applevangelist
8cdf0d9fce CSAR - CSAR:SpawnCSARAtZone(Zone ...) - Zone can now be a ZONE object as well as a string 2022-02-08 07:49:16 +01:00
Applevangelist
a079ac4207 CTLD - allow AFB zones smoke/flare 2022-02-07 12:17:41 +01:00
Applevangelist
099238a2e5 CTLD - Allow option to create sub-category names for crates (normal, repair), added function to create zones from AFB/FARP names directly 2022-02-07 11:54:35 +01:00
Applevangelist
595bc16d92 DETECTION - added 3 missing functions 2022-02-04 08:56:34 +01:00
Applevangelist
e9875c8288 small correction 2022-02-04 08:54:22 +01:00
Applevangelist
ec600ab672 CTLD - Added Hercules support for crates, troops & vehicles loaded with the help of the ground crew and dropped from the plane. 2022-02-03 09:59:35 +01:00
Applevangelist
c3689aee93 AICSAR - added limiter for available helos 2022-02-01 11:47:36 +01:00
Applevangelist
60a728d521 SET - correct error in intersection 2022-02-01 08:03:02 +01:00
Applevangelist
7bd7071ec5 CTLD Docu updates 2022-01-31 11:36:20 +01:00
Applevangelist
bb787aa9ca Update Range.lua (#1686)
Target sheet saving abilities as added by @TonyG
2022-01-31 11:27:44 +01:00
Applevangelist
d2f629d100 CTLD - added maxweight, load weight checks for crates cargo, template checks 2022-01-31 11:15:24 +01:00
Applevangelist
5d949de0ee Point - fix typos 2022-01-30 09:49:42 +01:00
Applevangelist
e21bc8a930 POINT - added option to name and stop smoke/fire 2022-01-30 09:39:03 +01:00
Applevangelist
af79f63870 CTLD - small correction for Hercules 2022-01-27 15:56:10 +01:00
Applevangelist
4ff32342e3 AI Dispatchers - add ability to add/remove resources to/from a squad 2022-01-24 09:54:30 +01:00
Applevangelist
98d55faf4e CTLD - added selectable smoke drop color, droppable beacons 2022-01-23 11:37:53 +01:00
Applevangelist
bd532ea808 Added Callsigns as per 2.7.9 2022-01-23 11:37:28 +01:00
Applevangelist
d4bd57ee70 Autolase - small update on nil check 2022-01-21 10:09:12 +01:00
Applevangelist
90dbfb31a6 DETECTION - corrected call for Vec2 in zone 2022-01-19 07:51:43 +01:00
Applevangelist
55ca34cad3 Added doors check for UH-60L 2022-01-16 17:07:32 +01:00
Applevangelist
36a5e919cd CTLD, CSAR - added support for UH-60L 2022-01-16 11:39:37 +01:00
Applevangelist
3263ba1440 CTLD - make container shape configureable 2022-01-15 11:32:51 +01:00
Tony
9721c19e48 Update Range.lua (#1683)
Addition of self.rangename to results for Rangeboss
2022-01-10 15:10:49 +01:00
Applevangelist
de71213eed AICSAR - added SRS and DCS radio capabilities, changed order of messages for initial spawning, documentation 2022-01-06 13:47:47 +01:00
Applevangelist
65abbf9563 AICSAR - added SRS option, made it easy to customize messages 2022-01-04 15:09:47 +01:00
Applevangelist
a94098494a Docu updates 2022-01-01 14:57:40 +01:00
Applevangelist
ec935356aa Mark visible as deprecated 2021-12-31 17:51:48 +01:00
Applevangelist
6ab419dfad Fix ATC new NTTR AFB names 2021-12-31 17:51:48 +01:00
Applevangelist
b1ffcff064 Update Moose.files (#1679) 2021-12-31 15:37:08 +01:00
Applevangelist
4ce09a3845 New Module AI CSAR 2021-12-31 15:36:35 +01:00
Applevangelist
9686e74feb Update Airbase.lua (#1678)
Changed (again) Airport names on the Nevada map
2021-12-30 07:46:14 +01:00
Frank
e97e24762d Merge pull request #1676 from FlightControl-Master/Applevangelist-patch-1
Update Range.lua
2021-12-29 15:41:48 +01:00
Applevangelist
b3fd0805e8 Update Range.lua 2021-12-29 08:59:45 +01:00
Applevangelist
300092d07d SEAD - fix a rare case when a coordinate of a weapon cannot be found 2021-12-28 08:28:19 +01:00
Applevangelist
56ed3a11d6 Scoring - docu changes 2021-12-28 08:28:19 +01:00
Applevangelist
6938b20ab6 Group - added docu 2021-12-28 08:28:19 +01:00
Frank
77f2cf5089 Merge pull request #1672 from FlightControl-Master/FF/Ops
AIRWING
2021-12-23 19:55:27 +01:00
Frank
19e3b015c5 Merge branch 'develop' into FF/Ops 2021-12-23 19:54:15 +01:00
Frank
2702d0fc2a AIRWING
- Fix for missions not being assigned
2021-12-23 19:54:01 +01:00
Applevangelist
472a4883f0 ZONE: Set down trials for getting a random coordinate on a given land type to 100
Cohort -ensure fallback of mission range
2021-12-22 11:48:42 +01:00
Frank
485e2e18bf Merge pull request #1671 from FlightControl-Master/FF/Ops
OPS
2021-12-21 11:57:09 +01:00
Frank
40c0f69eff OPS
- Airwing added :SetPayloadAmount() and SetAirboss() functions
- AUFTRAG fixed Failure to Failed event name
- CHIEF added statics as targets
- LEGION added check that runway is operational and carrier is not recovering for mission selection
2021-12-21 11:54:55 +01:00
Frank
854a1e5723 Update ArmyGroup.lua
- Fixed speed nil in ofafterUpdateRoute
2021-12-17 15:57:28 +01:00
Applevangelist
f4cd28cdb9 fixes 2021-12-17 14:31:06 +01:00
Applevangelist
5bae790dd8 Fix a rare occasion 2021-12-17 14:15:08 +01:00
Frank
d1d43c38cd Merge pull request #1668 from FlightControl-Master/FF/Ops
OPS
2021-12-17 13:29:08 +01:00
Frank
7e1552eeb4 Merge branch 'develop' into FF/Ops 2021-12-17 13:27:13 +01:00
Frank
7306bf28e0 OPS
- CHIEF: fixed ground groups deployment
- AUFTRAG: minor fixes
- OPSGROUP: emission option
2021-12-17 13:26:27 +01:00
Applevangelist
07e00a8faf Noise reducing measures 2021-12-15 13:46:33 +01:00
Applevangelist
ab93866366 Removing noise 2021-12-14 17:28:16 +01:00
Applevangelist
d7801b59e7 OPS - making a couple of modules much less noisy as the logs on a large mission get rather big 2021-12-14 13:40:16 +01:00
Applevangelist
ea926f173a CSAR - make beacon length configureable 2021-12-14 09:50:13 +01:00
Applevangelist
f6b55da0c6 CSAR - override suppressmessages for menu driven information 2021-12-12 19:48:49 +01:00
Applevangelist
ee4e562874 CTLD - corrected landheight of dropped smoke 2021-12-12 19:30:00 +01:00
Applevangelist
abfe5ffc45 Typos 2021-12-11 19:41:21 +01:00
Applevangelist
9629b0e1a3 SET - Added Zone Filter for STATIC 2021-12-11 14:24:07 +01:00
Applevangelist
80b03dd194 CTLD Added menu for smoke/flare 2021-12-11 14:13:43 +01:00
Applevangelist
3f92f8d2aa SET - added a couple of zone filters for GROUP, UNIT, CLIENT and PLAYER 2021-12-10 16:02:50 +01:00
Applevangelist
823c94cace BRIGADE - Added function to load platoons back into the field 2021-12-10 12:09:04 +01:00
Frank
421ac6c427 Fixes in AUFTRAG and LEGION
- Object in AUFTRAG:_TargetFromObject(Object) can be nil
- Assets are optimized wrt later mission type for assets on alert5
2021-12-10 10:38:34 +01:00
Applevangelist
72550d6d84 small changes Legion & Auftrag 2021-12-09 17:44:44 +01:00
Applevangelist
72999cc7b0 Update Zone.lua (#1660) 2021-12-09 07:16:29 +01:00
Applevangelist
706cf641b3 Multiple fixes 2021-12-08 19:27:22 +01:00
Applevangelist
d42bdb2505 Revert "Ops - Various"
This reverts commit 23ea5d9d06.
2021-12-07 18:13:13 +01:00
Applevangelist
9082054ba9 Revert "legion"
This reverts commit abc69bc838.
2021-12-07 18:10:21 +01:00
Applevangelist
abc69bc838 legion 2021-12-07 17:35:56 +01:00
Applevangelist
23ea5d9d06 Ops - Various 2021-12-07 16:09:02 +01:00
Applevangelist
8d009d6366 Some false values seem to be in need of being set explicitly 2021-12-06 15:15:46 +01:00
Applevangelist
8213b51bd6 Update Utils.lua (#1654)
Small bugfix in UTILS.LoadSetOfGroups
2021-12-06 14:56:42 +01:00
Applevangelist
a18fc2080d SET - slight change in remove function 2021-12-06 10:26:01 +01:00
Applevangelist
9c0ac0ff57 CHIEF - ArmoredGuard ensure on road 2021-12-04 18:40:14 +01:00
Applevangelist
c34dc9f946 CHIEF/AUFTRAG/OPSGROUP Fixed RECON type mission adhereing to paramters adinfinitum and randomly, fixed CAS mission in CHIEF 2021-12-04 16:24:45 +01:00
Applevangelist
1c5c205614 OpsGroup - corrected speed calculation from DCSTask 2021-12-03 16:51:06 +01:00
Applevangelist
897df1b8fa CHIEF - Option to allow ground transport. Set CAS speed to 70% max as Russian Helos are overly slow 2021-12-03 14:27:03 +01:00
Applevangelist
3fb22b7c55 AUFTRAG - correct wrongly corrected speed conversion 2021-12-02 16:07:34 +01:00
Applevangelist
7819a30c57 BRIGADE - Fuel zones landing in the wrong table. Corrected 2021-12-02 12:17:48 +01:00
Applevangelist
37d2c72945 MANTIS - added variable ranges for short, med and long range systems. Altered engage range to 95% and shoradactivation to 25km as defaults
AUFTRAG/CHIEF/OPSGROUP - added Auftrag type ARMOREDGUARD to have an ONGUARD mission for tanks w/o triggering transport by CHIEF
Made classes around CHIEF & AIRBOSS a bit less noisy as it kills my logfile
2021-12-02 10:13:38 +01:00
Applevangelist
5631e2c09f Minor changes 2021-11-29 08:03:58 +01:00
Applevangelist
c7ddd6ec35 CSAR - added check smoke/flare distance is valid 2021-11-27 17:27:58 +01:00
Applevangelist
7280ceac32 ARMYGROUP - in tracing, formation flag can be empty 2021-11-26 15:36:46 +01:00
Applevangelist
f8b9128d8e CHIEF - Added catch if coalition us given as string 2021-11-26 15:36:09 +01:00
Applevangelist
c482f1dccd Corrected typo in Unit.Category.HELICOPTER 2021-11-26 15:35:45 +01:00
Applevangelist
7e306be8aa UTILS - Added functionality to save & load groups and statics information 2021-11-26 15:34:47 +01:00
Frank
035e6913b5 Merge pull request #1643 from FlightControl-Master/Applevangelist-armor-1
CHIEF - Added use of ARMORATTACK
2021-11-24 13:38:25 +01:00
Applevangelist
e12f233afc Update Chief.lua 2021-11-24 13:32:39 +01:00
Applevangelist
26c7ff8c18 Update Chief.lua 2021-11-24 13:32:14 +01:00
Frank
5647364293 Merge pull request #1644 from FlightControl-Master/Applevangelist-armor-1-1
OpsGroup - Added support for ARMORATTACK
2021-11-24 13:17:45 +01:00
Frank
06fa585f69 Merge pull request #1642 from FlightControl-Master/Applevangelist-Armor-1
Auftrag - Added type ARMORATTACK
2021-11-24 13:17:13 +01:00
Applevangelist
035eac2f1e OpsGroup - Added support for ARMORATTACK
OpsGroup - Added support for ARMORATTACK
2021-11-24 12:09:07 +01:00
Applevangelist
f01889cbf7 CHIEF - Added use of ARMORATTACK 2021-11-24 12:07:03 +01:00
Applevangelist
73025bfd4b Auftrag - Added type ARMORATTACK
Auftrag - Added type ARMORATTACK
2021-11-24 12:06:02 +01:00
Applevangelist
aec6dd1246 SEAD/SHORAD - Add AGM-88 player modes handling 2021-11-22 11:37:10 +01:00
Applevangelist
ab4411e5bb SEAD - calculate HARM impact point from firing position if no target data is given
SHORAD - ignore HARM AGM-88 is not fired at a specific target
2021-11-21 18:40:04 +01:00
Frank
0ac00efda6 Merge pull request #1641 from FlightControl-Master/FF/Ops
Ff/ops
2021-11-20 22:38:38 +01:00
Frank
f32eb8d710 OPS
AUFTRAG
- Added mission task param for RECON, PATROLZONE and TROOPTRANSPORT

FLIGHTGROUP
- Fixed CheckGroupDone if group is engaging and has a paused mission

TARGET
- Added GetThreatLevelMax functions

CHIEF
- Added :AddGciCapZone() function
2021-11-20 22:36:15 +01:00
Frank
ec33dfb76c Merge branch 'develop' into FF/Ops 2021-11-20 20:38:40 +01:00
Frank
43dfbac2fa Update Auftrag.lua
- Changed ROE in ESCORT auftrag from OpenFireWeaponFree to OpenFire
2021-11-20 20:38:23 +01:00
Frank
7a483abec2 Merge pull request #1639 from FlightControl-Master/Applevangelist-ArmyGroup-1
Update ArmyGroup.lua
2021-11-20 17:50:36 +01:00
Frank
35e6b6faf4 Merge pull request #1637 from FlightControl-Master/Applevangelist-Chief-1
CHIEF - Updates
2021-11-20 17:49:30 +01:00
Frank
1066b58fb6 Merge pull request #1640 from FlightControl-Master/Applevangelist-OpsZone-2
Update OpsZone.lua
2021-11-20 17:47:43 +01:00
Applevangelist
b41b8f251f Update Chief.lua 2021-11-20 17:26:42 +01:00
Applevangelist
a1426c3e81 Update OpsZone.lua 2021-11-20 17:12:33 +01:00
Applevangelist
aa3967d88f Update ArmyGroup.lua
Added code to obey routing on roads
2021-11-20 17:09:55 +01:00
Applevangelist
c610c4cba9 Update Chief.lua
Added some improvements to threat calculation
2021-11-20 17:08:20 +01:00
Applevangelist
abb3a2dbd2 CHIEF - Updates
Added alignment to OpsZone Mission table. Added ARTY. Added Tanks for patrol
2021-11-19 16:03:25 +01:00
Frank
1f035301d9 Merge pull request #1636 from IsmaelB83/InboundCallMarshall
Inbound call marshall
2021-11-19 15:48:28 +01:00
Frank
ebf7f76d48 Merge pull request #1635 from FlightControl-Master/Applevangelist-OpsZone-1
OpsZone -Mission Table
2021-11-19 15:47:18 +01:00
Ismael
397ab77105 This pull request enhances Airboss class functionality to provide with the
1) Inbound calls both from Players requesting marshal and AI sent to marshal:
"Marshal, [MODEX], marking mom's [BEARING] for [DISTANCE], angels [HEIGHT], state [FUEL_STATE]
2) Commencing call and voiceover (both AI and Players)

For that, two boolean fields have been added to Airboss class to trigger or not extra voice overs:
xtVoiceOvers
xtVoiceOversAI

These fields can be modified trough methods:
AIRBOSS:SetExtraVoiceOvers(true/false)
AIRBOSS:SetExtraVoiceOversAI(true/false)

Note. At the moment both methods initialize to "false" at Airboss:NEW, so in case you want to have this functionality activated, you need to call the methods with (true) when initializing your Airboss class.
The new methods in charge of creating the radio calls are
AIRBOSS:_MarshalAI: for AI flights send to marshal
AIRBOSS:_RequestMarshal: for player flighs requesting marshal from F10 menu

2) AIRBOSS:_CommencingCall(unit, modex), which is called from
AIRBOSS:_ClearForLanding: for AI flights cleared for landing
AIRBOSS:_RequestCommence: for player flights requesting commencing from F10 menu (disregarding if the player call is right or not)

This enhacement of the Airboss class requires 5 new sound files (.ogg) to be included to folder "\Airboss Soundfiles" in your .miz file:
PILOT-Angels.ogg
PILOT-For.ogg
PILOT-MarkingMoms.ogg
PILOT-Marshal.ogg
PILOT-State.ogg
PILOT-Commencing.ogg
2021-11-19 15:31:49 +01:00
Applevangelist
f37abc69ea Update OpsZone.lua 2021-11-19 14:29:18 +01:00
Applevangelist
ee85b0e057 OpsZone -Mission Table
Added functionality to admin missions attached to an OpsZone (for CHIEF)
2021-11-19 14:20:53 +01:00
Ismael
eab28abc86 Subject: Add Player and AI Inbound radio calls to better inmersion in Airboss #16311
This commit enhances Airboss class functionality to provide with the inbound calls both from Players requesting marshal and AI sent to marshal:
- "Marshal, [MODEX], marking mom's [BEARING] for [DISTANCE], angels [HEIGHT], state [FUEL_STATE]

Two new boolean fields have been added to Airboss class to trigger or not the inbound calls:
- inRadioCall
- inRadioCallAI

These fields can be modified trough methods:
- AIRBOSS:SetInboundMessagesPlayer(false)
- AIRBOSS:SetInboundMessagesAI(false)
Note. At the moment both methods initialize to "false" at Airboss:NEW, so in case you want to have this functionality activated, you need to call the methods with (true) when initializing your Airboss class.

This enhacement of the Airboss class requires 5 new sound files (.ogg) to be included to folder "\Airboss Soundfiles" in your .miz file:
- PILOT-Angels.ogg
- PILOT-For.ogg
- PILOT-MarkingMoms.ogg
- PILOT-Marshal.ogg
- PILOT-State.ogg

To get them, please refer to the SOUNDS MOOSE repository or the discord channel. Where they will be available.
2021-11-19 01:11:49 +01:00
Applevangelist
16c5307fc2 COMMANDER - Zone parameter doc not correctly mentioned in Luadocs 2021-11-18 10:58:42 +01:00
Applevangelist
8c8cae1e27 AUFTRAG - wrong speed conversion lines 925/295 corrected to KnotsToKmph 2021-11-18 10:58:13 +01:00
Frank
925c645821 Merge pull request #1633 from FlightControl-Master/FF/Ops
OPS
2021-11-17 17:17:11 +01:00
Frank
c1c97a86b7 OPS
- COMMANDER: Added GCICAP zones
- AIRWING: Improved patrol zone counting, fixed bug in NewPatrolPoint
- OPSGROUP: mission speed acknowledged
2021-11-17 17:15:44 +01:00
Applevangelist
1fc1016148 Update Auftrag.lua
Added missionSpeed to Orbit
2021-11-17 16:42:58 +01:00
Frank
e73545d296 Merge pull request #1630 from dogjutsu/dogutsu/develop
Fixed some typos of forms of the word 'strategy'.
2021-11-16 22:08:00 +01:00
dogjutsu
f2fb7d43d0 Fixed some typos of forms of the word 'strategy'. 2021-11-16 12:45:14 -08:00
Applevangelist
781d421e1c slightly changes message 2021-11-16 15:48:00 +01:00
Applevangelist
a3a7464a29 Small fix fox autoshorad parameters 2021-11-16 10:34:42 +01:00
Frank
ac936f5650 Merge pull request #1629 from FlightControl-Master/FF/Ops
Scheduler
2021-11-16 10:34:12 +01:00
Frank
c0f5dc2dc8 Scheduler
- Fixed bug
2021-11-16 10:33:35 +01:00
Applevangelist
31c113180e MANTIS - Zones - added conflict zones 2021-11-16 09:26:05 +01:00
Applevangelist
239df2deb2 SEAD - Updated TTI calculation for Tomahawk long shots 2021-11-16 09:25:38 +01:00
Applevangelist
31a8c4b0b9 SHORAD - Updates for missile without set target intel 2021-11-15 16:18:21 +01:00
Applevangelist
f394bd45c7 SEAD - Updated to handle missiles w/o clear targets 2021-11-15 16:18:21 +01:00
Applevangelist
63999c9ec3 MANTIS - Added Attacker group info on planned/started suppression events 2021-11-15 16:18:21 +01:00
Frank
82c24cee7e Merge pull request #1628 from FlightControl-Master/FF/Ops
scheduler
2021-11-15 10:22:35 +01:00
Frank
5e94b0c009 Update Base.lua 2021-11-15 10:20:34 +01:00
Frank
452ff62134 SCHEDULER 2021-11-15 10:19:21 +01:00
Frank
3df494cacd Merge pull request #1627 from FlightControl-Master/FF/Ops
Ff/ops
2021-11-14 23:31:03 +01:00
Frank
d62bb59df7 OPS
- Clean up tracing
2021-11-14 22:12:41 +01:00
Applevangelist
b367f9320b CSAR - don't make usePara default. Added coalition check if using the parachute landing event 2021-11-14 13:33:31 +01:00
Applevangelist
4bc3dbbf6c MANTIS - added auto-setup of SHORAD 2021-11-14 13:13:41 +01:00
Applevangelist
e7b7e3ac96 Merge pull request #1626 from FlightControl-Master/Applevangelist-unit-2
Wrapper Unit fix missile count
2021-11-14 13:00:35 +01:00
Applevangelist
f3c4aea12f Wrapper Unit fix missile count
missile count for SAM and CRUISE types #1624
2021-11-14 12:59:24 +01:00
Frank
b9b5938a91 OPS
- Fixed refuel system always true.
2021-11-13 20:08:22 +01:00
Applevangelist
e7fdcf0db4 SEAD - Slightly wider escape radius 2021-11-13 19:11:25 +01:00
Applevangelist
c1f22aa556 MANTIS - Added support for HighDigitSAM mod, added blindspot management, corrected distinguising between SA-2 and SA-3 2021-11-12 15:27:05 +01:00
Applevangelist
991b4089d6 SHORAD radius clarification 2021-11-12 15:25:25 +01:00
Frank
a8132552de OPS
- Fixed bug in egress coord
- Improved barrage mission
- improved pickup at legion
- fixed bug in SetPathfindingOff function
2021-11-11 21:16:48 +01:00
Applevangelist
a0323aef19 MANTIS - Some docu updates 2021-11-11 18:34:06 +01:00
Applevangelist
a38abc2f7f MANTIS - latest updates 2021-11-11 17:45:25 +01:00
Applevangelist
a6beecf510 MANTIS - Added Auto Mode 2021-11-11 17:22:21 +01:00
Applevangelist
c5dece0e59 SEAD - make emissions on/off standard 2021-11-11 16:03:52 +01:00
Applevangelist
ce935bafc1 Small fix to switch off pattern matching 2021-11-09 09:53:23 +01:00
Applevangelist
fd426a96aa File functions 2021-11-09 09:51:31 +01:00
Applevangelist
fad8800842 Added Docu 2021-11-09 09:51:05 +01:00
Applevangelist
273a473db1 MANTIS/SEAD make docu Pikes-friendly 2021-11-08 15:21:20 +01:00
Applevangelist
a7588e517d SEAD - (re-)added emissions on/off option and ability to link object functions for state changes. 2021-11-08 13:11:58 +01:00
Applevangelist
84eff098eb MANTIS - Added FSM Events for SeadSuppressionPlanned/Start/ENd 2021-11-08 13:11:58 +01:00
Frank
f157f3b5d6 OPS
- Fixed mission alt for patrol zone auftrag
2021-11-07 22:32:17 +01:00
Frank
6cd00c60a7 Update OpsGroup.lua
- Fixed waypoint alt for missions
2021-11-07 21:39:38 +01:00
Frank
2ea951db61 Removed WIP classes
- F10MENUE and FLIGHTCONTROL
2021-11-07 19:43:02 +01:00
Frank
9d0bd0aabb Update OpsGroup.lua 2021-11-07 19:39:53 +01:00
Frank
3d88d16b4b Merge branch 'FF/Ops' into FF/OpsDev 2021-11-07 18:24:48 +01:00
Frank
02724dc26d Merge branch 'develop' into FF/Ops 2021-11-07 18:20:27 +01:00
Frank
21a93652cd Update OpsGroup.lua
- Fix for AUFTRAG carried out only after the group has passed all waypoints
2021-11-07 16:08:11 +01:00
Frank
fb4caf1a42 OPS
- Improved transport path
2021-11-07 16:03:44 +01:00
Frank
7a2508bf17 OPSTRANSPORT
- Improved pre-defined paths for pickup and transport
2021-11-06 18:10:49 +01:00
Applevangelist
eeeab86952 added altered message 2021-11-06 18:07:42 +01:00
Applevangelist
a149ff1705 Switch for fratricide and treason (coalition changes) 2021-11-06 15:15:30 +01:00
Applevangelist
2c73c9c815 Merge pull request #1620 from FlightControl-Master/Applevangelist-casevac-1
CSAR additions by Shagrat
2021-11-05 16:31:22 +01:00
Applevangelist
f6f29db9f1 CSAR additions by Shagrat
Added functionality for Casevac
2021-11-04 17:23:29 +01:00
Frank
c823a68616 OPS
- Fixed several bugs
2021-11-02 21:14:15 +01:00
Applevangelist
e7e2184760 Autolase - fixed error when not using a pilotset 2021-11-01 19:46:56 +01:00
Applevangelist
6fe2422bc9 SRS Google addition by rollnthndr 2021-10-31 11:53:53 +01:00
Applevangelist
cd62776be6 AIRBOSS additions by Pene 2021-10-31 11:53:24 +01:00
Applevangelist
037357efe9 Merge pull request #1619 from bbirchnz/ctld-crate-leak
fix cleanup of crates on load or build.
2021-10-31 11:31:19 +01:00
Ben Birch
8d3910ea4c fix cleanup of crates on load or build. 2021-10-31 19:37:26 +11:00
Applevangelist
3e5926f706 Speedmax returning 0 not nil 2021-10-30 16:32:59 +02:00
Applevangelist
a1d67bf539 Speedmax returning 0 not nil 2021-10-30 16:32:42 +02:00
Applevangelist
3e65457041 doc impro 2021-10-29 18:30:22 +02:00
Applevangelist
f70180eb66 SET_BASE - cmpleted GetSetComplement 2021-10-29 10:20:34 +02:00
Applevangelist
c0a558e229 Merge pull request #1616 from Zonr0/Zonr0-ExternalToolsFix
Fixes broken external tools
2021-10-28 15:45:02 +02:00
Applevangelist
801069f5ac Update Moose_Create.lua 2021-10-28 15:39:57 +02:00
Frank
f9dcac8264 Merge branch 'master' into develop 2021-10-28 10:21:16 +02:00
Frank
902c001aa4 OPS
Improved OPSTRANSPORT
2021-10-28 10:04:01 +02:00
Applevangelist
0cf2a4353d doc build - next try 2021-10-28 09:13:36 +02:00
Applevangelist
13c8cc90f2 doc build fix 2021-10-28 08:41:10 +02:00
Applevangelist
db231fafeb Docs build test 2021-10-28 08:12:27 +02:00
Andrew Waugh
c3f7deb602 Fixes broken external tools
Several small changes that should hopefully be a nice QoL upgrade for generating the imports and lead to less newbie confusion.

* Adds a lua binary directly to the repository instead of just expecting the user to have installed it via choco. Added binary is 5.4 as that's the lowest 5.x exe that's easily downloaded, and it works fine for what we need.
* Modifies the launch targets to use workspace_loc macros instead of resource_loc macros. Workspace_loc requires the user to have correctly set the name of their project, but that is already stressed in the documentation.  resource_loc was just wrong. (project_loc would cause problems if the user had selected something outside of the moose project before running).
* Modifies launch targets to use the folder structure that the project is actually structured with.
* Adds the include folder and files so Eclipse doesn't explode when they are missing.
* Small modifications to Moose_Create, also includes a path conversion function that in my testing doesn't make a difference eitherway on Windows, but is there for a troubleshooting option.
* Adds courtesy instructions when generating the dynamic include file.
2021-10-27 20:18:10 -07:00
Applevangelist
300e3f2f58 Merge pull request #1615 from FlightControl-Master/Applevangelist-docpatch
Update Task_Cargo_Transport.lua
2021-10-27 13:10:40 +02:00
Applevangelist
513406f0e5 Update Task_Cargo_Transport.lua 2021-10-27 13:09:30 +02:00
Applevangelist
27e21e77f9 Update Task_Cargo_Transport.lua 2021-10-27 11:19:32 +02:00
Applevangelist
dadfd803f7 Update Autolase.lua
added docu
2021-10-26 13:58:11 +02:00
Frank
02b0ba2278 OPS
- Improved behaviour of OPSTRANSPORT when cargo or carrier is on mission.
2021-10-25 22:17:56 +02:00
Applevangelist
3e1005aef1 Small correction to silence wall of text when adding tasks to a mission 2021-10-25 16:29:14 +02:00
Applevangelist
e2eb13739c Commented out wall of text when joining a unit as a player 2021-10-25 16:28:40 +02:00
Applevangelist
c52e30ceae Added smoke color per RECCE 2021-10-25 16:28:11 +02:00
Applevangelist
07754cdf5f Merge pull request #1614 from madmoney99/develop
Forrestal Wire Corrections
2021-10-24 09:14:10 +02:00
madmoney99
c74c475a29 Forrestal Wire Corrections
Tested on MP and SP.  Both were recording incorrect wires on 1/2 and 4 wires regularly with an occasional 3 wire miss.  This tested correct in the Hornet.

TonyG
2021-10-23 16:34:21 -07:00
Applevangelist
ad36ab520b Added Bell-47 2021-10-22 17:04:03 +02:00
Applevangelist
bc32ff5db9 Added Bell-47 2021-10-22 17:03:57 +02:00
Frank
6009432933 OPS
- NAVYGROUP added engage target
- Barrage improvments
2021-10-22 11:23:29 +02:00
Frank
99eaa37c76 Merge branch 'master' into develop 2021-10-20 19:56:31 +02:00
Frank
ed6d5f727a OPS 2021-10-20 19:49:26 +02:00
Frank
c6995d6e58 OPS
- Fixed AUFTRAG :Repeat()
- Fixed bug in BRIGADE
- Improved cargo bay calculation in POSITIONABLE (includes rel. fuel)
- Changed carrier event names in OPSGROUP

- New class F10MENU (not sure about it)
2021-10-19 10:19:26 +02:00
Frank
cb0f453a8d Merge branch 'FF/Ops' into FF/OpsDev 2021-10-16 13:41:40 +02:00
Frank
d9866846ad Merge branch 'FF/MasterDevel' into FF/Ops 2021-10-16 13:40:37 +02:00
Frank
de5d9195f3 OPSGROUP
- Cargo bay of element remains after respawn
- Added some docs for CHIEF
2021-10-16 09:32:47 +02:00
Frank
fd1fe8562c Merge branch 'develop' into FF/Ops 2021-10-12 22:20:20 +02:00
Frank
b1298223aa Merge branch 'master' into develop 2021-10-12 22:18:43 +02:00
Applevangelist
c48128d92e CSAR - Added country options for spawned pilots 2021-10-12 08:30:44 +02:00
Frank
0f4d466953 OPS
- Changed mission, legion in MissionAssign functions (LEGION, COMMANDER, CHIEF)
- OPSTRANSPORT: improved TZC selection
- ARMYGROUP needs to
2021-10-11 21:28:35 +02:00
Applevangelist
1b752fcaf6 CTLD - bug fix for open doors 2021-10-11 18:47:39 +02:00
Applevangelist
d06db9909c AUTOLASE Small update 2021-10-11 14:11:58 +02:00
Applevangelist
921024035c AUTOLASE - cleanup, added SRS option 2021-10-08 12:33:33 +02:00
Applevangelist
3b1c8c3deb AUTOLASE - added LOS check, maxlasingunits valid per lasing Recce 2021-10-07 18:16:40 +02:00
Applevangelist
69862ab67d CSAR - try to avoid spawning under water 2021-10-07 18:15:50 +02:00
Applevangelist
b05c321306 CTLD - added door check for troops 2021-10-07 18:15:13 +02:00
Applevangelist
9b74a58dde UTILS - added door check for Hercules 2021-10-07 18:14:50 +02:00
Applevangelist
d112ffaf6a Autolase - better calculation of LoS for lasing, somewhat faster detection 2021-10-07 09:49:06 +02:00
Applevangelist
554f063def INTEL - allow variable update times 2021-10-07 09:46:06 +02:00
Frank
f6dce02203 INTEL
- Introduced pcall to getName() of detected objects. Found a problem with an object of ID 5,000,031
2021-10-06 22:03:02 +02:00
Frank
653dfe82fa OPS CHIEF
- Improved target queue for assigning new missions
2021-10-06 13:25:57 +02:00
Frank
5dbf743052 OPS
- Fixed a couple of minor bugs.
- FC added _PlayerAbortInbound function
2021-10-05 23:59:24 +02:00
Applevangelist
f7e7e2e41c ZONE_CAPTURE_COALITION - fix an error when monitoring hits but the Event Function delivers SCENERY as a hit UNIT 2021-10-05 19:07:59 +02:00
Applevangelist
b28b4db7fd docu fixes 2021-10-05 19:06:49 +02:00
Applevangelist
c34f30e4a3 Docu fixes 2021-10-05 19:06:40 +02:00
Applevangelist
aa7f11185d Small update 2021-10-05 19:06:30 +02:00
Frank
1790d19809 FC 2021-10-03 23:09:45 +02:00
Frank
fa6fbca67b OPS
- Added tanker and CAP zones
2021-10-03 21:33:33 +02:00
Applevangelist
cd79c57a27 AUTOLASE - added Cancel FSM to stop, docu changes, option to notify pilots in the set only 2021-10-02 14:45:37 +02:00
Applevangelist
4c3a97e2b2 Autolase! 2021-10-01 17:29:22 +02:00
Applevangelist
f126dceeae Merge pull request #1610 from FlightControl-Master/Applevangelist-Autolase-2
Update Moose.files
2021-10-01 17:26:50 +02:00
Applevangelist
414521acc5 Merge pull request #1611 from FlightControl-Master/Applevangelist-autolase-3
Update Modules.lua
2021-10-01 17:26:40 +02:00
Applevangelist
9147422340 Merge pull request #1609 from FlightControl-Master/Applevangelist-Autolase-1
Create Autolase.lua
2021-10-01 17:26:29 +02:00
Applevangelist
920646ea74 Update Modules.lua
added autolase
2021-10-01 17:24:25 +02:00
Applevangelist
c57d839927 Update Moose.files
Add Autolase.lua
2021-10-01 17:22:58 +02:00
Applevangelist
e7fd5db2c2 Create Autolase.lua
Added Class AUTOLASE
2021-10-01 17:20:17 +02:00
Applevangelist
b76486ef5f CSAR - added parameters for hovering rescue 2021-10-01 14:52:25 +02:00
Applevangelist
5c06584676 UTILS - correction door check MI-8 2021-10-01 14:52:00 +02:00
Frank
2ae2ee64be OPS
- Lots of updates and improvements
2021-10-01 12:04:15 +02:00
Applevangelist
17ba35e237 INTEL - also set isship and isground attributes on contacts 2021-10-01 10:44:25 +02:00
Applevangelist
53e98e70aa CTLD: added user-friendly function to inject static cargos: CTLD:InjectStaticFromTemplate(Zone, Template, Mass) 2021-10-01 10:43:49 +02:00
Applevangelist
359e18eb58 RADIO - delete frequency check 2021-09-30 08:07:42 +02:00
Applevangelist
3377459df5 Added option for silent mission addition 2021-09-29 16:57:45 +02:00
Frank
3e30d15405 Merge branch 'FF/Ops' into FF/OpsDev 2021-09-29 09:57:52 +02:00
Frank
2b50cf2243 Merge branch 'develop' into FF/Ops 2021-09-29 09:55:20 +02:00
Frank
b72e2b6bf9 Merge branch 'master' into develop 2021-09-29 09:34:37 +02:00
Frank
c7a2b34f59 Update Warehouse.lua
- Disabled fuel check.
2021-09-29 08:15:22 +02:00
Frank
b48958995a OPS
- Fixed oscillation between UpdateRoute and CheckGroupDone in FLIGHTGROUP
- Improvements regarding capturing zones.
- Reduced log output
2021-09-28 23:26:33 +02:00
Applevangelist
58c496eacd GROUP - GROUP:GetAmmunition() - fix to also return bomb count correctly 2021-09-28 16:52:18 +02:00
Applevangelist
7bd867c9dd SEAD - Docu changes for Intellisense 2021-09-28 16:51:35 +02:00
Frank
be0558849c OPS
- Added rearming zones
- Improved rearming
2021-09-27 16:11:03 +02:00
Applevangelist
a1c7ec2ac9 Fix "local" error 2021-09-27 15:49:03 +02:00
Applevangelist
8bf073c0c6 Small fix for Airbase Parking Spot Finder 2021-09-26 09:51:02 +02:00
Frank
994689f05a OPS
- Improved transport assignments
2021-09-25 20:18:16 +02:00
Applevangelist
3e10f9f451 bugfix 2021-09-24 18:38:58 +02:00
Frank
972fa9f674 OPS
- Fixed bug in WAREHOUSE isShip
- FLIGHTGROUP added damage and ammo checks that trigger FSM events
- Improved engage detected targets
- Improved OPSZONE
2021-09-24 14:47:36 +02:00
Applevangelist
8e64d8e334 CTLD: Added mass and canCargo Flag on spawned statics. Use .enableslingload = true to use 2021-09-24 11:06:54 +02:00
Applevangelist
eccd81d40a SPAWNSTATIC - bigfix on canCargo (not:isCargo) and mass (not transported into template) when spawning 2021-09-24 11:05:42 +02:00
Applevangelist
649136f98f small updates, fixes 2021-09-23 12:43:28 +02:00
Frank
d7dae1366d OPS
- Improved OPSTRANSPORT for LEGION assets.
2021-09-22 19:27:33 +02:00
Applevangelist
19e2ebcd03 CTLD - Added statics as cargo (#1601)
.... and the ability to load and save them alongside your buildable crates.
2021-09-22 15:55:10 +02:00
Applevangelist
021c907d16 SET - Added SET_CLIENT:CountAlive() 2021-09-21 07:46:21 +02:00
Applevangelist
8ac3e28fdf CTLD - fix SAVE/LOAD when using no path on calls 2021-09-21 07:46:05 +02:00
Frank
c5af279730 OPS
- Fixed some stuff for Egress coordinate
- Fixed some bugs in OPSTRANPORT if disembark carriers are specified
2021-09-20 22:47:51 +02:00
Applevangelist
e9377e93f1 Postionable - Added Cargo Seats to VAB Mephisto 2021-09-20 14:20:09 +02:00
Applevangelist
6747c69511 CTLD Ability to fire an event on injection 2021-09-20 14:19:26 +02:00
Frank
9b6cae6c49 Update Commander.lua 2021-09-19 22:45:58 +02:00
Frank
7148bd1d42 OPS Escort
- Refined functions to recruit escort assets.
2021-09-19 22:10:52 +02:00
Frank
73940fffc6 Update Legion.lua
- Fix that assets did not get removed
2021-09-18 18:47:06 +02:00
Frank
09015449cd OPS Recruting
- Removed obsolete recruiting functions from code
2021-09-18 18:23:22 +02:00
Frank
4dfdb99731 OPS
- Recruit assets with new function (LEGION, COMMANDER, CHIEF)
2021-09-18 18:09:41 +02:00
Frank
bbbca04066 OPS Legion
- Added new global function to recruit assets.
2021-09-18 00:11:04 +02:00
Frank
e755bba608 OPS
- Clean up on "CheckMissionType" and "CheckMissionCapability" functions ==> moved to AUFTRAG as global functions.
2021-09-17 16:59:43 +02:00
Frank
9161cec238 OPS
- Simplified asset selection by using just one routine for LEGION, COMMANDER and CHIEF
2021-09-16 21:30:36 +02:00
Applevangelist
dc14b60fcc bug fixing 2021-09-16 15:09:51 +02:00
Applevangelist
da625d51f6 Merge pull request #1599 from FlightControl-Master/Applevangelist-CTLD-1
CTLD - Added persistance
2021-09-16 13:44:54 +02:00
Applevangelist
ce69055758 CTLD - Added persistance
-- ## 6. Save and load back units - persistance
-- 
-- You can save and later load back units dropped or build to make your mission persistent.
-- For this to work, you need to de-sanitize **io** and **lfs** in your MissionScripting.lua, which is located in your DCS installtion folder under Scripts.
-- There is a risk involved in doing that; if you do not know what that means, this is possibly not for you.
-- 
-- Use the following options to manage your saves:
-- 
--              my_ctld.enableLoadSave = true -- allow auto-saving and loading of files
--              my_ctld.saveinterval = 600 -- save every 10 minutes
--              my_ctld.filename = "missionsave.csv" -- example filename
--              my_ctld.filepath = "C:\\Users\\myname\\Saved Games\\DCS\Missions\\MyMission" -- example path
--  
--  Then use an initial load at the beginning of your mission:
--  
--            my_ctld:__Load(10)
--            
-- **Caveat:**
-- If you use units build by multiple templates, they will effectively double on loading. Dropped crates are not saved. Current stock is not saved.
2021-09-16 13:43:39 +02:00
Frank
589ebd5bca CHIEF
- Improved asset selection
2021-09-16 11:02:49 +02:00
Frank
35b50e1a9d OPSZONE and CHIEF 2021-09-14 23:51:03 +02:00
Frank
f038564b1b OPSTRANSPORT
- Added Cancel feature. First steps...
- Fixed a couple of other little bugs.
2021-09-13 16:04:16 +02:00
Frank
1d0eb9806d COMMANDER
- Added OPS transport (untested)
2021-09-13 08:31:00 +02:00
Applevangelist
c50a9bd318 CTLD - small bug fix on stock removal 2021-09-12 17:37:21 +02:00
Applevangelist
cd9006d29b CTLD - added alternative crate spawn by @mousepilot. Add menu item to list stock.Injected troops will not lead to cargo type duplication. 2021-09-11 15:20:36 +02:00
Applevangelist
d3b88f9065 bug fixing 2021-09-11 10:03:32 +02:00
Frank
6a6cb1961d OPS LEGION
- Improved asset selection for transports
2021-09-10 11:37:53 +02:00
Frank
884c51a69a OPSTRANSPORT
- Improved assignment to multiple legions.
2021-09-10 00:32:15 +02:00
Frank
6f126e6cd4 OPSCARGO
- fixes for Legion assignment
2021-09-09 13:35:10 +02:00
Frank
b0c2e5409a OPS AUFTRAG
- Added Alert 5 mission
- Added Fuel supply mission
- Added Ammo supply mission
2021-09-08 11:49:27 +02:00
Applevangelist
9516ec3cd2 CSAR: Gardening cleanup 2021-09-07 19:53:05 +02:00
Frank
aecb92ccd3 OPSGROUP
- Added EPLRS option
- EPLRS is on if group has datalink capability
2021-09-07 11:17:20 +02:00
Frank
bdf13f29f7 OPS
- COMMANDER and LEGION clean up of obsolete stuff for recruiting assets.
2021-09-06 23:40:58 +02:00
Frank
81120abfcb OPS
- LEGION and COMMANDER: Recruit assets for mission
2021-09-06 23:24:26 +02:00
Applevangelist
08a8170990 CTLD - improved crate spawning, added beacons / smoke / flare for ships, added documentation 2021-09-05 18:05:08 +02:00
Frank
316ea910c2 Update Cohort.lua
- Fixed some stuff for combat readiness check
2021-09-05 00:23:12 +02:00
Frank
0b5edfc21f OPSGROUP
- Ad infinitum fixes
- Turn into wind fixes
2021-09-04 23:51:17 +02:00
Applevangelist
76c08095ab CTLD - added country variable for crates 2021-09-03 18:38:51 +02:00
Frank
538864519e OPSGROUP
- Fixes that ARMY and NAVYGROUPS only go to first waypoint
- Fixes for PATROL and RECON missions that waypoints are added at the end
- Some other stuff
- Still need to fix adinfinitum
2021-09-03 18:20:28 +02:00
Applevangelist
cd6631049b CSAR - Removed message for dead pilots 2021-09-03 14:16:30 +02:00
Applevangelist
079f8030b7 CTLD - added unit parameter to place crates in correct distance. Refactored location calculation for crates. 2021-09-03 14:16:11 +02:00
Frank
ad0b32c0ee OPS
- Found and fixed bugs for ARMY and NAVY groups, which caused only one waypoint to be processed
- Added Duration for AUFTRAG
- Fixed bug in auftrag if no legion was assigned and mission was canceled at opsgroup level
- Trying (again) to include the whole route for ARMY and NAVY when UpdateRoute
- Simpler task function for passing waypoint

STILL a lot to do/check!
2021-09-03 00:05:58 +02:00
Applevangelist
8235b51a14 Bug fixing 2021-09-02 18:04:39 +02:00
Frank
1bd5e7472f OPSTRANSPORT v0.4.2
- Some fixed.
- All tested demo missions look nice
2021-09-02 08:30:54 +02:00
Applevangelist
7433a7144c CTLD Added method to inject troops into the field. 2021-09-01 13:33:43 +02:00
Frank
27632ecdd9 OPSTRANSPORT v0.4.1
- Fixed a couple of bugs
- Lots of other fixes and improvements
2021-09-01 00:07:54 +02:00
Frank
0b1e25b073 OPSTRANSPORT v0.4
- Multiple transport zone combos (TZC)
- Other issues solved.
- Demo miz D-day landing is still not working correctly.
2021-08-30 23:45:40 +02:00
Applevangelist
19a93f0026 MANTIS - allow SEAD padding in Mantis 2021-08-28 13:58:06 +02:00
Applevangelist
3256a6d596 SEAD - added time-back-on padding as variable 2021-08-28 13:57:15 +02:00
Frank
28ddfa5243 OPSTRANSPORT
- Fist working steps towards multiple pickup/deploy zone combos.
2021-08-28 00:17:16 +02:00
Applevangelist
05c560be3b CTLD - added delay after unsuccessful build or repair, relocate after done 2021-08-27 18:51:54 +02:00
Applevangelist
8ddd810fe2 SEAD - Refactor and enable delayed switch-off 2021-08-27 18:50:40 +02:00
Applevangelist
f20760bae5 CSAR - Remove some noise 2021-08-27 18:48:18 +02:00
Applevangelist
cea7320a9b UNIT/GROUP - added function to get the skill of a unit. SEAD - added functionality to calculate time-2-impact of HARMS and adjust behaviour accordingly 2021-08-27 14:56:50 +02:00
Frank
fe6826016c Update Chief.lua 2021-08-27 11:59:34 +02:00
Frank
f0167b3e88 OPS
- FSM pseudo function cleanup
- Fixed bug when mission is cancelled
2021-08-27 11:31:12 +02:00
Applevangelist
0edbf7f517 Added Engineering (Infantry) Troops 2021-08-27 09:14:54 +02:00
Frank
a8a8dcff3f OPS Chief
- Removed mission queue. Now done via COMMANDER
- MissionCancel is buggy
2021-08-26 23:24:11 +02:00
Frank
1b0ad13529 OPS Commander 2021-08-26 21:24:47 +02:00
Frank
418d6c882c Update OpsGroup.lua 2021-08-25 17:46:00 +02:00
Frank
1e6899c40b OPS 2021-08-25 17:20:17 +02:00
Frank
259b201e65 OPS
Good version solving a few bugs and adding some new stuff.
2021-08-24 23:10:38 +02:00
Applevangelist
8fb113a04e CTLD - 1) added ability to limit stock. 2) Stopping Herc Pilots to try and build on the fly (look at you, Gunterlund! ;) ) 2021-08-24 14:16:11 +02:00
Frank
c6ebbc6122 OPS
Strange version buggy
2021-08-23 23:34:15 +02:00
Applevangelist
755903a08e Changed priority to show bom target height in ft, in absence of player settings 2021-08-22 11:57:49 +02:00
Applevangelist
34e4825cd0 Merge pull request #1591 from bbirchnz/develop
CTLD: fix FOB units overwriting last instance, Unit Cargo Mass not working on first load
2021-08-22 08:32:18 +02:00
Ben Birch
a68eeae9bd Merge remote-tracking branch 'origin/develop' into develop 2021-08-22 12:54:25 +10:00
Ben Birch
e4e31b554e CTLD: fix FOB units overwriting last instance, Unit Cargo Mass not working on first load 2021-08-22 12:53:55 +10:00
Frank
eba6e3f5f1 OPS Transport+Legion, Navy 2021-08-22 00:31:51 +02:00
Frank
d73ebaca76 OPS
- Lots of stuff
2021-08-21 00:58:28 +02:00
Applevangelist
94167152e5 CTLD - added ability to spawn crates on ships 2021-08-20 12:33:10 +02:00
Applevangelist
830f76e909 Cleanup UTF-8 Mess 2021-08-18 18:00:38 +02:00
Applevangelist
8ae04944fe Fix for SAM pattern matching not working 2021-08-18 14:59:58 +02:00
Applevangelist
c55b8d29f7 Fix for degree sign extra char 2021-08-18 11:51:41 +02:00
Applevangelist
30623f7d38 AIRBOSS / ATIS deleted extra char before degree char. Small correction for CSAR landings at Airports 2021-08-18 09:28:34 +02:00
Frank
16964520df OPS
- Lots of stuff to assign missions to multiple legions.
2021-08-18 00:25:18 +02:00
Frank
3050fdb3c3 OPS Zone 2021-08-15 00:28:03 +02:00
Frank
77fc2c5cf1 Update OpsGroup.lua 2021-08-12 11:41:30 +02:00
Frank
b21c3ed4e9 OPS Cleanup 2021-08-12 11:07:28 +02:00
Frank
93f4b345c5 OPS Generalization 2021-08-12 00:17:55 +02:00
Frank
88e59a2739 OPS
- Ground ops
2021-08-11 10:40:16 +02:00
Frank
86bb256bf1 OPS
- Added Cohort and Legion classes
- Added Platoon and Brigade classes
2021-08-10 00:40:17 +02:00
Applevangelist
9a05f5bc93 Merge pull request #1589 from FlightControl-Master/Applevangelist-patch-5
CSAR fix for #1588
2021-08-09 09:18:51 +02:00
Applevangelist
bce28cf389 CSAR fix for #1588
Fixes #1588
2021-08-09 09:06:15 +02:00
Frank
629c5e7739 AUFTRAG
- Recon Mission
2021-08-06 23:16:48 +02:00
Frank
ed402e2f5f OPS Chief 2021-08-06 10:01:23 +02:00
Frank
4a56c7523d Wingcommander 2021-08-05 12:44:43 +02:00
Frank
218d9f48b0 Merge branch 'FF/Ops' into FF/OpsDev 2021-08-05 00:24:23 +02:00
Frank
f67cf99477 OPS and SCHEDULER 2021-08-05 00:23:25 +02:00
Applevangelist
2201b2adda Update Utils.lua
Corrected self to BASE
2021-08-04 11:07:47 +02:00
Applevangelist
6b36421bce Merge pull request #1585 from FlightControl-Master/Applevangelist-patch-4
Update CSAR.lua
2021-08-04 08:04:21 +02:00
Frank
8c573c65d4 Update FlightControl.lua 2021-08-03 22:37:27 +02:00
Applevangelist
730dabd9cf Update CSAR.lua 2021-08-03 07:16:42 +02:00
Frank
69175e1b19 FC 2021-08-02 23:34:42 +02:00
Frank
a5ad58e516 FC 2021-08-02 21:57:53 +02:00
Frank
82b4631341 Flightcontrol 2021-08-02 18:41:33 +02:00
Frank
a1c9c1538d Merge branch 'FF/Ops' into FF/OpsDev 2021-08-02 11:59:32 +02:00
Frank
1a53f58540 OPS 2021-08-02 11:57:45 +02:00
Applevangelist
1b414b840e added AP check on landing/rescue 2021-07-31 15:50:50 +02:00
Applevangelist
642cc0e98f Added self.FARPRescueDistance reduced landing check to one call 2021-07-31 13:05:51 +02:00
Applevangelist
63431bb54b Couple of changes to make finding the distance to nearest pilot more stable 2021-07-30 17:30:32 +02:00
Frank
d64de26ded OPS
- many fixes and improvements
2021-07-29 13:43:29 +02:00
Applevangelist
8b45067226 Various patches for AI_CARGO 2021-07-29 12:41:27 +02:00
Applevangelist
061032e3d7 Transition cleanup for AI Helicopter, deleted speed test bc in 20% of cases AI lands shit, which stops the FSM 2021-07-28 18:31:39 +02:00
Applevangelist
82432686aa Fixed display messages to all SAR, added option to suppress messaging 2021-07-27 14:10:10 +02:00
Applevangelist
b66d2039be Added function to set speed and height parameters for landing 2021-07-27 14:09:10 +02:00
Applevangelist
d245a73d7f Make Destroy() silent for scoring 2021-07-26 09:24:52 +02:00
Applevangelist
f0037151e6 CTLD - added factor for troops extraction, making Destroy()s silent for scoring, refined autohoverload messaging 2021-07-26 09:24:35 +02:00
Applevangelist
52d494f573 Merge pull request #1582 from bbirchnz/develop
CTLD: fix troops being lost when crates dropped
2021-07-25 09:06:16 +02:00
Ben Birch
36a2d71731 CTLD: fix troops being lost when crates dropped 2021-07-25 13:46:15 +10:00
Frank
615a220acb Update OpsGroup.lua 2021-07-24 23:56:27 +02:00
Frank
c718584755 Update OpsGroup.lua 2021-07-24 23:25:26 +02:00
Applevangelist
4db0ea616d Correct opendoor check to include anyone loaded 2021-07-24 15:53:20 +02:00
Applevangelist
5439e60078 Merge pull request #1580 from bbirchnz/ctld-add-mass
CTLD: Enable mass on cargo
2021-07-24 15:04:49 +02:00
Ben Birch
a6880d4569 Add SetUnitInternalCargo to UNIT
Add PerCrateMass to CTLD_CARGO (default = 0kg)
Update unit internal cargo after each load/unload operation.
Add mass to cargo reports
2021-07-24 22:39:26 +10:00
Frank
65e852f341 OPS Transport 2021-07-24 01:06:44 +02:00
Frank
4ffdf9e536 Merge branch 'develop' into FF/Ops 2021-07-23 18:49:35 +02:00
Applevangelist
8f698e3e62 Changed Messaging Structure on Approach 2021-07-23 16:29:56 +02:00
Applevangelist
61481e6e9a CSAR updates to messaging. Detect if far approach note exceeds 8km for smoke/flare request 2021-07-23 11:19:53 +02:00
Applevangelist
49397df90b CTLD - added repair capabilties for VEHICLE and FOB types of CTLD_CARGO 2021-07-22 20:17:40 +02:00
Applevangelist
7b254a08fb Merge pull request #1579 from FlightControl-Master/Applevangelist-inteldlink
Update Intelligence.lua
2021-07-22 11:37:51 +02:00
Applevangelist
5bebbcf5eb Update Intelligence.lua
Added FSM functions and documentation for INTEL_DLINK
2021-07-22 11:36:21 +02:00
Applevangelist
83fd48e2f4 Merge pull request #1578 from madmoney99/develop
Airboss update for wind over deck
2021-07-22 08:03:32 +02:00
madmoney99
f5b25370b0 Change to wind measure for Skipper
Previous value 50m produced an incorrect heading and strength based on the actual wind over deck.
2021-07-21 22:51:29 -07:00
Tony Goodale
f68d3209ac Merge branch 'FlightControl-Master:develop' into develop 2021-07-21 22:44:11 -07:00
Applevangelist
2ab7f784c9 Merge pull request #1576 from FlightControl-Master/Applevangelist-CTLD
Update CTLD.lua
2021-07-21 18:47:52 +02:00
Applevangelist
1e8d99a591 Merge pull request #1577 from FlightControl-Master/Applevangelist-INTEL
Update Intelligence.lua
2021-07-21 18:47:40 +02:00
Applevangelist
d517cba765 Update Intelligence.lua
no dupe docs
2021-07-21 18:45:57 +02:00
Applevangelist
552eb5b9d8 Update CTLD.lua
Add housekeeping for dropped troops
2021-07-21 18:40:43 +02:00
Applevangelist
684c4ea113 Allow MANTIS to use INTEL_DLINK 2021-07-21 18:22:46 +02:00
Applevangelist
4dfaca610f INTEL - bug fixes, added new datalink class 2021-07-21 18:22:31 +02:00
Applevangelist
8a53998251 MANTIS - make start random async, so detection for multiple MANTIS objects works better
INTEL - added function to alter detection types, typos corrected etc
2021-07-20 18:30:11 +02:00
bbirchnz
6690f70b05 fix CTLD:ActivateZone not processing default correctly and using wrong zone table (#1575) 2021-07-19 07:16:21 +02:00
Applevangelist
96d1d3cb66 Light code cleanup, added docu for troop extract 2021-07-18 14:53:00 +02:00
bbirchnz
09785ef451 - ctld: add troop extract (#1574) 2021-07-18 13:01:45 +02:00
Applevangelist
25e118f3dc Added correct Player Mi-8MT unitname
CSAR - logic change to detect dead pilots, if they are not set to immortal. Added FSM event "KIA"
2021-07-17 15:48:18 +02:00
Frank
78b3e3c60b OPS Respawn 2021-07-15 22:25:02 +02:00
Applevangelist
efe41a5e21 CSAR and CTLD - use Frequency generation moved to UTILS
CTLD - added option to drop crates anywhere
MANTIS - added state tracker to call Green/Red state change events only once
UTILS - added Marianas NDBs to Frequency generation
2021-07-15 17:16:30 +02:00
Frank
835041e5f6 OPS 2021-07-14 21:00:34 +02:00
Applevangelist
93a8086ff6 Update Mantis.lua (#1569)
Added state tracker so that Red/Green Events only get triggered when a state actually changes.
2021-07-14 15:37:57 +02:00
Applevangelist
1ac40684de Added option to force description on injected pilots for scripting 2021-07-14 08:39:54 +02:00
Applevangelist
433d1bbf57 MANTIS - Change logic to FSM, added functions
CSAR - advanced options to name injected AI downed pilots
CTLD - added Herc speed check
2021-07-13 17:50:44 +02:00
Applevangelist
e33de03522 CSAR - honor settings NM vs KM
CTLD - documentation corrections
UTILS - added functions to generate beacon frequency tables FM,VHF,UHF and valid laser codes for JTACs
2021-07-12 19:17:39 +02:00
Applevangelist
86fedbfaae Updated noise level 2021-07-12 18:16:22 +02:00
Applevangelist
c0f4eef896 Slightly changed versions of Mantis, Sead and Shorad as the Emissions On/Off stuff ED introduced doesn't really work well. 2021-07-12 18:10:12 +02:00
Frank
a2f3bf3a8c Merge branch 'develop' into FF/Ops 2021-07-12 15:27:24 +02:00
Frank
1b717e4683 AUFTRAG
- Added push time
2021-07-12 15:27:08 +02:00
Applevangelist
52e2ac7174 Added documentation 2021-07-11 18:31:17 +02:00
Applevangelist
3d6b053eb4 Added function to check if a loading door on a heli is open 2021-07-11 18:31:09 +02:00
Frank
268eb1d60d OPS 2021-07-11 18:15:25 +02:00
Applevangelist
a69865b8c9 -- -- (added 0.1.8) - allow to set far/near distance for approach and optionally pilot must open doors
--         self.approachdist_far = 5000 -- switch do 10 sec interval approach mode, meters
--         self.approachdist_near = 3000 -- switch to 5 sec interval approach mode, meters
--         self.pilotmustopendoors = false -- switch to true to enable check of open doors
2021-07-10 16:56:35 +02:00
Applevangelist
4a1df3d5cc -- -- (added 0.1.8) - allow to set far/near distance for approach and optionally pilot must open doors
--         self.approachdist_far = 5000 -- switch do 10 sec interval approach mode, meters
--         self.approachdist_near = 3000 -- switch to 5 sec interval approach mode, meters
--         self.pilotmustopendoors = false -- switch to true to enable check of open doors
2021-07-10 16:56:35 +02:00
Frank
6dfd757ea1 OPS 2021-07-08 22:59:29 +02:00
Frank
fc1adf3b94 OPS Transport 2021-07-08 12:21:10 +02:00
Frank
be2d1d7895 Update OpsTransport.lua 2021-07-07 11:33:51 +02:00
Frank
9e7c360912 Merge branch 'develop' into FF/Ops 2021-07-06 21:57:31 +02:00
Frank
51acd33d19 Merge branch 'master' into develop 2021-07-06 21:57:08 +02:00
Frank
af3dbe2f86 Merge branch 'develop' into FF/Ops 2021-07-06 21:56:53 +02:00
Frank
97668e5413 Update FlightGroup.lua
- Fixed flight of airwing is going to tanker even if fuellowrefuel switch is false
2021-07-06 21:56:15 +02:00
Frank
464fde0ed2 OPS
- MSRS
- Callsign
2021-07-06 21:13:50 +02:00
cammel tech
65bd7909e1 Example for CTLD > SCORING added (#1566)
* Example added

Example for the connection to the SCORING Class.

* kleiner Fehler eingeschlichen
2021-07-06 20:26:20 +02:00
Applevangelist
5d3ea57d4d CSAR give scripted spawned pilots a name.
CTLD corrected that generic troops could be spawned only once.
2021-07-06 20:24:35 +02:00
Applevangelist
b7bc3cfbcf Spawn crates in a wider radius. Also build, when only one crate is required. 2021-07-05 18:54:45 +02:00
Applevangelist
04ef32420b Merge pull request #1567 from thejuju/develop
Add ATC Ground Mariana Islands support
2021-07-05 14:44:02 +02:00
Julien B
a3d8a48b92 Add ATC Ground Mariana Islands support
Added ATC_GROUND_MARIANAISLANDS
Supported optional airbase ZONE_POLYGON boundaries (like initially intented) when there is provided, fallback remain a ZONE from the center of the airfield.
Some airports are bigger than the default radius area and need custom boundaries to work properly on the edge of it.
2021-07-05 13:09:34 +02:00
Applevangelist
ef86d1d7cb Merge pull request #1562 from cammeltech/SCORING-reactivate_destroy
Reactivate the :destroy() event on clients with scoring below thresmark
2021-07-04 18:10:45 +02:00
Applevangelist
00b3e9b371 Merge pull request #1564 from justin-lovell/justin-lovell-mark-changed-event
Synchronize Text with Wrapper State
2021-07-04 18:10:35 +02:00
Applevangelist
0d02f56855 Merge pull request #1565 from justin-lovell/updated-debug-msg
Correcting typo for debug message
2021-07-04 18:10:21 +02:00
Applevangelist
48aa841add ATIS - addede rainy presets 1-3
CTLD - avoid "preloading" when pilot leaves/crashes and rejoins
CSAR - added option for autosmokedistance
2021-07-04 18:04:27 +02:00
Applevangelist
4ba52212a9 ATIS - addede rainy presets 1-3
CTLD - avoid "preloading" when pilot leaves/crashes and rejoins
CSAR - added option for autosmokedistance
2021-07-04 18:04:08 +02:00
Justin Lovell
a14bca1059 Synchronize Text with Wrapper State
Bug - text is not synchronized with the wrapper state, hence the `GetText()` will be incorrect.

Method `TextChanged` does not exist, resulting `nil` reference errors when the players update markers. Current implementation of `MARKER:OnEventMarkChange(EventData)` is not implemented the same as its siblings of `OnEventMarkRemoved` and `OnEventMarkAdded`. The siblings would move the FSM accordingly -- aligned implementation
2021-07-03 23:30:45 +10:00
Justin Lovell
a7e07af24f Correcting typo for debug message
Small PR
2021-07-03 23:24:04 +10:00
Applevangelist
e14d655447 Changed default fallback freq to 333.00Khz 2021-07-03 09:30:04 +02:00
Frank
74bdeaf4f7 AIRWING 2021-07-02 23:11:51 +02:00
Applevangelist
9591c62175 corrected autovalue for frequency - thanks to shadowze 2021-07-02 20:22:43 +02:00
Applevangelist
39c46dcab0 Changed frequency logic, some documentation changes 2021-07-02 20:15:12 +02:00
Applevangelist
299e08f53d additional checks to ensure only human players, extra checks in the logic, some logic errors corrected. 2021-07-02 17:52:58 +02:00
wob3155@posteo.de
12555a6ff1 Reactivate the :destroy() event on clients with scoring below thresmark 2021-07-02 08:56:28 +02:00
Frank
1cc012c7d1 Merge branch 'develop' into FF/Ops 2021-07-02 08:53:44 +02:00
Frank
28c6810878 Merge branch 'master' into develop 2021-07-02 08:52:07 +02:00
Frank
1ed36fdff4 Merge branch 'develop' into FF/Ops 2021-07-01 23:56:38 +02:00
Frank
26801cf206 Merge branch 'master' into develop 2021-07-01 23:54:57 +02:00
Frank
c80cebb824 WAREHOUSE, AIRWING & SQUADRON
- Added function for hot start to SQUADRON
- Addressed bug #1560
2021-07-01 23:54:24 +02:00
Frank
3c6e8d6d01 OPS
- Transport
- Respawn
2021-07-01 12:29:29 +02:00
Applevangelist
76a53ab154 Added extra checks for Beacon refresh 2021-07-01 09:07:01 +02:00
Frank
fa3e387dd1 OPS 2021-06-30 23:23:41 +02:00
Applevangelist
dca626bbcb CTLD - added option to suppress messaging, added event for OnAfterTroopsRTB
CSAR - minor bugfix
2021-06-30 17:59:43 +02:00
Applevangelist
3289ad2817 Added basic support for Hercules mod 2021-06-29 17:49:42 +02:00
Applevangelist
5a022a2246 Messages going to SAR flights only 2021-06-29 08:50:46 +02:00
Frank
b012c5b2aa OPS Transport
- Improved cargo bay weight calculation.
2021-06-28 13:17:55 +02:00
Frank
a861f8d9d4 OPS 2021-06-25 21:13:24 +02:00
Frank
36669c80da OPSTRANSPORT 2021-06-25 13:23:56 +02:00
Applevangelist
2ff128f184 Added Docu for functions 2021-06-25 12:39:02 +02:00
Applevangelist
3b44aba341 Updated frequency test 2021-06-24 08:34:14 +02:00
Frank
978be4e383 OPS Transport 2021-06-23 17:20:51 +02:00
Applevangelist
d4cdfcc48c Corrected Mi-8MTV2 Unit Type Name 2021-06-23 14:09:09 +02:00
Applevangelist
5123ab0720 Update CTLD.lua (#1558)
corrected fsm function name headlines in documentation
2021-06-23 09:47:05 +02:00
Applevangelist
5021a1e1f3 Update CTLD.lua 2021-06-22 18:26:44 +02:00
Applevangelist
576281a612 Update CSAR.lua (#1554)
Added options to limit number of downed pilots via Events (mission designers can still "inject" downed pilots):
`self.limitmaxdownedpilots = true
 self.maxdownedpilots = 10`
2021-06-22 18:24:46 +02:00
Applevangelist
b84c0aba59 Update Moose.files (#1556) 2021-06-22 18:24:36 +02:00
Applevangelist
ee503a378e Update Modules.lua (#1557)
added CTLD
2021-06-22 18:24:24 +02:00
Applevangelist
f235037cb9 Create CTLD.lua (#1555)
Player Heli Cargo and Troops Ops :)
2021-06-22 18:24:11 +02:00
Applevangelist
0cd1cd97a6 Update CSAR.lua (#1553) 2021-06-22 13:11:12 +02:00
Frank
74513f1b5c Merge branch 'develop' into FF/Ops 2021-06-22 12:18:45 +02:00
Frank
231c5bfea7 Ops 2021-06-22 12:18:25 +02:00
Frank
cfd0e4ba85 Merge branch 'master' into develop 2021-06-19 22:28:30 +02:00
Applevangelist
bf33e4ed4f Update CSAR.lua (#1552) 2021-06-18 12:12:54 +02:00
Frank
6290db035d Merge branch 'develop' into FF/Ops 2021-06-15 22:00:14 +02:00
Applevangelist
cd1935be1d Update CSAR.lua (#1551) 2021-06-15 15:49:58 +02:00
Applevangelist
64262d6ecc Update CSAR.lua (#1550) 2021-06-15 10:32:52 +02:00
Applevangelist
270c69344f Update CSAR.lua
Updated documentation / clarification. Added feature docu on using SRS
2021-06-15 07:42:45 +02:00
Applevangelist
10a0793af7 Update CSAR.lua
Small updates to reflect correct measurements. Options to SRS TTS.
2021-06-14 19:15:58 +02:00
Applevangelist
1b37af321f Update CSAR.lua
Small updates
2021-06-14 16:21:47 +02:00
Applevangelist
7cde279be1 Update Modules.lua
added CSAR module
2021-06-14 13:20:00 +02:00
Applevangelist
0396741f3d Create CSAR.lua
Initial Release
2021-06-14 13:18:27 +02:00
Applevangelist
117cf8888a Update Globals.lua 2021-06-13 10:39:07 +02:00
Frank
83db7b32e8 Merge branch 'master' into FF/Ops 2021-06-12 22:59:20 +02:00
Frank
d496d3d16e Merge branch 'master' into develop 2021-06-12 22:23:10 +02:00
Frank
6b801247ab Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-11 23:41:52 +02:00
Frank
4c6cd31bfc Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-10 23:33:27 +02:00
Frank
a8ef096f24 Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-10 23:23:30 +02:00
Applevangelist
c8d2a7e833 Added commands for immortal and invisible to Wrapper.Group#GROUP (#1547)
* Added function for message duration (#1542)

... and correct flash status setting

* Update Spawn.lua (#1544)

* Update Spawn.lua

* Update Group.lua (#1546)

Added invisible and immortal commands on GROUP level.
2021-06-10 11:59:50 +02:00
Frank
783391838b Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-10 00:19:02 +02:00
Frank
7c37d8b204 Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-09 13:19:14 +02:00
Applevangelist
65ed8825b0 Update Intelligence.lua
Added functionality to calculate the position of a cluster after x seconds, based on trajectory (average speed and heading) of a cluster
*  INTEL:CalcClusterFuturePosition(cluster,seconds)
Will also draw arrows on the map if `self.clustermarkers` is true and `self.verbose > 1`
Change cluster coordinate updates to better suite cluster movement
2021-06-08 15:59:36 +02:00
Applevangelist
af9324dd5f master updates to develop for InitCleanup() and CC Messages (#1545)
* Added function for message duration (#1542)

... and correct flash status setting

* Update Spawn.lua (#1544)

* Update Spawn.lua
2021-06-07 18:26:43 +02:00
Frank
064f727676 Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-05 23:45:15 +02:00
Frank
8025862fb9 Merge branch 'FF/MasterDevel' into FF/Ops 2021-06-01 23:20:59 +02:00
Frank
2544ec5587 Update SRS.lua 2021-05-30 01:44:36 +02:00
Frank
6c823b0137 Merge branch 'FF/MasterDevel' into FF/Ops 2021-05-30 01:36:43 +02:00
Frank
88d44fa654 Merge branch 'develop' into FF/Ops 2021-05-28 23:01:47 +02:00
Frank
8b6f9f9de7 Merge branch 'master' into develop 2021-05-28 23:01:15 +02:00
Applevangelist
cb14961dcd Update Zone.lua (#1541)
added function `ZONE_POLYGON_BASE:Boundary()`
2021-05-26 15:54:20 +02:00
Applevangelist
dab486ec99 Update Controllable.lua
Typo in `OptionDisperseOnAttack()`
2021-05-26 09:16:26 +02:00
Shadowze
75849fbfb5 Update Positionable.lua
function added to work out if a unit is a submarine
2021-05-25 22:30:16 +01:00
Frank
f984ff044b Merge branch 'master' into develop 2021-05-25 21:13:36 +02:00
Frank
aaf5f295da Merge branch 'develop' into FF/Ops 2021-05-20 23:27:05 +02:00
Frank
8f612f2017 Merge branch 'master' into develop 2021-05-20 23:25:29 +02:00
Frank
a2808163a7 Boom and Probe 2021-05-20 23:23:12 +02:00
Frank
e4aa23ce3d Update Point.lua 2021-05-15 00:29:20 +02:00
Frank
1b3cac9424 Merge branch 'FF/MasterDevel' into FF/Ops 2021-05-13 23:38:17 +02:00
Applevangelist
e49020b905 Update README.md 2021-05-12 09:19:07 +02:00
Frank
d68dcaf69a Merge branch 'develop' into FF/Ops 2021-05-11 14:52:31 +02:00
Frank
856c3578f6 Merge branch 'master' into develop 2021-05-11 11:59:48 +02:00
Tony Goodale
18c6ea39ce Merge pull request #7 from FlightControl-Master/develop
Develop
2021-05-10 15:47:14 -07:00
Frank
1ce46c016c Cargo 2021-05-10 00:14:07 +02:00
Frank
296944c23c Merge branch 'develop' into FF/Ops 2021-05-07 22:57:34 +02:00
Frank
4f772fecdc Merge branch 'master' into develop 2021-05-07 21:56:17 +02:00
Frank
cdd22444b9 Merge branch 'master' into develop 2021-05-07 21:49:24 +02:00
Frank
15848bc8c4 Merge branch 'master' into FF/Ops 2021-05-07 17:47:41 +02:00
Applevangelist
9eba6d607c Updated doc images 2021-05-06 09:30:06 +02:00
Applevangelist
e9d3c7c2e7 Update MarkerOps_Base.lua 2021-05-05 19:02:46 +02:00
Applevangelist
ad16c6d44f Include MarkerOps_Base (#1533)
Include MarkerOps_Base
2021-05-05 11:56:00 +02:00
Applevangelist
2046958bd6 Added MarkerOps_Base.lua 2021-05-05 11:44:35 +02:00
Applevangelist
0046533d53 Added base class for action based on marker additions, changes, deletions and text keywords 2021-05-05 11:44:17 +02:00
Applevangelist
ce7e152e13 Updated Shorad and Set 2021-05-04 12:59:21 +02:00
Tony Goodale
edcdc057e6 Merge pull request #6 from FlightControl-Master/develop
Develop
2021-05-01 15:40:23 -07:00
Frank
cfa851beea Merge branch 'master' into FF/Ops 2021-05-02 00:25:07 +02:00
Frank
f5d8efe86e Merge branch 'master' into develop 2021-05-01 22:45:48 +02:00
Applevangelist
7c8e5033ec Merge pull request #1527 from FlightControl-Master/AA-1
Update Sead.lua
2021-05-01 17:29:43 +02:00
Applevangelist
22ec94b374 Merge pull request #1528 from FlightControl-Master/AA-2
Update Shorad.lua
2021-05-01 17:27:22 +02:00
Applevangelist
5cd3a172f1 Merge pull request #1529 from FlightControl-Master/AA-3
Update Mantis.lua
2021-05-01 17:24:33 +02:00
Applevangelist
a89a3b38ce Update Mantis.lua
Adjustments for 2.7
2021-05-01 17:21:53 +02:00
Applevangelist
3202702612 Update Shorad.lua
Adjustments for 2.7
2021-05-01 17:20:35 +02:00
Applevangelist
725e32f439 Update Sead.lua
Adjust to Event changes
2021-05-01 17:19:10 +02:00
Applevangelist
7da1905ad3 Update Event.lua (#1525)
Updates for Events 33 and 6 - makes scoring also work again for STATIC targets
2021-05-01 14:22:01 +02:00
Frank
421005a3b6 event backfixed 2021-04-30 11:53:57 +02:00
Applevangelist
d5bf28f799 Update AirWing.lua (#1521)
Markpoint honored for direct calls from #OPSGROUP
2021-04-29 18:20:03 +02:00
Frank
990f748e42 Update Database.lua 2021-04-27 09:19:33 +02:00
Applevangelist
a466365949 Update Controllable.lua (#1519)
Error line 1463
2021-04-25 20:31:02 +02:00
Frank
b12f71c430 Merge branch 'develop' into FF/Ops 2021-04-23 13:38:28 +02:00
Frank
236a69e5dc Merge branch 'master' into develop 2021-04-23 13:29:37 +02:00
Applevangelist
9458243926 Merge pull request #1516 from FlightControl-Master/AA
Update Controllable.lua
2021-04-23 11:00:50 +02:00
Applevangelist
41274e7801 Update Controllable.lua 2021-04-23 10:59:22 +02:00
Applevangelist
0259e41ce8 Create .luacheckrc 2021-04-22 10:10:59 +02:00
Applevangelist
e78f9cbd46 Merge pull request #1512 from FlightControl-Master/aa
Update Airboss.lua
2021-04-22 08:53:52 +02:00
Applevangelist
9d6851adec Update Airboss.lua
Escape error 17933
2021-04-22 08:30:19 +02:00
Applevangelist
4668f072af Merge pull request #1511 from FlightControl-Master/AA-1
Update Airboss.lua
2021-04-22 08:21:00 +02:00
Applevangelist
a1a414925f Update Airboss.lua 2021-04-22 08:19:56 +02:00
Applevangelist
19eb9dca30 Update Utils.lua 2021-04-20 18:49:54 +02:00
Applevangelist
8464a2ba43 Merge pull request #1507 from FlightControl-Master/Applevangelist-patch-1
Update Airbase.lua
2021-04-20 16:52:28 +02:00
Applevangelist
a8549e2b7d Update Airbase.lua 2021-04-20 16:50:00 +02:00
Applevangelist
2531a25c9e Update Group.lua
Add EnableEmissions
2021-04-20 11:36:59 +02:00
Frank
2f7b7eeddd Merge branch 'master' into develop 2021-04-18 14:49:37 +02:00
Frank
ab1ec54c03 Merge branch 'master' into develop 2021-04-18 14:34:46 +02:00
Frank
a1ca605206 Merge branch 'master' into develop 2021-04-17 23:19:42 +02:00
Frank
a7b444dfea Update OpsGroup.lua 2021-04-17 09:29:55 +02:00
Frank
64b35b9cb3 Merge branch 'develop' into FF/Ops 2021-04-16 23:15:30 +02:00
Frank
4a8d52b328 Merge branch 'master' into develop 2021-04-16 23:06:04 +02:00
Pikes
3cbf6fff90 Merge pull request #1490 from Applevangelist/patch-82
Update Event.lua workaround for 2.7
2021-04-16 18:01:25 +01:00
Frank
2693e76483 Update Airboss.lua 2021-04-15 21:13:35 +02:00
Applevangelist
b232a5da37 Update Event.lua workaround for 2.7
Same as for Event 31
2021-04-15 13:02:59 +02:00
Frank
e50fc00583 Merge branch 'develop' into FF/Ops 2021-04-14 23:44:43 +02:00
Frank
4b8802af37 Merge branch 'master' into develop 2021-04-14 23:42:48 +02:00
Frank
ebd69fd10d Merge pull request #1482 from Applevangelist/patch-74
Update FlightGroup.lua
2021-04-12 15:55:50 +02:00
Applevangelist
c1a8c08880 Update FlightGroup.lua 2021-04-12 13:02:16 +02:00
Frank
647fb6acbf Merge branch 'develop' into FF/Ops 2021-04-07 20:54:19 +02:00
Frank
ede692ea2a Merge branch 'master' into develop 2021-04-07 20:53:27 +02:00
Frank
ca44e2762b Update OpsGroup.lua 2021-04-07 20:53:15 +02:00
Frank
eda70742eb Merge pull request #1486 from Applevangelist/patch-78
Update AirWing.lua
2021-04-04 22:03:49 +02:00
Frank
b81e3e9e6d Merge pull request #1485 from Applevangelist/patch-77
Update Intelligence.lua
2021-04-04 22:03:40 +02:00
Applevangelist
e766eaeccc Update AirWing.lua
Avoid loop if mission is governed by an Airwing. Mission cancel will ask airwing to cancel will ask flightgroup to cancel, which doesn't work if the latter is dead. Rare but happens.
2021-04-04 13:11:25 +02:00
Applevangelist
bab61271f2 Update Intelligence.lua
Make Markers Coalition specific
2021-04-04 13:07:54 +02:00
Applevangelist
b1465d89a6 Update FlightGroup.lua
Added check for velocity for the RTB loop (if group is taxiing). Added OutOfAAMissiles.
2021-04-04 12:49:40 +02:00
Frank
05b1ddf013 Merge pull request #1483 from Applevangelist/patch-75
Update AirWing.lua
2021-04-03 22:25:51 +02:00
Applevangelist
903e8711f7 Update AirWing.lua
Make Patrolpoint Markes Switchable
2021-04-01 13:28:59 +02:00
Applevangelist
31b93fb42c Update FlightGroup.lua
Avoid endless when plane/heli is not airborne by needs to RTB
2021-04-01 13:21:40 +02:00
Frank
e16bbfc2b9 Merge branch 'develop' into FF/Ops 2021-03-29 19:55:35 +02:00
Frank
220e004d73 Merge branch 'master' into develop 2021-03-29 19:55:21 +02:00
Frank
3136861b24 Merge branch 'develop' into FF/Ops 2021-03-29 18:02:23 +02:00
Frank
dc2693bead Merge branch 'master' into develop 2021-03-29 18:02:00 +02:00
Frank
d7da8c4253 Merge branch 'develop' into FF/Ops 2021-03-29 09:55:13 +02:00
Frank
c1ff5831ad Merge branch 'master' into develop 2021-03-29 09:53:51 +02:00
Frank
ac5646075b Merge pull request #1481 from madmoney99/develop
Airboss CASE III fix for OS/AA
2021-03-29 00:31:46 +02:00
madmoney99
5a1faba796 CASE III fix for OS/AA 2021-03-28 15:25:59 -07:00
Tony Goodale
4ab16cb276 Merge pull request #5 from FlightControl-Master/develop
Merge pull request #1478 from madmoney99/develop
2021-03-28 15:12:27 -07:00
Frank
eb1e885c0a Merge branch 'develop' into FF/Ops 2021-03-28 20:33:08 +02:00
Frank
00ff9a11b8 Merge branch 'master' into develop 2021-03-28 20:30:19 +02:00
Frank
8eabc024bf Merge pull request #1479 from madmoney99/develop
Update Airboss.lua
2021-03-23 08:44:14 +01:00
madmoney99
a848af0753 Update Airboss.lua 2021-03-22 19:01:04 -07:00
Frank
f4e7a3a314 Merge pull request #1478 from madmoney99/develop
Airboss formating fixes
2021-03-22 22:19:29 +01:00
madmoney99
d83283c709 Update Airboss.lua
formatting fixes
2021-03-22 10:10:33 -07:00
Tony Goodale
a35112a6f3 Merge pull request #4 from FlightControl-Master/develop
Merge pull request #1476 from madmoney99/develop
2021-03-22 10:01:53 -07:00
Frank
66c012a30d Merge pull request #1476 from madmoney99/develop
Develop Airboss grading additions
2021-03-22 12:03:58 +01:00
madmoney99
7b92b7853d Grading Additions
Addition of:
- AA - Angled Approach call (advisory)
- Drift Right/Left - DR/DL (advisory)
- Overshoot - OS - graded for start

Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback.

Minor clean up and updates for intro section to include new additions and other changes previously made.

TonyG
2021-03-21 17:40:44 -07:00
madmoney99
6c9f10e6a8 Revert "Grading additions"
This reverts commit 6db2c4465d.
2021-03-21 17:38:06 -07:00
madmoney99
6db2c4465d Grading additions
Addition of:
 - AA - Angled Approach call (advisory)
 - Drift Right/Left - DR/DL (advisory)
 - Overshoot - OS - graded for start

Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback.

Minor clean up and updates for intro section to include new additions and other changes previously made.

TonyG
2021-03-21 17:35:16 -07:00
Tony Goodale
c0cc960df5 Merge pull request #3 from FlightControl-Master/develop
Develop
2021-03-21 14:53:53 -07:00
Frank
968240ad44 Merge pull request #1473 from Applevangelist/patch-72
Update Sead.lua
2021-03-14 22:46:16 +01:00
Applevangelist
50f3016711 Update Sead.lua
latest
2021-03-10 11:36:10 +01:00
Frank
56e2b06e9d OPS Cargo 2021-03-07 23:47:29 +01:00
Frank
c02f69720a Merge pull request #1471 from Applevangelist/patch-71
Update Controllable.lua
2021-03-04 16:33:56 +01:00
Frank
96df7d1e42 Merge pull request #1470 from Applevangelist/patch-70
Update Intelligence.lua
2021-03-04 16:33:46 +01:00
Applevangelist
1d4caf7588 Update Controllable.lua
2 functions missing though they are in the doc header
2021-03-04 16:15:57 +01:00
Applevangelist
b0e3201d3c Update Intelligence.lua
Added Docu
2021-03-04 11:13:30 +01:00
Frank
bab097958f Merge branch 'develop' into FF/Ops 2021-03-03 00:03:52 +01:00
Frank
f4a3f6d433 OPS 2021-03-03 00:03:39 +01:00
Frank
e73ab89a18 Merge pull request #1469 from madmoney99/develop
Develop
2021-03-02 22:46:31 +01:00
madmoney99
187643f6ae Groove time additions
Changes on screen description of groove times to match NATOPs grading
NESA
LIG
Changes unicorn groove time from 16-18secs to 15-18.99 seconds.

No change to grading.  Reference GitHub issues 1445 &1446.
2021-03-02 13:36:54 -08:00
Tony Goodale
3c9bdb2915 Merge pull request #1 from FlightControl-Master/develop
Develop
2021-03-02 13:28:58 -08:00
Frank
5241642447 Merge branch 'master' into develop 2021-03-02 21:19:41 +01:00
Frank
3b2cbea1c4 Update OpsGroup.lua 2021-03-02 21:12:51 +01:00
Frank
80e3da49cb Merge pull request #1468 from Applevangelist/patch-69
Update Intelligence.lua
2021-03-02 15:34:27 +01:00
Applevangelist
1df7a12587 Update Intelligence.lua
Finalized Cluster functions, added bits and bobs
2021-03-02 14:28:37 +01:00
Frank
663a59bd71 Merge branch 'master' into develop 2021-02-28 23:26:48 +01:00
Frank
ced859424b Merge branch 'master' into develop 2021-02-27 21:18:11 +01:00
Frank
4a6377c204 Ops Cargo 2021-02-27 21:17:58 +01:00
Frank
fd22558207 Merge pull request #1467 from madmoney99/develop
T-45C Goshawk Parameters
2021-02-26 08:00:35 +01:00
madmoney99
a6faadea48 T-45C Goshawk Parameters
Addition of parameters for the VNAO T-45C Goshawk.
2021-02-25 12:52:50 -08:00
Frank
42a26100b7 Merge pull request #1465 from Applevangelist/patch-67
Update Intelligence.lua
2021-02-24 18:02:19 +01:00
Frank
e8f4770abe Merge pull request #1464 from Applevangelist/patch-66
Update AirWing.lua
2021-02-24 18:01:44 +01:00
Applevangelist
7751d4ee88 Update Intelligence.lua
Added function to set verbosity
2021-02-24 16:22:13 +01:00
Applevangelist
cdd829e7be Update AirWing.lua
Ensure correct type of tanker is going on mission
2021-02-24 16:16:28 +01:00
Frank
16bf3a89b5 Merge pull request #1461 from Applevangelist/patch-63
Update Intelligence.lua
2021-02-21 23:59:37 +01:00
Applevangelist
11cdae098b Update Intelligence.lua
Honor settings for clustermarkers
2021-02-21 19:55:48 +01:00
Frank
a63ee3fa8b Merge branch 'develop' into FF/Ops 2021-02-21 11:54:06 +01:00
Frank
5cc023d1fe OPS Cargo 2021-02-21 11:53:52 +01:00
Frank
c4084156ac OPS Cargo 2021-02-21 00:19:32 +01:00
Frank
302018feff OPS Cargo 2021-02-20 00:03:45 +01:00
Frank
c50f6b72e7 OPS Cargo 2021-02-19 00:11:55 +01:00
Frank
c0401447dd OPS Cargo 2021-02-18 00:10:17 +01:00
Frank
43680c2fc3 Merge branch 'master' into develop 2021-02-17 13:16:46 +01:00
Frank
2c92bb9d61 OPS Cargo 2021-02-17 00:29:59 +01:00
Frank
dcf1a56756 Update OpsGroup.lua 2021-02-16 00:15:22 +01:00
Frank
5990ab1cc9 OPSTRANSPORT
- New class.
2021-02-15 23:19:35 +01:00
Frank
084499fa0e OPS Wait 2021-02-14 00:19:03 +01:00
Frank
74e84a73dd OPS Cargo 2021-02-13 00:09:25 +01:00
Frank
96b0393f91 OPS Cargo 2021-02-11 23:58:56 +01:00
Frank
0656c33e05 Update OpsGroup.lua 2021-02-10 23:50:37 +01:00
Frank
ec1ab49b54 Merge pull request #1447 from Applevangelist/patch-51
Update Auftrag.lua
2021-02-10 21:34:12 +01:00
Applevangelist
1daa2857b2 Update Auftrag.lua
Corrected docu in NewTanker, 1 is actually boom, and 0 probe
2021-02-10 13:19:53 +01:00
Frank
8c55541d0e Update OpsGroup.lua 2021-02-08 16:27:58 +01:00
Frank
c5a4776b3a OPS Cargo 2021-02-07 01:24:13 +01:00
Frank
8bb9f0d7c0 OPS Cargo 2021-02-06 09:41:24 +01:00
Frank
7d83c251a8 OPS Cargo 2021-02-03 22:51:18 +01:00
Frank
ee3ead9aac OPS Cargo 2021-02-02 23:20:55 +01:00
Frank
54896e0e31 Merge pull request #1444 from rollnthndr/develop
Added a note pointing out that callsigns need to be chosen depending …
2021-02-01 08:06:11 +01:00
Frank
016198e7f2 OPS Cargo 2021-01-31 23:28:04 +01:00
Frank
0933eef4c3 Merge branch 'develop' into FF/Ops 2021-01-31 00:50:14 +01:00
Frank
fe55555c67 OPS
- Fixed inAir check for spawned groups
- Reduced SCHEDULER min delay to 0.001 sec (was 0.1 sec)
2021-01-30 23:28:07 +01:00
Frank
bcf8973eed OPS 2021-01-30 21:29:29 +01:00
rollnthndr
50d2e42cc3 Added VSCode settings folder and workspace file to the ignore list. 2021-01-29 18:31:19 -07:00
rollnthndr
261d1cbeba Added a note pointing out that callsigns need to be chosen depending on the type of unit that this task is being assigned to. 2021-01-29 18:15:20 -07:00
Frank
242462b9ba OPS Cargo 2021-01-29 00:32:38 +01:00
Frank
fd4e478dbf Merge branch 'master' into develop 2021-01-26 12:40:15 +01:00
Frank
6b91e68668 OPS Cargo 2021-01-26 12:39:49 +01:00
Frank
7516d2af56 Merge branch 'master' into develop 2021-01-23 16:47:14 +01:00
Frank
c247a98402 OPS cargo 2021-01-23 16:46:44 +01:00
Frank
83bcd55a7a Merge pull request #1439 from FlightControl-Master/wingthor_fixes
Added a table shuffler using Fisher Yeates algorithm in Utilities/Uti…
2021-01-22 23:28:42 +01:00
Wingthor
5a43936e35 Added a table shuffler using Fisher Yeates algorithm in Utilities/Utils.lua 2021-01-22 23:10:22 +01:00
Frank
35b776179e Merge branch 'master' into develop 2021-01-19 16:56:40 +01:00
Frank
f4cb6df8d4 Ops
respawn
2021-01-19 16:53:22 +01:00
Frank
a259b88f1d Merge branch 'develop' into FF/Ops 2021-01-16 22:57:10 +01:00
Frank
5b4f3d1c98 Merge branch 'master' into develop 2021-01-16 22:56:43 +01:00
Frank
c62c21c386 FLIGHTGROUP v0.6.1
- Improved engage targets
2021-01-16 22:56:28 +01:00
Frank
17c56a11bd Merge pull request #1432 from OttoWerkr/develop
Update Scenery.lua
2021-01-15 23:53:37 +01:00
Frank
796561b8b6 Merge pull request #1433 from FlightControl-Master/FF/Ops
OPS
2021-01-15 23:44:46 +01:00
Frank
209b7a64ed Update OpsGroup.lua 2021-01-15 23:42:30 +01:00
Frank
8f56299380 OPS
**AUFTRAG**
- Added PATROLZONE type. Works for all OPSGROUPs (air, ground and sea).

**FLIGHTGROUP**
- Improved EngageTarget
- Added option to automatically engage detected targets.

**TARGET**
- Improved Zone type
2021-01-15 23:29:16 +01:00
OttoWerkr
73b1394ca7 Update Scenery.lua
Added FindByName() to SCENERY Class.
2021-01-15 14:27:43 -05:00
Frank
f3a2cf7284 Patrol
- Added `FLIGHTGROUP:SetEngageDetectedOn()`
- AUFTRAG patrol zone.
2021-01-15 00:59:52 +01:00
Frank
df79c765f8 Merge branch 'master' into develop 2021-01-12 17:40:40 +01:00
Frank
d09737c218 Merge branch 'master' into develop 2021-01-12 13:51:26 +01:00
Frank
6b0c42ae50 Merge branch 'master' into develop 2021-01-12 10:45:11 +01:00
Frank
7363da1b54 Merge branch 'master' into develop 2021-01-09 23:48:42 +01:00
Frank
684f19c060 Merge branch 'master' into develop 2021-01-05 22:59:57 +01:00
Frank
d08e4db0eb Merge branch 'master' into develop 2021-01-03 00:24:42 +01:00
Frank
f1e7d8bd06 Merge branch 'master' into develop 2021-01-01 10:16:58 +01:00
Frank
1328ac061e Merge branch 'master' into develop 2020-12-31 21:22:59 +01:00
Frank
391f0fc9af Merge branch 'master' into develop 2020-12-29 23:38:44 +01:00
Frank
38cf5be738 Update Airbase.lua 2020-12-29 22:51:10 +01:00
Frank
1bb70b8697 Update Warehouse.lua
- added airbase coalition check when spawning aircraft #1413
2020-12-29 22:28:36 +01:00
Frank
6e35b80daf Update Warehouse.lua
- requests should no longer be processed if warehouse has no airbase
2020-12-29 21:41:15 +01:00
Frank
a171c22ce4 Merge branch 'develop' into FF/Ops 2020-12-29 11:23:04 +01:00
Frank
f56457bc28 Update Intelligence.lua
- added reject zones
2020-12-29 11:22:47 +01:00
Frank
9708de70c7 Merge branch 'master' into develop 2020-12-27 17:59:57 +01:00
Frank
d68589bb70 Merge branch 'master' into develop 2020-12-23 16:10:07 +01:00
Frank
16eb38782a Merge branch 'master' into develop 2020-12-23 10:54:57 +01:00
Frank
2175e9c0d6 Merge branch 'master' into develop 2020-12-22 09:49:08 +01:00
Frank
9abd71f681 Merge branch 'develop' into FF/Ops 2020-12-21 00:13:09 +01:00
Frank
d1dc829136 Merge branch 'master' into develop 2020-12-20 23:48:28 +01:00
Frank
eda672bdc6 Merge branch 'develop' into FF/Ops 2020-12-19 12:48:12 +01:00
Frank
0e5dbbea79 Merge branch 'master' into develop 2020-12-19 01:18:17 +01:00
Frank
f5809ef302 Merge branch 'develop' into FF/Ops 2020-12-18 23:50:59 +01:00
Frank
457ce1ece1 Merge branch 'master' into develop 2020-12-18 13:52:23 +01:00
Frank
9c9841332f Merge branch 'master' into develop 2020-12-17 13:55:38 +01:00
Frank
9470d3a2ef Merge branch 'master' into develop 2020-12-17 12:34:59 +01:00
Frank
8356271f8d Merge branch 'master' into develop 2020-12-17 12:34:04 +01:00
Frank
42a6f3272d Merge branch 'master' into develop 2020-12-16 00:12:38 +01:00
Frank
362b242c41 Merge pull request #1398 from Applevangelist/patch-20
Error in FlightGroup.lua in line 2390 as detected by HRP Zero
2020-12-15 00:36:57 +01:00
Frank
7ace7b49ca Merge branch 'develop' into FF/Ops 2020-12-15 00:14:15 +01:00
Frank
7cd902e924 Merge branch 'master' into develop 2020-12-15 00:11:34 +01:00
Applevangelist
e3c14678e2 Error in FlightGroup.lua in line 2390 as detected by HRP Zero
Not searching in Paris, but in pairs :)
2020-12-14 13:37:17 +01:00
Frank
bfaca75a7d Merge branch 'master' into develop 2020-12-14 12:37:45 +01:00
Frank
5aecd8c255 Ops
- Performance
2020-12-10 18:53:49 +01:00
Frank
cfc0f1a1f7 Merge branch 'master' into develop 2020-12-03 23:18:32 +01:00
Frank
edf657c65c Merge branch 'master' into develop 2020-11-30 11:40:34 +01:00
Frank
801d00fa26 Stuff 2020-11-30 11:38:36 +01:00
Frank
eeffa31282 Update ChiefOfStaff.lua 2020-11-26 11:47:05 +01:00
Frank
206528a530 Merge branch 'FF/Ops' into FF/OpsDev 2020-11-26 10:56:17 +01:00
Frank
41690fdf7b Merge pull request #1385 from FlightControl-Master/FF/Ops
OPS
2020-11-25 11:34:41 +01:00
Frank
5b83f8e45b OPS 2020-11-25 11:27:07 +01:00
Frank
94863ed8ae Update OpsGroup.lua 2020-11-24 22:00:36 +01:00
Frank
e63b99c890 Merge pull request #1379 from Applevangelist/patch-7
Update Controllable.lua
2020-11-22 15:54:03 +01:00
Frank
e8542743b4 Merge pull request #1380 from Applevangelist/patch-8
Update Sead.lua
2020-11-22 15:53:14 +01:00
Applevangelist
309e1208c2 Update Sead.lua
Feature Request #1355
2020-11-22 14:17:42 +01:00
Applevangelist
3e0db05664 Update Controllable.lua
Added control to keep within limits of the options
2020-11-22 13:01:26 +01:00
Applevangelist
9573d92cc0 Update Controllable.lua
Add option to control a2a attack ranges for AIR fighter units. See https://wiki.hoggitworld.com/view/DCS_option_missileAttack
2020-11-22 12:07:49 +01:00
Frank
1abc0dcb6a Merge pull request #1378 from FlightControl-Master/FF/Ops
OPS
2020-11-21 21:55:20 +01:00
Frank
770fb3228f OPS
AUFTRAG
- Changed ESCORT engage distance input to NM (not meters)

TARGET
- Fixed bug in count targets
- Improved dead/destroyed management

FLIGHTGROUP
- Only register UNIT/STATIC kills (not SCENERY)

INTEL
- Improved agent set
2020-11-21 21:49:47 +01:00
Frank
d6aa251c5e Merge pull request #1377 from Applevangelist/patch-6
Update AI_A2G_Dispatcher.lua
2020-11-20 18:17:25 +01:00
Frank
9305b870d2 Merge pull request #1376 from Applevangelist/patch-5
Update AI_A2A_Dispatcher.lua
2020-11-20 18:17:00 +01:00
Applevangelist
824a98d7a8 Update AI_A2G_Dispatcher.lua
Wrapper for player messages and function to set this on/off
2020-11-20 10:43:39 +01:00
Applevangelist
7a55ba105c Update AI_A2A_Dispatcher.lua
Wrap player messages, added function to switch on/off
2020-11-20 10:34:53 +01:00
Frank
122425338e Merge branch 'master' into develop 2020-11-20 10:18:05 +01:00
Frank
1d7f874a78 Merge pull request #1375 from FlightControl-Master/FF/Ops
OPS
2020-11-19 21:49:02 +01:00
Frank
afb63a7331 Update Target.lua
- Fixed escort problem
2020-11-19 19:51:58 +01:00
Frank
0c07a660ee WAREHOUSE
- Added runway destroyed check.
2020-11-17 00:25:37 +01:00
Frank
8ffda53e3d Chief and Wing Commander
- Added back in
2020-11-16 18:11:15 +01:00
Frank
5a30c08ff6 Merge pull request #1369 from FlightControl-Master/FF/Ops
TARGET
2020-11-16 13:33:14 +01:00
Frank
9cac2674c4 Update Target.lua
- Alive checks improved
2020-11-16 13:22:53 +01:00
Frank
ec3f43c69f Merge pull request #1367 from FlightControl-Master/FF/Ops
OPS
2020-11-16 00:02:20 +01:00
Frank
270dfab6a2 OPS
less output again
2020-11-15 23:49:25 +01:00
Frank
624b1f5647 Merge branch 'develop' into FF/Ops 2020-11-15 23:34:34 +01:00
Frank
84332a3ebf Update FlightGroup.lua
Fixes bug when flight searches a tanker when fuel is low.
2020-11-15 23:33:43 +01:00
Frank
63ff79ef0b Merge branch 'master' into FF/Ops 2020-11-15 23:00:50 +01:00
Frank
09452444d7 Merge branch 'master' into develop 2020-11-15 23:00:23 +01:00
Frank
75be2fc0ba Update Target.lua 2020-11-15 21:44:08 +01:00
Frank
1e0a0f8dc5 Ops 2020-11-13 23:26:56 +01:00
Frank
f3d9b9c5be Ops 2020-11-06 00:29:42 +01:00
Frank
cef0e444c9 Ops 2020-11-04 22:48:14 +01:00
Frank
bad8dc2220 Merge pull request #1362 from FlightControl-Master/FF/Ops
Ops Enhancements
2020-10-31 22:05:58 +01:00
Frank
e05d57d908 Merge branch 'develop' into FF/Ops 2020-10-31 21:22:17 +01:00
Frank
45c153f7a0 Merge branch 'master' into develop 2020-10-31 21:21:47 +01:00
Frank
0948f418cd Ops
- Fixed payload not reduced
2020-10-31 11:57:23 +01:00
Frank
d027113b0b Merge branch 'develop' into FF/Ops 2020-10-28 09:48:36 +01:00
Frank
ff00c2fb15 Merge branch 'master' into develop 2020-10-28 09:46:34 +01:00
Frank
cd5b4ee1be Update AI_Formation.lua
- fixed bug
- set default mode to following
2020-10-28 09:44:33 +01:00
Frank
ac337b8459 Ops
- Laser
2020-10-28 09:06:22 +01:00
Frank
567f7cbc29 Update OpsGroup.lua
- Laser
2020-10-27 00:12:59 +01:00
Frank
d81ffcf119 Merge branch 'develop' into FF/Ops 2020-10-26 16:16:56 +01:00
Frank
6ed66a70a2 Merge branch 'master' into develop 2020-10-26 16:16:28 +01:00
Frank
9ed3b045f7 Merge branch 'master' into develop 2020-10-26 09:17:41 +01:00
Frank
2d6653c14a Ops
- Laser
2020-10-26 08:01:56 +01:00
Frank
ab0e7e735a Merge branch 'develop' into FF/Ops 2020-10-20 23:40:52 +02:00
Frank
3243555d3f Merge branch 'master' into develop 2020-10-20 23:31:30 +02:00
Frank
8696ce0cc1 Ops 2020-10-20 23:04:15 +02:00
Frank
459ff26868 Ops 2020-10-19 23:33:39 +02:00
Frank
277eb2d09f Ops
- Laser
2020-10-18 00:02:48 +02:00
Frank
187093fa5a NavyGroup Update 2020-10-14 00:24:12 +02:00
Frank
6c9ce55759 Navygroup
- Fixed Astar bug
- Turn into wind stop
2020-10-13 00:29:31 +02:00
Frank
f9721e501a Merge branch 'FF/Ops' into develop 2020-10-12 00:22:47 +02:00
Frank
23c22651be Update Airboss.lua
- Added USS Harry S. Truman (CVN-75) as SC type.
2020-10-12 00:21:47 +02:00
Frank
2ad81ca499 Ops 2020-10-12 00:09:02 +02:00
Frank
7792381c36 OPS 2020-10-09 17:10:24 +02:00
Frank
591dd128ce Navygroup 2020-10-09 00:15:19 +02:00
Frank
ce10390406 ARMYGROUP 2020-10-07 23:26:46 +02:00
Frank
bf299e5f8d Merge pull request #1353 from FlightControl-Master/FF/Ops
OPS fixes
2020-10-03 23:29:35 +02:00
Frank
7f98e703f1 Update Airbase.lua
- Fixed bug in the `AIRBASE:GetRunwaydata()` function.
2020-10-03 23:12:17 +02:00
Frank
421d27f640 Update Airboss.lua
- Fix if unit skill is not set in env.mission (DCS bug that should be fixed by ED meanwhile).
2020-10-03 21:43:09 +02:00
Frank
fb1e95ab87 Pathfinding 2020-10-03 18:22:23 +02:00
Frank
3737592734 Ops
Fixes
2020-10-01 23:55:39 +02:00
Frank
6445cf01a2 Merge pull request #1350 from FlightControl-Master/FF/Ops
OPS Update
2020-09-20 00:26:10 +02:00
Frank
8e07b93eac Merge branch 'develop' into FF/Ops 2020-09-19 23:57:25 +02:00
Frank
23f6752362 Ops
- rm staff
2020-09-19 23:55:45 +02:00
Frank
19b870c038 Ops
- Less traceing.
2020-09-19 23:52:17 +02:00
Frank
ca7f15e622 Ops 2020-09-19 01:15:34 +02:00
Frank
d497bb25f3 Ops 2020-09-18 18:07:10 +02:00
Frank
29d694722b Ops
- Quite a few fixes while going through the example missions.
2020-09-16 23:35:13 +02:00
Frank
40ffef035b Ops 2020-09-15 18:11:19 +02:00
Frank
a00c198bcc Update Warehouse.lua
- Added born check. Helps with delayed spawning on carriers.
2020-09-15 01:13:11 +02:00
Frank
717842b276 Ops 2020-09-10 00:34:17 +02:00
Frank
d5c4c34759 Ops 2020-09-09 00:02:46 +02:00
Frank
edb0032118 ops 2020-09-08 18:04:03 +02:00
Frank
123144d06e Ops temp 2020-09-08 00:15:29 +02:00
Frank
38f5d45d5b Merge branch 'master' into FF/Ops 2020-09-07 22:25:28 +02:00
Frank
bcaf808b88 Ops little fixes 2020-09-07 22:17:33 +02:00
Frank
7b8db597ef Ops 2020-09-07 00:42:29 +02:00
Frank
18e192b235 Ops 2020-09-06 00:18:20 +02:00
Frank
5ad30277ba Ops 2020-09-05 00:56:44 +02:00
Frank
2e998dc315 Ops 2020-09-04 17:20:40 +02:00
Frank
cda1658541 Ops 2020-09-04 00:58:37 +02:00
Frank
8b640912c3 Ops 2020-09-02 22:54:54 +02:00
Frank
81a773b861 Merge branch 'master' into develop 2020-09-02 00:09:15 +02:00
Frank
444cc43971 Ops 2020-09-02 00:05:05 +02:00
Frank
eb86d59203 Ops 2020-09-01 11:42:45 +02:00
Frank
5ee35f3fbb Less output 2020-08-31 12:50:50 +02:00
Frank
9a91145f89 Small 2020-08-30 23:44:15 +02:00
Frank
637081ebdd Ops 2020-08-30 22:52:18 +02:00
Frank
7d2746e7be Merge branch 'develop' into FF/Ops 2020-08-30 17:24:57 +02:00
Frank
c84a92c787 Merge branch 'master' into develop 2020-08-30 17:15:31 +02:00
Frank
b775aaa274 Merge branch 'master' into FF/Ops 2020-08-30 17:05:09 +02:00
Frank
a97d7abc24 Range Ops 2020-08-30 17:03:16 +02:00
Frank
7e73db505b Decreased Tracing 2020-08-30 01:38:18 +02:00
Frank
a126906776 up 2020-08-29 21:24:15 +02:00
Frank
2d6092c114 TIMER
- Added new TIMER class.
2020-08-29 20:26:20 +02:00
Frank
caef309547 Ops
- Airboss optimizations WIP
2020-08-28 13:24:29 +02:00
Frank
f9ec21a2b5 Ops 2020-08-26 00:01:52 +02:00
Frank
06600b2a94 Ops 2020-08-25 17:55:53 +02:00
Frank
3f39ec0ae0 Stuff 2020-08-25 01:03:18 +02:00
Frank
cfc45cf068 Warehouse marker and spawning update 2020-08-23 01:08:02 +02:00
Frank
45d809a641 Update Profiler.lua 2020-08-22 22:39:54 +02:00
Frank
fcfbc5e17c Profiler
- Added lua Profiler.
2020-08-22 21:24:35 +02:00
Frank
f30c66424c Radioqueue Profiler 2020-08-22 21:18:12 +02:00
Frank
f823fc6ee0 Update AI_Formation.lua
Performance update
2020-08-22 16:31:56 +02:00
Frank
aac291c0c6 Performance Optimizations 2020-08-22 00:09:36 +02:00
Frank
61adeeeda3 Delete Astar - Copy.lua 2020-08-20 01:24:28 +02:00
Frank
f94a5eed61 Merge branch 'develop' into FF/OpsDev 2020-08-19 23:21:06 +02:00
Frank
0695c48e7a Merge branch 'master' into develop 2020-08-19 23:12:05 +02:00
Frank
f4bfcf58fd Ops 2020-08-19 22:32:16 +02:00
Frank
dee7307adc Ops 2020-08-19 01:06:28 +02:00
Frank
114032a743 Ops 2020-08-18 18:15:22 +02:00
Frank
e9e6a63e6a Ops 2020-08-18 01:35:24 +02:00
Frank
2a4f6020c2 Ops 2020-08-17 01:24:51 +02:00
Frank
3ea8b3737f Update Profiler.lua 2020-08-16 01:18:18 +02:00
Frank
ed47b4b3db Ops 2020-08-16 00:35:42 +02:00
Frank
adc89feda9 Ops 2020-08-15 00:54:36 +02:00
Frank
32c9a59ff0 Ops 2020-08-14 18:09:13 +02:00
Frank
200c1dac85 Ops 2020-08-14 01:01:45 +02:00
Frank
cf65c2af15 Ops 2020-08-13 01:21:02 +02:00
Frank
fb6ebc42a5 Ops 2020-08-10 23:45:52 +02:00
Frank
c7696c375e Ops 2020-08-10 01:46:03 +02:00
Frank
337e1a837f Ops 2020-08-08 01:10:03 +02:00
Frank
495a9fd3a0 Ops Target
New Class.
2020-08-06 01:43:42 +02:00
Frank
e6f7493ddd Ops Fixes 2020-08-05 00:39:48 +02:00
Frank
76e75505e5 Ops 2020-08-04 16:56:45 +02:00
Frank
dafbd3f368 Ops & Auftrag 2020-08-04 01:10:53 +02:00
Frank
11ec70441a Ops group 2020-08-03 00:31:10 +02:00
Frank
d1a18913f3 Ops 2020-08-02 01:31:47 +02:00
Frank
775b9e9fde Fixed bugs with new option table. 2020-08-01 00:25:12 +02:00
Frank
286e34e057 Profiler 2020-07-31 17:32:24 +02:00
Frank
da2aa00442 A*
Further improvements by switching to keys.
2020-07-31 00:09:21 +02:00
Frank
ba90176bb1 A*
Further optimized by using DCS API land.isVisible instead of Moose IsLoS function.
2020-07-30 21:40:27 +02:00
Frank
cf9248ecc8 A*
- Improved performance by caching cost and valid/invalid neighbours.
2020-07-30 17:41:26 +02:00
Frank
0d42b12658 Enhanced Groups 2020-07-30 01:08:25 +02:00
Frank
2f6d9b640f NAVY 2020-07-29 01:10:13 +02:00
Frank
04923b65b2 Stuff 2020-07-24 01:34:38 +02:00
Frank
2328f9a36b CHIEF 2020-07-23 19:15:26 +02:00
Frank
98971736f8 Astar 2020-07-23 00:24:59 +02:00
Frank
ec809085b4 Waypoints 2020-07-22 01:05:24 +02:00
Frank
af023c1994 Waypoints 2020-07-21 17:53:59 +02:00
Frank
d9b7cc18f3 A* 2020-07-21 01:19:03 +02:00
Frank
ce1121a4c2 INTEL
Clusters
2020-07-20 01:20:28 +02:00
Frank
5fa75bf6b9 INTEL
Improved clusters
2020-07-19 18:31:09 +02:00
Frank
5cb1036618 CHIEF
- Added Chief of Staff class.
2020-07-19 01:22:49 +02:00
Frank
9473dc2069 Update Intelligence.lua 2020-07-16 01:04:43 +02:00
Frank
81f5184b43 Added WINCOM;MANDER 2020-07-15 21:48:11 +02:00
Frank
b6bc22f991 Squadron Grouping 2020-07-15 00:51:27 +02:00
Frank
56fad29df9 ops 2020-07-14 17:56:18 +02:00
Frank
dfeea53cf6 Merge branch 'develop' into FF/Ops 2020-07-14 00:33:29 +02:00
Frank
71e6369960 INTEL class 2020-07-13 22:31:33 +02:00
Frank
0611db78b3 Intel 2020-07-13 18:31:01 +02:00
Frank
8c768cc517 Update Intelligence.lua 2020-07-12 22:20:20 +02:00
Frank
b67750d808 Intel 2020-07-12 20:57:37 +02:00
Frank
96f2ad06e2 Update FlightGroup.lua
Fixed TACAN
2020-07-12 19:43:27 +02:00
Frank
5cf4833455 OpsGroup 2020-07-10 14:16:41 +02:00
Frank
f578fcfdc7 NAVYGROUP
Improved dead/stop
2020-07-10 11:14:18 +02:00
Frank
9838e1af19 Ops 2020-07-09 00:06:02 +02:00
Frank
cee443e28d Ops 2020-07-08 00:18:42 +02:00
Frank
1fe57cab67 bla 2020-07-08 00:12:57 +02:00
Frank
80b22a8444 Ops 2020-07-08 00:07:30 +02:00
Frank
71733babf8 NavyGroup 2020-07-07 22:28:54 +02:00
Frank
9f793d6cf7 OpsGroup 2020-07-07 00:47:42 +02:00
Frank
46e73a108f Ops 2020-07-04 23:16:57 +02:00
Frank
b13ddc958b Update Warehouse.lua 2020-07-02 10:48:08 +02:00
Frank
ba3954ad3f Update Airboss.lua 2020-07-01 23:56:05 +02:00
Frank
f2e417b21f Ops 2020-07-01 23:52:27 +02:00
Frank
d93d0afdf3 Ops 2020-06-30 00:33:26 +02:00
Frank
207c9ed62e blanks 2020-06-29 21:08:57 +02:00
Frank
e3f4aa3d64 Update FlightGroup.lua 2020-06-29 21:05:26 +02:00
Frank
2392c9dc8e Ops 2020-06-29 20:55:32 +02:00
Frank
682c1f5ef2 Ops 2020-06-27 22:44:50 +02:00
340 changed files with 90543 additions and 4156 deletions

View File

@@ -1,87 +0,0 @@
version: 2.4.a.{build}
shallow_clone: true
skip_branch_with_pr: false
skip_commits:
message: /!nobuild/
skip_tags: false
environment:
access_token_documentation:
secure: JVBVVL8uJUcLXN+48eRdELEeCGOGCCaMzCqutsUqNuaZ/KblG5ZTt7+LV4UKv/0f
LUAROCKS_VER: 2.4.1
LUA_VER: 5.1.5
LUA: lua5.3
matrix:
- LUA_VER: 5.1.5
platform:
- x64
init:
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- cmd:
# Outcomment if lua environment invalidates and needs to be reinstalled, otherwise all will run from the cache.
call choco install 7zip.commandline
call choco install lua51
call choco install luarocks
call refreshenv
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
cmd: PATH = %PATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.3-win32\systree\bin
cmd: set LUA_PATH = %LUA_PATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.3-win32\systree\share\lua\5.1\?.lua;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.3-win32\systree\share\lua\5.1\?\init.lua
cmd: set LUA_CPATH = %LUA_CPATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.3-win32\systree\lib\lua\5.1\?.dll
call luarocks install luasrcdiet
call luarocks install checks
call luarocks install luadocumentor
call luarocks install luacheck
cache:
C:\ProgramData\chocolatey\lib
C:\ProgramData\chocolatey\bin
build_script:
- ps: |
if( $env:appveyor_repo_branch -eq 'master' -or $env:appveyor_repo_branch -eq 'develop' )
{
echo "Hello World!"
$apiUrl = 'https://ci.appveyor.com/api'
$token = 'v2.6hcv3ige78kg3yvg4ge8'
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$RequestBody = @{ accountName = 'FlightControl-Master'; projectSlug = 'moose-include'; branch = "$env:appveyor_repo_branch"; environmentVariables = @{} } | ConvertTo-Json
# Generate the new version ...
$project = Invoke-RestMethod -method Post -Uri "$apiUrl/builds" -Headers $headers -Body $RequestBody
}
- ps: |
if( $env:appveyor_repo_branch -eq 'master' -or $env:appveyor_repo_branch -eq 'develop' )
{
$apiUrl = 'https://ci.appveyor.com/api'
$token = 'v2.6hcv3ige78kg3yvg4ge8'
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$RequestBody = @{ accountName = 'FlightControl-Master'; projectSlug = 'moose-docs'; branch = "$env:appveyor_repo_branch"; environmentVariables = @{} } | ConvertTo-Json
# get project with last build details
$project = Invoke-RestMethod -method Post -Uri "$apiUrl/builds" -Headers $headers -Body $RequestBody
}
test: off
# test_script:
# - cmd: luacheck "Moose Development\Moose\moose.lua" "Moose Mission Setup\moose.lua"
on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

4
.gitattributes vendored
View File

@@ -15,3 +15,7 @@
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# Avoid Windows line endings on shell scripts
# Needed for dockerfile builds
*.sh text eol=lf

168
.github/workflows/build-docs.yml vendored Normal file
View File

@@ -0,0 +1,168 @@
name: Moose-Docs
on:
push:
branches:
- master
- develop
paths:
- 'Moose Setup/**/*.lua'
- 'Moose Development/**/*.lua'
- 'Moose Development/**/*.py'
- 'Moose Development/**/*.html'
- '.github/workflows/build-docs.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build informations
run: |
echo "Triggered by: ${{ github.event_name }}"
echo "Running on: ${{ runner.os }}"
echo "Ref: ${{ github.ref }}"
echo "Branch name: ${{ steps.extract_branch.outputs.branch }}"
echo "Repository: ${{ github.repository }}"
echo "Commit-Id: ${{ github.sha }}"
echo "Owner: ${{ github.repository_owner }}"
echo "FORCE_PUSH: ${{ vars.FORCE_PUSH }}"
#########################################################################
# Prepare build environment
#########################################################################
- name: Check out repository code
uses: actions/checkout@v4
- name: Prepare build output folders
run: |
mkdir -p build/tools
mkdir -p build/doc
- name: Checkout FlightControls modified luadocumentor
uses: actions/checkout@v4
with:
repository: Applevangelist/luadocumentor
path: './build/tools/luadocumentor'
ref: 'patch-1'
token: ${{ secrets.BOT_TOKEN }}
- name: Update apt-get (needed for act docker image)
run: |
sudo apt-get -qq update
- name: Install tree
run: |
sudo apt-get -qq install tree
#########################################################################
# Install all prerequisites for LuaDocumentor
#########################################################################
- name: Install Lua
run: |
sudo apt-get -qq install lua5.1
- name: Install LuaRocks
run: |
sudo apt-get -qq install luarocks -y
- name: Install markdown (prereq for LuaDocumentor)
run: |
sudo luarocks install markdown 0.32-2
- name: Install penlight (prereq for LuaDocumentor)
run: |
sudo luarocks install penlight 1.11.0-1
- name: Install metalua-compiler (prereq for LuaDocumentor)
run: |
sudo luarocks install metalua-compiler 0.7.3-1
- name: Install metalua-parser (prereq for LuaDocumentor)
run: |
sudo luarocks install metalua-parser 0.7.3-2
- name: Install checks (prereq for LuaDocumentor)
run: |
sudo luarocks install checks
#########################################################################
# Run LuaDocumentor
#########################################################################
- name: Run LuaDocumentor
run: |
lua luadocumentor.lua -d ${{ github.workspace }}/build/doc "${{ github.workspace }}/Moose Development/Moose"
working-directory: ${{ github.workspace }}/build/tools/luadocumentor
#########################################################################
# Replace <head> tag
#########################################################################
- name: Replace head tag
run: |
python3 "${{ github.workspace }}/Moose Development/docs-header.py"
working-directory: ${{ github.workspace }}/build/doc
- name: Check replacement of head tag
run: |
head -10 ${{ github.workspace }}/build/doc/AI.AI_A2A_Cap.html
#########################################################################
# Push to MOOSE_DOCS
#########################################################################
- name: Set docs repo for branch
shell: bash
id: set_doc_repo
run: |
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then
echo "docrepo=MOOSE_DOCS" >> "$GITHUB_OUTPUT"
else
echo "docrepo=MOOSE_DOCS_DEVELOP" >> "$GITHUB_OUTPUT"
fi
- name: Checkout ${{ steps.set_doc_repo.outputs.docrepo }} to folder MOOSE_DOCS
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/${{ steps.set_doc_repo.outputs.docrepo }}
path: './build/MOOSE_DOCS'
fetch-depth: 0
ref: 'master'
token: ${{ secrets.BOT_TOKEN }}
- name: Delete folder to remove deleted files
run: |
rm -rf ./build/MOOSE_DOCS/Documentation/
- name: Create target folder
run: mkdir -p build/MOOSE_DOCS/Documentation
- name: Copy build result to MOOSE_DOCS
run: |
cp ./build/doc/*.* ./build/MOOSE_DOCS/Documentation/
- name: Push result to docs repository
if: ${{ vars.FORCE_PUSH == 'true' }}
run: |
git config user.name "MooseBotter"
git config user.email "MooseBotter@users.noreply.github.com"
git add .
git commit --allow-empty -m "Auto commit by GitHub Actions Workflow"
git push --set-upstream origin master
working-directory: ${{ github.workspace }}/build/MOOSE_DOCS
#########################################################################
# Show the results
#########################################################################
- name: List files in the repository
run: |
tree ${{ github.workspace }}/build
- run: echo "This job's status is ${{ job.status }}."

148
.github/workflows/build-includes.yml vendored Normal file
View File

@@ -0,0 +1,148 @@
name: Moose-Includes
on:
push:
branches:
- master
- develop
paths:
- 'Moose Setup/**/*.lua'
- 'Moose Development/**/*.lua'
- '.github/workflows/build-includes.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Build informations
run: |
echo "Triggered by: ${{ github.event_name }}"
echo "Running on: ${{ runner.os }}"
echo "Ref: ${{ github.ref }}"
echo "Branch name: ${{ steps.extract_branch.outputs.branch }}"
echo "Repository: ${{ github.repository }}"
echo "Commit-Id: ${{ github.sha }}"
echo "Owner: ${{ github.repository_owner }}"
echo "FORCE_PUSH: ${{ vars.FORCE_PUSH }}"
#########################################################################
# Prepare build environment
#########################################################################
- name: Check out repository code
uses: actions/checkout@v4
- name: Prepare build output folders
run: |
mkdir -p build/result/Moose_Include_Dynamic
mkdir -p build/result/Moose_Include_Static
- name: Update apt-get (needed for act docker image)
run: |
sudo apt-get -qq update
- name: Install tree
run: |
sudo apt-get -qq install tree
#########################################################################
# Install all prerequisites
#########################################################################
- name: Install Lua 5.3
run: |
sudo apt-get -qq install lua5.3 -y
- name: Check Lua version
run: |
lua -v
- name: Install LuaRocks
run: |
sudo apt-get -qq install luarocks -y
- name: Check LuaRocks version
run: |
luarocks --version
- name: Install Lua 5.3 Dev for prerequisites for LuaSrcDiet
run: |
sudo apt-get -qq install liblua5.3-dev -y
- name: Install LuaSrcDiet
run: |
sudo luarocks install luasrcdiet
- name: Install LuaCheck
run: |
sudo luarocks install luacheck
#########################################################################
# Build Include files
#########################################################################
- name: Build Include Static
run: |
export COMMIT_TIME=$(git show -s --format=%cd ${{ github.sha }} --date=iso-strict)
lua5.3 "./Moose Setup/Moose_Create.lua" S "$COMMIT_TIME-${{ github.sha }}" "./Moose Development/Moose" "./Moose Setup" "./build/result/Moose_Include_Static"
- name: Build Includes Dynamic
run: |
export COMMIT_TIME=$(git show -s --format=%cd ${{ github.sha }} --date=iso-strict)
lua5.3 "./Moose Setup/Moose_Create.lua" D "$COMMIT_TIME-${{ github.sha }}" "./Moose Development/Moose" "./Moose Setup" "./build/result/Moose_Include_Dynamic"
- name: Run LuaSrcDiet
run: |
luasrcdiet --basic --opt-emptylines ./build/result/Moose_Include_Static/Moose.lua -o ./build/result/Moose_Include_Static/Moose_.lua
#########################################################################
# Run LuaCheck
#########################################################################
- name: Run LuaCheck
if: ${{ vars.SKIP_LUACHECK != true }}
continue-on-error: true
run: |
luacheck --std=lua51c --config=.luacheckrc -gurasqq "Moose Development/Moose"
#########################################################################
# Push to MOOSE_INCLUDE
#########################################################################
- name: Checkout MOOSE_INCLUDE
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/MOOSE_INCLUDE
path: './build/MOOSE_INCLUDE'
fetch-depth: 0
ref: ${{ steps.extract_branch.outputs.branch }}
token: ${{ secrets.BOT_TOKEN }}
- name: Create target folder (needed if checkout is deactivated)
run: mkdir -p build/MOOSE_INCLUDE
- name: Copy build reseult to MOOSE_INCLUDE
run: |
cp -r ./build/result/* ./build/MOOSE_INCLUDE/
- name: Push result to MOOSE_INCLUDE repository
if: ${{ vars.FORCE_PUSH == 'true' }}
run: |
git config user.name "MooseBotter"
git config user.email "MooseBotter@users.noreply.github.com"
git add .
git commit --allow-empty -m "Auto commit by GitHub Actions Workflow"
git push --set-upstream origin ${{ steps.extract_branch.outputs.branch }}
working-directory: ${{ github.workspace }}/build/MOOSE_INCLUDE
#########################################################################
# Show the results
#########################################################################
- name: List files in the repository
run: |
tree ${{ github.workspace }}/build
- run: echo "This job's status is ${{ job.status }}."

78
.github/workflows/gh-pages.yml vendored Normal file
View File

@@ -0,0 +1,78 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on:
push:
branches: ["master"]
paths:
- 'docs/**'
- '.github/workflows/gh-pages.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: docs/
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
working-directory: docs/
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
with:
path: docs/_site/
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
check:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Setup Node
uses: actions/setup-node@v3
- run: npm install linkinator
- run: npx linkinator https://flightcontrol-master.github.io/MOOSE/ --verbosity error --timeout 5000 --recurse --skip "(java.com)"

20
.gitignore vendored
View File

@@ -28,6 +28,13 @@ local.properties
.buildpath
#####################
## Visual Studio Code
#####################
*.code-workspace
.vscode/
#################
## Visual Studio
#################
@@ -35,6 +42,8 @@ local.properties
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
.vscode
# User-specific files
*.suo
*.user
@@ -220,11 +229,12 @@ pip-log.txt
_gsdata_/
#GITHUB
.gitattributes
.gitignore
Moose Test Missions/MOOSE_Test_Template.miz
Moose Development/Moose/.vscode/launch.json
MooseCodeWS.code-workspace
.gitignore
.gitignore
/.gitignore
# Excludes for act (https://github.com/nektos/act)
.secrets
.env
.actrc
.vars

View File

@@ -92,6 +92,11 @@
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{#AI_A2A_CAP.SetEngageZone}() to define that Zone.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_A2A_CAP
@@ -118,7 +123,7 @@ function AI_A2A_CAP:New2( AICap, EngageMinSpeed, EngageMaxSpeed, EngageFloorAlti
-- Multiple inheritance ... :-)
local AI_Air = AI_AIR:New( AICap )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AICap, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType )
local self = BASE:Inherit( self, AI_Air_Engage ) --#AI_A2A_CAP

View File

@@ -177,6 +177,11 @@
--
-- **The default grouping is 1. That means, that each spawned defender will act individually.**
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Authors: **FlightControl** rework of GCICAP + introduction of new concepts (squadrons).
@@ -305,7 +310,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to set a specific Engage Radius.
-- **The Engage Radius is defined for ALL squadrons which are operational.**
--
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-019%20-%20AI_A2A%20-%20Engage%20Range%20Test)
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-019%20-%20Engage%20Range%20Test)
--
-- In this example an Engage Radius is set to various values.
--
@@ -328,7 +333,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetGciRadius}() to set a specific controlled ground intercept radius.
-- **The Ground Controlled Intercept radius is defined for ALL squadrons which are operational.**
--
-- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-013%20-%20AI_A2A%20-%20Intercept%20Test)
-- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-013%20-%20Intercept%20Test)
--
-- In these examples, the Gci Radius is set to various values:
--
@@ -361,7 +366,7 @@ do -- AI_A2A_DISPATCHER
-- it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are.
-- In a hot war the borders are effectively defined by the ground based radar coverage of a coalition.
--
-- Demonstration Mission: [AID-009 - AI_A2A - Border Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-009 - AI_A2A - Border Test)
-- Demonstration Mission: [AID-009 - AI_A2A - Border Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-009%20-%20Border%20Test)
--
-- In this example a border is set for the CCCP A2A dispatcher:
--
@@ -1228,7 +1233,7 @@ do -- AI_A2A_DISPATCHER
--
-- **Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to modify the default Engage Radius for ALL squadrons.**
--
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-019%20-%20AI_A2A%20-%20Engage%20Range%20Test)
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-019%20-%20Engage%20Range%20Test)
--
-- @param #AI_A2A_DISPATCHER self
-- @param #number EngageRadius (Optional, Default = 100000) The radius to report friendlies near the target.
@@ -1278,7 +1283,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetGciRadius}() to set a specific controlled ground intercept radius.
-- **The Ground Controlled Intercept radius is defined for ALL squadrons which are operational.**
--
-- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-013%20-%20AI_A2A%20-%20Intercept%20Test)
-- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-013%20-%20Intercept%20Test)
--
-- @param #AI_A2A_DISPATCHER self
-- @param #number GciRadius (Optional, Default = 200000) The radius to ground control intercept detected targets from the nearest airbase.

View File

@@ -14,47 +14,31 @@
--- @type AI_A2A_GCI
-- @extends AI.AI_A2A#AI_A2A
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- ![Process](..\Presentations\AI_GCI\Dia3.JPG)
--
-- The AI_A2A_GCI is assigned a @{Wrapper.Group} and this must be done before the AI_A2A_GCI process can be started using the **Start** event.
--
-- ![Process](..\Presentations\AI_GCI\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_GCI\Dia5.JPG)
--
-- This cycle will continue.
--
-- ![Process](..\Presentations\AI_GCI\Dia6.JPG)
--
-- During the patrol, the AI will detect enemy targets, which are reported through the **Detected** event.
--
-- ![Process](..\Presentations\AI_GCI\Dia9.JPG)
--
-- When enemies are detected, the AI will automatically engage the enemy.
--
-- ![Process](..\Presentations\AI_GCI\Dia10.JPG)
--
-- Until a fuel or damage threshold has been reached by the AI, or when the AI is commanded to RTB.
-- When the fuel threshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Process](..\Presentations\AI_GCI\Dia13.JPG)
--
-- ## 1. AI_A2A_GCI constructor
--
-- * @{#AI_A2A_GCI.New}(): Creates a new AI_A2A_GCI object.
--
-- ## 2. AI_A2A_GCI is a FSM
--
-- ![Process](..\Presentations\AI_GCI\Dia2.JPG)
--
-- ### 2.1 AI_A2A_GCI States
--
-- * **None** ( Group ): The process is not started yet.
@@ -75,23 +59,10 @@
-- * **@{#AI_A2A_GCI.Destroyed}**: The AI has destroyed all bogeys @{Wrapper.Unit}s assigned in the CAS task.
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the thresholds have been reached, the AI will RTB.
--
-- ## 3. Set the Range of Engagement
-- # Developer Note
--
-- ![Range](..\Presentations\AI_GCI\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.AI_GCI#AI_A2A_GCI.SetEngageRange}() to define that range.
--
-- ## 4. Set the Zone of Engagement
--
-- ![Zone](..\Presentations\AI_GCI\Dia12.JPG)
--
-- An optional @{Core.Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI.AI_CAP#AI_CAP_ZONE.SetEngageZone}() to define that Zone.
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--

View File

@@ -11,7 +11,7 @@
--- @type AI_A2A_PATROL
-- @extends AI.AI_A2A#AI_A2A
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
--- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} or @{Wrapper.Group}.
--
@@ -111,7 +111,12 @@
-- When the AI is damaged, it is required that a new Patrol is started. However, damage cannon be foreseen early on.
-- Therefore, when the damage threshold is reached, the AI will return immediately to the home base (RTB).
-- Use the method @{#AI_A2A_PATROL.ManageDamage}() to have this proces in place.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_A2A_PATROL

View File

@@ -12,10 +12,16 @@
-- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_BAI
-- @extends AI.AI_A2A_Engage#AI_A2A_Engage -- TODO: Documentation. This class does not exist, unable to determine what it extends.
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_A2G_BAI
@@ -41,7 +47,7 @@ AI_A2G_BAI = {
function AI_A2G_BAI:New2( AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air = AI_AIR:New( AIGroup )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType )
local self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -12,10 +12,16 @@
-- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_CAS
-- @extends AI.AI_A2G_Patrol#AI_AIR_PATROL TODO: Documentation. This class does not exist, unable to determine what it extends.
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_A2G_CAS
@@ -41,7 +47,7 @@ AI_A2G_CAS = {
function AI_A2G_CAS:New2( AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air = AI_AIR:New( AIGroup )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType )
local self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -253,7 +253,12 @@
--
-- **The default grouping is 1. That means, that each spawned defender will act individually.**
-- But you can specify a number between 1 and 4, so that the defenders will act as a group.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Author: **FlightControl** rework of GCICAP + introduction of new concepts (squadrons).
@@ -291,8 +296,6 @@ do -- AI_A2G_DISPATCHER
--
-- ## 1. AI\_A2G\_DISPATCHER constructor:
--
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_1.JPG)
--
--
-- The @{#AI_A2G_DISPATCHER.New}() method creates a new AI_A2G_DISPATCHER instance.
--
@@ -306,8 +309,6 @@ do -- AI_A2G_DISPATCHER
-- A reconnaissance network, is used to detect enemy ground targets,
-- potentially group them into areas, and to understand the position, level of threat of the enemy.
--
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\Dia5.JPG)
--
-- As explained in the introduction, depending on the type of mission you want to achieve, different types of units can be applied to detect ground enemy targets.
-- Ground based units are very useful to act as a reconnaissance, but they lack sometimes the visibility to detect targets at greater range.
-- Recce are very useful to acquire the position of enemy ground targets when spread out over the battlefield at strategic positions.
@@ -681,8 +682,6 @@ do -- AI_A2G_DISPATCHER
--
-- Use the method @{#AI_A2G_DISPATCHER.SetSquadronGrouping}() to set the grouping of aircraft when spawned in.
--
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\Dia12.JPG)
--
-- In the case of **on call** engagement, the @{#AI_A2G_DISPATCHER.SetSquadronGrouping}() method has additional behaviour.
-- When there aren't enough patrol flights airborne, a on call will be initiated for the remaining
-- targets to be engaged. Depending on the grouping parameter, the spawned flights for on call aircraft are grouped into this setting.
@@ -696,8 +695,6 @@ do -- AI_A2G_DISPATCHER
-- The effectiveness can be set with the **overhead parameter**. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
-- The **default value** of the overhead parameter is 1.0, which means **equal balance**.
--
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\Dia11.JPG)
--
-- However, depending on the (type of) aircraft (strength and payload) in the squadron and the amount of resources available, this parameter can be changed.
--
-- The @{#AI_A2G_DISPATCHER.SetSquadronOverhead}() method can be used to tweak the defense strength,
@@ -843,8 +840,6 @@ do -- AI_A2G_DISPATCHER
--
-- For example, the following setup will set the default refuel tanker to "Tanker":
--
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_11.JPG)
--
-- -- Set the default tanker for refuelling to "Tanker", when the default fuel threshold has reached 90% fuel left.
-- A2GDispatcher:SetDefaultFuelThreshold( 0.9 )
-- A2GDispatcher:SetDefaultTanker( "Tanker" )

View File

@@ -14,61 +14,43 @@
--- @type AI_A2G_SEAD
-- @extends AI.AI_A2G_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
--- Implements the core functions to SEAD intruders. Use the Engage trigger to intercept intruders.
--
-- ![Process](..\Presentations\AI_GCI\Dia3.JPG)
--
-- The AI_A2G_SEAD is assigned a @{Wrapper.Group} and this must be done before the AI_A2G_SEAD process can be started using the **Start** event.
--
-- ![Process](..\Presentations\AI_GCI\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_GCI\Dia5.JPG)
--
-- This cycle will continue.
--
-- ![Process](..\Presentations\AI_GCI\Dia6.JPG)
--
-- During the patrol, the AI will detect enemy targets, which are reported through the **Detected** event.
--
-- ![Process](..\Presentations\AI_GCI\Dia9.JPG)
--
-- When enemies are detected, the AI will automatically engage the enemy.
--
-- ![Process](..\Presentations\AI_GCI\Dia10.JPG)
--
-- Until a fuel or damage threshold has been reached by the AI, or when the AI is commanded to RTB.
-- When the fuel threshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Process](..\Presentations\AI_GCI\Dia13.JPG)
--
-- ## 1. AI_A2G_SEAD constructor
--
-- * @{#AI_A2G_SEAD.New}(): Creates a new AI_A2G_SEAD object.
--
-- ## 3. Set the Range of Engagement
--
-- ![Range](..\Presentations\AI_GCI\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.AI_GCI#AI_A2G_SEAD.SetEngageRange}() to define that range.
-- Use the method @{#AI_AIR_PATROL.SetEngageRange}() to define that range.
--
-- ## 4. Set the Zone of Engagement
-- # Developer Note
--
-- ![Zone](..\Presentations\AI_GCI\Dia12.JPG)
--
-- An optional @{Core.Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI.AI_CAP#AI_CAP_ZONE.SetEngageZone}() to define that Zone. -- TODO: Documentation. Check that this is actually correct. The originally referenced class does not exist.
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_A2G_SEAD
@@ -94,7 +76,7 @@ AI_A2G_SEAD = {
function AI_A2G_SEAD:New2( AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air = AI_AIR:New( AIGroup )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType )
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType )
local self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -46,6 +46,11 @@
-- * **Stop**: Stop the transport process.
-- * **Monitor**: Monitor and take action.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_AIR
AI_AIR = {
ClassName = "AI_AIR",

View File

@@ -292,8 +292,6 @@ do -- AI_AIR_DISPATCHER
--
-- ## 1. AI\_AIR\_DISPATCHER constructor:
--
-- ![Banner Image](..\Presentations\AI_AIR_DISPATCHER\AI_AIR_DISPATCHER-ME_1.JPG)
--
--
-- The @{#AI_AIR_DISPATCHER.New}() method creates a new AI_AIR_DISPATCHER instance.
--
@@ -306,8 +304,6 @@ do -- AI_AIR_DISPATCHER
-- A reconnaissance network, is used to detect enemy ground targets,
-- potentially group them into areas, and to understand the position, level of threat of the enemy.
--
-- ![Banner Image](..\Presentations\AI_AIR_DISPATCHER\Dia5.JPG)
--
-- As explained in the introduction, depending on the type of mission you want to achieve, different types of units can be applied to detect ground enemy targets.
-- Ground based units are very useful to act as a reconnaissance, but they lack sometimes the visibility to detect targets at greater range.
-- Recce are very useful to acquire the position of enemy ground targets when spread out over the battlefield at strategic positions.
@@ -673,8 +669,6 @@ do -- AI_AIR_DISPATCHER
--
-- Use the method @{#AI_AIR_DISPATCHER.SetSquadronGrouping}() to set the grouping of aircraft when spawned in.
--
-- ![Banner Image](..\Presentations\AI_AIR_DISPATCHER\Dia12.JPG)
--
-- In the case of **on call** engagement, the @{#AI_AIR_DISPATCHER.SetSquadronGrouping}() method has additional behaviour.
-- When there aren't enough patrol flights airborne, a on call will be initiated for the remaining
-- targets to be engaged. Depending on the grouping parameter, the spawned flights for on call aircraft are grouped into this setting.
@@ -688,8 +682,6 @@ do -- AI_AIR_DISPATCHER
-- The effectiveness can be set with the **overhead parameter**. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
-- The **default value** of the overhead parameter is 1.0, which means **equal balance**.
--
-- ![Banner Image](..\Presentations\AI_AIR_DISPATCHER\Dia11.JPG)
--
-- However, depending on the (type of) aircraft (strength and payload) in the squadron and the amount of resources available, this parameter can be changed.
--
-- The @{#AI_AIR_DISPATCHER.SetSquadronOverhead}() method can be used to tweak the defense strength,
@@ -835,8 +827,6 @@ do -- AI_AIR_DISPATCHER
--
-- For example, the following setup will set the default refuel tanker to "Tanker":
--
-- ![Banner Image](..\Presentations\AI_AIR_DISPATCHER\AI_AIR_DISPATCHER-ME_11.JPG)
--
-- -- Define the CAP
-- A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 )
-- A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 )
@@ -883,6 +873,11 @@ do -- AI_AIR_DISPATCHER
-- However, the squadron will still stay alive. Any airplane that is airborne will continue its operations until all airborne airplanes
-- of the squadron will be destroyed. This to keep consistency of air operations not to confuse the players.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_AIR_DISPATCHER
AI_AIR_DISPATCHER = {
ClassName = "AI_AIR_DISPATCHER",

View File

@@ -14,61 +14,45 @@
--- @type AI_AIR_ENGAGE
-- @extends AI.AI_AIR#AI_AIR
-- @extends AI.AI_Air#AI_AIR
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- ![Process](..\Presentations\AI_GCI\Dia3.JPG)
--
-- The AI_AIR_ENGAGE is assigned a @{Wrapper.Group} and this must be done before the AI_AIR_ENGAGE process can be started using the **Start** event.
--
-- ![Process](..\Presentations\AI_GCI\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_GCI\Dia5.JPG)
--
-- This cycle will continue.
--
-- ![Process](..\Presentations\AI_GCI\Dia6.JPG)
--
-- During the patrol, the AI will detect enemy targets, which are reported through the **Detected** event.
--
-- ![Process](..\Presentations\AI_GCI\Dia9.JPG)
--
-- When enemies are detected, the AI will automatically engage the enemy.
--
-- ![Process](..\Presentations\AI_GCI\Dia10.JPG)
--
-- Until a fuel or damage threshold has been reached by the AI, or when the AI is commanded to RTB.
-- When the fuel threshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
--
-- ![Process](..\Presentations\AI_GCI\Dia13.JPG)
--
-- ## 1. AI_AIR_ENGAGE constructor
--
-- * @{#AI_AIR_ENGAGE.New}(): Creates a new AI_AIR_ENGAGE object.
--
-- ## 3. Set the Range of Engagement
--
-- ![Range](..\Presentations\AI_GCI\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.AI_GCI#AI_AIR_ENGAGE.SetEngageRange}() to define that range.
-- ## 2. Set the Zone of Engagement
--
-- ## 4. Set the Zone of Engagement
--
-- ![Zone](..\Presentations\AI_GCI\Dia12.JPG)
--
-- An optional @{Core.Zone} can be set,
-- An optional @{Core.Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI.AI_CAP#AI_AIR_ENGAGE.SetEngageZone}() to define that Zone.
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_AIR_ENGAGE
@@ -451,12 +435,12 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
-- TODO: A factor of * 3 is way too close. This causes the AI not to engange until merged sometimes!
if TargetDistance <= EngageDistance * 9 then
self:I(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000))
--self:I(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000))
self:__Engage( 0.1, AttackSetUnit )
else
self:I(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000))
--self:I(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000))
local EngageRoute = {}
local AttackTasks = {}

View File

@@ -79,16 +79,13 @@
-- 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.AI_CAP#AI_AIR_PATROL.SetEngageRange}() to define that range.
-- Use the method @{#AI_AIR_PATROL.SetEngageRange}() to define that range.
--
-- ## 4. Set the Zone of Engagement
-- # Developer Note
--
-- ![Zone](..\Presentations\AI_CAP\Dia12.JPG)
--
-- An optional @{Core.Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI.AI_CAP#AI_AIR_PATROL.SetEngageZone}() to define that Zone.
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_AIR_PATROL

View File

@@ -18,7 +18,12 @@
--- Implements the core functions modeling squadrons for airplanes and helicopters.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_AIR_SQUADRON

View File

@@ -22,7 +22,7 @@
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision.
-- * **Gunterlund**: Test case revision.
--
-- ===
--
@@ -130,7 +130,12 @@
-- 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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_BAI_ZONE

View File

@@ -20,7 +20,7 @@
-- ### Author: **FlightControl**
-- ### 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 :-)
-- * **Dutch_Baron**: 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 :-)
--
-- ===
--
@@ -40,7 +40,7 @@
--
-- The parent class @{Core.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.
-- An explanation about state and event transition methods can be found in the @{Core.Fsm} module documentation.
--
-- The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:
--
@@ -52,7 +52,7 @@
--
-- ## 2. AI_BALANCER is a FSM
--
-- ![Process](..\Presentations\AI_Balancer\Dia13.JPG)
-- ![Process](..\Presentations\AI_BALANCER\Dia13.JPG)
--
-- ### 2.1. AI_BALANCER States
--
@@ -85,7 +85,12 @@
--
-- 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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_BALANCER
AI_BALANCER = {
ClassName = "AI_BALANCER",

View File

@@ -20,11 +20,11 @@
-- ### Author: **FlightControl**
-- ### 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.
-- * **Quax**: Concept, Advice & Testing.
-- * **Pikey**: Concept, Advice & Testing.
-- * **Gunterlund**: Test case revision.
-- * **Whisper**: Testing.
-- * **Delta99**: Testing.
--
-- ===
--
@@ -112,7 +112,12 @@
-- An optional @{Core.Zone} can be set,
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{#AI_CAP_ZONE.SetEngageZone}() to define that Zone.
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CAP_ZONE

View File

@@ -22,9 +22,9 @@
-- ### Author: **FlightControl**
-- ### 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.
-- * **Quax**: Concept, Advice & Testing.
-- * **Pikey**: Concept, Advice & Testing.
-- * **Gunterlund**: Test case revision.
--
-- ===
--
@@ -118,7 +118,12 @@
-- * **@{#AI_CAS_ZONE.Destroy}**: The AI has destroyed a target @{Wrapper.Unit}.
-- * **@{#AI_CAS_ZONE.Destroyed}**: The AI has destroyed all target @{Wrapper.Unit}s assigned in the CAS task.
-- * **Status**: The AI is checking status (fuel and damage). When the thresholds have been reached, the AI will RTB.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CAS_ZONE

View File

@@ -25,7 +25,12 @@
-- * @{AI.AI_Cargo_APC} - Cargo transportation using APCs and other vehicles between zones.
-- * @{AI.AI_Cargo_Helicopter} - Cargo transportation using helicopters between zones.
-- * @{AI.AI_Cargo_Airplane} - Cargo transportation using airplanes to and from airbases.
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_CARGO
AI_CARGO = {
ClassName = "AI_CARGO",

View File

@@ -75,7 +75,12 @@
-- Using the @{#AI_CARGO_APC.Pickup}() method, you are able to direct the APCs towards a point on the battlefield to board/load the cargo at the specific coordinate.
-- The APCs will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment.
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
--
-- @field #AI_CARGO_APC
AI_CARGO_APC = {

View File

@@ -41,7 +41,12 @@
-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every
-- time is not so much of an issue ...
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_CARGO_AIRPLANE
AI_CARGO_AIRPLANE = {
ClassName = "AI_CARGO_AIRPLANE",

View File

@@ -100,7 +100,12 @@
--
-- Yes, please ensure that the zones are declared using the @{Core.Zone} classes.
-- Possible zones that function at the moment are ZONE, ZONE_GROUP, ZONE_UNIT, ZONE_POLYGON.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Author: **FlightControl**

View File

@@ -137,7 +137,12 @@
-- Use @{#AI_CARGO_DISPATCHER_APC.SetHomeZone}() to specify the home zone.
--
-- If no home zone is specified, the APCs will wait near the deploy zone for a new pickup command.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CARGO_DISPATCHER_APC

View File

@@ -108,7 +108,12 @@
--
-- **There are a lot of templates available that allows you to quickly setup an event handler for a specific event type!**
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
--
-- @field #AI_CARGO_DISPATCHER_AIRPLANE
AI_CARGO_DISPATCHER_AIRPLANE = {

View File

@@ -140,7 +140,12 @@
-- Use @{#AI_CARGO_DISPATCHER_HELICOPTER.SetHomeZone}() to specify the home zone.
--
-- If no home zone is specified, the helicopters will wait near the deploy zone for a new pickup command.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CARGO_DISPATCHER_HELICOPTER

View File

@@ -130,7 +130,12 @@
-- Use @{#AI_CARGO_DISPATCHER_SHIP.SetHomeZone}() to specify the home zone.
--
-- If no home zone is specified, the Ship will wait near the deploy zone for a new pickup command.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CARGO_DISPATCHER_SHIP

View File

@@ -41,7 +41,12 @@
-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every
-- time is not so much of an issue ...
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_CARGO_HELICOPTER

View File

@@ -55,6 +55,11 @@
-- coordinate. The Ship will follow the Shipping Lane to ensure consistent cargo transportation within the simulation environment.
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_CARGO_SHIP
AI_CARGO_SHIP = {
ClassName = "AI_CARGO_SHIP",

View File

@@ -147,8 +147,8 @@
-- @image Escorting.JPG
--- @type AI_ESCORT
---
-- @type AI_ESCORT
-- @extends AI.AI_Formation#AI_FORMATION
@@ -168,10 +168,17 @@
--
-- -- First find the GROUP object and the CLIENT object.
-- local EscortUnit = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
-- local EscortGroup = SET_GROUP:New():FilterPrefixes("Escort"):FilterOnce() -- The the group name of the escorts contains "Escort".
--
-- -- Now use these 2 objects to construct the new EscortPlanes object.
-- EscortPlanes = AI_ESCORT:New( EscortUnit, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
-- EscortPlanes:MenusAirplanes() -- create menus for airplanes
-- EscortPlanes:__Start(2)
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_ESCORT
AI_ESCORT = {
@@ -189,16 +196,9 @@ AI_ESCORT = {
TaskPoints = {}
}
--- @field Functional.Detection#DETECTION_AREAS
-- @field Functional.Detection#DETECTION_AREAS
AI_ESCORT.Detection = nil
--- MENUPARAM type
-- @type MENUPARAM
-- @field #AI_ESCORT ParamSelf
-- @field #Distance ParamDistance
-- @field #function ParamFunction
-- @field #string ParamMessage
--- AI_ESCORT class constructor for an AI group
-- @param #AI_ESCORT self
-- @param Wrapper.Client#CLIENT EscortUnit The client escorted by the EscortGroup.
@@ -211,10 +211,14 @@ AI_ESCORT.Detection = nil
--
-- -- First find the GROUP object and the CLIENT object.
-- local EscortUnit = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
-- local EscortGroup = SET_GROUP:New():FilterPrefixes("Escort"):FilterOnce() -- The the group name of the escorts contains "Escort".
--
-- -- Now use these 2 objects to construct the new EscortPlanes object.
-- EscortPlanes = AI_ESCORT:New( EscortUnit, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
-- EscortPlanes:MenusAirplanes() -- create menus for airplanes
-- EscortPlanes:__Start(2)
--
--
function AI_ESCORT:New( EscortUnit, EscortGroupSet, EscortName, EscortBriefing )
local self = BASE:Inherit( self, AI_FORMATION:New( EscortUnit, EscortGroupSet, EscortName, EscortBriefing ) ) -- #AI_ESCORT
@@ -227,10 +231,17 @@ function AI_ESCORT:New( EscortUnit, EscortGroupSet, EscortName, EscortBriefing )
self.EscortGroupSet = EscortGroupSet
self.EscortGroupSet:SetSomeIteratorLimit( 8 )
self.EscortBriefing = EscortBriefing
self.Menu = {}
self.Menu.HoldAtEscortPosition = self.Menu.HoldAtEscortPosition or {}
self.Menu.HoldAtLeaderPosition = self.Menu.HoldAtLeaderPosition or {}
self.Menu.Flare = self.Menu.Flare or {}
self.Menu.Smoke = self.Menu.Smoke or {}
self.Menu.Targets = self.Menu.Targets or {}
self.Menu.ROE = self.Menu.ROE or {}
self.Menu.ROT = self.Menu.ROT or {}
-- if not EscortBriefing then
-- EscortGroup:MessageToClient( EscortGroup:GetCategoryName() .. " '" .. EscortName .. "' (" .. EscortGroup:GetCallsign() .. ") reporting! " ..
@@ -250,7 +261,7 @@ function AI_ESCORT:New( EscortUnit, EscortGroupSet, EscortName, EscortBriefing )
EscortGroupSet:ForEachGroup(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
-- Set EscortGroup known at EscortUnit.
if not self.PlayerUnit._EscortGroups then
@@ -325,14 +336,14 @@ function AI_ESCORT:_InitEscortRoute( EscortGroup )
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT:onafterStart( EscortGroupSet )
self:F()
EscortGroupSet:ForEachGroup(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
EscortGroup:WayPointInitialize()
@@ -370,7 +381,7 @@ function AI_ESCORT:onafterStart( EscortGroupSet )
self:_InitFlightMenus()
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_InitEscortMenus( EscortGroup )
@@ -378,7 +389,7 @@ function AI_ESCORT:onafterStart( EscortGroupSet )
self:SetFlightModeFormation( EscortGroup )
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Core.Event#EVENTDATA EventData
function EscortGroup:OnEventDeadOrCrash( EventData )
self:F( { "EventDead", EventData } )
@@ -394,14 +405,14 @@ function AI_ESCORT:onafterStart( EscortGroupSet )
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT:onafterStop( EscortGroupSet )
self:F()
EscortGroupSet:ForEachGroup(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
EscortGroup:WayPointInitialize()
@@ -550,7 +561,7 @@ function AI_ESCORT:SetFlightMenuFormation( Formation )
local MenuFlightFormationID = MENU_GROUP_COMMAND:New( self.PlayerGroup, Formation, FlightMenuFormation,
function ( self, Formation, ... )
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup, self, Formation, Arguments )
if EscortGroup:IsAir() then
self:E({FormationID=FormationID})
@@ -764,7 +775,7 @@ end
function AI_ESCORT:SetFlightMenuHoldAtEscortPosition()
for _, MenuHoldAtEscortPosition in pairs( self.Menu.HoldAtEscortPosition ) do
for _, MenuHoldAtEscortPosition in pairs( self.Menu.HoldAtEscortPosition or {} ) do
local FlightMenuReportNavigation = MENU_GROUP:New( self.PlayerGroup, "Navigation", self.FlightMenu )
local FlightMenuHoldPosition = MENU_GROUP_COMMAND
@@ -785,7 +796,7 @@ end
function AI_ESCORT:SetEscortMenuHoldAtEscortPosition( EscortGroup )
for _, HoldAtEscortPosition in pairs( self.Menu.HoldAtEscortPosition ) do
for _, HoldAtEscortPosition in pairs( self.Menu.HoldAtEscortPosition or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
local EscortMenuReportNavigation = MENU_GROUP:New( self.PlayerGroup, "Navigation", EscortGroup.EscortMenu )
@@ -853,7 +864,7 @@ end
function AI_ESCORT:SetFlightMenuHoldAtLeaderPosition()
for _, MenuHoldAtLeaderPosition in pairs( self.Menu.HoldAtLeaderPosition ) do
for _, MenuHoldAtLeaderPosition in pairs( self.Menu.HoldAtLeaderPosition or {}) do
local FlightMenuReportNavigation = MENU_GROUP:New( self.PlayerGroup, "Navigation", self.FlightMenu )
local FlightMenuHoldAtLeaderPosition = MENU_GROUP_COMMAND
@@ -874,7 +885,7 @@ end
function AI_ESCORT:SetEscortMenuHoldAtLeaderPosition( EscortGroup )
for _, HoldAtLeaderPosition in pairs( self.Menu.HoldAtLeaderPosition ) do
for _, HoldAtLeaderPosition in pairs( self.Menu.HoldAtLeaderPosition or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
@@ -999,7 +1010,7 @@ end
function AI_ESCORT:SetFlightMenuFlare()
for _, MenuFlare in pairs( self.Menu.Flare) do
for _, MenuFlare in pairs( self.Menu.Flare or {}) do
local FlightMenuReportNavigation = MENU_GROUP:New( self.PlayerGroup, "Navigation", self.FlightMenu )
local FlightMenuFlare = MENU_GROUP:New( self.PlayerGroup, MenuFlare.MenuText, FlightMenuReportNavigation )
@@ -1014,7 +1025,7 @@ end
function AI_ESCORT:SetEscortMenuFlare( EscortGroup )
for _, MenuFlare in pairs( self.Menu.Flare) do
for _, MenuFlare in pairs( self.Menu.Flare or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
@@ -1059,7 +1070,7 @@ end
function AI_ESCORT:SetFlightMenuSmoke()
for _, MenuSmoke in pairs( self.Menu.Smoke) do
for _, MenuSmoke in pairs( self.Menu.Smoke or {}) do
local FlightMenuReportNavigation = MENU_GROUP:New( self.PlayerGroup, "Navigation", self.FlightMenu )
local FlightMenuSmoke = MENU_GROUP:New( self.PlayerGroup, MenuSmoke.MenuText, FlightMenuReportNavigation )
@@ -1076,7 +1087,7 @@ end
function AI_ESCORT:SetEscortMenuSmoke( EscortGroup )
for _, MenuSmoke in pairs( self.Menu.Smoke) do
for _, MenuSmoke in pairs( self.Menu.Smoke or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
@@ -1169,7 +1180,7 @@ function AI_ESCORT:SetFlightMenuTargets()
local FlightMenuAttackNearbyAir = MENU_GROUP_COMMAND:New( self.PlayerGroup, "Attack nearest airborne targets", self.FlightMenuAttack, AI_ESCORT._FlightAttackNearestTarget, self, self.__Enum.ReportType.Air ):SetTag( "Attack" )
local FlightMenuAttackNearbyGround = MENU_GROUP_COMMAND:New( self.PlayerGroup, "Attack nearest ground targets", self.FlightMenuAttack, AI_ESCORT._FlightAttackNearestTarget, self, self.__Enum.ReportType.Ground ):SetTag( "Attack" )
for _, MenuTargets in pairs( self.Menu.Targets) do
for _, MenuTargets in pairs( self.Menu.Targets or {}) do
MenuTargets.FlightReportTargetsScheduler = SCHEDULER:New( self, self._FlightReportTargetsScheduler, {}, MenuTargets.Interval, MenuTargets.Interval )
end
@@ -1179,7 +1190,7 @@ end
function AI_ESCORT:SetEscortMenuTargets( EscortGroup )
for _, MenuTargets in pairs( self.Menu.Targets) do
for _, MenuTargets in pairs( self.Menu.Targets or {} or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
--local EscortMenuReportTargets = MENU_GROUP:New( self.PlayerGroup, "Report targets", EscortGroup.EscortMenu )
@@ -1231,7 +1242,7 @@ function AI_ESCORT:MenuAssistedAttack()
self:F()
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if not EscortGroup:IsAir() then
-- Request assistance from other escorts.
@@ -1246,7 +1257,7 @@ end
function AI_ESCORT:SetFlightMenuROE()
for _, MenuROE in pairs( self.Menu.ROE) do
for _, MenuROE in pairs( self.Menu.ROE or {}) do
local FlightMenuROE = MENU_GROUP:New( self.PlayerGroup, "Rule Of Engagement", self.FlightMenu )
local FlightMenuROEHoldFire = MENU_GROUP_COMMAND:New( self.PlayerGroup, "Hold fire", FlightMenuROE, AI_ESCORT._FlightROEHoldFire, self, "Holding weapons!" )
@@ -1261,7 +1272,7 @@ end
function AI_ESCORT:SetEscortMenuROE( EscortGroup )
for _, MenuROE in pairs( self.Menu.ROE) do
for _, MenuROE in pairs( self.Menu.ROE or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
@@ -1302,7 +1313,7 @@ end
function AI_ESCORT:SetFlightMenuROT()
for _, MenuROT in pairs( self.Menu.ROT) do
for _, MenuROT in pairs( self.Menu.ROT or {}) do
local FlightMenuROT = MENU_GROUP:New( self.PlayerGroup, "Reaction On Threat", self.FlightMenu )
local FlightMenuROTNoReaction = MENU_GROUP_COMMAND:New( self.PlayerGroup, "Fight until death", FlightMenuROT, AI_ESCORT._FlightROTNoReaction, self, "Fighting until death!" )
@@ -1317,7 +1328,7 @@ end
function AI_ESCORT:SetEscortMenuROT( EscortGroup )
for _, MenuROT in pairs( self.Menu.ROT) do
for _, MenuROT in pairs( self.Menu.ROT or {}) do
if EscortGroup:IsAir() then
local EscortGroupName = EscortGroup:GetName()
@@ -1375,7 +1386,7 @@ function AI_ESCORT:SetEscortMenuResumeMission( EscortGroup )
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Wrapper.Group#GROUP OrbitGroup
-- @param Wrapper.Group#GROUP EscortGroup
-- @param #number OrbitHeight
@@ -1419,7 +1430,7 @@ function AI_ESCORT:_HoldPosition( OrbitGroup, EscortGroup, OrbitHeight, OrbitSec
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Wrapper.Group#GROUP OrbitGroup
-- @param #number OrbitHeight
-- @param #number OrbitSeconds
@@ -1428,7 +1439,7 @@ function AI_ESCORT:_FlightHoldPosition( OrbitGroup, OrbitHeight, OrbitSeconds )
local EscortUnit = self.PlayerUnit
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup, OrbitGroup )
if EscortGroup:IsAir() then
if OrbitGroup == nil then
@@ -1456,7 +1467,7 @@ end
function AI_ESCORT:_FlightJoinUp()
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_JoinUp( EscortGroup )
@@ -1483,7 +1494,7 @@ end
function AI_ESCORT:_FlightFormationTrail( XStart, XSpace, YStart )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_EscortFormationTrail( EscortGroup, XStart, XSpace, YStart )
@@ -1510,7 +1521,7 @@ end
function AI_ESCORT:_FlightFormationStack( XStart, XSpace, YStart, YSpace )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_EscortFormationStack( EscortGroup, XStart, XSpace, YStart, YSpace )
@@ -1533,7 +1544,7 @@ end
function AI_ESCORT:_FlightFlare( Color, Message )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_Flare( EscortGroup, Color, Message )
@@ -1556,7 +1567,7 @@ end
function AI_ESCORT:_FlightSmoke( Color, Message )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_Smoke( EscortGroup, Color, Message )
@@ -1587,7 +1598,7 @@ end
function AI_ESCORT:_FlightSwitchReportNearbyTargets( ReportTargets )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
if EscortGroup:IsAir() then
self:_EscortSwitchReportNearbyTargets( EscortGroup, ReportTargets )
@@ -1679,7 +1690,7 @@ function AI_ESCORT:_ScanTargets( ScanDuration )
end
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
-- @param #AI_ESCORT self
function AI_ESCORT.___Resume( EscortGroup, self )
@@ -1701,7 +1712,7 @@ function AI_ESCORT.___Resume( EscortGroup, self )
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Wrapper.Group#GROUP EscortGroup
-- @param #number WayPoint
function AI_ESCORT:_ResumeMission( EscortGroup, WayPoint )
@@ -1723,7 +1734,7 @@ function AI_ESCORT:_ResumeMission( EscortGroup, WayPoint )
end
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Wrapper.Group#GROUP EscortGroup The escort group that will attack the detected item.
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
function AI_ESCORT:_AttackTarget( EscortGroup, DetectedItem )
@@ -1743,7 +1754,7 @@ function AI_ESCORT:_AttackTarget( EscortGroup, DetectedItem )
local AttackUnitTasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
AttackUnitTasks[#AttackUnitTasks+1] = EscortGroup:TaskAttackUnit( DetectedUnit )
@@ -1767,7 +1778,7 @@ function AI_ESCORT:_AttackTarget( EscortGroup, DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroup:TaskFireAtPoint( DetectedUnit:GetVec2(), 50 )
@@ -1795,7 +1806,7 @@ end
function AI_ESCORT:_FlightAttackTarget( DetectedItem )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Core.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup, DetectedItem )
if EscortGroup:IsAir() then
self:_AttackTarget( EscortGroup, DetectedItem )
@@ -1842,7 +1853,7 @@ end
---
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Wrapper.Group#GROUP EscortGroup The escort group that will attack the detected item.
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
function AI_ESCORT:_AssistTarget( EscortGroup, DetectedItem )
@@ -1854,7 +1865,7 @@ function AI_ESCORT:_AssistTarget( EscortGroup, DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroup:TaskFireAtPoint( DetectedUnit:GetVec2(), 50 )
@@ -1881,7 +1892,7 @@ end
function AI_ESCORT:_FlightROEHoldFire( EscortROEMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROE( EscortGroup, EscortGroup.OptionROEHoldFire, EscortROEMessage )
end
@@ -1890,7 +1901,7 @@ end
function AI_ESCORT:_FlightROEOpenFire( EscortROEMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROE( EscortGroup, EscortGroup.OptionROEOpenFire, EscortROEMessage )
end
@@ -1899,7 +1910,7 @@ end
function AI_ESCORT:_FlightROEReturnFire( EscortROEMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROE( EscortGroup, EscortGroup.OptionROEReturnFire, EscortROEMessage )
end
@@ -1908,7 +1919,7 @@ end
function AI_ESCORT:_FlightROEWeaponFree( EscortROEMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROE( EscortGroup, EscortGroup.OptionROEWeaponFree, EscortROEMessage )
end
@@ -1924,7 +1935,7 @@ end
function AI_ESCORT:_FlightROTNoReaction( EscortROTMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROT( EscortGroup, EscortGroup.OptionROTNoReaction, EscortROTMessage )
end
@@ -1933,7 +1944,7 @@ end
function AI_ESCORT:_FlightROTPassiveDefense( EscortROTMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROT( EscortGroup, EscortGroup.OptionROTPassiveDefense, EscortROTMessage )
end
@@ -1942,7 +1953,7 @@ end
function AI_ESCORT:_FlightROTEvadeFire( EscortROTMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROT( EscortGroup, EscortGroup.OptionROTEvadeFire, EscortROTMessage )
end
@@ -1951,7 +1962,7 @@ end
function AI_ESCORT:_FlightROTVertical( EscortROTMessage )
self.EscortGroupSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
self:_ROT( EscortGroup, EscortGroup.OptionROTVertical, EscortROTMessage )
end
@@ -2178,5 +2189,3 @@ function AI_ESCORT:_FlightReportTargetsScheduler()
return false
end

View File

@@ -20,7 +20,12 @@
--- Models the automatic assignment of AI escorts to player flights.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_ESCORT_DISPATCHER

View File

@@ -20,7 +20,12 @@
--- Models the assignment of AI escorts to player flights upon request using the radio menu.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_ESCORT_DISPATCHER_REQUEST

View File

@@ -137,6 +137,11 @@
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Authors: **FlightControl**
@@ -292,7 +297,7 @@ function AI_ESCORT_REQUEST:onafterStop( EscortGroupSet )
self:F()
EscortGroupSet:ForEachGroup(
--- @param Core.Group#GROUP EscortGroup
--- @param Wrapper.Group#GROUP EscortGroup
function( EscortGroup )
EscortGroup:WayPointInitialize()

View File

@@ -8,7 +8,7 @@
--
-- ===
--
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/FOR%20-%20Formation)
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/FOR%20-%20AI%20Group%20Formation)
--
-- ===
--
@@ -31,11 +31,11 @@
-- @field Core.Set#SET_GROUP FollowGroupSet
-- @field #string FollowName
-- @field #AI_FORMATION.MODE FollowMode The mode the escort is in.
-- @field Scheduler#SCHEDULER FollowScheduler The instance of the SCHEDULER class.
-- @field Core.Scheduler#SCHEDULER FollowScheduler The instance of the SCHEDULER class.
-- @field #number FollowDistance The current follow distance.
-- @field #boolean ReportTargets If true, nearby targets are reported.
-- @Field DCSTypes#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup.
-- @field DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the FollowGroup.
-- @field DCS#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup.
-- @field DCS#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the FollowGroup.
-- @field #number dtFollow Time step between position updates.
@@ -92,7 +92,12 @@
-- local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" )
-- LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 )
-- LargeFormation:__Start( 1 )
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_FORMATION
AI_FORMATION = {
ClassName = "AI_FORMATION",
@@ -159,15 +164,6 @@ AI_FORMATION.__Enum.ReportType = {
Ground = "G",
}
--- MENUPARAM type
-- @type MENUPARAM
-- @field #AI_FORMATION ParamSelf
-- @field #number ParamDistance
-- @field #function ParamFunction
-- @field #string ParamMessage
--- AI_FORMATION class constructor for an AI group
-- @param #AI_FORMATION self
-- @param Wrapper.Unit#UNIT FollowUnit The UNIT leading the FolllowGroupSet.
@@ -1000,7 +996,7 @@ function AI_FORMATION:SetFlightModeMission( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
--- @param Wrapper.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
@@ -1024,7 +1020,7 @@ function AI_FORMATION:SetFlightModeAttack( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
--- @param Wrapper.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
@@ -1048,7 +1044,7 @@ function AI_FORMATION:SetFlightModeFormation( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
--- @param Wrapper.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )

View File

@@ -27,8 +27,8 @@
-- ### Author: **FlightControl**
-- ### 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.
-- * **Dutch_Baron**: 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**: Testing and API concept review.
--
-- ===
--
@@ -144,7 +144,12 @@
-- 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 threshold is reached, the AI will return immediately to the home base (RTB).
-- Use the method @{#AI_PATROL_ZONE.ManageDamage}() to have this process in place.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #AI_PATROL_ZONE

View File

@@ -54,6 +54,11 @@ do -- ACT_ACCOUNT
-- 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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @type ACT_ACCOUNT
-- @field Core.Set#SET_UNIT TargetSetUnit
-- @extends Core.Fsm#FSM_PROCESS
@@ -137,7 +142,7 @@ end -- ACT_ACCOUNT
do -- ACT_ACCOUNT_DEADS
--- # @{#ACT_ACCOUNT_DEADS} FSM class, extends @{Core.Fsm.Account#ACT_ACCOUNT}
--- # @{#ACT_ACCOUNT_DEADS} FSM class, extends @{#ACT_ACCOUNT}
--
-- The ACT_ACCOUNT_DEADS class accounts (detects, counts and reports) successful kills of DCS units.
-- The process is given a @{Core.Set} of units that will be tracked upon successful destruction.

View File

@@ -52,9 +52,14 @@
-- 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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- # 1) @{#ACT_ASSIGN_ACCEPT} class, extends @{Core.Fsm.Assign#ACT_ASSIGN}
-- # 1) @{#ACT_ASSIGN_ACCEPT} class, extends @{Core.Fsm#ACT_ASSIGN}
--
-- The ACT_ASSIGN_ACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.
--
@@ -64,7 +69,7 @@
--
-- ===
--
-- # 2) @{#ACT_ASSIGN_MENU_ACCEPT} class, extends @{Core.Fsm.Assign#ACT_ASSIGN}
-- # 2) @{#ACT_ASSIGN_MENU_ACCEPT} class, extends @{Core.Fsm#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.

View File

@@ -48,7 +48,7 @@
--
-- ===
--
-- # 1) @{#ACT_ASSIST_SMOKE_TARGETS_ZONE} class, extends @{Core.Fsm.Route#ACT_ASSIST}
-- # 1) @{#ACT_ASSIST_SMOKE_TARGETS_ZONE} class, extends @{#ACT_ASSIST}
--
-- The ACT_ASSIST_SMOKE_TARGETS_ZONE class implements the core functions to smoke targets in a @{Core.Zone}.
-- The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour.
@@ -58,6 +58,11 @@
--
-- * @{#ACT_ASSIST_SMOKE_TARGETS_ZONE.New}(): Creates a new ACT_ASSIST_SMOKE_TARGETS_ZONE object.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @module Actions.Act_Assist

View File

@@ -60,7 +60,7 @@
--
-- ===
--
-- # 1) @{#ACT_ROUTE_ZONE} class, extends @{Core.Fsm.Route#ACT_ROUTE}
-- # 1) @{#ACT_ROUTE_ZONE} class, extends @{#ACT_ROUTE}
--
-- The ACT_ROUTE_ZONE class implements the core functions to route an AIR @{Wrapper.Controllable} player @{Wrapper.Unit} to a @{Core.Zone}.
-- The player receives on perioding times messages with the coordinates of the route to follow.
@@ -70,6 +70,11 @@
--
-- * @{#ACT_ROUTE_ZONE.New}(): Creates a new ACT_ROUTE_ZONE object.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @module Actions.Act_Route

View File

@@ -86,7 +86,7 @@
-- There are also dispatchers that make AI work together to transport cargo automatically!!!
--
-- - @{AI.AI_Cargo_Dispatcher_APC} derived classes will create for your dynamic cargo handlers controlled by AI ground vehicle groups (APCs) to transport cargo between sites.
-- - @{AI.AI_Cargo_Dispatcher_Helicopters} derived classes will create for your dynamic cargo handlers controlled by AI helicopter groups to transport cargo between sites.
-- - @{AI.AI_Cargo_Dispatcher_Helicopter} derived classes will create for your dynamic cargo handlers controlled by AI helicopter groups to transport cargo between sites.
--
-- ## 3.3) Cargo transportation tasking.
--
@@ -233,7 +233,12 @@
-- Note that this option is optional, so can be omitted. The default value of the RR is 250 meters.
-- * **NR=** Provide the maximum range in meters when the cargo units will be boarded within the carrier during boarding.
-- Note that this option is optional, so can be omitted. The default value of the RR is 10 meters.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Author: **FlightControl**
@@ -393,7 +398,7 @@ do -- CARGO
--
-- * AI Armoured Personnel Carriers to transport cargo and engage in battles, using the @{AI.AI_Cargo_APC#AI_CARGO_APC} class.
-- * AI Helicopters to transport cargo, using the @{AI.AI_Cargo_Helicopter#AI_CARGO_HELICOPTER} class.
-- * AI Planes to transport cargo, using the @{AI.AI_Cargo_Plane#AI_CARGO_PLANE} class.
-- * AI Planes to transport cargo, using the @{AI.AI_Cargo_Airplane#AI_CARGO_AIRPLANE} class.
-- * AI Ships is planned.
--
-- The above cargo classes are also used by the TASK\_CARGO\_ classes to allow human players to transport cargo as part of a tasking:
@@ -975,7 +980,7 @@ do -- CARGO
--- Report to a Carrier Group with a Flaring signal.
-- @param #CARGO self
-- @param Utils#UTILS.FlareColor FlareColor the color of the flare.
-- @param Utilities.Utils#UTILS.FlareColor FlareColor the color of the flare.
-- @return #CARGO
function CARGO:ReportFlare( FlareColor )
@@ -984,7 +989,7 @@ do -- CARGO
--- Report to a Carrier Group with a Smoking signal.
-- @param #CARGO self
-- @param Utils#UTILS.SmokeColor SmokeColor the color of the smoke.
-- @param Utilities.Utils#UTILS.SmokeColor SmokeColor the color of the smoke.
-- @return #CARGO
function CARGO:ReportSmoke( SmokeColor )

View File

@@ -36,7 +36,12 @@ do -- CARGO_CRATE
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #CARGO_CRATE

View File

@@ -38,7 +38,12 @@ do -- CARGO_GROUP
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #CARGO_GROUP CARGO_GROUP
--
CARGO_GROUP = {

View File

@@ -29,7 +29,12 @@ do -- CARGO_SLINGLOAD
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #CARGO_SLINGLOAD

View File

@@ -27,7 +27,12 @@ do -- CARGO_UNIT
-- Note that ground forces behave in a group, and thus, act in formation, regardless if one unit is commanded to move.
--
-- This class is used in CARGO_GROUP, and is not meant to be used by mission designers individually.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- @field #CARGO_UNIT CARGO_UNIT

View File

@@ -112,7 +112,7 @@
--
-- # Calculate the Path
--
-- Finally, we have to calculate the path. This is done by the @{ASTAR.GetPath}(*ExcludeStart, ExcludeEnd*) function. This function returns a table of nodes, which
-- Finally, we have to calculate the path. This is done by the @{#GetPath}(*ExcludeStart, ExcludeEnd*) function. This function returns a table of nodes, which
-- describe the optimal path from the start node to the end node.
--
-- By default, the start and end node are include in the table that is returned.

View File

@@ -34,7 +34,8 @@ local _TraceClassMethod = {}
local _ClassID = 0
--- @type BASE
---
-- @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.
@@ -201,10 +202,10 @@ BASE = {
Scheduler = nil,
}
--- @field #BASE.__
-- @field #BASE.__
BASE.__ = {}
--- @field #BASE._
-- @field #BASE._
BASE._ = {
Schedules = {}, --- Contains the Schedulers Active
}
@@ -229,7 +230,7 @@ FORMATION = {
-- @param #BASE self
-- @return #BASE
function BASE:New()
--local self = routines.utils.deepCopy( self ) -- Create a new self instance
--local self = UTILS.DeepCopy( self ) -- Create a new self instance
local self = UTILS.DeepCopy(self)
_ClassID = _ClassID + 1
@@ -252,7 +253,7 @@ end
function BASE:Inherit( Child, Parent )
-- Create child.
local Child = routines.utils.deepCopy( Child )
local Child = UTILS.DeepCopy( Child )
if Child ~= nil then
@@ -1167,7 +1168,7 @@ function BASE:_F( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) )
end
end
end
@@ -1241,7 +1242,7 @@ function BASE:_T( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s", LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s", LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) )
end
end
end
@@ -1311,9 +1312,9 @@ function BASE:E( Arguments )
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) )
else
env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) )
end
end
@@ -1338,9 +1339,9 @@ function BASE:I( Arguments )
LineFrom = DebugInfoFrom.currentline
end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "I", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "I", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) )
else
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, routines.utils.oneLineSerialize( Arguments ) ) )
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) )
end
end

View File

@@ -0,0 +1,882 @@
--- **Core** - Client Menu Management.
--
-- **Main Features:**
--
-- * For complex, non-static menu structures
-- * Lightweigt implementation as alternative to MENU
-- * Separation of menu tree creation from menu on the clients's side
-- * Works with a SET_CLIENT set of clients
-- * Allow manipulation of the shadow tree in various ways
-- * Push to all or only one client
-- * Change entries' menu text
-- * Option to make an entry usable once only across all clients
-- * Auto appends GROUP and CLIENT objects to menu calls
--
-- ===
--
-- ### Author: **applevangelist**
--
-- ===
--
-- @module Core.ClientMenu
-- @image Core_Menu.JPG
-- last change: Oct 2023
-- TODO
----------------------------------------------------------------------------------------------------------------
--
-- CLIENTMENU
--
----------------------------------------------------------------------------------------------------------------
---
-- @type CLIENTMENU
-- @field #string ClassName Class Name
-- @field #string lid Lid for log entries
-- @field #string version Version string
-- @field #string name Name
-- @field #string groupname Group name
-- @field #table path
-- @field #table parentpath
-- @field #CLIENTMENU Parent
-- @field Wrapper.Client#CLIENT client
-- @field #number GroupID Group ID
-- @field #number ID Entry ID
-- @field Wrapper.Group#GROUP group
-- @field #string UUID Unique ID based on path+name
-- @field #string Function
-- @field #table Functionargs
-- @field #table Children
-- @field #boolean Once
-- @field #boolean Generic
-- @field #boolean debug
-- @field #CLIENTMENUMANAGER Controller
-- @extends Core.Base#BASE
---
-- @field #CLIENTMENU
CLIENTMENU = {
ClassName = "CLIENTMENUE",
lid = "",
version = "0.1.1",
name = nil,
path = nil,
group = nil,
client = nil,
GroupID = nil,
Children = {},
Once = false,
Generic = false,
debug = false,
Controller = nil,
groupname = nil,
}
---
-- @field #CLIENTMENU_ID
CLIENTMENU_ID = 0
--- Create an new CLIENTMENU object.
-- @param #CLIENTMENU self
-- @param Wrapper.Client#CLIENT Client The client for whom this entry is.
-- @param #string Text Text of the F10 menu entry.
-- @param #CLIENTMENU Parent The parent menu entry.
-- @param #string Function (optional) Function to call when the entry is used.
-- @param ... (optional) Arguments for the Function, comma separated
-- @return #CLIENTMENU self
function CLIENTMENU:NewEntry(Client,Text,Parent,Function,...)
-- Inherit everything from BASE class.
local self=BASE:Inherit(self, BASE:New()) -- #CLIENTMENU
CLIENTMENU_ID = CLIENTMENU_ID + 1
self.ID = CLIENTMENU_ID
if Client then
self.group = Client:GetGroup()
self.client = Client
self.GroupID = self.group:GetID()
self.groupname = self.group:GetName() or "Unknown Groupname"
else
self.Generic = true
end
self.name = Text or "unknown entry"
if Parent then
if Parent:IsInstanceOf("MENU_BASE") then
self.parentpath = Parent.MenuPath
else
self.parentpath = Parent:GetPath()
Parent:AddChild(self)
end
end
self.Parent = Parent
self.Function = Function
self.Functionargs = arg or {}
table.insert(self.Functionargs,self.group)
table.insert(self.Functionargs,self.client)
if self.Functionargs and self.debug then
self:T({"Functionargs",self.Functionargs})
end
if not self.Generic then
if Function ~= nil then
local ErrorHandler = function( errmsg )
env.info( "MOOSE Error in CLIENTMENU COMMAND function: " .. errmsg )
if BASE.Debug ~= nil then
env.info( BASE.Debug.traceback() )
end
return errmsg
end
self.CallHandler = function()
local function MenuFunction()
return self.Function( unpack( self.Functionargs ) )
end
local Status, Result = xpcall( MenuFunction, ErrorHandler)
if self.Once == true then
self:Clear()
end
end
self.path = missionCommands.addCommandForGroup(self.GroupID,Text,self.parentpath, self.CallHandler)
else
self.path = missionCommands.addSubMenuForGroup(self.GroupID,Text,self.parentpath)
end
else
if self.parentpath then
self.path = UTILS.DeepCopy(self.parentpath)
else
self.path = {}
end
self.path[#self.path+1] = Text
end
self.UUID = table.concat(self.path,";")
self:T({self.UUID})
self.Once = false
-- Log id.
self.lid=string.format("CLIENTMENU %s | %s | ", self.ID, self.name)
self:T(self.lid.."Created")
return self
end
--- Create a UUID
-- @param #CLIENTMENU self
-- @param #CLIENTMENU Parent The parent object if any
-- @param #string Text The menu entry text
-- @return #string UUID
function CLIENTMENU:CreateUUID(Parent,Text)
local path = {}
if Parent and Parent.path then
path = Parent.path
end
path[#path+1] = Text
local UUID = table.concat(path,";")
return UUID
end
--- Set the CLIENTMENUMANAGER for this entry.
-- @param #CLIENTMENU self
-- @param #CLIENTMENUMANAGER Controller The controlling object.
-- @return #CLIENTMENU self
function CLIENTMENU:SetController(Controller)
self.Controller = Controller
return self
end
--- The entry will be deleted after being used used - for menu entries with functions only.
-- @param #CLIENTMENU self
-- @return #CLIENTMENU self
function CLIENTMENU:SetOnce()
self:T(self.lid.."SetOnce")
self.Once = true
return self
end
--- Remove the entry from the F10 menu.
-- @param #CLIENTMENU self
-- @return #CLIENTMENU self
function CLIENTMENU:RemoveF10()
self:T(self.lid.."RemoveF10")
if self.GroupID then
--self:I(self.lid.."Removing "..table.concat(self.path,";"))
local function RemoveFunction()
return missionCommands.removeItemForGroup(self.GroupID , self.path )
end
local status, err = pcall(RemoveFunction)
if not status then
self:I(string.format("**** Error Removing Menu Entry %s for %s!",tostring(self.name),self.groupname))
end
end
return self
end
--- Get the menu path table.
-- @param #CLIENTMENU self
-- @return #table Path
function CLIENTMENU:GetPath()
self:T(self.lid.."GetPath")
return self.path
end
--- Get the UUID.
-- @param #CLIENTMENU self
-- @return #string UUID
function CLIENTMENU:GetUUID()
self:T(self.lid.."GetUUID")
return self.UUID
end
--- Link a child entry.
-- @param #CLIENTMENU self
-- @param #CLIENTMENU Child The entry to link as a child.
-- @return #CLIENTMENU self
function CLIENTMENU:AddChild(Child)
self:T(self.lid.."AddChild "..Child.ID)
table.insert(self.Children,Child.ID,Child)
return self
end
--- Remove a child entry.
-- @param #CLIENTMENU self
-- @param #CLIENTMENU Child The entry to remove from the children.
-- @return #CLIENTMENU self
function CLIENTMENU:RemoveChild(Child)
self:T(self.lid.."RemoveChild "..Child.ID)
table.remove(self.Children,Child.ID)
return self
end
--- Remove all subentries (children) from this entry.
-- @param #CLIENTMENU self
-- @return #CLIENTMENU self
function CLIENTMENU:RemoveSubEntries()
self:T(self.lid.."RemoveSubEntries")
self:T({self.Children})
for _id,_entry in pairs(self.Children) do
self:T("Removing ".._id)
if _entry then
_entry:RemoveSubEntries()
_entry:RemoveF10()
if _entry.Parent then
_entry.Parent:RemoveChild(self)
end
--if self.Controller then
--self.Controller:_RemoveByID(_entry.ID)
--end
--_entry = nil
end
end
return self
end
--- Remove this entry and all subentries (children) from this entry.
-- @param #CLIENTMENU self
-- @return #CLIENTMENU self
function CLIENTMENU:Clear()
self:T(self.lid.."Clear")
for _id,_entry in pairs(self.Children) do
if _entry then
_entry:RemoveSubEntries()
_entry = nil
end
end
self:RemoveF10()
if self.Parent then
self.Parent:RemoveChild(self)
end
--if self.Controller then
--self.Controller:_RemoveByID(self.ID)
--end
return self
end
-- TODO
----------------------------------------------------------------------------------------------------------------
--
-- CLIENTMENUMANAGER
--
----------------------------------------------------------------------------------------------------------------
--- Class CLIENTMENUMANAGER
-- @type CLIENTMENUMANAGER
-- @field #string ClassName Class Name
-- @field #string lid Lid for log entries
-- @field #string version Version string
-- @field #string name Name
-- @field Core.Set#SET_CLIENT clientset The set of clients this menu manager is for
-- @field #table flattree
-- @field #table rootentries
-- @field #table menutree
-- @field #number entrycount
-- @field #boolean debug
-- @field #table PlayerMenu
-- @field #number Coalition
-- @extends Core.Base#BASE
--- *As a child my family's menu consisted of two choices: take it, or leave it.*
--
-- ===
--
-- ## CLIENTMENU and CLIENTMENUMANAGER
--
-- Manage menu structures for a SET_CLIENT of clients.
--
-- ## Concept
--
-- Separate creation of a menu tree structure from pushing it to each client. Create a shadow "reference" menu structure tree for your client pilot's in a mission.
-- This can then be propagated to all clients. Manipulate the entries in the structure with removing, clearing or changing single entries, create replacement sub-structures
-- for entries etc, push to one or all clients.
--
-- Many functions can either change the tree for one client or for all clients.
--
-- ## Create a base reference tree and send to all clients
--
-- local clientset = SET_CLIENT:New():FilterStart()
--
-- local menumgr = CLIENTMENUMANAGER:New(clientset,"Dayshift")
-- local mymenu = menumgr:NewEntry("Top")
-- local mymenu_lv1a = menumgr:NewEntry("Level 1 a",mymenu)
-- local mymenu_lv1b = menumgr:NewEntry("Level 1 b",mymenu)
-- -- next one is a command menu entry, which can only be used once
-- local mymenu_lv1c = menumgr:NewEntry("Action Level 1 c",mymenu, testfunction, "testtext"):SetOnce()
--
-- local mymenu_lv2a = menumgr:NewEntry("Go here",mymenu_lv1a)
-- local mymenu_lv2b = menumgr:NewEntry("Level 2 ab",mymenu_lv1a)
-- local mymenu_lv2c = menumgr:NewEntry("Level 2 ac",mymenu_lv1a)
--
-- local mymenu_lv2ba = menumgr:NewEntry("Level 2 ba",mymenu_lv1b)
-- local mymenu_lv2bb = menumgr:NewEntry("Level 2 bb",mymenu_lv1b)
-- local mymenu_lv2bc = menumgr:NewEntry("Level 2 bc",mymenu_lv1b)
--
-- local mymenu_lv3a = menumgr:NewEntry("Level 3 aaa",mymenu_lv2a)
-- local mymenu_lv3b = menumgr:NewEntry("Level 3 aab",mymenu_lv2a)
-- local mymenu_lv3c = menumgr:NewEntry("Level 3 aac",mymenu_lv2a)
--
-- menumgr:Propagate() -- propagate **once** to all clients in the SET_CLIENT
--
-- ## Remove a single entry's subtree
--
-- menumgr:RemoveSubEntries(mymenu_lv3a)
--
-- ## Remove a single entry and also it's subtree
--
-- menumgr:DeleteEntry(mymenu_lv3a)
--
-- ## Add a single entry
--
-- local baimenu = menumgr:NewEntry("BAI",mymenu_lv1b)
--
-- menumgr:AddEntry(baimenu)
--
-- ## Add an entry with a function
--
-- local baimenu = menumgr:NewEntry("Task Action", mymenu_lv1b, TestFunction, Argument1, Argument1)
--
-- Now, the class will **automatically append the call with GROUP and CLIENT objects**, as this is can only be done when pushing the entry to the clients. So, the actual function implementation needs to look like this:
--
-- function TestFunction( Argument1, Argument2, Group, Client)
--
-- **Caveat is**, that you need to ensure your arguments are not **nil** or **false**, as LUA will optimize those away. You would end up having Group and Client in wrong places in the function call. Hence,
-- if you need/ want to send **nil** or **false**, send a place holder instead and ensure your function can handle this, e.g.
--
-- local baimenu = menumgr:NewEntry("Task Action", mymenu_lv1b, TestFunction, "nil", Argument1)
--
-- ## Change the text of a leaf entry in the menu tree
--
-- menumgr:ChangeEntryTextForAll(mymenu_lv1b,"Attack")
--
-- ## Reset a single clients menu tree
--
-- menumgr:ResetMenu(client)
--
-- ## Reset all and clear the reference tree
--
-- menumgr:ResetMenuComplete()
--
-- ## Set to auto-propagate for CLIENTs joining the SET_CLIENT **after** the script is loaded - handy if you have a single menu tree.
--
-- menumgr:InitAutoPropagation()
--
-- @field #CLIENTMENUMANAGER
CLIENTMENUMANAGER = {
ClassName = "CLIENTMENUMANAGER",
lid = "",
version = "0.1.3",
name = nil,
clientset = nil,
menutree = {},
flattree = {},
playertree = {},
entrycount = 0,
rootentries = {},
debug = true,
PlayerMenu = {},
Coalition = nil,
}
--- Create a new ClientManager instance.
-- @param #CLIENTMENUMANAGER self
-- @param Core.Set#SET_CLIENT ClientSet The set of clients to manage.
-- @param #string Alias The name of this manager.
-- @param #number Coalition (Optional) Coalition of this Manager, defaults to coalition.side.BLUE
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:New(ClientSet, Alias, Coalition)
-- Inherit everything from FSM class.
local self=BASE:Inherit(self, BASE:New()) -- #CLIENTMENUMANAGER
self.clientset = ClientSet
self.PlayerMenu = {}
self.name = Alias or "Nightshift"
self.Coalition = Coalition or coalition.side.BLUE
-- Log id.
self.lid=string.format("CLIENTMENUMANAGER %s | %s | ", self.version, self.name)
if self.debug then
self:I(self.lid.."Created")
end
return self
end
--- [Internal] Event handling
-- @param #CLIENTMENUMANAGER self
-- @param Core.Event#EVENTDATA EventData
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:_EventHandler(EventData)
self:T(self.lid.."_EventHandler: "..EventData.id)
--self:I(self.lid.."_EventHandler: "..tostring(EventData.IniPlayerName))
if EventData.id == EVENTS.PlayerLeaveUnit or EventData.id == EVENTS.Ejection or EventData.id == EVENTS.Crash or EventData.id == EVENTS.PilotDead then
self:T(self.lid.."Leave event for player: "..tostring(EventData.IniPlayerName))
local Client = _DATABASE:FindClient( EventData.IniPlayerName )
if Client then
self:ResetMenu(Client)
end
elseif (EventData.id == EVENTS.PlayerEnterAircraft) and EventData.IniCoalition == self.Coalition then
if EventData.IniPlayerName and EventData.IniGroup then
if (not self.clientset:IsIncludeObject(_DATABASE:FindClient( EventData.IniPlayerName ))) then
self:T(self.lid.."Client not in SET: "..EventData.IniPlayerName)
return self
end
--self:I(self.lid.."Join event for player: "..EventData.IniPlayerName)
local player = _DATABASE:FindClient( EventData.IniPlayerName )
self:Propagate(player)
end
elseif EventData.id == EVENTS.PlayerEnterUnit then
-- special for CA slots
local grp = GROUP:FindByName(EventData.IniGroupName)
if grp:IsGround() then
self:T(string.format("Player %s entered GROUND unit %s!",EventData.IniPlayerName,EventData.IniUnitName))
local IsPlayer = EventData.IniDCSUnit:getPlayerName()
if IsPlayer then
local client=_DATABASE.CLIENTS[EventData.IniDCSUnitName] --Wrapper.Client#CLIENT
-- Add client in case it does not exist already.
if not client then
-- Debug info.
self:I(string.format("Player '%s' joined ground unit '%s' of group '%s'", tostring(EventData.IniPlayerName), tostring(EventData.IniDCSUnitName), tostring(EventData.IniDCSGroupName)))
client=_DATABASE:AddClient(EventData.IniDCSUnitName)
-- Add player.
client:AddPlayer(EventData.IniPlayerName)
-- Add player.
if not _DATABASE.PLAYERS[EventData.IniPlayerName] then
_DATABASE:AddPlayer( EventData.IniUnitName, EventData.IniPlayerName )
end
-- Player settings.
local Settings = SETTINGS:Set( EventData.IniPlayerName )
Settings:SetPlayerMenu(EventData.IniUnit)
end
--local player = _DATABASE:FindClient( EventData.IniPlayerName )
self:Propagate(client)
end
end
end
return self
end
--- Set this Client Manager to auto-propagate menus to newly joined players. Useful if you have **one** menu structure only.
-- @param #CLIENTMENUMANAGER self
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:InitAutoPropagation()
-- Player Events
self:HandleEvent(EVENTS.PlayerLeaveUnit, self._EventHandler)
self:HandleEvent(EVENTS.Ejection, self._EventHandler)
self:HandleEvent(EVENTS.Crash, self._EventHandler)
self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterUnit, self._EventHandler)
self:SetEventPriority(5)
return self
end
--- Create a new entry in the generic structure.
-- @param #CLIENTMENUMANAGER self
-- @param #string Text Text of the F10 menu entry.
-- @param #CLIENTMENU Parent The parent menu entry.
-- @param #string Function (optional) Function to call when the entry is used.
-- @param ... (optional) Arguments for the Function, comma separated.
-- @return #CLIENTMENU Entry
function CLIENTMENUMANAGER:NewEntry(Text,Parent,Function,...)
self:T(self.lid.."NewEntry "..Text or "None")
self.entrycount = self.entrycount + 1
local entry = CLIENTMENU:NewEntry(nil,Text,Parent,Function,unpack(arg))
if not Parent then
self.rootentries[self.entrycount] = entry
end
local depth = #entry.path
if not self.menutree[depth] then self.menutree[depth] = {} end
table.insert(self.menutree[depth],entry.UUID)
self.flattree[entry.UUID] = entry
return entry
end
--- Check matching entry in the generic structure by UUID.
-- @param #CLIENTMENUMANAGER self
-- @param #string UUID UUID of the menu entry.
-- @return #boolean Exists
function CLIENTMENUMANAGER:EntryUUIDExists(UUID)
local exists = self.flattree[UUID] and true or false
return exists
end
--- Find matching entry in the generic structure by UUID.
-- @param #CLIENTMENUMANAGER self
-- @param #string UUID UUID of the menu entry.
-- @return #CLIENTMENU Entry The #CLIENTMENU object found or nil.
function CLIENTMENUMANAGER:FindEntryByUUID(UUID)
self:T(self.lid.."FindEntryByUUID "..UUID or "None")
local entry = nil
for _gid,_entry in pairs(self.flattree) do
local Entry = _entry -- #CLIENTMENU
if Entry and Entry.UUID == UUID then
entry = Entry
end
end
return entry
end
--- Find matching entries by text in the generic structure by UUID.
-- @param #CLIENTMENUMANAGER self
-- @param #string Text Text or partial text of the menu entry to find.
-- @param #CLIENTMENU Parent (Optional) Only find entries under this parent entry.
-- @return #table Table of matching UUIDs of #CLIENTMENU objects
-- @return #table Table of matching #CLIENTMENU objects
-- @return #number Number of matches
function CLIENTMENUMANAGER:FindUUIDsByText(Text,Parent)
self:T(self.lid.."FindUUIDsByText "..Text or "None")
local matches = {}
local entries = {}
local n = 0
for _uuid,_entry in pairs(self.flattree) do
local Entry = _entry -- #CLIENTMENU
if Parent then
if Entry and string.find(Entry.name,Text,1,true) and string.find(Entry.UUID,Parent.UUID,1,true) then
table.insert(matches,_uuid)
table.insert(entries,Entry )
n=n+1
end
else
if Entry and string.find(Entry.name,Text,1,true) then
table.insert(matches,_uuid)
table.insert(entries,Entry )
n=n+1
end
end
end
return matches, entries, n
end
--- Find matching entries in the generic structure by the menu text.
-- @param #CLIENTMENUMANAGER self
-- @param #string Text Text or partial text of the F10 menu entry.
-- @param #CLIENTMENU Parent (Optional) Only find entries under this parent entry.
-- @return #table Table of matching #CLIENTMENU objects.
-- @return #number Number of matches
function CLIENTMENUMANAGER:FindEntriesByText(Text,Parent)
self:T(self.lid.."FindEntriesByText "..Text or "None")
local matches, objects, number = self:FindUUIDsByText(Text, Parent)
return objects, number
end
--- Find matching entries under a parent in the generic structure by UUID.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Parent Find entries under this parent entry.
-- @return #table Table of matching UUIDs of #CLIENTMENU objects
-- @return #table Table of matching #CLIENTMENU objects
-- @return #number Number of matches
function CLIENTMENUMANAGER:FindUUIDsByParent(Parent)
self:T(self.lid.."FindUUIDsByParent")
local matches = {}
local entries = {}
local n = 0
for _uuid,_entry in pairs(self.flattree) do
local Entry = _entry -- #CLIENTMENU
if Parent then
if Entry and string.find(Entry.UUID,Parent.UUID,1,true) then
table.insert(matches,_uuid)
table.insert(entries,Entry )
n=n+1
end
end
end
return matches, entries, n
end
--- Find matching entries in the generic structure under a parent.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Parent Find entries under this parent entry.
-- @return #table Table of matching #CLIENTMENU objects.
-- @return #number Number of matches
function CLIENTMENUMANAGER:FindEntriesByParent(Parent)
self:T(self.lid.."FindEntriesByParent")
local matches, objects, number = self:FindUUIDsByParent(Parent)
return objects, number
end
--- Alter the text of a leaf entry in the generic structure and push to one specific client's F10 menu.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The menu entry.
-- @param #string Text New Text of the F10 menu entry.
-- @param Wrapper.Client#CLIENT Client (optional) The client for whom to alter the entry, if nil done for all clients.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:ChangeEntryText(Entry, Text, Client)
self:T(self.lid.."ChangeEntryText "..Text or "None")
local newentry = CLIENTMENU:NewEntry(nil,Text,Entry.Parent,Entry.Function,unpack(Entry.Functionargs))
self:DeleteF10Entry(Entry,Client)
self:DeleteGenericEntry(Entry)
if not Entry.Parent then
self.rootentries[self.entrycount] = newentry
end
local depth = #newentry.path
if not self.menutree[depth] then self.menutree[depth] = {} end
table.insert(self.menutree[depth],newentry.UUID)
self.flattree[newentry.UUID] = newentry
self:AddEntry(newentry,Client)
return self
end
--- Push the complete menu structure to each of the clients in the set - refresh the menu tree of the clients.
-- @param #CLIENTMENUMANAGER self
-- @param Wrapper.Client#CLIENT Client (optional) If given, propagate only for this client.
-- @return #CLIENTMENU Entry
function CLIENTMENUMANAGER:Propagate(Client)
self:T(self.lid.."Propagate")
--self:I(UTILS.PrintTableToLog(Client,1))
local Set = self.clientset.Set
if Client then
Set = {Client}
end
self:ResetMenu(Client)
for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then
local playername = client:GetPlayerName()
if not self.playertree[playername] then
self.playertree[playername] = {}
end
for level,branch in pairs (self.menutree) do
self:T("Building branch:" .. level)
for _,leaf in pairs(branch) do
self:T("Building leaf:" .. leaf)
local entry = self:FindEntryByUUID(leaf)
if entry then
self:T("Found generic entry:" .. entry.UUID)
local parent = nil
if entry.Parent and entry.Parent.UUID then
parent = self.playertree[playername][entry.Parent.UUID] or self:FindEntryByUUID(entry.Parent.UUID)
end
self.playertree[playername][entry.UUID] = CLIENTMENU:NewEntry(client,entry.name,parent,entry.Function,unpack(entry.Functionargs))
self.playertree[playername][entry.UUID].Once = entry.Once
else
self:T("NO generic entry for:" .. leaf)
end
end
end
end
end
return self
end
--- Push a single previously created entry into the menu structure of all clients.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry to add.
-- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:AddEntry(Entry,Client)
self:T(self.lid.."AddEntry")
local Set = self.clientset.Set
if Client then
Set = {Client}
end
for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then
local playername = client:GetPlayerName()
if Entry then
self:T("Adding generic entry:" .. Entry.UUID)
local parent = nil
if not self.playertree[playername] then
self.playertree[playername] = {}
end
if Entry.Parent and Entry.Parent.UUID then
parent = self.playertree[playername][Entry.Parent.UUID] or self:FindEntryByUUID(Entry.Parent.UUID)
end
self.playertree[playername][Entry.UUID] = CLIENTMENU:NewEntry(client,Entry.name,parent,Entry.Function,unpack(Entry.Functionargs))
self.playertree[playername][Entry.UUID].Once = Entry.Once
else
self:T("NO generic entry given")
end
end
end
return self
end
--- Blank out the menu - remove **all root entries** and all entries below from the client's F10 menus, leaving the generic structure untouched.
-- @param #CLIENTMENUMANAGER self
-- @param Wrapper.Client#CLIENT Client (optional) If given, remove only for this client.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:ResetMenu(Client)
self:T(self.lid.."ResetMenu")
for _,_entry in pairs(self.rootentries) do
--local RootEntry = self.structure.generic[_entry]
if _entry then
self:DeleteF10Entry(_entry,Client)
end
end
return self
end
--- Blank out the menu - remove **all root entries** and all entries below from all clients' F10 menus, and **delete** the generic structure.
-- @param #CLIENTMENUMANAGER self
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:ResetMenuComplete()
self:T(self.lid.."ResetMenuComplete")
for _,_entry in pairs(self.rootentries) do
--local RootEntry = self.structure.generic[_entry]
if _entry then
self:DeleteF10Entry(_entry)
end
end
self.playertree = nil
self.playertree = {}
self.rootentries = nil
self.rootentries = {}
self.menutree = nil
self.menutree = {}
return self
end
--- Remove the entry and all entries below the given entry from the client's F10 menus.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry to remove
-- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:DeleteF10Entry(Entry,Client)
self:T(self.lid.."DeleteF10Entry")
local Set = self.clientset.Set
if Client then
Set = {Client}
end
for _,_client in pairs(Set) do
if _client and _client:IsAlive() then
local playername = _client:GetPlayerName()
if self.playertree[playername] then
local centry = self.playertree[playername][Entry.UUID] -- #CLIENTMENU
if centry then
--self:I("Match for "..Entry.UUID)
centry:Clear()
end
end
end
end
return self
end
--- Remove the entry and all entries below the given entry from the generic tree.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry to remove
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:DeleteGenericEntry(Entry)
self:T(self.lid.."DeleteGenericEntry")
if Entry.Children and #Entry.Children > 0 then
self:RemoveGenericSubEntries(Entry)
end
local depth = #Entry.path
local uuid = Entry.UUID
local tbl = UTILS.DeepCopy(self.menutree)
if tbl[depth] then
for i=depth,#tbl do
--self:I("Level = "..i)
for _id,_uuid in pairs(tbl[i]) do
self:T(_uuid)
if string.find(_uuid,uuid,1,true) or _uuid == uuid then
--self:I("Match for ".._uuid)
self.menutree[i][_id] = nil
self.flattree[_uuid] = nil
end
end
end
end
return self
end
--- Remove all entries below the given entry from the generic tree.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry where to start. This entry stays.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:RemoveGenericSubEntries(Entry)
self:T(self.lid.."RemoveGenericSubEntries")
local depth = #Entry.path + 1
local uuid = Entry.UUID
local tbl = UTILS.DeepCopy(self.menutree)
if tbl[depth] then
for i=depth,#tbl do
self:T("Level = "..i)
for _id,_uuid in pairs(tbl[i]) do
self:T(_uuid)
if string.find(_uuid,uuid,1,true) then
self:T("Match for ".._uuid)
self.menutree[i][_id] = nil
self.flattree[_uuid] = nil
end
end
end
end
return self
end
--- Remove all entries below the given entry from the client's F10 menus.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry where to start. This entry stays.
-- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client. In this case the generic structure will not be touched.
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:RemoveF10SubEntries(Entry,Client)
self:T(self.lid.."RemoveSubEntries")
local Set = self.clientset.Set
if Client then
Set = {Client}
end
for _,_client in pairs(Set) do
if _client and _client:IsAlive() then
local playername = _client:GetPlayerName()
if self.playertree[playername] then
local centry = self.playertree[playername][Entry.UUID] -- #CLIENTMENU
centry:RemoveSubEntries()
end
end
end
return self
end
----------------------------------------------------------------------------------------------------------------
--
-- End ClientMenu
--
----------------------------------------------------------------------------------------------------------------

View File

@@ -9,7 +9,7 @@
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Operation).
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Core/Condition).
--
-- ===
--

View File

@@ -31,11 +31,12 @@
-- @module Core.Database
-- @image Core_Database.JPG
--- @type DATABASE
---
-- @type DATABASE
-- @field #string ClassName Name of the class.
-- @field #table Templates Templates: Units, Groups, Statics, ClientsByName, ClientsByID.
-- @field #table CLIENTS Clients.
-- @field #table STORAGES DCS warehouse storages.
-- @extends Core.Base#BASE
--- Contains collections of wrapper objects defined within MOOSE that reflect objects within the simulator.
@@ -50,6 +51,7 @@
-- * PLAYERSJOINED
-- * PLAYERS
-- * CARGOS
-- * STORAGES (DCS warehouses)
--
-- On top, for internal MOOSE administration purposes, the DATABASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.
--
@@ -90,6 +92,7 @@ DATABASE = {
FLIGHTCONTROLS = {},
OPSZONES = {},
PATHLINES = {},
STORAGES = {},
}
local _DATABASECoalition =
@@ -123,6 +126,8 @@ function DATABASE:New()
self:SetEventPriority( 1 )
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
-- DCS 2.9 fixed CA event for players -- TODO: reset unit when leaving
self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.RemoveUnit, self._EventOnDeadOrCrash )
@@ -246,6 +251,38 @@ function DATABASE:FindAirbase( AirbaseName )
end
--- Adds a STORAGE (DCS warehouse wrapper) based on the Airbase Name to the DATABASE.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase.
-- @return Wrapper.Storage#STORAGE Storage object.
function DATABASE:AddStorage( AirbaseName )
if not self.STORAGES[AirbaseName] then
self.STORAGES[AirbaseName] = STORAGE:New( AirbaseName )
end
return self.STORAGES[AirbaseName]
end
--- Deletes a STORAGE from the DATABASE based on the name of the associated airbase.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase.
function DATABASE:DeleteStorage( AirbaseName )
self.STORAGES[AirbaseName] = nil
end
--- Finds an STORAGE based on the name of the associated airbase.
-- @param #DATABASE self
-- @param #string AirbaseName Name of the airbase.
-- @return Wrapper.Storage#STORAGE The found STORAGE.
function DATABASE:FindStorage( AirbaseName )
local storage = self.STORAGES[AirbaseName]
return storage
end
do -- Zones and Pathlines
--- Finds a @{Core.Zone} based on the zone name.
@@ -645,7 +682,7 @@ do -- cargo
--- Finds an CARGO based on the CargoName.
-- @param #DATABASE self
-- @param #string CargoName
-- @return Wrapper.Cargo#CARGO The found CARGO.
-- @return Cargo.Cargo#CARGO The found CARGO.
function DATABASE:FindCargo( CargoName )
local CargoFound = self.CARGOS[CargoName]
@@ -775,6 +812,7 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
self.PLAYERUNITS[PlayerName] = self:FindUnit( UnitName )
self.PLAYERSJOINED[PlayerName] = PlayerName
end
end
--- Deletes a player from the DATABASE based on the Player Name.
@@ -1124,7 +1162,7 @@ end
-- @param #string AirbaseName Name of the airbase.
-- @return #number Category.
function DATABASE:GetCategoryFromAirbase( AirbaseName )
return self.AIRBASES[AirbaseName]:GetCategory()
return self.AIRBASES[AirbaseName]:GetAirbaseCategory()
end
@@ -1333,7 +1371,7 @@ function DATABASE:_EventOnBirth( Event )
if PlayerName then
-- Debug info.
self:I(string.format("Player '%s' joint unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
self:I(string.format("Player '%s' joined unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
-- Add client in case it does not exist already.
if not client then
@@ -1435,39 +1473,43 @@ function DATABASE:_EventOnDeadOrCrash( Event )
end
--- Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).
--- Handles the OnPlayerEnterUnit event to fill the active players table for CA units (with the unit filter applied).
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnPlayerEnterUnit( Event )
self:F2( { Event } )
if Event.IniDCSUnit then
if Event.IniObjectCategory == 1 then
-- Player entering a CA slot
if Event.IniObjectCategory == 1 and Event.IniGroup and Event.IniGroup:IsGround() then
local IsPlayer = Event.IniDCSUnit:getPlayerName()
if IsPlayer then
-- Add unit.
self:AddUnit( Event.IniDCSUnitName )
-- Debug info.
self:I(string.format("Player '%s' joined GROUND unit '%s' of group '%s'", tostring(Event.IniPlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
local client= self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT
-- Add client in case it does not exist already.
if not client then
client=self:AddClient(Event.IniDCSUnitName)
end
-- Add player.
client:AddPlayer(Event.IniPlayerName)
-- Ini unit.
Event.IniUnit = self:FindUnit( Event.IniDCSUnitName )
-- Add group.
self:AddGroup( Event.IniDCSGroupName )
-- Get player unit.
local PlayerName = Event.IniDCSUnit:getPlayerName()
if PlayerName then
if not self.PLAYERS[PlayerName] then
self:AddPlayer( Event.IniDCSUnitName, PlayerName )
-- Add player.
if not self.PLAYERS[Event.IniPlayerName] then
self:AddPlayer( Event.IniUnitName, Event.IniPlayerName )
end
local Settings = SETTINGS:Set( PlayerName )
Settings:SetPlayerMenu( Event.IniUnit )
-- Player settings.
local Settings = SETTINGS:Set( Event.IniPlayerName )
Settings:SetPlayerMenu(Event.IniUnit)
else
self:E("ERROR: getPlayerName() returned nil for event PlayerEnterUnit")
end
end
end
end
@@ -1478,15 +1520,26 @@ end
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnPlayerLeaveUnit( Event )
self:F2( { Event } )
local function FindPlayerName(UnitName)
local playername = nil
for _name,_unitname in pairs(self.PLAYERS) do
if _unitname == UnitName then
playername = _name
break
end
end
return playername
end
if Event.IniUnit then
if Event.IniObjectCategory == 1 then
-- Try to get the player name. This can be buggy for multicrew aircraft!
local PlayerName = Event.IniUnit:GetPlayerName()
if PlayerName then --and self.PLAYERS[PlayerName] then
local PlayerName = Event.IniUnit:GetPlayerName() or FindPlayerName(Event.IniUnitName)
if PlayerName then
-- Debug info.
self:I(string.format("Player '%s' left unit %s", tostring(PlayerName), tostring(Event.IniUnitName)))
@@ -1813,13 +1866,13 @@ function DATABASE:GetFlightControl(airbasename)
return self.FLIGHTCONTROLS[airbasename]
end
--- @param #DATABASE self
-- @param #DATABASE self
function DATABASE:_RegisterTemplates()
self:F2()
self.Navpoints = {}
self.UNITS = {}
--Build routines.db.units and self.Navpoints
--Build self.Navpoints
for CoalitionName, coa_data in pairs(env.mission.coalition) do
self:T({CoalitionName=CoalitionName})
@@ -1841,7 +1894,7 @@ function DATABASE:_RegisterTemplates()
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] = 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.
@@ -1970,8 +2023,6 @@ end
TargetPlayerName = Event.IniPlayerName
TargetCoalition = Event.IniCoalition
--TargetCategory = TargetUnit:getCategory()
--TargetCategory = TargetUnit:getDesc().category -- Workaround
TargetCategory = Event.IniCategory
TargetType = Event.IniTypeName

View File

@@ -173,7 +173,8 @@
-- @image Core_Event.JPG
--- @type EVENT
---
-- @type EVENT
-- @field #EVENT.Events Events
-- @extends Core.Base#BASE
@@ -282,6 +283,7 @@ EVENTS = {
-- @field Wrapper.Group#GROUP IniGroup (UNIT) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
-- @field #string IniGroupName UNIT) The initiating GROUP name (same as IniDCSGroupName).
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
-- @field #string IniPlayerUCID (UNIT) The UCID of the initiating player in case the Unit is a client or player slot and on a multi-player server.
-- @field DCS#coalition.side IniCoalition (UNIT) The coalition of the initiator.
-- @field DCS#Unit.Category IniCategory (UNIT) The category of the initiator.
-- @field #string IniTypeName (UNIT) The type name of the initiator.
@@ -297,6 +299,7 @@ EVENTS = {
-- @field Wrapper.Group#GROUP TgtGroup (UNIT) The target MOOSE wrapper @{Wrapper.Group#GROUP} of the target Group object.
-- @field #string TgtGroupName (UNIT) The target GROUP name (same as TgtDCSGroupName).
-- @field #string TgtPlayerName (UNIT) The name of the target player in case the Unit is a client or player slot.
-- @field #string TgtPlayerUCID (UNIT) The UCID of the target player in case the Unit is a client or player slot and on a multi-player server.
-- @field DCS#coalition.side TgtCoalition (UNIT) The coalition of the target.
-- @field DCS#Unit.Category TgtCategory (UNIT) The category of the target.
-- @field #string TgtTypeName (UNIT) The type name of the target.
@@ -313,7 +316,7 @@ EVENTS = {
-- @field Cargo.Cargo#CARGO Cargo The cargo object.
-- @field #string CargoName The name of the cargo object.
--
-- @field Core.ZONE#ZONE Zone The zone object.
-- @field Core.Zone#ZONE Zone The zone object.
-- @field #string ZoneName The name of the zone.
@@ -988,7 +991,7 @@ do -- Event Creation
--- Creation of a New ZoneGoal Event.
-- @param #EVENT self
-- @param Core.Functional#ZONE_GOAL ZoneGoal The ZoneGoal created.
-- @param Functional.ZoneGoal#ZONE_GOAL ZoneGoal The ZoneGoal created.
function EVENT:CreateEventNewZoneGoal( ZoneGoal )
self:F( { ZoneGoal } )
@@ -1080,9 +1083,9 @@ function EVENT:onEvent( Event )
if Event.initiator then
Event.IniObjectCategory = Event.initiator:getCategory()
Event.IniObjectCategory = Object.getCategory(Event.initiator)
if Event.IniObjectCategory == Object.Category.STATIC then
if Event.IniObjectCategory == Object.Category.STATIC then
---
-- Static
---
@@ -1118,10 +1121,9 @@ function EVENT:onEvent( Event )
local Unit=UNIT:FindByName(Event.IniDCSUnitName)
if Unit then
Event.IniObjectCategory = Object.Category.UNIT
end
end
end
if Event.IniObjectCategory == Object.Category.UNIT then
elseif Event.IniObjectCategory == Object.Category.UNIT then
---
-- Unit
---
@@ -1144,12 +1146,19 @@ function EVENT:onEvent( Event )
end
Event.IniPlayerName = Event.IniDCSUnit:getPlayerName()
if Event.IniPlayerName then
-- get UUCID
local PID = NET.GetPlayerIDByName(nil,Event.IniPlayerName)
if PID then
Event.IniPlayerUCID = net.get_player_info(tonumber(PID), 'ucid')
--env.info("Event.IniPlayerUCID="..tostring(Event.IniPlayerUCID),false)
end
end
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
Event.IniCategory = Event.IniDCSUnit:getDesc().category
end
if Event.IniObjectCategory == Object.Category.CARGO then
elseif Event.IniObjectCategory == Object.Category.CARGO then
---
-- Cargo
---
@@ -1160,9 +1169,8 @@ function EVENT:onEvent( Event )
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
end
if Event.IniObjectCategory == Object.Category.SCENERY then
elseif Event.IniObjectCategory == Object.Category.SCENERY then
---
-- Scenery
---
@@ -1172,9 +1180,8 @@ function EVENT:onEvent( Event )
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY"
end
if Event.IniObjectCategory == Object.Category.BASE then
elseif Event.IniObjectCategory == Object.Category.BASE then
---
-- Base Object
---
@@ -1201,9 +1208,12 @@ function EVENT:onEvent( Event )
---
-- Target category.
Event.TgtObjectCategory = Event.target:getCategory()
Event.TgtObjectCategory = Object.getCategory(Event.target)
if Event.TgtObjectCategory == Object.Category.UNIT then
---
-- UNIT
---
Event.TgtDCSUnit = Event.target
Event.TgtDCSGroup = Event.TgtDCSUnit:getGroup()
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
@@ -1216,13 +1226,22 @@ function EVENT:onEvent( Event )
Event.TgtGroupName = Event.TgtDCSGroupName
end
Event.TgtPlayerName = Event.TgtDCSUnit:getPlayerName()
if Event.TgtPlayerName then
-- get UUCID
local PID = NET.GetPlayerIDByName(nil,Event.TgtPlayerName)
if PID then
Event.TgtPlayerUCID = net.get_player_info(tonumber(PID), 'ucid')
--env.info("Event.TgtPlayerUCID="..tostring(Event.TgtPlayerUCID),false)
end
end
Event.TgtCoalition = Event.TgtDCSUnit:getCoalition()
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
end
if Event.TgtObjectCategory == Object.Category.STATIC then
-- get base data
elseif Event.TgtObjectCategory == Object.Category.STATIC then
---
-- STATIC
---
Event.TgtDCSUnit = Event.target
if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
@@ -1249,9 +1268,11 @@ function EVENT:onEvent( Event )
Event.TgtTypeName = "Static"
end
end
end
if Event.TgtObjectCategory == Object.Category.SCENERY then
elseif Event.TgtObjectCategory == Object.Category.SCENERY then
---
-- SCENERY
---
Event.TgtDCSUnit = Event.target
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
Event.TgtUnitName = Event.TgtDCSUnitName
@@ -1281,7 +1302,7 @@ function EVENT:onEvent( Event )
-- However, this is not a big thing, as the aircraft the pilot ejected from is usually long crashed before the ejected pilot touches the ground.
--Event.Place=UNIT:Find(Event.place)
else
if Event.place:isExist() and Event.place:getCategory() ~= Object.Category.SCENERY then
if Event.place:isExist() and Object.getCategory(Event.place) ~= Object.Category.SCENERY then
Event.Place=AIRBASE:Find(Event.place)
Event.PlaceName=Event.Place:GetName()
end

View File

@@ -249,7 +249,7 @@ do -- FSM
--
-- ### Linear Transition Example
--
-- This example is fully implemented in the MOOSE test mission on GITHUB: [FSM-100 - Transition Explanation](https://github.com/FlightControl-Master/MOOSE/blob/master/Moose%20Test%20Missions/FSM%20-%20Finite%20State%20Machine/FSM-100%20-%20Transition%20Explanation/FSM-100%20-%20Transition%20Explanation.lua)
-- This example is fully implemented in the MOOSE test mission on GITHUB: [FSM-100 - Transition Explanation](https://github.com/FlightControl-Master/MOOSE_MISSIONS/blob/master/FSM%20-%20Finite%20State%20Machine/FSM-100%20-%20Transition%20Explanation/FSM-100%20-%20Transition%20Explanation.lua)
--
-- It models a unit standing still near Batumi, and flaring every 5 seconds while switching between a Green flare and a Red flare.
-- The purpose of this example is not to show how exciting flaring is, but it demonstrates how a Linear Transition FSM can be build.
@@ -1260,7 +1260,7 @@ do -- FSM_PROCESS
--- Assign the process to a @{Wrapper.Unit} and activate the process.
-- @param #FSM_PROCESS self
-- @param Task.Tasking#TASK Task
-- @param Tasking.Task#TASK Task
-- @param Wrapper.Unit#UNIT ProcessUnit
-- @return #FSM_PROCESS self
function FSM_PROCESS:Assign( ProcessUnit, Task )

View File

@@ -513,7 +513,7 @@ do -- MENU_COALITION
--- @type MENU_COALITION
-- @extends Core.Menu#MENU_BASE
--- Manages the main menus for @{DCS.coalition}s.
--- Manages the main menus for DCS.coalition.
--
-- 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}.

View File

@@ -52,7 +52,7 @@
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
-- ### Contributions: **Applevangelist**
--
-- ===
--
@@ -73,7 +73,7 @@ MESSAGE.Type = {
Detailed = "Detailed Report",
}
--- 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.
--- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{#MESSAGE.ToClient} or @{#MESSAGE.ToCoalition} or @{#MESSAGE.ToAll} to send these Messages to the respective recipients.
-- @param self
-- @param #string MessageText is the text of the Message.
-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel.
@@ -127,7 +127,7 @@ end
--- Creates a new MESSAGE object of a certain type.
-- 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.
-- You must use the functions @{Core.Message#ToClient} or @{Core.Message#ToCoalition} or @{Core.Message#ToAll} to send these Messages to the respective recipients.
-- The message display times are automatically defined based on the timing settings in the @{Core.Settings} menu.
-- @param self
-- @param #string MessageText is the text of the Message.
@@ -343,7 +343,7 @@ end
--- Sends a MESSAGE to a Coalition.
-- @param #MESSAGE self
-- @param #DCS.coalition.side CoalitionSide @{#DCS.coalition.side} to which the message is displayed.
-- @param DCS#coalition.side CoalitionSide @{#DCS.coalition.side} to which the message is displayed.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return #MESSAGE Message object.
-- @usage
@@ -371,13 +371,15 @@ function MESSAGE:ToCoalition( CoalitionSide, Settings )
trigger.action.outTextForCoalition( CoalitionSide, self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
end
end
self.CoalitionSide = 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}.
-- @param CoalitionSide needs to be filled out by the defined structure of the standard scripting engine @{#DCS.coalition.side}.
-- @param #boolean Condition Sends the message only if the condition is true.
-- @return #MESSAGE self
function MESSAGE:ToCoalitionIf( CoalitionSide, Condition )
@@ -454,3 +456,163 @@ function MESSAGE:ToLogIf( Condition )
end
return self
end
_MESSAGESRS = {}
--- Set up MESSAGE generally to allow Text-To-Speech via SRS and TTS functions.
-- @param #string PathToSRS Path to SRS Folder, defaults to "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone".
-- @param #number Port Port number of SRS, defaults to 5002.
-- @param #string PathToCredentials (optional) Path to credentials file for e.g. Google.
-- @param #number Frequency Frequency in MHz. Can also be given as a #table of frequencies.
-- @param #number Modulation Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations.
-- @param #string Gender (optional) Gender, i.e. "male" or "female", defaults to "female".
-- @param #string Culture (optional) Culture, e.g. "en-US", defaults to "en-GB"
-- @param #string Voice (optional) Voice. Will override gender and culture settings, e.g. MSRS.Voices.Microsoft.Hazel or MSRS.Voices.Google.Standard.de_DE_Standard_D. Hint on Microsoft voices - working voices are limited to Hedda, Hazel, David, Zira and Hortense. **Must** be installed on your Desktop or Server!
-- @param #number Coalition (optional) Coalition, can be coalition.side.RED, coalition.side.BLUE or coalition.side.NEUTRAL. Defaults to coalition.side.NEUTRAL.
-- @param #number Volume (optional) Volume, can be between 0.0 and 1.0 (loudest).
-- @param #string Label (optional) Label, defaults to "MESSAGE" or the Message Category set.
-- @param Core.Point#COORDINATE Coordinate (optional) Coordinate this messages originates from.
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
-- MESSAGE.SetMSRS("D:\\Program Files\\DCS-SimpleRadio-Standalone",5012,nil,127,radio.modulation.FM,"female","en-US",nil,coalition.side.BLUE)
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
--
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate)
_MESSAGESRS.MSRS = MSRS:New(PathToSRS,Frequency or 243,Modulation or radio.modulation.AM,Volume)
_MESSAGESRS.frequency = Frequency
_MESSAGESRS.modulation = Modulation or radio.modulation.AM
_MESSAGESRS.MSRS:SetCoalition(Coalition or coalition.side.NEUTRAL)
_MESSAGESRS.coalition = Coalition or coalition.side.NEUTRAL
_MESSAGESRS.coordinate = Coordinate
_MESSAGESRS.MSRS:SetCoordinate(Coordinate)
_MESSAGESRS.MSRS:SetCulture(Culture)
_MESSAGESRS.Culture = Culture or "en-GB"
_MESSAGESRS.MSRS:SetGender(Gender)
_MESSAGESRS.Gender = Gender or "female"
_MESSAGESRS.MSRS:SetGoogle(PathToCredentials)
_MESSAGESRS.google = PathToCredentials
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE")
_MESSAGESRS.label = Label or "MESSAGE"
_MESSAGESRS.MSRS:SetPort(Port or 5002)
_MESSAGESRS.port = Port or 5002
_MESSAGESRS.volume = Volume or 1
_MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume)
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end
_MESSAGESRS.voice = Voice --or MSRS.Voices.Microsoft.Hedda
--if _MESSAGESRS.google and not Voice then _MESSAGESRS.Voice = MSRS.Voices.Google.Standard.en_GB_Standard_A end
--_MESSAGESRS.MSRS:SetVoice(Voice or _MESSAGESRS.voice)
_MESSAGESRS.SRSQ = MSRSQUEUE:New(Label or "MESSAGE")
end
--- Sends a message via SRS.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number coalition (optional) Coalition, can be coalition.side.RED, coalition.side.BLUE or coalition.side.NEUTRAL. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
-- MESSAGE.SetMSRS("D:\\Program Files\\DCS-SimpleRadio-Standalone",5012,nil,127,radio.modulation.FM,"female","en-US",nil,coalition.side.BLUE)
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
--
function MESSAGE:ToSRS(frequency,modulation,gender,culture,voice,coalition,volume,coordinate)
local tgender = gender or _MESSAGESRS.Gender
if _MESSAGESRS.SRSQ then
if voice then
_MESSAGESRS.MSRS:SetVoice(voice or _MESSAGESRS.voice)
end
if coordinate then
_MESSAGESRS.MSRS:SetCoordinate(coordinate)
end
local category = string.gsub(self.MessageCategory,":","")
_MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,nil,nil,nil,nil,nil,frequency or _MESSAGESRS.frequency,modulation or _MESSAGESRS.modulation, gender or _MESSAGESRS.Gender,culture or _MESSAGESRS.Culture,nil,volume or _MESSAGESRS.volume,category,coordinate or _MESSAGESRS.coordinate)
end
return self
end
--- Sends a message via SRS on the blue coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
-- MESSAGE.SetMSRS("D:\\Program Files\\DCS-SimpleRadio-Standalone",5012,nil,127,radio.modulation.FM,"female","en-US",nil,coalition.side.BLUE)
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRSBlue()
--
function MESSAGE:ToSRSBlue(frequency,modulation,gender,culture,voice,volume,coordinate)
self:ToSRS(frequency,modulation,gender,culture,voice,coalition.side.BLUE,volume,coordinate)
return self
end
--- Sends a message via SRS on the red coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
-- MESSAGE.SetMSRS("D:\\Program Files\\DCS-SimpleRadio-Standalone",5012,nil,127,radio.modulation.FM,"female","en-US",nil,coalition.side.RED)
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRSRed()
--
function MESSAGE:ToSRSRed(frequency,modulation,gender,culture,voice,volume,coordinate)
self:ToSRS(frequency,modulation,gender,culture,voice,coalition.side.RED,volume,coordinate)
return self
end
--- Sends a message via SRS to all - via the neutral coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
-- MESSAGE.SetMSRS("D:\\Program Files\\DCS-SimpleRadio-Standalone",5012,nil,127,radio.modulation.FM,"female","en-US",nil,coalition.side.NEUTRAL)
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRSAll()
--
function MESSAGE:ToSRSAll(frequency,modulation,gender,culture,voice,volume,coordinate)
self:ToSRS(frequency,modulation,gender,culture,voice,coalition.side.NEUTRAL,volume,coordinate)
return self
end

View File

@@ -199,7 +199,7 @@ end
--- Get points of pathline. Not that points are tables, that contain more information as just the 2D or 3D position but also the surface type etc.
-- @param #PATHLINE self
-- @return <#PATHLINE.Point> List of points.
-- @return #list <#PATHLINE.Point> List of points.
function PATHLINE:GetPoints()
return self.points
end

View File

@@ -544,7 +544,7 @@ do -- COORDINATE
if ZoneObject then
-- Get category of scanned object.
local ObjectCategory = ZoneObject:getCategory()
local ObjectCategory = Object.getCategory(ZoneObject)
-- Check for unit or static objects
if ObjectCategory==Object.Category.UNIT and ZoneObject:isExist() then
@@ -2389,7 +2389,6 @@ do -- COORDINATE
end
--- Creates a free form shape on the F10 map. The first point is the current COORDINATE. The remaining points need to be specified.
-- **NOTE**: A free form polygon must have **at least three points** in total and currently only **up to 15 points** in total are supported.
-- @param #COORDINATE self
-- @param #table Coordinates Table of coordinates of the remaining points of the shape.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
@@ -2463,9 +2462,30 @@ do -- COORDINATE
vecs[11], vecs[12], vecs[13], vecs[14], vecs[15],
Color, FillColor, LineType, ReadOnly, Text or "")
else
self:E("ERROR: Currently a free form polygon can only have 15 points in total!")
-- Unfortunately, unpack(vecs) does not work! So no idea how to generalize this :(
trigger.action.markupToAll(7, Coalition, MarkID, unpack(vecs), Color, FillColor, LineType, ReadOnly, Text or "")
--trigger.action.markupToAll(7, Coalition, MarkID, unpack(vecs), Color, FillColor, LineType, ReadOnly, Text or "")
-- Write command as string and execute that. Idea by Grimes https://forum.dcs.world/topic/324201-mark-to-all-function/#comment-5273793
local s=string.format("trigger.action.markupToAll(7, %d, %d,", Coalition, MarkID)
for _,vec in pairs(vecs) do
s=s..string.format("%s,", UTILS._OneLineSerialize(vec))
end
s=s..string.format("%s, %s, %s, %s", UTILS._OneLineSerialize(Color), UTILS._OneLineSerialize(FillColor), tostring(LineType), tostring(ReadOnly))
if Text and Text~="" then
s=s..string.format(", \"%s\"", Text)
end
s=s..")"
-- Execute string command
local success=UTILS.DoString(s)
if not success then
self:E("ERROR: Could not draw polygon")
env.info(s)
end
end
return MarkID
@@ -2944,8 +2964,13 @@ do -- COORDINATE
if alt < 1 then
alttext = "very low"
end
local track = UTILS.BearingToCardinal(bearing) or "North"
-- corrected Track to be direction of travel of bogey (self in this case)
local track = "Maneuver"
if self.Heading then
track = UTILS.BearingToCardinal(self.Heading) or "North"
end
if rangeNM > 3 then
if SSML then -- google says "oh" instead of zero, be aware

View File

@@ -52,7 +52,7 @@
--
-- 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}(),
-- 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
@@ -208,7 +208,7 @@ SCHEDULER = {
-- @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 #table The ScheduleID of the planned schedule.
-- @return #string The ScheduleID of the planned schedule.
function SCHEDULER:New( MasterObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop )
local self = BASE:Inherit( self, BASE:New() ) -- #SCHEDULER

View File

@@ -35,6 +35,13 @@
-- * Validate the presence of objects in the SET.
-- * Trigger events when objects in the SET change a zone presence.
--
-- ## Notes on `FilterPrefixes()`:
--
-- This filter always looks for a **partial match** somewhere in the given field. LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through the following to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching).
-- For example, setting a filter like so `FilterPrefixes("Huey")` is perfectly all right, whilst `FilterPrefixes("UH-1H Al-Assad")` might not be due to the minus signs. A quick fix here is to use a dot (.)
-- in place of the special character, or escape it with a percentage sign (%), i.e. either `FilterPrefixes("UH.1H Al.Assad")` or `FilterPrefixes("UH%-1H Al%-Assad")` will give you the expected results.
--
-- ===
--
-- ### Author: **FlightControl**
@@ -46,8 +53,9 @@
-- @image Core_Sets.JPG
do -- SET_BASE
--- @type SET_BASE
---
-- @type SET_BASE
-- @field #table Filter Table of filters.
-- @field #table Set Table of objects.
-- @field #table Index Table of indices.
@@ -242,7 +250,7 @@ do -- SET_BASE
function SET_BASE:Add( ObjectName, Object )
-- Debug info.
self:T( { ObjectName = ObjectName, Object = Object } )
self:T2( { ObjectName = ObjectName, Object = Object } )
-- Ensure that the existing element is removed from the Set before a new one is inserted to the Set
if self.Set[ObjectName] then
@@ -257,6 +265,8 @@ do -- SET_BASE
-- Trigger Added event.
self:Added( ObjectName, Object )
return self
end
--- Adds a @{Core.Base#BASE} object in the @{Core.Set#SET_BASE}, using the Object Name as the index.
@@ -429,7 +439,7 @@ do -- SET_BASE
function SET_BASE:SetDatabase( BaseSet )
-- Copy the filter criteria of the BaseSet
local OtherFilter = routines.utils.deepCopy( BaseSet.Filter )
local OtherFilter = UTILS.DeepCopy( BaseSet.Filter )
self.Filter = OtherFilter
-- Now base the new Set on the BaseSet
@@ -578,8 +588,8 @@ do -- SET_BASE
end
----- Private method that registers all alive players in the mission.
---- @param #SET_BASE self
---- @return #SET_BASE self
-- @param #SET_BASE self
-- @return #SET_BASE self
-- function SET_BASE:_RegisterPlayers()
--
-- local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) }
@@ -796,8 +806,8 @@ do -- SET_BASE
----- Iterate the SET_BASE and call an iterator function for each **alive** unit, providing the Unit and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive unit in the SET_BASE. The function needs to accept a UNIT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive unit in the SET_BASE. The function needs to accept a UNIT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachDCSUnitAlive( IteratorFunction, ... )
-- self:F3( arg )
@@ -808,8 +818,8 @@ do -- SET_BASE
-- end
--
----- Iterate the SET_BASE and call an iterator function for each **alive** player, providing the Unit of the player and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a UNIT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a UNIT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachPlayer( IteratorFunction, ... )
-- self:F3( arg )
@@ -821,8 +831,8 @@ do -- SET_BASE
--
--
----- Iterate the SET_BASE and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a CLIENT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a CLIENT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachClient( IteratorFunction, ... )
-- self:F3( arg )
@@ -850,8 +860,10 @@ do -- SET_BASE
self:F3( Object )
local outcome = false
local name = Object:GetName()
--self:I("SET_BASE: Objectname = "..name)
self:ForEach(
function(object)
--self:I("SET_BASE: In set objectname = "..object:GetName())
if object:GetName() == name then
outcome = true
end
@@ -901,9 +913,12 @@ do -- SET_BASE
end
do -- SET_GROUP
do
--- @type SET_GROUP #SET_GROUP
-- SET_GROUP
---
-- @type SET_GROUP #SET_GROUP
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -934,7 +949,8 @@ do -- SET_GROUP
-- * @{#SET_GROUP.FilterCoalitions}: Builds the SET_GROUP with the groups belonging to the coalition(s).
-- * @{#SET_GROUP.FilterCategories}: Builds the SET_GROUP with the groups belonging to the category(ies).
-- * @{#SET_GROUP.FilterCountries}: Builds the SET_GROUP with the groups belonging to the country(ies).
-- * @{#SET_GROUP.FilterPrefixes}: Builds the SET_GROUP with the groups *containing* the given string in the group name. **Attention!** Bad naming convention, as this not really filtering *prefixes*.
-- * @{#SET_GROUP.FilterPrefixes}: Builds the SET_GROUP with the groups *containing* the given string in the group name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_GROUP.FilterActive}: Builds the SET_GROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!
--
-- For the Category Filter, extra methods have been added:
@@ -1568,7 +1584,7 @@ do -- SET_GROUP
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function( ZoneObject, GroupObject )
if GroupObject:IsCompletelyInZone( ZoneObject ) then
@@ -1590,7 +1606,7 @@ do -- SET_GROUP
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function( ZoneObject, GroupObject )
if GroupObject:IsPartlyInZone( ZoneObject ) then
@@ -1612,7 +1628,7 @@ do -- SET_GROUP
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function( ZoneObject, GroupObject )
if GroupObject:IsNotInZone( ZoneObject ) then
@@ -1659,7 +1675,7 @@ do -- SET_GROUP
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function( ZoneObject, GroupObject )
if GroupObject:IsAnyInZone( ZoneObject ) then
@@ -1857,8 +1873,8 @@ do -- SET_GROUP
end
----- Iterate the SET_GROUP and call an iterator function for each **alive** player, providing the Group of the player and optional parameters.
---- @param #SET_GROUP self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a GROUP parameter.
-- @param #SET_GROUP self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a GROUP parameter.
---- @return #SET_GROUP self
-- function SET_GROUP:ForEachPlayer( IteratorFunction, ... )
-- self:F2( arg )
@@ -1870,8 +1886,8 @@ do -- SET_GROUP
--
--
----- Iterate the SET_GROUP and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_GROUP self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a CLIENT parameter.
-- @param #SET_GROUP self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a CLIENT parameter.
---- @return #SET_GROUP self
-- function SET_GROUP:ForEachClient( IteratorFunction, ... )
-- self:F2( arg )
@@ -1945,7 +1961,7 @@ do -- SET_GROUP
if self.Filter.Zones then
local MGroupZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do
--self:I( "Zone:", ZoneName )
--self:T( "Zone:", ZoneName )
if MGroup:IsInZone(Zone) then
MGroupZone = true
end
@@ -2011,8 +2027,9 @@ do -- SET_GROUP
end
do -- SET_UNIT
--- @type SET_UNIT
---
-- @type SET_UNIT
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -2045,7 +2062,8 @@ do -- SET_UNIT
-- * @{#SET_UNIT.FilterCategories}: Builds the SET_UNIT with the units belonging to the category(ies).
-- * @{#SET_UNIT.FilterTypes}: Builds the SET_UNIT with the units belonging to the unit type(s).
-- * @{#SET_UNIT.FilterCountries}: Builds the SET_UNIT with the units belonging to the country(ies).
-- * @{#SET_UNIT.FilterPrefixes}: Builds the SET_UNIT with the units sharing the same string(s) in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_UNIT.FilterPrefixes}: Builds the SET_UNIT with the units sharing the same string(s) in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_UNIT.FilterActive}: Builds the SET_UNIT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
-- * @{#SET_UNIT.FilterZones}: Builds the SET_UNIT with the units within a @{Core.Zone#ZONE}.
--
@@ -2672,7 +2690,7 @@ do -- SET_UNIT
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Unit#UNIT UnitObject
function( ZoneObject, UnitObject )
if UnitObject:IsInZone( ZoneObject ) then
@@ -2694,7 +2712,7 @@ do -- SET_UNIT
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Unit#UNIT UnitObject
function( ZoneObject, UnitObject )
if UnitObject:IsNotInZone( ZoneObject ) then
@@ -3011,8 +3029,8 @@ do -- SET_UNIT
----- Iterate the SET_UNIT and call an iterator function for each **alive** player, providing the Unit of the player and optional parameters.
---- @param #SET_UNIT self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a UNIT parameter.
-- @param #SET_UNIT self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a UNIT parameter.
---- @return #SET_UNIT self
-- function SET_UNIT:ForEachPlayer( IteratorFunction, ... )
-- self:F2( arg )
@@ -3024,8 +3042,8 @@ do -- SET_UNIT
--
--
----- Iterate the SET_UNIT and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_UNIT self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a CLIENT parameter.
-- @param #SET_UNIT self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a CLIENT parameter.
---- @return #SET_UNIT self
-- function SET_UNIT:ForEachClient( IteratorFunction, ... )
-- self:F2( arg )
@@ -3040,7 +3058,7 @@ do -- SET_UNIT
-- @param Wrapper.Unit#UNIT MUnit
-- @return #SET_UNIT self
function SET_UNIT:IsIncludeObject( MUnit )
self:F2( MUnit )
self:F2( {MUnit} )
local MUnitInclude = false
@@ -3191,8 +3209,9 @@ do -- SET_UNIT
end
do -- SET_STATIC
--- @type SET_STATIC
---
-- @type SET_STATIC
-- @extends Core.Set#SET_BASE
--- Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:
@@ -3223,7 +3242,8 @@ do -- SET_STATIC
-- * @{#SET_STATIC.FilterCategories}: Builds the SET_STATIC with the units belonging to the category(ies).
-- * @{#SET_STATIC.FilterTypes}: Builds the SET_STATIC with the units belonging to the unit type(s).
-- * @{#SET_STATIC.FilterCountries}: Builds the SET_STATIC with the units belonging to the country(ies).
-- * @{#SET_STATIC.FilterPrefixes}: Builds the SET_STATIC with the units containing the same string(s) in their name. **ATTENTION** bad naming convention as this *does not** only filter *prefixes*.
-- * @{#SET_STATIC.FilterPrefixes}: Builds the SET_STATIC with the units containing the same string(s) in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_STATIC.FilterZones}: Builds the SET_STATIC with the units within a @{Core.Zone#ZONE}.
--
-- Once the filter criteria have been set for the SET_STATIC, you can start filtering using:
@@ -3612,7 +3632,7 @@ do -- SET_STATIC
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Static#STATIC StaticObject
function( ZoneObject, StaticObject )
if StaticObject:IsInZone( ZoneObject ) then
@@ -3634,7 +3654,7 @@ do -- SET_STATIC
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Static#STATIC StaticObject
function( ZoneObject, StaticObject )
if StaticObject:IsNotInZone( ZoneObject ) then
@@ -3945,8 +3965,9 @@ do -- SET_STATIC
end
do -- SET_CLIENT
--- @type SET_CLIENT
---
-- @type SET_CLIENT
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -3979,7 +4000,8 @@ do -- SET_CLIENT
-- * @{#SET_CLIENT.FilterCategories}: Builds the SET_CLIENT with the clients belonging to the category(ies).
-- * @{#SET_CLIENT.FilterTypes}: Builds the SET_CLIENT with the clients belonging to the client type(s).
-- * @{#SET_CLIENT.FilterCountries}: Builds the SET_CLIENT with the clients belonging to the country(ies).
-- * @{#SET_CLIENT.FilterPrefixes}: Builds the SET_CLIENT with the clients containing the same string(s) in their unit/pilot name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_CLIENT.FilterPrefixes}: Builds the SET_CLIENT with the clients containing the same string(s) in their unit/pilot name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_CLIENT.FilterActive}: Builds the SET_CLIENT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
-- * @{#SET_CLIENT.FilterZones}: Builds the SET_CLIENT with the clients within a @{Core.Zone#ZONE}.
--
@@ -4059,7 +4081,7 @@ do -- SET_CLIENT
--- Remove CLIENT(s) from SET_CLIENT.
-- @param Core.Set#SET_CLIENT self
-- @param Wrapper.Client#CLIENT RemoveClientNames A single name or an array of CLIENT names.
-- @param Wrapper.Client#CLIENT RemoveClientNames A single object or an array of CLIENT objects.
-- @return self
function SET_CLIENT:RemoveClientsByName( RemoveClientNames )
@@ -4310,7 +4332,6 @@ do -- SET_CLIENT
function SET_CLIENT:FilterStart()
if _DATABASE then
self:_FilterStart()
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
@@ -4319,6 +4340,7 @@ do -- SET_CLIENT
local timing = self.ZoneTimerInterval or 30
self.ZoneTimer:Start(timing,timing)
end
self:_FilterStart()
end
return self
@@ -4369,7 +4391,7 @@ do -- SET_CLIENT
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function( ZoneObject, ClientObject )
if ClientObject:IsInZone( ZoneObject ) then
@@ -4391,7 +4413,7 @@ do -- SET_CLIENT
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function( ZoneObject, ClientObject )
if ClientObject:IsNotInZone( ZoneObject ) then
@@ -4459,7 +4481,7 @@ do -- SET_CLIENT
if self.Filter.Active == false or (self.Filter.Active == true and MClient:IsActive() == true and MClient:IsAlive() == true) then
MClientActive = true
end
--self:I( { "Evaluated Active", MClientActive } )
--self:T( { "Evaluated Active", MClientActive } )
MClientInclude = MClientInclude and MClientActive
end
@@ -4541,7 +4563,7 @@ do -- SET_CLIENT
if self.Filter.Playernames then
local MClientPlayername = false
local playername = MClient:GetPlayerName() or "Unknown"
--self:I(playername)
--self:T(playername)
for _,_Playername in pairs(self.Filter.Playernames) do
if playername and string.find(playername,_Playername) then
MClientPlayername = true
@@ -4556,7 +4578,7 @@ do -- SET_CLIENT
local callsign = MClient:GetCallsign()
--self:I(callsign)
for _,_Callsign in pairs(self.Filter.Callsigns) do
if callsign and string.find(callsign,_Callsign) then
if callsign and string.find(callsign,_Callsign,1,true) then
MClientCallsigns = true
end
end
@@ -4573,7 +4595,8 @@ end
do -- SET_PLAYER
--- @type SET_PLAYER
---
-- @type SET_PLAYER
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_PLAYER} class to build sets of units belonging to alive players:
@@ -4593,7 +4616,8 @@ do -- SET_PLAYER
-- * @{#SET_PLAYER.FilterCategories}: Builds the SET_PLAYER with the clients belonging to the category(ies).
-- * @{#SET_PLAYER.FilterTypes}: Builds the SET_PLAYER with the clients belonging to the client type(s).
-- * @{#SET_PLAYER.FilterCountries}: Builds the SET_PLAYER with the clients belonging to the country(ies).
-- * @{#SET_PLAYER.FilterPrefixes}: Builds the SET_PLAYER with the clients sharing the same string(s) in their unit/pilot name. **ATTENTION** Bad naming convention as this *does not* only filter prefixes.
-- * @{#SET_PLAYER.FilterPrefixes}: Builds the SET_PLAYER with the clients sharing the same string(s) in their unit/pilot name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:
--
@@ -4868,7 +4892,7 @@ do -- SET_PLAYER
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function( ZoneObject, ClientObject )
if ClientObject:IsInZone( ZoneObject ) then
@@ -4890,7 +4914,7 @@ do -- SET_PLAYER
self:F2( arg )
self:ForEach( IteratorFunction, arg, self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function( ZoneObject, ClientObject )
if ClientObject:IsNotInZone( ZoneObject ) then
@@ -4998,8 +5022,9 @@ do -- SET_PLAYER
end
do -- SET_AIRBASE
--- @type SET_AIRBASE
---
-- @type SET_AIRBASE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_AIRBASE} class to build sets of airbases optionally belonging to certain:
@@ -5341,8 +5366,9 @@ do -- SET_AIRBASE
end
do -- SET_CARGO
--- @type SET_CARGO
---
-- @type SET_CARGO
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_CARGO} class to build sets of cargos optionally belonging to certain:
@@ -5368,7 +5394,8 @@ do -- SET_CARGO
-- Filter criteria are defined by:
--
-- * @{#SET_CARGO.FilterCoalitions}: Builds the SET_CARGO with the cargos belonging to the coalition(s).
-- * @{#SET_CARGO.FilterPrefixes}: Builds the SET_CARGO with the cargos containing the same string(s). **ATTENTION** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_CARGO.FilterPrefixes}: Builds the SET_CARGO with the cargos containing the same string(s). **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_CARGO.FilterTypes}: Builds the SET_CARGO with the cargos belonging to the cargo type(s).
-- * @{#SET_CARGO.FilterCountries}: Builds the SET_CARGO with the cargos belonging to the country(ies).
--
@@ -5444,7 +5471,7 @@ do -- SET_CARGO
--- (R2.1) Remove CARGOs from SET_CARGO.
-- @param Core.Set#SET_CARGO self
-- @param Wrapper.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names.
-- @param Cargo.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names.
-- @return Core.Set#SET_CARGO self
function SET_CARGO:RemoveCargosByName( RemoveCargoNames ) -- R2.1
@@ -5460,7 +5487,7 @@ do -- SET_CARGO
--- (R2.1) Finds a Cargo based on the Cargo Name.
-- @param #SET_CARGO self
-- @param #string CargoName
-- @return Wrapper.Cargo#CARGO The found Cargo.
-- @return Cargo.Cargo#CARGO The found Cargo.
function SET_CARGO:FindCargo( CargoName ) -- R2.1
local CargoFound = self.Set[CargoName]
@@ -5603,7 +5630,7 @@ do -- SET_CARGO
--- (R2.1) Iterate the SET_CARGO while identifying the nearest @{Cargo.Cargo#CARGO} from a @{Core.Point#POINT_VEC2}.
-- @param #SET_CARGO self
-- @param Core.Point#POINT_VEC2 PointVec2 A @{Core.Point#POINT_VEC2} object from where to evaluate the closest @{Cargo.Cargo#CARGO}.
-- @return Wrapper.Cargo#CARGO The closest @{Cargo.Cargo#CARGO}.
-- @return Cargo.Cargo#CARGO The closest @{Cargo.Cargo#CARGO}.
function SET_CARGO:FindNearestCargoFromPointVec2( PointVec2 ) -- R2.1
self:F2( PointVec2 )
@@ -5767,8 +5794,9 @@ do -- SET_CARGO
end
do -- SET_ZONE
--- @type SET_ZONE
---
-- @type SET_ZONE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_ZONE} class to build sets of zones of various types.
@@ -5789,7 +5817,8 @@ do -- SET_ZONE
-- You can set filter criteria to build the collection of zones in SET_ZONE.
-- Filter criteria are defined by:
--
-- * @{#SET_ZONE.FilterPrefixes}: Builds the SET_ZONE with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_ZONE.FilterPrefixes}: Builds the SET_ZONE with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_ZONE, you can start filtering using:
--
@@ -5813,6 +5842,7 @@ do -- SET_ZONE
},
FilterMeta = {
},
Checktime = 5,
}
--- Creates a new SET_ZONE object, building a set of zones.
@@ -6023,7 +6053,29 @@ do -- SET_ZONE
return self
end
--- Get the average aggregated coordinate of this set of zones.
-- @param #SET_ZONE self
-- @return Core.Point#COORDINATE
function SET_ZONE:GetAverageCoordinate()
local x,y,z = 0,0,0
local count = 0
for _,_zone in pairs(self.Set) do
local zone=_zone --Core.Zone#ZONE
local vec3 = zone:GetVec3()
x = x + vec3.x
y = y + vec3.y
z = z + vec3.z
count = count + 1
end
if count > 1 then
x = x/count
y = y/count
z = z/count
end
local coord = COORDINATE:New(x,y,z)
return coord
end
--- Private function.
-- @param #SET_ZONE self
@@ -6131,12 +6183,176 @@ do -- SET_ZONE
return zmin, dmin
end
--- Set the check time for SET_ZONE:Trigger()
-- @param #SET_ZONE self
-- @param #number seconds Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.
-- @return #SET_ZONE self
function SET_ZONE:SetCheckTime(seconds)
self.Checktime = seconds or 5
return self
end
--- Start watching if the Object or Objects move into or out of our set of zones.
-- @param #SET_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
-- @return #SET_ZONE self
-- @usage
-- -- Create a SET_GROUP and a SET_ZONE for this:
--
-- local groupset = SET_GROUP:New():FilterPrefixes("Aerial"):FilterStart()
--
-- -- Trigger will check each zone of the SET_ZONE every 5 secs for objects entering or leaving from the groupset
-- local zoneset = SET_ZONE:New():FilterPrefixes("Target Zone"):FilterOnce():Trigger(groupset)
--
-- -- Draw zones on map so we see what's going on
-- zoneset:ForEachZone(
-- function(zone)
-- zone:DrawZone(-1, {0,1,0}, Alpha, FillColor, FillAlpha, 4, ReadOnly)
-- end
-- )
--
-- -- This FSM function will be called for entering objects
-- function zoneset:OnAfterEnteredZone(From,Event,To,Controllable,Zone)
-- MESSAGE:New("Group "..Controllable:GetName() .. " entered zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
-- end
--
-- -- This FSM function will be called for leaving objects
-- function zoneset:OnAfterLeftZone(From,Event,To,Controllable,Zone)
-- MESSAGE:New("Group "..Controllable:GetName() .. " left zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
-- end
--
-- -- Stop watching after 1 hour
-- zoneset:__TriggerStop(3600)
function SET_ZONE:Trigger(Objects)
--self:I("Added Set_Zone Trigger")
self:AddTransition("*","TriggerStart","TriggerRunning")
self:AddTransition("*","EnteredZone","*")
self:AddTransition("*","LeftZone","*")
self:AddTransition("*","TriggerRunCheck","*")
self:AddTransition("*","TriggerStop","TriggerStopped")
self:TriggerStart()
self.checkobjects = Objects
if UTILS.IsInstanceOf(Objects,"SET_BASE") then
self.objectset = Objects.Set
else
self.objectset = {Objects}
end
self:_TriggerCheck(true)
self:__TriggerRunCheck(self.Checktime)
return self
------------------------
--- Pseudo Functions ---
------------------------
--- Triggers the FSM event "TriggerStop". Stops the SET_ZONE Trigger.
-- @function [parent=#SET_ZONE] TriggerStop
-- @param #SET_ZONE self
--- Triggers the FSM event "TriggerStop" after a delay.
-- @function [parent=#SET_ZONE] __TriggerStop
-- @param #SET_ZONE self
-- @param #number delay Delay in seconds.
--- On After "EnteredZone" event. An observed object has entered the zone.
-- @function [parent=#SET_ZONE] OnAfterEnteredZone
-- @param #SET_ZONE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable entering the zone.
-- @param Core.Zone#ZONE_BASE Zone The zone entered.
--- On After "LeftZone" event. An observed object has left the zone.
-- @function [parent=#SET_ZONE] OnAfterLeftZone
-- @param #SET_ZONE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable leaving the zone.
-- @param Core.Zone#ZONE_BASE Zone The zone left.
end
--- (Internal) Check the assigned objects for being in/out of the zone
-- @param #SET_ZONE self
-- @param #boolean fromstart If true, do the init of the objects
-- @return #SET_ZONE self
function SET_ZONE:_TriggerCheck(fromstart)
--self:I("_TriggerCheck | FromStart = "..tostring(fromstart))
if fromstart then
for _,_object in pairs(self.objectset) do
local obj = _object -- Wrapper.Controllable#CONTROLLABLE
if obj and obj:IsAlive() then
for _,_zone in pairs(self.Set) do
if not obj.TriggerInZone then obj.TriggerInZone = {} end
if _zone:IsCoordinateInZone(obj:GetCoordinate()) then
obj.TriggerInZone[_zone.ZoneName] = true
else
obj.TriggerInZone[_zone.ZoneName] = false
end
--self:I("Object "..obj:GetName().." is in zone = "..tostring(obj.TriggerInZone[_zone.ZoneName]))
end
end
end
else
for _,_object in pairs(self.objectset) do
local obj = _object -- Wrapper.Controllable#CONTROLLABLE
if obj and obj:IsAlive() then
for _,_zone in pairs(self.Set) do
-- Check for pop-up objects
if not obj.TriggerInZone then
-- has not been tagged previously - wasn't in set!
obj.TriggerInZone = {}
end
if not obj.TriggerInZone[_zone.ZoneName] then
-- has not been tagged previously - wasn't in set!
obj.TriggerInZone[_zone.ZoneName] = false
end
-- is obj in zone?
local inzone = _zone:IsCoordinateInZone(obj:GetCoordinate())
--self:I("Object "..obj:GetName().." is in zone: "..tostring(inzone))
if inzone and not obj.TriggerInZone[_zone.ZoneName] then
-- wasn't in zone before
--self:I("Newly entered")
self:__EnteredZone(0.5,obj,_zone)
obj.TriggerInZone[_zone.ZoneName] = true
elseif (not inzone) and obj.TriggerInZone[_zone.ZoneName] then
-- has left the zone
--self:I("Newly left")
self:__LeftZone(0.5,obj,_zone)
obj.TriggerInZone[_zone.ZoneName] = false
else
--self:I("Not left or not entered, or something went wrong!")
end
end
end
end
end
return self
end
--- (Internal) Check the assigned objects for being in/out of the zone
-- @param #SET_ZONE self
-- @param #string From
-- @param #string Event
-- @param #string to
-- @return #SET_ZONE self
function SET_ZONE:onafterTriggerRunCheck(From,Event,To)
--self:I("onafterTriggerRunCheck")
--self:I({From, Event, To})
if self:GetState() ~= "TriggerStopped" then
self:_TriggerCheck()
self:__TriggerRunCheck(self.Checktime)
end
return self
end
end
do -- SET_ZONE_GOAL
--- @type SET_ZONE_GOAL
---
-- @type SET_ZONE_GOAL
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_ZONE_GOAL} class to build sets of zones of various types.
@@ -6157,7 +6373,8 @@ do -- SET_ZONE_GOAL
-- You can set filter criteria to build the collection of zones in SET_ZONE_GOAL.
-- Filter criteria are defined by:
--
-- * @{#SET_ZONE_GOAL.FilterPrefixes}: Builds the SET_ZONE_GOAL with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_ZONE_GOAL.FilterPrefixes}: Builds the SET_ZONE_GOAL with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_ZONE_GOAL, you can start filtering using:
--
@@ -6446,8 +6663,9 @@ do -- SET_ZONE_GOAL
end
do -- SET_OPSZONE
--- @type SET_OPSZONE
---
-- @type SET_OPSZONE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_OPSZONE} class to build sets of zones of various types.
@@ -6468,7 +6686,8 @@ do -- SET_OPSZONE
-- You can set filter criteria to build the collection of zones in SET_OPSZONE.
-- Filter criteria are defined by:
--
-- * @{#SET_OPSZONE.FilterPrefixes}: Builds the SET_OPSZONE with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_OPSZONE.FilterPrefixes}: Builds the SET_OPSZONE with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_OPSZONE, you can start filtering using:
--
@@ -6903,8 +7122,9 @@ end
do -- SET_OPSGROUP
--- @type SET_OPSGROUP
---
-- @type SET_OPSGROUP
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_OPSGROUP} class to build sets of OPS groups belonging to certain:
@@ -6933,7 +7153,8 @@ do -- SET_OPSGROUP
-- * @{#SET_OPSGROUP.FilterCoalitions}: Builds the SET_OPSGROUP with the groups belonging to the coalition(s).
-- * @{#SET_OPSGROUP.FilterCategories}: Builds the SET_OPSGROUP with the groups belonging to the category(ies).
-- * @{#SET_OPSGROUP.FilterCountries}: Builds the SET_OPSGROUP with the groups belonging to the country(ies).
-- * @{#SET_OPSGROUP.FilterPrefixes}: Builds the SET_OPSGROUP with the groups *containing* the given string in the group name. **Attention!** Bad naming convention, as this not really filtering *prefixes*.
-- * @{#SET_OPSGROUP.FilterPrefixes}: Builds the SET_OPSGROUP with the groups *containing* the given string in the group name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_OPSGROUP.FilterActive}: Builds the SET_OPSGROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!
--
-- For the Category Filter, extra methods have been added:
@@ -7571,6 +7792,7 @@ do -- SET_SCENERY
Scenerys = {},
Filter = {
SceneryPrefixes = nil,
SceneryRoles = nil,
Zones = nil,
},
}
@@ -7593,7 +7815,7 @@ do -- SET_SCENERY
if ZoneSet then
for _,_zone in pairs(ZoneSet.Set) do
self:T("Zone type handed: "..tostring(_zone.ClassName))
self:T("Zone type handed: "..tostring(_zone.ClassName))
table.insert(zonenames,_zone:GetName())
end
self:AddSceneryByName(zonenames)
@@ -7617,7 +7839,7 @@ do -- SET_SCENERY
--- Add SCENERY(s) to SET_SCENERY.
-- @param #SET_SCENERY self
-- @param #string AddScenery A single SCENERY.
-- @param Wrapper.Scenery#SCENERY AddScenery A single SCENERY object.
-- @return #SET_SCENERY self
function SET_SCENERY:AddScenery( AddScenery )
self:F2( AddScenery:GetName() )
@@ -7687,6 +7909,7 @@ do -- SET_SCENERY
end
for _,Zone in pairs( zones ) do
local zonename = Zone:GetName()
self:T(zonename)
self.Filter.Zones[zonename] = Zone
end
return self
@@ -7705,11 +7928,30 @@ do -- SET_SCENERY
Prefixes = { Prefixes }
end
for PrefixID, Prefix in pairs( Prefixes ) do
--self:T(Prefix)
self.Filter.SceneryPrefixes[Prefix] = Prefix
end
return self
end
--- Builds a set of SCENERYs that **contain** an exact match of the "ROLE" property.
-- @param #SET_SCENERY self
-- @param #string Role The string pattern(s) that needs to exactly match the scenery "ROLE" property from the ME quad-zone properties. Can also be passed as a `#table` of strings.
-- @return #SET_SCENERY self
function SET_SCENERY:FilterRoles( Role )
if not self.Filter.SceneryRoles then
self.Filter.SceneryRoles = {}
end
if type( Role ) ~= "table" then
Role = { Role }
end
for PrefixID, Prefix in pairs( Role ) do
--self:T(Prefix)
self.Filter.SceneryRoles[Prefix] = Prefix
end
return self
end
--- Iterate the SET_SCENERY and count how many SCENERYSs are alive.
-- @param #SET_SCENERY self
-- @return #number The number of SCENERYSs alive.
@@ -7802,10 +8044,76 @@ do -- SET_SCENERY
-- @param Wrapper.Scenery#SCENERY MScenery
-- @return #SET_SCENERY self
function SET_SCENERY:IsIncludeObject( MScenery )
self:F2( MScenery )
return true
self:T( MScenery.SceneryName )
local MSceneryInclude = true
if MScenery then
local MSceneryName = MScenery:GetName()
-- Filter Prefixes
if self.Filter.Prefixes then
local MSceneryPrefix = false
for ZonePrefixId, ZonePrefix in pairs( self.Filter.Prefixes ) do
self:T( { "Prefix:", string.find( MSceneryName, ZonePrefix, 1 ), ZonePrefix } )
if string.find( MSceneryName, ZonePrefix, 1 ) then
MSceneryPrefix = true
end
end
self:T( { "Evaluated Prefix", MSceneryPrefix } )
MSceneryInclude = MSceneryInclude and MSceneryPrefix
end
if self.Filter.Zones then
local MSceneryZone = false
for ZoneName, Zone in pairs( self.Filter.Zones ) do
--self:T( "Zone:", ZoneName )
local coord = MScenery:GetCoordinate()
if coord and Zone:IsCoordinateInZone(coord) then
MSceneryZone = true
end
self:T( { "Evaluated Zone", MSceneryZone } )
end
MSceneryInclude = MSceneryInclude and MSceneryZone
end
-- Filter Roles
if self.Filter.SceneryRoles then
local MSceneryRole = false
local Role = MScenery:GetProperty("ROLE") or "none"
for ZoneRoleId, ZoneRole in pairs( self.Filter.SceneryRoles ) do
self:T( { "Role:", ZoneRole, Role } )
if ZoneRole == Role then
MSceneryRole = true
end
end
self:T( { "Evaluated Role ", MSceneryRole } )
MSceneryInclude = MSceneryInclude and MSceneryRole
end
end
self:T2( MSceneryInclude )
return MSceneryInclude
end
--- Filters for the defined collection.
-- @param #SET_SCENERY self
-- @return #SET_SCENERY self
function SET_SCENERY:FilterOnce()
for ObjectName, Object in pairs( self:GetSet() ) do
self:T(ObjectName)
if self:IsIncludeObject( Object ) then
self:Add( ObjectName, Object )
else
self:Remove(ObjectName, true)
end
end
return self --FilteredSet
end
--- Count overall initial (Life0) lifepoints of the SET objects.
-- @param #SET_SCENERY self
-- @return #number LIfe0Points
@@ -7843,7 +8151,7 @@ do -- SET_SCENERY
function SET_SCENERY:GetRelativeLife()
local life = self:GetLife()
local life0 = self:GetLife0()
self:T3(string.format("Set Lifepoints: %d life0 | %d life",life0,life))
self:T2(string.format("Set Lifepoints: %d life0 | %d life",life0,life))
local rlife = math.floor((life / life0) * 100)
return rlife
end

View File

@@ -91,7 +91,7 @@
--
-- Will customize which display format is used to indicate A2G coordinates in text as part of the Command Center communications.
--
-- - A2G BR: [Bearing Range](https://en.wikipedia.org/wiki/Bearing_(navigation)).
-- - A2G BR: [Bearing Range](https://en.wikipedia.org/wiki/Bearing_\(navigation\)).
-- - A2G MGRS: The [Military Grid Reference System](https://en.wikipedia.org/wiki/Military_Grid_Reference_System). The accuracy can also be adapted.
-- - A2G LL DMS: Latitude Longitude [Degrees Minutes Seconds](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion). The accuracy can also be adapted.
-- - A2G LL DDM: Latitude Longitude [Decimal Degrees Minutes](https://en.wikipedia.org/wiki/Decimal_degrees). The accuracy can also be adapted.
@@ -105,9 +105,9 @@
-- There are different methods that can be used to change the **System settings** using the \_SETTINGS object.
--
-- - @{#SETTINGS.SetA2G_BR}(): Enable the BR display formatting by default.
-- - @{#SETTINGS.SetA2G_MGRS}(): Enable the MGRS display formatting by default. Use @{SETTINGS.SetMGRS_Accuracy}() to adapt the accuracy of the MGRS formatting.
-- - @{#SETTINGS.SetA2G_LL_DMS}(): Enable the LL DMS display formatting by default. Use @{SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2G_LL_DDM}(): Enable the LL DDM display formatting by default. Use @{SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2G_MGRS}(): Enable the MGRS display formatting by default. Use @{#SETTINGS.SetMGRS_Accuracy}() to adapt the accuracy of the MGRS formatting.
-- - @{#SETTINGS.SetA2G_LL_DMS}(): Enable the LL DMS display formatting by default. Use @{#SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2G_LL_DDM}(): Enable the LL DDM display formatting by default. Use @{#SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
--
-- ### 3.1.4) A2G coordinates setting - additional notes
--
@@ -120,7 +120,7 @@
--
-- Will customize which display format is used to indicate A2A coordinates in text as part of the Command Center communications.
--
-- - A2A BRAA: [Bearing Range Altitude Aspect](https://en.wikipedia.org/wiki/Bearing_(navigation)).
-- - A2A BRAA: [Bearing Range Altitude Aspect](https://en.wikipedia.org/wiki/Bearing_\(navigation\)).
-- - A2A MGRS: The [Military Grid Reference System](https://en.wikipedia.org/wiki/Military_Grid_Reference_System). The accuracy can also be adapted.
-- - A2A LL DMS: Lattitude Longitude [Degrees Minutes Seconds](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion). The accuracy can also be adapted.
-- - A2A LL DDM: Lattitude Longitude [Decimal Degrees and Minutes](https://en.wikipedia.org/wiki/Decimal_degrees). The accuracy can also be adapted.
@@ -135,9 +135,9 @@
-- There are different methods that can be used to change the **System settings** using the \_SETTINGS object.
--
-- - @{#SETTINGS.SetA2A_BRAA}(): Enable the BR display formatting by default.
-- - @{#SETTINGS.SetA2A_MGRS}(): Enable the MGRS display formatting by default. Use @{SETTINGS.SetMGRS_Accuracy}() to adapt the accuracy of the MGRS formatting.
-- - @{#SETTINGS.SetA2A_LL_DMS}(): Enable the LL DMS display formatting by default. Use @{SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2A_LL_DDM}(): Enable the LL DDM display formatting by default. Use @{SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2A_MGRS}(): Enable the MGRS display formatting by default. Use @{#SETTINGS.SetMGRS_Accuracy}() to adapt the accuracy of the MGRS formatting.
-- - @{#SETTINGS.SetA2A_LL_DMS}(): Enable the LL DMS display formatting by default. Use @{#SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2A_LL_DDM}(): Enable the LL DDM display formatting by default. Use @{#SETTINGS.SetLL_Accuracy}() to adapt the accuracy of the Seconds formatting.
-- - @{#SETTINGS.SetA2A_BULLS}(): Enable the BULLSeye display formatting by default.
--
-- ### 3.2.4) A2A coordinates settings - additional notes
@@ -190,8 +190,8 @@
--
-- There are different methods that can be used to change the **System settings** using the \_SETTINGS object.
--
-- - @{#SETTINGS.SetMessageTime}(): Define for a specific @{Message.MESSAGE.MessageType} the duration to be displayed in seconds.
-- - @{#SETTINGS.GetMessageTime}(): Retrieves for a specific @{Message.MESSAGE.MessageType} the duration to be displayed in seconds.
-- - @{#SETTINGS.SetMessageTime}(): Define for a specific @{Core.Message#MESSAGE.MessageType} the duration to be displayed in seconds.
-- - @{#SETTINGS.GetMessageTime}(): Retrieves for a specific @{Core.Message#MESSAGE.MessageType} the duration to be displayed in seconds.
--
-- ## 3.5) **Era** of the battle
--
@@ -283,21 +283,21 @@ do -- SETTINGS
function SETTINGS:SetMetric()
self.Metric = true
end
--- Sets the SETTINGS default text locale.
-- @param #SETTINGS self
-- @param #string Locale
function SETTINGS:SetLocale(Locale)
self.Locale = Locale or "en"
end
--- Gets the SETTINGS text locale.
-- @param #SETTINGS self
-- @return #string
function SETTINGS:GetLocale()
return self.Locale or _SETTINGS:GetLocale()
end
--- Gets if the SETTINGS is metric.
-- @param #SETTINGS self
-- @return #boolean true if metric.
@@ -744,7 +744,7 @@ do -- SETTINGS
self.PlayerMenu = PlayerMenu
self:I( string.format( "Setting menu for player %s", tostring( PlayerName ) ) )
self:T( string.format( "Setting menu for player %s", tostring( PlayerName ) ) )
local submenu = MENU_GROUP:New( PlayerGroup, "LL Accuracy", PlayerMenu )
MENU_GROUP_COMMAND:New( PlayerGroup, "LL 0 Decimals", submenu, self.MenuGroupLL_DDM_AccuracySystem, self, PlayerUnit, PlayerGroup, PlayerName, 0 )
@@ -989,7 +989,7 @@ do -- SETTINGS
do
--- @param #SETTINGS self
function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem )
BASE:E( { self, PlayerUnit:GetName(), A2GSystem } )
--BASE:E( {PlayerUnit:GetName(), A2GSystem } )
self.A2GSystem = A2GSystem
MESSAGE:New( string.format( "Settings: A2G format set to %s for player %s.", A2GSystem, PlayerName ), 5 ):ToGroup( PlayerGroup )
if _SETTINGS.MenuStatic == false then

View File

@@ -58,7 +58,7 @@
-- @field #SPAWN.SpawnZoneTable SpawnZoneTable
-- @extends Core.Base#BASE
--- Allows to spawn dynamically new @{Core.Group}s.
--- Allows to spawn dynamically new @{Wrapper.Group}s.
--
-- Each SPAWN object needs to be have related **template groups** setup in the Mission Editor (ME),
-- which is a normal group with the **Late Activation** flag set.
@@ -162,7 +162,17 @@
-- ### Array formation
--
-- * @{#SPAWN.InitArray}(): Make groups visible before they are actually activated, and order these groups like a battalion in an array.
--
--
-- ### Group initial position - if wanted different from template position, for use with e.g. @{#SPAWN.SpawnScheduled}().
--
-- * @{#SPAWN.InitPositionCoordinate}(): Set initial position of group via a COORDINATE.
-- * @{#SPAWN.InitPositionVec2}(): Set initial position of group via a VEC2.
--
-- ### Set the positions of a group's units to absolute positions, or relative positions to unit No. 1
--
-- * @{#SPAWN.InitSetUnitRelativePositions}(): Spawn the UNITs of this group with individual relative positions to unit #1 and individual headings.
-- * @{#SPAWN.InitSetUnitAbsolutePositions}(): Spawn the UNITs of this group with individual absolute positions and individual headings.
--
-- ### Position randomization
--
-- * @{#SPAWN.InitRandomizePosition}(): Randomizes the position of @{Wrapper.Group}s that are spawned within a **radius band**, given an Outer and Inner radius, from the point that the spawn happens.
@@ -268,7 +278,7 @@ SPAWN = {
-- @type SPAWN.Takeoff
-- @extends Wrapper.Group#GROUP.Takeoff
--- @field #SPAWN.Takeoff Takeoff
-- @field #SPAWN.Takeoff Takeoff
SPAWN.Takeoff = {
Air = 1,
Runway = 2,
@@ -276,7 +286,8 @@ SPAWN.Takeoff = {
Cold = 4,
}
--- @type SPAWN.SpawnZoneTable
---
-- @type SPAWN.SpawnZoneTable
-- @list <Core.Zone#ZONE_BASE> SpawnZone
--- Creates the main object to spawn a @{Wrapper.Group} defined in the DCS ME.
@@ -317,6 +328,8 @@ function SPAWN:New( SpawnTemplatePrefix )
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio comms setting.
self.SpawnInitModex = nil
self.SpawnInitModexPrefix = nil
self.SpawnInitModexPostfix = nil
self.SpawnInitAirbase = nil
self.TweakedTemplate = false -- Check if the user is using self made template.
@@ -371,6 +384,8 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio communication setting.
self.SpawnInitModex = nil
self.SpawnInitModexPrefix = nil
self.SpawnInitModexPostfix = nil
self.SpawnInitAirbase = nil
self.TweakedTemplate = false -- Check if the user is using self made template.
@@ -388,9 +403,9 @@ end
--- Creates a new SPAWN instance to create new groups based on the provided template. This will also register the template for future use.
-- @param #SPAWN self
-- @param #table SpawnTemplate is the Template of the Group. This must be a valid Group Template structure - see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_func_addGroup)!
-- @param #string SpawnTemplatePrefix [Mandatory] is the name of the template and the prefix of the GROUP on spawn.
-- @param #string SpawnTemplatePrefix [Mandatory] is the name of the template and the prefix of the GROUP on spawn. The name in the template **will** be overwritten!
-- @param #string SpawnAliasPrefix [Optional] is the prefix that will be given to the GROUP on spawn.
-- @param #boolean MooseNaming [Optional] If false, skip the Moose naming additions (like groupname#001-01) - you need to ensure yourself no duplicate group names exist!
-- @param #boolean NoMooseNamingPostfix [Optional] If true, skip the Moose naming additions (like groupname#001-01) - **but** you need to ensure yourself no duplicate group names exist!
-- @return #SPAWN self
-- @usage
-- -- Spawn a P51 Mustang from scratch
@@ -491,7 +506,7 @@ end
-- )
-- mustang:Spawn()
--
function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPrefix, MooseNaming )
function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPrefix, NoMooseNamingPostfix )
local self = BASE:Inherit( self, BASE:New() )
self:F( { SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPrefix } )
--if SpawnAliasPrefix == nil or SpawnAliasPrefix == "" then
@@ -530,9 +545,14 @@ function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPr
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio communication setting.
self.SpawnInitModex = nil
self.SpawnInitModexPrefix = nil
self.SpawnInitModexPostfix = nil
self.SpawnInitAirbase = nil
self.TweakedTemplate = true -- Check if the user is using self made template.
self.MooseNameing = MooseNaming or true
self.MooseNameing = true
if NoMooseNamingPostfix == true then
self.MooseNameing = false
end
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
else
@@ -798,12 +818,17 @@ end
--- Sets the modex of the first unit of the group. If more units are in the group, the number is increased by one with every unit.
-- @param #SPAWN self
-- @param #number modex Modex of the first unit.
-- @param #string prefix (optional) String to prefix to modex, e.g. for French AdA Modex, eg. -L-102 then "-L-" would be the prefix.
-- @param #string postfix (optional) String to postfix to modex, example tbd.
-- @return #SPAWN self
function SPAWN:InitModex( modex )
function SPAWN:InitModex( modex, prefix, postfix )
if modex then
self.SpawnInitModex = tonumber( modex )
end
self.SpawnInitModexPrefix = prefix
self.SpawnInitModexPostfix = postfix
return self
end
@@ -1044,7 +1069,7 @@ end
--- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
-- @param #SPAWN self
-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If this table is given, then each spawn will be executed within the given list of @{Core.Zone}s objects.
-- @return #SPAWN
-- @return #SPAWN self
-- @usage
--
-- -- Create a zone table of the 2 zones.
@@ -1074,6 +1099,31 @@ function SPAWN:InitRandomizeZones( SpawnZoneTable )
return self
end
--- This method sets a spawn position for the group that is different from the location of the template.
-- @param #SPAWN self
-- @param Core.Point#COORDINATE Coordinate The position to spawn from
-- @return #SPAWN self
function SPAWN:InitPositionCoordinate(Coordinate)
self:T( { self.SpawnTemplatePrefix, Coordinate:GetVec2()} )
self:InitPositionVec2(Coordinate:GetVec2())
return self
end
--- This method sets a spawn position for the group that is different from the location of the template.
-- @param #SPAWN self
-- @param DCS#Vec2 Vec2 The position to spawn from
-- @return #SPAWN self
function SPAWN:InitPositionVec2(Vec2)
self:T( { self.SpawnTemplatePrefix, Vec2} )
self.SpawnInitPosition = Vec2
self.SpawnFromNewPosition = true
self:I("MaxGroups:"..self.SpawnMaxGroups)
for SpawnGroupID = 1, self.SpawnMaxGroups do
self:_SetInitialPosition( SpawnGroupID )
end
return self
end
--- For planes and helicopters, when these groups go home and land on their home airbases and FARPs, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.
-- This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed.
-- This will enable a spawned group to be re-spawned after it lands, until it is destroyed...
@@ -1164,7 +1214,6 @@ function SPAWN:InitCleanUp( SpawnCleanUpInterval )
local SpawnGroup, SpawnCursor = self:GetFirstAliveGroup()
self:T( { "CleanUp Scheduler:", SpawnGroup } )
-- self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )
self.CleanUpScheduler = SCHEDULER:New( self, self._SpawnCleanUpScheduler, {}, 1, SpawnCleanUpInterval, 0.2 )
return self
end
@@ -1282,7 +1331,7 @@ do -- Delay methods
return self
end
--- Turns the Delay On for the @{Wrapper.Group} when spawning with @{SpawnScheduled}(). In effect then the 1st group will only be spawned
--- Turns the Delay On for the @{Wrapper.Group} when spawning with @{#SpawnScheduled}(). In effect then the 1st group will only be spawned
-- after the number of seconds given in SpawnScheduled as arguments, and not immediately.
-- @param #SPAWN self
-- @return #SPAWN The SPAWN object
@@ -1373,7 +1422,12 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth )
self:F2( { SpawnTemplatePrefix = self.SpawnTemplatePrefix, SpawnIndex = SpawnIndex, AliveUnits = self.AliveUnits, SpawnMaxGroups = self.SpawnMaxGroups } )
if self:_GetSpawnIndex( SpawnIndex ) then
if self.SpawnFromNewPosition then
self:_SetInitialPosition( SpawnIndex )
end
if self.SpawnGroups[self.SpawnIndex].Visible then
self.SpawnGroups[self.SpawnIndex].Group:Activate()
else
@@ -1528,7 +1582,10 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth )
-- Set tail number.
if self.SpawnInitModex then
for UnitID = 1, #SpawnTemplate.units do
SpawnTemplate.units[UnitID].onboard_num = string.format( "%03d", self.SpawnInitModex + (UnitID - 1) )
local modexnumber = string.format( "%03d", self.SpawnInitModex + (UnitID - 1) )
if self.SpawnInitModexPrefix then modexnumber = self.SpawnInitModexPrefix..modexnumber end
if self.SpawnInitModexPostfix then modexnumber = modexnumber..self.SpawnInitModexPostfix end
SpawnTemplate.units[UnitID].onboard_num = modexnumber
end
end
@@ -1611,8 +1668,8 @@ end
-- @param #number SpawnTime The time interval defined in seconds between each new spawn of new groups.
-- @param #number SpawnTimeVariation The variation to be applied on the defined time interval between each new spawn.
-- The variation is a number between 0 and 1, representing the % of variation to be applied on the time interval.
-- @param #boolen WithDelay Do not spawn the **first** group immediately, but delay the spawn as per the calculation below.
-- Effectively the same as @{InitDelayOn}().
-- @param #boolean WithDelay Do not spawn the **first** group immediately, but delay the spawn as per the calculation below.
-- Effectively the same as @{#InitDelayOn}().
-- @return #SPAWN self
-- @usage
-- -- NATO helicopters engaging in the battle field.
@@ -2135,14 +2192,18 @@ end
-- @param #table Spots Table of parking spot IDs. Note that these in general are different from the numbering in the mission editor!
-- @param #SPAWN.Takeoff Takeoff (Optional) Takeoff type, i.e. either SPAWN.Takeoff.Cold or SPAWN.Takeoff.Hot. Default is Hot.
-- @return Wrapper.Group#GROUP The group that was spawned or nil when nothing was spawned.
function SPAWN:SpawnAtParkingSpot( Airbase, Spots, Takeoff ) -- R2.5
function SPAWN:SpawnAtParkingSpot( Airbase, Spots, Takeoff )
self:F( { Airbase = Airbase, Spots = Spots, Takeoff = Takeoff } )
-- Ensure that Spots parameter is a table.
if type( Spots ) ~= "table" then
Spots = { Spots }
end
if type(Airbase) == "string" then
Airbase = AIRBASE:FindByName(Airbase)
end
-- Get template group.
local group = GROUP:FindByName( self.SpawnTemplatePrefix )
@@ -3124,7 +3185,11 @@ function SPAWN:_GetTemplate( SpawnTemplatePrefix )
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } )
local SpawnTemplate = nil
if _DATABASE.Templates.Groups[SpawnTemplatePrefix] == nil then
error( 'No Template exists for SpawnTemplatePrefix = ' .. SpawnTemplatePrefix )
end
local Template = _DATABASE.Templates.Groups[SpawnTemplatePrefix].Template
self:F( { Template = Template } )
@@ -3158,8 +3223,10 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) -- R2.2
if self.TweakedTemplate ~= nil and self.TweakedTemplate == true then
BASE:I( "WARNING: You are using a tweaked template." )
SpawnTemplate = self.SpawnTemplate
if self.MooseNameing then
if self.MooseNameing == true then
SpawnTemplate.name = self:SpawnGroupName( SpawnIndex )
else
SpawnTemplate.name = self:SpawnGroupName()
end
else
SpawnTemplate = self:_GetTemplate( SpawnTemplatePrefix )
@@ -3291,6 +3358,57 @@ function SPAWN:_RandomizeTemplate( SpawnIndex )
return self
end
--- Private method that sets the DCS#Vec2 where the Group will be spawned.
-- @param #SPAWN self
-- @param #number SpawnIndex
-- @return #SPAWN self
function SPAWN:_SetInitialPosition( SpawnIndex )
self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnRandomizeZones } )
if self.SpawnFromNewPosition then
self:T( "Preparing Spawn at Vec2 ", self.SpawnInitPosition )
local SpawnVec2 = self.SpawnInitPosition
self:T( { SpawnVec2 = SpawnVec2 } )
local SpawnTemplate = self.SpawnGroups[SpawnIndex].SpawnTemplate
SpawnTemplate.route = SpawnTemplate.route or {}
SpawnTemplate.route.points = SpawnTemplate.route.points or {}
SpawnTemplate.route.points[1] = SpawnTemplate.route.points[1] or {}
SpawnTemplate.route.points[1].x = SpawnTemplate.route.points[1].x or 0
SpawnTemplate.route.points[1].y = SpawnTemplate.route.points[1].y or 0
self:T( { Route = SpawnTemplate.route } )
for UnitID = 1, #SpawnTemplate.units do
local UnitTemplate = SpawnTemplate.units[UnitID]
self:T( 'Before Translation SpawnTemplate.units[' .. UnitID .. '].x = ' .. UnitTemplate.x .. ', SpawnTemplate.units[' .. UnitID .. '].y = ' .. UnitTemplate.y )
local SX = UnitTemplate.x
local SY = UnitTemplate.y
local BX = SpawnTemplate.route.points[1].x
local BY = SpawnTemplate.route.points[1].y
local TX = SpawnVec2.x + (SX - BX)
local TY = SpawnVec2.y + (SY - BY)
UnitTemplate.x = TX
UnitTemplate.y = TY
-- TODO: Manage altitude based on landheight...
-- SpawnTemplate.units[UnitID].alt = SpawnVec2:
self:T( 'After Translation SpawnTemplate.units[' .. UnitID .. '].x = ' .. UnitTemplate.x .. ', SpawnTemplate.units[' .. UnitID .. '].y = ' .. UnitTemplate.y )
end
SpawnTemplate.route.points[1].x = SpawnVec2.x
SpawnTemplate.route.points[1].y = SpawnVec2.y
SpawnTemplate.x = SpawnVec2.x
SpawnTemplate.y = SpawnVec2.y
end
return self
end
--- Private method that randomizes the @{Core.Zone}s where the Group will be spawned.
-- @param #SPAWN self
-- @param #number SpawnIndex
@@ -3410,7 +3528,7 @@ end
-- TODO Need to delete this... _DATABASE does this now ...
--- @param #SPAWN self
-- @param #SPAWN self
-- @param Core.Event#EVENTDATA EventData
function SPAWN:_OnBirth( EventData )
self:F( self.SpawnTemplatePrefix )
@@ -3430,7 +3548,7 @@ function SPAWN:_OnBirth( EventData )
end
--- @param #SPAWN self
-- @param #SPAWN self
-- @param Core.Event#EVENTDATA EventData
function SPAWN:_OnDeadOrCrash( EventData )
self:F( self.SpawnTemplatePrefix )
@@ -3504,7 +3622,7 @@ function SPAWN:_OnLand( EventData )
end
--- Will detect AIR Units shutting down their engines ...
-- When the event takes place, and the method @{RepeatOnEngineShutDown} was called, the spawned Group will Re-SPAWN.
-- When the event takes place, and the method @{#InitRepeatOnEngineShutDown} was called, the spawned Group will Re-SPAWN.
-- But only when the Unit was registered to have landed.
-- @param #SPAWN self
-- @param Core.Event#EVENTDATA EventData

View File

@@ -21,9 +21,9 @@
-- ### Author: **FlightControl**
-- ### 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
-- * **Ciribob**: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
-- * **EasyEB**: Ideas and Beta Testing
-- * **Wingthor**: Beta Testing
--
-- ===
--
@@ -33,7 +33,8 @@
do
--- @type SPOT
---
-- @type SPOT
-- @extends Core.Fsm#FSM
@@ -228,7 +229,8 @@ do
-- @param #number LaserCode Laser code.
-- @param #number Duration Duration of lasing in seconds.
function SPOT:onafterLaseOn( From, Event, To, Target, LaserCode, Duration )
self:F( { "LaseOn", Target, LaserCode, Duration } )
self:T({From, Event, To})
self:T2( { "LaseOn", Target, LaserCode, Duration } )
local function StopLase( self )
self:LaseOff()
@@ -256,6 +258,8 @@ do
self:HandleEvent( EVENTS.Dead )
self:__Lasing( -1 )
return self
end
@@ -268,7 +272,7 @@ do
-- @param #number LaserCode Laser code.
-- @param #number Duration Duration of lasing in seconds.
function SPOT:onafterLaseOnCoordinate(From, Event, To, Coordinate, LaserCode, Duration)
self:F( { "LaseOnCoordinate", Coordinate, LaserCode, Duration } )
self:T2( { "LaseOnCoordinate", Coordinate, LaserCode, Duration } )
local function StopLase( self )
self:LaseOff()
@@ -290,12 +294,14 @@ do
end
self:__Lasing(-1)
return self
end
--- @param #SPOT self
---
-- @param #SPOT self
-- @param Core.Event#EVENTDATA EventData
function SPOT:OnEventDead(EventData)
self:F( { Dead = EventData.IniDCSUnitName, Target = self.Target } )
self:T2( { Dead = EventData.IniDCSUnitName, Target = self.Target } )
if self.Target then
if EventData.IniDCSUnitName == self.TargetName then
self:F( {"Target dead ", self.TargetName } )
@@ -309,42 +315,51 @@ do
self:LaseOff()
end
end
return self
end
--- @param #SPOT self
---
-- @param #SPOT self
-- @param From
-- @param Event
-- @param To
function SPOT:onafterLasing( From, Event, To )
if self.Target and 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 )
elseif self.TargetCoord then
self:T({From, Event, To})
-- Wiggle the IR spot a bit.
local irvec3={x=self.TargetCoord.x+math.random(-100,100)/100, y=self.TargetCoord.y+math.random(-100,100)/100, z=self.TargetCoord.z} --#DCS.Vec3
local lsvec3={x=self.TargetCoord.x, y=self.TargetCoord.y, z=self.TargetCoord.z} --#DCS.Vec3
if self.Lasing then
if self.Target and 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)
elseif self.TargetCoord then
self.SpotIR:setPoint(irvec3)
self.SpotLaser:setPoint(lsvec3)
self:__Lasing(-0.25)
else
self:F( { "Target is not alive", self.Target:IsAlive() } )
-- Wiggle the IR spot a bit.
local irvec3={x=self.TargetCoord.x+math.random(-100,100)/100, y=self.TargetCoord.y+math.random(-100,100)/100, z=self.TargetCoord.z} --#DCS.Vec3
local lsvec3={x=self.TargetCoord.x, y=self.TargetCoord.y, z=self.TargetCoord.z} --#DCS.Vec3
self.SpotIR:setPoint(irvec3)
self.SpotLaser:setPoint(lsvec3)
self:__Lasing(0.2)
else
self:F( { "Target is not alive", self.Target:IsAlive() } )
end
end
return self
end
--- @param #SPOT self
---
-- @param #SPOT self
-- @param From
-- @param Event
-- @param To
-- @return #SPOT
function SPOT:onafterLaseOff( From, Event, To )
self:F( {"Stopped lasing for ", self.Target and self.Target:GetName() or "coord", SpotIR = self.SportIR, SpotLaser = self.SpotLaser } )
self:T({From, Event, To})
self:T2( {"Stopped lasing for ", self.Target and self.Target:GetName() or "coord", SpotIR = self.SportIR, SpotLaser = self.SpotLaser } )
self.Lasing = false
@@ -383,4 +398,4 @@ do
return self
end
end
end

View File

@@ -107,7 +107,7 @@ _TIMERID=0
--- TIMER class version.
-- @field #string version
TIMER.version="0.1.2"
TIMER.version="0.2.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -222,7 +222,20 @@ function TIMER:Stop(Delay)
-- Remove timer function.
self:T(self.lid..string.format("Stopping timer by removing timer function after %d calls!", self.ncalls))
timer.removeFunction(self.tid)
-- We use a pcall here because if the DCS timer does not exist any more, it crashes the whole script!
local status=pcall(
function ()
timer.removeFunction(self.tid)
end
)
-- Debug messages.
if status then
self:T2(self.lid..string.format("Stopped timer!"))
else
self:E(self.lid..string.format("WARNING: Could not remove timer function! isrunning=%s", tostring(self.isrunning)))
end
-- Not running any more.
self.isrunning=false

View File

@@ -53,7 +53,8 @@
-- @module Core.Zone
-- @image Core_Zones.JPG
--- @type ZONE_BASE
---
-- @type ZONE_BASE
-- @field #string ZoneName Name of the zone.
-- @field #number ZoneProbability A value between 0 and 1. 0 = 0% and 1 = 100% probability.
-- @field #number DrawID Unique ID of the drawn zone on the F10 map.
@@ -63,6 +64,7 @@
-- @field #number ZoneID ID of zone. Only zones defined in the ME have an ID!
-- @field #table Table of any trigger zone properties from the ME. The key is the Name of the property, and the value is the property's Value.
-- @field #number Surface Type of surface. Only determined at the center of the zone!
-- @field #number Checktime Check every Checktime seconds, used for ZONE:Trigger()
-- @extends Core.Fsm#FSM
@@ -121,6 +123,7 @@ ZONE_BASE = {
ZoneID=nil,
Properties={},
Surface=nil,
Checktime = 5,
}
--- The ZONE_BASE.BoundingSquare
@@ -189,13 +192,14 @@ end
-- @param Core.Point#COORDINATE Coordinate The coordinate to test.
-- @return #boolean true if the coordinate is within the zone.
function ZONE_BASE:IsCoordinateInZone( Coordinate )
if not Coordinate then return false end
local InZone = self:IsVec2InZone( Coordinate:GetVec2() )
return InZone
end
--- Returns if a PointVec2 is within the zone. (Name is misleading, actually takes a #COORDINATE)
-- @param #ZONE_BASE self
-- @param Core.Point#COORDINATE PointVec2 The coordinate to test.
-- @param Core.Point#COORDINATE Coordinate The coordinate to test.
-- @return #boolean true if the PointVec2 is within the zone.
function ZONE_BASE:IsPointVec2InZone( Coordinate )
local InZone = self:IsVec2InZone( Coordinate:GetVec2() )
@@ -555,6 +559,154 @@ function ZONE_BASE:GetZoneMaybe()
end
end
--- Set the check time for ZONE:Trigger()
-- @param #ZONE_BASE self
-- @param #number seconds Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.
-- @return #ZONE_BASE self
function ZONE_BASE:SetCheckTime(seconds)
self.Checktime = seconds or 5
return self
end
--- Start watching if the Object or Objects move into or out of a zone.
-- @param #ZONE_BASE self
-- @param Wrapper.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
-- @return #ZONE_BASE self
-- @usage
-- -- Create a new zone and start watching it every 5 secs for a defined GROUP entering or leaving
-- local triggerzone = ZONE:New("ZonetoWatch"):Trigger(GROUP:FindByName("Aerial-1"))
--
-- -- This FSM function will be called when the group enters the zone
-- function triggerzone:OnAfterEnteredZone(From,Event,To,Group)
-- MESSAGE:New("Group has entered zone!",15):ToAll()
-- end
--
-- -- This FSM function will be called when the group leaves the zone
-- function triggerzone:OnAfterLeftZone(From,Event,To,Group)
-- MESSAGE:New("Group has left zone!",15):ToAll()
-- end
--
-- -- Stop watching the zone after 1 hour
-- triggerzone:__TriggerStop(3600)
function ZONE_BASE:Trigger(Objects)
--self:I("Added Zone Trigger")
self:SetStartState("TriggerStopped")
self:AddTransition("TriggerStopped","TriggerStart","TriggerRunning")
self:AddTransition("*","EnteredZone","*")
self:AddTransition("*","LeftZone","*")
self:AddTransition("*","TriggerRunCheck","*")
self:AddTransition("*","TriggerStop","TriggerStopped")
self:TriggerStart()
self.checkobjects = Objects
if UTILS.IsInstanceOf(Objects,"SET_BASE") then
self.objectset = Objects.Set
else
self.objectset = {Objects}
end
self:_TriggerCheck(true)
self:__TriggerRunCheck(self.Checktime)
return self
------------------------
--- Pseudo Functions ---
------------------------
--- Triggers the FSM event "TriggerStop". Stops the ZONE_BASE Trigger.
-- @function [parent=#ZONE_BASE] TriggerStop
-- @param #ZONE_BASE self
--- Triggers the FSM event "TriggerStop" after a delay.
-- @function [parent=#ZONE_BASE] __TriggerStop
-- @param #ZONE_BASE self
-- @param #number delay Delay in seconds.
--- On After "EnteredZone" event. An observed object has entered the zone.
-- @function [parent=#ZONE_BASE] OnAfterEnteredZone
-- @param #ZONE_BASE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable entering the zone.
--- On After "LeftZone" event. An observed object has left the zone.
-- @function [parent=#ZONE_BASE] OnAfterLeftZone
-- @param #ZONE_BASE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable leaving the zone.
end
--- (Internal) Check the assigned objects for being in/out of the zone
-- @param #ZONE_BASE self
-- @param #boolean fromstart If true, do the init of the objects
-- @return #ZONE_BASE self
function ZONE_BASE:_TriggerCheck(fromstart)
--self:I("_TriggerCheck | FromStart = "..tostring(fromstart))
local objectset = self.objectset or {}
if fromstart then
-- just earmark everyone in/out
for _,_object in pairs(objectset) do
local obj = _object -- Wrapper.Controllable#CONTROLLABLE
if not obj.TriggerInZone then obj.TriggerInZone = {} end
if obj and obj:IsAlive() and self:IsCoordinateInZone(obj:GetCoordinate()) then
obj.TriggerInZone[self.ZoneName] = true
else
obj.TriggerInZone[self.ZoneName] = false
end
--self:I("Object "..obj:GetName().." is in zone = "..tostring(obj.TriggerInZone[self.ZoneName]))
end
else
-- Check for changes
for _,_object in pairs(objectset) do
local obj = _object -- Wrapper.Controllable#CONTROLLABLE
if obj and obj:IsAlive() then
if not obj.TriggerInZone then
-- has not been tagged previously - wasn't in set!
obj.TriggerInZone = {}
end
if not obj.TriggerInZone[self.ZoneName] then
-- has not been tagged previously - wasn't in set!
obj.TriggerInZone[self.ZoneName] = false
end
-- is obj in zone?
local inzone = self:IsCoordinateInZone(obj:GetCoordinate())
--self:I("Object "..obj:GetName().." is in zone: "..tostring(inzone))
if inzone and not obj.TriggerInZone[self.ZoneName] then
-- wasn't in zone before
--self:I("Newly entered")
self:__EnteredZone(0.5,obj)
obj.TriggerInZone[self.ZoneName] = true
elseif (not inzone) and obj.TriggerInZone[self.ZoneName] then
-- has left the zone
--self:I("Newly left")
self:__LeftZone(0.5,obj)
obj.TriggerInZone[self.ZoneName] = false
else
--self:I("Not left or not entered, or something went wrong!")
end
end
end
end
return self
end
--- (Internal) Check the assigned objects for being in/out of the zone
-- @param #ZONE_BASE self
-- @param #string From
-- @param #string Event
-- @param #string to
-- @return #ZONE_BASE self
function ZONE_BASE:onafterTriggerRunCheck(From,Event,To)
if self:GetState() ~= "TriggerStopped" then
self:_TriggerCheck()
self:__TriggerRunCheck(self.Checktime)
end
return self
end
--- Returns the Value of the zone with the given PropertyName, or nil if no matching property exists.
-- @param #ZONE_BASE self
-- @param #string PropertyName The name of a the TriggerZone Property to be retrieved.
@@ -905,11 +1057,11 @@ end
--- Scan the zone for the presence of units of the given ObjectCategories.
-- Note that **only after** a zone has been scanned, the zone can be evaluated by:
--
-- * @{ZONE_RADIUS.IsAllInZoneOfCoalition}(): Scan the presence of units in the zone of a coalition.
-- * @{ZONE_RADIUS.IsAllInZoneOfOtherCoalition}(): Scan the presence of units in the zone of an other coalition.
-- * @{ZONE_RADIUS.IsSomeInZoneOfCoalition}(): Scan if there is some presence of units in the zone of the given coalition.
-- * @{ZONE_RADIUS.IsNoneInZoneOfCoalition}(): Scan if there isn't any presence of units in the zone of an other coalition than the given one.
-- * @{ZONE_RADIUS.IsNoneInZone}(): Scan if the zone is empty.
-- * @{Core.Zone#ZONE_RADIUS.IsAllInZoneOfCoalition}(): Scan the presence of units in the zone of a coalition.
-- * @{Core.Zone#ZONE_RADIUS.IsAllInZoneOfOtherCoalition}(): Scan the presence of units in the zone of an other coalition.
-- * @{Core.Zone#ZONE_RADIUS.IsSomeInZoneOfCoalition}(): Scan if there is some presence of units in the zone of the given coalition.
-- * @{Core.Zone#ZONE_RADIUS.IsNoneInZoneOfCoalition}(): Scan if there isn't any presence of units in the zone of an other coalition than the given one.
-- * @{Core.Zone#ZONE_RADIUS.IsNoneInZone}(): Scan if the zone is empty.
-- @param #ZONE_RADIUS self
-- @param ObjectCategories An array of categories of the objects to find in the zone. E.g. `{Object.Category.UNIT}`
-- @param UnitCategories An array of unit categories of the objects to find in the zone. E.g. `{Unit.Category.GROUND_UNIT,Unit.Category.SHIP}`
@@ -941,11 +1093,8 @@ function ZONE_RADIUS:Scan( ObjectCategories, UnitCategories )
--if ZoneObject:isExist() then --FF: isExist always returns false for SCENERY objects since DCS 2.2 and still in DCS 2.5
if ZoneObject then
local ObjectCategory = ZoneObject:getCategory()
--local name=ZoneObject:getName()
--env.info(string.format("Zone object %s", tostring(name)))
--self:E(ZoneObject)
-- Get object category.
local ObjectCategory = Object.getCategory(ZoneObject)
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isExist() and ZoneObject:isActive() ) or (ObjectCategory == Object.Category.STATIC and ZoneObject:isExist()) then
@@ -953,7 +1102,7 @@ function ZONE_RADIUS:Scan( ObjectCategories, UnitCategories )
local Include = false
if not UnitCategories then
-- Anythink found is included.
-- Anything found is included.
Include = true
else
-- Check if found object is in specified categories.
@@ -984,9 +1133,9 @@ function ZONE_RADIUS:Scan( ObjectCategories, UnitCategories )
if ObjectCategory == Object.Category.SCENERY then
local SceneryType = ZoneObject:getTypeName()
local SceneryName = ZoneObject:getName()
--BASE:I("SceneryType "..SceneryType.."SceneryName"..SceneryName)
--BASE:I("SceneryType "..SceneryType.." SceneryName "..tostring(SceneryName))
self.ScanData.Scenery[SceneryType] = self.ScanData.Scenery[SceneryType] or {}
self.ScanData.Scenery[SceneryType][SceneryName] = SCENERY:Register( SceneryName, ZoneObject )
self.ScanData.Scenery[SceneryType][SceneryName] = SCENERY:Register( tostring(SceneryName), ZoneObject)
table.insert(self.ScanData.SceneryTable,self.ScanData.Scenery[SceneryType][SceneryName] )
self:T( { SCENERY = self.ScanData.Scenery[SceneryType][SceneryName] } )
end
@@ -1442,8 +1591,11 @@ function ZONE_RADIUS:GetRandomCoordinateWithoutBuildings(inner,outer,distance,ma
local T1 = timer.getTime()
local buildings = {}
local buildingzones = {}
if self.ScanData and self.ScanData.BuildingCoordinates then
buildings = self.ScanData.BuildingCoordinates
buildingzones = self.ScanData.BuildingZones
else
-- build table of buildings coordinates
for _,_object in pairs (objects) do
@@ -1455,28 +1607,32 @@ function ZONE_RADIUS:GetRandomCoordinateWithoutBuildings(inner,outer,distance,ma
MARKER:New(scenery:GetCoordinate(),"Building"):ToAll()
end
buildings[#buildings+1] = scenery:GetCoordinate()
local bradius = scenery:GetBoundingRadius() or dist
local bzone = ZONE_RADIUS:New("Building-"..math.random(1,100000),scenery:GetVec2(),bradius,false)
buildingzones[#buildingzones+1] = bzone
--bzone:DrawZone(-1,{1,0,0},Alpha,FillColor,FillAlpha,1,ReadOnly)
end
end
end
self.ScanData.BuildingCoordinates = buildings
self.ScanData.BuildingZones = buildingzones
end
-- max 1000 tries
local rcoord = nil
local found = false
local found = true
local iterations = 0
for i=1,1000 do
iterations = iterations + 1
rcoord = self:GetRandomCoordinate(inner,outer)
found = false
for _,_coord in pairs (buildings) do
local coord = _coord -- Core.Point#COORDINATE
found = true
for _,_coord in pairs (buildingzones) do
local zone = _coord -- Core.Zone#ZONE_RADIUS
-- keep >50m dist from buildings
if coord:Get3DDistance(rcoord) > dist then
found = true
else
if zone:IsPointVec2InZone(rcoord) then
found = false
break
end
end
if found then
@@ -1488,15 +1644,43 @@ function ZONE_RADIUS:GetRandomCoordinateWithoutBuildings(inner,outer,distance,ma
end
end
if not found then
-- max 1000 tries
local rcoord = nil
local found = true
local iterations = 0
for i=1,1000 do
iterations = iterations + 1
rcoord = self:GetRandomCoordinate(inner,outer)
found = true
for _,_coord in pairs (buildings) do
local coord = _coord -- Core.Point#COORDINATE
-- keep >50m dist from buildings
if coord:Get3DDistance(rcoord) < dist then
found = false
end
end
if found then
-- we have a winner!
if markfinal then
MARKER:New(rcoord,"FREE"):ToAll()
end
break
end
end
end
T1=timer.getTime()
self:T(string.format("Found a coordinate: %s | Iterations: %d | Time: %d",tostring(found),iterations,T1-T0))
self:T(string.format("Found a coordinate: %s | Iterations: %d | Time: %.3f",tostring(found),iterations,T1-T0))
if found then return rcoord else return nil end
end
--- @type ZONE
---
-- @type ZONE
-- @extends #ZONE_RADIUS
@@ -1580,8 +1764,8 @@ function ZONE:FindByName( ZoneName )
end
--- @type ZONE_UNIT
---
-- @type ZONE_UNIT
-- @field Wrapper.Unit#UNIT ZoneUNIT
-- @extends Core.Zone#ZONE_RADIUS
@@ -1600,7 +1784,7 @@ ZONE_UNIT = {
-- @param #ZONE_UNIT self
-- @param #string ZoneName Name of the zone.
-- @param Wrapper.Unit#UNIT ZoneUNIT The unit as the center of the zone.
-- @param Dcs.DCSTypes#Distance Radius The radius of the zone.
-- @param #number Radius The radius of the zone in meters.
-- @param #table Offset A table specifying the offset. The offset table may have the following elements:
-- dx The offset in X direction, +x is north.
-- dy The offset in Y direction, +y is east.
@@ -1616,7 +1800,11 @@ function ZONE_UNIT:New( ZoneName, ZoneUNIT, Radius, Offset)
if (Offset.dx or Offset.dy) and (Offset.rho or Offset.theta) then
error("Cannot use (dx, dy) with (rho, theta)")
end
end
local self = BASE:Inherit( self, ZONE_RADIUS:New( ZoneName, ZoneUNIT:GetVec2(), Radius, true ) )
if Offset then
self.dy = Offset.dy or 0.0
self.dx = Offset.dx or 0.0
self.rho = Offset.rho or 0.0
@@ -1624,8 +1812,6 @@ function ZONE_UNIT:New( ZoneName, ZoneUNIT, Radius, Offset)
self.relative_to_unit = Offset.relative_to_unit or false
end
local self = BASE:Inherit( self, ZONE_RADIUS:New( ZoneName, ZoneUNIT:GetVec2(), Radius, true ) )
self:F( { ZoneName, ZoneUNIT:GetVec2(), Radius } )
self.ZoneUNIT = ZoneUNIT
@@ -1721,7 +1907,8 @@ function ZONE_UNIT:GetVec3( Height )
return Vec3
end
--- @type ZONE_GROUP
---
-- @type ZONE_GROUP
-- @extends #ZONE_RADIUS
@@ -1807,7 +1994,8 @@ function ZONE_GROUP:GetRandomPointVec2( inner, outer )
end
--- @type ZONE_POLYGON_BASE
---
-- @type ZONE_POLYGON_BASE
-- @field #ZONE_POLYGON_BASE.ListVec2 Polygon The polygon defined by an array of @{DCS#Vec2}.
-- @extends #ZONE_BASE
@@ -2456,7 +2644,8 @@ function ZONE_POLYGON_BASE:Boundary(Coalition, Color, Radius, Alpha, Segments, C
return self
end
--- @type ZONE_POLYGON
---
-- @type ZONE_POLYGON
-- @extends #ZONE_POLYGON_BASE
@@ -2557,11 +2746,11 @@ end
--- Scan the zone for the presence of units of the given ObjectCategories. Does **not** scan for scenery at the moment.
-- Note that **only after** a zone has been scanned, the zone can be evaluated by:
--
-- * @{ZONE_POLYGON.IsAllInZoneOfCoalition}(): Scan the presence of units in the zone of a coalition.
-- * @{ZONE_POLYGON.IsAllInZoneOfOtherCoalition}(): Scan the presence of units in the zone of an other coalition.
-- * @{ZONE_POLYGON.IsSomeInZoneOfCoalition}(): Scan if there is some presence of units in the zone of the given coalition.
-- * @{ZONE_POLYGON.IsNoneInZoneOfCoalition}(): Scan if there isn't any presence of units in the zone of an other coalition than the given one.
-- * @{ZONE_POLYGON.IsNoneInZone}(): Scan if the zone is empty.
-- * @{Core.Zone#ZONE_POLYGON.IsAllInZoneOfCoalition}(): Scan the presence of units in the zone of a coalition.
-- * @{Core.Zone#ZONE_POLYGON.IsAllInZoneOfOtherCoalition}(): Scan the presence of units in the zone of an other coalition.
-- * @{Core.Zone#ZONE_POLYGON.IsSomeInZoneOfCoalition}(): Scan if there is some presence of units in the zone of the given coalition.
-- * @{Core.Zone#ZONE_POLYGON.IsNoneInZoneOfCoalition}(): Scan if there isn't any presence of units in the zone of an other coalition than the given one.
-- * @{Core.Zone#ZONE_POLYGON.IsNoneInZone}(): Scan if the zone is empty.
-- @param #ZONE_POLYGON self
-- @param ObjectCategories An array of categories of the objects to find in the zone. E.g. `{Object.Category.UNIT}`
-- @param UnitCategories An array of unit categories of the objects to find in the zone. E.g. `{Unit.Category.GROUND_UNIT,Unit.Category.SHIP}`
@@ -2584,7 +2773,7 @@ function ZONE_POLYGON:Scan( ObjectCategories, UnitCategories )
local minmarkcoord = COORDINATE:NewFromVec3(minVec3)
local maxmarkcoord = COORDINATE:NewFromVec3(maxVec3)
local ZoneRadius = minmarkcoord:Get2DDistance(maxmarkcoord)/2
-- self:I("Scan Radius:" ..ZoneRadius)
local CenterVec3 = self:GetCoordinate():GetVec3()
--[[ this a bit shaky in functionality it seems
@@ -2609,7 +2798,7 @@ function ZONE_POLYGON:Scan( ObjectCategories, UnitCategories )
if ZoneObject then
local ObjectCategory = ZoneObject:getCategory()
local ObjectCategory = Object.getCategory(ZoneObject)
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isExist() and ZoneObject:isActive() ) or (ObjectCategory == Object.Category.STATIC and ZoneObject:isExist()) then
@@ -2907,7 +3096,7 @@ end
do -- ZONE_ELASTIC
--- @type ZONE_ELASTIC
-- @type ZONE_ELASTIC
-- @field #table points Points in 2D.
-- @field #table setGroups Set of GROUPs.
-- @field #table setOpsGroups Set of OPSGROUPS.
@@ -3107,7 +3296,7 @@ end
do -- ZONE_AIRBASE
--- @type ZONE_AIRBASE
-- @type ZONE_AIRBASE
-- @field #boolean isShip If `true`, airbase is a ship.
-- @field #boolean isHelipad If `true`, airbase is a helipad.
-- @field #boolean isAirdrome If `true`, airbase is an airdrome.

View File

@@ -135,6 +135,22 @@ do -- env
end -- env
do -- radio
---@type radio
-- @field #radio.modulation modulation
---
-- @type radio.modulation
-- @field AM
-- @field FM
radio = {}
radio.modulation = {}
radio.modulation.AM = 0
radio.modulation.FM = 1
end
do -- timer
@@ -329,11 +345,11 @@ end -- country
do -- Command
--- @type Command
-- @type Command
-- @field #string id
-- @field #Command.params params
--- @type Command.params
-- @type Command.params
end -- Command
@@ -374,7 +390,7 @@ end -- coalition
do -- Types
--- @type Desc
-- @type Desc
-- @field #number speedMax0 Max speed in meters/second at zero altitude.
-- @field #number massEmpty Empty mass in kg.
-- @field #number tankerType Type of refueling system: 0=boom, 1=probe.
@@ -471,16 +487,16 @@ do -- Types
-- @type AttributeNameArray
-- @list <#AttributeName>
--- @type Zone
-- @type Zone
-- @field DCSVec3#Vec3 point
-- @field #number radius
Zone = {}
--- @type ModelTime
-- @type ModelTime
-- @extends #number
--- @type Time
-- @type Time
-- @extends #number
--- A task descriptor (internal structure for DCS World). See [https://wiki.hoggitworld.com/view/Category:Tasks](https://wiki.hoggitworld.com/view/Category:Tasks).
@@ -489,7 +505,7 @@ do -- Types
-- @field #string id
-- @field #Task.param param
--- @type Task.param
-- @type Task.param
--- List of @{#Task}
-- @type TaskArray
@@ -536,7 +552,7 @@ do -- Object
-- @field SCENERY
-- @field CARGO
--- @type Object.Desc
-- @type Object.Desc
-- @extends #Desc
-- @field #number life initial life level
-- @field #Box3 box bounding box of collision geometry
@@ -793,11 +809,118 @@ do -- Airbase
-- @function [parent=#Airbase] getDesc
-- @param self
-- @return #Airbase.Desc
--- Returns the warehouse object associated with the airbase object. Can then be used to call the warehouse class functions to modify the contents of the warehouse.
-- @function [parent=#Airbase] getWarehouse
-- @param self
-- @return #Warehouse The DCS warehouse object of this airbase.
--- Enables or disables the airbase and FARP auto capture game mechanic where ownership of a base can change based on the presence of ground forces or the
-- default setting assigned in the editor.
-- @function [parent=#Airbase] autoCapture
-- @param self
-- @param #boolean setting `true` : enables autoCapture behavior, `false` : disables autoCapture behavior
--- Returns the current autoCapture setting for the passed base.
-- @function [parent=#Airbase] autoCaptureIsOn
-- @param self
-- @return #boolean `true` if autoCapture behavior is enabled and `false` otherwise.
--- Changes the passed airbase object's coalition to the set value. Must be used with Airbase.autoCapture to disable auto capturing of the base,
-- otherwise the base can revert back to a different coalition depending on the situation and built in game capture rules.
-- @function [parent=#Airbase] setCoalition
-- @param self
-- @param #number coa The new owner coalition: 0=neutra, 1=red, 2=blue.
--- Returns the wsType of every object that exists in DCS. A wsType is a table consisting of 4 entries indexed numerically.
-- It can be used to broadly categorize object types. The table can be broken down as: {mainCategory, subCat1, subCat2, index}
-- @function [parent=#Airbase] getResourceMap
-- @param self
-- @return #table wsType of every object that exists in DCS.
Airbase = {} --#Airbase
end -- Airbase
do -- Warehouse
--- [DCS Class Warehouse](https://wiki.hoggitworld.com/view/DCS_Class_Warehouse)
-- The warehouse class gives control over warehouses that exist in airbase objects. These warehouses can limit the aircraft, munitions, and fuel available to coalition aircraft.
-- @type Warehouse
--- Get a warehouse by passing its name.
-- @function [parent=#Warehouse] getByName
-- @param #string Name Name of the warehouse.
-- @return #Warehouse The warehouse object.
--- Adds the passed amount of a given item to the warehouse.
-- itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
-- A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
-- @function [parent=#Warehouse] addItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to add.
--- Returns the number of the passed type of item currently in a warehouse object.
-- @function [parent=#Warehouse] getItemCount
-- @param self
-- @param #string itemName Name of the item.
--- Sets the passed amount of a given item to the warehouse.
-- @function [parent=#Warehouse] setItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to add.
--- Removes the amount of the passed item from the warehouse.
-- @function [parent=#Warehouse] removeItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to be removed.
--- Adds the passed amount of a liquid fuel into the warehouse inventory.
-- @function [parent=#Warehouse] addLiquid
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid to add.
--- Returns the amount of the passed liquid type within a given warehouse.
-- @function [parent=#Warehouse] getLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @return #number Amount of liquid.
--- Sets the passed amount of a liquid fuel into the warehouse inventory.
-- @function [parent=#Warehouse] setLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid.
--- Removes the set amount of liquid from the inventory in a warehouse.
-- @function [parent=#Warehouse] setLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid.
--- Returns the airbase object associated with the warehouse object.
-- @function [parent=#Warehouse] getOwner
-- @param self
-- @return #Airbase The airbase object owning this warehouse.
--- Returns a full itemized list of everything currently in a warehouse. If a category is set to unlimited then the table will be returned empty.
-- Aircraft and weapons are indexed by strings. Liquids are indexed by number.
-- @function [parent=#Warehouse] getInventory
-- @param self
-- @param #string itemName Name of the item.
-- @return #table Itemized list of everything currently in a warehouse
Warehouse = {} --#Warehouse
end
do -- Spot
--- [DCS Class Spot](https://wiki.hoggitworld.com/view/DCS_Class_Spot)
@@ -860,7 +983,7 @@ do -- Spot
end -- Spot
do -- Controller
--- 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.
--- Controller is an object that performs A.I.-tasks. 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:
--
@@ -978,7 +1101,7 @@ end -- Controller
do -- Unit
--- @type Unit
-- @type Unit
-- @extends #CoalitionObject
-- @field ID Identifier of an unit. It assigned to an unit by the Mission Editor automatically.
-- @field #Unit.Category Category
@@ -1093,15 +1216,18 @@ do -- Unit
-- @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
--- A radar.
-- @type Unit.Radar.detectionDistanceAir
-- @field #Unit.Radar.detectionDistanceAir.upperHemisphere upperHemisphere
-- @field #Unit.Radar.detectionDistanceAir.lowerHemisphere lowerHemisphere
--- @type Unit.Radar.detectionDistanceAir.upperHemisphere
--- A radar.
-- @type Unit.Radar.detectionDistanceAir.upperHemisphere
-- @field #Distance headOn
-- @field #Distance tailOn
--- @type Unit.Radar.detectionDistanceAir.lowerHemisphere
--- A radar.
-- @type Unit.Radar.detectionDistanceAir.lowerHemisphere
-- @field #Distance headOn
-- @field #Distance tailOn
@@ -1403,22 +1529,26 @@ do -- AI
-- @field IR_POINTER
-- @field LASER
--- @type AI.Task.WaypointType
---
-- @type AI.Task.WaypointType
-- @field TAKEOFF
-- @field TAKEOFF_PARKING
-- @field TURNING_POINT
-- @field TAKEOFF_PARKING_HOT
-- @field LAND
--- @type AI.Task.TurnMethod
---
-- @type AI.Task.TurnMethod
-- @field FLY_OVER_POINT
-- @field FIN_POINT
--- @type AI.Task.AltitudeType
---
-- @type AI.Task.AltitudeType
-- @field BARO
-- @field RADIO
--- @type AI.Task.VehicleFormation
---
-- @type AI.Task.VehicleFormation
-- @field OFF_ROAD
-- @field ON_ROAD
-- @field RANK
@@ -1428,27 +1558,30 @@ do -- AI
-- @field ECHELON_LEFT
-- @field ECHELON_RIGHT
--- @type AI.Option
---
-- @type AI.Option
-- @field #AI.Option.Air Air
-- @field #AI.Option.Ground Ground
-- @field #AI.Option.Naval Naval
--- @type AI.Option.Air
---
-- @type AI.Option.Air
-- @field #AI.Option.Air.id id
-- @field #AI.Option.Air.val val
--- @type AI.Option.Ground
---
-- @type AI.Option.Ground
-- @field #AI.Option.Ground.id id
-- @field #AI.Option.Ground.val val
-- @field #AI.Option.Ground.mid mid
-- @field #AI.Option.Ground.mval mval
--
--- @type AI.Option.Naval
-- @type AI.Option.Naval
-- @field #AI.Option.Naval.id id
-- @field #AI.Option.Naval.val val
--- @type AI.Option.Air.id
---
-- @type AI.Option.Air.id
-- @field NO_OPTION
-- @field ROE
-- @field REACTION_ON_THREAT
@@ -1470,73 +1603,61 @@ do -- AI
-- @field OPTION_RADIO_USAGE_KILL
-- @field JETT_TANKS_IF_EMPTY
-- @field FORCED_ATTACK
--- @type AI.Option.Air.id.FORMATION
-- @field LINE_ABREAST
-- @field TRAIL
-- @field WEDGE
-- @field ECHELON_RIGHT
-- @field ECHELON_LEFT
-- @field FINGER_FOUR
-- @field SPREAD_FOUR
-- @field WW2_BOMBER_ELEMENT
-- @field WW2_BOMBER_ELEMENT_HEIGHT
-- @field WW2_FIGHTER_VIC
-- @field HEL_WEDGE
-- @field HEL_ECHELON
-- @field HEL_FRONT
-- @field HEL_COLUMN
-- @field COMBAT_BOX
-- @field JAVELIN_DOWN
--- @type AI.Option.Air.val
---
-- @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
---
-- @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
---
-- @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
---
-- @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
---
-- @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.Air.val.ECM_USING
---
-- @type AI.Option.Air.val.ECM_USING
-- @field NEVER_USE
-- @field USE_IF_ONLY_LOCK_BY_RADAR
-- @field USE_IF_DETECTED_LOCK_BY_RADAR
-- @field ALWAYS_USE
--- @type AI.Option.Air.val.MISSILE_ATTACK
---
-- @type AI.Option.Air.val.MISSILE_ATTACK
-- @field MAX_RANGE
-- @field NEZ_RANGE
-- @field HALF_WAY_RMAX_NEZ
-- @field TARGET_THREAT_EST
-- @field RANDOM_RANGE
--- @type AI.Option.Ground.id
---
-- @type AI.Option.Ground.id
-- @field NO_OPTION
-- @field ROE @{#AI.Option.Ground.val.ROE}
-- @field FORMATION
@@ -1545,42 +1666,51 @@ do -- AI
-- @field ENGAGE_AIR_WEAPONS
-- @field AC_ENGAGEMENT_RANGE_RESTRICTION
--- @type AI.Option.Ground.mid -- Moose added
---
-- @type AI.Option.Ground.mid -- Moose added
-- @field RESTRICT_AAA_MIN 27
-- @field RESTRICT_AAA_MAX 29
-- @field RESTRICT_TARGETS @{#AI.Option.Ground.mval.ENGAGE_TARGETS} 28
--- @type AI.Option.Ground.val
---
-- @type AI.Option.Ground.val
-- @field #AI.Option.Ground.val.ROE ROE
-- @field #AI.Option.Ground.val.ALARM_STATE ALARM_STATE
-- @field #AI.Option.Ground.val.ENGAGE_TARGETS RESTRICT_TARGETS
--- @type AI.Option.Ground.val.ROE
---
-- @type AI.Option.Ground.val.ROE
-- @field OPEN_FIRE
-- @field RETURN_FIRE
-- @field WEAPON_HOLD
--- @type AI.Option.Ground.mval -- Moose added
---
-- @type AI.Option.Ground.mval -- Moose added
-- @field #AI.Option.Ground.mval.ENGAGE_TARGETS ENGAGE_TARGETS
--- @type AI.Option.Ground.mval.ENGAGE_TARGETS -- Moose added
---
-- @type AI.Option.Ground.mval.ENGAGE_TARGETS -- Moose added
-- @field ANY_TARGET -- 0
-- @field AIR_UNITS_ONLY -- 1
-- @field GROUND_UNITS_ONLY -- 2
--- @type AI.Option.Ground.val.ALARM_STATE
---
-- @type AI.Option.Ground.val.ALARM_STATE
-- @field AUTO
-- @field GREEN
-- @field RED
--- @type AI.Option.Naval.id
---
-- @type AI.Option.Naval.id
-- @field NO_OPTION
-- @field ROE
--- @type AI.Option.Naval.val
---
-- @type AI.Option.Naval.val
-- @field #AI.Option.Naval.val.ROE ROE
--- @type AI.Option.Naval.val.ROE
---
-- @type AI.Option.Naval.val.ROE
-- @field OPEN_FIRE
-- @field RETURN_FIRE
-- @field WEAPON_HOLD

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,806 @@
--- **Functional** -- Send a truck to supply artillery groups.
--
-- ===
--
-- **AMMOTRUCK** - Send a truck to supply artillery groups.
--
-- ===
--
-- ## Missions:
--
-- ### [AmmoTruck](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/AMT%20-%20AmmoTruck/AmmoTruck%20100%20-%20NTTR%20-%20Basic)
--
-- ===
--
-- ### Author : **applevangelist**
--
-- @module Functional.AmmoTruck
-- @image Artillery.JPG
--
-- Last update: July 2023
-------------------------------------------------------------------------
--- **AMMOTRUCK** class, extends Core.FSM#FSM
-- @type AMMOTRUCK
-- @field #string ClassName Class Name
-- @field #string lid Lid for log entries
-- @field #string version Version string
-- @field #string alias Alias name
-- @field #boolean debug Debug flag
-- @field #table trucklist List of (alive) #AMMOTRUCK.data trucks
-- @field #table targetlist List of (alive) #AMMOTRUCK.data artillery
-- @field #number coalition Coalition this is for
-- @field Core.Set#SET_GROUP truckset SET of trucks
-- @field Core.Set#SET_GROUP targetset SET of artillery
-- @field #table remunitionqueue List of (alive) #AMMOTRUCK.data artillery to be reloaded
-- @field #table waitingtargets List of (alive) #AMMOTRUCK.data artillery waiting
-- @field #number ammothreshold Threshold (min) ammo before sending a truck
-- @field #number remunidist Max distance trucks will go
-- @field #number monitor Monitor interval in seconds
-- @field #number unloadtime Unload time in seconds
-- @field #number waitingtime Max waiting time in seconds
-- @field #boolean routeonroad Route truck on road if true (default)
-- @field #number reloads Number of reloads a single truck can do before he must return home
-- @extends Core.FSM#FSM
--- *Amateurs talk about tactics, but professionals study logistics.* - General Robert H Barrow, USMC
--
-- Simple Class to re-arm your artillery with trucks.
--
-- #AMMOTRUCK
--
-- * Controls a SET\_GROUP of trucks which will re-arm a SET\_GROUP of artillery groups when they run out of ammunition.
--
-- ## 1 The AMMOTRUCK concept
--
-- A SET\_GROUP of trucks which will re-arm a SET\_GROUP of artillery groups when they run out of ammunition. They will be based on a
-- homebase and drive from there to the artillery groups and then back home.
-- Trucks are the **only known in-game mechanic** to re-arm artillery and other units in DCS. Working units are e.g.: M-939 (blue), Ural-375 and ZIL-135 (both red).
--
-- ## 2 Set-up
--
-- Define a set of trucks and a set of artillery:
--
-- local truckset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Ammo Truck"):FilterStart()
-- local ariset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Artillery"):FilterStart()
--
-- Create an AMMOTRUCK object to take care of the artillery using the trucks, with a homezone:
--
-- local ammotruck = AMMOTRUCK:New(truckset,ariset,coalition.side.BLUE,"Logistics",ZONE:FindByName("HomeZone")
--
-- ## 2 Options and their default values
--
-- ammotruck.ammothreshold = 5 -- send a truck when down to this many rounds
-- ammotruck.remunidist = 20000 -- 20km - send trucks max this far from home
-- ammotruck.unloadtime = 600 -- 10 minutes - min time to unload ammunition
-- ammotruck.waitingtime = 1800 -- 30 mintes - wait max this long until remunition is done
-- ammotruck.monitor = -60 -- 1 minute - AMMOTRUCK checks run every one minute
-- ammotruck.routeonroad = true -- Trucks will **try** to drive on roads
-- ammotruck.usearmygroup = false -- If true, will make use of ARMYGROUP in the background (if used in DEV branch)
-- ammotruck.reloads = 5 -- Maxn re-arms a truck can do before he needs to go home and restock. Set to -1 for unlimited
--
-- ## 3 FSM Events to shape mission
--
-- Truck has been sent off:
--
-- function ammotruck:OnAfterRouteTruck(From, Event, To, Truckdata, Aridata)
-- ...
-- end
--
-- Truck has arrived:
--
-- function ammotruck:OnAfterTruckArrived(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is unloading:
--
-- function ammotruck:OnAfterTruckUnloading(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is returning home:
--
-- function ammotruck:OnAfterTruckReturning(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is arrived at home:
--
-- function ammotruck:OnAfterTruckHome(From, Event, To, Truckdata)
-- ...
-- end
--
-- @field #AMMOTRUCK
AMMOTRUCK = {
ClassName = "AMMOTRUCK",
lid = "",
version = "0.0.12",
alias = "",
debug = false,
trucklist = {},
targetlist = {},
coalition = nil,
truckset = nil,
targetset = nil,
remunitionqueue = {},
waitingtargets = {},
ammothreshold = 5,
remunidist = 20000,
monitor = -60,
unloadtime = 600,
waitingtime = 1800,
routeonroad = true,
reloads = 5,
}
---
-- @type AMMOTRUCK.State
AMMOTRUCK.State = {
IDLE = "idle",
DRIVING = "driving",
ARRIVED = "arrived",
UNLOADING = "unloading",
RETURNING = "returning",
WAITING = "waiting",
RELOADING = "reloading",
OUTOFAMMO = "outofammo",
REQUESTED = "requested",
}
---
--@type AMMOTRUCK.data
--@field Wrapper.Group#GROUP group
--@field #string name
--@field #AMMOTRUCK.State statusquo
--@field #number timestamp
--@field #number ammo
--@field Core.Point#COORDINATE coordinate
--@field #string targetname
--@field Wrapper.Group#GROUP targetgroup
--@field Core.Point#COORDINATE targetcoordinate
--@field #number reloads
---
-- @param #AMMOTRUCK self
-- @param Core.Set#SET_GROUP Truckset Set of truck groups
-- @param Core.Set#SET_GROUP Targetset Set of artillery groups
-- @param #number Coalition Coalition
-- @param #string Alias Alias Name
-- @param Core.Zone#ZONE Homezone Home, return zone for trucks
-- @return #AMMOTRUCK self
-- @usage
-- Define a set of trucks and a set of artillery:
-- local truckset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Ammo Truck"):FilterStart()
-- local ariset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Artillery"):FilterStart()
--
-- Create an AMMOTRUCK object to take care of the artillery using the trucks, with a homezone:
-- local ammotruck = AMMOTRUCK:New(truckset,ariset,coalition.side.BLUE,"Logistics",ZONE:FindByName("HomeZone")
function AMMOTRUCK:New(Truckset,Targetset,Coalition,Alias,Homezone)
-- Inherit everything from BASE class.
local self=BASE:Inherit(self, FSM:New()) -- #AMMOTRUCK
self.truckset = Truckset -- Core.Set#SET_GROUP
self.targetset = Targetset -- Core.Set#SET_GROUP
self.coalition = Coalition -- #number
self.alias = Alias -- #string
self.debug = false
self.remunitionqueue = {}
self.trucklist = {}
self.targetlist = {}
self.ammothreshold = 5
self.remunidist = 20000
self.homezone = Homezone -- Core.Zone#ZONE
self.waitingtime = 1800
self.usearmygroup = false
self.hasarmygroup = false
-- Log id.
self.lid=string.format("AMMOTRUCK %s | %s | ", self.version, self.alias)
self:SetStartState("Stopped")
self:AddTransition("Stopped", "Start", "Running")
self:AddTransition("*", "Monitor", "*")
self:AddTransition("*", "RouteTruck", "*")
self:AddTransition("*", "TruckArrived", "*")
self:AddTransition("*", "TruckUnloading", "*")
self:AddTransition("*", "TruckReturning", "*")
self:AddTransition("*", "TruckHome", "*")
self:AddTransition("*", "Stop", "Stopped")
self:__Start(math.random(5,10))
self:I(self.lid .. "Started")
------------------------
--- Pseudo Functions ---
------------------------
--- Triggers the FSM event "Stop". Stops the AMMOTRUCK and all its event handlers.
-- @function [parent=#AMMOTRUCK] Stop
-- @param #AMMOTRUCK self
--- Triggers the FSM event "Stop" after a delay. Stops the AMMOTRUCK and all its event handlers.
-- @function [parent=#AMMOTRUCK] __Stop
-- @param #AMMOTRUCK self
-- @param #number delay Delay in seconds.
--- On after "RouteTruck" event.
-- @function [parent=#AMMOTRUCK] OnAfterRouteTruck
-- @param #AMMOTRUCK self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #AMMOTRUCK.data Truck
-- @param #AMMOTRUCK.data Artillery
--- On after "TruckUnloading" event.
-- @function [parent=#AMMOTRUCK] OnAfterTruckUnloading
-- @param #AMMOTRUCK self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #AMMOTRUCK.data Truck
--- On after "TruckReturning" event.
-- @function [parent=#AMMOTRUCK] OnAfterTruckReturning
-- @param #AMMOTRUCK self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #AMMOTRUCK.data Truck
--- On after "RouteTruck" event.
-- @function [parent=#AMMOTRUCK] OnAfterRouteTruck
-- @param #AMMOTRUCK self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #AMMOTRUCK.data Truck
--- On after "TruckHome" event.
-- @function [parent=#AMMOTRUCK] OnAfterTruckHome
-- @param #AMMOTRUCK self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #AMMOTRUCK.data Truck
return self
end
---
-- @param #AMMOTRUCK self
-- @param #table dataset table of #AMMOTRUCK.data entries
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckDrivingTrucks(dataset)
self:T(self.lid .. " CheckDrivingTrucks")
local data = dataset
for _,_data in pairs (data) do
local truck = _data -- #AMMOTRUCK.data
-- see if we arrived at destination
local coord = truck.group:GetCoordinate()
local tgtcoord = truck.targetcoordinate
local dist = coord:Get2DDistance(tgtcoord)
if dist <= 150 then
-- arrived
truck.statusquo = AMMOTRUCK.State.ARRIVED
truck.timestamp = timer.getAbsTime()
truck.coordinate = coord
self:__TruckArrived(1,truck)
end
-- still driving?
local Tnow = timer.getAbsTime()
if Tnow - truck.timestamp > 30 then
local group = truck.group
if self.usearmygroup then
group = truck.group:GetGroup()
end
local currspeed = group:GetVelocityKMH()
if truck.lastspeed then
if truck.lastspeed == 0 and currspeed == 0 then
self:T(truck.group:GetName().." Is not moving!")
-- try and move it
truck.timestamp = timer.getAbsTime()
if self.routeonroad then
group:RouteGroundOnRoad(truck.targetcoordinate,30,2,"Vee")
else
group:RouteGroundTo(truck.targetcoordinate,30,"Vee",2)
end
end
truck.lastspeed = currspeed
else
truck.lastspeed = currspeed
truck.timestamp = timer.getAbsTime()
end
self:I({truck=truck.group:GetName(),currspeed=currspeed,lastspeed=truck.lastspeed})
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param Wrapper.Group#GROUP Group
-- @return #AMMOTRUCK self
function AMMOTRUCK:GetAmmoStatus(Group)
local ammotot, shells, rockets, bombs, missiles, narti = Group:GetAmmunition()
return rockets+missiles+narti
end
---
-- @param #AMMOTRUCK self
-- @param #table dataset table of #AMMOTRUCK.data entries
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckWaitingTargets(dataset)
self:T(self.lid .. " CheckWaitingTargets")
local data = dataset
for _,_data in pairs (data) do
local truck = _data -- #AMMOTRUCK.data
-- see how long we're waiting - maybe ammo truck is dead?
local Tnow = timer.getAbsTime()
local Tdiff = Tnow - truck.timestamp
if Tdiff > self.waitingtime then
local hasammo = self:GetAmmoStatus(truck.group)
if hasammo <= self.ammothreshold then
truck.statusquo = AMMOTRUCK.State.OUTOFAMMO
else
truck.statusquo = AMMOTRUCK.State.IDLE
end
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #table dataset table of #AMMOTRUCK.data entries
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckReturningTrucks(dataset)
self:T(self.lid .. " CheckReturningTrucks")
local data = dataset
local tgtcoord = self.homezone:GetCoordinate()
local radius = self.homezone:GetRadius()
for _,_data in pairs (data) do
local truck = _data -- #AMMOTRUCK.data
-- see if we arrived at destination
local coord = truck.group:GetCoordinate()
local dist = coord:Get2DDistance(tgtcoord)
self:T({name=truck.name,radius=radius,distance=dist})
if dist <= radius then
-- arrived
truck.statusquo = AMMOTRUCK.State.IDLE
truck.timestamp = timer.getAbsTime()
truck.coordinate = coord
truck.reloads = self.reloads or 5
self:__TruckHome(1,truck)
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string name Artillery group name to find
-- @return #AMMOTRUCK.data Data
function AMMOTRUCK:FindTarget(name)
self:T(self.lid .. " FindTarget")
local data = nil
local dataset = self.targetlist
for _,_entry in pairs(dataset) do
local entry = _entry -- #AMMOTRUCK.data
if entry.name == name then
data = entry
break
end
end
return data
end
---
-- @param #AMMOTRUCK self
-- @param #string name Truck group name to find
-- @return #AMMOTRUCK.data Data
function AMMOTRUCK:FindTruck(name)
self:T(self.lid .. " FindTruck")
local data = nil
local dataset = self.trucklist
for _,_entry in pairs(dataset) do
local entry = _entry -- #AMMOTRUCK.data
if entry.name == name then
data = entry
break
end
end
return data
end
---
-- @param #AMMOTRUCK self
-- @param #table dataset table of #AMMOTRUCK.data entries
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckArrivedTrucks(dataset)
self:T(self.lid .. " CheckArrivedTrucks")
local data = dataset
for _,_data in pairs (data) do
-- set to unloading
local truck = _data -- #AMMOTRUCK.data
truck.statusquo = AMMOTRUCK.State.UNLOADING
truck.timestamp = timer.getAbsTime()
self:__TruckUnloading(2,truck)
-- set target to reloading
local aridata = self:FindTarget(truck.targetname) -- #AMMOTRUCK.data
if aridata then
aridata.statusquo = AMMOTRUCK.State.RELOADING
aridata.timestamp = timer.getAbsTime()
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #table dataset table of #AMMOTRUCK.data entries
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckUnloadingTrucks(dataset)
self:T(self.lid .. " CheckUnloadingTrucks")
local data = dataset
for _,_data in pairs (data) do
-- check timestamp
local truck = _data -- #AMMOTRUCK.data
local Tnow = timer.getAbsTime()
local Tpassed = Tnow - truck.timestamp
local hasammo = self:GetAmmoStatus(truck.targetgroup)
if Tpassed > self.unloadtime and hasammo > self.ammothreshold then
truck.statusquo = AMMOTRUCK.State.RETURNING
truck.timestamp = timer.getAbsTime()
self:__TruckReturning(2,truck)
-- set target to reloaded
local aridata = self:FindTarget(truck.targetname) -- #AMMOTRUCK.data
if aridata then
aridata.statusquo = AMMOTRUCK.State.IDLE
aridata.timestamp = timer.getAbsTime()
end
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckTargetsAlive()
self:T(self.lid .. " CheckTargetsAlive")
local arilist = self.targetlist
for _,_ari in pairs(arilist) do
local ari = _ari -- #AMMOTRUCK.data
if ari.group and ari.group:IsAlive() then
-- everything fine
else
-- ari dead
self.targetlist[ari.name] = nil
end
end
-- new arrivals?
local aritable = self.targetset:GetSetObjects() --#table
for _,_ari in pairs(aritable) do
local ari = _ari -- Wrapper.Group#GROUP
if ari and ari:IsAlive() and not self.targetlist[ari:GetName()] then
local name = ari:GetName()
local newari = {} -- #AMMOTRUCK.data
newari.name = name
newari.group = ari
newari.statusquo = AMMOTRUCK.State.IDLE
newari.timestamp = timer.getAbsTime()
newari.coordinate = ari:GetCoordinate()
local hasammo = self:GetAmmoStatus(ari)
--newari.ammo = ari:GetAmmunition()
newari.ammo = hasammo
self.targetlist[name] = newari
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @return #AMMOTRUCK self
function AMMOTRUCK:CheckTrucksAlive()
self:T(self.lid .. " CheckTrucksAlive")
local trucklist = self.trucklist
for _,_truck in pairs(trucklist) do
local truck = _truck -- #AMMOTRUCK.data
if truck.group and truck.group:IsAlive() then
-- everything fine
else
-- truck dead
local tgtname = truck.targetname
local targetdata = self:FindTarget(tgtname) -- #AMMOTRUCK.data
if targetdata then
if targetdata.statusquo ~= AMMOTRUCK.State.IDLE then
targetdata.statusquo = AMMOTRUCK.State.IDLE
end
end
self.trucklist[truck.name] = nil
end
end
-- new arrivals?
local trucktable = self.truckset:GetSetObjects() --#table
for _,_truck in pairs(trucktable) do
local truck = _truck -- Wrapper.Group#GROUP
if truck and truck:IsAlive() and not self.trucklist[truck:GetName()] then
local name = truck:GetName()
local newtruck = {} -- #AMMOTRUCK.data
newtruck.name = name
newtruck.group = truck
if self.hasarmygroup then
-- is (not) already ARMYGROUP?
if truck.ClassName and truck.ClassName == "GROUP" then
local trucker = ARMYGROUP:New(truck)
trucker:Activate()
newtruck.group = trucker
end
end
newtruck.statusquo = AMMOTRUCK.State.IDLE
newtruck.timestamp = timer.getAbsTime()
newtruck.coordinate = truck:GetCoordinate()
newtruck.reloads = self.reloads or 5
self.trucklist[name] = newtruck
end
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterStart(From, Event, To)
self:T({From, Event, To})
if ARMYGROUP and self.usearmygroup then
self.hasarmygroup = true
else
self.hasarmygroup = false
end
if self.debug then
BASE:TraceOn()
BASE:TraceClass("AMMOTRUCK")
end
self:CheckTargetsAlive()
self:CheckTrucksAlive()
self:__Monitor(-30)
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterMonitor(From, Event, To)
self:T({From, Event, To})
self:CheckTargetsAlive()
self:CheckTrucksAlive()
-- update ammo state
local remunition = false
local remunitionqueue = {}
local waitingtargets = {}
for _,_ari in pairs(self.targetlist) do
local data = _ari -- #AMMOTRUCK.data
if data.group and data.group:IsAlive() then
data.ammo = self:GetAmmoStatus(data.group)
data.timestamp = timer.getAbsTime()
local text = string.format("Ari %s | Ammo %d | State %s",data.name,data.ammo,data.statusquo)
self:T(text)
if data.ammo <= self.ammothreshold and (data.statusquo == AMMOTRUCK.State.IDLE or data.statusquo == AMMOTRUCK.State.OUTOFAMMO) then
-- add to remu queue
data.statusquo = AMMOTRUCK.State.OUTOFAMMO
remunitionqueue[#remunitionqueue+1] = data
remunition = true
elseif data.statusquo == AMMOTRUCK.State.WAITING then
waitingtargets[#waitingtargets+1] = data
end
else
self.targetlist[data.name] = nil
end
end
-- sort trucks in buckets
local idletrucks = {}
local drivingtrucks = {}
local unloadingtrucks = {}
local arrivedtrucks = {}
local returningtrucks = {}
local found = false
for _,_truckdata in pairs(self.trucklist) do
local data = _truckdata -- #AMMOTRUCK.data
if data.group and data.group:IsAlive() then
-- check state
local text = string.format("Truck %s | State %s",data.name,data.statusquo)
self:T(text)
if data.statusquo == AMMOTRUCK.State.IDLE then
idletrucks[#idletrucks+1] = data
found = true
elseif data.statusquo == AMMOTRUCK.State.DRIVING then
drivingtrucks[#drivingtrucks+1] = data
elseif data.statusquo == AMMOTRUCK.State.ARRIVED then
arrivedtrucks[#arrivedtrucks+1] = data
elseif data.statusquo == AMMOTRUCK.State.UNLOADING then
unloadingtrucks[#unloadingtrucks+1] = data
elseif data.statusquo == AMMOTRUCK.State.RETURNING then
returningtrucks[#returningtrucks+1] = data
if data.reloads > 0 or data.reloads == -1 then
idletrucks[#idletrucks+1] = data
found = true
end
end
else
self.truckset[data.name] = nil
end
end
-- see if we can/need route one
local n=0
if found and remunition then
-- match
--local match = false
for _,_truckdata in pairs(idletrucks) do
local truckdata = _truckdata -- #AMMOTRUCK.data
local truckcoord = truckdata.group:GetCoordinate() -- Core.Point#COORDINATE
for _,_aridata in pairs(remunitionqueue) do
local aridata = _aridata -- #AMMOTRUCK.data
local aricoord = aridata.coordinate
local distance = truckcoord:Get2DDistance(aricoord)
if distance <= self.remunidist and aridata.statusquo == AMMOTRUCK.State.OUTOFAMMO and n <= #idletrucks then
n = n + 1
aridata.statusquo = AMMOTRUCK.State.REQUESTED
self:__RouteTruck(n*5,truckdata,aridata)
break
end
end
end
end
-- check driving trucks
if #drivingtrucks > 0 then
self:CheckDrivingTrucks(drivingtrucks)
end
-- check arrived trucks
if #arrivedtrucks > 0 then
self:CheckArrivedTrucks(arrivedtrucks)
end
-- check unloading trucks
if #unloadingtrucks > 0 then
self:CheckUnloadingTrucks(unloadingtrucks)
end
-- check returningtrucks trucks
if #returningtrucks > 0 then
self:CheckReturningTrucks(returningtrucks)
end
-- check waiting targets
if #waitingtargets > 0 then
self:CheckWaitingTargets(waitingtargets)
end
self:__Monitor(self.monitor)
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #AMMOTRUCK.data Truckdata
-- @param #AMMOTRUCK.data Aridata
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterRouteTruck(From, Event, To, Truckdata, Aridata)
self:T({From, Event, To, Truckdata.name, Aridata.name})
local truckdata = Truckdata -- #AMMOTRUCK.data
local aridata = Aridata -- #AMMOTRUCK.data
local tgtgrp = aridata.group
local tgtzone = ZONE_GROUP:New(aridata.name,tgtgrp,30)
local tgtcoord = tgtzone:GetRandomCoordinate(15)
if self.hasarmygroup then
local mission = AUFTRAG:NewONGUARD(tgtcoord)
local oldmission = truckdata.group:GetMissionCurrent()
if oldmission then oldmission:Cancel() end
mission:SetTime(5)
mission:SetTeleport(false)
truckdata.group:AddMission(mission)
elseif self.routeonroad then
truckdata.group:RouteGroundOnRoad(tgtcoord,30)
else
truckdata.group:RouteGroundTo(tgtcoord,30)
end
truckdata.statusquo = AMMOTRUCK.State.DRIVING
truckdata.targetgroup = tgtgrp
truckdata.targetname = aridata.name
truckdata.targetcoordinate = tgtcoord
aridata.statusquo = AMMOTRUCK.State.WAITING
aridata.timestamp = timer.getAbsTime()
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #AMMOTRUCK.data Truckdata
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterTruckUnloading(From, Event, To, Truckdata)
local m = MESSAGE:New("Truck "..Truckdata.name.." unloading!",15,"AmmoTruck"):ToCoalitionIf(self.coalition,self.debug)
local truck = Truckdata -- Functional.AmmoTruck#AMMOTRUCK.data
local coord = truck.group:GetCoordinate()
local heading = truck.group:GetHeading()
heading = heading < 180 and (360-heading) or (heading - 180)
local cid = self.coalition == coalition.side.BLUE and country.id.USA or country.id.RUSSIA
cid = self.coalition == coalition.side.NEUTRAL and country.id.UN_PEACEKEEPERS or cid
local ammo = {}
for i=1,5 do
ammo[i] = SPAWNSTATIC:NewFromType("ammo_cargo","Cargos",cid)
:InitCoordinate(coord:Translate((15+((i-1)*4)),heading))
:Spawn(0,"AmmoCrate-"..math.random(1,10000))
end
local function destroyammo(ammo)
for _,_crate in pairs(ammo) do
_crate:Destroy(false)
end
end
local scheduler = SCHEDULER:New(nil,destroyammo,{ammo},self.waitingtime)
-- one reload less
if truck.reloads ~= -1 then
truck.reloads = truck.reloads - 1
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #AMMOTRUCK.data Truck
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterTruckReturning(From, Event, To, Truck)
self:T({From, Event, To, Truck.name})
-- route home
local truckdata = Truck -- #AMMOTRUCK.data
local tgtzone = self.homezone
local tgtcoord = tgtzone:GetRandomCoordinate()
if self.hasarmygroup then
local mission = AUFTRAG:NewONGUARD(tgtcoord)
local oldmission = truckdata.group:GetMissionCurrent()
if oldmission then oldmission:Cancel() end
mission:SetTime(5)
mission:SetTeleport(false)
truckdata.group:AddMission(mission)
elseif self.routeonroad then
truckdata.group:RouteGroundOnRoad(tgtcoord,30,1,"Cone")
else
truckdata.group:RouteGroundTo(tgtcoord,30,"Cone",1)
end
return self
end
---
-- @param #AMMOTRUCK self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #AMMOTRUCK self
function AMMOTRUCK:onafterStop(From, Event, To)
self:T({From, Event, To})
return self
end

View File

@@ -25,9 +25,9 @@
--
-- ===
--
-- ### Author: **[funkyfranky](https://forums.eagle.ru/member.php?u=115026)**
-- ### Author: **funkyfranky**
--
-- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536)
-- ### Contributions: FlightControl
--
-- ====
-- @module Functional.Artillery
@@ -291,14 +291,14 @@
-- ### Illumination Shells
--
-- ARTY groups that possess shells can fire shells with illumination bombs. First, the group needs to be equipped with this weapon. This is done by the
-- function @{ARTY.SetIlluminationShells}(*n*, *power*), where *n* is the number of shells the group has available and *power* the illumination power in mega candela (mcd).
-- function @{#ARTY.SetIlluminationShells}(*n*, *power*), where *n* is the number of shells the group has available and *power* the illumination power in mega candela (mcd).
--
-- In order to execute an engagement with illumination shells one has to use the weapon type *ARTY.WeaponType.IlluminationShells* in the
-- @{#ARTY.AssignTargetCoord}() function.
--
-- In the simulation, the explosive shell that is fired is destroyed once it gets close to the target point but before it can actually impact.
-- At this position an illumination bomb is triggered at a random altitude between 500 and 1000 meters. This interval can be set by the function
-- @{ARTY.SetIlluminationMinMaxAlt}(*minalt*, *maxalt*).
-- @{#ARTY.SetIlluminationMinMaxAlt}(*minalt*, *maxalt*).
--
-- ### Smoke Shells
--
@@ -3547,8 +3547,6 @@ end
function ARTY:onafterRespawn(Controllable, From, Event, To)
self:_EventFromTo("onafterRespawn", Event, From, To)
env.info("FF Respawning arty group")
local group=self.Controllable --Wrapper.Group#GROUP
-- Respawn group.

File diff suppressed because it is too large Load Diff

View File

@@ -167,9 +167,9 @@
--
-- ### 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
-- * **Ciribob**: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
-- * **EasyEB**: Ideas and Beta Testing
-- * **Wingthor**: Beta Testing
--
-- ### Authors:
--

View File

@@ -2354,6 +2354,7 @@ do -- DETECTION_TYPES
if not DetectedItem then
DetectedItem = self:AddDetectedItem( "TYPE", DetectedTypeName )
DetectedItem.TypeName = DetectedTypeName
DetectedItem.Name = DetectedUnitName -- fix by @Nocke
end
DetectedItem.Set:AddUnit( DetectedUnit )
@@ -2451,7 +2452,7 @@ do -- DETECTION_AREAS
--
-- Retrieve the DetectedItems[].Set with the method @{Functional.Detection#DETECTION_BASE.GetDetectedSet}(). A @{Core.Set#SET_UNIT} object will be returned.
--
-- Retrieve the formed @{Zone@ZONE_UNIT}s as a result of the grouping the detected units within the DetectionZoneRange, use the method @{Functional.Detection#DETECTION_AREAS.GetDetectionZones}().
-- Retrieve the formed @{Core.Zone@ZONE_UNIT}s as a result of the grouping the detected units within the DetectionZoneRange, use the method @{Functional.Detection#DETECTION_AREAS.GetDetectionZones}().
-- To understand the amount of zones created, use the method @{Functional.Detection#DETECTION_AREAS.GetDetectionZoneCount}().
-- If you want to obtain a specific zone from the DetectedZones, use the method @{Functional.Detection#DETECTION_AREAS.GetDetectionZoneByID}() with a given index.
--

View File

@@ -21,7 +21,7 @@ do -- DETECTION_ZONES
--
-- Retrieve the DetectedItems[].Set with the method @{Functional.Detection#DETECTION_BASE.GetDetectedSet}(). A @{Core.Set#SET_UNIT} object will be returned.
--
-- Retrieve the formed @{Zone@ZONE_UNIT}s as a result of the grouping the detected units within the DetectionZoneRange, use the method @{Functional.Detection#DETECTION_BASE.GetDetectionZones}().
-- Retrieve the formed @{Core.Zone#ZONE_UNIT}s as a result of the grouping the detected units within the DetectionZoneRange, use the method @{Functional.Detection#DETECTION_BASE.GetDetectionZones}().
-- To understand the amount of zones created, use the method @{Functional.Detection#DETECTION_BASE.GetDetectionZoneCount}().
-- If you want to obtain a specific zone from the DetectedZones, use the method @{Functional.Detection#DETECTION_BASE.GetDetectionZone}() with a given index.
--

View File

@@ -108,8 +108,8 @@
-- @image Escorting.JPG
--- @type ESCORT
---
-- @type ESCORT
-- @extends Core.Base#BASE
-- @field Wrapper.Client#CLIENT EscortClient
-- @field Wrapper.Group#GROUP EscortGroup
@@ -252,7 +252,7 @@ end
--- Set a Detection method for the EscortClient to be reported upon.
-- Detection methods are based on the derived classes from DETECTION_BASE.
-- @param #ESCORT self
-- @param Function.Detection#DETECTION_BASE Detection
-- @param Functional.Detection#DETECTION_BASE Detection
function ESCORT:SetDetection( Detection )
self.Detection = Detection
@@ -600,7 +600,7 @@ function ESCORT:MenuReportTargets( Seconds )
self.EscortMenuAttackNearbyTargets = MENU_GROUP:New( self.EscortClient:GetGroup(), "Attack targets", self.EscortMenu )
self.ReportTargetsScheduler = SCHEDULER:New( self, self._ReportTargetsScheduler, {}, 1, Seconds )
self.ReportTargetsScheduler, self.ReportTargetsSchedulerID = SCHEDULER:New( self, self._ReportTargetsScheduler, {}, 1, Seconds )
return self
end
@@ -693,7 +693,7 @@ function ESCORT:MenuResumeMission()
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_HoldPosition( OrbitGroup, OrbitHeight, OrbitSeconds )
local EscortGroup = self.EscortGroup
@@ -733,7 +733,7 @@ function ESCORT:_HoldPosition( OrbitGroup, OrbitHeight, OrbitSeconds )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_JoinUpAndFollow( Distance )
local EscortGroup = self.EscortGroup
@@ -766,7 +766,7 @@ function ESCORT:JoinUpAndFollow( EscortGroup, EscortClient, Distance )
EscortGroup:MessageToClient( "Rejoining and Following at " .. Distance .. "!", 30, EscortClient )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_Flare( Color, Message )
local EscortGroup = self.EscortGroup
@@ -776,7 +776,7 @@ function ESCORT:_Flare( Color, Message )
EscortGroup:MessageToClient( Message, 10, EscortClient )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_Smoke( Color, Message )
local EscortGroup = self.EscortGroup
@@ -787,7 +787,7 @@ function ESCORT:_Smoke( Color, Message )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_ReportNearbyTargetsNow()
local EscortGroup = self.EscortGroup
@@ -809,12 +809,12 @@ function ESCORT:_SwitchReportNearbyTargets( ReportTargets )
self.ReportTargetsScheduler:Schedule( self, self._ReportTargetsScheduler, {}, 1, 30 )
end
else
routines.removeFunction( self.ReportTargetsScheduler )
self.ReportTargetsScheduler:Remove(self.ReportTargetsSchedulerID)
self.ReportTargetsScheduler = nil
end
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_ScanTargets( ScanDuration )
local EscortGroup = self.EscortGroup -- Wrapper.Group#GROUP
@@ -844,7 +844,7 @@ function ESCORT:_ScanTargets( ScanDuration )
end
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Wrapper.Group#GROUP EscortGroup
function _Resume( EscortGroup )
env.info( '_Resume' )
@@ -856,7 +856,7 @@ function _Resume( EscortGroup )
end
--- @param #ESCORT self
-- @param #ESCORT self
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
function ESCORT:_AttackTarget( DetectedItem )
@@ -877,7 +877,7 @@ function ESCORT:_AttackTarget( DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroup:TaskAttackUnit( DetectedUnit )
@@ -900,7 +900,7 @@ function ESCORT:_AttackTarget( DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroup:TaskFireAtPoint( DetectedUnit:GetVec2(), 50 )
@@ -921,7 +921,7 @@ function ESCORT:_AttackTarget( DetectedItem )
end
---
--- @param #ESCORT self
-- @param #ESCORT self
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
function ESCORT:_AssistTarget( EscortGroupAttack, DetectedItem )
@@ -939,7 +939,7 @@ function ESCORT:_AssistTarget( EscortGroupAttack, DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroupAttack:TaskAttackUnit( DetectedUnit )
@@ -961,7 +961,7 @@ function ESCORT:_AssistTarget( EscortGroupAttack, DetectedItem )
local Tasks = {}
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit, Tasks )
if DetectedUnit:IsAlive() then
Tasks[#Tasks+1] = EscortGroupAttack:TaskFireAtPoint( DetectedUnit:GetVec2(), 50 )
@@ -981,7 +981,7 @@ function ESCORT:_AssistTarget( EscortGroupAttack, DetectedItem )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_ROE( EscortROEFunction, EscortROEMessage )
local EscortGroup = self.EscortGroup
@@ -991,7 +991,7 @@ function ESCORT:_ROE( EscortROEFunction, EscortROEMessage )
EscortGroup:MessageToClient( EscortROEMessage, 10, EscortClient )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_ROT( EscortROTFunction, EscortROTMessage )
local EscortGroup = self.EscortGroup
@@ -1001,7 +1001,7 @@ function ESCORT:_ROT( EscortROTFunction, EscortROTMessage )
EscortGroup:MessageToClient( EscortROTMessage, 10, EscortClient )
end
--- @param #MENUPARAM MenuParam
-- @param #MENUPARAM MenuParam
function ESCORT:_ResumeMission( WayPoint )
local EscortGroup = self.EscortGroup
@@ -1036,7 +1036,7 @@ function ESCORT:RegisterRoute()
return TaskPoints
end
--- @param Functional.Escort#ESCORT self
-- @param Functional.Escort#ESCORT self
function ESCORT:_FollowScheduler()
self:F( { self.FollowDistance } )

View File

@@ -58,7 +58,7 @@
--
-- # The FOX Concept
--
-- As you probably know [Fox](https://en.wikipedia.org/wiki/Fox_(code_word)) is a NATO brevity code for launching air-to-air munition. Therefore, the class name is not 100% accurate as this
-- As you probably know [Fox](https://en.wikipedia.org/wiki/Fox_\(code_word\)) is a NATO brevity code for launching air-to-air munition. Therefore, the class name is not 100% accurate as this
-- script handles air-to-air but also surface-to-air missiles.
--
-- # Basic Script
@@ -113,14 +113,9 @@
-- -- Start missile trainer.
-- fox:Start()
--
-- # Fine Tuning
--
-- Todo!
--
-- # Special Events
--
-- Todo!
-- # Notes
--
-- The script needs to be running before you enter an airplane slot. If FOX is not available to you, go back to observers and then join a slot again.
--
-- @field #FOX
FOX = {

View File

@@ -22,7 +22,7 @@
-- @module Functional.Mantis
-- @image Functional.Mantis.jpg
--
-- Last Update: Oct 2022
-- Last Update: Oct 2023
-------------------------------------------------------------------------
--- **MANTIS** class, extends Core.Base#BASE
@@ -103,10 +103,15 @@
-- * Roland
-- * Silkworm (though strictly speaking this is a surface to ship missile)
-- * SA-2, SA-3, SA-5, SA-6, SA-7, SA-8, SA-9, SA-10, SA-11, SA-13, SA-15, SA-19
-- * From IDF mod: STUNNER IDFA, TAMIR IDFA (Note all caps!)
-- * From HDS (see note on HDS below): SA-2, SA-3, SA-10B, SA-10C, SA-12, SA-17, SA-20A, SA-20B, SA-23, HQ-2
--
-- * From SMA: RBS98M, RBS70, RBS90, RBS90M, RBS103A, RBS103B, RBS103AM, RBS103BM, Lvkv9040M
-- **NOTE** If you are using the Swedish Military Assets (SMA), please note that the **group name** for RBS-SAM types also needs to contain the keyword "SMA"
--
-- * From CH: 2S38, PantsirS1, PantsirS2, PGL-625, HQ-17A, M903PAC2, M903PAC3, TorM2, TorM2K, TorM2M, NASAMS3-AMRAAMER, NASAMS3-AIM9X2, C-RAM, PGZ-09, S350-9M100, S350-9M96D
-- **NOTE** If you are using the Military Assets by Currenthill (CH), please note that the **group name** for CH-SAM types also needs to contain the keyword "CHM"
--
-- Following the example started above, an SA-6 site group name should start with "Red SAM SA-6" then, or a blue Patriot installation with e.g. "Blue SAM Patriot".
-- **NOTE** If you are using the High-Digit-Sam Mod, please note that the **group name** for the following SAM types also needs to contain the keyword "HDS":
--
@@ -369,6 +374,9 @@ MANTIS.SamData = {
["SA-20A"] = { Range=150, Blindspot=5, Height=27, Type="Long" , Radar="S-300PMU1"},
["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"},
["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" },
["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" },
["TAMIR IDFA"] = { Range=20, Blindspot=0.6, Height=12.3, Type="Short", Radar="IRON_DOME_LN" },
["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" },
}
--- SAM data HDS
@@ -415,6 +423,37 @@ MANTIS.SamDataSMA = {
["Lvkv9040M SMA"] = { Range=4, Blindspot=0, Height=2.5, Type="Short", Radar="LvKv9040" },
}
--- SAM data CH
-- @type MANTIS.SamDataCH
-- @field #number Range Max firing range in km
-- @field #number Blindspot no-firing range (green circle)
-- @field #number Height Max firing height in km
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
-- @field #string Radar Radar typename on unit level (used as key)
MANTIS.SamDataCH = {
-- units from CH (Military Assets by Currenthill)
-- https://www.currenthill.com/
-- group name MUST contain CHM to ID launcher type correctly!
["2S38 CH"] = { Range=8, Blindspot=0.5, Height=6, Type="Short", Radar="2S38" },
["PantsirS1 CH"] = { Range=20, Blindspot=1.2, Height=15, Type="Short", Radar="PantsirS1" },
["PantsirS2 CH"] = { Range=30, Blindspot=1.2, Height=18, Type="Medium", Radar="PantsirS2" },
["PGL-625 CH"] = { Range=10, Blindspot=0.5, Height=5, Type="Short", Radar="PGL_625" },
["HQ-17A CH"] = { Range=20, Blindspot=1.5, Height=10, Type="Short", Radar="HQ17A" },
["M903PAC2 CH"] = { Range=160, Blindspot=3, Height=24.5, Type="Long", Radar="MIM104_M903_PAC2" },
["M903PAC3 CH"] = { Range=120, Blindspot=1, Height=40, Type="Long", Radar="MIM104_M903_PAC3" },
["TorM2 CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2" },
["TorM2K CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2K" },
["TorM2M CH"] = { Range=16, Blindspot=1, Height=10, Type="Short", Radar="TorM2M" },
["NASAMS3-AMRAAMER CH"] = { Range=50, Blindspot=2, Height=35.7, Type="Medium", Radar="CH_NASAMS3_LN_AMRAAM_ER" },
["NASAMS3-AIM9X2 CH"] = { Range=20, Blindspot=0.2, Height=18, Type="Short", Radar="CH_NASAMS3_LN_AIM9X2" },
["C-RAM CH"] = { Range=2, Blindspot=0, Height=2, Type="Short", Radar="CH_Centurion_C_RAM" },
["PGZ-09 CH"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="CH_PGZ09" },
["S350-9M100 CH"] = { Range=15, Blindspot=1.5, Height=8, Type="Short", Radar="CH_S350_50P6_9M100" },
["S350-9M96D CH"] = { Range=150, Blindspot=2.5, Height=30, Type="Long", Radar="CH_S350_50P6_9M96D" },
["LAV-AD CH"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_LAVAD" },
["HQ-22 CH"] = { Range=170, Blindspot=5, Height=27, Type="Long", Radar="CH_HQ22_LN" },
}
-----------------------------------------------------------------------
-- MANTIS System
-----------------------------------------------------------------------
@@ -431,6 +470,7 @@ do
--@param #string awacs Group name of your Awacs (optional)
--@param #boolean EmOnOff Make MANTIS switch Emissions on and off instead of changing the alarm state between RED and GREEN (optional)
--@param #number Padding For #SEAD - Extra number of seconds to add to radar switch-back-on time (optional)
--@param #table Zones Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects
--@return #MANTIS self
--@usage Start up your MANTIS with a basic setting
--
@@ -449,8 +489,12 @@ do
-- mybluemantis = MANTIS:New("bluemantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
-- mybluemantis:Start()
--
function MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic,awacs, EmOnOff, Padding)
function MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic,awacs, EmOnOff, Padding, Zones)
-- Inherit everything from BASE class.
local self = BASE:Inherit(self, FSM:New()) -- #MANTIS
-- DONE: Create some user functions for these
-- DONE: Make HQ useful
-- DONE: Set SAMs to auto if EWR dies
@@ -510,6 +554,11 @@ do
self.maxclassic = 6
self.autoshorad = true
self.ShoradGroupSet = SET_GROUP:New() -- Core.Set#SET_GROUP
self.FilterZones = Zones
self.SkateZones = nil
self.SkateNumber = 3
self.shootandscoot = false
self.UseEmOnOff = true
if EmOnOff == false then
@@ -522,9 +571,6 @@ do
self.advAwacs = false
end
-- Inherit everything from BASE class.
local self = BASE:Inherit(self, FSM:New()) -- #MANTIS
-- Set the string id for output to DCS.log file.
self.lid=string.format("MANTIS %s | ", self.name)
@@ -559,16 +605,23 @@ do
self:T({self.ewr_templates})
self.SAM_Group = SET_GROUP:New():FilterPrefixes(self.SAM_Templates_Prefix):FilterCoalitions(self.Coalition)
self.EWR_Group = SET_GROUP:New():FilterPrefixes(self.ewr_templates):FilterCoalitions(self.Coalition)
if self.FilterZones then
self.SAM_Group:FilterZones(self.FilterZones)
end
if self.dynamic then
-- Set SAM SET_GROUP
self.SAM_Group = SET_GROUP:New():FilterPrefixes(self.SAM_Templates_Prefix):FilterCoalitions(self.Coalition):FilterStart()
self.SAM_Group:FilterStart()
-- Set EWR SET_GROUP
self.EWR_Group = SET_GROUP:New():FilterPrefixes(self.ewr_templates):FilterCoalitions(self.Coalition):FilterStart()
self.EWR_Group:FilterStart()
else
-- Set SAM SET_GROUP
self.SAM_Group = SET_GROUP:New():FilterPrefixes(self.SAM_Templates_Prefix):FilterCoalitions(self.Coalition):FilterOnce()
self.SAM_Group:FilterOnce()
-- Set EWR SET_GROUP
self.EWR_Group = SET_GROUP:New():FilterPrefixes(self.ewr_templates):FilterCoalitions(self.Coalition):FilterOnce()
self.EWR_Group:FilterOnce()
end
-- set up CC
@@ -578,7 +631,7 @@ do
-- TODO Version
-- @field #string version
self.version="0.8.9"
self.version="0.8.15"
self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
--- FSM Functions ---
@@ -742,6 +795,19 @@ do
return self
end
--- Add a SET_ZONE of zones for Shoot&Scoot - SHORAD units will move around
-- @param #MANTIS self
-- @param Core.Set#SET_ZONE ZoneSet Set of zones to be used. Units will move around to the next (random) zone between 100m and 3000m away.
-- @param #number Number Number of closest zones to be considered, defaults to 3.
-- @return #MANTIS self
function MANTIS:AddScootZones(ZoneSet, Number)
self:T(self.lid .. " AddScootZones")
self.SkateZones = ZoneSet
self.SkateNumber = Number or 3
self.shootandscoot = true
return self
end
--- Function to set accept and reject zones.
-- @param #MANTIS self
-- @param #table AcceptZones Table of @{Core.Zone#ZONE} objects
@@ -848,7 +914,7 @@ do
--- Function to get the HQ object for further use
-- @param #MANTIS self
-- @return Wrapper.GROUP#GROUP The HQ #GROUP object or *nil* if it doesn't exist
-- @return Wrapper.Group#GROUP The HQ #GROUP object or *nil* if it doesn't exist
function MANTIS:GetCommandCenter()
self:T(self.lid .. "GetCommandCenter")
if self.HQ_CC then
@@ -884,7 +950,7 @@ do
--- Function to set the HQ object for further use
-- @param #MANTIS self
-- @param Wrapper.GROUP#GROUP group The #GROUP object to be set as HQ
-- @param Wrapper.Group#GROUP group The #GROUP object to be set as HQ
function MANTIS:SetCommandCenter(group)
self:T(self.lid .. "SetCommandCenter")
local group = group or nil
@@ -946,7 +1012,7 @@ do
--- Set using your own #INTEL_DLINK object instead of #DETECTION
-- @param #MANTIS self
-- @param Ops.Intelligence#INTEL_DLINK DLink The data link object to be used.
-- @param Ops.Intel#INTEL_DLINK DLink The data link object to be used.
function MANTIS:SetUsingDLink(DLink)
self:T(self.lid .. "SetUsingDLink")
self.DLink = true
@@ -1299,11 +1365,12 @@ do
-- @param #string grpname Name of the group
-- @param #boolean mod HDS mod flag
-- @param #boolean sma SMA mod flag
-- @param #boolean chm CH mod flag
-- @return #number range Max firing range
-- @return #number height Max firing height
-- @return #string type Long, medium or short range
-- @return #number blind "blind" spot
function MANTIS:_GetSAMDataFromUnits(grpname,mod,sma)
function MANTIS:_GetSAMDataFromUnits(grpname,mod,sma,chm)
self:T(self.lid.."_GetSAMRangeFromUnits")
local found = false
local range = self.checkradius
@@ -1318,8 +1385,10 @@ do
SAMData = self.SamDataHDS
elseif sma then
SAMData = self.SamDataSMA
elseif chm then
SAMData = self.SamDataCH
end
--self:I("Looking to auto-match for "..grpname)
--self:T("Looking to auto-match for "..grpname)
for _,_unit in pairs(units) do
local unit = _unit -- Wrapper.Unit#UNIT
local type = string.lower(unit:GetTypeName())
@@ -1364,10 +1433,13 @@ do
local found = false
local HDSmod = false
local SMAMod = false
local CHMod = false
if string.find(grpname,"HDS",1,true) then
HDSmod = true
elseif string.find(grpname,"SMA",1,true) then
SMAMod = true
elseif string.find(grpname,"CHM",1,true) then
CHMod = true
end
if self.automode then
for idx,entry in pairs(self.SamData) do
@@ -1386,8 +1458,8 @@ do
end
end
-- secondary filter if not found
if (not found and self.automode) or HDSmod or SMAMod then
range, height, type = self:_GetSAMDataFromUnits(grpname,HDSmod,SMAMod)
if (not found and self.automode) or HDSmod or SMAMod or CHMod then
range, height, type = self:_GetSAMDataFromUnits(grpname,HDSmod,SMAMod,CHMod)
elseif not found then
self:E(self.lid .. string.format("*****Could not match radar data for %s! Will default to midrange values!",grpname))
end
@@ -1735,6 +1807,10 @@ do
self.Shorad:SetDefenseLimits(80,95)
self.ShoradLink = true
self.Shorad.Groupset=self.ShoradGroupSet
self.Shorad.debug = self.debug
end
if self.shootandscoot and self.SkateZones then
self.Shorad:AddScootZones(self.SkateZones,self.SkateNumber or 3)
end
self:__Status(-math.random(1,10))
return self

View File

@@ -50,6 +50,11 @@
-- * **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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE.
-- Therefore, this class is considered to be deprecated and superseded by the [Functional.Fox](https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html) class, which provides the same functionality.
--
-- ===
--
@@ -67,8 +72,8 @@
-- @module Functional.MissileTrainer
-- @image Missile_Trainer.JPG
--- @type MISSILETRAINER
---
-- @type MISSILETRAINER
-- @field Core.Set#SET_CLIENT DBClients
-- @extends Core.Base#BASE
@@ -97,6 +102,11 @@
-- * @{#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.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE.
-- Therefore, this class is considered to be deprecated and superseded by the [Functional.Fox](https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html) class, which provides the same functionality.
--
-- @field #MISSILETRAINER
MISSILETRAINER = {
@@ -205,7 +215,7 @@ function MISSILETRAINER:New( Distance, Briefing )
-- self.DB:ForEachClient(
-- --- @param Wrapper.Client#CLIENT Client
-- -- @param Wrapper.Client#CLIENT Client
-- function( Client )
--
-- ... actions ...
@@ -555,7 +565,7 @@ function MISSILETRAINER:_AddBearing( Client, TrainerWeapon )
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

View File

@@ -10,7 +10,8 @@
-- @module Functional.Movement
-- @image MOOSE.JPG
--- @type MOVEMENT
---
-- @type MOVEMENT
-- @extends Core.Base#BASE
---
@@ -55,7 +56,6 @@ 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 = SCHEDULER:New( self, self._Scheduler, {}, 1, 120 )
end

View File

@@ -46,9 +46,9 @@
--
-- ===
--
-- ### Author: **[funkyfranky](https://forums.eagle.ru/member.php?u=115026)**
-- ### Author: **funkyfranky**
--
-- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536)
-- ### Contributions: FlightControl
--
-- ===
-- @module Functional.RAT
@@ -225,7 +225,7 @@
--
-- * Landing: When an aircraft tries to land at an airport where it does not have a valid parking spot, it is immidiately despawned the moment its wheels touch the runway, i.e.
-- when a landing event is triggered. This leads to the loss of the RAT aircraft. On possible way to circumvent the this problem is to let another RAT aircraft spawn at landing
-- and not when it shuts down its engines. See the @{RAT.RespawnAfterLanding}() function.
-- and not when it shuts down its engines. See the @{#RAT.RespawnAfterLanding}() function.
-- * Spawning: When a big aircraft is dynamically spawned on a small airbase a few things can go wrong. For example, it could be spawned at a parking spot with a shelter.
-- Or it could be damaged by a scenery object when it is taxiing out to the runway, or it could overlap with other aircraft on parking spots near by.
--
@@ -2474,11 +2474,11 @@ end
-- @param #RAT self
-- @param #number takeoff Takeoff type. Could also be air start.
-- @param #number landing Landing type. Could also be a destination in air.
-- @param Wrapper.Airport#AIRBASE _departure (Optional) Departure airbase.
-- @param Wrapper.Airport#AIRBASE _destination (Optional) Destination airbase.
-- @param Wrapper.Airbase#AIRBASE _departure (Optional) Departure airbase.
-- @param Wrapper.Airbase#AIRBASE _destination (Optional) Destination airbase.
-- @param #table _waypoint Initial waypoint.
-- @return Wrapper.Airport#AIRBASE Departure airbase.
-- @return Wrapper.Airport#AIRBASE Destination airbase.
-- @return Wrapper.Airbase#AIRBASE Departure airbase.
-- @return Wrapper.Airbase#AIRBASE Destination airbase.
-- @return #table Table of flight plan waypoints.
-- @return #nil If no valid departure or destination airport could be found.
function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
@@ -3483,7 +3483,7 @@ function RAT:Status(message, forID)
-- Get group.
local group=ratcraft.group --Wrapper.Group#GROUP
if group and group:IsAlive() then
if group and group:IsAlive() and (group:GetCoordinate() or group:GetVec3()) then
nalive=nalive+1
-- Gather some information.
@@ -3491,8 +3491,11 @@ function RAT:Status(message, forID)
local life=self:_GetLife(group)
local fuel=group:GetFuel()*100.0
local airborne=group:InAir()
local coords=group:GetCoordinate()
local alt=coords.y or 1000
local coords=group:GetCoordinate() or group:GetVec3()
local alt=1000
if coords then
alt=coords.y or 1000
end
--local vel=group:GetVelocityKMH()
local departure=ratcraft.departure:GetName()
local destination=ratcraft.destination:GetName()
@@ -4602,7 +4605,7 @@ function RAT:_TaskHolding(P1, Altitude, Speed, Duration)
end
--- Function which is called after passing every waypoint. Info on waypoint is given and special functions are executed.
-- @param Core.Group#GROUP group Group of aircraft.
-- @param Wrapper.Group#GROUP group Group of aircraft.
-- @param #RAT rat RAT object.
-- @param #number wp Waypoint index. Running number of the waypoints. Determines the actions to be executed.
function RAT._WaypointFunction(group, rat, wp)
@@ -5490,7 +5493,7 @@ function RAT:_ATCInit(airports_map)
if not RAT.ATC.init then
local text
text="Starting RAT ATC.\nSimultanious = "..RAT.ATC.Nclearance.."\n".."Delay = "..RAT.ATC.delay
BASE:T(RAT.id..text)
BASE:T(RAT.id..text)
RAT.ATC.init=true
for _,ap in pairs(airports_map) do
local name=ap:GetName()
@@ -5671,9 +5674,9 @@ function RAT:_ATCClearForLanding(airport, flight)
-- Debug message.
local text1=string.format("ATC %s: Flight %s cleared for landing (flag=%d).", airport, flight, flagvalue)
if string.find(flight,"#") then
flight = string.match(flight,"^(.+)#")
end
if string.find(flight,"#") then
flight = string.match(flight,"^(.+)#")
end
local text2=string.format("ATC %s: Flight %s you are cleared for landing.", airport, flight)
BASE:T( RAT.id..text1)
MESSAGE:New(text2, 10):ToAllIf(RAT.ATC.messages)
@@ -5716,9 +5719,9 @@ function RAT:_ATCFlightLanded(name)
local text1=string.format("ATC %s: Flight %s landed. Tholding = %i:%02d, Tfinal = %i:%02d.", dest, name, Thold/60, Thold%60, Tfinal/60, Tfinal%60)
local text2=string.format("ATC %s: Number of flights still on final %d.", dest, RAT.ATC.airport[dest].Nonfinal)
local text3=string.format("ATC %s: Traffic report: Number of planes landed in total %d. Flights/hour = %3.2f.", dest, RAT.ATC.airport[dest].traffic, TrafficPerHour)
if string.find(name,"#") then
name = string.match(name,"^(.+)#")
end
if string.find(name,"#") then
name = string.match(name,"^(.+)#")
end
local text4=string.format("ATC %s: Flight %s landed. Welcome to %s.", dest, name, dest)
BASE:T(RAT.id..text1)
BASE:T(RAT.id..text2)
@@ -5832,6 +5835,7 @@ RATMANAGER={
rat={},
name={},
alive={},
planned={},
min={},
nrat=0,
ntot=nil,
@@ -5880,6 +5884,7 @@ function RATMANAGER:Add(ratobject,min)
self.rat[self.nrat]=ratobject
self.alive[self.nrat]=0
self.planned[self.nrat]=0
self.name[self.nrat]=ratobject.alias
self.min[self.nrat]=min or 1
@@ -6020,11 +6025,25 @@ function RATMANAGER:_Manage()
for i=1,self.nrat do
for j=1,N[i] do
time=time+self.dTspawn
SCHEDULER:New(nil, RAT._SpawnWithRoute, {self.rat[i]}, time)
self.planned[i]=self.planned[i]+1
SCHEDULER:New(nil, RATMANAGER._Spawn, {self, i}, time)
end
end
end
--- Instantly starts the RAT manager and spawns the initial random number RAT groups for each RAT object.
-- @param #RATMANAGER self
-- @param #RATMANAGER RATMANAGER self object.
-- @param #number i Index.
function RATMANAGER:_Spawn(i)
local rat=self.rat[i] --#RAT
rat:_SpawnWithRoute()
self.planned[i]=self.planned[i]-1
end
--- Counts the number of alive RAT objects.
-- @param #RATMANAGER self
function RATMANAGER:_Count()
@@ -6053,7 +6072,7 @@ function RATMANAGER:_Count()
ntotal=ntotal+n
-- Debug output.
local text=string.format("Number of alive groups of %s = %d", self.name[i], n)
local text=string.format("Number of alive groups of %s = %d, planned=%d", self.name[i], n, self.planned[i])
self:T(RATMANAGER.id..text)
end
@@ -6083,9 +6102,10 @@ function RATMANAGER:_RollDice(nrat,ntot,min,alive)
local M={}
local P={}
for i=1,nrat do
local a=alive[i]+self.planned[i]
N[#N+1]=0
M[#M+1]=math.max(alive[i], min[i])
P[#P+1]=math.max(min[i]-alive[i],0)
M[#M+1]=math.max(a, min[i])
P[#P+1]=math.max(min[i]-a,0)
end
-- Min/max group arrays.
@@ -6102,7 +6122,7 @@ function RATMANAGER:_RollDice(nrat,ntot,min,alive)
-- Number of new groups to be added.
local nnew=ntot
for i=1,nrat do
nnew=nnew-alive[i]
nnew=nnew-alive[i]-self.planned[i]
end
for i=1,nrat-1 do
@@ -6134,7 +6154,7 @@ function RATMANAGER:_RollDice(nrat,ntot,min,alive)
end
-- Debug info
self:T3(string.format("RATMANAGER: i=%d, alive=%d, min=%d, mini=%d, maxi=%d, add=%d, sumN=%d, sumP=%d", j, alive[j], min[j], mini[j], maxi[j], N[j],sN, sP))
self:T3(string.format("RATMANAGER: i=%d, alive=%d, planned=%d, min=%d, mini=%d, maxi=%d, add=%d, sumN=%d, sumP=%d", j, alive[j], self.planned[i], min[j], mini[j], maxi[j], N[j],sN, sP))
end
@@ -6149,7 +6169,7 @@ function RATMANAGER:_RollDice(nrat,ntot,min,alive)
-- Debug info
local text=RATMANAGER.id.."\n"
for i=1,nrat do
text=text..string.format("%s: i=%d, alive=%d, min=%d, mini=%d, maxi=%d, add=%d\n", self.name[i], i, alive[i], min[i], mini[i], maxi[i], N[i])
text=text..string.format("%s: i=%d, alive=%d, planned=%d, min=%d, mini=%d, maxi=%d, add=%d\n", self.name[i], i, alive[i], self.planned[i], min[i], mini[i], maxi[i], N[i])
end
text=text..string.format("Total # of groups to add = %d", sum(N, done))
self:T(text)

View File

@@ -4,7 +4,7 @@
--
-- The RANGE class enables easy set up of bombing and strafing ranges within DCS World.
--
-- Implementation is based on the [Simple Range Script](https://forums.eagle.ru/showthread.php?t=157991) by [Ciribob](https://forums.eagle.ru/member.php?u=112175), which itself was motivated
-- Implementation is based on the [Simple Range Script](https://forums.eagle.ru/showthread.php?t=157991) by Ciribob, which itself was motivated
-- by a script by SNAFU [see here](https://forums.eagle.ru/showthread.php?t=109174).
--
-- [476th - Air Weapons Range Objects mod](http://www.476vfightergroup.com/downloads.php?do=file&id=287) is highly recommended for this class.
@@ -42,9 +42,9 @@
--
-- ===
--
-- ### Author: **[funkyfranky](https://forums.eagle.ru/member.php?u=115026)**
-- ### Author: **funkyfranky**
--
-- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536), [Ciribob](https://forums.eagle.ru/member.php?u=112175)
-- ### Contributions: FlightControl, Ciribob
-- ### SRS Additions: Applevangelist
--
-- ===
@@ -105,6 +105,7 @@
-- @field Sound.SRS#MSRSQUEUE controlsrsQ SRS queue for range controller.
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
-- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor.
-- @field #number Coalition Coalition side for the menu, if any.
-- @extends Core.Fsm#FSM
--- *Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine.* - Ludwig van Beethoven
@@ -355,7 +356,8 @@ RANGE = {
targetsheet = nil,
targetpath = nil,
targetprefix = nil,
}
Coalition = nil,
}
--- Default range parameters.
-- @type RANGE.Defaults
@@ -591,7 +593,7 @@ RANGE.MenuF10Root = nil
--- Range script version.
-- @field #string version
RANGE.version = "2.7.0"
RANGE.version = "2.7.3"
-- TODO list:
-- TODO: Verbosity level for messages.
@@ -613,8 +615,9 @@ RANGE.version = "2.7.0"
--- RANGE contructor. Creates a new RANGE object.
-- @param #RANGE self
-- @param #string RangeName Name of the range. Has to be unique. Will we used to create F10 menu items etc.
-- @param #number Coalition (optional) Coalition of the range, if any, e.g. coalition.side.BLUE.
-- @return #RANGE RANGE object.
function RANGE:New( RangeName )
function RANGE:New( RangeName, Coalition )
-- Inherit BASE.
local self = BASE:Inherit( self, FSM:New() ) -- #RANGE
@@ -622,7 +625,9 @@ function RANGE:New( RangeName )
-- Get range name.
-- TODO: make sure that the range name is not given twice. This would lead to problems in the F10 radio menu.
self.rangename = RangeName or "Practice Range"
self.Coalition = Coalition
-- Log id.
self.lid = string.format( "RANGE %s | ", self.rangename )
@@ -1745,10 +1750,16 @@ function RANGE:OnEventBirth( EventData )
-- Reset current strafe status.
self.strafeStatus[_uid] = nil
-- Add Menu commands after a delay of 0.1 seconds.
self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName )
if self.Coalition then
if EventData.IniCoalition == self.Coalition then
self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName )
end
else
-- Add Menu commands after a delay of 0.1 seconds.
self:ScheduleOnce( 0.1, self._AddF10Commands, self, _unitName )
end
-- By default, some bomb impact points and do not flare each hit on target.
self.PlayerSettings[_playername] = {} -- #RANGE.PlayerData
self.PlayerSettings[_playername].smokebombimpact = self.defaultsmokebomb
@@ -2044,6 +2055,7 @@ function RANGE:OnEventShot( EventData )
-- Attack parameters.
local attackHdg=_unit:GetHeading()
local attackAlt=_unit:GetHeight()
attackAlt = UTILS.MetersToFeet(attackAlt)
local attackVel=_unit:GetVelocityKNOTS()
-- Tracking info and init of last bomb position.

View File

@@ -27,7 +27,7 @@
-- and creates a CSV file logging the scoring events and results for use at team or squadron websites.
--
-- SCORING automatically calculates the threat level of the objects hit and destroyed by players,
-- which can be @{Wrapper.Unit}, @{Static) and @{Scenery} objects.
-- which can be @{Wrapper.Unit}, @{Wrapper.Static) and @{Scenery} objects.
--
-- Positive score points are granted when enemy or neutral targets are destroyed.
-- Negative score points or penalties are given when a friendly target is hit or destroyed.
@@ -81,7 +81,7 @@
--
-- * **Wingthor (TAW)**: Testing & Advice.
-- * **Dutch-Baron (TAW)**: Testing & Advice.
-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing and Advice.
-- * **Whisper**: Testing and Advice.
--
-- ===
--
@@ -226,6 +226,7 @@ SCORING = {
ClassID = 0,
Players = {},
AutoSave = true,
version = "1.17.1"
}
local _SCORINGCoalition = {
@@ -659,7 +660,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + self.CoalitionChangePenalty or 50
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). ".. self.CoalitionChangePenalty .."Penalty points added.",
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). ".. self.CoalitionChangePenalty .." penalty points added.",
MESSAGE.Type.Information
):ToAll()
self:ScoreCSV( PlayerName, "", "COALITION_PENALTY", 1, -1*self.CoalitionChangePenalty, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
@@ -715,11 +716,11 @@ function SCORING:AddGoalScorePlayer( PlayerName, GoalTag, Text, Score )
PlayerData.Goals[GoalTag] = PlayerData.Goals[GoalTag] or { Score = 0 }
PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score
PlayerData.Score = PlayerData.Score + Score
MESSAGE:NewType( self.DisplayMessagePrefix .. Text,
MESSAGE.Type.Information )
:ToAll()
if Text then
MESSAGE:NewType( self.DisplayMessagePrefix .. Text,
MESSAGE.Type.Information )
:ToAll()
end
self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, nil )
end
end
@@ -738,7 +739,7 @@ function SCORING:AddGoalScore( PlayerUnit, GoalTag, Text, Score )
local PlayerName = PlayerUnit:GetPlayerName()
self:F( { PlayerUnit.UnitName, PlayerName, GoalTag, Text, Score } )
self:T2( { PlayerUnit.UnitName, PlayerName, GoalTag, Text, Score } )
-- PlayerName can be nil, if the Unit with the player crashed or due to another reason.
if PlayerName then
@@ -747,11 +748,12 @@ function SCORING:AddGoalScore( PlayerUnit, GoalTag, Text, Score )
PlayerData.Goals[GoalTag] = PlayerData.Goals[GoalTag] or { Score = 0 }
PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score
PlayerData.Score = PlayerData.Score + Score
MESSAGE:NewType( self.DisplayMessagePrefix .. Text,
if Text then
MESSAGE:NewType( self.DisplayMessagePrefix .. Text,
MESSAGE.Type.Information )
:ToAll()
end
self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, PlayerUnit:GetName() )
end
end
@@ -784,11 +786,12 @@ function SCORING:_AddMissionTaskScore( Mission, PlayerUnit, Text, Score )
PlayerData.Score = self.Players[PlayerName].Score + Score
PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
MESSAGE:NewType( self.DisplayMessagePrefix .. Mission:GetText() .. " : " .. Text .. " Score: " .. Score,
MESSAGE.Type.Information )
:ToAll()
if Text then
MESSAGE:NewType( self.DisplayMessagePrefix .. Mission:GetText() .. " : " .. Text .. " Score: " .. Score,
MESSAGE.Type.Information )
:ToAll()
end
self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:GetName() )
end
end
@@ -820,9 +823,11 @@ function SCORING:_AddMissionGoalScore( Mission, PlayerName, Text, Score )
PlayerData.Score = self.Players[PlayerName].Score + Score
PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, Mission:GetText(), Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll()
if Text then
MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, Mission:GetText(), Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll()
end
self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score )
end
end
@@ -847,11 +852,12 @@ function SCORING:_AddMissionScore( Mission, Text, Score )
PlayerData.Score = PlayerData.Score + Score
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in " .. Mission:GetText() .. ". " .. Score .. " mission score!",
if Text then
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in " .. Mission:GetText() .. ". " .. Score .. " mission score!",
MESSAGE.Type.Information )
:ToAll()
end
self:ScoreCSV( PlayerName, "", "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score )
end
end
@@ -1415,7 +1421,7 @@ function SCORING:ReportDetailedPlayerHits( PlayerName )
Penalty = Penalty + UnitData.Penalty
PenaltyHit = UnitData.PenaltyHit
end
local ScoreMessageHit = string.format( "%s:%d ", CategoryName, Score - Penalty )
local ScoreMessageHit = string.format( "%s: %d ", CategoryName, Score - Penalty )
self:T( ScoreMessageHit )
ScoreMessageHits = ScoreMessageHits .. ScoreMessageHit
PlayerScore = PlayerScore + Score
@@ -1471,7 +1477,7 @@ function SCORING:ReportDetailedPlayerDestroys( PlayerName )
end
end
local ScoreMessageDestroy = string.format( " %s:%d ", CategoryName, Score - Penalty )
local ScoreMessageDestroy = string.format( " %s: %d ", CategoryName, Score - Penalty )
self:T( ScoreMessageDestroy )
ScoreMessageDestroys = ScoreMessageDestroys .. ScoreMessageDestroy
@@ -1762,9 +1768,9 @@ function SCORING:SecondsToClock( sSeconds )
-- return nil;
return "00:00:00";
else
nHours = string.format( "%02.f", math.floor( nSeconds / 3600 ) );
nMins = string.format( "%02.f", math.floor( nSeconds / 60 - (nHours * 60) ) );
nSecs = string.format( "%02.f", math.floor( nSeconds - nHours * 3600 - nMins * 60 ) );
local nHours = string.format( "%02.f", math.floor( nSeconds / 3600 ) );
local nMins = string.format( "%02.f", math.floor( nSeconds / 60 - (nHours * 60) ) );
local nSecs = string.format( "%02.f", math.floor( nSeconds - nHours * 3600 - nMins * 60 ) );
return nHours .. ":" .. nMins .. ":" .. nSecs
end
end

View File

@@ -1,4 +1,4 @@
--- **Functional** - Make SAM sites execute evasive and defensive behaviour when being fired upon.
--- **Functional** - Make SAM sites evasive and execute defensive behaviour when being fired upon.
--
-- ===
--
@@ -19,7 +19,7 @@
--
-- ### Authors: **FlightControl**, **applevangelist**
--
-- Last Update: Feb 2022
-- Last Update: Oct 2023
--
-- ===
--
@@ -34,7 +34,7 @@
--
-- This class is very easy to use. Just setup a SEAD object by using @{#SEAD.New}() and SAMs will evade and take defensive action when being fired upon.
-- Once a HARM attack is detected, SEAD will shut down the radars of the attacked SAM site and take evasive action by moving the SAM
-- vehicles around (*if* they are drivable, that is). There's a component of randomness in detection and evasion, which is based on the
-- vehicles around (*if* they are driveable, that is). There's a component of randomness in detection and evasion, which is based on the
-- skill set of the SAM set (the higher the skill, the more likely). When a missile is fired from far away, the SAM will stay active for a
-- period of time to stay defensive, before it takes evasive actions.
--
@@ -66,7 +66,6 @@ SEAD = {
-- @field Harms
SEAD.Harms = {
["AGM_88"] = "AGM_88",
["AGM_45"] = "AGM_45",
["AGM_122"] = "AGM_122",
["AGM_84"] = "AGM_84",
["AGM_45"] = "AGM_45",
@@ -80,6 +79,7 @@ SEAD = {
["BGM_109"] = "BGM_109",
["AGM_154"] = "AGM_154",
["HY-2"] = "HY-2",
["ADM_141A"] = "ADM_141A",
}
--- Missile enumerators - from DCS ME and Wikipedia
@@ -100,6 +100,7 @@ SEAD = {
["BGM_109"] = {460, 0.705}, --in-game ~465kn
["AGM_154"] = {130, 0.61},
["HY-2"] = {90,1},
["ADM_141A"] = {126,0.6},
}
--- Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.
@@ -143,7 +144,7 @@ function SEAD:New( SEADGroupPrefixes, Padding )
self:AddTransition("*", "ManageEvasion", "*")
self:AddTransition("*", "CalculateHitZone", "*")
self:I("*** SEAD - Started Version 0.4.3")
self:I("*** SEAD - Started Version 0.4.5")
return self
end
@@ -203,7 +204,7 @@ function SEAD:SwitchEmissions(Switch)
return self
end
--- Add an object to call back when going evasive.
--- Set an object to call back when going evasive.
-- @param #SEAD self
-- @param #table Object The object to call. Needs to have object functions as follows:
-- `:SeadSuppressionPlanned(Group, Name, SuppressionStartTime, SuppressionEndTime)`
@@ -348,8 +349,9 @@ end
-- @param #string SEADWeaponName
-- @param Wrapper.Group#GROUP SEADGroup Attacker Group
-- @param #number timeoffset Offset for tti calc
-- @param Wrapper.Weapon#WEAPON Weapon
-- @return #SEAD self
function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,timeoffset)
function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,timeoffset,Weapon)
local timeoffset = timeoffset or 0
if _targetskill == "Random" then -- when skill is random, choose a skill
local Skills = { "Average", "Good", "High", "Excellent" }
@@ -369,9 +371,13 @@ function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADP
local reach = 10
if hit then
local wpndata = SEAD.HarmData[data]
reach = wpndata[1] * 1,1
reach = wpndata[1] * 1.1
local mach = wpndata[2]
wpnspeed = math.floor(mach * 340.29)
if Weapon then
wpnspeed = Weapon:GetSpeed()
self:T(string.format("*** SEAD - Weapon Speed from WEAPON: %f m/s",wpnspeed))
end
end
-- time to impact
local _tti = math.floor(_distance / wpnspeed) - timeoffset -- estimated impact time
@@ -405,7 +411,7 @@ function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADP
local function SuppressionStop(args)
self:T(string.format("*** SEAD - %s Radar On",args[2]))
local grp = args[1] -- Wrapper.Group#GROUP
local name = args[2] -- #string Group Nam
local name = args[2] -- #string Group Name
if self.UseEmissionsOnOff then
grp:EnableEmission(true)
end
@@ -424,7 +430,7 @@ function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADP
if _tti > 600 then delay = _tti - 90 end -- shot from afar, 600 is default shorad ontime
local SuppressionStartTime = timer.getTime() + delay
local SuppressionEndTime = timer.getTime() + _tti + self.Padding
local SuppressionEndTime = timer.getTime() + delay + _tti + self.Padding + delay
local _targetgroupname = _targetgroup:GetName()
if not self.SuppressedGroups[_targetgroupname] then
self:T(string.format("*** SEAD - %s | Parameters TTI %ds | Switch-Off in %ds",_targetgroupname,_tti,delay))
@@ -457,6 +463,9 @@ function SEAD:HandleEventShot( EventData )
local SEADWeapon = EventData.Weapon -- Identify the weapon fired
local SEADWeaponName = EventData.WeaponName -- return weapon type
local WeaponWrapper = WEAPON:New(EventData.Weapon)
--local SEADWeaponSpeed = WeaponWrapper:GetSpeed() -- mps
self:T( "*** SEAD - Missile Launched = " .. SEADWeaponName)
--self:T({ SEADWeapon })
@@ -475,7 +484,7 @@ function SEAD:HandleEventShot( EventData )
end
return self
end
local targetcat = _target:getCategory() -- Identify category
local targetcat = Object.getCategory(_target) -- Identify category
local _targetUnit = nil -- Wrapper.Unit#UNIT
local _targetgroup = nil -- Wrapper.Group#GROUP
self:T(string.format("*** Targetcat = %d",targetcat))
@@ -513,7 +522,11 @@ function SEAD:HandleEventShot( EventData )
end
end
if SEADGroupFound == true then -- yes we are being attacked
self:ManageEvasion(_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup)
if string.find(SEADWeaponName,"ADM_141",1,true) then
self:__ManageEvasion(2,_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,0,WeaponWrapper)
else
self:ManageEvasion(_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,0,WeaponWrapper)
end
end
end
return self

View File

@@ -21,6 +21,7 @@
-- @image Functional.Shorad.jpg
--
-- Date: Nov 2021
-- Last Update: Nov 2023
-------------------------------------------------------------------------
--- **SHORAD** class, extends Core.Base#BASE
@@ -39,8 +40,11 @@
-- @field #boolean DefendHarms Default true, intercept incoming HARMS
-- @field #boolean DefendMavs Default true, intercept incoming AG-Missiles
-- @field #number DefenseLowProb Default 70, minimum detection limit
-- @field #number DefenseHighProb Default 90, maximim detection limit
-- @field #number DefenseHighProb Default 90, maximum detection limit
-- @field #boolean UseEmOnOff Decide if we are using Emission on/off (default) or AlarmState red/green.
-- @field #boolean shootandscoot
-- @field #number SkateNumber
-- @field Core.Set#SET_ZONE SkateZones
-- @extends Core.Base#BASE
@@ -99,7 +103,10 @@ SHORAD = {
DefendMavs = true,
DefenseLowProb = 70,
DefenseHighProb = 90,
UseEmOnOff = false,
UseEmOnOff = true,
shootandscoot = false,
SkateNumber = 3,
SkateZones = nil,
}
-----------------------------------------------------------------------
@@ -112,7 +119,6 @@ do
-- @field Harms
SHORAD.Harms = {
["AGM_88"] = "AGM_88",
["AGM_45"] = "AGM_45",
["AGM_122"] = "AGM_122",
["AGM_84"] = "AGM_84",
["AGM_45"] = "AGM_45",
@@ -123,6 +129,8 @@ do
["X_25"] = "X_25",
["X_31"] = "X_31",
["Kh25"] = "Kh25",
["HY-2"] = "HY-2",
["ADM_141A"] = "ADM_141A",
}
--- TODO complete list?
@@ -134,7 +142,6 @@ do
["Kh29"] = "Kh29",
["Kh31"] = "Kh31",
["Kh66"] = "Kh66",
--["BGM_109"] = "BGM_109",
}
--- Instantiates a new SHORAD object
@@ -146,7 +153,7 @@ do
-- @param #number ActiveTimer Determines how many seconds the systems stay on red alert after wake-up call
-- @param #string Coalition Coalition, i.e. "blue", "red", or "neutral"
-- @param #boolean UseEmOnOff Use Emissions On/Off rather than Alarm State Red/Green (default: use Emissions switch)
-- @retunr #SHORAD self
-- @return #SHORAD self
function SHORAD:New(Name, ShoradPrefix, Samset, Radius, ActiveTimer, Coalition, UseEmOnOff)
local self = BASE:Inherit( self, FSM:New() )
self:T({Name, ShoradPrefix, Samset, Radius, ActiveTimer, Coalition})
@@ -165,8 +172,9 @@ do
self.DefendMavs = true
self.DefenseLowProb = 70 -- probability to detect a missile shot, low margin
self.DefenseHighProb = 90 -- probability to detect a missile shot, high margin
self.UseEmOnOff = UseEmOnOff or false -- Decide if we are using Emission on/off (default) or AlarmState red/green
self:I("*** SHORAD - Started Version 0.3.1")
self.UseEmOnOff = true -- Decide if we are using Emission on/off (default) or AlarmState red/green
if UseEmOnOff == false then self.UseEmOnOff = UseEmOnOff end
self:I("*** SHORAD - Started Version 0.3.2")
-- Set the string id for output to DCS.log file.
self.lid=string.format("SHORAD %s | ", self.name)
self:_InitState()
@@ -176,12 +184,14 @@ do
self:SetStartState("Running")
self:AddTransition("*", "WakeUpShorad", "*")
self:AddTransition("*", "CalculateHitZone", "*")
self:AddTransition("*", "ShootAndScoot", "*")
return self
end
--- Initially set all groups to alarm state GREEN
-- @param #SHORAD self
-- @return #SHORAD self
function SHORAD:_InitState()
self:T(self.lid .. " _InitState")
local table = {}
@@ -205,21 +215,36 @@ do
return self
end
--- Add a SET_ZONE of zones for Shoot&Scoot
-- @param #SHORAD self
-- @param Core.Set#SET_ZONE ZoneSet Set of zones to be used. Units will move around to the next (random) zone between 100m and 3000m away.
-- @param #number Number Number of closest zones to be considered, defaults to 3.
-- @return #SHORAD self
function SHORAD:AddScootZones(ZoneSet, Number)
self:T(self.lid .. " AddScootZones")
self.SkateZones = ZoneSet
self.SkateNumber = Number or 3
self.shootandscoot = true
return self
end
--- Switch debug state on
-- @param #SHORAD self
-- @param #boolean debug Switch debug on (true) or off (false)
-- @return #SHORAD self
function SHORAD:SwitchDebug(onoff)
self:T( { onoff } )
if onoff then
self:SwitchDebugOn()
else
self.SwitchDebugOff()
self:SwitchDebugOff()
end
return self
end
--- Switch debug state on
-- @param #SHORAD self
-- @return #SHORAD self
function SHORAD:SwitchDebugOn()
self.debug = true
--tracing
@@ -230,6 +255,7 @@ do
--- Switch debug state off
-- @param #SHORAD self
-- @return #SHORAD self
function SHORAD:SwitchDebugOff()
self.debug = false
BASE:TraceOff()
@@ -239,6 +265,7 @@ do
--- Switch defense for HARMs
-- @param #SHORAD self
-- @param #boolean onoff
-- @return #SHORAD self
function SHORAD:SwitchHARMDefense(onoff)
self:T( { onoff } )
local onoff = onoff or true
@@ -249,6 +276,7 @@ do
--- Switch defense for AGMs
-- @param #SHORAD self
-- @param #boolean onoff
-- @return #SHORAD self
function SHORAD:SwitchAGMDefense(onoff)
self:T( { onoff } )
local onoff = onoff or true
@@ -260,6 +288,7 @@ do
-- @param #SHORAD self
-- @param #number low Minimum detection limit, integer 1-100
-- @param #number high Maximum detection limit integer 1-100
-- @return #SHORAD self
function SHORAD:SetDefenseLimits(low,high)
self:T( { low, high } )
local low = low or 70
@@ -278,6 +307,7 @@ do
--- Set the number of seconds a SHORAD site will stay active
-- @param #SHORAD self
-- @param #number seconds Number of seconds systems stay active
-- @return #SHORAD self
function SHORAD:SetActiveTimer(seconds)
self:T(self.lid .. " SetActiveTimer")
local timer = seconds or 600
@@ -291,6 +321,7 @@ do
--- Set the number of meters for the SHORAD defense zone
-- @param #SHORAD self
-- @param #number meters Radius of the defense search zone in meters. #SHORADs in this range around a targeted group will go active
-- @return #SHORAD self
function SHORAD:SetDefenseRadius(meters)
self:T(self.lid .. " SetDefenseRadius")
local radius = meters or 20000
@@ -304,6 +335,7 @@ do
--- Set using Emission on/off instead of changing alarm state
-- @param #SHORAD self
-- @param #boolean switch Decide if we are changing alarm state or AI state
-- @return #SHORAD self
function SHORAD:SetUsingEmOnOff(switch)
self:T(self.lid .. " SetUsingEmOnOff")
self.UseEmOnOff = switch or false
@@ -375,11 +407,11 @@ do
local shorad = self.Groupset
local shoradset = shorad:GetAliveSet() --#table
local returnname = false
--local TDiff = 1
for _,_groups in pairs (shoradset) do
local groupname = _groups:GetName()
if string.find(groupname, tgtgrp, 1, true) then
returnname = true
--_groups:RelocateGroundRandomInRadius(7,100,false,false) -- be a bit evasive
end
end
return returnname
@@ -426,6 +458,7 @@ do
-- @param #number Radius Radius of the #ZONE
-- @param #number ActiveTimer Number of seconds to stay active
-- @param #number TargetCat (optional) Category, i.e. Object.Category.UNIT or Object.Category.STATIC
-- @return #SHORAD self
-- @usage Use this function to integrate with other systems, example
--
-- local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart()
@@ -452,28 +485,35 @@ do
local targetzone = ZONE_RADIUS:New("Shorad",targetvec2,Radius) -- create a defense zone to check
local groupset = self.Groupset --Core.Set#SET_GROUP
local shoradset = groupset:GetAliveSet() --#table
-- local function to switch off shorad again
local function SleepShorad(group)
local groupname = group:GetName()
self.ActiveGroups[groupname] = nil
if self.UseEmOnOff then
group:EnableEmission(false)
--group:SetAIOff()
else
group:OptionAlarmStateGreen()
if group and group:IsAlive() then
local groupname = group:GetName()
self.ActiveGroups[groupname] = nil
if self.UseEmOnOff then
group:EnableEmission(false)
else
group:OptionAlarmStateGreen()
end
local text = string.format("Sleeping SHORAD %s", group:GetName())
self:T(text)
local m = MESSAGE:New(text,10,"SHORAD"):ToAllIf(self.debug)
--Shoot and Scoot
if self.shootandscoot then
self:__ShootAndScoot(1,group)
end
end
local text = string.format("Sleeping SHORAD %s", group:GetName())
self:T(text)
local m = MESSAGE:New(text,10,"SHORAD"):ToAllIf(self.debug)
end
-- go through set and find the one(s) to activate
local TDiff = 4
for _,_group in pairs (shoradset) do
if _group:IsAnyInZone(targetzone) then
local text = string.format("Waking up SHORAD %s", _group:GetName())
self:T(text)
local m = MESSAGE:New(text,10,"SHORAD"):ToAllIf(self.debug)
if self.UseEmOnOff then
--_group:SetAIOn()
_group:EnableEmission(true)
end
_group:OptionAlarmStateRed()
@@ -481,91 +521,128 @@ do
if self.ActiveGroups[groupname] == nil then -- no timer yet for this group
self.ActiveGroups[groupname] = { Timing = ActiveTimer }
local endtime = timer.getTime() + (ActiveTimer * math.random(75,100) / 100 ) -- randomize wakeup a bit
timer.scheduleFunction(SleepShorad, _group, endtime)
self.ActiveGroups[groupname].Timer = TIMER:New(SleepShorad,_group):Start(endtime)
--Shoot and Scoot
if self.shootandscoot then
self:__ShootAndScoot(TDiff,_group)
TDiff=TDiff+1
end
end
end
end
return self
end
--- (Internal) Calculate hit zone of an AGM-88
-- @param #SHORAD self
-- @param #table SEADWeapon DCS.Weapon object
-- @param Core.Point#COORDINATE pos0 Position of the plane when it fired
-- @param #number height Height when the missile was fired
-- @param Wrapper.Group#GROUP SEADGroup Attacker group
-- @return #SHORAD self
function SHORAD:onafterCalculateHitZone(From,Event,To,SEADWeapon,pos0,height,SEADGroup)
self:T("**** Calculating hit zone")
if SEADWeapon and SEADWeapon:isExist() then
--local pos = SEADWeapon:getPoint()
--- (Internal) Calculate hit zone of an AGM-88
-- @param #SHORAD self
-- @param #table SEADWeapon DCS.Weapon object
-- @param Core.Point#COORDINATE pos0 Position of the plane when it fired
-- @param #number height Height when the missile was fired
-- @param Wrapper.Group#GROUP SEADGroup Attacker group
-- @return #SHORAD self
function SHORAD:onafterCalculateHitZone(From,Event,To,SEADWeapon,pos0,height,SEADGroup)
self:T("**** Calculating hit zone")
if SEADWeapon and SEADWeapon:isExist() then
--local pos = SEADWeapon:getPoint()
-- postion and height
local position = SEADWeapon:getPosition()
local mheight = height
-- heading
local wph = math.atan2(position.x.z, position.x.x)
if wph < 0 then
wph=wph+2*math.pi
end
wph=math.deg(wph)
-- velocity
local wpndata = SEAD.HarmData["AGM_88"]
local mveloc = math.floor(wpndata[2] * 340.29)
local c1 = (2*mheight*9.81)/(mveloc^2)
local c2 = (mveloc^2) / 9.81
local Ropt = c2 * math.sqrt(c1+1)
if height <= 5000 then
Ropt = Ropt * 0.72
elseif height <= 7500 then
Ropt = Ropt * 0.82
elseif height <= 10000 then
Ropt = Ropt * 0.87
elseif height <= 12500 then
Ropt = Ropt * 0.98
end
-- look at a couple of zones across the trajectory
for n=1,3 do
local dist = Ropt - ((n-1)*20000)
local predpos= pos0:Translate(dist,wph)
if predpos then
-- postion and height
local position = SEADWeapon:getPosition()
local mheight = height
-- heading
local wph = math.atan2(position.x.z, position.x.x)
if wph < 0 then
wph=wph+2*math.pi
end
wph=math.deg(wph)
-- velocity
local wpndata = SEAD.HarmData["AGM_88"]
local mveloc = math.floor(wpndata[2] * 340.29)
local c1 = (2*mheight*9.81)/(mveloc^2)
local c2 = (mveloc^2) / 9.81
local Ropt = c2 * math.sqrt(c1+1)
if height <= 5000 then
Ropt = Ropt * 0.72
elseif height <= 7500 then
Ropt = Ropt * 0.82
elseif height <= 10000 then
Ropt = Ropt * 0.87
elseif height <= 12500 then
Ropt = Ropt * 0.98
local targetzone = ZONE_RADIUS:New("Target Zone",predpos:GetVec2(),20000)
if self.debug then
predpos:MarkToAll(string.format("height=%dm | heading=%d | velocity=%ddeg | Ropt=%dm",mheight,wph,mveloc,Ropt),false)
targetzone:DrawZone(coalition.side.BLUE,{0,0,1},0.2,nil,nil,3,true)
end
local seadset = self.Groupset
local tgtcoord = targetzone:GetRandomPointVec2()
local tgtgrp = seadset:FindNearestGroupFromPointVec2(tgtcoord)
local _targetgroup = nil
local _targetgroupname = "none"
local _targetskill = "Random"
if tgtgrp and tgtgrp:IsAlive() then
_targetgroup = tgtgrp
_targetgroupname = tgtgrp:GetName() -- group name
_targetskill = tgtgrp:GetUnit(1):GetSkill()
self:T("*** Found Target = ".. _targetgroupname)
self:WakeUpShorad(_targetgroupname, self.Radius, self.ActiveTimer, Object.Category.UNIT)
end
end
end
end
-- look at a couple of zones across the trajectory
for n=1,3 do
local dist = Ropt - ((n-1)*20000)
local predpos= pos0:Translate(dist,wph)
if predpos then
return self
end
local targetzone = ZONE_RADIUS:New("Target Zone",predpos:GetVec2(),20000)
if self.debug then
predpos:MarkToAll(string.format("height=%dm | heading=%d | velocity=%ddeg | Ropt=%dm",mheight,wph,mveloc,Ropt),false)
targetzone:DrawZone(coalition.side.BLUE,{0,0,1},0.2,nil,nil,3,true)
end
local seadset = self.Groupset
local tgtcoord = targetzone:GetRandomPointVec2()
local tgtgrp = seadset:FindNearestGroupFromPointVec2(tgtcoord)
local _targetgroup = nil
local _targetgroupname = "none"
local _targetskill = "Random"
if tgtgrp and tgtgrp:IsAlive() then
_targetgroup = tgtgrp
_targetgroupname = tgtgrp:GetName() -- group name
_targetskill = tgtgrp:GetUnit(1):GetSkill()
self:T("*** Found Target = ".. _targetgroupname)
self:WakeUpShorad(_targetgroupname, self.Radius, self.ActiveTimer, Object.Category.UNIT)
--- (Internal) Shoot and Scoot
-- @param #SHORAD self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param Wrapper.Group#GROUP Shorad Shorad group
-- @return #SHORAD self
function SHORAD:onafterShootAndScoot(From,Event,To,Shorad)
self:T( { From,Event,To } )
local possibleZones = {}
local mindist = 100
local maxdist = 3000
if Shorad and Shorad:IsAlive() then
local NowCoord = Shorad:GetCoordinate()
for _,_zone in pairs(self.SkateZones.Set) do
local zone = _zone -- Core.Zone#ZONE_RADIUS
local dist = NowCoord:Get2DDistance(zone:GetCoordinate())
if dist >= mindist and dist <= maxdist then
possibleZones[#possibleZones+1] = zone
if #possibleZones == self.SkateNumber then break end
end
end
end
if #possibleZones > 0 and Shorad:GetVelocityKMH() < 2 then
local rand = math.floor(math.random(1,#possibleZones*1000)/1000+0.5)
if rand == 0 then rand = 1 end
self:T(self.lid .. " ShootAndScoot to zone "..rand)
local ToCoordinate = possibleZones[rand]:GetCoordinate()
Shorad:RouteGroundTo(ToCoordinate,20,"Cone",1)
end
end
return self
end
return self
end
--- Main function - work on the EventData
-- @param #SHORAD self
-- @param Core.Event#EVENTDATA EventData The event details table data set
-- @return #SHORAD self
function SHORAD:HandleEventShot( EventData )
self:T( { EventData } )
self:T(self.lid .. " HandleEventShot")
--local ShootingUnit = EventData.IniDCSUnit
--local ShootingUnitName = EventData.IniDCSUnitName
local ShootingWeapon = EventData.Weapon -- Identify the weapon fired
local ShootingWeaponName = EventData.WeaponName -- return weapon type
-- get firing coalition
@@ -596,27 +673,18 @@ end
return self
end
local targetcat = targetdata:getCategory() -- Identify category
local targetcat = Object.getCategory(targetdata) -- Identify category
self:T(string.format("Target Category (3=STATIC, 1=UNIT)= %s",tostring(targetcat)))
self:T({targetdata})
local targetunit = nil
if targetcat == Object.Category.UNIT then -- UNIT
targetunit = UNIT:Find(targetdata)
elseif targetcat == Object.Category.STATIC then -- STATIC
--self:T("Static Target Data")
--self:T({targetdata:isExist()})
--self:T({targetdata:getPoint()})
local tgtcoord = COORDINATE:NewFromVec3(targetdata:getPoint())
--tgtcoord:MarkToAll("Missile Target",true)
local tgtgrp1 = self.Samset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtgrp1 = self.Samset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord1 = tgtgrp1:GetCoordinate()
--tgtcoord1:MarkToAll("Close target SAM",true)
local tgtgrp2 = self.Groupset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord2 = tgtgrp2:GetCoordinate()
--tgtcoord2:MarkToAll("Close target SHORAD",true)
local dist1 = tgtcoord:Get2DDistance(tgtcoord1)
local dist2 = tgtcoord:Get2DDistance(tgtcoord2)
@@ -628,10 +696,8 @@ end
targetcat = Object.Category.UNIT
end
end
--local targetunitname = Unit.getName(targetdata) -- Unit name
if targetunit and targetunit:IsAlive() then
local targetunitname = targetunit:GetName()
--local targetgroup = Unit.getGroup(Weapon.getTarget(ShootingWeapon)) --targeted group
local targetgroup = nil
local targetgroupname = "none"
if targetcat == Object.Category.UNIT then
@@ -649,7 +715,6 @@ end
self:T( text )
local m = MESSAGE:New(text,10,"Info"):ToAllIf(self.debug)
-- check if we or a SAM site are the target
--local TargetGroup = EventData.TgtGroup -- Wrapper.Group#GROUP
local shotatus = self:_CheckShotAtShorad(targetgroupname) --#boolean
local shotatsams = self:_CheckShotAtSams(targetgroupname) --#boolean
-- if being shot at, find closest SHORADs to activate

View File

@@ -33,9 +33,9 @@
--
-- ===
--
-- ### Author: **[funkyfranky](https://forums.eagle.ru/member.php?u=115026)**
-- ### Author: **funkyfranky**
--
-- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536)
-- ### Contributions: FlightControl
--
-- ===
--

View File

@@ -742,7 +742,7 @@
--
-- ## Save Assets
--
-- Saving asset data to file is achieved by the @{WAREHOUSE.Save}(*path*, *filename*) function. The parameter *path* specifies the path on the file system where the
-- Saving asset data to file is achieved by the @{#WAREHOUSE.Save}(*path*, *filename*) function. The parameter *path* specifies the path on the file system where the
-- warehouse data is saved. If you do not specify a path, the file is saved your the DCS installation root directory.
-- The parameter *filename* is optional and defines the name of the saved file. By default this is automatically created from the warehouse id and name, for example
-- "Warehouse-1234_Batumi.txt".
@@ -753,13 +753,13 @@
--
-- ### Automatic Save at Mission End
--
-- The assets can be saved automatically when the mission is ended via the @{WAREHOUSE.SetSaveOnMissionEnd}(*path*, *filename*) function, i.e.
-- The assets can be saved automatically when the mission is ended via the @{#WAREHOUSE.SetSaveOnMissionEnd}(*path*, *filename*) function, i.e.
--
-- warehouseBatumi:SetSaveOnMissionEnd("D:\\My Warehouse Data\\")
--
-- ## Load Assets
--
-- Loading assets data from file is achieved by the @{WAREHOUSE.Load}(*path*, *filename*) function. The parameter *path* specifies the path on the file system where the
-- Loading assets data from file is achieved by the @{#WAREHOUSE.Load}(*path*, *filename*) function. The parameter *path* specifies the path on the file system where the
-- warehouse data is loaded from. If you do not specify a path, the file is loaded from your the DCS installation root directory.
-- The parameter *filename* is optional and defines the name of the file to load. By default this is automatically generated from the warehouse id and name, for example
-- "Warehouse-1234_Batumi.txt".
@@ -3616,9 +3616,10 @@ function WAREHOUSE:onafterStatus(From, Event, To)
end
-- Print queue after processing requests.
self:_PrintQueue(self.queue, "Queue waiting")
self:_PrintQueue(self.pending, "Queue pending")
if self.verbosity > 2 then
self:_PrintQueue(self.queue, "Queue waiting")
self:_PrintQueue(self.pending, "Queue pending")
end
-- Check fuel for all assets.
--self:_CheckFuel()
@@ -4101,9 +4102,9 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
-- Get the size of an object.
local function _GetObjectSize(DCSdesc)
if DCSdesc.box then
local x=DCSdesc.box.max.x+math.abs(DCSdesc.box.min.x) --length
local y=DCSdesc.box.max.y+math.abs(DCSdesc.box.min.y) --height
local z=DCSdesc.box.max.z+math.abs(DCSdesc.box.min.z) --width
local x=DCSdesc.box.max.x-DCSdesc.box.min.x --length
local y=DCSdesc.box.max.y-DCSdesc.box.min.y --height
local z=DCSdesc.box.max.z-DCSdesc.box.min.z --width
return math.max(x,z), x , y, z
end
return 0,0,0,0
@@ -5498,8 +5499,13 @@ function WAREHOUSE:onafterAssetDead(From, Event, To, asset, request)
---
-- Remove dead group from cargo group set.
request.cargogroupset:Remove(groupname, NoTriggerEvent)
self:T(self.lid..string.format("Removed selfpropelled cargo %s: ncargo=%d.", groupname, request.cargogroupset:Count()))
if request.cargogroupset then
-- cargogroupset was nil for user case. Difficult to reproduce so we add a nil check.
request.cargogroupset:Remove(groupname, NoTriggerEvent)
self:T(self.lid..string.format("Removed selfpropelled cargo %s: ncargo=%d.", groupname, request.cargogroupset:Count()))
else
self:E(self.lid..string.format("ERROR: cargogroupset is nil for request ID=%s!", tostring(request.uid)))
end
else
@@ -6671,7 +6677,13 @@ function WAREHOUSE:_OnEventCrashOrDead(EventData)
self:Destroyed()
end
if self.airbase and self.airbasename and self.airbasename==EventData.IniUnitName then
self:RunwayDestroyed()
if self:IsRunwayOperational() then
-- Trigger RunwayDestroyed event (only if it is not destroyed already)
self:RunwayDestroyed()
else
-- Reset the time stamp.
self.runwaydestroyed=timer.getAbsTime()
end
end
end
@@ -6761,7 +6773,7 @@ function WAREHOUSE:_UnitDead(deadunit, deadgroup, request)
-- Dont trigger a Remove event for the group sets.
local NoTriggerEvent=true
if not request.transporttype==WAREHOUSE.TransportType.SELFPROPELLED then
if request.transporttype~=WAREHOUSE.TransportType.SELFPROPELLED then
---
-- Complicated case: Dead unit could be:
@@ -7858,7 +7870,7 @@ function WAREHOUSE:_GetTerminal(_attribute, _category)
-- Default terminal is "large".
local _terminal=AIRBASE.TerminalType.OpenBig
if _attribute==WAREHOUSE.Attribute.AIR_FIGHTER then
if _attribute==WAREHOUSE.Attribute.AIR_FIGHTER or _attribute==WAREHOUSE.Attribute.AIR_UAV then
-- Fighter ==> small.
_terminal=AIRBASE.TerminalType.FighterAircraft
elseif _attribute==WAREHOUSE.Attribute.AIR_BOMBER or _attribute==WAREHOUSE.Attribute.AIR_TRANSPORTPLANE or _attribute==WAREHOUSE.Attribute.AIR_TANKER or _attribute==WAREHOUSE.Attribute.AIR_AWACS then
@@ -8223,7 +8235,7 @@ end
-- @return #number Request ID.
function WAREHOUSE:_GetIDsFromGroupName(groupname)
---@param #string text The text to analyse.
-- @param #string text The text to analyse.
local function analyse(text)
-- Get rid of #0001 tail from spawn.

View File

@@ -363,8 +363,8 @@ do -- ZONE_CAPTURE_COALITION
--- ZONE_CAPTURE_COALITION Constructor.
-- @param #ZONE_CAPTURE_COALITION self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved. Alternatively, can be handed as the name of late activated group describing a @{ZONE_POLYGON} with its waypoints.
-- @param DCSCoalition.DCSCoalition#coalition Coalition The initial coalition owning the zone.
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved. Alternatively, can be handed as the name of late activated group describing a @{Core.Zone#ZONE_POLYGON} with its waypoints.
-- @param #number Coalition The initial coalition owning the zone.
-- @param #table UnitCategories Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @param #table ObjectCategories Table of unit categories. See [DCS Class Object](https://wiki.hoggitworld.com/view/DCS_Class_Object). Default {Object.Category.UNIT, Object.Category.STATIC}, i.e. all UNITS and STATICS.
-- @return #ZONE_CAPTURE_COALITION

View File

@@ -4,7 +4,12 @@
--
-- ZONE_GOAL_CARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.
-- Derived classes implement the ways how the achievements can be realized.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Author: **FlightControl**
@@ -56,7 +61,7 @@ do -- ZoneGoal
--- ZONE_GOAL_CARGO Constructor.
-- @param #ZONE_GOAL_CARGO self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved.
-- @param DCSCoalition.DCSCoalition#coalition Coalition The initial coalition owning the zone.
-- @param #number Coalition The initial coalition owning the zone.
-- @return #ZONE_GOAL_CARGO
function ZONE_GOAL_CARGO:New( Zone, Coalition )
@@ -254,7 +259,7 @@ do -- ZoneGoal
--- Set the owning coalition of the zone.
-- @param #ZONE_GOAL_CARGO self
-- @param DCSCoalition.DCSCoalition#coalition Coalition
-- @param #number Coalition
function ZONE_GOAL_CARGO:SetCoalition( Coalition )
self.Coalition = Coalition
end
@@ -262,7 +267,7 @@ do -- ZoneGoal
--- Get the owning coalition of the zone.
-- @param #ZONE_GOAL_CARGO self
-- @return DCSCoalition.DCSCoalition#coalition Coalition.
-- @return #number Coalition.
function ZONE_GOAL_CARGO:GetCoalition()
return self.Coalition
end

View File

@@ -1,4 +1,4 @@
--- **Functional** - Base class that models processes to achieve goals involving a Zone for a Coalition.
--- **Functional (WIP)** - Base class modeling processes to achieve goals involving coalition zones.
--
-- ===
--
@@ -54,7 +54,7 @@ do -- ZoneGoal
--- ZONE_GOAL_COALITION Constructor.
-- @param #ZONE_GOAL_COALITION self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved.
-- @param DCSCoalition.DCSCoalition#coalition Coalition The initial coalition owning the zone. Default coalition.side.NEUTRAL.
-- @param #number Coalition The initial coalition owning the zone. Default coalition.side.NEUTRAL.
-- @param #table UnitCategories Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @return #ZONE_GOAL_COALITION
function ZONE_GOAL_COALITION:New( Zone, Coalition, UnitCategories )
@@ -80,7 +80,7 @@ do -- ZoneGoal
--- Set the owning coalition of the zone.
-- @param #ZONE_GOAL_COALITION self
-- @param DCSCoalition.DCSCoalition#coalition Coalition The coalition ID, e.g. *coalition.side.RED*.
-- @param #number Coalition The coalition ID, e.g. *coalition.side.RED*.
-- @return #ZONE_GOAL_COALITION
function ZONE_GOAL_COALITION:SetCoalition( Coalition )
self.PreviousCoalition = self.Coalition or Coalition
@@ -120,14 +120,14 @@ do -- ZoneGoal
--- Get the owning coalition of the zone.
-- @param #ZONE_GOAL_COALITION self
-- @return DCSCoalition.DCSCoalition#coalition Coalition.
-- @return #number Coalition.
function ZONE_GOAL_COALITION:GetCoalition()
return self.Coalition
end
--- Get the previous coalition, i.e. the one owning the zone before the current one.
-- @param #ZONE_GOAL_COALITION self
-- @return DCSCoalition.DCSCoalition#coalition Coalition.
-- @return #number Coalition.
function ZONE_GOAL_COALITION:GetPreviousCoalition()
return self.PreviousCoalition
end

View File

@@ -1,53 +1,55 @@
__Moose.Include( 'Scripts/Moose/Utilities/Enums.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Routines.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Utils.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Profiler.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Templates.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/STTS.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/FiFo.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Profiler.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Socket.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/STTS.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Templates.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Utils.lua' )
__Moose.Include( 'Scripts/Moose/Core/Base.lua' )
__Moose.Include( 'Scripts/Moose/Core/Astar.lua' )
__Moose.Include( 'Scripts/Moose/Core/Beacon.lua' )
__Moose.Include( 'Scripts/Moose/Core/Condition.lua' )
__Moose.Include( 'Scripts/Moose/Core/UserFlag.lua' )
__Moose.Include( 'Scripts/Moose/Core/Report.lua' )
__Moose.Include( 'Scripts/Moose/Core/Scheduler.lua' )
__Moose.Include( 'Scripts/Moose/Core/ScheduleDispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Core/Event.lua' )
__Moose.Include( 'Scripts/Moose/Core/Settings.lua' )
__Moose.Include( 'Scripts/Moose/Core/Menu.lua' )
__Moose.Include( 'Scripts/Moose/Core/Zone.lua' )
__Moose.Include( 'Scripts/Moose/Core/Zone_Detection.lua' )
__Moose.Include( 'Scripts/Moose/Core/ClientMenu.lua')
__Moose.Include( 'Scripts/Moose/Core/Database.lua' )
__Moose.Include( 'Scripts/Moose/Core/Set.lua' )
__Moose.Include( 'Scripts/Moose/Core/Point.lua' )
__Moose.Include( 'Scripts/Moose/Core/Velocity.lua' )
__Moose.Include( 'Scripts/Moose/Core/Message.lua' )
__Moose.Include( 'Scripts/Moose/Core/Event.lua' )
__Moose.Include( 'Scripts/Moose/Core/Fsm.lua' )
__Moose.Include( 'Scripts/Moose/Core/Goal.lua' )
__Moose.Include( 'Scripts/Moose/Core/MarkerOps_Base.lua' )
__Moose.Include( 'Scripts/Moose/Core/Menu.lua' )
__Moose.Include( 'Scripts/Moose/Core/Message.lua' )
__Moose.Include( 'Scripts/Moose/Core/Point.lua' )
__Moose.Include( 'Scripts/Moose/Core/Report.lua' )
__Moose.Include( 'Scripts/Moose/Core/ScheduleDispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Core/Scheduler.lua' )
__Moose.Include( 'Scripts/Moose/Core/Set.lua' )
__Moose.Include( 'Scripts/Moose/Core/Settings.lua' )
__Moose.Include( 'Scripts/Moose/Core/Spawn.lua' )
__Moose.Include( 'Scripts/Moose/Core/SpawnStatic.lua' )
__Moose.Include( 'Scripts/Moose/Core/Timer.lua' )
__Moose.Include( 'Scripts/Moose/Core/Goal.lua' )
__Moose.Include( 'Scripts/Moose/Core/Spot.lua' )
__Moose.Include( 'Scripts/Moose/Core/MarkerOps_Base.lua' )
__Moose.Include( 'Scripts/Moose/Core/TextAndSound.lua' )
__Moose.Include( 'Scripts/Moose/Core/Timer.lua' )
__Moose.Include( 'Scripts/Moose/Core/UserFlag.lua' )
__Moose.Include( 'Scripts/Moose/Core/Velocity.lua' )
__Moose.Include( 'Scripts/Moose/Core/Zone_Detection.lua' )
__Moose.Include( 'Scripts/Moose/Core/Zone.lua' )
__Moose.Include( 'Scripts/Moose/Core/Pathline.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Object.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Identifiable.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Positionable.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Airbase.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Client.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Controllable.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Group.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Unit.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Client.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Static.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Airbase.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Scenery.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Identifiable.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Marker.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Object.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Positionable.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Scenery.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Static.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Unit.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Weapon.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Net.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Storage.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/Cargo.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoUnit.lua' )
@@ -55,35 +57,64 @@ __Moose.Include( 'Scripts/Moose/Cargo/CargoSlingload.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoCrate.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoGroup.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Scoring.lua' )
__Moose.Include( 'Scripts/Moose/Functional/CleanUp.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Movement.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Sead.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Escort.lua' )
__Moose.Include( 'Scripts/Moose/Functional/MissileTrainer.lua' )
__Moose.Include( 'Scripts/Moose/Functional/AICSAR.lua' )
__Moose.Include( 'Scripts/Moose/Functional/AmmoTruck.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Artillery.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ATC_Ground.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Autolase.lua' )
__Moose.Include( 'Scripts/Moose/Functional/CleanUp.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Designate.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Detection.lua' )
__Moose.Include( 'Scripts/Moose/Functional/DetectionZones.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Designate.lua' )
__Moose.Include( 'Scripts/Moose/Functional/RAT.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Range.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoal.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCoalition.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneCaptureCoalition.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Artillery.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Suppression.lua' )
__Moose.Include( 'Scripts/Moose/Functional/PseudoATC.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Warehouse.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Escort.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Fox.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Mantis.lua' )
__Moose.Include( 'Scripts/Moose/Functional/MissileTrainer.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Movement.lua' )
__Moose.Include( 'Scripts/Moose/Functional/PseudoATC.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Range.lua' )
__Moose.Include( 'Scripts/Moose/Functional/RAT.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Scoring.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Sead.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Shorad.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Suppression.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Warehouse.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneCaptureCoalition.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoal.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCargo.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCoalition.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Airboss.lua' )
__Moose.Include( 'Scripts/Moose/Ops/AirWing.lua' )
__Moose.Include( 'Scripts/Moose/Ops/ArmyGroup.lua' )
__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Auftrag.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Awacs.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Brigade.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Chief.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Cohort.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Commander.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CSAR.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CTLD.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Fleet.lua' )
__Moose.Include( 'Scripts/Moose/Ops/FlightControl.lua' )
__Moose.Include( 'Scripts/Moose/Ops/FlightGroup.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Flotilla.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Intelligence.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Legion.lua' )
__Moose.Include( 'Scripts/Moose/Ops/NavyGroup.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Operation.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsGroup.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsTransport.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsZone.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Platoon.lua' )
__Moose.Include( 'Scripts/Moose/Ops/PlayerTask.lua' )
__Moose.Include( 'Scripts/Moose/Ops/PlayerRecce.lua' )
__Moose.Include( 'Scripts/Moose/Ops/RecoveryTanker.lua' )
__Moose.Include( 'Scripts/Moose/Ops/RescueHelo.lua' )
__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CTLD.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CSAR.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Squadron.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Target.lua' )
__Moose.Include( 'Scripts/Moose/Ops/EasyGCICAP.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Balancer.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Air.lua' )
@@ -98,9 +129,9 @@ __Moose.Include( 'Scripts/Moose/AI/AI_A2G_CAS.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_SEAD.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Patrol.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cap.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cas.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Bai.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_CAP.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_CAS.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_BAI.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Formation.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Request.lua' )
@@ -122,12 +153,12 @@ __Moose.Include( 'Scripts/Moose/Actions/Act_Route.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Account.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Assist.lua' )
__Moose.Include( 'Scripts/Moose/Sound/UserSound.lua' )
__Moose.Include( 'Scripts/Moose/Sound/SoundOutput.lua' )
__Moose.Include( 'Scripts/Moose/Sound/Radio.lua' )
__Moose.Include( 'Scripts/Moose/Sound/RadioQueue.lua' )
__Moose.Include( 'Scripts/Moose/Sound/RadioSpeech.lua' )
__Moose.Include( 'Scripts/Moose/Sound/SoundOutput.lua' )
__Moose.Include( 'Scripts/Moose/Sound/SRS.lua' )
__Moose.Include( 'Scripts/Moose/Sound/UserSound.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/CommandCenter.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Mission.lua' )
@@ -139,7 +170,7 @@ __Moose.Include( 'Scripts/Moose/Tasking/Task_A2G_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2G.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_CARGO.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Transport.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_CSAR.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Dispatcher.lua' )

View File

@@ -0,0 +1,172 @@
__Moose.Include( 'Utilities\\Enums.lua' )
__Moose.Include( 'Utilities\\Routines.lua' )
__Moose.Include( 'Utilities\\Utils.lua' )
__Moose.Include( 'Utilities\\Profiler.lua' )
__Moose.Include( 'Utilities\\Templates.lua' )
__Moose.Include( 'Utilities\\STTS.lua' )
__Moose.Include( 'Utilities\\FiFo.lua' )
__Moose.Include( 'Utilities\\Socket.lua' )
__Moose.Include( 'Core\\Base.lua' )
__Moose.Include( 'Core\\Beacon.lua' )
__Moose.Include( 'Core\\UserFlag.lua' )
__Moose.Include( 'Core\\Report.lua' )
__Moose.Include( 'Core\\Scheduler.lua' )
__Moose.Include( 'Core\\ScheduleDispatcher.lua' )
__Moose.Include( 'Core\\Event.lua' )
__Moose.Include( 'Core\\Settings.lua' )
__Moose.Include( 'Core\\Menu.lua' )
__Moose.Include( 'Core\\Zone.lua' )
__Moose.Include( 'Core\\Zone_Detection.lua' )
__Moose.Include( 'Core\\Database.lua' )
__Moose.Include( 'Core\\Set.lua' )
__Moose.Include( 'Core\\Point.lua' )
__Moose.Include( 'Core\\Velocity.lua' )
__Moose.Include( 'Core\\Message.lua' )
__Moose.Include( 'Core\\Fsm.lua' )
__Moose.Include( 'Core\\Spawn.lua' )
__Moose.Include( 'Core\\SpawnStatic.lua' )
__Moose.Include( 'Core\\Timer.lua' )
__Moose.Include( 'Core\\Goal.lua' )
__Moose.Include( 'Core\\Spot.lua' )
__Moose.Include( 'Core\\Astar.lua' )
__Moose.Include( 'Core\\MarkerOps_Base.lua' )
__Moose.Include( 'Core\\TextAndSound.lua' )
__Moose.Include( 'Core\\Condition.lua' )
__Moose.Include( 'Core\\ClientMenu.lua' )
__Moose.Include( 'Wrapper\\Object.lua' )
__Moose.Include( 'Wrapper\\Identifiable.lua' )
__Moose.Include( 'Wrapper\\Positionable.lua' )
__Moose.Include( 'Wrapper\\Controllable.lua' )
__Moose.Include( 'Wrapper\\Group.lua' )
__Moose.Include( 'Wrapper\\Unit.lua' )
__Moose.Include( 'Wrapper\\Client.lua' )
__Moose.Include( 'Wrapper\\Static.lua' )
__Moose.Include( 'Wrapper\\Airbase.lua' )
__Moose.Include( 'Wrapper\\Scenery.lua' )
__Moose.Include( 'Wrapper\\Marker.lua' )
__Moose.Include( 'Cargo\\Cargo.lua' )
__Moose.Include( 'Cargo\\CargoUnit.lua' )
__Moose.Include( 'Cargo\\CargoSlingload.lua' )
__Moose.Include( 'Cargo\\CargoCrate.lua' )
__Moose.Include( 'Cargo\\CargoGroup.lua' )
__Moose.Include( 'Functional\\Scoring.lua' )
__Moose.Include( 'Functional\\CleanUp.lua' )
__Moose.Include( 'Functional\\Movement.lua' )
__Moose.Include( 'Functional\\Sead.lua' )
__Moose.Include( 'Functional\\Escort.lua' )
__Moose.Include( 'Functional\\MissileTrainer.lua' )
__Moose.Include( 'Functional\\ATC_Ground.lua' )
__Moose.Include( 'Functional\\Detection.lua' )
__Moose.Include( 'Functional\\DetectionZones.lua' )
__Moose.Include( 'Functional\\Designate.lua' )
__Moose.Include( 'Functional\\RAT.lua' )
__Moose.Include( 'Functional\\Range.lua' )
__Moose.Include( 'Functional\\ZoneGoal.lua' )
__Moose.Include( 'Functional\\ZoneGoalCoalition.lua' )
__Moose.Include( 'Functional\\ZoneCaptureCoalition.lua' )
__Moose.Include( 'Functional\\Artillery.lua' )
__Moose.Include( 'Functional\\Suppression.lua' )
__Moose.Include( 'Functional\\PseudoATC.lua' )
__Moose.Include( 'Functional\\Warehouse.lua' )
__Moose.Include( 'Functional\\Fox.lua' )
__Moose.Include( 'Functional\\Mantis.lua' )
__Moose.Include( 'Functional\\Shorad.lua' )
__Moose.Include( 'Functional\\Autolase.lua' )
__Moose.Include( 'Functional\\AICSAR.lua' )
__Moose.Include( 'Ops\\Airboss.lua' )
__Moose.Include( 'Ops\\RecoveryTanker.lua' )
__Moose.Include( 'Ops\\RescueHelo.lua' )
__Moose.Include( 'Ops\\ATIS.lua' )
__Moose.Include( 'Ops\\Auftrag.lua' )
__Moose.Include( 'Ops\\Target.lua' )
__Moose.Include( 'Ops\\OpsGroup.lua' )
__Moose.Include( 'Ops\\FlightGroup.lua' )
__Moose.Include( 'Ops\\NavyGroup.lua' )
__Moose.Include( 'Ops\\ArmyGroup.lua' )
__Moose.Include( 'Ops\\Cohort.lua' )
__Moose.Include( 'Ops\\Squadron.lua' )
__Moose.Include( 'Ops\\Platoon.lua' )
__Moose.Include( 'Ops\\Legion.lua' )
__Moose.Include( 'Ops\\AirWing.lua' )
__Moose.Include( 'Ops\\Brigade.lua' )
__Moose.Include( 'Ops\\Intelligence.lua' )
__Moose.Include( 'Ops\\Commander.lua' )
__Moose.Include( 'Ops\\OpsTransport.lua' )
__Moose.Include( 'Ops\\CSAR.lua' )
__Moose.Include( 'Ops\\CTLD.lua' )
__Moose.Include( 'Ops\\OpsZone.lua' )
__Moose.Include( 'Ops\\Chief.lua' )
__Moose.Include( 'Ops\\Flotilla.lua' )
__Moose.Include( 'Ops\\Fleet.lua' )
__Moose.Include( 'Ops\\Awacs.lua' )
__Moose.Include( 'Ops\\PlayerTask.lua' )
__Moose.Include( 'Ops\\Operation.lua' )
__Moose.Include( 'Ops\\FlightControl.lua' )
__Moose.Include( 'AI\\AI_Balancer.lua' )
__Moose.Include( 'AI\\AI_Air.lua' )
__Moose.Include( 'AI\\AI_Air_Patrol.lua' )
__Moose.Include( 'AI\\AI_Air_Engage.lua' )
__Moose.Include( 'AI\\AI_A2A_Patrol.lua' )
__Moose.Include( 'AI\\AI_A2A_Cap.lua' )
__Moose.Include( 'AI\\AI_A2A_Gci.lua' )
__Moose.Include( 'AI\\AI_A2A_Dispatcher.lua' )
__Moose.Include( 'AI\\AI_A2G_BAI.lua' )
__Moose.Include( 'AI\\AI_A2G_CAS.lua' )
__Moose.Include( 'AI\\AI_A2G_SEAD.lua' )
__Moose.Include( 'AI\\AI_A2G_Dispatcher.lua' )
__Moose.Include( 'AI\\AI_Patrol.lua' )
__Moose.Include( 'AI\\AI_Cap.lua' )
__Moose.Include( 'AI\\AI_Cas.lua' )
__Moose.Include( 'AI\\AI_Bai.lua' )
__Moose.Include( 'AI\\AI_Formation.lua' )
__Moose.Include( 'AI\\AI_Escort.lua' )
__Moose.Include( 'AI\\AI_Escort_Request.lua' )
__Moose.Include( 'AI\\AI_Escort_Dispatcher.lua' )
__Moose.Include( 'AI\\AI_Escort_Dispatcher_Request.lua' )
__Moose.Include( 'AI\\AI_Cargo.lua' )
__Moose.Include( 'AI\\AI_Cargo_APC.lua' )
__Moose.Include( 'AI\\AI_Cargo_Helicopter.lua' )
__Moose.Include( 'AI\\AI_Cargo_Airplane.lua' )
__Moose.Include( 'AI\\AI_Cargo_Ship.lua' )
__Moose.Include( 'AI\\AI_Cargo_Dispatcher.lua' )
__Moose.Include( 'AI\\AI_Cargo_Dispatcher_APC.lua' )
__Moose.Include( 'AI\\AI_Cargo_Dispatcher_Helicopter.lua' )
__Moose.Include( 'AI\\AI_Cargo_Dispatcher_Airplane.lua' )
__Moose.Include( 'AI\\AI_Cargo_Dispatcher_Ship.lua' )
__Moose.Include( 'Actions\\Act_Assign.lua' )
__Moose.Include( 'Actions\\Act_Route.lua' )
__Moose.Include( 'Actions\\Act_Account.lua' )
__Moose.Include( 'Actions\\Act_Assist.lua' )
__Moose.Include( 'Sound\\UserSound.lua' )
__Moose.Include( 'Sound\\SoundOutput.lua' )
__Moose.Include( 'Sound\\Radio.lua' )
__Moose.Include( 'Sound\\RadioQueue.lua' )
__Moose.Include( 'Sound\\RadioSpeech.lua' )
__Moose.Include( 'Sound\\SRS.lua' )
__Moose.Include( 'Tasking\\CommandCenter.lua' )
__Moose.Include( 'Tasking\\Mission.lua' )
__Moose.Include( 'Tasking\\Task.lua' )
__Moose.Include( 'Tasking\\TaskInfo.lua' )
__Moose.Include( 'Tasking\\Task_Manager.lua' )
__Moose.Include( 'Tasking\\DetectionManager.lua' )
__Moose.Include( 'Tasking\\Task_A2G_Dispatcher.lua' )
__Moose.Include( 'Tasking\\Task_A2G.lua' )
__Moose.Include( 'Tasking\\Task_A2A_Dispatcher.lua' )
__Moose.Include( 'Tasking\\Task_A2A.lua' )
__Moose.Include( 'Tasking\\Task_Cargo.lua' )
__Moose.Include( 'Tasking\\Task_Cargo_Transport.lua' )
__Moose.Include( 'Tasking\\Task_Cargo_CSAR.lua' )
__Moose.Include( 'Tasking\\Task_Cargo_Dispatcher.lua' )
__Moose.Include( 'Tasking\\Task_Capture_Zone.lua' )
__Moose.Include( 'Tasking\\Task_Capture_Dispatcher.lua' )
__Moose.Include( 'Globals.lua' )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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,621 @@
--- **Ops** - Brigade Warehouse.
--
-- **Main Features:**
--
-- * Manage platoons
-- * Carry out ARTY and PATROLZONE missions (AUFTRAG)
-- * Define rearming zones
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Brigade).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Ops.Brigade
-- @image OPS_Brigade_.png
--- BRIGADE class.
-- @type BRIGADE
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #table rearmingZones Rearming zones. Each element is of type `#BRIGADE.SupplyZone`.
-- @field #table refuellingZones Refuelling zones. Each element is of type `#BRIGADE.SupplyZone`.
-- @field Core.Set#SET_ZONE retreatZones Retreat zone set.
-- @extends Ops.Legion#LEGION
--- *I am not afraid of an Army of lions lead by a sheep; I am afraid of sheep lead by a lion* -- Alexander the Great
--
-- ===
--
-- # The BRIGADE Concept
--
-- A BRIGADE consists of one or multiple PLATOONs. These platoons "live" in a WAREHOUSE that has a phyiscal struction (STATIC or UNIT) and can be captured or destroyed.
--
--
-- @field #BRIGADE
BRIGADE = {
ClassName = "BRIGADE",
verbose = 0,
rearmingZones = {},
refuellingZones = {},
}
--- Supply Zone.
-- @type BRIGADE.SupplyZone
-- @field Core.Zone#ZONE zone The zone.
-- @field Ops.Auftrag#AUFTRAG mission Mission assigned to supply ammo or fuel.
-- @field #boolean markerOn If `true`, marker is on.
-- @field Wrapper.Marker#MARKER marker F10 marker.
--- BRIGADE class version.
-- @field #string version
BRIGADE.version="0.1.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Spawn when hosting warehouse is a ship or oil rig or gas platform.
-- TODO: Rearming zones.
-- TODO: Retreat zones.
-- DONE: Add weapon range.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new BRIGADE class object.
-- @param #BRIGADE self
-- @param #string WarehouseName Name of the warehouse STATIC or UNIT object representing the warehouse.
-- @param #string BrigadeName Name of the brigade.
-- @return #BRIGADE self
function BRIGADE:New(WarehouseName, BrigadeName)
-- Inherit everything from LEGION class.
local self=BASE:Inherit(self, LEGION:New(WarehouseName, BrigadeName)) -- #BRIGADE
-- Nil check.
if not self then
BASE:E(string.format("ERROR: Could not find warehouse %s!", WarehouseName))
return nil
end
-- Set some string id for output to DCS.log file.
self.lid=string.format("BRIGADE %s | ", self.alias)
-- Defaults
self:SetRetreatZones()
-- Turn ship into NAVYGROUP.
if self:IsShip() then
local wh=self.warehouse --Wrapper.Unit#UNIT
local group=wh:GetGroup()
self.warehouseOpsGroup=NAVYGROUP:New(group) --Ops.NavyGroup#NAVYGROUP
self.warehouseOpsElement=self.warehouseOpsGroup:GetElementByName(wh:GetName())
end
-- Add FSM transitions.
-- From State --> Event --> To State
self:AddTransition("*", "ArmyOnMission", "*") -- An ARMYGROUP was send on a Mission (AUFTRAG).
------------------------
--- Pseudo Functions ---
------------------------
--- Triggers the FSM event "Start". Starts the BRIGADE. Initializes parameters and starts event handlers.
-- @function [parent=#BRIGADE] Start
-- @param #BRIGADE self
--- Triggers the FSM event "Start" after a delay. Starts the BRIGADE. Initializes parameters and starts event handlers.
-- @function [parent=#BRIGADE] __Start
-- @param #BRIGADE self
-- @param #number delay Delay in seconds.
--- Triggers the FSM event "Stop". Stops the BRIGADE and all its event handlers.
-- @param #BRIGADE self
--- Triggers the FSM event "Stop" after a delay. Stops the BRIGADE and all its event handlers.
-- @function [parent=#BRIGADE] __Stop
-- @param #BRIGADE self
-- @param #number delay Delay in seconds.
--- Triggers the FSM event "ArmyOnMission".
-- @function [parent=#BRIGADE] ArmyOnMission
-- @param #BRIGADE self
-- @param Ops.ArmyGroup#ARMYGROUP ArmyGroup The ARMYGROUP on mission.
-- @param Ops.Auftrag#AUFTRAG Mission The mission.
--- Triggers the FSM event "ArmyOnMission" after a delay.
-- @function [parent=#BRIGADE] __ArmyOnMission
-- @param #BRIGADE self
-- @param #number delay Delay in seconds.
-- @param Ops.ArmyGroup#ARMYGROUP ArmyGroup The ARMYGROUP on mission.
-- @param Ops.Auftrag#AUFTRAG Mission The mission.
--- On after "ArmyOnMission" event.
-- @function [parent=#BRIGADE] OnAfterArmyOnMission
-- @param #BRIGADE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Ops.ArmyGroup#ARMYGROUP ArmyGroup The ARMYGROUP on mission.
-- @param Ops.Auftrag#AUFTRAG Mission The mission.
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Add a platoon to the brigade.
-- @param #BRIGADE self
-- @param Ops.Platoon#PLATOON Platoon The platoon object.
-- @return #BRIGADE self
function BRIGADE:AddPlatoon(Platoon)
-- Add platoon to brigade.
table.insert(self.cohorts, Platoon)
-- Add assets to platoon.
self:AddAssetToPlatoon(Platoon, Platoon.Ngroups)
-- Set brigade of platoon.
Platoon:SetBrigade(self)
-- Start platoon.
if Platoon:IsStopped() then
Platoon:Start()
end
return self
end
--- Add asset group(s) to platoon.
-- @param #BRIGADE self
-- @param Ops.Platoon#PLATOON Platoon The platoon object.
-- @param #number Nassets Number of asset groups to add.
-- @return #BRIGADE self
function BRIGADE:AddAssetToPlatoon(Platoon, Nassets)
if Platoon then
-- Get the template group of the platoon.
local Group=GROUP:FindByName(Platoon.templatename)
if Group then
-- Debug text.
local text=string.format("Adding asset %s to platoon %s", Group:GetName(), Platoon.name)
self:T(self.lid..text)
-- Add assets to airwing warehouse.
self:AddAsset(Group, Nassets, nil, nil, nil, nil, Platoon.skill, Platoon.livery, Platoon.name)
else
self:E(self.lid.."ERROR: Group does not exist!")
end
else
self:E(self.lid.."ERROR: Platoon does not exit!")
end
return self
end
--- Define a set of retreat zones.
-- @param #BRIGADE self
-- @param Core.Set#SET_ZONE RetreatZoneSet Set of retreat zones.
-- @return #BRIGADE self
function BRIGADE:SetRetreatZones(RetreatZoneSet)
self.retreatZones=RetreatZoneSet or SET_ZONE:New()
return self
end
--- Add a retreat zone.
-- @param #BRIGADE self
-- @param Core.Zone#ZONE RetreatZone Retreat zone.
-- @return #BRIGADE self
function BRIGADE:AddRetreatZone(RetreatZone)
self.retreatZones:AddZone(RetreatZone)
return self
end
--- Get retreat zones.
-- @param #BRIGADE self
-- @return Core.Set#SET_ZONE Set of retreat zones.
function BRIGADE:GetRetreatZones()
return self.retreatZones
end
--- Add a rearming zone.
-- @param #BRIGADE self
-- @param Core.Zone#ZONE RearmingZone Rearming zone.
-- @return #BRIGADE.SupplyZone The rearming zone data.
function BRIGADE:AddRearmingZone(RearmingZone)
local rearmingzone={} --#BRIGADE.SupplyZone
rearmingzone.zone=RearmingZone
rearmingzone.mission=nil
rearmingzone.marker=MARKER:New(rearmingzone.zone:GetCoordinate(), "Rearming Zone"):ToCoalition(self:GetCoalition())
table.insert(self.rearmingZones, rearmingzone)
return rearmingzone
end
--- Add a refuelling zone.
-- @param #BRIGADE self
-- @param Core.Zone#ZONE RefuellingZone Refuelling zone.
-- @return #BRIGADE.SupplyZone The refuelling zone data.
function BRIGADE:AddRefuellingZone(RefuellingZone)
local supplyzone={} --#BRIGADE.SupplyZone
supplyzone.zone=RefuellingZone
supplyzone.mission=nil
supplyzone.marker=MARKER:New(supplyzone.zone:GetCoordinate(), "Refuelling Zone"):ToCoalition(self:GetCoalition())
table.insert(self.refuellingZones, supplyzone)
return supplyzone
end
--- Get platoon by name.
-- @param #BRIGADE self
-- @param #string PlatoonName Name of the platoon.
-- @return Ops.Platoon#PLATOON The Platoon object.
function BRIGADE:GetPlatoon(PlatoonName)
local platoon=self:_GetCohort(PlatoonName)
return platoon
end
--- Get platoon of an asset.
-- @param #BRIGADE self
-- @param Functional.Warehouse#WAREHOUSE.Assetitem Asset The platoon asset.
-- @return Ops.Platoon#PLATOON The platoon object.
function BRIGADE:GetPlatoonOfAsset(Asset)
local platoon=self:GetPlatoon(Asset.squadname)
return platoon
end
--- Remove asset from platoon.
-- @param #BRIGADE self
-- @param Functional.Warehouse#WAREHOUSE.Assetitem Asset The platoon asset.
function BRIGADE:RemoveAssetFromPlatoon(Asset)
local platoon=self:GetPlatoonOfAsset(Asset)
if platoon then
platoon:DelAsset(Asset)
end
end
--- [ GROUND ] Function to load back an asset in the field that has been filed before.
-- @param #BRIGADE self
-- @param #string Templatename e.g."1 PzDv LogRg I\_AID-976" - that's the alias (name) of an platoon spawned as `"platoon - alias"_AID-"asset-ID"`
-- @param Core.Point#COORDINATE Position where to spawn the platoon
-- @return #BRIGADE self
-- @usage
-- Prerequisites:
-- Save the assets spawned by BRIGADE/CHIEF regularly (~every 5 mins) into a file, e.g. like this:
--
-- local Path = FilePath or "C:\\Users\\<yourname>\\Saved Games\\DCS\\Missions\\" -- example path
-- local BlueOpsFilename = BlueFileName or "ExamplePlatoonSave.csv" -- example filename
-- local BlueSaveOps = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("AID"):FilterCategoryGround():FilterOnce()
-- UTILS.SaveSetOfGroups(BlueSaveOps,Path,BlueOpsFilename)
--
-- where Path and Filename are strings, as chosen by you.
-- You can then load back the assets at the start of your next mission run. Be aware that it takes a couple of seconds for the
-- platoon data to arrive in brigade, so make this an action after ~20 seconds, e.g. like so:
--
-- function LoadBackAssets()
-- local Path = FilePath or "C:\\Users\\<yourname>\\Saved Games\\DCS\\Missions\\" -- example path
-- local BlueOpsFilename = BlueFileName or "ExamplePlatoonSave.csv" -- example filename
-- if UTILS.CheckFileExists(Path,BlueOpsFilename) then
-- local loadback = UTILS.LoadSetOfGroups(Path,BlueOpsFilename,false)
-- for _,_platoondata in pairs (loadback) do
-- local groupname = _platoondata.groupname -- #string
-- local coordinate = _platoondata.coordinate -- Core.Point#COORDINATE
-- Your_Brigade:LoadBackAssetInPosition(groupname,coordinate)
-- end
-- end
-- end
--
-- local AssetLoader = TIMER:New(LoadBackAssets)
-- AssetLoader:Start(20)
--
-- The assets loaded back into the mission will be considered for AUFTRAG type missions from CHIEF and BRIGADE.
function BRIGADE:LoadBackAssetInPosition(Templatename,Position)
self:T(self.lid .. "LoadBackAssetInPosition: " .. tostring(Templatename))
-- get Platoon alias from Templatename
local nametbl = UTILS.Split(Templatename,"_")
local name = nametbl[1]
self:T(string.format("*** Target Platoon = %s ***",name))
-- find a matching asset table from BRIGADE
local cohorts = self.cohorts or {}
local thisasset = nil --Functional.Warehouse#WAREHOUSE.Assetitem
local found = false
for _,_cohort in pairs(cohorts) do
local asset = _cohort:GetName()
self:T(string.format("*** Looking at Platoon = %s ***",asset))
if asset == name then
self:T("**** Found Platoon ****")
local cohassets = _cohort.assets or {}
for _,_zug in pairs (cohassets) do
local zug = _zug -- Functional.Warehouse#WAREHOUSE.Assetitem
if zug.assignment == name and zug.requested == false then
self:T("**** Found Asset ****")
found = true
thisasset = zug --Functional.Warehouse#WAREHOUSE.Assetitem
break
end
end
end
end
if found then
-- prep asset
thisasset.rid = thisasset.uid
thisasset.requested = false
thisasset.score=100
thisasset.missionTask="CAS"
thisasset.spawned = true
local template = thisasset.templatename
local alias = thisasset.spawngroupname
-- Spawn group
local spawnasset = SPAWN:NewWithAlias(template,alias)
:InitDelayOff()
:SpawnFromCoordinate(Position)
-- build a new self request
local request = {} --Functional.Warehouse#WAREHOUSE.Pendingitem
request.assignment = name
request.warehouse = self
request.assets = {thisasset}
request.ntransporthome = 0
request.ndelivered = 0
request.ntransport = 0
request.cargoattribute = thisasset.attribute
request.category = thisasset.category
request.cargoassets = {thisasset}
request.assetdesc = WAREHOUSE.Descriptor.ASSETLIST
request.cargocategory = thisasset.category
request.toself = true
request.transporttype = WAREHOUSE.TransportType.SELFPROPELLED
request.assetproblem = {}
request.born = true
request.prio = 50
request.uid = thisasset.uid
request.airbase = nil
request.timestamp = timer.getAbsTime()
request.assetdescval = {thisasset}
request.nasset = 1
request.cargogroupset = SET_GROUP:New()
request.cargogroupset:AddGroup(spawnasset)
request.iscargo = true
-- Call Brigade self
self:__AssetSpawned(2, spawnasset, thisasset, request)
end
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- FSM Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Start BRIGADE FSM.
-- @param #BRIGADE self
function BRIGADE:onafterStart(From, Event, To)
-- Start parent Warehouse.
self:GetParent(self, BRIGADE).onafterStart(self, From, Event, To)
-- Info.
self:I(self.lid..string.format("Starting BRIGADE v%s", BRIGADE.version))
end
--- Update status.
-- @param #BRIGADE self
function BRIGADE:onafterStatus(From, Event, To)
-- Status of parent Warehouse.
self:GetParent(self).onafterStatus(self, From, Event, To)
-- FSM state.
local fsmstate=self:GetState()
----------------
-- Transport ---
----------------
self:CheckTransportQueue()
--------------
-- Mission ---
--------------
-- Check if any missions should be cancelled.
self:CheckMissionQueue()
---------------------
-- Rearming Zones ---
---------------------
for _,_rearmingzone in pairs(self.rearmingZones) do
local rearmingzone=_rearmingzone --#BRIGADE.SupplyZone
if (not rearmingzone.mission) or rearmingzone.mission:IsOver() then
rearmingzone.mission=AUFTRAG:NewAMMOSUPPLY(rearmingzone.zone)
self:AddMission(rearmingzone.mission)
end
end
-----------------------
-- Refuelling Zones ---
-----------------------
-- Check refuelling zones.
for _,_supplyzone in pairs(self.refuellingZones) do
local supplyzone=_supplyzone --#BRIGADE.SupplyZone
-- Check if mission is nil or over.
if (not supplyzone.mission) or supplyzone.mission:IsOver() then
supplyzone.mission=AUFTRAG:NewFUELSUPPLY(supplyzone.zone)
self:AddMission(supplyzone.mission)
end
end
-----------
-- Info ---
-----------
-- General info:
if self.verbose>=1 then
-- Count missions not over yet.
local Nmissions=self:CountMissionsInQueue()
-- Asset count.
local Npq, Np, Nq=self:CountAssetsOnMission()
-- Asset string.
local assets=string.format("%d [OnMission: Total=%d, Active=%d, Queued=%d]", self:CountAssets(), Npq, Np, Nq)
-- Output.
local text=string.format("%s: Missions=%d, Platoons=%d, Assets=%s", fsmstate, Nmissions, #self.cohorts, assets)
self:I(self.lid..text)
end
------------------
-- Mission Info --
------------------
if self.verbose>=2 then
local text=string.format("Missions Total=%d:", #self.missionqueue)
for i,_mission in pairs(self.missionqueue) do
local mission=_mission --Ops.Auftrag#AUFTRAG
local prio=string.format("%d/%s", mission.prio, tostring(mission.importance)) ; if mission.urgent then prio=prio.." (!)" end
local assets=string.format("%d/%d", mission:CountOpsGroups(), mission.Nassets or 0)
local target=string.format("%d/%d Damage=%.1f", mission:CountMissionTargets(), mission:GetTargetInitialNumber(), mission:GetTargetDamage())
text=text..string.format("\n[%d] %s %s: Status=%s, Prio=%s, Assets=%s, Targets=%s", i, mission.name, mission.type, mission.status, prio, assets, target)
end
self:I(self.lid..text)
end
--------------------
-- Transport Info --
--------------------
if self.verbose>=2 then
local text=string.format("Transports Total=%d:", #self.transportqueue)
for i,_transport in pairs(self.transportqueue) do
local transport=_transport --Ops.OpsTransport#OPSTRANSPORT
local prio=string.format("%d/%s", transport.prio, tostring(transport.importance)) ; if transport.urgent then prio=prio.." (!)" end
local carriers=string.format("Ncargo=%d/%d, Ncarriers=%d", transport.Ncargo, transport.Ndelivered, transport.Ncarrier)
text=text..string.format("\n[%d] UID=%d: Status=%s, Prio=%s, Cargo: %s", i, transport.uid, transport:GetState(), prio, carriers)
end
self:I(self.lid..text)
end
-------------------
-- Platoon Info --
-------------------
if self.verbose>=3 then
local text="Platoons:"
for i,_platoon in pairs(self.cohorts) do
local platoon=_platoon --Ops.Platoon#PLATOON
local callsign=platoon.callsignName and UTILS.GetCallsignName(platoon.callsignName) or "N/A"
local modex=platoon.modex and platoon.modex or -1
local skill=platoon.skill and tostring(platoon.skill) or "N/A"
-- Platoon text.
text=text..string.format("\n* %s %s: %s*%d/%d, Callsign=%s, Modex=%d, Skill=%s", platoon.name, platoon:GetState(), platoon.aircrafttype, platoon:CountAssets(true), #platoon.assets, callsign, modex, skill)
end
self:I(self.lid..text)
end
-------------------
-- Rearming Info --
-------------------
if self.verbose>=4 then
local text="Rearming Zones:"
for i,_rearmingzone in pairs(self.rearmingZones) do
local rearmingzone=_rearmingzone --#BRIGADE.SupplyZone
-- Info text.
text=text..string.format("\n* %s: Mission status=%s, suppliers=%d", rearmingzone.zone:GetName(), rearmingzone.mission:GetState(), rearmingzone.mission:CountOpsGroups())
end
self:I(self.lid..text)
end
---------------------
-- Refuelling Info --
---------------------
if self.verbose>=4 then
local text="Refuelling Zones:"
for i,_refuellingzone in pairs(self.refuellingZones) do
local refuellingzone=_refuellingzone --#BRIGADE.SupplyZone
-- Info text.
text=text..string.format("\n* %s: Mission status=%s, suppliers=%d", refuellingzone.zone:GetName(), refuellingzone.mission:GetState(), refuellingzone.mission:CountOpsGroups())
end
self:I(self.lid..text)
end
----------------
-- Asset Info --
----------------
if self.verbose>=5 then
local text="Assets in stock:"
for i,_asset in pairs(self.stock) do
local asset=_asset --Functional.Warehouse#WAREHOUSE.Assetitem
-- Info text.
text=text..string.format("\n* %s: spawned=%s", asset.spawngroupname, tostring(asset.spawned))
end
self:I(self.lid..text)
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- FSM Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- On after "ArmyOnMission".
-- @param #BRIGADE self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Ops.ArmyGroup#ARMYGROUP ArmyGroup Ops army group on mission.
-- @param Ops.Auftrag#AUFTRAG Mission The requested mission.
function BRIGADE:onafterArmyOnMission(From, Event, To, ArmyGroup, Mission)
-- Debug info.
self:T(self.lid..string.format("Group %s on %s mission %s", ArmyGroup:GetName(), Mission:GetType(), Mission:GetName()))
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -30,7 +30,8 @@
-- @module Ops.CSAR
-- @image OPS_CSAR.jpg
-- Date: January 2023
-- Date: May 2023
-- Last: Update Oct 2024
-------------------------------------------------------------------------
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
@@ -46,8 +47,6 @@
--
-- ===
--
-- ![Banner Image](OPS_CSAR.jpg)
--
-- # CSAR Concept
--
-- * MOOSE-based Helicopter CSAR Operations for Players.
@@ -61,6 +60,8 @@
-- You need to load an .ogg soundfile for the pilot\'s beacons into the mission, e.g. "beacon.ogg", use a once trigger, "sound to country" for that.
-- Create a late-activated single infantry unit as template in the mission editor and name it e.g. "Downed Pilot".
--
-- Example sound files are here: [Moose Sound](https://github.com/FlightControl-Master/MOOSE_SOUND/tree/master/CTLD%20CSAR)
--
-- ## 1. Basic Setup
--
-- A basic setup example is the following:
@@ -116,21 +117,21 @@
-- mycsar.ADFRadioPwr = 1000 -- ADF Beacons sending with 1KW as default
-- mycsar.PilotWeight = 80 -- Loaded pilots weigh 80kgs each
--
-- ## 2.1 Experimental Features
-- ## 2.1 SRS Features and Other Features
--
-- WARNING - Here\'ll be dragons!
-- DANGER - For this to work you need to de-sanitize your mission environment (all three entries) in <DCS root>\Scripts\MissionScripting.lua
-- Needs SRS => 1.9.6 to work (works on the **server** side of SRS)
-- mycsar.useSRS = false -- Set true to use FF\'s SRS integration
-- mycsar.SRSPath = "C:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!)
-- mycsar.SRSchannel = 300 -- radio channel
-- mycsar.SRSModulation = radio.modulation.AM -- modulation
-- mycsar.SRSport = 5002 -- and SRS Server port
-- mycsar.SRSCulture = "en-GB" -- SRS voice culture
-- mycsar.SRSVoice = nil -- SRS voice, relevant for Google TTS
-- mycsar.SRSVoice = nil -- SRS voice for downed pilot, relevant for Google TTS
-- mycsar.SRSGPathToCredentials = nil -- Path to your Google credentials json file, set this if you want to use Google TTS
-- mycsar.SRSVolume = 1 -- Volume, between 0 and 1
-- mycsar.SRSGender = "male" -- male or female voice
-- mycsar.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A -- SRS voice for CSAR Controller, relevant for Google TTS
-- mycsar.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda -- SRS voice for CSAR Controller, relevant for MS Desktop TTS
-- mycsar.coordinate -- Coordinate from which CSAR TTS is sending. Defaults to a random MASH object position
-- --
-- mycsar.csarUsePara = false -- If set to true, will use the LandingAfterEjection Event instead of Ejection. Requires mycsar.enableForAI to be set to true. --shagrat
-- mycsar.wetfeettemplate = "man in floating thingy" -- if you use a mod to have a pilot in a rescue float, put the template name in here for wet feet spawns. Note: in conjunction with csarUsePara this might create dual ejected pilots in edge cases.
@@ -230,7 +231,7 @@ CSAR = {
takenOff = {},
csarUnits = {}, -- table of unit names
downedPilots = {},
woundedGroups = {},
-- = {},
landedStatus = {},
addedTo = {},
woundedGroups = {}, -- contains the new group of units
@@ -292,7 +293,7 @@ CSAR.AircraftType["Bronco-OV-10A"] = 2
--- CSAR class version.
-- @field #string version
CSAR.version="1.0.17"
CSAR.version="1.0.18"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
@@ -316,7 +317,7 @@ function CSAR:New(Coalition, Template, Alias)
-- Inherit everything from FSM class.
local self=BASE:Inherit(self, FSM:New()) -- #CSAR
BASE:T({Coalition, Prefixes, Alias})
BASE:T({Coalition, Template, Alias})
--set Coalition
if Coalition and type(Coalition)=="string" then
@@ -465,7 +466,10 @@ function CSAR:New(Coalition, Template, Alias)
self.SRSGPathToCredentials = nil
self.SRSVolume = 1.0 -- volume 0.0 to 1.0
self.SRSGender = "male" -- male or female
self.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A
self.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda
self.coordinate = nil -- Core.Point#COORDINATE
local AliaS = string.gsub(self.alias," ","_")
self.filename = string.format("CSAR_%s_Persist.csv",AliaS)
@@ -1306,7 +1310,7 @@ end
-- @param #string UnitName
-- @return #string CallSign
function CSAR:_GetCustomCallSign(UnitName)
local callsign = Unitname
local callsign = UnitName
local unit = UNIT:FindByName(UnitName)
if unit and unit:IsAlive() then
local group = unit:GetGroup()
@@ -1737,7 +1741,16 @@ function CSAR:_DisplayMessageToSAR(_unit, _text, _time, _clear, _speak, _overrid
end
-- integrate SRS
if _speak and self.useSRS then
self.SRSQueue:NewTransmission(_text,nil,self.msrs,nil,2)
local coord = _unit:GetCoordinate()
if coord then
self.msrs:SetCoordinate(coord)
end
_text = string.gsub(_text,"km"," kilometer")
_text = string.gsub(_text,"nm"," nautical miles")
--self.msrs:SetVoice(self.SRSVoice)
--self.SRSQueue:NewTransmission(_text,nil,self.msrs,nil,1)
self:I("Voice = "..self.SRSVoice)
self.SRSQueue:NewTransmission(_text,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,self.SRSVoice,volume,label,coord)
end
return self
end
@@ -1876,11 +1889,11 @@ function CSAR:_SignalFlare(_unitName)
if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then
local _clockDir = self:_GetClockDirection(_heli, _closest.pilot)
local _distance = 0
local _distance = ""
if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance))
else
_distance = string.format("%.1fkm",_closest.distance)
_distance = string.format("%.1fkm",_closest.distance/1000)
end
local _msg = string.format("%s - Popping signal flare at your %s o\'clock. Distance %s", self:_GetCustomCallSign(_unitName), _clockDir, _distance)
self:_DisplayMessageToSAR(_heli, _msg, self.messageTime, false, true, true)
@@ -1889,12 +1902,13 @@ function CSAR:_SignalFlare(_unitName)
_coord:FlareRed(_clockDir)
else
local _distance = smokedist
local dtext = ""
if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(smokedist))
dtext = string.format("%.1fnm",UTILS.MetersToNM(smokedist))
else
_distance = string.format("%.1fkm",smokedist/1000)
dtext = string.format("%.1fkm",smokedist/1000)
end
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",_distance), self.messageTime, false, false, true)
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",dtext), self.messageTime, false, false, true)
end
return self
end
@@ -1907,6 +1921,14 @@ end
function CSAR:_DisplayToAllSAR(_message, _side, _messagetime)
self:T(self.lid .. " _DisplayToAllSAR")
local messagetime = _messagetime or self.messageTime
if self.msrs then
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
if self.msrs.google == nil then
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
end
self:I("Voice = "..voice)
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate)
end
for _, _unitName in pairs(self.csarUnits) do
local _unit = self:_GetSARHeli(_unitName)
if _unit and not self.suppressmessages then
@@ -1930,7 +1952,7 @@ function CSAR:_Reqsmoke( _unitName )
local _closest = self:_GetClosestDownedPilot(_heli)
if _closest ~= nil and _closest.pilot ~= nil and _closest.distance > 0 and _closest.distance < smokedist then
local _clockDir = self:_GetClockDirection(_heli, _closest.pilot)
local _distance = 0
local _distance = string.format("%.1fkm",_closest.distance/1000)
if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(_closest.distance))
else
@@ -1942,7 +1964,7 @@ function CSAR:_Reqsmoke( _unitName )
local color = self.smokecolor
_coord:Smoke(color)
else
local _distance = 0
local _distance = string.format("%.1fkm",smokedist/1000)
if _SETTINGS:IsImperial() then
_distance = string.format("%.1fnm",UTILS.MetersToNM(smokedist))
else
@@ -2175,6 +2197,7 @@ function CSAR:_AddBeaconToGroup(_group, _freq)
if _group:IsAlive() then
local _radioUnit = _group:GetUnit(1)
if _radioUnit then
local name = _radioUnit:GetName()
local Frequency = _freq -- Freq in Hertz
local name = _radioUnit:GetName()
local Sound = "l10n/DEFAULT/"..self.radioSound
@@ -2266,6 +2289,12 @@ function CSAR:onafterStart(From, Event, To)
self.allheligroupset = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterCategoryHelicopter():FilterStart()
end
self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart() -- currently only GROUP objects, maybe support STATICs also?
if not self.coordinate then
local csarhq = self.mash:GetRandom()
if csarhq then
self.coordinate = csarhq:GetCoordinate()
end
end
if self.wetfeettemplate then
self.usewetfeet = true
end
@@ -2273,7 +2302,7 @@ function CSAR:onafterStart(From, Event, To)
local path = self.SRSPath
local modulation = self.SRSModulation
local channel = self.SRSchannel
self.msrs = MSRS:New(path,channel,modulation)
self.msrs = MSRS:New(path,channel,modulation) -- Sound.SRS#MSRS
self.msrs:SetPort(self.SRSport)
self.msrs:SetLabel("CSAR")
self.msrs:SetCulture(self.SRSCulture)
@@ -2285,7 +2314,7 @@ function CSAR:onafterStart(From, Event, To)
end
self.msrs:SetVolume(self.SRSVolume)
self.msrs:SetLabel("CSAR")
self.SRSQueue = MSRSQUEUE:New("CSAR")
self.SRSQueue = MSRSQUEUE:New("CSAR") -- Sound.SRS#MSRSQUEUE
end
self:__Status(-10)

View File

@@ -19,10 +19,12 @@
-- ===
--
-- ### Author: **Applevangelist** (Moose Version), ***Ciribob*** (original), Thanks to: Shadowze, Cammel (testing), bbirchnz (additional code!!)
-- ### Repack addition for crates: **Raiden**
--
-- @module Ops.CTLD
-- @image OPS_CTLD.jpg
-- Last Update Apr 2023
-- Last Update October 2023
do
@@ -204,7 +206,7 @@ CTLD_CARGO = {
-- @param #CTLD_CARGO self
-- @param #boolean loaded
function CTLD_CARGO:Isloaded()
if self.HasBeenMoved and not self.WasDropped() then
if self.HasBeenMoved and not self:WasDropped() then
return true
else
return false
@@ -599,7 +601,7 @@ do
--
-- ===
--
-- ![Banner Image](OPS_CTLD.jpg)
-- ![Banner Image](../Images/OPS_CTLD.jpg)
--
-- # CTLD Concept
--
@@ -616,6 +618,8 @@ do
-- You need to load an .ogg soundfile for the pilot\'s beacons into the mission, e.g. "beacon.ogg", use a once trigger, "sound to country" for that.
-- Create the late-activated troops, vehicles, that will make up your deployable forces.
--
-- Example sound files are here: [Moose Sound](https://github.com/FlightControl-Master/MOOSE_SOUND/tree/master/CTLD%20CSAR)
--
-- ## 1. Basic Setup
--
-- ## 1.1 Create and start a CTLD instance
@@ -698,6 +702,7 @@ do
--
-- my_ctld.useprefix = true -- (DO NOT SWITCH THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING!) Adjust **before** starting CTLD. If set to false, *all* choppers of the coalition side will be enabled for CTLD.
-- my_ctld.CrateDistance = 35 -- List and Load crates in this radius only.
-- my_ctld.PackDistance = 35 -- Pack crates in this radius only
-- my_ctld.dropcratesanywhere = false -- Option to allow crates to be dropped anywhere.
-- my_ctld.dropAsCargoCrate = false -- Parachuted herc cargo is not unpacked automatically but placed as crate to be unpacked. Needs a cargo with the same name defined like the cargo that was dropped.
-- my_ctld.maximumHoverHeight = 15 -- Hover max this high to load.
@@ -1119,6 +1124,7 @@ CTLD = {
Spawned_Crates = {}, -- Holds objects for crates spawned generally
Spawned_Cargo = {}, -- Binds together spawned_crates and their CTLD_CARGO objects
CrateDistance = 35, -- list crates in this radius
PackDistance = 35, -- pack crates in this radius
debug = false,
wpZones = {},
dropOffZones = {},
@@ -1142,6 +1148,7 @@ CTLD = {
-- DONE: List cargo in stock
-- DONE: Limit of troops, crates buildable?
-- DONE: Allow saving of Troops & Vehicles
-- DONE: Adding re-packing dropped units
------------------------------
--- Radio Beacons
@@ -1221,7 +1228,7 @@ CTLD.UnitTypes = {
--- CTLD class version.
-- @field #string version
CTLD.version="1.0.37"
CTLD.version="1.0.41"
--- Instantiate a new CTLD.
-- @param #CTLD self
@@ -1339,6 +1346,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
-- setup
self.CrateDistance = 35 -- list/load crates in this radius
self.PackDistance = 35 -- pack objects in this radius
self.ExtractFactor = 3.33 -- factor for troops extraction, i.e. CrateDistance * Extractfactor
self.prefixes = Prefixes or {"Cargoheli"}
self.useprefix = true
@@ -1390,6 +1398,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
-- sub categories
self.usesubcats = false
self.subcats = {}
self.subcatsTroop = {}
-- disallow building in loadzones
self.nobuildinloadzones = true
@@ -1750,6 +1759,8 @@ function CTLD:_EventHandler(EventData)
if _coalition ~= self.coalition then
return --ignore!
end
local unitname = event.IniUnitName or "none"
self.MenusDone[unitname] = nil
-- check is Helicopter
local _unit = event.IniUnit
local _group = event.IniGroup
@@ -1770,6 +1781,7 @@ function CTLD:_EventHandler(EventData)
local unitname = event.IniUnitName or "none"
self.CtldUnits[unitname] = nil
self.Loaded_Cargo[unitname] = nil
self.MenusDone[unitname] = nil
end
return self
end
@@ -2254,9 +2266,10 @@ end
-- @param #CTLD_CARGO Cargo
-- @param #number number Number of crates to generate (for dropping)
-- @param #boolean drop If true we\'re dropping from heli rather than loading.
function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
-- @param #boolean pack If true we\'re packing crates from a template rather than loading or dropping
function CTLD:_GetCrates(Group, Unit, Cargo, number, drop, pack)
self:T(self.lid .. " _GetCrates")
if not drop then
if not drop and not pack then
local cgoname = Cargo:GetName()
-- check if we have stock
local instock = Cargo:GetStock()
@@ -2273,17 +2286,20 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
local width = 20
local distance = nil
local zone = nil
if not drop then
if not drop and not pack then
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.LOAD)
if not inzone then
---@diagnostic disable-next-line: cast-local-type
inzone, ship, zone, distance, width = self:IsUnitInZone(Unit,CTLD.CargoZoneType.SHIP)
end
else
elseif drop and not pack then
if self.dropcratesanywhere then -- #1570
inzone = true
else
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.DROP)
end
elseif pack and not drop then
inzone = true
end
if not inzone then
@@ -3222,6 +3238,42 @@ function CTLD:_BuildCrates(Group, Unit,Engineering)
return self
end
--- (Internal) Function to repair nearby vehicles / FOBs
-- @param #CTLD self
-- @param Wrapper.Group#GROUP Group
-- @param Wrapper.Unit#UNIT Unit
function CTLD:_PackCratesNearby(Group, Unit)
self:T(self.lid .. " _PackCratesNearby")
-----------------------------------------
-- search for nearest group to player
-- determine if group is packable
-- generate crates and destroy group
-----------------------------------------
-- get nearby vehicles
local location = Group:GetCoordinate() -- get coordinate of group using function
local nearestGroups = SET_GROUP:New():FilterCoalitions("blue"):FilterZones({ZONE_RADIUS:New("TempZone", location:GetVec2(), self.PackDistance, false)}):FilterOnce() -- get all groups withing PackDistance from group using function
-- get template name of all vehicles in zone
-- determine if group is packable
for _, _Group in pairs(nearestGroups.Set) do -- convert #SET_GROUP to a list of Wrapper.Group#GROUP
for _, _Template in pairs(_DATABASE.Templates.Groups) do -- iterate through the database of templates
if (string.match(_Group:GetName(), _Template.GroupName)) then -- check if the Wrapper.Group#GROUP near the player is in the list of templates by name
-- generate crates and destroy group
for _, _entry in pairs(self.Cargo_Crates) do -- iterate through #CTLD_CARGO
if (_entry.Templates[1] == _Template.GroupName) then -- check if the #CTLD_CARGO matches the template name
_Group:Destroy() -- if a match is found destroy the Wrapper.Group#GROUP near the player
self:_GetCrates(Group, Unit, _entry, nil, false, true) -- spawn the appropriate crates near the player
return self
end
end
end
end
end
return self
end
--- (Internal) Function to repair nearby vehicles / FOBs
-- @param #CTLD self
-- @param Wrapper.Group#GROUP Group
@@ -3442,6 +3494,9 @@ function CTLD:_RefreshF10Menus()
if _unit:IsHelicopter() or (self:IsHercules(_unit) and self.enableHercules) then --ensure no stupid unit entries here
local unitName = _unit:GetName()
_UnitList[unitName] = unitName
else
local unitName = _unit:GetName()
_UnitList[unitName] = nil
end
end -- end isAlive
end -- end if _unit
@@ -3462,6 +3517,12 @@ function CTLD:_RefreshF10Menus()
self.subcats[entry.Subcategory] = entry.Subcategory
end
end
for _id,_cargo in pairs(self.Cargo_Troops) do
local entry = _cargo -- #CTLD_CARGO
if not self.subcatsTroop[entry.Subcategory] then
self.subcatsTroop[entry.Subcategory] = entry.Subcategory
end
end
end
-- build unit menus
@@ -3498,20 +3559,34 @@ function CTLD:_RefreshF10Menus()
local beaconself = MENU_GROUP_COMMAND:New(_group,"Drop beacon now",smoketopmenu, self.DropBeaconNow, self, _unit):Refresh()
-- sub menus
-- sub menu troops management
if cantroops then
if cantroops then
local troopsmenu = MENU_GROUP:New(_group,"Load troops",toptroops)
for _,_entry in pairs(self.Cargo_Troops) do
local entry = _entry -- #CTLD_CARGO
menucount = menucount + 1
menus[menucount] = MENU_GROUP_COMMAND:New(_group,entry.Name,troopsmenu,self._LoadTroops, self, _group, _unit, entry)
if self.usesubcats then
local subcatmenus = {}
for _name,_entry in pairs(self.subcatsTroop) do
subcatmenus[_name] = MENU_GROUP:New(_group,_name,troopsmenu)
end
for _,_entry in pairs(self.Cargo_Troops) do
local entry = _entry -- #CTLD_CARGO
local subcat = entry.Subcategory
menucount = menucount + 1
menus[menucount] = MENU_GROUP_COMMAND:New(_group,entry.Name,subcatmenus[subcat],self._LoadTroops, self, _group, _unit, entry)
end
else
for _,_entry in pairs(self.Cargo_Troops) do
local entry = _entry -- #CTLD_CARGO
menucount = menucount + 1
menus[menucount] = MENU_GROUP_COMMAND:New(_group,entry.Name,troopsmenu,self._LoadTroops, self, _group, _unit, entry)
end
end
local unloadmenu1 = MENU_GROUP_COMMAND:New(_group,"Drop troops",toptroops, self._UnloadTroops, self, _group, _unit):Refresh()
local extractMenu1 = MENU_GROUP_COMMAND:New(_group, "Extract troops", toptroops, self._ExtractTroops, self, _group, _unit):Refresh()
local extractMenu1 = MENU_GROUP_COMMAND:New(_group, "Extract troops", toptroops, self._ExtractTroops, self, _group, _unit):Refresh()
end
-- sub menu crates management
if cancrates then
local loadmenu = MENU_GROUP_COMMAND:New(_group,"Load crates",topcrates, self._LoadCratesNearby, self, _group, _unit)
local cratesmenu = MENU_GROUP:New(_group,"Get Crates",topcrates)
local packmenu = MENU_GROUP_COMMAND:New(_group, "Pack crates", topcrates, self._PackCratesNearby, self, _group, _unit)
if self.usesubcats then
local subcatmenus = {}
@@ -3597,7 +3672,8 @@ end
-- @param #number NoTroops Size of the group in number of Units across combined templates (for loading).
-- @param #number PerTroopMass Mass in kg of each soldier
-- @param #number Stock Number of groups in stock. Nil for unlimited.
function CTLD:AddTroopsCargo(Name,Templates,Type,NoTroops,PerTroopMass,Stock)
-- @param #string SubCategory Name of sub-category (optional).
function CTLD:AddTroopsCargo(Name,Templates,Type,NoTroops,PerTroopMass,Stock,SubCategory)
self:T(self.lid .. " AddTroopsCargo")
self:T({Name,Templates,Type,NoTroops,PerTroopMass,Stock})
if not self:_CheckTemplates(Templates) then
@@ -3606,7 +3682,7 @@ function CTLD:AddTroopsCargo(Name,Templates,Type,NoTroops,PerTroopMass,Stock)
end
self.CargoCounter = self.CargoCounter + 1
-- Troops are directly loadable
local cargo = CTLD_CARGO:New(self.CargoCounter,Name,Templates,Type,false,true,NoTroops,nil,nil,PerTroopMass,Stock)
local cargo = CTLD_CARGO:New(self.CargoCounter,Name,Templates,Type,false,true,NoTroops,nil,nil,PerTroopMass,Stock, SubCategory)
table.insert(self.Cargo_Troops,cargo)
return self
end
@@ -4308,6 +4384,9 @@ end
local uspeed = Unit:GetVelocityMPS()
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
local maxh = self.maximumHoverHeight -- 15
@@ -4334,6 +4413,9 @@ end
local uspeed = Unit:GetVelocityMPS()
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
local minh = self.HercMinAngels-- 1500m
@@ -4419,6 +4501,9 @@ end
end
local uheight = Unit:GetHeight()
local ucoord = Unit:GetCoordinate()
if not ucoord then
return false
end
local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground
if aheight >= minheight then

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