Compare commits

..

2258 Commits

Author SHA1 Message Date
Applevangelist
d6d9c9d8cf Merge remote-tracking branch 'origin/master' into develop 2024-09-08 13:22:34 +02:00
Applevangelist
7f572a1a9b Small changes
#CSAR - add option for IR strobe
2024-09-08 13:22:10 +02:00
Applevangelist
68007306b3 Merge remote-tracking branch 'origin/develop' into develop 2024-09-08 11:44:47 +02:00
Applevangelist
0c3f97370c Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2024-09-08 11:44:44 +02:00
Applevangelist
d62025dfe0 Small fixes 2024-09-08 11:43:33 +02:00
Thomas
6bc766e95f Merge pull request #2175 from FlightControl-Master/master
Update CSAR.lua
2024-09-07 09:03:00 +02:00
Thomas
07009630c6 Update CSAR.lua
Small fix
2024-09-07 09:01:58 +02:00
Applevangelist
c2aeb1ebcd Merge remote-tracking branch 'origin/master' into develop 2024-09-06 16:41:11 +02:00
Applevangelist
865042a843 #CTLD #CSAR Function to add own SET_GROUP for pilots 2024-09-06 16:40:41 +02:00
Applevangelist
6243137d4c QoL 2024-09-06 13:42:14 +02:00
Applevangelist
f00d0dc871 QoL 2024-09-06 13:40:27 +02:00
Applevangelist
8695953d5a #SPAWN - performance tuning for event workaround 2024-09-03 16:47:17 +02:00
Applevangelist
6afb68390b Merge remote-tracking branch 'origin/master' into develop 2024-09-01 15:37:31 +02:00
Applevangelist
d6adcdf8bd #CONTROLLABLE - Added IR Marker Beacons for UNIT and GROUP objects 2024-09-01 15:36:41 +02:00
Applevangelist
8151700ad7 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2024-09-01 13:37:34 +02:00
Applevangelist
2c192fba30 #SET - include checking functional filters in all sub-classes 2024-09-01 13:36:47 +02:00
Applevangelist
97f11c93bb #CTLD 2024-09-01 12:41:36 +02:00
Thomas
a3102a7381 Merge pull request #2172 from DarthZyll/patch-5
Update CTLD.lua for missing self.ChinookTroopCircleRadius
2024-09-01 08:55:18 +02:00
Mike Young
d41b5e8ede Update CTLD.lua for missing self.ChinookTroopCircleRadius
self.ChinookTroopCircleRadius was not being set
2024-09-01 02:52:33 -04:00
Applevangelist
a45856c925 Merge remote-tracking branch 'origin/master' into develop 2024-08-29 10:25:40 +02:00
Applevangelist
f531fdaa70 #RANGE less noise 2024-08-29 10:25:13 +02:00
Applevangelist
f4b2f07656 Merge remote-tracking branch 'origin/master' into develop 2024-08-29 10:22:32 +02:00
Applevangelist
81f8e84ca4 xx 2024-08-29 10:22:14 +02:00
Applevangelist
f7e64d98bc Merge remote-tracking branch 'origin/master' into develop 2024-08-27 18:37:56 +02:00
Applevangelist
d74de11b8b CTLD small fix of container shape 2024-08-27 18:37:21 +02:00
Applevangelist
4380c1be2e Merge remote-tracking branch 'origin/master' into develop 2024-08-27 13:19:24 +02:00
Applevangelist
30f2097d7a #AIRBOSS - small fix in Numer2Sound etc 2024-08-27 13:18:53 +02:00
Applevangelist
db2d4e97a6 Merge remote-tracking branch 'origin/master' into develop 2024-08-27 10:56:46 +02:00
Applevangelist
f903844059 #CTLD - fix for type name restrictions in other functions 2024-08-27 10:56:14 +02:00
Applevangelist
b4653be54e Merge remote-tracking branch 'origin/master' into develop 2024-08-26 18:31:07 +02:00
Applevangelist
68b2b452cc xx 2024-08-26 18:30:41 +02:00
Applevangelist
e2b6efde7a Merge remote-tracking branch 'origin/master' into develop 2024-08-26 18:22:59 +02:00
Applevangelist
668d120d60 CTLD Small fix for crate removal 2024-08-26 18:22:32 +02:00
Applevangelist
3eea17bc76 Merge remote-tracking branch 'origin/develop' into develop 2024-08-26 15:53:23 +02:00
Applevangelist
2894bcc833 Merge remote-tracking branch 'origin/master' into develop 2024-08-26 15:53:20 +02:00
Applevangelist
7543f31c85 #CTLD
* Added option for crates to have any static shape (per crate type option)
* Added option for crates only to be transported by defined helo type names (per crate type option)
2024-08-26 15:52:50 +02:00
Thomas
ff52197707 Merge pull request #2171 from FlightControl-Master/master
Update Utils.lua
2024-08-25 11:23:42 +02:00
Thomas
56d84e7b25 Update Utils.lua
Small fix
2024-08-25 11:22:30 +02:00
Applevangelist
b025abaa88 Merge remote-tracking branch 'origin/master' into develop 2024-08-24 18:18:36 +02:00
Applevangelist
ed2d3d856b Small fix 2024-08-24 18:18:08 +02:00
Applevangelist
dac637f360 Merge remote-tracking branch 'origin/master' into develop 2024-08-23 16:29:18 +02:00
Applevangelist
1e5c3a3c21 #ENUMS storage AH64D weapons additions 2024-08-23 16:28:35 +02:00
Applevangelist
861588205a Merge remote-tracking branch 'origin/master' into develop 2024-08-23 13:56:58 +02:00
Applevangelist
37d5b6a0fc #Add'l storage items 2024-08-23 13:55:18 +02:00
Applevangelist
4d3fb2990e Merge remote-tracking branch 'origin/master' into develop 2024-08-23 12:47:37 +02:00
Applevangelist
c58a954d18 #CTLD
* Fix for spawning the correct number of crates on inject
* Simplified example docu section 7 on how to build a FARP
* Some prep work for additional stuff
2024-08-23 12:44:17 +02:00
Applevangelist
cce878e759 Merge remote-tracking branch 'origin/master' into develop 2024-08-22 18:27:00 +02:00
Applevangelist
0d481afa16 #SET_GROUP - small fix for FilterPrefixes compute 2024-08-22 18:26:34 +02:00
Applevangelist
2dbad7cb1b Merge remote-tracking branch 'origin/master' into develop 2024-08-22 17:18:13 +02:00
Applevangelist
016875d724 #ENUMS - added a couple of items to ENUMS.Storage.weapons for the Gazelle and CH-47 which do not have a name representation in the object warehouse
#UTILS Added function `UTILS.SpawnFARPAndFunctionalStatics()` to spawn a functional FARP with static items (and some options)
#UTILS Added VHF Beacon Frequencies for newer maps to avoid overlaps in `UTILS.GenerateVHFrequencies()`
2024-08-22 17:17:10 +02:00
Applevangelist
7a0fa629b5 Merge remote-tracking branch 'origin/master' into develop 2024-08-20 18:03:59 +02:00
Applevangelist
5df0d60135 Smaller Fixes 2024-08-20 18:03:18 +02:00
Applevangelist
aee7bd8bb6 Merge remote-tracking branch 'origin/master' into develop 2024-08-20 10:56:08 +02:00
Applevangelist
e77d61c4cb small correction 2024-08-20 10:55:41 +02:00
Applevangelist
b1a40407b3 Merge remote-tracking branch 'origin/master' into develop 2024-08-20 10:47:56 +02:00
Applevangelist
504142c585 #CTLD Added self.TroopUnloadDistGround = 1.5, and self.TroopUnloadDistHover = 5,
#CSAR Added option to switch off ADF beacons
2024-08-20 10:47:28 +02:00
Thomas
0496571c92 Merge pull request #2170 from DarthZyll/patch-4
Update CSAR.lua - remove luadoc param addBeacon on SpawnCASEVAC()
2024-08-20 09:35:34 +02:00
Mike Young
62a0adce5a Update CSAR.lua - remove luadoc param addBeacon on SpawnCASEVAC()
this param doesn't actually exist, purely a luadoc correction
2024-08-19 13:46:21 -04:00
Applevangelist
d1a1be1a9e Merge remote-tracking branch 'origin/develop' into develop 2024-08-18 19:38:27 +02:00
Applevangelist
80011f4e4e Merge remote-tracking branch 'origin/master' into develop 2024-08-18 19:38:24 +02:00
Applevangelist
80df849d18 #SET_GROUP small enhancement for prefix filter 2024-08-18 19:37:00 +02:00
Frank
c2933b6bed Update Legion.lua
- commented out debug info line
2024-08-18 18:19:05 +02:00
Frank
fc4ba9f21d Merge branch 'master' into develop 2024-08-18 18:06:30 +02:00
Frank
e74c79b5d6 Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2024-08-18 16:56:44 +02:00
Frank
f738ddfca8 Update Positionable.lua
- Added cargo bay of "MaxxPro_MRAP"
2024-08-18 16:56:42 +02:00
Applevangelist
5bbd122fa4 Merge remote-tracking branch 'origin/master' into develop 2024-08-18 14:09:10 +02:00
Applevangelist
af45b0d709 #EVENT DynamicCargoRemove fix is name is empty 2024-08-18 14:08:46 +02:00
Applevangelist
928c20c867 Merge remote-tracking branch 'origin/develop' into develop 2024-08-18 13:58:58 +02:00
Applevangelist
4bd36a4786 Merge remote-tracking branch 'origin/master' into develop 2024-08-18 13:58:55 +02:00
Applevangelist
e746617139 #Rap up changes 2024-08-18 13:58:18 +02:00
Thomas
3105f7407d Merge pull request #2169 from FlightControl-Master/Applevangelist-patch-1
Update ATIS.lua
2024-08-18 13:14:13 +02:00
Thomas
2f568bca17 Update ATIS.lua
#ATIS New Light Rain presets
2024-08-18 13:11:58 +02:00
Frank
ad7dba6fac Merge pull request #2168 from FlightControl-Master/FF/Ops
CHIEF v0.6.1
2024-08-17 23:56:07 +02:00
Frank
9efe0fe243 CHIEF v0.6.1
- Strategic zone: If zero transports are available and min carriers is zero, cargo assets need to go by themselfs.
2024-08-17 23:50:52 +02:00
Thomas
2836d7a40f Merge pull request #2167 from FlightControl-Master/Applevangelist-DC-1
Update DynamicCargo.lua
2024-08-17 14:20:51 +02:00
Thomas
f1bf62e3c1 Update DynamicCargo.lua
#DYNAMICCARGO
2024-08-17 14:20:31 +02:00
Applevangelist
a560d65ce7 Merge remote-tracking branch 'origin/master' into develop 2024-08-17 11:37:11 +02:00
Applevangelist
9de3cb73f7 Merge remote-tracking branch 'origin/develop' into develop 2024-08-17 11:36:17 +02:00
Applevangelist
757cc86a68 xx 2024-08-17 11:36:13 +02:00
Applevangelist
aeb1664134 CTLD 2024-08-17 11:36:01 +02:00
Frank
2af1483724 Merge branch 'master' into develop 2024-08-16 23:13:22 +02:00
Frank
b7702ab933 Merge pull request #2166 from FlightControl-Master/Statua-patch-1
Update ClientWatch.lua
2024-08-16 23:10:25 +02:00
Statua
cc14f82e85 Update ClientWatch.lua
-Added check to verify the aircraft is controlled by a player
-Added :FilterByCoalition() and :FilterByCategory()
-Added ability to get ALL CLIENTS by leaving param1 of :New() blank
-Added more console outputs if CLIENTWATCH.Debug is true
-Minor documentation fixes
2024-08-16 15:19:26 -05:00
Applevangelist
f23dd0a5dd Merge remote-tracking branch 'origin/master' into develop 2024-08-16 16:23:42 +02:00
Applevangelist
5aea17e20e #SET_DYNAMICCARGO Docu 2024-08-16 16:23:13 +02:00
Applevangelist
8336b744bb Merge remote-tracking branch 'origin/master' into develop 2024-08-16 15:46:34 +02:00
Applevangelist
ad9eaea010 #SET - many less calls 2024-08-16 15:46:07 +02:00
Applevangelist
9c47e35d54 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/DynamicCargo.lua
2024-08-16 15:22:45 +02:00
Applevangelist
284a770daa Added #SET_DYNAMICCARGO 2024-08-16 15:21:46 +02:00
Applevangelist
16030d4fa1 Delete some non ready classes 2024-08-16 11:28:50 +02:00
Applevangelist
37d2dd17d7 Merge remote-tracking branch 'origin/master' into develop 2024-08-16 09:44:42 +02:00
Applevangelist
ccd190a8b1 xx 2024-08-16 09:44:00 +02:00
Applevangelist
36bf2436b6 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Event.lua
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Development/Moose/Wrapper/DynamicCargo.lua
2024-08-16 09:39:48 +02:00
Applevangelist
19f6a8d8f6 #DYNAMICCARGO - Added functionalty 2024-08-16 09:36:29 +02:00
Applevangelist
b8e09afcce Merge remote-tracking branch 'origin/master' into develop 2024-08-14 15:43:24 +02:00
Applevangelist
24264bd885 #ATIS French Translations 2024-08-14 15:42:46 +02:00
Applevangelist
ed690ee6e9 Merge remote-tracking branch 'origin/master' into develop 2024-08-14 11:34:27 +02:00
Applevangelist
872bb3d775 #RANGE Fix trying to get a playername on dynamic cargo spawns 2024-08-14 11:33:13 +02:00
Applevangelist
c0dcd12ada Merge remote-tracking branch 'origin/master' into develop 2024-08-14 09:47:39 +02:00
Applevangelist
d36cd8e284 #UNIT - Fix getting skill from N/A Templates 2024-08-14 09:46:10 +02:00
Applevangelist
5d98672de5 #ATIS - Polar circle fixes 2024-08-13 10:31:26 +02:00
Applevangelist
eab643268f #ATIS - Polar circle fixes 2024-08-13 10:30:46 +02:00
Applevangelist
e2fa1f992b Merge remote-tracking branch 'origin/master' into develop 2024-08-12 19:06:01 +02:00
Applevangelist
9356794112 bit of performance tuning 2024-08-12 19:05:32 +02:00
Applevangelist
bb865aef38 Merge branch 'master' into develop 2024-08-12 17:01:13 +02:00
Applevangelist
35c24810f9 xx 2024-08-12 17:00:52 +02:00
Applevangelist
875b5fb34d Merge remote-tracking branch 'origin/develop' into develop 2024-08-12 16:17:30 +02:00
Applevangelist
19187bcb14 xx 2024-08-12 16:17:21 +02:00
Thomas
ebe6e9fb9f Merge pull request #2165 from FlightControl-Master/master
Various
2024-08-12 11:40:43 +02:00
Thomas
a54944b021 Update CTLD.lua (#2164)
#CTLD 
* Fix for helo being no Chinook not finding crates e.g. on a ship or FARP
* `nil` check for static cargo position check
2024-08-12 11:39:03 +02:00
Thomas
5f7f75b1c9 BASE and SPAWN tuning (#2162)
* Update Base.lua (#2159)

Performance tuning - the BASE:I, F, T calls rank very high in overall number of calls taken from Moose. Ensure only the minimum number of actions based on trace state and level is taken

* Update Spawn.lua (#2161)

Updating this class as it calls BASE I,F,T a lot. Making it less noisy for some performance tuning
2024-08-12 10:18:14 +02:00
Thomas
bc9938d08a Update Spawn.lua (#2161)
Updating this class as it calls BASE I,F,T a lot. Making it less noisy for some performance tuning
2024-08-12 10:16:40 +02:00
Thomas
59963e152d Update Base.lua (#2159) (#2160)
Performance tuning - the BASE:I, F, T calls rank very high in overall number of calls taken from Moose. Ensure only the minimum number of actions based on trace state and level is taken
2024-08-12 09:47:38 +02:00
Thomas
b77f179acc Update Base.lua (#2159)
Performance tuning - the BASE:I, F, T calls rank very high in overall number of calls taken from Moose. Ensure only the minimum number of actions based on trace state and level is taken
2024-08-12 09:44:13 +02:00
Applevangelist
e768ec3c17 Merge remote-tracking branch 'origin/master' into develop 2024-08-10 18:54:12 +02:00
Applevangelist
90d20076c9 #SET_CLIENT - Added FilterAlive() 2024-08-10 18:53:45 +02:00
Applevangelist
c307de67c2 Merge remote-tracking branch 'origin/master' into develop 2024-08-10 18:17:21 +02:00
Applevangelist
a1fc18fd48 #AIRBASE - Add'l Sinai Aribases added to enumerator 2024-08-10 18:16:46 +02:00
Applevangelist
a962841528 Image docu path 2024-08-10 18:03:00 +02:00
Thomas
8ecfb52c61 Update Modules.lua 2024-08-10 17:34:45 +02:00
Thomas
b9828fb713 Update Modules.lua (#2156) 2024-08-10 17:30:47 +02:00
Thomas
09073244ad Update Moose.files (#2157) 2024-08-10 17:30:31 +02:00
Applevangelist
3c82e6700d Merge remote-tracking branch 'origin/master' into develop 2024-08-10 10:15:59 +02:00
Applevangelist
69176c118f #CTLD docu 2024-08-10 10:15:36 +02:00
Applevangelist
50bbea327b Merge remote-tracking branch 'origin/master' into develop 2024-08-10 09:58:49 +02:00
Applevangelist
7ae98ef5f9 # DCS 2.9.7.58923 - Fixes for the Chinhook and handling of dynamically spawned cargo stuff. Additional Kola airbase names. 2024-08-10 09:58:21 +02:00
Statua
bbc539fac6 Update ClientWatch.lua (#2155)
-Attempted a fix for the documentation
-Added GROUPNAME to the prefix check to allow users to check either groupname or unitname
-Added IniCategory nil and value check to birth event process to prevent errors and slightly improve performance
2024-08-09 18:16:18 +02:00
Applevangelist
df93ca309c Merge remote-tracking branch 'origin/master' into develop 2024-08-09 10:13:23 +02:00
Applevangelist
c1958b62ff #CTLD - OnAfterTroopsRTB, added Zone Name and Zone Object as last 2 parameters handed 2024-08-09 10:12:57 +02:00
Applevangelist
6e27877949 Merge remote-tracking branch 'origin/master' into develop 2024-08-08 09:21:27 +02:00
Applevangelist
a3864d5f32 #EVENT small fixes 2024-08-08 09:20:59 +02:00
Thomas
9dc9b21b16 Update build-includes.yml (#2154) 2024-08-05 12:34:59 +02:00
Applevangelist
ef27584d0b Merge remote-tracking branch 'origin/master' into develop 2024-08-03 14:33:52 +02:00
Applevangelist
4cb784cc18 OH-58D typename 2024-08-03 14:33:31 +02:00
Applevangelist
ed82a4715d Merge remote-tracking branch 'origin/develop' into develop 2024-08-03 14:31:24 +02:00
Applevangelist
6a21db24c8 Merge remote-tracking branch 'origin/master' into develop 2024-08-03 14:30:48 +02:00
Applevangelist
16655cf070 CH47F types added plus doorcheck 2024-08-03 14:30:27 +02:00
Applevangelist
1802d0dc29 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Modules_local.lua
#	Moose Setup/Moose.files
2024-08-03 14:06:59 +02:00
Applevangelist
fc2a820a34 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2024-08-03 14:05:25 +02:00
Applevangelist
cb4eccf57f Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2024-08-03 14:02:52 +02:00
Applevangelist
38e10331c9 #CLIENTWATCH Class 1.0 2024-08-03 13:57:16 +02:00
Applevangelist
d1b4f63eb7 Merge remote-tracking branch 'origin/develop' into develop 2024-08-03 13:49:13 +02:00
Applevangelist
2e82793c3b Merge remote-tracking branch 'origin/master' into develop 2024-08-03 13:49:09 +02:00
Applevangelist
d17d263fa3 Merge remote-tracking branch 'origin/master' into develop 2024-08-03 13:48:40 +02:00
Applevangelist
40053670ea Misc 2024-08-03 13:48:15 +02:00
Applevangelist
e301efc690 xx 2024-08-03 13:47:38 +02:00
Applevangelist
e77bf1f10e Merge remote-tracking branch 'origin/develop' into develop 2024-07-30 07:48:28 +02:00
Applevangelist
ee37a325d4 Merge remote-tracking branch 'origin/master' into develop 2024-07-30 07:48:25 +02:00
Applevangelist
4a36eea5e6 xx 2024-07-30 07:48:01 +02:00
Applevangelist
27b9f32758 Merge remote-tracking branch 'origin/master' into develop 2024-07-30 07:47:50 +02:00
Applevangelist
37540bbbfb Docu 2024-07-30 07:47:06 +02:00
Applevangelist
a63a15db1c docu corrections 2024-07-30 07:46:53 +02:00
Applevangelist
f14457380f xxx 2024-07-30 07:44:55 +02:00
Applevangelist
0369aa8080 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerTask.lua
2024-07-29 13:03:10 +02:00
Applevangelist
4c8b367644 Merge remote-tracking branch 'origin/master' into develop 2024-07-29 13:02:14 +02:00
Applevangelist
4f64ae6057 Merge remote-tracking branch 'origin/master' into develop 2024-07-29 13:01:42 +02:00
Applevangelist
76294f11e4 Silence 2024-07-29 13:01:16 +02:00
Applevangelist
da8ce95adf xx 2024-07-29 13:01:06 +02:00
Applevangelist
23697f4fe3 xx 2024-07-28 17:54:27 +02:00
Applevangelist
b4ceafca50 Merge remote-tracking branch 'origin/master' into develop 2024-07-28 17:25:55 +02:00
Applevangelist
cc247a0f03 docu 2024-07-28 17:25:33 +02:00
Applevangelist
1c24580d3f #PLAYERTASKCONTROLLER - variable type checks 2024-07-28 17:25:20 +02:00
Applevangelist
801e03551f Merge remote-tracking branch 'origin/develop' into develop 2024-07-28 15:21:45 +02:00
Applevangelist
5dd4435b7d #PLAYERTASKMANAGER - added listening to EVENTS.UnitLost 2024-07-28 15:20:54 +02:00
Applevangelist
01bfd8e141 Merge remote-tracking branch 'origin/develop' into develop 2024-07-28 13:42:13 +02:00
Applevangelist
9d84042ce8 Merge remote-tracking branch 'origin/master' into develop 2024-07-28 13:42:10 +02:00
Applevangelist
a63a8c78a8 Merge remote-tracking branch 'origin/master' into develop 2024-07-28 13:41:41 +02:00
Applevangelist
e4a8c36754 xx 2024-07-28 13:41:26 +02:00
Applevangelist
37cbf212f7 xx 2024-07-28 13:41:08 +02:00
Applevangelist
c59bf3f334 xx 2024-07-28 13:40:59 +02:00
Applevangelist
9f581ee660 Merge remote-tracking branch 'origin/develop' into develop 2024-07-28 12:44:50 +02:00
Applevangelist
ba2bfd5599 Merge remote-tracking branch 'origin/master' into develop 2024-07-28 12:44:17 +02:00
Applevangelist
fb31c25ab7 PLAYERTASK - nil check for client messaging 2024-07-28 12:43:57 +02:00
Applevangelist
8effa153b0 Merge remote-tracking branch 'origin/develop' into develop 2024-07-28 12:43:22 +02:00
Applevangelist
086f687e32 Merge remote-tracking branch 'origin/master' into develop 2024-07-28 12:43:18 +02:00
Applevangelist
8ae8c94b27 xx 2024-07-28 12:42:52 +02:00
Applevangelist
500fe37ac4 SET 2024-07-28 12:42:34 +02:00
Applevangelist
03cd390baf EASYGCICAP - added a bit of housekeeping 2024-07-28 12:07:34 +02:00
Applevangelist
72303ffbad xx 2024-07-28 12:05:31 +02:00
Applevangelist
1f721ff9b4 Merge remote-tracking branch 'origin/develop' into develop 2024-07-27 16:21:39 +02:00
Applevangelist
e3f780fda7 Merge remote-tracking branch 'origin/master' into develop 2024-07-27 16:21:36 +02:00
kaltokri
490bfe6a46 Merge branch 'master' into develop 2024-07-24 20:07:17 +02:00
kaltokri
50a38cf2a4 Fixed broken link in docs. 2024-07-24 20:06:56 +02:00
Thomas
c2aa57c603 Update Zone.lua
Gg
2024-07-21 07:41:36 +02:00
Frank
51e703326e Merge pull request #2151 from w3z315/patch-1
Fix ZoneCaptureCoalition on player ejects / gets killed in zone
2024-07-21 00:35:02 +02:00
Frank
273170b4f4 Merge pull request #2152 from FlightControl-Master/FF/Ops
AUFTRAG
2024-07-21 00:29:52 +02:00
Frank
61e6ffa76c AUFTRAG
- Added new type STRAFING for corresponding DCS task
2024-07-21 00:29:25 +02:00
Alex
041cd238df Fix ZoneCaptureCoalition on player ejects / gets killed in zone
ZoneCaptureCoalition.lua:879 calls GetScannedSetUnit and will stop the scheduler if the error message for STATICs is raised. We already have a check if it is present so we can add this explicitly here.
2024-07-21 00:11:23 +02:00
Frank
d07107d937 Merge pull request #2150 from FlightControl-Master/FF/Ops
Update NavyGroup.lua
2024-07-20 17:55:54 +02:00
Frank
5172ca7536 Update NavyGroup.lua
- Added old turn into wind code `NAVYGROUP:SetIntoWindLegacy`()`
- Added option to extend duration of turn into wind `NAVYGROUP:ExtendTurnIntoWind(Duration, TurnIntoWind)`
2024-07-20 17:44:58 +02:00
Applevangelist
10088879ce Merge remote-tracking branch 'origin/develop' into develop 2024-07-20 12:17:06 +02:00
Applevangelist
42a9333c53 Merge remote-tracking branch 'origin/master' into develop 2024-07-20 12:17:02 +02:00
Applevangelist
70622413dc Merge remote-tracking branch 'origin/master' into develop 2024-07-20 12:16:30 +02:00
Applevangelist
ccf3093fe8 #SPAWN - fix log issue when _OnCrash InitUnitName is empty 2024-07-20 12:16:08 +02:00
Applevangelist
5596fab8e0 Merge remote-tracking branch 'origin/develop' into develop 2024-07-18 16:09:34 +02:00
Applevangelist
c3193fd6df Merge remote-tracking branch 'origin/master' into develop 2024-07-18 16:09:31 +02:00
Applevangelist
124262667e Merge remote-tracking branch 'origin/master' into develop 2024-07-18 16:08:22 +02:00
Applevangelist
d2d0659776 #ATIS - do not say runway twice if departure and arrival is the same 2024-07-18 16:08:00 +02:00
Applevangelist
bb90ac58ba xx 2024-07-18 16:07:08 +02:00
Applevangelist
e32d6138b3 Merge remote-tracking branch 'origin/develop' into develop 2024-07-18 14:36:14 +02:00
Applevangelist
90a6b6216e Merge remote-tracking branch 'origin/master' into develop 2024-07-18 14:36:11 +02:00
Applevangelist
f0e01845d3 Merge remote-tracking branch 'origin/master' into develop 2024-07-18 14:35:38 +02:00
Applevangelist
8087c87027 Fixes 2024-07-18 14:34:33 +02:00
Applevangelist
a813f8299f Range 2024-07-18 14:32:22 +02:00
Applevangelist
de2bba63a5 Merge remote-tracking branch 'origin/develop' into develop 2024-07-16 16:04:05 +02:00
Applevangelist
e758a0418a Merge remote-tracking branch 'origin/master' into develop 2024-07-16 16:04:02 +02:00
Applevangelist
31b76da69d Merge remote-tracking branch 'origin/master' into develop 2024-07-16 16:03:16 +02:00
Applevangelist
e5bf7f104d xx 2024-07-16 16:02:47 +02:00
Applevangelist
c4738b24eb fixes and additions 2024-07-16 16:02:33 +02:00
Applevangelist
b47ba61762 Merge remote-tracking branch 'origin/develop' into develop 2024-07-16 13:39:35 +02:00
Applevangelist
0aff4bf98c Merge remote-tracking branch 'origin/master' into develop 2024-07-16 13:39:32 +02:00
Applevangelist
15996b43e6 Merge remote-tracking branch 'origin/master' into develop 2024-07-16 13:39:05 +02:00
Applevangelist
c73d8a6339 Further fixes 2024-07-16 13:38:42 +02:00
Applevangelist
b6b99a2e99 xx 2024-07-16 13:38:14 +02:00
Applevangelist
d35c941748 Merge remote-tracking branch 'origin/develop' into develop 2024-07-16 11:55:21 +02:00
Applevangelist
cfc8312b21 Merge remote-tracking branch 'origin/master' into develop 2024-07-16 11:54:58 +02:00
Applevangelist
c040d2fa3f Merge remote-tracking branch 'origin/master' into develop 2024-07-16 11:54:46 +02:00
Thomas
04f2f7d34f Update Database.lua (#2148)
Small fix
2024-07-16 08:45:56 +02:00
Thomas
5d6951ae11 Update Spawn.lua (#2149)
Small fix
2024-07-16 08:45:37 +02:00
Applevangelist
f6b4e81111 Merge remote-tracking branch 'origin/develop' into develop 2024-07-15 17:24:42 +02:00
Applevangelist
c8da1277de Merge remote-tracking branch 'origin/master' into develop 2024-07-15 17:24:39 +02:00
Applevangelist
91a0e992cd Merge remote-tracking branch 'origin/master' into develop 2024-07-15 17:24:13 +02:00
Applevangelist
b890dc22a3 xx 2024-07-15 17:23:45 +02:00
Applevangelist
214cd3748c #SET - dynamic slot fixes for SET_CLIENT and SET_PLAYER 2024-07-15 17:23:30 +02:00
Applevangelist
703589d8e4 xx 2024-07-15 14:32:38 +02:00
Applevangelist
379c31b28a Merge remote-tracking branch 'origin/master' into develop 2024-07-15 14:32:17 +02:00
Applevangelist
6fb931a055 #SPAWN - couple of fixes for SPAWN, planes scheduler 2024-07-15 14:31:54 +02:00
Applevangelist
8a89ed5857 Merge remote-tracking branch 'origin/master' into develop 2024-07-14 19:16:00 +02:00
Applevangelist
87b866eca1 xx 2024-07-14 19:15:33 +02:00
Applevangelist
b5d1cee96b #documentation 2024-07-14 19:15:19 +02:00
Applevangelist
6557a6cf0b Merge remote-tracking branch 'origin/develop' into develop 2024-07-14 18:49:23 +02:00
Applevangelist
0128381f4f Merge remote-tracking branch 'origin/master' into develop 2024-07-14 18:49:17 +02:00
Applevangelist
4511a68a2b Merge remote-tracking branch 'origin/master' into develop 2024-07-14 18:48:44 +02:00
Applevangelist
9ecaca365f xx 2024-07-14 18:48:23 +02:00
Applevangelist
e6aa341863 Dynamic Slots - fixes for #GROUP, #UNIT, #CSAR and #CTLD 2024-07-14 18:48:07 +02:00
Applevangelist
504e56e827 Merge remote-tracking branch 'origin/master' into develop 2024-07-14 17:49:53 +02:00
Applevangelist
3595afe0cc #DATABASE- stage 1 fix for dynamic client slots 2024-07-14 17:49:25 +02:00
Applevangelist
cfc0cc66b2 xxx 2024-07-14 17:48:48 +02:00
Applevangelist
2442adfd2f Merge remote-tracking branch 'origin/master' into develop 2024-07-13 15:22:18 +02:00
Applevangelist
a833703731 xx 2024-07-13 15:21:51 +02:00
Applevangelist
0b21cb687e Various fixes 2024-07-13 15:21:35 +02:00
Applevangelist
af85745433 CONTROLLABLE:TaskLandAtVec2( Vec2, Duration , CombatLanding, DirectionAfterLand) 2024-07-12 19:33:35 +02:00
Applevangelist
ef58cae59f Merge remote-tracking branch 'origin/master' into develop 2024-07-12 19:33:17 +02:00
Applevangelist
8a21fe80de #CONTROLLABLE - Added combat and direction options in CONTROLLABLE:TaskLandAtVec2( Vec2, Duration , CombatLanding, DirectionAfterLand) 2024-07-12 19:32:55 +02:00
Applevangelist
86fc8db9e6 #AUFTRAG LANDATCOORDINATE - added combat land options 2024-07-12 19:32:24 +02:00
Applevangelist
7bc7fee6d7 Merge remote-tracking branch 'origin/develop' into develop 2024-07-12 13:38:35 +02:00
Applevangelist
46c5b50077 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 13:38:30 +02:00
Applevangelist
5c54f47527 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 13:37:46 +02:00
Applevangelist
51eb3a2e82 #AIRBASE - corrections for South Atlantic/Falklands 2024-07-12 13:37:04 +02:00
Applevangelist
d9aad161b0 Merge remote-tracking branch 'origin/develop' into develop 2024-07-12 13:31:21 +02:00
Applevangelist
fea2098c40 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 13:31:17 +02:00
Applevangelist
03f8b1e301 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 13:30:51 +02:00
Applevangelist
ec8bfb32b4 events 2024-07-12 13:30:29 +02:00
Applevangelist
d298ed2a83 Merge remote-tracking branch 'origin/develop' into develop 2024-07-12 12:20:53 +02:00
Applevangelist
515ac2c060 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 12:20:50 +02:00
Applevangelist
6a31e47705 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 12:20:16 +02:00
Applevangelist
e6dda35f3d Typos 2024-07-12 12:19:58 +02:00
Applevangelist
70e4454fa9 Merge remote-tracking branch 'origin/develop' into develop 2024-07-12 11:46:38 +02:00
Applevangelist
82b4f4ee58 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 11:46:35 +02:00
Applevangelist
925233709b xx 2024-07-12 11:46:12 +02:00
Applevangelist
0af15699f3 Merge remote-tracking branch 'origin/master' into develop 2024-07-12 11:45:53 +02:00
Applevangelist
9d2896d088 EVENTS - additional events from last release 2024-07-12 11:44:24 +02:00
Applevangelist
5b596516fe Merge remote-tracking branch 'origin/master' into develop 2024-07-12 11:37:27 +02:00
Applevangelist
036cc9d211 #Afghanistan additions 2024-07-12 11:36:43 +02:00
Applevangelist
df6c97bec8 #EASYGCICAP - avoid launching intercepts if airwing conquered by other coalition 2024-07-12 09:36:29 +02:00
Applevangelist
c7e73f3b1a #EASYGCICAP - fix launching interceptors from conquered, wrong coalition wings 2024-07-12 08:38:42 +02:00
Applevangelist
ccc7b431dc Merge remote-tracking branch 'origin/develop' into develop 2024-07-12 08:10:24 +02:00
Applevangelist
079e60163d Merge remote-tracking branch 'origin/master' into develop 2024-07-12 08:10:20 +02:00
Applevangelist
29fb03e903 xx 2024-07-12 08:09:59 +02:00
Applevangelist
6e917049af Merge remote-tracking branch 'origin/master' into develop 2024-07-12 08:09:39 +02:00
Applevangelist
e6484c1598 various 2024-07-12 08:08:57 +02:00
Applevangelist
c8d49916df #RAT - dimensions workaround for Saab 340 2024-07-12 08:08:32 +02:00
Applevangelist
32297da2b0 #AWACS - MS TTS - fix spelling out B-R-A in Threat call 2024-07-11 08:35:32 +02:00
Applevangelist
336ac9eddb #AWACS - MS TTS - fix spelling out B-R-A in Threat call 2024-07-11 08:35:16 +02:00
Applevangelist
1d64ac3469 Merge remote-tracking branch 'origin/develop' into develop 2024-07-09 11:32:28 +02:00
Applevangelist
26adb7934e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Message.lua
2024-07-09 11:32:23 +02:00
Applevangelist
c51a6da5ff Merge remote-tracking branch 'origin/develop' into develop 2024-07-09 11:31:33 +02:00
Applevangelist
5629a8fcd6 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Message.lua
2024-07-09 11:31:29 +02:00
Applevangelist
65c7b0d12f Docu fixes 2024-07-09 11:30:41 +02:00
Frank
1a0e2e0ea1 OPS
- Added method to reduce asset count for cohorts #2103
- Added tacview on legion level
2024-07-07 23:15:20 +02:00
Frank
f74c0e29a5 Merge branch 'master' into develop 2024-07-07 11:32:08 +02:00
Frank
9f8e7f4f3c Merge pull request #2144 from FlightControl-Master/FF/MasterDevel
RANGE
2024-07-07 11:05:05 +02:00
Frank
b215d0e7d4 Update Range.lua
- reduced initial status update
2024-07-07 11:03:03 +02:00
Frank
6f3d9a497a Update Chief.lua
- Added unsupported mission type for OPSZONE to error log output
2024-07-06 21:51:20 +02:00
Frank
13b272b6e5 Update Range.lua
Allow zone to be a string in RANGE:SetRangeZone
2024-07-06 21:48:07 +02:00
Frank
f9031dba42 Merge branch 'master' into FF/MasterDevel 2024-07-06 19:15:05 +02:00
Frank
ead7844e5f Merge branch 'master' into develop 2024-07-05 21:36:12 +02:00
Frank
29a4f7c160 Update Event.lua
#2143 Try with isExist
2024-07-05 21:35:55 +02:00
Frank
d25d89afbb Merge branch 'master' into develop 2024-07-05 17:54:06 +02:00
Frank
55a9c7e020 Update Event.lua
#2143
2024-07-05 17:53:50 +02:00
Frank
e30fb1c9bd Merge branch 'master' into develop 2024-07-03 23:17:49 +02:00
Frank
84dd1fa21c Update Range.lua
- Fixe F10 menu bug
2024-07-03 23:17:37 +02:00
Frank
64039ae770 Merge branch 'master' into develop 2024-07-03 17:45:33 +02:00
Frank
42979093b8 Update Range.lua
- Added `RANGE:SetMenuRoot`
2024-07-03 17:45:21 +02:00
Frank
0aa78ec0c8 Merge branch 'master' into develop 2024-07-03 09:47:07 +02:00
Frank
edf7f4677c Update Range.lua
- Fixed name of mission menu
- Improved AddBombingTargetGroup to be passed as string
2024-07-03 09:46:51 +02:00
Frank
8958d7b71f Update Range.lua
Replaced RANGE.Sound. by self.Sound.
2024-07-02 18:04:36 +02:00
Frank
6083191f32 Update Range.lua
- Added `RANGE:SetSoundfilesInfo`
2024-07-02 18:02:33 +02:00
Frank
34698a1b4e Merge branch 'master' into develop 2024-07-02 15:52:55 +02:00
Frank
8e0446c594 Update Range.lua
- Fixed  RANGE.MenuF10Root
2024-07-02 15:52:44 +02:00
Applevangelist
083bedcc2d Merge remote-tracking branch 'origin/develop' into develop 2024-07-02 12:48:15 +02:00
Applevangelist
aad17f97fc Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2024-07-02 12:48:09 +02:00
Applevangelist
6a83b48429 Merge remote-tracking branch 'origin/develop' into develop 2024-07-02 12:46:50 +02:00
Applevangelist
77a1150037 #EASYGCICAP - add options to set default despawn after holding or landing 2024-07-02 12:46:45 +02:00
Applevangelist
19ff7ce9a0 #EASYGCICAP - add options to set default despawn after holding or landing 2024-07-02 12:46:35 +02:00
Frank
86508d49ee Merge branch 'master' into develop 2024-07-01 22:15:39 +02:00
Frank
7e20a0a0dc Merge pull request #2142 from FlightControl-Master/FF/MasterDevel
ATIS
2024-07-01 22:14:49 +02:00
Frank
58139b34a8 Update ATIS.lua
- renamed function
2024-07-01 22:13:55 +02:00
Frank
9ceb26c7b1 ATIS
- Cleaned up debug lines
2024-07-01 22:07:55 +02:00
Applevangelist
0058383e64 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Message.lua
2024-06-30 16:02:11 +02:00
Applevangelist
1549ca1cc4 Merge remote-tracking branch 'origin/master' into develop 2024-06-30 16:01:22 +02:00
Applevangelist
7abb6680b4 fixes 2024-06-30 16:01:02 +02:00
Applevangelist
9ca30fc00c Fixes 2024-06-30 16:00:49 +02:00
Applevangelist
9479b338c5 xxx 2024-06-30 15:57:09 +02:00
Applevangelist
b6ac1e86e4 xx 2024-06-30 15:20:23 +02:00
Applevangelist
a4b187d561 xx 2024-06-30 15:20:17 +02:00
Applevangelist
335bd897d5 Merge remote-tracking branch 'origin/master' into develop 2024-06-30 11:31:51 +02:00
Frank
1ba1738aa0 Merge branch 'master' into FF/MasterDevel 2024-06-29 13:59:50 +02:00
Frank
c8cdbeac5c Update ATIS.lua
- Added option to specify Airbase and NATO paths to sound files
- Fixed Rainy presets not recognized correctly
2024-06-29 13:57:51 +02:00
Frank
4b12b04840 Merge pull request #2140 from DarthZyll/patch-3
Update UserFlag.lua for incorrect documentation
2024-06-28 23:02:24 +02:00
Mike Young
c571d32d0e Update UserFlag.lua for incorrect documentation
Update UserFlag.lua for incorrect documentation
2024-06-27 19:48:17 -04:00
Applevangelist
897a0d4f40 xxx 2024-06-25 13:41:31 +02:00
Applevangelist
7229439d84 Merge remote-tracking branch 'origin/develop' into develop 2024-06-25 13:09:55 +02:00
Applevangelist
1be62b9c4e Merge remote-tracking branch 'origin/master' into develop 2024-06-25 13:09:48 +02:00
Applevangelist
30fd2230b0 Merge remote-tracking branch 'origin/master' into develop 2024-06-25 13:09:16 +02:00
Applevangelist
b350243e50 Docu fix 2024-06-25 13:08:46 +02:00
Applevangelist
50ff9f162a Merge remote-tracking branch 'origin/develop' into develop 2024-06-25 10:46:55 +02:00
Applevangelist
e94a918bbe Merge remote-tracking branch 'origin/master' into develop 2024-06-25 10:46:51 +02:00
Applevangelist
af261048a6 Merge remote-tracking branch 'origin/master' into develop 2024-06-25 10:46:17 +02:00
Applevangelist
042b82d3a6 #ARTY Fixed counting the right shells for artillery and some logic problems 2024-06-25 10:45:28 +02:00
Applevangelist
2fc2f5d798 #ARTY fixed counting the right artillery shells and some logic problems 2024-06-25 10:44:53 +02:00
Frank
ba41d6421d FLIGHTGROUP
- Added nil checks if client template does not exist
2024-06-25 09:38:29 +02:00
Frank
faadbdecfb Merge branch 'master' into develop 2024-06-24 23:55:13 +02:00
Frank
62ef56684b Update Templates
- Added nil check if client template does not exist in `WAREHOUSE` class
- Added nil checks in `DATABASE` if client template does not exist
- Fixed `SET_CLIENT:IsIncludeObject()` function if client template does not exist
2024-06-24 23:55:01 +02:00
Applevangelist
21b5823bc0 Merge remote-tracking branch 'origin/develop' into develop 2024-06-23 19:19:19 +02:00
Applevangelist
81c38d2221 Merge remote-tracking branch 'origin/master' into develop 2024-06-23 19:19:16 +02:00
Applevangelist
a994942a02 Merge remote-tracking branch 'origin/master' into develop 2024-06-23 19:18:47 +02:00
Applevangelist
1033b975f8 #UNIT - improved GetAmmunition() to also report Tank HE and AP shells and added query functions for arti, HE and AP type of ammunition 2024-06-23 19:18:27 +02:00
Applevangelist
bd6d23c7f8 #UNIT - improved GetAmmunition() to also report Tank HE and AP shells and added query functions for arti, HE and AP type of ammunition
#OPSZONE - added FindByName()
2024-06-23 19:17:32 +02:00
Applevangelist
f15e89e7aa xxx 2024-06-23 19:15:57 +02:00
Applevangelist
7bb5e324f9 Merge remote-tracking branch 'origin/develop' into develop 2024-06-22 11:54:58 +02:00
Applevangelist
209149b8de Merge remote-tracking branch 'origin/master' into develop 2024-06-22 11:54:55 +02:00
Applevangelist
b701fa61fa xxx 2024-06-22 11:54:35 +02:00
Applevangelist
97abe32f75 Merge remote-tracking branch 'origin/master' into develop 2024-06-22 11:54:19 +02:00
Applevangelist
11a05f1333 UNIT:IsPlayer() Small fix for an error that is I think produced by the swapr script 2024-06-22 11:53:52 +02:00
Applevangelist
ef7d354109 Merge remote-tracking branch 'origin/develop' into develop 2024-06-20 18:10:11 +02:00
Applevangelist
f5551e202d Merge remote-tracking branch 'origin/master' into develop 2024-06-20 18:10:06 +02:00
Applevangelist
796b71474b Merge remote-tracking branch 'origin/develop' into develop 2024-06-20 18:08:55 +02:00
Applevangelist
662412dd02 Merge remote-tracking branch 'origin/master' into develop 2024-06-20 18:08:52 +02:00
Applevangelist
8cdf8677c1 #UTILS Added AH64 and Kiowa Callsign enumerators 2024-06-20 18:08:24 +02:00
Frank
e1706c94af Merge branch 'master' into FF/MasterDevel 2024-06-20 17:19:57 +02:00
Applevangelist
97c1653614 Merge remote-tracking branch 'origin/develop' into develop 2024-06-20 08:53:11 +02:00
Applevangelist
07dc55b284 Merge remote-tracking branch 'origin/master' into develop 2024-06-20 08:53:08 +02:00
Applevangelist
cc925271aa Merge remote-tracking branch 'origin/develop' into develop-2 2024-06-20 08:52:50 +02:00
Applevangelist
753cbaa2b9 xxx 2024-06-20 08:52:47 +02:00
Applevangelist
b8f7cf44cc Merge remote-tracking branch 'origin/develop' into develop 2024-06-20 08:52:28 +02:00
Applevangelist
7d6f9fc4b5 Merge remote-tracking branch 'origin/master' into develop 2024-06-20 08:52:25 +02:00
Applevangelist
f9f0a8e866 #COORDINATE - Fix is day/night for Kola locations when the sun either never rises or never sets. 2024-06-20 08:51:59 +02:00
Frank
3fac5ac9f0 Update FlightGroup.lua
- Fixed refueling issue
2024-06-18 23:15:50 +02:00
Frank
d83cabbab6 Merge branch 'master' into develop 2024-06-18 09:21:12 +02:00
Frank
5f9d4405b1 AIRBOSS
- Added case that group template cannot be found in MOOSE db
2024-06-18 09:20:59 +02:00
Frank
bdd9efa2cc Update FlightControl.lua
- Added `FLIGHTCONTROL:SetTransmitOnlyWithPlayers()`
2024-06-17 18:08:45 +02:00
Frank
a778e910f7 Merge pull request #2139 from FlightControl-Master/FF/Ops
Update FlightControl.lua
2024-06-17 16:11:40 +02:00
Frank
24b09e22f7 Update FlightControl.lua
- Added `FLIGHTCONTROL:SetRadioOnlyIfPlayers`
2024-06-17 16:09:01 +02:00
Thomas
b40331b04e Kiowa type name fix (#2138)
* Update CSAR.lua

Kiowa type name

* Update CTLD.lua
2024-06-15 08:14:58 +02:00
Thomas
2d1fcb9be8 Update CTLD.lua 2024-06-15 08:12:54 +02:00
Thomas
5fcd394ddd Update CSAR.lua
Kiowa type name
2024-06-15 08:11:14 +02:00
Applevangelist
fe6d69fdcc xxx 2024-06-14 16:37:36 +02:00
Applevangelist
7a0f53ebf3 docu fix 2024-06-14 16:37:21 +02:00
Applevangelist
af17265efc Merge remote-tracking branch 'origin/develop' into develop 2024-06-11 10:21:32 +02:00
Applevangelist
12b8740bad Merge remote-tracking branch 'origin/master' into develop 2024-06-11 10:21:27 +02:00
Applevangelist
a2580122de Merge remote-tracking branch 'origin/master' into develop 2024-06-11 10:20:52 +02:00
Applevangelist
a6de09a0ca Fixes 2024-06-11 09:03:57 +02:00
Applevangelist
5e62791837 fixes 2024-06-11 09:02:31 +02:00
Frank
b60435fb2c Update ATIS.lua
- ATIS.Sound --> self.Sound
2024-06-09 22:47:43 +02:00
Frank
754430ba75 Merge branch 'master' into FF/MasterDevel 2024-06-09 21:31:58 +02:00
Applevangelist
85fc601a7a Merge remote-tracking branch 'origin/develop' into develop 2024-06-09 18:33:01 +02:00
Applevangelist
1d5f9cc4cc Merge remote-tracking branch 'origin/master' into develop 2024-06-09 18:32:57 +02:00
Applevangelist
5e3b50c158 Merge remote-tracking branch 'origin/develop' into develop 2024-06-09 18:32:32 +02:00
Applevangelist
2262f27d18 Merge remote-tracking branch 'origin/master' into develop 2024-06-09 18:32:28 +02:00
Applevangelist
4668132b37 #GROUP small fix 2024-06-09 18:32:10 +02:00
Frank
1fc526e80f Merge branch 'master' into develop 2024-06-09 17:59:14 +02:00
Frank
ceb77e2837 Update Event.lua
- Fixed isExist function does not exist for Kiowa Hellfire as reported by Special K
2024-06-09 17:58:57 +02:00
kaltokri
6f7a29d372 Merge branch 'master' into develop 2024-06-09 11:00:19 +02:00
kaltokri
137f0251fb Fixed error in documentation of UTILS.LoadFromFile 2024-06-09 10:59:58 +02:00
Frank
08745c910c ATIS
- custom sounds
2024-06-08 22:34:09 +02:00
Applevangelist
1d8658122a Merge remote-tracking branch 'origin/develop' into develop 2024-06-08 11:49:40 +02:00
Applevangelist
344eff535a Merge remote-tracking branch 'origin/master' into develop 2024-06-08 11:49:34 +02:00
Applevangelist
e375f3a401 Merge remote-tracking branch 'origin/master' into develop 2024-06-08 11:49:06 +02:00
Applevangelist
10986f8a0d #MANTIS - fix omission to set own name 2024-06-08 11:48:47 +02:00
Applevangelist
f4ae0c9547 #MANTIS - fix omission to set own name 2024-06-08 11:48:41 +02:00
Applevangelist
16dc3860f7 #MANTIS - fix omission to set own name 2024-06-08 11:48:27 +02:00
Applevangelist
4bddf16c82 Merge remote-tracking branch 'origin/develop' into develop 2024-06-07 16:05:44 +02:00
Applevangelist
cc414862a4 Merge remote-tracking branch 'origin/master' into develop 2024-06-07 16:05:40 +02:00
Applevangelist
1355f2f562 Merge remote-tracking branch 'origin/develop' into develop 2024-06-07 16:04:45 +02:00
Applevangelist
e620062a95 Merge remote-tracking branch 'origin/master' into develop 2024-06-07 16:04:41 +02:00
Applevangelist
333ed629bb Adding Kiowa support in CSAR und CTLD 2024-06-07 16:03:45 +02:00
Thomas
813b9d90aa Update Set.lua: added handler for EVENTS.PlayerLeaveUnit in SET_GROUP:FilterStart() (#2134) (#2136)
Ops.CSAR was throwing the following errors constantly when a player would leave the CSAR helo:

GROUP05000.GetDCSObject((ERROR: Could not get DCS group object of group Archer-1 because DCS object could not be found!))

This was because the SET_GROUP FilterStart on allheligroupset was not handling the scenario when a player left w/o a death.

Co-authored-by: Mike Young <117502908+DarthZyll@users.noreply.github.com>
2024-06-01 07:33:56 +02:00
Mike Young
c87e91d845 Update Set.lua: added handler for EVENTS.PlayerLeaveUnit in SET_GROUP:FilterStart() (#2134)
Ops.CSAR was throwing the following errors constantly when a player would leave the CSAR helo:

GROUP05000.GetDCSObject((ERROR: Could not get DCS group object of group Archer-1 because DCS object could not be found!))

This was because the SET_GROUP FilterStart on allheligroupset was not handling the scenario when a player left w/o a death.
2024-06-01 07:32:20 +02:00
Frank
5fc39daa9d Update Chief.lua
- added GetStrategy method
2024-05-28 23:54:39 +02:00
Applevangelist
09372df86d AUTOLASE - less menu builds 2024-05-27 18:31:14 +02:00
Applevangelist
26d0f2f4e3 xxx 2024-05-27 18:16:57 +02:00
Applevangelist
e010a13f85 Merge remote-tracking branch 'origin/develop' into develop 2024-05-27 17:09:47 +02:00
Applevangelist
cffca96755 Merge remote-tracking branch 'origin/master' into develop 2024-05-27 17:09:42 +02:00
Applevangelist
7c0605e82f Merge remote-tracking branch 'origin/master' into develop 2024-05-27 17:09:11 +02:00
Applevangelist
a847d890ba Small fixes 2024-05-27 17:08:05 +02:00
Applevangelist
778ae1b8e5 #MENU - small fix 2024-05-27 17:07:26 +02:00
Applevangelist
97635f4bba xxx 2024-05-27 17:07:12 +02:00
Frank
a6568a955f Update
- sound
2024-05-26 23:13:03 +02:00
Applevangelist
2657c3aa52 Merge remote-tracking branch 'origin/master' into develop 2024-05-26 12:59:33 +02:00
Applevangelist
1f1ab1664c Merge remote-tracking branch 'origin/master' into develop 2024-05-26 12:59:10 +02:00
Applevangelist
6df4fffafd Kola Airbase Names 2024-05-26 12:58:32 +02:00
Frank
7bac0f32fc Update
- Sound input
2024-05-25 01:56:23 +02:00
Applevangelist
17b1e08532 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Range.lua
2024-05-24 10:07:19 +02:00
Applevangelist
987f613aae Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Range.lua
2024-05-24 10:05:36 +02:00
Applevangelist
dead785133 Autolase 2024-05-24 10:04:08 +02:00
Thomas
dade17a67f Update Autolase.lua (#2133)
* Update Autolase.lua

Added menu option to change threatlevel lasing in the fly

* Update Autolase.lua

Menu option for lasing threat level
2024-05-24 10:03:27 +02:00
Applevangelist
64be0ffee5 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Range.lua
2024-05-23 18:13:05 +02:00
kaltokri
59ceb01d19 Fixed link in Func.Range to "476 vFG - Air Weapons Range Objects"
# Conflicts:
#	Moose Development/Moose/Functional/Range.lua
2024-05-21 19:49:27 +02:00
kaltokri
783e29f189 Fixed link in Func.Range to "476 vFG - Air Weapons Range Objects" 2024-05-21 16:50:33 +02:00
Applevangelist
c225456cd4 Merge remote-tracking branch 'origin/develop' into develop 2024-05-21 15:19:36 +02:00
Applevangelist
3ea3dfb486 Merge remote-tracking branch 'origin/master' into develop 2024-05-21 15:19:24 +02:00
Applevangelist
7dec189358 xxx 2024-05-21 15:18:57 +02:00
Applevangelist
42d8a9f59d #STRATEGO - Island hopping 2024-05-21 15:18:31 +02:00
Thomas
9e7caba089 Update Message.lua (#2130) (#2131)
the Label and port were not being pulled from MSRS Config, causing them to default to "MESSAGE" and 5002 when calling the MESSAGE.SetMSRS() function with no params

Co-authored-by: Mike Young <117502908+DarthZyll@users.noreply.github.com>
2024-05-21 06:41:28 +02:00
Mike Young
af39a3ae9c Update Message.lua (#2130)
the Label and port were not being pulled from MSRS Config, causing them to default to "MESSAGE" and 5002 when calling the MESSAGE.SetMSRS() function with no params
2024-05-21 06:37:05 +02:00
Applevangelist
9df6467cd1 Merge remote-tracking branch 'origin/develop' into develop 2024-05-20 11:16:57 +02:00
Applevangelist
399f9883a9 #STRATEGO, option in FindRoute to not optimize the route 2024-05-20 11:16:16 +02:00
Applevangelist
dd7c1a9245 xxx 2024-05-20 11:15:47 +02:00
Applevangelist
593f21bd3b xxx 2024-05-19 13:12:35 +02:00
Applevangelist
9815216bd5 xx 2024-05-19 13:12:09 +02:00
Applevangelist
da8a02465e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Menu.lua
#	Moose Development/Moose/Functional/Mantis.lua
2024-05-19 12:50:41 +02:00
Applevangelist
ce01534535 Merge remote-tracking branch 'origin/master' into develop 2024-05-19 12:48:09 +02:00
Applevangelist
639c5bc71a xxx 2024-05-19 12:47:54 +02:00
Applevangelist
aec65209d0 #STRATEGO 2024-05-19 12:47:31 +02:00
Niels Vaes
c985d40ca0 Fix when DCS adds duplicate points to the points table of a drawing resulting in wrong triangulation (#2128)
* Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle.

Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`

* Adding Shapes over from old MOOSE branch

* cleanup

* adding HEXtoRGBA

* removing Arrow.lua, it's part of Polygon.lua

* Fix when DCS adds duplicate points to the `points` table of a drawing, resulting in wrong triangulation
2024-05-19 12:46:17 +02:00
Applevangelist
d0ca76926e Merge remote-tracking branch 'origin/develop' into develop 2024-05-19 11:32:31 +02:00
Applevangelist
1fd15bcd4d Merge remote-tracking branch 'origin/master' into develop 2024-05-19 11:32:29 +02:00
Applevangelist
90b588420f #UTILS - Add Kola map to GMT function
#MANTIS - with checkforfriendlies, restrict to airborne ones
2024-05-19 11:32:00 +02:00
kaltokri
073e619015 Merge branch 'master' into develop 2024-05-18 16:57:41 +02:00
kaltokri
3a0d2a5c51 Added link in Core.Menu to the demo missions. 2024-05-18 16:57:28 +02:00
Applevangelist
d9528292af Merge remote-tracking branch 'origin/master' into develop 2024-05-16 17:56:36 +02:00
Applevangelist
07a76ced88 #MANTIS - added an option to do a friendly check in firing range before activitaing a SAM 2024-05-16 17:56:14 +02:00
Applevangelist
f022c87f25 #MANTIS - Option to avoid friendly fire 2024-05-16 17:55:05 +02:00
Applevangelist
5d8260b28e fix 2024-05-16 11:50:35 +02:00
Applevangelist
830dd05514 fix 2024-05-16 11:50:20 +02:00
Applevangelist
d432ec8105 Merge remote-tracking branch 'origin/develop' into develop 2024-05-16 09:55:24 +02:00
Applevangelist
7a24b491e9 Merge remote-tracking branch 'origin/master' into develop 2024-05-16 09:55:20 +02:00
Applevangelist
ca7949d8c4 Merge remote-tracking branch 'origin/master' into develop 2024-05-16 09:54:53 +02:00
Applevangelist
a3805118a0 #SPAWN - Fix for KeepUnitNames 2024-05-16 09:54:24 +02:00
Applevangelist
efca40d481 SPAWN - Fix for KeepUnitNames 2024-05-16 09:54:00 +02:00
Applevangelist
34fde09c12 #PLAYERTASKCONTROLLER - Added target elevation to task info 2024-05-16 09:34:29 +02:00
Applevangelist
0e40dc70b2 xxx 2024-05-16 09:34:03 +02:00
Applevangelist
52452b45b1 Merge remote-tracking branch 'origin/develop' into develop 2024-05-13 09:57:45 +02:00
Applevangelist
b9bfd781d0 Merge remote-tracking branch 'origin/master' into develop 2024-05-13 09:57:41 +02:00
Applevangelist
983d518a69 Merge remote-tracking branch 'origin/develop' into develop 2024-05-13 09:57:06 +02:00
Applevangelist
c14dec7412 Too much logging 2024-05-13 09:57:02 +02:00
Applevangelist
662885aaa6 xxx 2024-05-13 09:56:48 +02:00
Frank
f1c03e1b86 sound 2024-05-12 22:30:17 +02:00
Frank
78ab7547f3 Merge branch 'master' into develop 2024-05-11 09:51:00 +02:00
Frank
2e6957984f Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2024-05-11 09:50:01 +02:00
Frank
433a66d530 Airboss
- Get magnetic variation from DCS if require is available
- Added default magvar for Kola map
2024-05-11 09:49:59 +02:00
Applevangelist
5d67009b18 Merge remote-tracking branch 'origin/develop' into develop 2024-05-11 09:38:32 +02:00
Applevangelist
4ffe6a04c2 Merge remote-tracking branch 'origin/master' into develop 2024-05-11 09:38:28 +02:00
Applevangelist
7081448c40 Merge remote-tracking branch 'origin/master' into develop 2024-05-11 09:37:52 +02:00
Applevangelist
7d3ad15f39 #CTLD - Move troops to active Zones only 2024-05-11 09:37:28 +02:00
Applevangelist
dfca4d8bec xxx 2024-05-11 09:36:36 +02:00
Applevangelist
0bd245aee5 Merge remote-tracking branch 'origin/develop' into develop 2024-05-10 18:26:10 +02:00
Applevangelist
fe730da72f Merge remote-tracking branch 'origin/master' into develop 2024-05-10 18:26:06 +02:00
Frank
c7c1bcfff4 Merge branch 'master' into develop 2024-05-09 16:57:33 +02:00
Frank
d0728afee7 Update Airboss.lua
- Added C2 Greyhound radio call
2024-05-09 16:57:20 +02:00
Frank
4f25c9a408 Merge branch 'master' into develop 2024-05-09 16:03:11 +02:00
Frank
01330bf00c Merge pull request #2125 from FlightControl-Master/FF/MasterDevel
AIRBOSS intowind
2024-05-09 16:01:27 +02:00
Frank
01de638b8e Merge branch 'master' into FF/MasterDevel 2024-05-09 12:54:28 +02:00
Frank
3e8c7ad1df AIRBOSS into wind
- Added option to use the "old" into wind calculation `:SetIntoWindLegacy()`
2024-05-09 12:54:20 +02:00
Frank
22c6a03161 Update Airboss.lua 2024-05-09 11:09:29 +02:00
Applevangelist
4179e63e30 Merge remote-tracking branch 'origin/develop' into develop 2024-05-07 14:34:33 +02:00
Applevangelist
7868a2e9de #STRATEGO - Smarter route finding 2024-05-07 14:34:02 +02:00
Applevangelist
b1f3cda7f7 #STRATEGO - Smarter route finding 2024-05-07 14:33:49 +02:00
Applevangelist
522c5e4eaa Merge remote-tracking branch 'origin/develop' into develop 2024-05-06 19:02:07 +02:00
Applevangelist
1e9608de3a Merge remote-tracking branch 'origin/master' into develop 2024-05-06 19:02:02 +02:00
Applevangelist
04b4f7cc0f XXX 2024-05-06 19:01:42 +02:00
Applevangelist
b7db198125 Merge remote-tracking branch 'origin/master' into develop 2024-05-06 19:01:24 +02:00
Applevangelist
dd8b2caa24 #CSAR Nicer TTS output for MGRS coordinates 2024-05-06 19:01:02 +02:00
Frank
1e4cfd473c Update Airboss.lua 2024-05-06 16:11:33 +02:00
Applevangelist
00b8c39455 Merge remote-tracking branch 'origin/develop' into develop 2024-05-04 14:56:50 +02:00
Applevangelist
cd0e4bfb04 Merge remote-tracking branch 'origin/master' into develop 2024-05-04 14:56:46 +02:00
Applevangelist
4364cb8e53 Merge remote-tracking branch 'origin/master' into develop 2024-05-04 14:56:07 +02:00
Applevangelist
044fb66ca0 SPAWN
* Ensure InitCallSign creates a call sign name with a capital first letter, like "Enfield"
2024-05-04 14:54:20 +02:00
Applevangelist
ad882dd72e Merge remote-tracking branch 'origin/develop' into develop 2024-05-04 13:42:18 +02:00
Applevangelist
d4d0dcec61 Merge remote-tracking branch 'origin/master' into develop 2024-05-04 13:42:13 +02:00
Applevangelist
84857d2a32 Merge remote-tracking branch 'origin/master' into develop 2024-05-04 13:10:30 +02:00
Applevangelist
cc17027a7a #AIRBASE
- Added Kola map AFBs to enumerator
2024-05-04 13:09:58 +02:00
Applevangelist
2a33aa029d Merge remote-tracking branch 'origin/develop' into develop 2024-05-01 13:53:12 +02:00
Applevangelist
c72f96be19 Merge remote-tracking branch 'origin/master' into develop 2024-05-01 13:53:08 +02:00
Applevangelist
02db5ba532 Merge remote-tracking branch 'origin/master' into develop 2024-05-01 13:52:39 +02:00
Applevangelist
fc52e06318 #CSAR #CTLD - Added OH-6A 2024-05-01 13:52:10 +02:00
Applevangelist
e7f270630c Merge remote-tracking branch 'origin/develop' into develop 2024-04-30 09:21:27 +02:00
Applevangelist
29a3c0d554 Merge remote-tracking branch 'origin/master' into develop 2024-04-30 09:21:23 +02:00
Applevangelist
0f5f2658a6 Merge remote-tracking branch 'origin/master' into develop 2024-04-30 09:20:07 +02:00
Applevangelist
27d36f3e0d #BEACON - some fixes 2024-04-30 09:18:49 +02:00
Applevangelist
6df872eed2 Merge remote-tracking branch 'origin/develop' into develop 2024-04-29 16:46:50 +02:00
Thomas
9ce1b90eb1 STRATEGO (#2123)
Added option to set Capture Object Categories (ie static and/or units) to capture a node.
2024-04-29 10:50:48 +02:00
Applevangelist
38c19b1442 Merge remote-tracking branch 'origin/master' into develop 2024-04-27 17:29:41 +02:00
Applevangelist
bbae343b0e Merge remote-tracking branch 'origin/develop' into develop 2024-04-27 17:29:15 +02:00
Applevangelist
5f5b781f04 Merge remote-tracking branch 'origin/master' into develop 2024-04-27 17:29:11 +02:00
Applevangelist
8e99f37306 xxx 2024-04-27 17:28:50 +02:00
Applevangelist
d3419d218a #WEAPON - Added IsFoxOne().. IsFoxThree() 2024-04-27 17:28:36 +02:00
Thomas
2f34526c55 Update build-docs.yml 2024-04-24 13:26:51 +02:00
Thomas
f9dcc9d95c Update build-includes.yml 2024-04-24 13:21:24 +02:00
Thomas
ebc355ee6a Shapes - added images (#2122)
* Update Triangle.lua (#2121)

* Update Polygon.lua (#2120)

* Update Oval.lua (#2119)

* Update Line.lua (#2118)

* Update Cube.lua (#2117)

* Update Circle.lua (#2116)
2024-04-24 10:46:16 +02:00
Thomas
a0b49fbd67 Update Circle.lua (#2116) 2024-04-24 10:42:19 +02:00
Thomas
ae213c4cf1 Update Cube.lua (#2117) 2024-04-24 10:42:04 +02:00
Thomas
8dea86b921 Update Line.lua (#2118) 2024-04-24 10:41:49 +02:00
Thomas
44003a8fda Update Oval.lua (#2119) 2024-04-24 10:41:33 +02:00
Thomas
b883bb1e62 Update Polygon.lua (#2120) 2024-04-24 10:41:19 +02:00
Thomas
db35a67bd7 Update Triangle.lua (#2121) 2024-04-24 10:40:54 +02:00
Frank
1bfc98fa99 Merge pull request #2115 from FlightControl-Master/FF/OpsRat
RAT v3.0
2024-04-23 23:21:56 +02:00
Frank
efb687cbb5 Update Base.lua 2024-04-23 23:18:53 +02:00
Frank
668f12391e Merge branch 'develop' into FF/OpsRat 2024-04-23 23:12:31 +02:00
Frank
dfaccd6aa5 Update Message.lua 2024-04-23 23:12:17 +02:00
Applevangelist
2220f1829f #STRATEGO -- add SetStrategoZone 2024-04-23 10:13:09 +02:00
Applevangelist
65aeb56c2f #STRATEGO -- add SetStrategoZone 2024-04-23 10:12:11 +02:00
Applevangelist
47ad79b81d Merge remote-tracking branch 'origin/develop' into develop 2024-04-23 09:26:42 +02:00
Applevangelist
956035b856 Merge remote-tracking branch 'origin/master' into develop 2024-04-23 09:26:39 +02:00
Applevangelist
76fde11f47 Merge remote-tracking branch 'origin/master' into develop 2024-04-23 09:26:11 +02:00
Applevangelist
bc5946c76e #SHAPES a bit of extra docu 2024-04-23 09:25:47 +02:00
Applevangelist
c0ac5d1487 Merge remote-tracking branch 'origin/develop' into develop 2024-04-23 09:18:44 +02:00
Applevangelist
f8852ca759 Merge remote-tracking branch 'origin/master' into develop 2024-04-23 09:18:40 +02:00
Applevangelist
1f041a8acf Merge remote-tracking branch 'origin/master' into develop 2024-04-23 09:18:07 +02:00
Applevangelist
2f957899e1 xxx 2024-04-23 09:17:31 +02:00
Thomas
892cb90d62 Adding Shapes (#2114)
* Adding SHAPES (#2110)

* Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle.

Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`

* Adding Shapes over from old MOOSE branch

* cleanup

* adding HEXtoRGBA

* Revert "Adding SHAPES (#2110)" (#2112)

This reverts commit 26deaca166.

* Adding SHAPES (#2113)

* Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle.

Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`

* Adding Shapes over from old MOOSE branch

* cleanup

* adding HEXtoRGBA

* removing Arrow.lua, it's part of Polygon.lua

---------

Co-authored-by: Niels Vaes <nielsvaes@gmail.com>
2024-04-23 09:16:44 +02:00
Niels Vaes
3d7172fdf7 Adding SHAPES (#2113)
* Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle.

Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`

* Adding Shapes over from old MOOSE branch

* cleanup

* adding HEXtoRGBA

* removing Arrow.lua, it's part of Polygon.lua
2024-04-23 09:13:52 +02:00
Frank
3fa3644e1e ARMYGROUP
- on road fix
2024-04-21 10:58:13 +02:00
Thomas
28411d2093 Revert "Adding SHAPES (#2110)" (#2112)
This reverts commit 26deaca166.
2024-04-21 10:12:51 +02:00
Niels Vaes
26deaca166 Adding SHAPES (#2110)
* Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle.

Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`

* Adding Shapes over from old MOOSE branch

* cleanup

* adding HEXtoRGBA
2024-04-21 10:08:06 +02:00
Applevangelist
9b26ed7042 xxx 2024-04-20 16:21:19 +02:00
Applevangelist
1346317ad9 #STRATEGO - add functions to set weight, baseweight manually# 2024-04-20 16:21:02 +02:00
Applevangelist
05b547b640 Merge remote-tracking branch 'origin/develop' into develop 2024-04-19 15:59:46 +02:00
Applevangelist
afa8d9c4d1 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Spawn.lua
2024-04-19 15:59:41 +02:00
Applevangelist
e11bb71c2d Merge remote-tracking branch 'origin/master' into develop 2024-04-19 15:58:17 +02:00
Applevangelist
95baed1aac #GROUP - make GetCoordinate a bit more robust 2024-04-19 15:57:43 +02:00
Applevangelist
3b364c7650 #SPAWN - less noise 2024-04-19 15:57:21 +02:00
Applevangelist
672f1ae2d6 xxx 2024-04-19 15:57:02 +02:00
Applevangelist
0b607eb751 xx 2024-04-19 15:55:08 +02:00
Applevangelist
89d945037d xxx 2024-04-19 15:54:30 +02:00
Applevangelist
2a4e242eb2 #AI* minor fixes 2024-04-19 15:54:21 +02:00
Applevangelist
39471212d3 Merge remote-tracking branch 'origin/master' into develop 2024-04-19 15:45:33 +02:00
Applevangelist
8b2237d183 #CTLD small G fix 2024-04-19 15:45:11 +02:00
Applevangelist
6c1a4f1e0d Merge remote-tracking branch 'origin/master' into develop 2024-04-19 11:33:41 +02:00
Applevangelist
abc26b1e5c #CSAR Add'l logging 2024-04-19 11:33:15 +02:00
Applevangelist
235cbbe23a #CSAR - add'l logging 2024-04-19 11:32:35 +02:00
Applevangelist
f771607f40 Merge remote-tracking branch 'origin/develop' into develop 2024-04-18 18:42:04 +02:00
Applevangelist
2cf7047617 Merge remote-tracking branch 'origin/master' into develop 2024-04-18 18:41:58 +02:00
Applevangelist
b338f486e5 Merge remote-tracking branch 'origin/master' into develop 2024-04-18 18:41:29 +02:00
Applevangelist
b761078c18 XXX 2024-04-18 18:40:59 +02:00
Applevangelist
202d649085 Merge remote-tracking branch 'origin/master' into develop 2024-04-18 14:52:21 +02:00
Applevangelist
1beb5934c2 xxx 2024-04-18 14:51:53 +02:00
Applevangelist
616690391c SADL/STN conversion fix 2024-04-18 14:51:41 +02:00
Applevangelist
e1e0095d9b Merge remote-tracking branch 'origin/master' into develop 2024-04-18 14:42:12 +02:00
Applevangelist
5d00a2d806 xxx 2024-04-18 14:41:44 +02:00
Applevangelist
465c395294 SPAWN - Allow setting of "hidden" options 2024-04-18 14:41:29 +02:00
Applevangelist
5adb943939 SPAWN 2024-04-18 13:52:10 +02:00
Frank
a8cbf81851 Merge branch 'FF/Ops' into FF/OpsRat 2024-04-18 10:36:42 +02:00
Frank
0e78e9c92b Merge branch 'develop' into FF/Ops 2024-04-18 10:36:28 +02:00
Applevangelist
13309663fb Merge remote-tracking branch 'origin/develop' into develop 2024-04-18 09:33:16 +02:00
Applevangelist
4baa593fde Merge remote-tracking branch 'origin/master' into develop 2024-04-18 09:33:11 +02:00
Applevangelist
186b64ea81 #CTLD 2024-04-18 09:32:27 +02:00
Applevangelist
7c4d640690 Merge remote-tracking branch 'origin/master' into develop 2024-04-18 09:30:56 +02:00
Applevangelist
73bddddba4 #CTLD - ensure extracting troops are not diverted 2024-04-18 09:30:35 +02:00
Frank
833206a3b5 RAT
- Uncontrolled
2024-04-16 16:42:26 +02:00
Applevangelist
743baac945 Small fix for callsign not traversing from Squadron to Flightgroup 2024-04-16 16:01:43 +02:00
Applevangelist
0764d076db Housekeeping 2024-04-16 08:46:06 +02:00
Applevangelist
c9fd56116e Housekeeping 2024-04-16 08:45:53 +02:00
Applevangelist
e21240e711 Merge remote-tracking branch 'origin/develop' into develop 2024-04-15 18:56:07 +02:00
Applevangelist
99d32a7854 Merge remote-tracking branch 'origin/master' into develop 2024-04-15 18:56:03 +02:00
Applevangelist
620df5ad3e xx 2024-04-15 18:54:59 +02:00
Applevangelist
504aa19c03 Merge remote-tracking branch 'origin/master' into develop 2024-04-15 18:54:46 +02:00
Applevangelist
9a3effd063 Docu 2024-04-15 18:54:22 +02:00
Applevangelist
d4a49ae68b #CLIENTMENU/MANAGER
* Attempt to avoid dual menu builds for multi-seated aircraft
2024-04-15 12:52:19 +02:00
Applevangelist
b9cb6dbffb xxx 2024-04-15 12:50:15 +02:00
Applevangelist
be85aab755 Merge remote-tracking branch 'origin/develop' into develop 2024-04-15 08:59:15 +02:00
Applevangelist
fcb7a2c3e7 Merge remote-tracking branch 'origin/master' into develop 2024-04-15 08:59:11 +02:00
Applevangelist
ca1018f80b Merge remote-tracking branch 'origin/master' into develop 2024-04-15 08:58:37 +02:00
Niels Vaes
b9bd8d88a9 Adding a new TerminalType (100)that seems to be introduced in the update that brought Muwaffaq Salti. The base has a couple of spots (like 04, 05, 06) that can only accommodate smaller type fixed wing aircraft, like the F-16, but not bigger types like the Warthog of the Strike Eagle. (#2109)
Because we weren't checking for this new type, spawning in these particular spots always resulted in an airstart, because `_CheckTerminalType` would always return `false`
2024-04-15 08:57:28 +02:00
Frank
21412e0061 Update RAT.lua
- Added Stop function
2024-04-08 01:18:04 +02:00
Frank
5761e11157 Merge branch 'develop' into FF/OpsRat 2024-04-07 22:58:44 +02:00
Frank
7d3f1235e7 Update RAT.lua
- respawn on landing adjustment
2024-04-05 23:57:54 +02:00
Frank
473001c95b Update RAT.lua 2024-04-04 23:50:24 +02:00
Frank
532cc0b4df RAT
- options set via flightgroup
- fixed little bug in OPSGROUP emission default
2024-04-04 23:39:56 +02:00
Frank
08fb4e3736 Update RAT.lua
- Improved ATC and FLIGHTCONTROL integration
2024-04-04 19:08:18 +02:00
Applevangelist
6b7e66efa5 Merge remote-tracking branch 'origin/master' into develop 2024-04-04 17:23:08 +02:00
Applevangelist
18fd587ab0 xx 2024-04-04 17:22:46 +02:00
Frank
5fd8139f00 Update RAT.lua
- RATMANAGER
2024-04-04 14:21:52 +02:00
Frank
ac68744deb Merge branch 'FF/Ops' into FF/OpsRat 2024-04-04 09:36:13 +02:00
Frank
cec02bc44f Merge branch 'develop' into FF/Ops 2024-04-04 09:34:37 +02:00
Frank
a924a0b641 Update RAT.lua 2024-04-03 21:56:24 +02:00
Frank
ee15b04142 Update RAT.lua 2024-04-03 14:27:10 +02:00
Frank
2c67a66d88 Update RAT.lua 2024-04-02 23:18:30 +02:00
Frank
1fdb3b7daa RAT
- Improved respawn/despawn
- Added stuck check
2024-04-02 17:33:41 +02:00
Applevangelist
483cf09676 xxx 2024-04-02 13:23:36 +02:00
Applevangelist
181ed6046e Merge remote-tracking branch 'origin/master' into develop 2024-04-02 13:23:21 +02:00
Applevangelist
ba14330281 Fix for counting alive target units only 2024-04-02 13:22:54 +02:00
Applevangelist
8ca9c4e7b8 Merge remote-tracking branch 'origin/develop' into develop 2024-04-02 10:50:06 +02:00
Applevangelist
bd28c10492 Merge remote-tracking branch 'origin/master' into develop 2024-04-02 10:50:01 +02:00
Applevangelist
4c890d18d1 Merge remote-tracking branch 'origin/master' into develop 2024-04-02 10:48:57 +02:00
Applevangelist
2eb4118d56 xxx 2024-04-02 10:47:58 +02:00
Applevangelist
67d53034df bugfix 2024-04-01 19:11:53 +02:00
Applevangelist
355230a97f xxx 2024-04-01 19:11:33 +02:00
Applevangelist
bde5859879 Merge remote-tracking branch 'origin/develop' into develop 2024-04-01 13:30:30 +02:00
Applevangelist
630e02f1ce Merge remote-tracking branch 'origin/master' into develop 2024-04-01 13:30:26 +02:00
Applevangelist
b4d1118c88 Merge remote-tracking branch 'origin/master' into develop 2024-04-01 12:59:39 +02:00
Applevangelist
dcc15afb89 xxx 2024-04-01 12:59:14 +02:00
Applevangelist
1ea2f091e0 Fix 2024-04-01 12:58:20 +02:00
Frank
a5632ec3a4 RAT
- More cleanup

OPSGROUP
- Fixed group init (masterunit)
2024-03-31 23:33:37 +02:00
Frank
0804a3567a Merge branch 'develop' into FF/Ops 2024-03-30 22:34:13 +01:00
Frank
ef8c71d27c RAT
- FLIGHTCONTROL
- RAT ATC
2024-03-30 22:22:00 +01:00
Frank
879ea847e9 RAT v3
- improved stuff for helos
2024-03-29 21:54:13 +01:00
Frank
be3c418919 Update RAT.lua
- Improved keeping parking spot after respawn
- Improved ratcraft object
2024-03-28 23:15:50 +01:00
Applevangelist
7aa252e42f xxx 2024-03-28 11:13:13 +01:00
Applevangelist
be3db86470 Merge remote-tracking branch 'origin/master' into develop 2024-03-28 11:12:57 +01:00
Applevangelist
67b43e2c68 #CTLD - Extract troops makes troops run towards the helo 2024-03-28 11:12:23 +01:00
Applevangelist
577fefab3a Merge remote-tracking branch 'origin/master' into develop 2024-03-28 08:45:18 +01:00
Applevangelist
2ad111dd50 #CTLD - allow availability of crates restriction to one zone 2024-03-28 08:44:54 +01:00
Applevangelist
a52df9ae9a xxx 2024-03-28 08:44:12 +01:00
Frank
2c749bf5c9 Merge branch 'develop' into FF/Ops 2024-03-27 22:25:54 +01:00
Frank
24eaa7441c Update RAT.lua 2024-03-27 22:15:17 +01:00
Applevangelist
1b072e11ad xxx 2024-03-27 18:00:50 +01:00
Applevangelist
0dec9418ca Merge remote-tracking branch 'origin/develop' into develop 2024-03-27 14:41:48 +01:00
Applevangelist
9a2174ac2b Merge remote-tracking branch 'origin/master' into develop 2024-03-27 14:41:43 +01:00
Applevangelist
523375c765 Merge remote-tracking branch 'origin/master' into develop 2024-03-27 14:41:11 +01:00
Applevangelist
371b100672 xxx 2024-03-27 14:40:47 +01:00
Applevangelist
ac42b56b8e nil check 2024-03-27 14:40:34 +01:00
Frank
82f4c9d526 Update RAT.lua 2024-03-26 22:26:58 +01:00
Applevangelist
eac87c97af Merge remote-tracking branch 'origin/develop' into develop 2024-03-25 18:26:49 +01:00
Applevangelist
00dc9969b6 Merge remote-tracking branch 'origin/master' into develop 2024-03-25 18:26:45 +01:00
Applevangelist
5b8416d5fd Merge remote-tracking branch 'origin/master' into develop 2024-03-25 18:26:17 +01:00
Niels Vaes
874fa7ad69 Fixing a bug where on a rare condition, an A10CII could be spawned and the SpawnInitSADL of the Spawn object wouldn't be set correctly (#2108) 2024-03-25 17:26:44 +01:00
Frank
2205100942 RAT 2024-03-24 22:51:11 +01:00
Frank
801475e146 Merge branch 'FF/Ops' into FF/OpsRat 2024-03-24 17:59:27 +01:00
Frank
d7ee243a00 Merge branch 'develop' into FF/Ops 2024-03-24 17:59:06 +01:00
Frank
a105ddba3d Merge branch 'master' into develop 2024-03-24 17:58:13 +01:00
Frank
70c29de695 Update Airbase.lua
- Fixed docs of airbase enumerators for SouthAtlantic (was Falklands) and Sinai (was SinaiMap)
2024-03-24 17:58:02 +01:00
Frank
d5ceabadb0 Merge branch 'develop' into FF/Ops 2024-03-24 17:23:02 +01:00
Applevangelist
f3ec69ac2a Merge remote-tracking branch 'origin/develop' into develop 2024-03-24 13:27:52 +01:00
Applevangelist
8a6cbeda74 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2024-03-24 13:27:46 +01:00
Applevangelist
8bd39b41f4 Merge remote-tracking branch 'origin/master' into develop 2024-03-24 13:25:00 +01:00
Applevangelist
b263cddc07 #MSRS - Fix for explicit Voice setting actually overwriting overall settings of a provider. 2024-03-24 13:24:38 +01:00
Applevangelist
13cdb77957 xxx 2024-03-24 13:22:54 +01:00
Applevangelist
caedc314b7 xx 2024-03-23 15:12:16 +01:00
Applevangelist
a712d74e2e Merge remote-tracking branch 'origin/master' into develop 2024-03-23 14:59:20 +01:00
Applevangelist
613d33d731 #SCORING - added option to give a file path for saving and an option to switch autosave off 2024-03-23 14:58:54 +01:00
Applevangelist
d7963bb161 xx 2024-03-22 16:04:58 +01:00
Applevangelist
e86afefe79 xxx 2024-03-22 09:27:58 +01:00
Applevangelist
c7e694dfb8 #AWACS - fix for too many TAC/MELD/THREAT calls 2024-03-22 09:27:40 +01:00
Applevangelist
d6c9195555 Merge remote-tracking branch 'origin/master' into develop 2024-03-22 08:56:28 +01:00
Applevangelist
50298e4109 Fix for unknown Threat Type 2024-03-22 08:56:00 +01:00
Frank
1253e241ff Merge branch 'develop' into FF/Ops 2024-03-19 18:04:03 +01:00
Applevangelist
d4daa54210 Merge remote-tracking branch 'origin/develop' into develop 2024-03-16 12:37:51 +01:00
Applevangelist
5c3081a7eb Merge remote-tracking branch 'origin/master' into develop 2024-03-16 12:37:48 +01:00
Applevangelist
3389d3284a Fix self.speedmax for immobile groups 2024-03-16 12:37:11 +01:00
Applevangelist
b10819220c Merge remote-tracking branch 'origin/master' into develop 2024-03-15 10:26:18 +01:00
Applevangelist
b66ff35b63 #minor fixes 2024-03-15 10:25:58 +01:00
Applevangelist
244abe2bbb #Minor Fixes 2024-03-15 10:25:40 +01:00
Applevangelist
6ae2f6f105 Merge remote-tracking branch 'origin/develop' into develop 2024-03-13 09:09:32 +01:00
Applevangelist
c4deb317bd Merge remote-tracking branch 'origin/master' into develop 2024-03-13 09:09:28 +01:00
Applevangelist
4b1a1cbcff Merge remote-tracking branch 'origin/master' into develop 2024-03-13 09:09:02 +01:00
Applevangelist
378e76e45b Added UTILS.ClockHeadingString(refHdg,tgtHdg) thanks to @statua 2024-03-13 09:08:39 +01:00
Applevangelist
f7f28877da Fix for speed nil in ops groups 2024-03-13 07:39:56 +01:00
Applevangelist
ada8629c01 Fix for speed nil 2024-03-13 07:38:56 +01:00
Applevangelist
efd48c87e9 Merge remote-tracking branch 'origin/develop' into develop 2024-03-12 15:35:26 +01:00
Applevangelist
35c1a76675 Merge remote-tracking branch 'origin/master' into develop 2024-03-12 15:35:22 +01:00
Applevangelist
e3d2dec91f Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2024-03-12 15:34:53 +01:00
Thomas
470c4ef13c Update Controllable.lua 2024-03-12 11:54:44 +01:00
Thomas
241b31fcec Update Controllable.lua 2024-03-12 11:26:59 +01:00
Thomas
3dd069d7d6 Update Controllable.lua
Docu adjustments
2024-03-12 11:25:33 +01:00
Thomas
77c4fd7696 Update Controllable.lua (#2105) (#2106)
Added setting of AI radio options
2024-03-12 11:20:57 +01:00
Thomas
aca4e4d7ca Update Controllable.lua (#2105)
Added setting of AI radio options
2024-03-12 10:49:06 +01:00
Applevangelist
edf445de1a Merge remote-tracking branch 'origin/develop' into develop 2024-03-11 18:20:16 +01:00
Applevangelist
5b1cc052b6 Merge remote-tracking branch 'origin/master' into develop 2024-03-11 18:20:13 +01:00
Applevangelist
dcd278e2a1 Merge remote-tracking branch 'origin/master' into develop 2024-03-11 18:19:44 +01:00
Applevangelist
2f81fcb0c0 #STATIC
* Add :FindByMatching() and :FindAllByMatching()
2024-03-11 18:19:19 +01:00
Applevangelist
8cf11de774 #SPAWN
* Small change to keep unitnames when using Razbam's setting IFF via unit names
2024-03-11 18:18:50 +01:00
Applevangelist
ebb58cd976 xxx 2024-03-11 18:18:00 +01:00
Applevangelist
e32b393f39 Merge remote-tracking branch 'origin/develop' into develop 2024-03-11 08:31:06 +01:00
Applevangelist
3d073891bc Merge remote-tracking branch 'origin/master' into develop 2024-03-11 08:31:02 +01:00
Applevangelist
b62f2afd8d Merge remote-tracking branch 'origin/master' into develop 2024-03-11 08:30:22 +01:00
Applevangelist
176bd0eb8b xx 2024-03-11 08:29:56 +01:00
Applevangelist
078137af4b Merge remote-tracking branch 'origin/develop' into develop 2024-03-10 18:00:39 +01:00
Applevangelist
0172772ead Merge remote-tracking branch 'origin/master' into develop 2024-03-10 18:00:36 +01:00
Applevangelist
70ee6a1121 Merge remote-tracking branch 'origin/master' into develop 2024-03-10 18:00:02 +01:00
Applevangelist
10edd2f9d0 xxx 2024-03-10 17:59:26 +01:00
Applevangelist
fa3a805172 Merge remote-tracking branch 'origin/develop' into develop 2024-03-10 16:53:34 +01:00
Applevangelist
b7ef0e57ab Merge remote-tracking branch 'origin/master' into develop 2024-03-10 16:53:31 +01:00
Applevangelist
408321decf Merge remote-tracking branch 'origin/master' into develop 2024-03-10 16:53:05 +01:00
Applevangelist
11acb578f6 #SPAWN
* Fix an issue for SPAWN:NewFromTemplate when re-using same template over and again
2024-03-10 16:52:46 +01:00
Applevangelist
5881aa0ad3 #SPAWN
* Fix an issue for SPAWN:NewFromTemplate when re-using same template over and again
2024-03-10 16:52:03 +01:00
Applevangelist
755dde8e10 Merge remote-tracking branch 'origin/develop' into develop 2024-03-10 16:20:59 +01:00
Applevangelist
1856f89cf9 Merge remote-tracking branch 'origin/master' into develop 2024-03-10 16:20:56 +01:00
Applevangelist
383eff4cd6 Merge remote-tracking branch 'origin/develop' into develop 2024-03-10 16:20:32 +01:00
Applevangelist
6cda61c9dd Merge remote-tracking branch 'origin/master' into develop 2024-03-10 16:20:29 +01:00
Applevangelist
4d8abe7f57 #MARKEROPS_BASE
* Fix event coalition
2024-03-10 16:20:06 +01:00
Applevangelist
fc5d540ec6 #MARKEROPS
* Coalition in events fix
2024-03-10 16:19:29 +01:00
Applevangelist
032e73d382 Merge remote-tracking branch 'origin/develop' into develop 2024-03-09 17:24:58 +01:00
Applevangelist
c6bb7c8bbd Merge remote-tracking branch 'origin/develop' into develop-2 2024-03-09 17:24:47 +01:00
Applevangelist
bd3042410b ccc 2024-03-09 17:24:32 +01:00
Applevangelist
7c9cf96d2e OPSGROUP extra check 2024-03-09 17:24:15 +01:00
Applevangelist
5bf70d9950 Merge remote-tracking branch 'origin/develop' into develop 2024-03-08 10:07:30 +01:00
Applevangelist
94ca67feb9 Merge remote-tracking branch 'origin/master' into develop 2024-03-08 10:07:26 +01:00
Applevangelist
ef30bd36a5 Merge remote-tracking branch 'origin/master' into develop 2024-03-08 10:06:51 +01:00
Applevangelist
5286926609 xx 2024-03-08 10:06:31 +01:00
Applevangelist
ab14fbd11c #MARKEROPS - Added Coalition on FSM events 2024-03-08 10:06:16 +01:00
Applevangelist
1ef50f45f1 Merge remote-tracking branch 'origin/develop' into develop 2024-03-07 10:21:23 +01:00
Applevangelist
d76cd91d50 Merge remote-tracking branch 'origin/master' into develop 2024-03-07 10:21:19 +01:00
Applevangelist
5bde0c7605 Merge remote-tracking branch 'origin/develop' into develop 2024-03-07 10:20:56 +01:00
Applevangelist
4f2d8144e9 Merge remote-tracking branch 'origin/master' into develop 2024-03-07 10:20:53 +01:00
Applevangelist
cb61177252 CSAR/CTLD basic support for MH-60R 2024-03-07 10:20:31 +01:00
Applevangelist
d7fd9d0968 xxx 2024-03-07 10:20:02 +01:00
kaltokri
736204d163 Merge branch 'master' into develop 2024-03-05 22:29:36 +01:00
kaltokri
1e15509001 Fixed broken link to demo mission 2024-03-05 22:29:28 +01:00
kaltokri
cca6b0cf55 Merge branch 'master' into develop 2024-03-05 22:11:34 +01:00
kaltokri
bfa8719ec3 Updated versions of all GitHub actions 2024-03-05 22:11:20 +01:00
Applevangelist
9e112e6f2c Merge remote-tracking branch 'origin/develop' into develop 2024-03-05 16:39:32 +01:00
Applevangelist
a51329d3e7 xxx 2024-03-05 16:39:08 +01:00
Applevangelist
fd0e6053ee #COMMANDER - remove dual AltToKIAS calc for TankerZone etc 2024-03-05 16:38:45 +01:00
Applevangelist
f99eac0de4 Merge remote-tracking branch 'origin/develop' into develop 2024-03-05 10:35:23 +01:00
Applevangelist
89b06fb7a6 Merge remote-tracking branch 'origin/master' into develop 2024-03-05 10:35:18 +01:00
Applevangelist
7a19a81985 Merge remote-tracking branch 'origin/develop' into develop 2024-03-05 10:34:50 +01:00
Applevangelist
e359640bfd Merge remote-tracking branch 'origin/master' into develop 2024-03-05 10:34:46 +01:00
Applevangelist
b3f7991269 xxx 2024-03-05 10:34:27 +01:00
Applevangelist
3652376d42 #CTLD - Slight position spawn variation in case you drop > 1 troop groups 2024-03-05 10:34:15 +01:00
kaltokri
3d1207a079 Merge branch 'master' into develop 2024-03-02 15:07:53 +01:00
kaltokri
3953f0e7fc Moved demo missions of Wrapper.Weapon to new repo 2024-03-02 15:07:45 +01:00
Applevangelist
1f18b6e2a9 Merge remote-tracking branch 'origin/develop' into develop 2024-03-02 14:27:02 +01:00
Applevangelist
43bc4ba681 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/SpawnStatic.lua
2024-03-02 14:26:58 +01:00
Applevangelist
b34597d732 xxx 2024-03-02 14:25:56 +01:00
Applevangelist
3e727f7777 Merge remote-tracking branch 'origin/develop' into develop 2024-03-02 14:25:42 +01:00
Applevangelist
5621579b5e fix 2024-03-02 14:24:55 +01:00
Applevangelist
091083b5aa #AWACS
* Fix tac radios when using an AWACS plane
* AWACS info shows STN set
2024-03-02 14:24:39 +01:00
kaltokri
b0d0fb9ae1 Merge branch 'master' into develop 2024-03-01 17:22:33 +01:00
kaltokri
57ce6bcec2 Switched demo mission link in Core/SpawnStatic and Wrapper/Storage 2024-03-01 17:22:22 +01:00
Applevangelist
503ca091f9 Merge remote-tracking branch 'origin/develop' into develop 2024-03-01 08:35:48 +01:00
Applevangelist
08ebcbf11d Merge remote-tracking branch 'origin/master' into develop 2024-03-01 08:35:44 +01:00
Applevangelist
7a1cfa9fe3 Merge remote-tracking branch 'origin/master' into develop 2024-03-01 08:35:13 +01:00
Applevangelist
71b5492903 Scoring 2024-03-01 08:34:52 +01:00
Applevangelist
7239e2c5fa Merge remote-tracking branch 'origin/develop' into develop 2024-03-01 08:24:25 +01:00
Applevangelist
a7fcc95b71 Merge remote-tracking branch 'origin/master' into develop 2024-03-01 08:24:22 +01:00
Applevangelist
5ff4d84a9a Merge remote-tracking branch 'origin/develop' into develop 2024-03-01 08:23:53 +01:00
Applevangelist
c71d0ed7cf Merge remote-tracking branch 'origin/master' into develop 2024-03-01 08:23:50 +01:00
Applevangelist
d64dadd9a9 docu 2024-03-01 08:23:32 +01:00
kaltokri
370bfc893d Merge branch 'master' into develop 2024-02-29 19:52:36 +01:00
kaltokri
0f30f3b1a0 Added link to Wrapper/Group demo missions 2024-02-29 19:52:23 +01:00
kaltokri
50e55e1df2 Merge branch 'master' into develop 2024-02-29 19:00:55 +01:00
kaltokri
51911d3292 Enhanced documentation of InitRandomizePositionZone
InitRandomizePositionZone will not ensure, that every unit is placed within the zone!
2024-02-29 19:00:33 +01:00
kaltokri
bff60bdb69 Update of all Airbases (uptodate and sorted) 2024-02-29 10:33:29 +01:00
kaltokri
219353faad Update of all Airbases (uptodate and sorted) 2024-02-29 10:33:21 +01:00
Applevangelist
66d00331ae Merge remote-tracking branch 'origin/develop' into develop 2024-02-29 09:55:50 +01:00
Applevangelist
5746213850 Merge remote-tracking branch 'origin/master' into develop 2024-02-29 09:55:46 +01:00
Applevangelist
4c4ecccb01 Merge remote-tracking branch 'origin/develop' into develop 2024-02-29 09:55:12 +01:00
Applevangelist
0e1cbe45b9 Merge remote-tracking branch 'origin/master' into develop 2024-02-29 09:54:38 +01:00
Applevangelist
aac3f64638 #SCORING Additions for SETs 2024-02-29 09:54:16 +01:00
Applevangelist
d9cfaaaa0d SCORING 2024-02-29 09:53:46 +01:00
kaltokri
34937c2cf6 Merge branch 'master' into develop 2024-02-28 19:43:26 +01:00
kaltokri
74c19f1058 Added new airfields in Normandy 2024-02-28 19:43:08 +01:00
kaltokri
42ca05af57 Merge branch 'master' into develop 2024-02-28 17:39:25 +01:00
kaltokri
1cbdafda65 Added link to demo missions for Functional.Fox 2024-02-28 17:39:06 +01:00
kaltokri
960746245f Merge branch 'master' into develop 2024-02-28 17:34:51 +01:00
kaltokri
595b9132e8 Added additional information to FOX:AddProtectedGroup method 2024-02-28 17:34:40 +01:00
Applevangelist
a472c4b3f8 Merge remote-tracking branch 'origin/develop' into develop 2024-02-27 18:15:09 +01:00
Applevangelist
1f220cab3e Merge remote-tracking branch 'origin/master' into develop 2024-02-27 18:15:06 +01:00
Applevangelist
4b50d8f16f Merge remote-tracking branch 'origin/develop' into develop 2024-02-27 18:14:40 +01:00
Applevangelist
c320f1a0a7 Merge remote-tracking branch 'origin/master' into develop 2024-02-27 18:14:34 +01:00
Applevangelist
82b5269040 #BRIGADE Fixes to save/loadback assets for persistence 2024-02-27 18:14:11 +01:00
Applevangelist
45aebff48e #BRIGADE Fixes to save/loadback assets for persistence 2024-02-27 18:13:59 +01:00
Applevangelist
1e954de951 #BRIGADE Fixes to save/loadback assets for persistence 2024-02-27 18:13:41 +01:00
kaltokri
80bf992806 Merge branch 'master' into develop 2024-02-27 16:38:42 +01:00
kaltokri
f2e22579ed Added workaround for PatrolRoute problem
Units may stay on initial point and cycle endless if Delay is smaller then 2.
2024-02-27 16:38:20 +01:00
Applevangelist
c36dbe1b09 Merge remote-tracking branch 'origin/develop' into develop 2024-02-27 10:28:56 +01:00
Applevangelist
93e344732c Merge remote-tracking branch 'origin/master' into develop 2024-02-27 10:28:52 +01:00
Applevangelist
2dc908d926 Merge remote-tracking branch 'origin/master' into develop 2024-02-27 10:28:30 +01:00
Applevangelist
1f9725530f #CTLD - Added option to inject cargo objects which will not show up in the menu - for inject and move around purposes. 2024-02-27 10:28:00 +01:00
Applevangelist
d291e7417d CTLD 2024-02-27 10:19:48 +01:00
Applevangelist
d3e6b0366b Merge remote-tracking branch 'origin/master' into develop 2024-02-25 11:58:12 +01:00
Applevangelist
ad155ab071 Merge remote-tracking branch 'origin/develop' into develop 2024-02-25 11:57:34 +01:00
Applevangelist
ab56f903c2 Merge remote-tracking branch 'origin/master' into develop 2024-02-25 11:57:30 +01:00
kaltokri
1545add510 Enhancement of troubleshooting tips in the docs 2024-02-24 22:25:26 +01:00
kaltokri
c85f575888 Enhancement of troubleshooting tips in the docs 2024-02-24 22:24:20 +01:00
kaltokri
9f8428c7ba Merge branch 'master' into develop 2024-02-24 22:04:42 +01:00
kaltokri
5eef138507 Enhancement of the docs 2024-02-24 22:04:10 +01:00
kaltokri
8c6c1e481b Merge branch 'master' into develop 2024-02-24 14:26:45 +01:00
kaltokri
14d6085b69 Added error message, that AATACAN is depricated 2024-02-24 14:26:30 +01:00
Rolf Geuenich
d13173e336 Added Links to new demo mission repository 2024-02-23 11:33:50 +01:00
Rolf Geuenich
ced01a993d Added Links to new demo mission repository 2024-02-23 11:33:02 +01:00
Applevangelist
04b2e9459d Merge remote-tracking branch 'origin/develop' into develop 2024-02-23 11:17:10 +01:00
Applevangelist
fd63edad37 Merge remote-tracking branch 'origin/master' into develop 2024-02-23 11:17:07 +01:00
Applevangelist
fa80f0a162 Merge remote-tracking branch 'origin/master' into develop 2024-02-23 11:16:36 +01:00
Applevangelist
02e59b23c5 #AIRBASE - New Syria airbases added 2024-02-23 11:15:46 +01:00
Applevangelist
6e12e8f9b9 #AIRBASE - New Syria airbases added 2024-02-23 11:15:29 +01:00
Frank
80b2b26018 Merge branch 'FF/OpsRat' of https://github.com/FlightControl-Master/MOOSE into FF/OpsRat 2024-02-23 00:31:19 +01:00
Frank
e3f523d648 Update RAT.lua 2024-02-23 00:31:15 +01:00
Applevangelist
bf82cd9e2a Merge remote-tracking branch 'origin/develop' into develop 2024-02-22 17:29:21 +01:00
Applevangelist
5b86bf9605 #AWACS - Added a warning to set up SRS before Tac Radios 2024-02-22 17:28:44 +01:00
Applevangelist
b952161794 warning 2024-02-22 17:28:09 +01:00
Applevangelist
b2e3e23182 Merge remote-tracking branch 'origin/develop' into develop 2024-02-22 12:15:26 +01:00
Applevangelist
13c0a42d5b Merge remote-tracking branch 'origin/master' into develop 2024-02-22 12:15:23 +01:00
Applevangelist
c5ece16753 Merge remote-tracking branch 'origin/master' into develop 2024-02-22 12:14:44 +01:00
Applevangelist
4c2a89ee29 Bugfix 2024-02-22 12:14:15 +01:00
Applevangelist
a734cb8a7e xxx 2024-02-22 12:14:03 +01:00
Applevangelist
7d708339a5 Merge remote-tracking branch 'origin/develop' into develop 2024-02-22 11:54:08 +01:00
Applevangelist
43e30ce426 Merge remote-tracking branch 'origin/master' into develop 2024-02-22 11:54:03 +01:00
Applevangelist
4505b60859 Merge remote-tracking branch 'origin/master' into develop 2024-02-22 11:53:24 +01:00
Applevangelist
fdfc21187c sss 2024-02-22 11:52:54 +01:00
Applevangelist
e8c75b8795 SPAWN:InitSpeedMPS() etc 2024-02-22 11:52:43 +01:00
Applevangelist
59c5acc1f2 Merge remote-tracking branch 'origin/develop' into develop 2024-02-22 09:21:03 +01:00
Applevangelist
1c293c2f62 Merge remote-tracking branch 'origin/master' into develop 2024-02-22 09:20:59 +01:00
Applevangelist
7e21a1070a Merge remote-tracking branch 'origin/master' into develop 2024-02-22 09:19:43 +01:00
Applevangelist
2ce9f26e26 Docu 2024-02-22 09:19:22 +01:00
Applevangelist
bfaca9dd5f Merge remote-tracking branch 'origin/master' into develop 2024-02-22 09:01:23 +01:00
Applevangelist
30819dad72 Catch for invalid STN/SADL octals 2024-02-22 09:00:54 +01:00
Applevangelist
0ad2226e47 Merge remote-tracking branch 'origin/develop' into develop 2024-02-20 14:39:39 +01:00
Applevangelist
5246647d62 Merge remote-tracking branch 'origin/master' into develop 2024-02-20 14:39:34 +01:00
Applevangelist
e946916fc0 Merge remote-tracking branch 'origin/master' into develop 2024-02-20 14:32:17 +01:00
Applevangelist
2eeca4451c SPAWN/DATABASE
* Try to ensure unique Link16 STN/SADL octal IDs
* Added `SPAWN:InitSTN(Octal)` and `SPAWN:InitSADL(Octal)`
2024-02-20 14:31:53 +01:00
Applevangelist
1f74899f8a SPAWN/DATABASE - try to ensure unique STN/SADL numbers 2024-02-20 14:27:54 +01:00
Applevangelist
e97a5493e4 Merge remote-tracking branch 'origin/develop' into develop 2024-02-20 12:09:23 +01:00
Applevangelist
fa3e73e577 Merge remote-tracking branch 'origin/master' into develop 2024-02-20 12:09:20 +01:00
Applevangelist
ee17d3e995 Merge remote-tracking branch 'origin/develop' into develop 2024-02-20 12:08:33 +01:00
Applevangelist
a48e09b434 Merge remote-tracking branch 'origin/master' into develop 2024-02-20 12:08:27 +01:00
Applevangelist
27ea85ea57 Minor fixes 2024-02-20 12:07:42 +01:00
Applevangelist
15cee84695 Minor fixes 2024-02-20 12:07:08 +01:00
Thomas
3baf52d307 Update Airbase.lua (#2104)
One space too many fix gor Deanland
2024-02-18 20:13:52 +01:00
Thomas
0faa0036ee Update Airbase.lua
One space too many fix gor Deanland
2024-02-18 20:13:01 +01:00
Applevangelist
7c483b4bb6 Merge remote-tracking branch 'origin/develop' into develop 2024-02-18 12:38:25 +01:00
Applevangelist
9f2f1c7de7 Merge remote-tracking branch 'origin/master' into develop 2024-02-18 12:38:21 +01:00
kaltokri
79189d4d93 Merge branch 'master' into develop 2024-02-17 18:50:46 +01:00
kaltokri
f859522052 Switched link of MSRS missions to MISSION_Demos 2024-02-17 18:50:30 +01:00
Thomas
8d886a75d6 Update Airboss.lua (#2101)
Groove def
2024-02-17 13:12:25 +01:00
Thomas
5a772ad05e Update Airboss.lua
Groove def
2024-02-17 13:10:07 +01:00
Applevangelist
62b2a9197b Merge remote-tracking branch 'origin/develop' into develop 2024-02-16 14:10:14 +01:00
Applevangelist
3b139a92fb xxx 2024-02-16 14:09:42 +01:00
Applevangelist
a16e22818d Merge remote-tracking branch 'origin/develop' into develop 2024-02-16 14:09:18 +01:00
Applevangelist
0cc959bf34 #STRATEGO
* Exclude Ships as they cannot be conquered anyway
* Streamline target finding a bit
2024-02-16 14:09:14 +01:00
Frank
2fcb31f3ac Update RAT.lua 2024-02-16 00:11:43 +01:00
Applevangelist
e3e101b8ff Merge remote-tracking branch 'origin/develop' into develop 2024-02-15 18:18:44 +01:00
Applevangelist
525a11d21d Merge remote-tracking branch 'origin/master' into develop 2024-02-15 18:18:39 +01:00
Applevangelist
aa948b57d8 Merge remote-tracking branch 'origin/develop' into develop-2 2024-02-15 18:18:23 +01:00
Applevangelist
6ca459b38c xx 2024-02-15 18:18:19 +01:00
Applevangelist
79da4cbf27 Merge remote-tracking branch 'origin/develop' into develop 2024-02-15 18:17:48 +01:00
Applevangelist
e5a60a2ef1 #AWACS
* Ensure not only one Merged-Call
* Enable Tac, Meld, Threat calls also for non-tasked flights
2024-02-15 18:17:44 +01:00
kaltokri
7e2ae60e43 Merge branch 'master' into develop 2024-02-15 16:48:40 +01:00
kaltokri
51f134538d Fixing typos and added text for Automatic dynamic loading and IDEs 2024-02-15 16:47:43 +01:00
kaltokri
0ee7a38c61 Added content to concepts.md and added an empty debugger.md 2024-02-15 16:47:43 +01:00
kaltokri
15dd2cf735 Renamed basic.md to concepts.md and added more text 2024-02-15 16:47:43 +01:00
kaltokri
e895642157 Small fixes in advanced guide 2024-02-15 16:47:43 +01:00
kaltokri
154026fbf8 New guides added 2024-02-15 16:47:43 +01:00
Applevangelist
eef41c067d Merge remote-tracking branch 'origin/develop' into develop 2024-02-13 16:46:08 +01:00
Applevangelist
48a0400213 Merge remote-tracking branch 'origin/master' into develop 2024-02-13 16:46:05 +01:00
Applevangelist
d7969e9455 Merge remote-tracking branch 'origin/master' into develop 2024-02-13 16:45:36 +01:00
Applevangelist
48b20299b2 xx 2024-02-13 16:45:20 +01:00
Applevangelist
7dcff7ec9c CommandSetInvisible/CommandSetImmortal right word order 2024-02-13 16:43:45 +01:00
Applevangelist
50094894aa Merge remote-tracking branch 'origin/develop' into develop 2024-02-12 18:36:25 +01:00
Applevangelist
e355a2f6d5 Merge remote-tracking branch 'origin/master' into develop 2024-02-12 18:36:20 +01:00
Applevangelist
0e6bf1f46b Merge remote-tracking branch 'origin/master' into develop 2024-02-12 18:35:51 +01:00
Applevangelist
67e52120d4 Nicer BASE:I() etc output 2024-02-12 18:35:22 +01:00
Applevangelist
4b84d227f0 Spawn - reference original template when using SpawnWithAlias in Group.TemplateDonor 2024-02-12 18:34:12 +01:00
Applevangelist
a1151584e1 Nicer Self:I() etc output 2024-02-12 18:33:18 +01:00
Frank
2fce93d925 RAT 2024-02-12 00:10:36 +01:00
Applevangelist
df0dbc9108 PLAYERTASK - small fix for a possibly missing coordinate 2024-02-08 11:59:23 +01:00
Applevangelist
25a5e821ef PLAYERTASK - small fix for possibly missing coordinate on the taskinfo function 2024-02-08 11:58:46 +01:00
Frank
db6354b60d Merge branch 'develop' into FF/Ops 2024-02-06 11:09:35 +01:00
Applevangelist
4307ddcad3 CLIENTMENUMANAGER - dicu 2024-02-04 13:13:06 +01:00
Applevangelist
969a658e15 CLIENTMENUMANAGER - docu 2024-02-04 13:11:57 +01:00
Applevangelist
daa734009e Merge remote-tracking branch 'origin/master' into develop 2024-02-03 12:49:33 +01:00
Applevangelist
86e13df303 MANTIS 2024-02-03 12:48:41 +01:00
Applevangelist
a66ad1f086 MANTIS 2024-02-03 12:23:18 +01:00
Applevangelist
65cf53ce28 Merge remote-tracking branch 'origin/master' into develop 2024-02-03 12:22:59 +01:00
Applevangelist
2e167358bb MANTIS - corrected blue SAM data 2024-02-03 12:22:33 +01:00
Applevangelist
29ff59b128 Merge remote-tracking branch 'origin/develop' into develop 2024-02-03 09:11:49 +01:00
Applevangelist
fe2e257dc0 Merge remote-tracking branch 'origin/master' into develop 2024-02-03 09:11:45 +01:00
Applevangelist
78d1a215e4 Merge remote-tracking branch 'origin/develop' into develop 2024-02-03 09:11:17 +01:00
Applevangelist
14daca9a72 Merge remote-tracking branch 'origin/master' into develop 2024-02-03 09:11:12 +01:00
Applevangelist
48dba742ad MANTIS SAM Data adjustments 2024-02-03 09:10:41 +01:00
Applevangelist
11551a9816 Sam Data 2024-02-03 09:10:25 +01:00
kaltokri
2ca847e845 Fixed dead links for Ops.Intel and Ops.Airwing 2024-02-02 13:30:22 +01:00
kaltokri
11c74ddc17 Another fix for dead links (case sensitivity)
linkinator hides multiple problems sometimes
2024-02-02 12:24:31 +01:00
kaltokri
c38917fa2f Fix for dead links (case sensitivity) 2024-02-02 12:15:40 +01:00
Applevangelist
d5b7fdab24 Merge remote-tracking branch 'origin/develop' into develop 2024-02-01 09:04:04 +01:00
Applevangelist
1847a2372c Docu 2024-02-01 09:03:39 +01:00
Applevangelist
7bd03d55ba Merge remote-tracking branch 'origin/develop' into develop 2024-01-31 17:54:47 +01:00
Applevangelist
d23347e14e Merge remote-tracking branch 'origin/master' into develop 2024-01-31 17:54:42 +01:00
Applevangelist
fd155f8277 Merge remote-tracking branch 'origin/master' into develop 2024-01-31 17:54:09 +01:00
Applevangelist
531132e8a7 #GROUP small fix for GetAverageCoordinate() 2024-01-31 17:49:59 +01:00
Applevangelist
7464406a17 #SPAWN - Small fix for OnSpawnGroup() timing issues 2024-01-31 17:49:37 +01:00
Applevangelist
e5112597a2 Merge remote-tracking branch 'origin/develop' into develop 2024-01-27 15:29:18 +01:00
Applevangelist
24271e6780 Merge remote-tracking branch 'origin/master' into develop 2024-01-27 15:29:13 +01:00
Applevangelist
bd5c1af335 Merge remote-tracking branch 'origin/develop' into develop 2024-01-27 15:28:46 +01:00
Applevangelist
53f556a4e6 Merge remote-tracking branch 'origin/master' into develop 2024-01-27 15:28:42 +01:00
Applevangelist
0ddf8762c2 UTILS - small helper for M2K Data Cartridges 2024-01-27 15:28:12 +01:00
Applevangelist
fb16a29392 M2K specific helper for tostringLL 2024-01-27 14:41:49 +01:00
Frank
2893bfb290 Merge branch 'master' into develop 2024-01-24 14:47:13 +01:00
Frank
d984a1b142 Update Airboss.lua
- VTOL grading #2099
2024-01-24 14:47:00 +01:00
Frank
f10d676921 Merge branch 'develop' into FF/Ops 2024-01-23 10:59:13 +01:00
Applevangelist
5dd8bec6b9 Merge remote-tracking branch 'origin/develop' into develop 2024-01-23 10:05:57 +01:00
Applevangelist
5ee190602e Merge remote-tracking branch 'origin/master' into develop 2024-01-23 10:05:53 +01:00
Applevangelist
f02b774242 Merge remote-tracking branch 'origin/develop' into develop 2024-01-23 10:05:13 +01:00
Applevangelist
5ede860361 Merge remote-tracking branch 'origin/master' into develop 2024-01-23 10:05:09 +01:00
Applevangelist
d0d52246f4 #STRATEGO
* Change strategy for finding strategic targets from base to consolidated weight
2024-01-23 10:04:50 +01:00
Applevangelist
748aa131e4 WAREHOUSE - trying to ensure WH for AirWing starts again when runway is repaired 2024-01-23 10:03:56 +01:00
Applevangelist
02aee6f936 Merge remote-tracking branch 'origin/develop' into develop 2024-01-23 09:51:01 +01:00
Applevangelist
da45ee201e Merge remote-tracking branch 'origin/master' into develop 2024-01-23 09:50:57 +01:00
Applevangelist
c4d8b64713 Stratego 2024-01-23 09:50:34 +01:00
Frank
1b4e170271 Update FlightGroup.lua
- Added menu update after cruise. (Fixes launches from aircraft carriers.)
2024-01-22 21:49:31 +01:00
Thomas
a3d56b6d1b Update Pathline.lua (#2097) (#2098)
Small fixes
2024-01-22 06:32:42 +01:00
Thomas
33bd928076 Update Pathline.lua (#2097)
Small fixes
2024-01-22 06:30:53 +01:00
Applevangelist
c90c5c3bfc Merge remote-tracking branch 'origin/develop' into develop 2024-01-21 16:47:13 +01:00
Applevangelist
5d9fc356e0 Merge remote-tracking branch 'origin/master' into develop 2024-01-21 16:47:09 +01:00
Applevangelist
23df6bbc2a Merge remote-tracking branch 'origin/master' into develop 2024-01-21 16:46:40 +01:00
Applevangelist
f2fc321ded TARGET - declare Scenery target dead if <= 25% of life0 2024-01-21 16:46:24 +01:00
Applevangelist
b03add80c6 SCENERY additions 2024-01-21 16:45:48 +01:00
Applevangelist
d5322466e9 SCENERY add-ons 2024-01-21 16:44:31 +01:00
Applevangelist
0b3fc515e0 SCENERY - small addons 2024-01-21 16:44:14 +01:00
Applevangelist
e50d54f6bc Spawned FARP issue 2024-01-19 19:31:49 +01:00
Applevangelist
290609d581 FARP issue 2024-01-19 19:30:48 +01:00
Applevangelist
c2a0b1c16b Merge remote-tracking branch 'origin/develop' into develop 2024-01-19 19:10:10 +01:00
Applevangelist
a5526d0c73 Merge remote-tracking branch 'origin/master' into develop 2024-01-19 19:10:06 +01:00
Applevangelist
6e60a66d0c Merge remote-tracking branch 'origin/master' into develop 2024-01-19 19:09:28 +01:00
Applevangelist
11f0b2899d Minor fixes 2024-01-19 19:09:08 +01:00
Applevangelist
c408485c5b Minor fixes 2024-01-19 19:08:42 +01:00
Applevangelist
581138b5bc Avoid for pairs error 2024-01-19 19:06:52 +01:00
Applevangelist
4762b88980 AVoid for pairs error 2024-01-19 19:06:34 +01:00
Applevangelist
661094d113 Merge remote-tracking branch 'origin/develop' into develop 2024-01-18 14:36:33 +01:00
Applevangelist
6e06288228 Merge remote-tracking branch 'origin/master' into develop 2024-01-18 14:36:30 +01:00
Applevangelist
0ce3a189c3 Merge remote-tracking branch 'origin/master' into develop 2024-01-18 14:35:54 +01:00
Applevangelist
08f2c29014 #AIRBASE
* Small workaround for Beirut runways
* ATIS minor fix
2024-01-18 14:32:17 +01:00
Applevangelist
f5f86e9ba6 xxx 2024-01-18 14:27:09 +01:00
Applevangelist
f562130e96 Merge remote-tracking branch 'origin/develop' into develop 2024-01-17 12:18:01 +01:00
Applevangelist
35fbacb196 Merge remote-tracking branch 'origin/master' into develop 2024-01-17 12:17:57 +01:00
Applevangelist
9208d7a70d Merge remote-tracking branch 'origin/master' into develop 2024-01-17 12:17:34 +01:00
Applevangelist
4076ff5bb5 #AIRWING, #EASYGCICAP
* Added SetCapStartTimeVariation()
2024-01-17 12:17:14 +01:00
Applevangelist
dcd4d0ab62 CONTROLLABLE
* Added CommandSetFrequencyForUnit
2024-01-17 12:15:46 +01:00
Applevangelist
90d825c809 xxx 2024-01-17 12:13:41 +01:00
Applevangelist
48f81d90cc Merge remote-tracking branch 'origin/develop' into develop 2024-01-17 08:10:46 +01:00
Applevangelist
68756681fa #PLAYERTASKCONTROLLER
* Additions for lasing unit being an ARMYGROUP
2024-01-17 08:10:17 +01:00
Applevangelist
056b761ebc #PLAYERTASKCONTROLLER
* Additions for lasing unit being an ARMYGROUP
2024-01-17 08:10:01 +01:00
Frank
0532c54cd5 Merge branch 'develop' into FF/Ops 2024-01-16 17:11:16 +01:00
Applevangelist
298c569f93 #PLAYERTASK
* Add a height of 2m on laser coordinates to ensure LOS test works
2024-01-16 15:09:51 +01:00
Applevangelist
32dbb520d6 #AUTOLASE
* Allow switching Smoke targets menu to be switched off and on
2024-01-16 15:09:12 +01:00
Applevangelist
5c90afea76 xxx 2024-01-16 15:06:54 +01:00
Applevangelist
b6b344a69a Merge remote-tracking branch 'origin/develop' into develop 2024-01-14 14:58:16 +01:00
Applevangelist
6af66db4c3 Minor changes 2024-01-14 14:57:21 +01:00
Applevangelist
601c8165d8 Minor changes 2024-01-14 14:57:07 +01:00
Applevangelist
b612c3a846 Merge remote-tracking branch 'origin/develop' into develop 2024-01-12 18:47:32 +01:00
Applevangelist
0bf1204499 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Functional/Artillery.lua
2024-01-12 18:47:28 +01:00
Applevangelist
ff84d682bd Merge remote-tracking branch 'origin/develop' into develop 2024-01-12 18:44:38 +01:00
Applevangelist
d2b7d46227 STRATEGO
* functional additions
2024-01-12 18:44:34 +01:00
Applevangelist
58f4eead1c #AUFTRAG
* Helos: Added AUFTRAG:NewLANDATCOORDINATE
2024-01-12 18:43:48 +01:00
Applevangelist
36a6d5fede xxx 2024-01-12 18:42:26 +01:00
Rolf Geuenich
f3bafd5803 Merge branch 'master' into develop 2024-01-12 16:05:46 +01:00
Rolf Geuenich
bb07e1935e Downpatching changes from development to master 2024-01-12 16:05:14 +01:00
Rolf Geuenich
2946c2e225 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Artillery.lua
2024-01-12 15:45:50 +01:00
Rolf Geuenich
088436c5ce Downpatching changes from development to master in Arty.lua 2024-01-12 15:44:28 +01:00
Rolf Geuenich
2e386be2f6 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2024-01-12 15:35:17 +01:00
Rolf Geuenich
797bf0047b Down patching of code enhancements from develop to master in Set.lua 2024-01-12 15:33:27 +01:00
Applevangelist
884b3c7b8d Merge remote-tracking branch 'origin/develop' into develop 2024-01-11 17:32:45 +01:00
Applevangelist
4dd6b956aa Merge remote-tracking branch 'origin/master' into develop 2024-01-11 17:32:41 +01:00
Applevangelist
9c0c93507a Merge remote-tracking branch 'origin/master' into develop 2024-01-11 17:32:04 +01:00
Applevangelist
f29d055ca3 Correction 2024-01-11 17:31:40 +01:00
Applevangelist
baf7123364 Merge remote-tracking branch 'origin/master' into develop 2024-01-11 17:14:43 +01:00
Applevangelist
1468641563 CTLD - avoid UHT beacons between 243 and 320 mHz 2024-01-11 17:14:07 +01:00
Applevangelist
f6b6a6a577 #EASYGCICAP
* Added assignment of in-flight groups to intercepts
2024-01-11 16:11:51 +01:00
Applevangelist
aedd2a6391 #EASYGCICAP
* Added assignment of in-flight groups to intercepts
2024-01-11 16:10:40 +01:00
Applevangelist
c2d5f9f428 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2024-01-11 12:53:39 +01:00
Applevangelist
54b49ff0d6 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2024-01-11 12:53:30 +01:00
Applevangelist
4d7d34b71f Merge remote-tracking branch 'origin/master' into develop 2024-01-11 12:52:42 +01:00
Applevangelist
82bea9d5ff Merge remote-tracking branch 'origin/develop' into develop 2024-01-11 12:52:19 +01:00
Applevangelist
35d91c9c94 EASYGCICAP Additions 2024-01-11 12:52:15 +01:00
Applevangelist
8b08942c4d CONTROLLABLE - Added options for Radar Using 2024-01-11 12:52:02 +01:00
Applevangelist
5680344dfd EASYGCICAP Additions 2024-01-11 12:51:36 +01:00
kaltokri
a44ad5c755 Changed order to match master branch for better auto-merge 2024-01-11 10:05:22 +01:00
kaltokri
b7236eeb58 Merge branch 'master' into develop 2024-01-10 15:43:38 +01:00
kaltokri
eb84ad3cee Fix for Moose_Create.lua and dynamic path 2024-01-10 15:43:24 +01:00
kaltokri
09933b307b Merge branch 'master' into develop 2024-01-10 15:41:02 +01:00
kaltokri
91a34ac4d8 Added PyCharm to gitignore 2024-01-10 15:40:46 +01:00
kaltokri
21babb548c Fixed typo off manual merge and added PyCharm to gitignore 2024-01-10 15:39:23 +01:00
Applevangelist
11967bd608 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2024-01-10 15:21:16 +01:00
Applevangelist
ea6e63dc9b Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/Airboss.lua
2024-01-10 15:20:29 +01:00
Applevangelist
28c8d99878 Added player name to ...PilotDown() event 2024-01-10 15:18:38 +01:00
Applevangelist
b0e0926b70 Added player name to ...PilotDown() event 2024-01-10 15:17:24 +01:00
kaltokri
547579ffb0 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/Airboss.lua
2024-01-10 14:26:55 +01:00
kaltokri
4fda8cc5fb Easy debugging for all Moosers #2093
Enables everybody to use load Moose from an external full path.
This is needed to use PyCharm with EmmyLua Debugger.
Needs also De-Sanitize to load mission script with full path.
2024-01-10 14:12:17 +01:00
Applevangelist
27158ee7e8 xxx 2024-01-10 13:38:59 +01:00
Applevangelist
697042eac6 EASYGCICAP - less noise 2024-01-10 13:38:48 +01:00
Applevangelist
b1be1f5f71 Merge remote-tracking branch 'origin/develop' into develop 2024-01-09 17:48:54 +01:00
Applevangelist
6b020e011e Merge remote-tracking branch 'origin/master' into develop 2024-01-09 17:48:51 +01:00
Applevangelist
30d6936f1d MSRS changes 2024-01-09 17:47:14 +01:00
Applevangelist
4ac583e434 SRS changes 2024-01-09 17:28:58 +01:00
Applevangelist
7995940579 SRS changes 2024-01-09 17:27:26 +01:00
Applevangelist
3ffdb4fe4b Merge remote-tracking branch 'origin/develop' into develop 2024-01-09 08:59:47 +01:00
Applevangelist
9211770056 xx 2024-01-09 08:58:22 +01:00
Applevangelist
b315375ade xxx 2024-01-09 08:58:07 +01:00
Frank
becaf47a66 Merge branch 'develop' into FF/Ops 2024-01-07 21:16:15 +01:00
Applevangelist
57919704be Merge remote-tracking branch 'origin/develop' into develop 2024-01-07 18:08:34 +01:00
Frank
e26647c2ca OPSTRANSPORT
- Fixed SET not working with FilterActive
2024-01-07 17:24:51 +01:00
Applevangelist
4ddd278471 #AWACS
* Picture clean, correct order of callsigns
2024-01-07 15:40:17 +01:00
Applevangelist
20f881f0a9 #AWACS
* Picture clean, correct order of callsigns
2024-01-07 15:40:08 +01:00
Applevangelist
7275a934a2 Merge remote-tracking branch 'origin/develop' into develop 2024-01-07 14:45:38 +01:00
Applevangelist
6a54056ec8 Merge remote-tracking branch 'origin/master' into develop 2024-01-07 14:45:34 +01:00
Applevangelist
e5658b3298 xxx 2024-01-07 14:45:10 +01:00
Applevangelist
72e31b90a9 Merge remote-tracking branch 'origin/master' into develop 2024-01-07 14:44:45 +01:00
Applevangelist
fa762fe0fc #MSRS
* Added voice enumerator ofr gRPC using MS as provider MSRS.Voices.MicrosoftGRPC
2024-01-07 14:44:07 +01:00
Mr.Alien
aca5846209 Fix scoring to not het more points when not killed at once. + overridable method call on kill (#2079) 2024-01-07 13:28:12 +01:00
Mr.Alien
4fd7d7cba9 Spawn all unit randomly inside a zone, instead of only the first unit in zone and the other within a radius (potentially outside the zone, and in some cases in the middle of a runway) (#2069) 2024-01-07 13:27:23 +01:00
ttrebuchon
677d888d96 Use total cargo weight when computing asset score for transport missions (#2065)
* Optimize carrier assets for OPSTRANSPORT based on total cargo weight

* Clean up code/comments for TotalWeight scoring

* Add missing parameter documentation
2024-01-07 13:26:58 +01:00
Applevangelist
06c3ca0079 MSRS additions 2024-01-07 13:25:32 +01:00
Applevangelist
cf4d35efa2 xxx 2024-01-07 13:25:14 +01:00
Applevangelist
9280a1224d MSRS additions 2024-01-07 13:23:50 +01:00
Applevangelist
7e842fbd46 xxx 2024-01-07 13:16:52 +01:00
Applevangelist
0009539eef Merge remote-tracking branch 'origin/develop' into develop 2024-01-06 18:23:46 +01:00
Applevangelist
1490eee0e9 Merge remote-tracking branch 'origin/master' into develop 2024-01-06 18:23:42 +01:00
Applevangelist
406dbb707a Merge remote-tracking branch 'origin/develop' into develop 2024-01-06 18:22:41 +01:00
Applevangelist
4758af61c2 Merge remote-tracking branch 'origin/master' into develop 2024-01-06 18:22:36 +01:00
Applevangelist
729c1f5e33 Fixes for MSRS changes
#STRATEGO
* fix for an AB not having a zone
2024-01-06 18:22:18 +01:00
Applevangelist
fce7b07014 Fixes for MSRS changes 2024-01-06 18:21:39 +01:00
Applevangelist
45fb191483 Fixes for MSRS changes 2024-01-06 18:21:10 +01:00
Applevangelist
cfe99341d7 STRATEGO
* Fix if an airbase has no zone predefined
2024-01-06 18:20:55 +01:00
Applevangelist
0db96082a1 xxx 2024-01-06 18:17:56 +01:00
kaltokri
8386fe5f67 Merge branch 'master' into develop 2024-01-06 12:22:25 +01:00
kaltokri
4696569f83 Added mission check for desanitized io 2024-01-06 12:22:02 +01:00
Applevangelist
0d224ee2fd Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 16:09:59 +01:00
Applevangelist
15482bb734 Merge remote-tracking branch 'origin/master' into develop 2024-01-05 16:09:55 +01:00
Applevangelist
2c695e187f Merge remote-tracking branch 'origin/master' into develop 2024-01-05 16:09:22 +01:00
Applevangelist
048ab6acfe Fixes for 4th SRS Parameter 2024-01-05 16:09:05 +01:00
Applevangelist
84230e2360 Fixes for 4th SRS Parameter 2024-01-05 16:08:46 +01:00
Applevangelist
fd86b17b6d Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 15:52:21 +01:00
Applevangelist
492900d5d1 Merge remote-tracking branch 'origin/master' into develop 2024-01-05 15:52:16 +01:00
Applevangelist
f2783c46c2 Merge remote-tracking branch 'origin/master' into develop 2024-01-05 15:51:35 +01:00
Applevangelist
ca9913e38b nu aber 2024-01-05 15:51:09 +01:00
Applevangelist
df1bc5c55d Merge remote-tracking branch 'origin/master' into develop 2024-01-05 15:46:45 +01:00
Applevangelist
fba19bc755 Merge remote-tracking branch 'origin/master' into develop 2024-01-05 15:46:10 +01:00
Applevangelist
ff951c69d9 Error dfix 2024-01-05 15:45:40 +01:00
Applevangelist
0c3caffe93 Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 15:44:32 +01:00
Applevangelist
642824818c Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2024-01-05 15:44:24 +01:00
Applevangelist
e53a80783e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2024-01-05 15:43:33 +01:00
Applevangelist
a1fb09285b STRATEGO - Improvements 2024-01-05 15:42:33 +01:00
Applevangelist
f2f7c88299 SRS changes 2024-01-05 15:42:11 +01:00
Applevangelist
1a1c3a6c9f xx 2024-01-05 15:41:01 +01:00
Applevangelist
e2bf1f727d FLIGHTGROUP - Amending landing on an AFB w/o runways
SRS - some improvements
2024-01-05 15:37:52 +01:00
Applevangelist
b90853f431 xxx 2024-01-05 15:36:03 +01:00
Applevangelist
4ad51b8866 xxx 2024-01-05 15:35:54 +01:00
Applevangelist
71f12f1856 Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 12:20:21 +01:00
Applevangelist
b329bf8088 xxx 2024-01-05 12:13:18 +01:00
Applevangelist
65315251b5 PLAYERTASK, AWACS - small fix for the revamped SRS 2024-01-05 12:13:04 +01:00
Applevangelist
b8f5e55ac9 Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 10:26:07 +01:00
Applevangelist
2a9e98c21e Merge remote-tracking branch 'origin/develop' into develop 2024-01-04 18:49:50 +01:00
Applevangelist
b40c1e4575 Fixes 2024-01-04 18:49:47 +01:00
Applevangelist
8171e3aad2 xxx 2024-01-04 18:48:26 +01:00
Frank
9ea8443286 Merge branch 'develop' into FF/Ops 2024-01-04 15:13:46 +01:00
Frank
a9befc4d96 Merge branch 'master' into develop 2024-01-04 15:13:26 +01:00
Applevangelist
039be9790d Merge remote-tracking branch 'origin/develop' into develop 2024-01-04 14:02:09 +01:00
Applevangelist
1599b14beb Merge remote-tracking branch 'origin/master' into develop 2024-01-04 14:02:04 +01:00
Applevangelist
f5d6d31b10 xxx 2024-01-04 14:01:12 +01:00
Applevangelist
170f97d013 xxx 2024-01-04 14:01:02 +01:00
Applevangelist
65fb22b6cc xxx 2024-01-04 14:00:43 +01:00
Applevangelist
d0346c4aa3 MSRS
line 953 has no self
2024-01-04 13:59:41 +01:00
Applevangelist
96da09b9e0 Picture link 2024-01-04 12:44:43 +01:00
Applevangelist
8fa89753b6 Merge remote-tracking branch 'origin/develop' into develop 2024-01-04 11:29:10 +01:00
Applevangelist
67bd4429f5 Merge remote-tracking branch 'origin/master' into develop 2024-01-04 11:29:06 +01:00
Applevangelist
c1d468b35f Merge remote-tracking branch 'origin/develop' into develop 2024-01-04 11:27:54 +01:00
Applevangelist
109270d717 STRATEGO
* Renamed knots to nodes to have the correc lingo
2024-01-04 11:27:48 +01:00
Applevangelist
98d131881f xxx 2024-01-04 11:27:24 +01:00
Frank
f80e7a2166 Merge branch 'master' into develop 2024-01-03 22:32:50 +01:00
Frank
9b95e71d75 Update Airboss.lua
- Potential fix for error raised on discord
2024-01-03 22:32:37 +01:00
Applevangelist
de6c7d636b docu 2024-01-03 18:56:43 +01:00
Applevangelist
57ff653dc3 xxx 2024-01-03 18:56:28 +01:00
Applevangelist
f8a3e7fc2e Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Stratego.lua
#	Moose Development/Moose/Functional/Tiresias.lua
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2024-01-03 18:16:59 +01:00
Applevangelist
8910311c5c Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
#	Moose Development/Moose/AI/AI_Balancer.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua
2024-01-03 18:15:58 +01:00
Applevangelist
f57beab6d2 #STRATEGO 2024-01-03 18:14:12 +01:00
Applevangelist
29414bfd21 Merge remote-tracking branch 'origin/develop' into develop 2024-01-03 18:06:21 +01:00
Applevangelist
60b8a5f5af Merge remote-tracking branch 'origin/master' into develop 2024-01-03 18:06:15 +01:00
Applevangelist
db6dc7b77e SET: Added GetRandomSurely() 2024-01-03 18:05:29 +01:00
Applevangelist
e5fbaeafcd xxx 2024-01-03 18:03:53 +01:00
Applevangelist
90e7711788 STRATEGO 2024-01-03 18:03:45 +01:00
kaltokri
aaf3553597 Merge branch 'master' into develop 2024-01-03 11:59:27 +01:00
kaltokri
4e50bd213c No fixes for broken links 2024-01-03 09:04:43 +01:00
kaltokri
c813e2dbc4 Fixed broken links 2024-01-03 07:53:41 +01:00
Rolf Geuenich
4c81333a0a Add the dynamic loading of developer files (#2090) 2024-01-03 07:19:18 +01:00
kaltokri
761d83a68f Fix broken link in Awacs.lua 2024-01-02 22:10:08 +01:00
kaltokri
3d93c268b3 Merge branch 'master' into develop 2024-01-02 22:07:29 +01:00
kaltokri
79b1f1615f Fix broken link in AI_Escort_Request.lua 2024-01-02 22:06:59 +01:00
kaltokri
d6a0fff993 Fix for broken links in documentation 2024-01-02 20:03:18 +01:00
kaltokri
8d45ea00e8 Merge branch 'master' into develop 2024-01-02 19:03:47 +01:00
kaltokri
47f010cb28 Fixed broken link in AI_Escort.lua 2024-01-02 19:03:19 +01:00
Applevangelist
2d17c4d21a Merge remote-tracking branch 'origin/master' into develop 2024-01-02 18:13:14 +01:00
Applevangelist
29e255a7bd xxx 2024-01-02 18:12:57 +01:00
Applevangelist
d14b7e8f4c #POINT
* added missing COORDINATE:ToStringLL()
2024-01-02 18:12:42 +01:00
Frank
f76fa58a5f Merge branch 'develop' into FF/Ops 2024-01-02 17:07:03 +01:00
Frank
d8b046491b Merge branch 'master' into develop 2024-01-02 17:06:41 +01:00
Frank
d9748ef147 Update SRS.lua
- Fixed bugs for self
2024-01-02 17:06:32 +01:00
kaltokri
b20eb84d19 Merge branch 'master' into develop 2024-01-02 13:33:40 +01:00
kaltokri
64d7946c06 Fix for broken links in master branch 2024-01-02 13:33:10 +01:00
Frank
c8b36b8c99 Merge branch 'develop' into FF/Ops 2024-01-01 21:54:51 +01:00
kaltokri
c2be4fbcf1 Merge branch 'master' into develop 2024-01-01 19:06:45 +01:00
kaltokri
b052fc6243 Merge branch 'restructuring' 2024-01-01 19:06:34 +01:00
kaltokri
8385b1d21a Fixed broken links in A2A_Dispatcher 2024-01-01 19:06:21 +01:00
kaltokri
58d9637c5d Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2024-01-01 15:54:53 +01:00
kaltokri
d4f4465b0a Merge branch 'restructuring' 2024-01-01 15:53:05 +01:00
kaltokri
5fe77956cb Fixed broken links of restructure 2024-01-01 15:51:02 +01:00
Applevangelist
e0a108e00d #TIRESIAS
* Initial release
2024-01-01 13:11:44 +01:00
Applevangelist
d640acc7cc docu 2024-01-01 13:07:08 +01:00
Applevangelist
e36f5b3fbd xxx 2024-01-01 13:06:52 +01:00
Applevangelist
04125cef3d xxx 2024-01-01 09:26:19 +01:00
kaltokri
acf37f6133 Merge branch 'master' into develop 2024-01-01 00:39:11 +01:00
kaltokri
8dcd22f18c Merge branch 'msrs' 2024-01-01 00:38:59 +01:00
kaltokri
2d086a62f0 Added link to example missions to MSRS 2024-01-01 00:38:48 +01:00
Applevangelist
55f35e7067 Merge remote-tracking branch 'origin/develop' into develop 2023-12-31 17:27:09 +01:00
Applevangelist
8fc6f511c8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-31 17:26:28 +01:00
Applevangelist
47ad2499d4 Merge remote-tracking branch 'origin/master' 2023-12-31 17:26:01 +01:00
Applevangelist
5d510807c9 xxx 2023-12-31 17:25:56 +01:00
Applevangelist
dd771a089c Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-31 17:25:32 +01:00
Applevangelist
3f927b16e5 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-31 17:23:20 +01:00
Applevangelist
5ba8f9e0e8 #UTILS
* Added NATO name for KC-135MPRS

#SET
* Made filtering a tad faster
2023-12-31 17:21:02 +01:00
kaltokri
833a0561c3 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-31 17:19:51 +01:00
kaltokri
0338fd5d33 Merge branch 'msrs' 2023-12-31 17:15:51 +01:00
kaltokri
ea2175bba8 Added debug output to SRS.lua 2023-12-31 17:14:54 +01:00
Applevangelist
d20101095c Merge remote-tracking branch 'origin/develop' into develop 2023-12-31 14:58:57 +01:00
Applevangelist
2d26c11ad7 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2023-12-31 14:58:53 +01:00
Applevangelist
cf48b21073 Merge remote-tracking branch 'origin/master' into develop 2023-12-31 14:58:02 +01:00
Applevangelist
0835022c5c #GROUP
* Corrections for "IsAAA()"
2023-12-31 14:57:13 +01:00
Applevangelist
fea05b552c xxx 2023-12-31 14:55:57 +01:00
Applevangelist
a70ad71689 Merge remote-tracking branch 'origin/master' into develop 2023-12-30 16:53:22 +01:00
Applevangelist
f306361317 #GROUP
* Added IsSam and IsAAA

#SET
* Corrected EvalFilterFunctions - all must be true
2023-12-30 16:52:24 +01:00
Applevangelist
0347e42fc7 CARGO noise 2023-12-30 16:50:12 +01:00
Applevangelist
e1ac5633f9 xxx 2023-12-30 16:48:59 +01:00
Applevangelist
e3a577ad24 xxx 2023-12-30 16:48:48 +01:00
Applevangelist
596334dab9 TIRESIAS 2023-12-30 16:48:17 +01:00
Applevangelist
6d818cbc1d Merge remote-tracking branch 'origin/develop' into develop 2023-12-29 15:03:58 +01:00
Applevangelist
326621504b Merge remote-tracking branch 'origin/master' into develop 2023-12-29 15:03:54 +01:00
Applevangelist
7557e79c0c Merge branch 'master' into develop 2023-12-29 15:03:09 +01:00
Applevangelist
9cc32ff8dc AIRBOSS - Superfluous error message removal 2023-12-29 15:02:41 +01:00
Applevangelist
3a4c5e307c AIRBOSS - Superfluous error message removal 2023-12-29 15:02:20 +01:00
Applevangelist
67cec4c564 Merge remote-tracking branch 'origin/develop' into develop 2023-12-29 14:51:48 +01:00
Applevangelist
0ef70d0b6a Merge remote-tracking branch 'origin/master' into develop 2023-12-29 14:51:44 +01:00
Applevangelist
c11ca9df4d xxx 2023-12-29 14:51:19 +01:00
Applevangelist
1b7eef5419 Merge remote-tracking branch 'origin/develop' into develop 2023-12-29 14:50:57 +01:00
Applevangelist
029bdc3bd1 Merge branch 'master' into develop 2023-12-29 14:50:53 +01:00
Applevangelist
b052d99349 Fixes 2023-12-29 14:50:01 +01:00
kaltokri
93acd870ea Merge branch 'master' into develop 2023-12-28 16:38:57 +01:00
kaltokri
4fe1318e7c Fixed a logic failure with external sound files in SoundOutput.lua 2023-12-28 16:38:26 +01:00
Applevangelist
93cdb92e76 Merge remote-tracking branch 'origin/master' into develop 2023-12-28 13:33:37 +01:00
Applevangelist
bfab0fa542 xxx 2023-12-28 13:33:06 +01:00
Applevangelist
6ffe69484c Reduce noise 2023-12-28 13:32:53 +01:00
Applevangelist
39b89d937e Merge remote-tracking branch 'origin/master' into develop 2023-12-27 19:34:42 +01:00
Applevangelist
501ab70992 xxx 2023-12-27 19:34:20 +01:00
Applevangelist
7938b8245e Merge remote-tracking branch 'origin/develop' into develop 2023-12-27 19:29:16 +01:00
Applevangelist
8c684c2f54 Merge remote-tracking branch 'origin/master' into develop 2023-12-27 19:29:12 +01:00
Applevangelist
b488d43d78 Merge remote-tracking branch 'origin/master' into develop 2023-12-27 19:28:49 +01:00
Applevangelist
6ac46addf0 #SET
* Added `FilterFunction()` for these SETs: UNIT, GROUP, CLIENT, STATIC
2023-12-27 19:28:19 +01:00
Applevangelist
ec9119d1d0 xxx 2023-12-27 19:27:40 +01:00
Applevangelist
7aa150f287 Merge remote-tracking branch 'origin/develop' into develop 2023-12-26 19:19:45 +01:00
Applevangelist
853ecf9add Merge remote-tracking branch 'origin/master' into develop 2023-12-26 19:19:39 +01:00
Applevangelist
2be85fb187 CTLD 2023-12-26 19:19:10 +01:00
Applevangelist
33259be4d9 Merge remote-tracking branch 'origin/develop' into develop 2023-12-26 19:18:54 +01:00
Applevangelist
e4cea7b3c4 Merge remote-tracking branch 'origin/master' into develop 2023-12-26 19:18:36 +01:00
Applevangelist
3bdf4b4c76 #CTLD
* Fix multi-crate requests deducting too much Stock
2023-12-26 19:18:13 +01:00
kaltokri
6f5f89a0ee Merge branch 'master' into develop 2023-12-26 14:51:28 +01:00
kaltokri
46f70dd8a6 Fixed logic in SoundOutput.lua to play internal sound files with SRS 2023-12-26 14:50:54 +01:00
Thomas
e2e9bd7de0 Update EasyGCICAP.lua 2023-12-26 08:53:11 +01:00
Frank
1b01b89343 TARGET
- Fixed IsAlive
2023-12-25 23:12:55 +01:00
Applevangelist
4e36ed170b Merge remote-tracking branch 'origin/develop' into develop 2023-12-25 13:59:27 +01:00
Applevangelist
bf0ad93bf7 AICSAR Fix 2023-12-25 13:59:23 +01:00
Thomas
a51afeda14 Update build-includes.yml 2023-12-25 13:31:35 +01:00
Applevangelist
e46b148721 SRS 2023-12-25 13:28:00 +01:00
Applevangelist
8765ebe2c6 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	.github/workflows/build-includes.yml
2023-12-25 13:22:47 +01:00
Applevangelist
b55b11be09 Merge remote-tracking branch 'origin/master' into develop 2023-12-25 13:22:16 +01:00
Thomas
2a7dbad02a Update build-includes.yml 2023-12-25 13:21:51 +01:00
Thomas
aeac2eb3d7 Update build-includes.yml 2023-12-25 13:20:13 +01:00
Thomas
e83c8c3ee0 Update build-includes.yml (#2078) 2023-12-25 13:14:46 +01:00
Applevangelist
d65042c640 SRS error from luacheck 2023-12-25 13:12:03 +01:00
Thomas
c72cdd8f0b Update build-includes.yml (#2077) 2023-12-25 13:08:21 +01:00
Thomas
7e2f8771b5 Update build-includes.yml (#2076) 2023-12-25 13:01:59 +01:00
Applevangelist
3ccfcdbd0f CSAR 2023-12-25 13:00:36 +01:00
Thomas
44b3f41ae4 Update build-includes.yml (#2075) 2023-12-25 12:49:54 +01:00
Thomas
c5dec374c8 Update build-includes.yml (#2074) 2023-12-25 12:40:33 +01:00
Thomas
3f384d72ab Update build-includes.yml (#2073) 2023-12-25 12:38:18 +01:00
Thomas
1d5952b4a5 Update build-includes.yml (#2072) 2023-12-25 12:34:57 +01:00
Thomas
8eec7fcc9e Update build-includes.yml (#2071) 2023-12-25 12:29:40 +01:00
Applevangelist
0f57901b70 Merge remote-tracking branch 'origin/develop' into develop 2023-12-25 12:16:17 +01:00
Applevangelist
1ec5721198 Merge remote-tracking branch 'origin/master' into develop 2023-12-25 12:16:10 +01:00
Applevangelist
db7e94d879 New SRS Fixes 2023-12-25 12:14:57 +01:00
Applevangelist
16f3dcbbb4 New SRS fixes 2023-12-25 12:14:41 +01:00
Applevangelist
d010c3a9fa New SRS fixes 2023-12-25 12:14:18 +01:00
Applevangelist
c43e6f44fe Merge remote-tracking branch 'origin/develop' into develop 2023-12-25 11:44:59 +01:00
Applevangelist
c9b0632a46 Merge remote-tracking branch 'origin/master' into develop 2023-12-25 11:44:55 +01:00
kaltokri
f482dac491 Merge branch 'master' into develop 2023-12-25 11:28:19 +01:00
kaltokri
f6f3189504 MSRS enhancements
- Added more tracing
- A check if executable exists
- Removed STTS references
2023-12-25 11:27:48 +01:00
Applevangelist
d855788e19 Merge remote-tracking branch 'origin/develop' into develop 2023-12-25 11:08:03 +01:00
Applevangelist
e9d9578eee Merge remote-tracking branch 'origin/master' into develop 2023-12-25 11:07:59 +01:00
Applevangelist
e913e83596 xxx 2023-12-25 11:07:39 +01:00
kaltokri
73fa021476 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-25 09:41:57 +01:00
kaltokri
071554bfc5 Fixed some small typos and removed STTS in comments 2023-12-25 09:39:21 +01:00
kaltokri
cd8abd97c5 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-12-25 06:13:40 +01:00
kaltokri
1527b53c76 Fixed ASW typo in SRS.lua 2023-12-25 06:09:31 +01:00
kaltokri
e25eeee0cc Merge branch 'master' into develop 2023-12-25 06:00:55 +01:00
kaltokri
bbc7f7e14c Added mission repositries to repositories.md 2023-12-25 05:58:58 +01:00
kaltokri
0261020796 Merge branch 'master' into develop 2023-12-25 05:35:55 +01:00
kaltokri
b9830a8437 Fixed some typos in demo-missions.md 2023-12-25 05:35:41 +01:00
Frank
257530d421 Merge branch 'master' into develop 2023-12-24 03:26:53 +01:00
Frank
caaee4f551 Merge pull request #2068 from FlightControl-Master/FF/MasterDevel
MSRS
2023-12-24 03:21:50 +01:00
Frank
5f7115f4fe Update SRS.lua 2023-12-23 16:53:42 +01:00
Frank
9ec92a8fca SRS
- Refactoring
2023-12-23 15:57:27 +01:00
Applevangelist
a48a31a469 Merge remote-tracking branch 'origin/develop' into develop 2023-12-23 14:54:11 +01:00
Applevangelist
9c624e6742 Merge remote-tracking branch 'origin/master' into develop 2023-12-23 14:54:07 +01:00
Applevangelist
a14435ce54 Merge remote-tracking branch 'origin/develop' into develop 2023-12-23 14:53:42 +01:00
Applevangelist
e82e4f7dd7 Merge remote-tracking branch 'origin/master' into develop 2023-12-23 14:53:36 +01:00
Applevangelist
c7ef270d4d #FLIGHTCONTROL
* Added a delay in spawning the parking guard so in MP we have time to get the heading of the Player's plane
2023-12-23 14:53:11 +01:00
Applevangelist
7cc040c234 #RANGE
* Fixed Range trying to find a pilot on each and every birth event...
2023-12-23 14:51:59 +01:00
Applevangelist
668ba51ba2 xxx 2023-12-23 14:50:57 +01:00
Frank
9227ba9ecd Merge branch 'master' into FF/MasterDevel 2023-12-22 22:01:59 +01:00
Frank
a9a56b3738 Merge branch 'master' into develop 2023-12-22 21:11:41 +01:00
Frank
e7fb073bab Update RAT.lua
- Removed restriction that zones need to be defined in the ME
2023-12-22 21:11:30 +01:00
Applevangelist
fdab492c98 Merge remote-tracking branch 'origin/develop' into develop 2023-12-22 10:53:50 +01:00
Applevangelist
c8ab26ab93 Merge remote-tracking branch 'origin/master' into develop 2023-12-22 10:53:46 +01:00
Frank
0d1fc2fbf2 Merge branch 'master' into develop 2023-12-22 10:36:34 +01:00
Frank
f86b3505b2 Update Airboss.lua
- Fixed Attitude Monitor
2023-12-22 10:36:25 +01:00
Frank
e89b921f3e Update Zone.lua 2023-12-22 10:27:00 +01:00
Frank
0d18ce086c Update Zone.lua 2023-12-21 22:33:08 +01:00
Frank
8fb126682f Merge branch 'master' into FF/MasterDevel 2023-12-21 22:22:10 +01:00
Applevangelist
63acca90fd xxx 2023-12-21 11:06:31 +01:00
Applevangelist
fc0c54c7fd xx 2023-12-20 10:08:26 +01:00
Applevangelist
63a0224ea4 Merge remote-tracking branch 'origin/master' into develop 2023-12-20 10:08:14 +01:00
Applevangelist
ebe486c69a UTILS
* Small fix for UH60L door checker
2023-12-20 10:07:42 +01:00
Applevangelist
831bde7042 utils 2023-12-20 09:18:21 +01:00
Applevangelist
2485b7766e Merge remote-tracking branch 'origin/develop' into develop 2023-12-19 17:39:24 +01:00
Applevangelist
c245505e58 Merge remote-tracking branch 'origin/master' into develop 2023-12-19 17:39:20 +01:00
Applevangelist
69fa6f4ee6 Merge remote-tracking branch 'origin/master' into develop 2023-12-19 17:38:51 +01:00
Applevangelist
702ec75935 Small fix 2023-12-19 17:38:31 +01:00
Applevangelist
6c204758e3 Merge remote-tracking branch 'origin/develop' into develop 2023-12-19 12:12:12 +01:00
Applevangelist
a437285c56 Merge remote-tracking branch 'origin/master' into develop 2023-12-19 12:12:08 +01:00
Applevangelist
1c4e3cb801 Merge remote-tracking branch 'origin/master' into develop 2023-12-19 12:11:37 +01:00
Applevangelist
465ec216ea #CONTROLLABLE - Option ECM 2023-12-19 12:11:09 +01:00
Applevangelist
549abc88c4 Merge remote-tracking branch 'origin/develop' into develop 2023-12-19 10:21:10 +01:00
Applevangelist
c26dde326c Merge remote-tracking branch 'origin/master' into develop 2023-12-19 10:21:06 +01:00
Applevangelist
ab516e0cd8 Merge remote-tracking branch 'origin/master' into develop 2023-12-19 10:20:12 +01:00
Applevangelist
d803b51e84 #ZONE
* Fixed filling/drawing of more complex polygon zones
* Added function to (re-)fill polygon
* Added function to (re-)draw polygon outline
2023-12-19 10:19:44 +01:00
Applevangelist
53f89fd42c #DATABASE
* Read color, fill color from drawing data
2023-12-19 10:18:20 +01:00
Applevangelist
af2517343d #ZONE_POLYGON 2023-12-19 10:15:30 +01:00
Frank
c72f109553 SRS 2023-12-19 00:02:17 +01:00
kaltokri
f2ba2022c2 Merge branch 'master' into develop 2023-12-18 16:22:38 +01:00
kaltokri
92e03522db Finished beginner section 2023-12-18 16:21:32 +01:00
Applevangelist
f967244834 Merge remote-tracking branch 'origin/develop' into develop 2023-12-18 10:59:03 +01:00
Applevangelist
33122a5bf9 Merge remote-tracking branch 'origin/master' into develop 2023-12-18 10:58:59 +01:00
Frank
9716162739 Update SRS.lua 2023-12-17 22:55:31 +01:00
Frank
4eea8fcadd Merge branch 'master' into FF/MasterDevel 2023-12-17 20:37:30 +01:00
Frank
5b37e7b249 Merge branch 'develop' into FF/Ops 2023-12-16 09:32:14 +01:00
Frank
5b7e0ce375 Merge branch 'master' into develop 2023-12-16 09:31:56 +01:00
Frank
0ae9be49da Update Range.lua
- Fixed random good by phrase
2023-12-16 09:31:44 +01:00
kaltokri
c250712e53 Merge branch 'master' into develop 2023-12-15 14:13:03 +01:00
kaltokri
bda4efc634 Added page "Create your own Hello world" 2023-12-15 14:11:58 +01:00
Applevangelist
52d1f0811d Merge remote-tracking branch 'origin/develop' into develop 2023-12-14 12:44:36 +01:00
Applevangelist
bc6c663f90 Merge remote-tracking branch 'origin/master' into develop 2023-12-14 12:44:32 +01:00
Applevangelist
566ebb67e3 Merge remote-tracking branch 'origin/master' into develop 2023-12-14 12:44:00 +01:00
Applevangelist
e84e16f58b xx 2023-12-14 12:43:36 +01:00
Applevangelist
55ffe37a79 #USERSOUND
* Added USERSOUND:ToClient( Client, Delay )
2023-12-14 12:42:13 +01:00
Applevangelist
e42fed18ea Merge remote-tracking branch 'origin/develop' into develop 2023-12-14 11:16:03 +01:00
Applevangelist
3fba1ec1d5 Merge remote-tracking branch 'origin/master' into develop 2023-12-14 11:15:58 +01:00
Applevangelist
6c21dfa48c Merge branch 'master' into develop 2023-12-14 11:13:06 +01:00
Applevangelist
b31fc3ed44 Limit Attacked() to have at least the capture threatlevel 2023-12-14 11:12:50 +01:00
Applevangelist
68548f4581 #COORDINATE
* Fix for NewFromMGRS for less precise coordinates (below level 5)
2023-12-14 11:12:14 +01:00
Applevangelist
f948a07d44 xxx 2023-12-14 11:10:12 +01:00
Applevangelist
38e1ef95a3 Merge remote-tracking branch 'origin/develop' into develop 2023-12-14 09:25:07 +01:00
Applevangelist
a9e88d234b Merge remote-tracking branch 'origin/master' into develop 2023-12-14 09:25:02 +01:00
Thomas
42fd2322d2 Update Range.lua (#2066) (#2067)
MSRS config compatibility
2023-12-13 19:33:07 +01:00
Thomas
8382eb9cd8 Update Range.lua (#2066)
MSRS config compatibility
2023-12-13 19:21:28 +01:00
Applevangelist
7e080f2fb0 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Intelligence.lua
2023-12-12 10:56:09 +01:00
Applevangelist
0bebb791a8 Merge remote-tracking branch 'origin/master' into develop 2023-12-12 10:55:29 +01:00
Applevangelist
585901dc7d Merge remote-tracking branch 'origin/master' into develop 2023-12-12 10:54:32 +01:00
Applevangelist
2a7213c1b7 xxx 2023-12-12 10:54:16 +01:00
Applevangelist
42468f3505 xxx 2023-12-12 10:54:01 +01:00
Applevangelist
f837e9dec7 #COORDINATE
* Added functions to create a COORDINATE from MGRS
2023-12-12 10:53:37 +01:00
Applevangelist
9eee7e8c9d Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Setup/Moose.files
2023-12-11 16:55:46 +01:00
Applevangelist
6c646dd331 Merge remote-tracking branch 'origin/master' into develop 2023-12-11 16:54:41 +01:00
Thomas
945a81b745 Update Intelligence.lua 2023-12-11 13:17:30 +01:00
ttrebuchon
cd4fb0c6c5 Add missing files to Moose.files: (#2062)
Utilities/Socket.lua
Core/Astar.lua
Core/MarkerOps_Base.lua
Functional/ZoneGoalCargo.lua
Ops/OpsZone.lua
Ops/ArmyGroup.lua
Ops/OpsTransport.lua
Ops/Target.lua
2023-12-11 11:50:09 +01:00
Thomas
b8d44643c1 Update Detection.lua (#2063) (#2064)
# RadarBlur - make burn-through limit configureable
2023-12-11 11:49:00 +01:00
Thomas
230d9d82bf Update Detection.lua (#2063)
# RadarBlur - make burn-through limit configureable
2023-12-11 11:04:35 +01:00
Applevangelist
dab220f897 Merge remote-tracking branch 'origin/develop' into develop 2023-12-10 14:38:48 +01:00
Applevangelist
4a2e824057 Merge remote-tracking branch 'origin/master' into develop 2023-12-10 14:38:43 +01:00
Applevangelist
a50ee191e5 xxx 2023-12-10 14:38:19 +01:00
Applevangelist
47d01f18c1 Merge remote-tracking branch 'origin/master' into develop 2023-12-10 14:38:06 +01:00
Applevangelist
c089e56060 # DETECTION
* Make the radar blur less effective when under 20km distance
2023-12-10 14:37:41 +01:00
Applevangelist
8a1c9c0e54 Merge remote-tracking branch 'origin/master' into develop 2023-12-10 11:58:55 +01:00
Applevangelist
ec7dd6154d xxx 2023-12-10 11:58:34 +01:00
Applevangelist
87f1a5ed0d # DETECTION
* Option to make Radar Blue decision visible in logs (self.debug) and/or screen (self.verbose)
2023-12-10 11:58:19 +01:00
Applevangelist
918aafa84c Merge remote-tracking branch 'origin/develop' into develop 2023-12-09 18:17:39 +01:00
Applevangelist
f2593fcecc Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Detection.lua
2023-12-09 18:17:35 +01:00
Applevangelist
a4fd55e87d Merge remote-tracking branch 'origin/master' into develop 2023-12-09 18:16:52 +01:00
Applevangelist
d2d6fac7df # DETECTION, logic fix 2023-12-09 18:16:29 +01:00
Applevangelist
8c57e9cb09 xxx 2023-12-09 18:16:10 +01:00
Applevangelist
0cee9b78eb Merge remote-tracking branch 'origin/develop' into develop 2023-12-09 15:54:12 +01:00
Applevangelist
98b2320aa8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Detection.lua
2023-12-09 15:54:04 +01:00
Applevangelist
5243a408cc Merge remote-tracking branch 'origin/master' into develop 2023-12-09 15:52:16 +01:00
Applevangelist
bc3f9ed7c0 #SPAWN
* Added SPAWN:InitCallSign(ID,Name,Minor,Major)
2023-12-09 15:51:35 +01:00
Applevangelist
e60e8b37e6 xx 2023-12-09 15:50:47 +01:00
Applevangelist
b224739df3 Merge remote-tracking branch 'origin/master' into develop 2023-12-09 14:35:02 +01:00
Applevangelist
0f4162a9a9 * fixes 2023-12-09 14:34:41 +01:00
Applevangelist
e9266ed01c xx 2023-12-09 14:34:21 +01:00
Applevangelist
ff26e4d1dc Merge remote-tracking branch 'origin/master' into develop 2023-12-09 13:54:43 +01:00
Applevangelist
6b270916c4 # DETECTION_BASE
* Added `SetRadarBlur(minheight,thresheight,thresblur)`
2023-12-09 13:53:27 +01:00
Applevangelist
af3af14d77 # DETECTION_BASE
* Added `SetRadarBlur(minheight,thresheight,thresblur)`
2023-12-09 13:51:16 +01:00
Applevangelist
e0eba9473e Merge remote-tracking branch 'origin/develop' into develop 2023-12-09 13:04:55 +01:00
Applevangelist
691d4c771a Merge remote-tracking branch 'origin/master' into develop 2023-12-09 13:04:51 +01:00
Applevangelist
1f17fd89a4 Merge remote-tracking branch 'origin/master' into develop 2023-12-09 13:03:57 +01:00
Applevangelist
b3a006096c fixes 2023-12-09 13:03:34 +01:00
Applevangelist
6fbe981ce1 xxx 2023-12-09 13:01:32 +01:00
Applevangelist
99a55a3c8a Merge remote-tracking branch 'origin/develop' into develop 2023-12-07 16:10:23 +01:00
Applevangelist
32ded0b34f Merge remote-tracking branch 'origin/master' into develop 2023-12-07 16:10:20 +01:00
Applevangelist
a199915731 xxx 2023-12-07 16:09:57 +01:00
Applevangelist
a8e35a552d Merge remote-tracking branch 'origin/master' into develop 2023-12-07 16:09:13 +01:00
Applevangelist
6903e252d2 #UTILS
* Nicer PrintTableToLog()
2023-12-07 16:08:47 +01:00
Applevangelist
6ee1afc670 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 15:12:18 +01:00
Applevangelist
ff6704f123 #ZONE docu fixes 2023-12-07 15:11:53 +01:00
Applevangelist
e86413b031 Merge remote-tracking branch 'origin/develop' into develop 2023-12-07 13:47:22 +01:00
Applevangelist
3d0db6a800 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 13:47:18 +01:00
Applevangelist
3b8bbdd4c1 Merge branch 'master' into develop 2023-12-07 13:46:52 +01:00
Applevangelist
c770f4cb68 #ZONE Docu fixes 2023-12-07 13:46:32 +01:00
Applevangelist
ef4853d0ae Merge remote-tracking branch 'origin/develop' into develop 2023-12-07 13:32:36 +01:00
Applevangelist
9fbbb4ae02 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 13:32:33 +01:00
Applevangelist
7e5a97e7c7 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 13:32:03 +01:00
Applevangelist
9ce1d360d6 #CTLD
* Spawn dropped troops in a nice circle 5m (hover: 1.5m) left of the he
2023-12-07 13:31:40 +01:00
Applevangelist
99e7d6ae92 #CTLD
* Spawn dropped troops in a nice circle 5m (hover: 1.5m) left of the helo
2023-12-07 13:31:32 +01:00
Applevangelist
dcefbdc470 Merge remote-tracking branch 'origin/develop' into develop 2023-12-07 12:16:29 +01:00
Applevangelist
91fb98e32a Merge remote-tracking branch 'origin/master' into develop 2023-12-07 12:16:26 +01:00
Applevangelist
f342ba758e Merge remote-tracking branch 'origin/master' into develop 2023-12-07 12:15:56 +01:00
Applevangelist
26c5f7bf79 xxx 2023-12-07 12:15:27 +01:00
Thomas
6f473faa92 Update Message.lua
#2059 fixed
2023-12-07 12:14:59 +01:00
Thomas
dd37a42470 Update CTLD.lua (#2060)
Changes from @Rey
2023-12-07 12:12:19 +01:00
Applevangelist
e9ab628173 Merge remote-tracking branch 'origin/develop' into develop 2023-12-07 11:23:55 +01:00
Applevangelist
911ea10f3c Merge remote-tracking branch 'origin/master' into develop 2023-12-07 11:23:50 +01:00
Applevangelist
018d8eecf6 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 11:22:20 +01:00
Applevangelist
fe9d841af5 #PLAYERRECCE
* Fixed visual targets not being smoked
* Added option to smoke an average coordinate of targets instead of all
* Defaulted self-smoking of player to false
2023-12-07 11:21:52 +01:00
Applevangelist
88e1bbd60d #SET
* Repaired SET_UNIT:GetCoordinate()
2023-12-07 11:20:43 +01:00
Applevangelist
e8c7e62900 xx 2023-12-07 11:20:20 +01:00
Applevangelist
69c20e78fb Merge remote-tracking branch 'origin/develop' into develop 2023-12-06 08:44:15 +01:00
Applevangelist
22175456a5 Merge remote-tracking branch 'origin/master' into develop 2023-12-06 08:44:10 +01:00
Applevangelist
58fa533f79 xxx 2023-12-06 08:43:43 +01:00
Applevangelist
d0491b3b5a Merge remote-tracking branch 'origin/master' into develop 2023-12-06 08:43:09 +01:00
Applevangelist
e078e48853 #SPAWN
* Fix for a Link16 flight having a non-NATO callsign as number
2023-12-06 08:42:07 +01:00
Applevangelist
1f5f08a9ea Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 15:36:05 +01:00
Applevangelist
b6c748064f Merge remote-tracking branch 'origin/master' into develop 2023-12-03 15:36:01 +01:00
Applevangelist
1f4721b10e #clarifications 2023-12-03 15:34:39 +01:00
Applevangelist
f6d3e01a9f Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 12:40:04 +01:00
Applevangelist
2627b27e38 Merge remote-tracking branch 'origin/master' into develop 2023-12-03 12:40:01 +01:00
Applevangelist
b61201a60f Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 12:26:22 +01:00
Applevangelist
818b21d124 Merge remote-tracking branch 'origin/master' into develop 2023-12-03 12:26:19 +01:00
Applevangelist
e36d6bb7b7 Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 12:12:37 +01:00
Applevangelist
f8e3e7ff99 Merge remote-tracking branch 'origin/master' into develop 2023-12-03 12:12:34 +01:00
Applevangelist
f2ce03e9ea Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 12:04:15 +01:00
Applevangelist
05d9854df0 Merge remote-tracking branch 'origin/master' into develop 2023-12-03 12:04:11 +01:00
Applevangelist
19465c7698 Merge remote-tracking branch 'origin/Apple/Develop' into develop 2023-12-03 11:36:01 +01:00
Applevangelist
4e9f6487df Merge remote-tracking branch 'origin/develop' into develop 2023-12-03 11:35:56 +01:00
Applevangelist
83b0282ec0 Merge remote-tracking branch 'origin/master' into develop 2023-12-03 11:35:53 +01:00
Thomas
4e19c91be5 Update Event.lua (#2055)
Fix for playername in weapon target
2023-12-03 09:26:39 +01:00
Applevangelist
f009b9adee Merge remote-tracking branch 'origin/develop' into develop 2023-12-02 15:12:09 +01:00
Applevangelist
77dd4f86b9 Merge remote-tracking branch 'origin/master' into develop 2023-12-02 15:12:05 +01:00
Applevangelist
5eabc41256 Merge remote-tracking branch 'origin/develop' into develop 2023-12-02 14:46:41 +01:00
Applevangelist
dda2fc6ad5 Merge remote-tracking branch 'origin/master' into develop 2023-12-02 14:46:37 +01:00
Applevangelist
9a2126dfc7 Merge remote-tracking branch 'origin/develop' into develop 2023-12-01 16:30:53 +01:00
Applevangelist
2f5598de5a Merge remote-tracking branch 'origin/master' into develop 2023-12-01 16:30:48 +01:00
Applevangelist
d7c7a1a1dd xxx 2023-12-01 16:28:04 +01:00
Applevangelist
2488c0dd05 #SPAWN
* Link16 Team Members
2023-11-29 17:36:57 +01:00
Applevangelist
37dab7b8bd color 2023-11-29 16:42:55 +01:00
Applevangelist
3024d4b52f Merge remote-tracking branch 'origin/develop' into develop 2023-11-28 10:38:36 +01:00
Applevangelist
b33df5374f #PLAYERRECCE
* Bug fix for clock view calculation
* Ensure lasing is switched off when using the menu
* Create SPOT more often
2023-11-28 10:36:28 +01:00
Applevangelist
f5e3c843c4 Merge remote-tracking branch 'origin/develop' into develop 2023-11-27 16:51:17 +01:00
Applevangelist
dd57089fcf Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2023-11-27 16:51:13 +01:00
Applevangelist
73a62d3a1a #GROUP
STNs
2023-11-27 16:46:47 +01:00
Applevangelist
76493fb6d7 Merge remote-tracking branch 'origin/develop' into develop 2023-11-26 17:00:57 +01:00
Applevangelist
1e783fad29 Merge remote-tracking branch 'origin/master' into develop 2023-11-26 17:00:53 +01:00
Applevangelist
f6af379be6 #UNIT
* Added `GetSTN()` to obtain Link16 info from a unit
2023-11-26 16:59:22 +01:00
Frank
67924c894d Update SRS.lua
- Removed altbackend functions
2023-11-26 16:45:19 +01:00
Applevangelist
54277da8a5 Merge remote-tracking branch 'origin/develop' into develop 2023-11-26 15:55:06 +01:00
Applevangelist
12111c27ad Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Spawn.lua
2023-11-26 15:55:02 +01:00
Applevangelist
b0c294b59b -- noise 2023-11-25 18:44:07 +01:00
Applevangelist
60dedb4cbe Merge remote-tracking branch 'origin/develop' into develop 2023-11-25 18:31:23 +01:00
Applevangelist
57b55246a6 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2023-11-25 18:31:18 +01:00
Applevangelist
ac4702b57c xxx 2023-11-25 18:26:43 +01:00
Applevangelist
14ff3028e3 xxx 2023-11-25 14:49:06 +01:00
Frank
1b1f8e0d2c Update SRS.lua 2023-11-24 23:59:31 +01:00
Frank
f87126f22c Merge branch 'master' into FF/MasterDevel 2023-11-24 15:44:54 +01:00
Applevangelist
dd9752b6ed Merge remote-tracking branch 'origin/develop' into develop 2023-11-24 08:58:30 +01:00
Applevangelist
7978bbc612 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-11-24 08:58:23 +01:00
Frank
af3c579a03 Update SRS.lua 2023-11-23 22:22:59 +01:00
Frank
a508c63279 Merge branch 'master' into FF/MasterDevel 2023-11-23 22:12:52 +01:00
Applevangelist
9eb05fa447 ATC_GROUND fix for scheduler 2023-11-23 18:45:25 +01:00
Frank
084caad5d7 Merge branch 'master' into FF/MasterDevel 2023-11-23 18:25:43 +01:00
Applevangelist
454a6a8350 SPAWN 2023-11-23 18:14:40 +01:00
Applevangelist
1f9cc15fb1 Merge remote-tracking branch 'origin/develop' into develop 2023-11-23 17:03:06 +01:00
Applevangelist
6db8ba9e2f Merge remote-tracking branch 'origin/master' into develop 2023-11-23 17:02:59 +01:00
Applevangelist
a89c96e3c4 fixes 2023-11-23 17:00:38 +01:00
Frank
52c2401d93 Update SRS.lua 2023-11-22 22:53:54 +01:00
Applevangelist
fc32252db7 xx 2023-11-22 18:35:04 +01:00
Applevangelist
fb15a10bc4 Merge remote-tracking branch 'origin/develop' into develop 2023-11-22 17:58:24 +01:00
Applevangelist
37dd629cea Merge remote-tracking branch 'origin/master' into develop 2023-11-22 17:58:21 +01:00
Applevangelist
ed851ebc86 SRS 2023-11-22 17:52:37 +01:00
Applevangelist
3d972411f1 Merge remote-tracking branch 'origin/develop' into develop 2023-11-21 13:23:23 +01:00
Applevangelist
c1cc36f18a Merge remote-tracking branch 'origin/master' into develop 2023-11-21 13:23:19 +01:00
Applevangelist
9014e27edc xxx 2023-11-21 13:21:02 +01:00
Applevangelist
da5a66d200 Merge remote-tracking branch 'origin/develop' into develop 2023-11-21 10:13:55 +01:00
Applevangelist
f246631d3f Merge remote-tracking branch 'origin/master' into develop 2023-11-21 10:13:51 +01:00
Applevangelist
f922b94eb1 xx 2023-11-21 10:13:29 +01:00
Applevangelist
c7d8916085 Merge remote-tracking branch 'origin/develop' into develop 2023-11-19 15:37:36 +01:00
Applevangelist
76a7a7f6da Merge remote-tracking branch 'origin/master' into develop 2023-11-19 15:37:32 +01:00
Applevangelist
264d7bd3a8 Merge remote-tracking branch 'origin/develop' into develop 2023-11-19 12:41:35 +01:00
Applevangelist
d3a3a14e96 Merge remote-tracking branch 'origin/master' into develop 2023-11-19 12:41:31 +01:00
Applevangelist
f397b47a8f Merge remote-tracking branch 'origin/develop' into develop 2023-11-18 17:17:41 +01:00
Applevangelist
9f942e0fda Merge remote-tracking branch 'origin/master' into develop 2023-11-18 17:17:37 +01:00
Applevangelist
540861dd25 Advanced scoot and shoot 2023-11-18 17:15:53 +01:00
Applevangelist
2a63a128cd Merge remote-tracking branch 'origin/develop' into develop 2023-11-18 16:45:35 +01:00
Applevangelist
c1d42ef10c Merge remote-tracking branch 'origin/master' into develop 2023-11-18 16:45:31 +01:00
Applevangelist
b737ebb962 xx 2023-11-18 16:43:44 +01:00
Applevangelist
34335d09b7 Merge remote-tracking branch 'origin/develop' into develop 2023-11-17 15:08:53 +01:00
Applevangelist
0e00e15578 Merge remote-tracking branch 'origin/master' into develop 2023-11-17 15:08:47 +01:00
Applevangelist
51be801637 #PLAYERRECCE 2023-11-17 15:03:29 +01:00
Applevangelist
d09f409359 Merge remote-tracking branch 'origin/develop' into develop 2023-11-17 12:57:27 +01:00
Applevangelist
9df5e5165d #AWACS
* Small fix for no text on clean call
2023-11-17 12:05:01 +01:00
Applevangelist
96c1425ffe Merge remote-tracking branch 'origin/develop' into develop 2023-11-17 11:39:59 +01:00
Applevangelist
15a2d5bd73 Merge remote-tracking branch 'origin/master' into develop 2023-11-17 11:39:55 +01:00
Applevangelist
f32784395c Merge remote-tracking branch 'origin/develop' into develop 2023-11-17 10:47:44 +01:00
Applevangelist
7d71b4f955 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Object.lua
2023-11-17 10:47:40 +01:00
Applevangelist
0bb95ef5a3 Merge remote-tracking branch 'origin/develop' into develop 2023-11-16 18:12:45 +01:00
Applevangelist
db02075b4b Merge remote-tracking branch 'origin/master' into develop 2023-11-16 18:12:41 +01:00
Applevangelist
8b20f6cab2 xx 2023-11-16 18:12:17 +01:00
Applevangelist
9f08d53262 #PLAYERRECCE
* Fixes for new Gazelle models
2023-11-16 14:07:26 +01:00
Applevangelist
4b60d7a10e Merge remote-tracking branch 'origin/develop' into develop 2023-11-15 18:21:12 +01:00
Applevangelist
42229b956e Merge remote-tracking branch 'origin/master' into develop 2023-11-15 18:21:09 +01:00
Applevangelist
078ffc9baf #MESSAGE
* Fixes for ToSRS via MS Desktop
2023-11-15 18:15:23 +01:00
Applevangelist
57ae54d665 #bugfix, docu 2023-11-15 10:17:26 +01:00
Applevangelist
59784c4af5 Merge remote-tracking branch 'origin/develop' into develop 2023-11-14 11:53:35 +01:00
Applevangelist
b962fc2a4c Merge remote-tracking branch 'origin/master' into develop 2023-11-14 11:53:29 +01:00
Applevangelist
b32453bd9c #Shoot&Scoot 2023-11-14 11:52:55 +01:00
Applevangelist
b9606ceceb #SEAD
* Added data and actions for TALD ADM_141
2023-11-12 16:53:46 +01:00
Applevangelist
77488078bf Merge remote-tracking branch 'origin/develop' into develop 2023-11-12 12:14:44 +01:00
Applevangelist
02403251ce Merge remote-tracking branch 'origin/master' into develop 2023-11-12 12:14:38 +01:00
Applevangelist
2483cadbbd Autolase smoke menu 2023-11-12 12:12:49 +01:00
Applevangelist
fb4914a120 changes 2023-11-11 19:01:51 +01:00
Applevangelist
847df24ab0 docu 2023-11-09 15:16:35 +01:00
Applevangelist
92e9e5390b Merge remote-tracking branch 'origin/develop' into develop 2023-11-09 15:10:13 +01:00
Applevangelist
92575367ae Merge remote-tracking branch 'origin/master' into develop 2023-11-09 15:10:09 +01:00
Applevangelist
7b57bf3ece Fixes 2023-11-09 15:05:25 +01:00
Applevangelist
9cb4f166f2 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2023-11-08 17:54:58 +01:00
Applevangelist
7913b83f20 matching 2023-11-08 17:43:39 +01:00
Applevangelist
e5dc191584 Merge remote-tracking branch 'origin/develop' into develop 2023-11-08 17:02:57 +01:00
Applevangelist
57ca4f37a3 Merge remote-tracking branch 'origin/master' into develop 2023-11-08 17:02:53 +01:00
Applevangelist
40da0fbb1c #PLAYERRECCE
* Added doku for OnAfter.. calls
2023-11-08 17:01:32 +01:00
Applevangelist
3f6342f0c6 Merge remote-tracking branch 'origin/develop' into develop 2023-11-08 11:25:44 +01:00
Applevangelist
bb3675ad11 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Client.lua
2023-11-08 11:25:34 +01:00
Applevangelist
a7366103c9 CLIENT 2023-11-08 11:24:34 +01:00
Applevangelist
d5a9f776f7 Various 2023-11-08 11:09:49 +01:00
Applevangelist
7f650913d9 #EVENT
* Add player UCID to event data structure (for multi-player)
2023-11-07 11:07:28 +01:00
Applevangelist
c765070401 #FLIGHTGROUP
* Resolve a stalemate when all jobs are done but _CheckGroupDone isn't called any longer
2023-11-06 18:35:17 +01:00
Applevangelist
1e974c7d3a Merge remote-tracking branch 'origin/develop' into develop 2023-11-05 13:02:28 +01:00
Applevangelist
20f74c95bf Merge remote-tracking branch 'origin/master' into develop 2023-11-05 13:02:24 +01:00
Applevangelist
b7159f7334 # 2023-11-05 13:01:38 +01:00
Applevangelist
7a97fed8a1 #SRS 2023-11-04 17:26:28 +01:00
Applevangelist
1064f2123b Merge remote-tracking branch 'origin/develop' into develop 2023-11-03 13:39:36 +01:00
Applevangelist
6e72c4c40a Merge remote-tracking branch 'origin/master' into develop 2023-11-03 13:39:32 +01:00
Applevangelist
b1823824c2 #SRS Improvements 2023-11-03 13:37:37 +01:00
Applevangelist
f0de6ca9e1 #ATIS 2023-11-02 19:26:51 +01:00
Applevangelist
1e015fd988 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_Escort_Request.lua
#	Moose Development/Moose/AI/AI_Formation.lua
2023-11-02 18:22:30 +01:00
Applevangelist
408f9d9c0c #ATIS and #SRS 2023-11-02 18:16:30 +01:00
Applevangelist
afe54e1472 Merge remote-tracking branch 'origin/develop' into develop 2023-10-31 12:49:08 +01:00
Applevangelist
0f7c3533ba Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Gci.lua
#	Moose Development/Moose/AI/AI_A2A_Patrol.lua
#	Moose Development/Moose/AI/AI_A2G_BAI.lua
#	Moose Development/Moose/AI/AI_A2G_CAS.lua
#	Moose Development/Moose/AI/AI_A2G_SEAD.lua
#	Moose Development/Moose/AI/AI_Air_Engage.lua
#	Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua
2023-10-31 12:49:03 +01:00
Applevangelist
5221645b0b Merge remote-tracking branch 'origin/develop' into develop 2023-10-29 17:46:14 +01:00
Applevangelist
a3de5fc589 Merge remote-tracking branch 'origin/master' into develop 2023-10-29 17:46:11 +01:00
Applevangelist
b8ffb626b9 #CTLD
* Adding re-packing dropped units
2023-10-29 17:44:47 +01:00
Applevangelist
b42990d65b Merge remote-tracking branch 'origin/develop' into develop 2023-10-27 09:10:40 +02:00
Applevangelist
07865f1b12 Merge remote-tracking branch 'origin/master' into develop 2023-10-27 09:10:34 +02:00
Applevangelist
b5ff10d960 #UNIT 2023-10-26 12:45:11 +02:00
Applevangelist
50eeae0b3f SPAWN 2023-10-26 09:43:56 +02:00
Applevangelist
73e05872ea Merge remote-tracking branch 'origin/develop' into develop 2023-10-25 13:48:19 +02:00
Applevangelist
cdce54e855 Merge remote-tracking branch 'origin/master' into develop 2023-10-25 13:48:12 +02:00
Applevangelist
a429f8c0aa #FC 2023-10-25 13:47:20 +02:00
Applevangelist
d728afd6f2 #docu 2023-10-25 08:45:36 +02:00
Applevangelist
3c252f01be #OPSGROUP, CONTROLLER
* AUFTRAG Patrol Race Track will use ASL not AGL as default
2023-10-25 08:39:11 +02:00
Applevangelist
d7788a2a2e #PLAYERTASK
* Remove client from task, even if only player name is available
2023-10-24 18:24:49 +02:00
Applevangelist
07851f449a Merge remote-tracking branch 'origin/develop' into develop 2023-10-24 13:47:33 +02:00
Applevangelist
ff883f48e9 Merge remote-tracking branch 'origin/master' into develop 2023-10-24 13:47:28 +02:00
Applevangelist
3ffb6e192a #EASYGCICAP - added better race track options 2023-10-24 13:35:10 +02:00
Applevangelist
20f28d30c0 Merge remote-tracking branch 'origin/develop' into develop 2023-10-21 12:44:42 +02:00
Applevangelist
34dfb1e43f Merge remote-tracking branch 'origin/master' into develop 2023-10-21 12:44:37 +02:00
Applevangelist
6035544193 #RECOVERYTANKER
* Added option to set unlimited fuel
2023-10-21 12:44:12 +02:00
Applevangelist
9c0cbe2ef8 Merge remote-tracking branch 'origin/develop' into develop 2023-10-20 18:45:49 +02:00
Applevangelist
0139286dff Merge remote-tracking branch 'origin/master' into develop 2023-10-20 18:45:44 +02:00
Applevangelist
d890b3fe92 #Con 2023-10-20 18:45:20 +02:00
Applevangelist
52e83c7863 Merge remote-tracking branch 'origin/develop' into develop 2023-10-20 12:39:44 +02:00
Applevangelist
26f3a8cf64 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2023-10-20 12:39:35 +02:00
Applevangelist
8920f7e25f Merge remote-tracking branch 'origin/develop' into develop 2023-10-19 13:12:10 +02:00
Applevangelist
8dc008e428 Merge remote-tracking branch 'origin/master' into develop 2023-10-19 13:12:06 +02:00
Applevangelist
06b983870f Merge remote-tracking branch 'origin/develop' into develop 2023-10-17 16:59:15 +02:00
Applevangelist
5f1451f012 Merge remote-tracking branch 'origin/master' into develop 2023-10-17 16:59:10 +02:00
Applevangelist
73464a09f1 srs 2023-10-17 16:06:11 +02:00
Applevangelist
cb048bb406 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-10-17 16:06:03 +02:00
Applevangelist
07c86ec2dc Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Core/Zone.lua
2023-10-17 16:05:24 +02:00
Applevangelist
443e853d2a #trigger 2023-10-17 16:03:47 +02:00
Applevangelist
d8bb2fe1f1 #MSRS 2023-10-17 11:01:18 +02:00
Applevangelist
7558b7ee1d #MSRS
* Added loading config file
2023-10-17 09:28:20 +02:00
Applevangelist
ab197699b6 ATIS 2023-10-14 17:23:26 +02:00
Applevangelist
12d23266c3 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2023-10-14 17:21:51 +02:00
Applevangelist
9451956914 #MSRS
* Added config file loading
2023-10-14 16:49:55 +02:00
Applevangelist
c9cad84419 #SRS 2023-10-13 16:12:38 +02:00
Applevangelist
013a6f134e AUFTRAG 2023-10-12 18:05:23 +02:00
Applevangelist
8dc601bf48 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Auftrag.lua
2023-10-12 18:04:21 +02:00
Applevangelist
3f8c7eaa94 Merge remote-tracking branch 'origin/master' into develop 2023-10-12 18:03:08 +02:00
Applevangelist
0c97bc5b59 #AUFTRAG 2023-10-12 17:55:54 +02:00
Applevangelist
dca57c97de Syntax 2023-10-12 10:54:00 +02:00
Applevangelist
400ae46e03 #RAT
* DOcu
2023-10-12 08:52:23 +02:00
Applevangelist
80817a1af3 Merge remote-tracking branch 'origin/develop' into develop 2023-10-06 15:50:55 +02:00
Applevangelist
3d44af3042 Merge remote-tracking branch 'origin/master' into develop 2023-10-06 15:50:51 +02:00
Applevangelist
fd0f55099f Merge remote-tracking branch 'origin/develop' into develop 2023-10-06 13:24:11 +02:00
Applevangelist
c8a20afb87 Merge remote-tracking branch 'origin/master' into develop 2023-10-06 13:24:06 +02:00
Applevangelist
8d37414eac #MESSAGE
* Added `ToSRS()`
2023-10-06 13:17:54 +02:00
Applevangelist
aed6438648 Merge remote-tracking branch 'origin/develop' into develop 2023-10-06 11:43:27 +02:00
Applevangelist
00b466c6a5 Merge remote-tracking branch 'origin/master' into develop 2023-10-06 11:43:23 +02:00
Applevangelist
ed7821ad1c #EasyGCICAP 2023-10-06 11:30:31 +02:00
Applevangelist
8f71e6c5c4 #EasyGCICAP
* Recon Points option added
2023-10-06 11:16:30 +02:00
Applevangelist
7adf99f82e #INTEL
* Added Conflict zones
2023-10-05 17:39:55 +02:00
Applevangelist
034c1aa481 Merge remote-tracking branch 'origin/develop' into develop 2023-09-29 10:21:08 +02:00
Applevangelist
40fa3afbde Merge remote-tracking branch 'origin/master' into develop 2023-09-29 10:21:03 +02:00
Applevangelist
00c837c361 Merge remote-tracking branch 'origin/develop' into develop 2023-09-28 13:29:20 +02:00
Applevangelist
d6e3caaa9b #EasyGCICAP
* Docu additions
2023-09-28 13:28:49 +02:00
Applevangelist
98a11a8aad #EasyGCICAP
* Added option for an AWACS patrol point and Squad
* Added option to make Tanker and AWACS invisible
2023-09-28 13:15:27 +02:00
Applevangelist
963b2f1b46 Merge remote-tracking branch 'origin/develop' into develop 2023-09-28 08:06:04 +02:00
Applevangelist
f602f05c5a Merge remote-tracking branch 'origin/master' into develop 2023-09-28 08:05:59 +02:00
Applevangelist
3ea0cc6427 #EasyGCICAP
* Added success criteria if intruder leaves monitored zones
2023-09-27 18:07:34 +02:00
Applevangelist
258f9f7bb7 Zones 2023-09-27 15:40:44 +02:00
Applevangelist
6f673583ab pos 2023-09-27 15:39:51 +02:00
Applevangelist
0477ef669a docu 2023-09-26 13:29:35 +02:00
Applevangelist
b023ec2d3f Merge remote-tracking branch 'origin/develop' into develop 2023-09-26 13:11:33 +02:00
Applevangelist
3c9bf1de77 #EasyGCICAP
* Initial Release
2023-09-26 13:07:10 +02:00
Applevangelist
4e86197d62 Merge remote-tracking branch 'origin/develop' into develop 2023-09-25 08:44:22 +02:00
Applevangelist
816fd9b758 Merge remote-tracking branch 'origin/master' into develop 2023-09-25 08:44:19 +02:00
Applevangelist
c1c7279e01 mods 2023-09-25 08:43:00 +02:00
Applevangelist
baf8edfc9c chief typo 2023-09-25 08:42:49 +02:00
Applevangelist
d2450ff776 Merge remote-tracking branch 'origin/develop' into develop 2023-09-21 09:01:49 +02:00
Applevangelist
f71039e840 #ATIS
* Added Spanish TTS locale ("es"
2023-09-20 17:16:52 +02:00
Applevangelist
01bd921d30 Merge remote-tracking branch 'origin/develop' into develop 2023-09-19 18:09:00 +02:00
Applevangelist
ad079cc416 Merge remote-tracking branch 'origin/master' into develop 2023-09-19 18:08:56 +02:00
Applevangelist
1e966ee217 #ATIS
* Added SRS localization
2023-09-19 18:06:48 +02:00
Applevangelist
523c36100a Merge remote-tracking branch 'origin/develop' into develop 2023-09-19 12:15:01 +02:00
Applevangelist
fa4e3ebc7e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2023-09-19 12:14:54 +02:00
Applevangelist
3cc6f53374 Serialize 2023-09-19 12:10:04 +02:00
Applevangelist
03e1b28c97 Typo 2023-09-19 11:30:27 +02:00
Applevangelist
2a761ff8d0 Merge remote-tracking branch 'origin/develop' into develop 2023-09-19 11:11:18 +02:00
Applevangelist
ed6a388a8e Merge remote-tracking branch 'origin/master' into develop 2023-09-19 11:11:14 +02:00
Applevangelist
75529958f6 #SEAD
* Better calculation of switch-on again time
2023-09-19 11:09:55 +02:00
Applevangelist
2e7cbe989a Merge remote-tracking branch 'origin/develop' into develop 2023-09-17 17:17:13 +02:00
Applevangelist
b0db51fa5a Merge remote-tracking branch 'origin/master' into develop 2023-09-17 17:17:03 +02:00
Applevangelist
5886d154ae #SPAWN
* Added option for Modex pre- and postfix
2023-09-17 17:13:51 +02:00
Applevangelist
f6fcf41c70 Merge remote-tracking branch 'origin/develop' into develop 2023-09-17 16:54:02 +02:00
Applevangelist
a22ad88bda Merge remote-tracking branch 'origin/master' into develop 2023-09-17 16:53:58 +02:00
Applevangelist
c173fe0cb8 Quick check on airbase being a string 2023-09-17 16:52:45 +02:00
Applevangelist
7b027c0802 Merge remote-tracking branch 'origin/develop' into develop 2023-09-15 09:13:05 +02:00
Applevangelist
df05290180 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Enums.lua
2023-09-15 09:13:01 +02:00
Applevangelist
dd41cd4b4f #Startup
* Re-instate suppression of error box.
2023-09-15 09:11:20 +02:00
Applevangelist
c4e3e4420c Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2023-09-14 16:34:24 +02:00
Applevangelist
97809cdb65 #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:35:43 +02:00
Applevangelist
4e44d979a1 Merge remote-tracking branch 'origin/develop' into develop 2023-09-13 16:05:02 +02:00
Applevangelist
0e0d22e7ce Merge remote-tracking branch 'origin/master' into develop 2023-09-13 16:04:57 +02:00
Applevangelist
74f87b3f2d Intellisense 2023-09-13 16:02:38 +02:00
Applevangelist
0e3d4205c9 Merge remote-tracking branch 'origin/develop' into develop 2023-09-13 15:31:55 +02:00
Applevangelist
fc44894bc0 Merge remote-tracking branch 'origin/master' into develop 2023-09-13 15:31:50 +02:00
Applevangelist
cf34e7f165 docu 2023-09-13 15:31:07 +02:00
Applevangelist
ae7f27ed6f Cleanup 2023-09-10 15:58:35 +02:00
Applevangelist
3bbfaad77b Cleanup 2023-09-10 15:46:32 +02:00
Applevangelist
1282b03547 Merge remote-tracking branch 'origin/develop' into develop 2023-09-10 15:43:21 +02:00
Applevangelist
70a44217f5 Merge remote-tracking branch 'origin/master' into develop 2023-09-10 15:43:15 +02:00
Applevangelist
88741d943e docu 2023-09-10 15:41:16 +02:00
Applevangelist
52764cc900 #AICSAR
* changes from OPSTRANSPORT
2023-09-09 13:09:46 +02:00
Applevangelist
50b7fb0d5d Merge branch 'master' into develop 2023-09-09 12:29:32 +02:00
Applevangelist
0a812d8283 Merge branch 'develop-2' into develop
# Conflicts:
#	Moose Development/Moose/Modules_local.lua
#	Moose Development/Moose/Utilities/Routines.lua
#	Moose Development/Moose/Wrapper/Group.lua
2023-09-09 12:29:26 +02:00
Applevangelist
2afde85ef0 #Remove routines 2023-09-07 18:39:07 +02:00
Applevangelist
568f76b0b2 #UTILS
* Remove utils.routines
2023-09-07 18:01:16 +02:00
Applevangelist
58f60dbf1b Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-09-07 16:17:44 +02:00
Applevangelist
559c8d763b Merge remote-tracking branch 'origin/master' into develop 2023-09-07 16:16:19 +02:00
Applevangelist
e6a7416acf #PLAYERTASK 2023-09-07 12:43:23 +02:00
Applevangelist
f43924fbb0 #CLIENTMENU 2023-09-05 10:34:07 +02:00
Applevangelist
da77741dab Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-09-01 09:49:13 +02:00
Applevangelist
d367f85f06 Merge remote-tracking branch 'origin/master' into develop 2023-09-01 09:47:30 +02:00
Applevangelist
d9c656f6d2 #Airboss 2023-09-01 09:42:24 +02:00
Applevangelist
379dd44c04 Merge remote-tracking branch 'origin/develop' into develop 2023-09-01 08:53:28 +02:00
Applevangelist
d9a11588b7 Merge remote-tracking branch 'origin/master' into develop 2023-09-01 08:53:22 +02:00
Applevangelist
cb6dd0d6c7 #MANTIS 2023-09-01 08:51:51 +02:00
Applevangelist
ab2e8efad5 Merge remote-tracking branch 'origin/develop' into develop 2023-08-31 15:12:41 +02:00
Applevangelist
0f5ea8516b Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Mantis.lua
2023-08-31 15:12:00 +02:00
Applevangelist
7769ca8c3f #MANTIS
* Add zone filter option
2023-08-31 11:59:03 +02:00
Applevangelist
2940eaed63 #AIRBOSS 2023-08-31 11:53:13 +02:00
Applevangelist
219e46793e #MANTIS
* CH assets
2023-08-30 16:46:33 +02:00
Applevangelist
0fa7897de4 Merge remote-tracking branch 'origin/develop' into develop 2023-08-29 15:50:16 +02:00
Applevangelist
fe120542f3 Merge remote-tracking branch 'origin/master' into develop 2023-08-29 15:50:11 +02:00
Applevangelist
1644db1503 Merge remote-tracking branch 'origin/develop' into develop 2023-08-26 16:09:17 +02:00
Applevangelist
eb67e938f8 Merge remote-tracking branch 'origin/master' into develop 2023-08-26 16:09:10 +02:00
Applevangelist
30cadf0d42 test 2023-08-26 16:08:45 +02:00
Thomas
48b6b06503 Update Set.lua Docu (#1995) (#1997)
* Update Set.lua Docu

Added regex explanation

* Update Set.lua
2023-08-23 11:46:08 +02:00
Applevangelist
6edac3c145 Merge remote-tracking branch 'origin/develop' into develop 2023-08-22 12:41:27 +02:00
Applevangelist
8df796b6db Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2023-08-22 12:41:17 +02:00
Applevangelist
fd80339431 #Controllable
* Added Aerobtics tasks
2023-08-22 10:24:19 +02:00
Applevangelist
0ddf9ff807 Merge branch 'develop-2' into develop 2023-08-21 16:44:57 +02:00
Applevangelist
c40f310e10 Merge branch 'master' into develop 2023-08-21 16:44:51 +02:00
Applevangelist
13f025aee1 Merge remote-tracking branch 'origin/develop' into develop 2023-08-20 15:23:38 +02:00
Applevangelist
675b1ef962 Merge remote-tracking branch 'origin/master' into develop 2023-08-20 15:23:33 +02:00
Applevangelist
5fff8a60ba Storages 2023-08-20 15:22:29 +02:00
Applevangelist
36ae5a6bc2 Merge remote-tracking branch 'origin/develop' into develop 2023-08-20 15:14:33 +02:00
Applevangelist
939160e8df Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Enums.lua
2023-08-20 15:14:29 +02:00
Applevangelist
0460cc7e3e ENUMS.Storage.weapons 2023-08-20 15:13:32 +02:00
Applevangelist
e0acd4fd7d Merge remote-tracking branch 'origin/develop' into develop 2023-08-20 14:18:10 +02:00
Applevangelist
caf2fa4a5a Merge remote-tracking branch 'origin/master' into develop 2023-08-20 14:18:04 +02:00
Applevangelist
a0e8f7f3a9 #PLAYERRECCE
* QoL Fixes for menus
2023-08-20 14:17:39 +02:00
Applevangelist
7f4baaae4d Fix for #1984 2023-08-20 13:27:46 +02:00
Applevangelist
2ee8516427 Fixes 2023-08-20 11:20:07 +02:00
Applevangelist
4c2f71e818 Merge remote-tracking branch 'origin/develop' into develop 2023-08-18 11:08:20 +02:00
Applevangelist
d4942ab8f8 Merge remote-tracking branch 'origin/master' into develop 2023-08-18 11:08:14 +02:00
Applevangelist
53712b8e40 POS 2023-08-18 11:05:48 +02:00
Applevangelist
4e4bd000d4 Merge remote-tracking branch 'origin/develop' into develop 2023-08-18 08:49:56 +02:00
Applevangelist
b873b7993e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Database.lua
2023-08-18 08:49:50 +02:00
Applevangelist
18296fb4b1 Merge remote-tracking branch 'origin/develop' into develop 2023-08-02 18:03:36 +02:00
Applevangelist
f66f135f79 Merge remote-tracking branch 'origin/master' into develop 2023-08-02 18:03:32 +02:00
Applevangelist
bbae91bb6c #CONTROLLABLE
* Added EnRouteTaskCAP()
2023-08-02 18:02:22 +02:00
Applevangelist
cd7d307fc4 Merge remote-tracking branch 'origin/develop' into develop 2023-08-01 16:27:33 +02:00
Applevangelist
bda25fb4cf Merge remote-tracking branch 'origin/master' into develop 2023-08-01 16:27:23 +02:00
Applevangelist
5231bc8372 # 2023-08-01 16:26:51 +02:00
Applevangelist
f085a5423a SCENERY 2023-08-01 16:18:41 +02:00
Applevangelist
2ccb4c128a Zone 2023-08-01 16:16:20 +02:00
Applevangelist
9a9ac6f2e1 SCENERY 2023-08-01 11:38:02 +02:00
Applevangelist
090de85388 joa 2023-07-31 18:03:54 +02:00
Applevangelist
9d4b5cfc0b Debugs 2023-07-29 17:20:06 +02:00
Applevangelist
9c7e42ed1e Merge remote-tracking branch 'origin/develop' into develop 2023-07-29 16:47:16 +02:00
Applevangelist
83aefc416a Merge remote-tracking branch 'origin/master' into develop 2023-07-29 16:47:10 +02:00
Applevangelist
29947d69c3 Changes 2023-07-29 16:40:46 +02:00
Applevangelist
3b2850e042 changes 2023-07-29 16:02:42 +02:00
Applevangelist
5c2b77cf76 #Chmages 2023-07-29 15:56:28 +02:00
Applevangelist
9c95b91086 #changes 2023-07-29 15:56:20 +02:00
Applevangelist
27fd726ce3 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-07-26 17:45:25 +02:00
Applevangelist
d58e93e2a4 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-07-26 17:43:16 +02:00
Applevangelist
9a695ef5bf #AWACS 2023-07-26 07:49:52 +02:00
Applevangelist
b9828f3cd1 #AWACS
* Tactical Radioi Option added
2023-07-25 14:49:28 +02:00
Applevangelist
53952b1636 Merge remote-tracking branch 'origin/develop' into develop 2023-07-25 12:03:06 +02:00
Applevangelist
13ac4c386a Merge remote-tracking branch 'origin/master' into develop 2023-07-25 12:03:02 +02:00
Applevangelist
6fa90c7f39 #AWACS 2023-07-25 12:02:42 +02:00
Applevangelist
6fcaccdfb1 * fixes 2023-07-25 12:02:09 +02:00
Applevangelist
070cd6e7c6 Merge remote-tracking branch 'origin/develop' into develop 2023-07-23 12:43:35 +02:00
Applevangelist
64e87a906f Merge remote-tracking branch 'origin/master' into develop 2023-07-23 12:43:31 +02:00
Applevangelist
1fbadd02f9 #Updates 2023-07-23 12:41:46 +02:00
Applevangelist
02fadaf17e #AIRBASE, #ATIS 2023-07-23 12:38:21 +02:00
Applevangelist
c4a13f985e Merge remote-tracking branch 'origin/develop' into develop 2023-07-19 16:08:21 +02:00
Applevangelist
7367e15121 #AICSAR
* Added FSM Event "HeloOnDuty"
2023-07-19 09:56:09 +02:00
Applevangelist
07cdc36181 Merge remote-tracking branch 'origin/develop' into develop 2023-07-17 16:28:35 +02:00
Applevangelist
69fc2dca42 Merge remote-tracking branch 'origin/master' into develop 2023-07-17 16:28:29 +02:00
Applevangelist
e8432db26e #ClientMenu 2023-07-17 16:26:06 +02:00
Applevangelist
e8ad649770 #PT 2023-07-16 11:26:47 +02:00
Applevangelist
63770fdf79 Merge remote-tracking branch 'origin/develop' into develop 2023-07-15 18:02:45 +02:00
Applevangelist
b48d713fda Merge remote-tracking branch 'origin/master' into develop 2023-07-15 18:02:39 +02:00
Applevangelist
77955bc03c #changes 2023-07-15 18:02:12 +02:00
Applevangelist
99b41c6715 Merge remote-tracking branch 'origin/develop' into develop 2023-07-13 16:15:33 +02:00
Applevangelist
62e6eb91fc Merge remote-tracking branch 'origin/master' into develop 2023-07-13 16:15:28 +02:00
Applevangelist
eba9c697e3 #SPAWN 2023-07-13 16:06:23 +02:00
Applevangelist
643ba17d80 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Core/ClientMenu.lua
#	Moose Setup/Moose.files
2023-07-13 16:06:14 +02:00
Applevangelist
301f49078e Merge remote-tracking branch 'origin/master' into develop 2023-07-12 17:55:50 +02:00
Applevangelist
6c5cf814b4 #Spot 2023-07-12 17:54:35 +02:00
Applevangelist
45adc6160d #CLIENTMENUMANAGER Docu 2023-07-11 16:10:08 +02:00
Applevangelist
0326bee7a3 # 2023-07-11 15:42:14 +02:00
Applevangelist
ee7fca09b6 Merge remote-tracking branch 'origin/master' into develop 2023-07-07 15:16:10 +02:00
Applevangelist
fd1257052b # 2023-07-07 15:15:28 +02:00
Applevangelist
102a48bf97 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/AmmoTruck.lua
2023-07-03 17:30:50 +02:00
Applevangelist
2537fc44bb Merge remote-tracking branch 'origin/master' into develop 2023-07-03 17:29:36 +02:00
Applevangelist
7dd270dc8b #GROUND ESCORT 2023-07-03 17:26:47 +02:00
Applevangelist
be3fc2c964 #GROUNDESCORT 2023-07-03 17:05:54 +02:00
Applevangelist
0d6fe49a41 changes 2023-07-03 16:45:02 +02:00
Thomas
ffcfc448be Update Controllable.lua 2023-07-03 13:53:59 +02:00
Thomas
303a15eb50 Ammotruck
* Added feature for # of re-munitions a truck can do
2023-07-03 12:21:05 +02:00
Applevangelist
ebf3d8d55e Merge remote-tracking branch 'origin/develop' into develop 2023-07-01 13:17:58 +02:00
Applevangelist
3909a4b2dc Merge remote-tracking branch 'origin/master' into develop 2023-07-01 13:17:51 +02:00
Applevangelist
30f8a57556 Merge remote-tracking branch 'origin/develop' into develop 2023-07-01 13:15:31 +02:00
Applevangelist
03a18d5237 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Development/Moose/Utilities/Utils.lua
2023-07-01 13:15:24 +02:00
Applevangelist
b3e9a2b64d #fixes 2023-07-01 13:08:00 +02:00
Applevangelist
23740d12eb Merge remote-tracking branch 'origin/develop' into develop 2023-06-26 17:29:40 +02:00
Applevangelist
52138eee98 Merge remote-tracking branch 'origin/master' into develop 2023-06-26 17:29:34 +02:00
Applevangelist
c7a66e0f99 #Fixes 2023-06-26 17:29:02 +02:00
Applevangelist
a2d3205701 #CTLD
* Added option for troops subcategories
2023-06-22 13:41:58 +02:00
Applevangelist
e8ab86ab7f #CTLD
* Added categories for Troops
2023-06-22 12:57:08 +02:00
Applevangelist
abf694aa81 # Docu fixes 2023-06-22 12:19:20 +02:00
Applevangelist
24c58acf85 #AIRBOSS
* Bugfix
2023-06-22 09:34:21 +02:00
Applevangelist
37cbafde3e Merge remote-tracking branch 'origin/develop' into develop 2023-06-21 14:05:54 +02:00
Applevangelist
8af5a532e3 Merge remote-tracking branch 'origin/master' into develop 2023-06-21 10:43:08 +02:00
Applevangelist
a5fa33e72f Merge remote-tracking branch 'origin/develop' into develop 2023-06-21 10:25:52 +02:00
Applevangelist
925ac7907b #AIRBOSS SRS 2023-06-21 10:25:30 +02:00
Applevangelist
c88bb3bbdb #PLAYERTASKCONTROLLER
* Menu build lock
2023-06-18 13:29:25 +02:00
Applevangelist
d005064c28 #PLAYERTASK
* Menu build finetuning
2023-06-18 13:12:35 +02:00
Applevangelist
f8963b33a3 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
2023-06-18 12:21:40 +02:00
Applevangelist
09f0c9e069 #AIRBOSS 2023-06-18 12:18:09 +02:00
Applevangelist
0d40b36613 #AIRBOSS
* Added option to set Airboss voice for SRS etc
* Nicer read out of weather info and carrier info
2023-06-17 15:01:57 +02:00
Applevangelist
ef17399128 #AIRBOSS SRS 2023-06-16 18:10:07 +02:00
Applevangelist
cca8c31ff4 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Positionable.lua
#	Moose Development/Moose/Wrapper/Unit.lua
2023-06-16 11:08:54 +02:00
Applevangelist
fde398e80b Merge remote-tracking branch 'origin/master' into develop 2023-06-16 11:07:40 +02:00
Applevangelist
fd2e9fbafc Merge remote-tracking branch 'origin/develop' into develop 2023-06-15 14:52:40 +02:00
Applevangelist
15e93cc60d Merge remote-tracking branch 'origin/master' into develop 2023-06-15 14:52:36 +02:00
Applevangelist
b2c95e37ae Merge remote-tracking branch 'origin/develop' into develop 2023-06-15 14:50:30 +02:00
Applevangelist
1da1b9d2cb Merge remote-tracking branch 'origin/develop' into develop 2023-06-14 17:42:23 +02:00
Applevangelist
978c953e0d Merge remote-tracking branch 'origin/master' into develop 2023-06-14 17:41:43 +02:00
Applevangelist
27011f3ce6 Merge remote-tracking branch 'origin/develop' into develop 2023-06-14 17:25:33 +02:00
Applevangelist
cd5ac59c40 Merge remote-tracking branch 'origin/master' into develop 2023-06-14 17:25:28 +02:00
Applevangelist
e2e2b44fb8 Merge remote-tracking branch 'origin/develop' into develop 2023-06-13 18:01:46 +02:00
Applevangelist
a8be273479 FIXES 2023-06-13 18:01:13 +02:00
Applevangelist
9e84c6af1b Merge remote-tracking branch 'origin/develop' into develop 2023-06-13 08:35:53 +02:00
Applevangelist
84e7460a67 Merge remote-tracking branch 'origin/master' into develop 2023-06-13 08:35:48 +02:00
Applevangelist
8802709d3c Merge remote-tracking branch 'origin/Apple/Develop' into develop 2023-06-13 08:35:30 +02:00
Applevangelist
253ed62d46 Fixes 2023-06-13 08:35:27 +02:00
Thomas
4d247e75f2 Airbase fixes (#1958)
* Update Airbase.lua

Corrected enumerator for Ben-Gurion (Ben_Gurion)

* Update Airbase.lua (#1957)

Deleted raj al … airbases #1955
2023-06-12 06:29:24 +02:00
Applevangelist
3d4eb1545e Merge remote-tracking branch 'origin/develop' into develop 2023-06-10 19:12:04 +02:00
Applevangelist
5006d01932 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2023-06-10 19:11:59 +02:00
Applevangelist
ccc11623c3 #UTILS
* Sinai Time
2023-06-10 19:04:18 +02:00
Applevangelist
dd5399a41d Merge remote-tracking branch 'origin/develop' into develop 2023-06-09 15:17:20 +02:00
Applevangelist
9da6b2a4f5 Merge remote-tracking branch 'origin/master' into develop 2023-06-09 15:17:12 +02:00
Applevangelist
23e71e991f #AIRBASE
* Sinai airfield enumerator
2023-06-09 15:13:20 +02:00
Applevangelist
8658804c82 Merge remote-tracking branch 'origin/develop' into develop 2023-06-09 13:25:54 +02:00
Applevangelist
77c4eb0d54 Merge remote-tracking branch 'origin/develop' into develop 2023-06-08 13:59:05 +02:00
Applevangelist
238640ec91 Merge remote-tracking branch 'origin/master' into develop 2023-06-08 13:58:58 +02:00
Applevangelist
0a0a4684f8 #PLAYERTASKCONTROLLER
* Added basic scoring
2023-06-08 13:55:52 +02:00
Applevangelist
a12f874e34 Merge remote-tracking branch 'origin/develop' into develop 2023-06-06 16:29:22 +02:00
Applevangelist
00f89f0855 PLAYERTASK
* Small fix in TTS text
2023-06-06 16:13:23 +02:00
Applevangelist
4cc14b93b6 Merge remote-tracking branch 'origin/develop' into develop 2023-06-03 12:35:59 +02:00
Applevangelist
f5aa294c70 Merge remote-tracking branch 'origin/master' into develop 2023-06-03 12:35:54 +02:00
Applevangelist
bb17e8cc1f #CTLD
* Ensure new menus can be build if player changes helos
2023-06-03 12:34:09 +02:00
Applevangelist
69f2acae72 Merge remote-tracking branch 'origin/develop' into develop 2023-06-02 08:46:56 +02:00
Applevangelist
00ecbc98ba Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Airbase.lua
2023-06-02 08:46:48 +02:00
Applevangelist
065c59f167 #UNIT #CTLD
* Stabilize that sometimes a unit coordinate cannot be found
2023-06-02 08:44:43 +02:00
Applevangelist
878169f51c Fixes 2023-06-01 10:00:31 +02:00
Applevangelist
d9ee3a2323 Merge remote-tracking branch 'origin/develop' into develop 2023-05-30 12:06:46 +02:00
Applevangelist
5afad6e313 #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:05:51 +02:00
Applevangelist
631d82216e SET 2023-05-30 11:53:15 +02:00
Applevangelist
0b7148f675 Merge remote-tracking branch 'origin/develop' into develop 2023-05-30 07:40:41 +02:00
Applevangelist
b03f03bf06 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CSAR.lua
2023-05-30 07:40:32 +02:00
Applevangelist
cf39f494f8 #CSAR
* Corrected flare distance to kms
2023-05-30 07:38:05 +02:00
Applevangelist
ca9a5187f6 Merge remote-tracking branch 'origin/develop' into develop 2023-05-28 15:29:40 +02:00
Applevangelist
f8201ffed7 Merge remote-tracking branch 'origin/master' into develop 2023-05-28 15:29:30 +02:00
Applevangelist
b70780162b #SPAWN
* Logic fix for the last parameter of `NewFromTemplate()`
2023-05-28 15:29:01 +02:00
Applevangelist
da312cd5ac Merge remote-tracking branch 'origin/develop' into develop 2023-05-27 16:31:12 +02:00
Applevangelist
5938e1426e Merge remote-tracking branch 'origin/develop' into develop 2023-05-26 08:29:28 +02:00
Applevangelist
f695639839 Merge remote-tracking branch 'origin/master' into develop 2023-05-26 08:29:22 +02:00
Applevangelist
016fbe0a10 Merge remote-tracking branch 'origin/develop' into develop 2023-05-25 09:00:44 +02:00
Applevangelist
dd496d35a8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2023-05-25 09:00:33 +02:00
Applevangelist
158ffde780 #CONTROLLER
* Fix for Link4
2023-05-25 08:58:21 +02:00
Applevangelist
402674470f Merge remote-tracking branch 'origin/develop' into develop 2023-05-25 08:26:23 +02:00
Applevangelist
31174ae97c Merge remote-tracking branch 'origin/master' into develop 2023-05-25 08:26:06 +02:00
Applevangelist
4c7239c5ec Bugfixes 2023-05-25 08:22:51 +02:00
Applevangelist
93a63cc868 Merge remote-tracking branch 'origin/develop' into develop 2023-05-22 17:58:28 +02:00
Applevangelist
b5aa3dd869 Merge remote-tracking branch 'origin/master' into develop 2023-05-22 17:58:21 +02:00
Applevangelist
a69e62a66b #SPAWN
* Tweaked NewFromTemplate, and gave a better example
2023-05-22 17:56:53 +02:00
Applevangelist
7c3fa4ebc2 Merge remote-tracking branch 'origin/develop' into develop 2023-05-20 12:14:23 +02:00
Applevangelist
668162845c Merge remote-tracking branch 'origin/master' into develop 2023-05-20 12:14:16 +02:00
Applevangelist
c6051f30d0 Small fix 2023-05-20 12:12:00 +02:00
Applevangelist
f78354eedb Merge remote-tracking branch 'origin/develop' into develop 2023-05-19 17:12:45 +02:00
Applevangelist
d83079ecb8 Merge remote-tracking branch 'origin/master' into develop 2023-05-19 17:12:34 +02:00
Applevangelist
f1b030f3d5 #Added findcloseststatic 2023-05-19 17:11:26 +02:00
Applevangelist
019e826515 Merge remote-tracking branch 'origin/develop' into develop 2023-05-17 10:27:43 +02:00
Applevangelist
16b9464da5 Merge remote-tracking branch 'origin/master' into develop 2023-05-17 10:27:36 +02:00
Applevangelist
a33ca69368 fixes 2023-05-17 10:26:58 +02:00
Applevangelist
c8c031d05f Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2023-05-17 09:40:40 +02:00
Applevangelist
c84b54a214 #CTLD
* placement of dropped crates to better align to unit length
2023-05-11 15:30:25 +02:00
Applevangelist
f5fb179304 Merge remote-tracking branch 'origin/develop' into develop 2023-05-09 09:50:30 +02:00
Applevangelist
f2003fa75f Merge remote-tracking branch 'origin/master' into develop 2023-05-09 09:50:23 +02:00
Applevangelist
bda0736527 #AI_A2X...
* Fixes
2023-05-09 09:48:49 +02:00
Applevangelist
439856945e Merge remote-tracking branch 'origin/develop' into develop 2023-05-05 10:33:18 +02:00
Applevangelist
3a81d449da Merge remote-tracking branch 'origin/master' into develop 2023-05-05 10:33:09 +02:00
Applevangelist
a29dcbb956 #COORDINATE
* Added `IsInSteepArea()`and `IsInFlatArea()`
2023-05-05 10:31:43 +02:00
Applevangelist
265fb4a8e8 #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:32:32 +02:00
Applevangelist
a4e576e26d #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:32:16 +02:00
Applevangelist
a0219e4a08 #SCENERY
* Added update of Life0 value if `GetLife()`is called
#SET_SCENERY
* Added Documentation
2023-04-25 09:12:47 +02:00
Applevangelist
a41ee3279e #SET_SCENERY
* Added functions to count Life0, Life and RelativeLife points of SET_SCENERY
2023-04-24 16:44:54 +02:00
Applevangelist
f8f1547f27 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-04-24 16:18:34 +02:00
Applevangelist
4724ae3566 Merge remote-tracking branch 'origin/master' into develop 2023-04-24 16:16:23 +02:00
Applevangelist
e99917b8f7 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2023-04-22 17:53:47 +02:00
Applevangelist
96467d79b8 #CTLD 2023-04-20 08:22:46 +02:00
Applevangelist
65357943e7 #SET
* Active Zone Filtering
2023-04-20 08:04:40 +02:00
Applevangelist
2470632e84 Fixes for getPlayerName errors 2023-04-18 10:26:43 +02:00
Applevangelist
2a11b64de4 Merge remote-tracking branch 'origin/develop' into develop 2023-04-16 16:12:21 +02:00
Applevangelist
44bae0c3a2 Merge remote-tracking branch 'origin/master' into develop 2023-04-16 16:12:08 +02:00
Applevangelist
d5eb97863b #CTLD
* Update saving/loading to include structure
2023-04-16 16:09:58 +02:00
Applevangelist
ad031a172d Merge remote-tracking branch 'origin/develop' into develop 2023-04-15 16:25:32 +02:00
Applevangelist
52bd4be012 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2023-04-15 16:25:21 +02:00
Applevangelist
a6af53d78c #CTLD
* Allow loadbacks with preciser coordinates
2023-04-13 15:49:21 +02:00
Applevangelist
82a144b12e Merge remote-tracking branch 'origin/develop' into develop 2023-04-04 10:34:30 +02:00
Applevangelist
91d4f6a8b4 Merge remote-tracking branch 'origin/master' into develop 2023-04-04 10:34:20 +02:00
Applevangelist
17e49b6a2f #DATABASE
* Small fix for CLIENT:FindByName()
2023-04-04 10:32:38 +02:00
Applevangelist
34d994beec Merge remote-tracking branch 'origin/develop' into develop 2023-04-03 12:17:11 +02:00
Applevangelist
c594ac1be1 Merge remote-tracking branch 'origin/master' into develop 2023-04-03 12:17:03 +02:00
Applevangelist
7ae9fa3225 #NET
* Fix for ucid can be nil
2023-04-03 12:15:49 +02:00
Applevangelist
80fa8c1c05 Merge remote-tracking branch 'origin/develop' into develop 2023-03-30 12:23:49 +02:00
Applevangelist
6b34083af0 Merge remote-tracking branch 'origin/master' into develop 2023-03-30 12:23:40 +02:00
Applevangelist
42d5421cd8 Added Init Methods to set Unit Positions on Spawn 2023-03-30 12:22:30 +02:00
Applevangelist
f093fef8f8 Small fix for SET_UNIT if used in capture zone coalition with a polygon zone 2023-03-30 09:23:51 +02:00
Applevangelist
484fab26e0 Merge remote-tracking branch 'origin/develop' into develop 2023-03-28 11:04:18 +02:00
Applevangelist
2c164f3797 Merge remote-tracking branch 'origin/master' into develop 2023-03-28 11:04:10 +02:00
Applevangelist
08c72df1e5 SET_STATIC - Added GetClosestStatic() 2023-03-28 11:02:42 +02:00
Applevangelist
837d327308 Merge remote-tracking branch 'origin/develop' into develop 2023-03-24 10:29:19 +01:00
Applevangelist
fd562a1d9e Typo fix 2023-03-23 09:22:13 +01:00
Applevangelist
019f2fe068 Merge remote-tracking branch 'origin/develop' into develop 2023-03-23 08:47:40 +01:00
Applevangelist
f1496d52c0 Merge remote-tracking branch 'origin/master' into develop 2023-03-23 08:47:34 +01:00
Applevangelist
18a946d2cc Merge remote-tracking branch 'origin/develop' into develop 2023-03-16 08:45:59 +01:00
Applevangelist
e76d7e3234 Merge remote-tracking branch 'origin/master' into develop 2023-03-16 08:45:52 +01:00
Applevangelist
0315530f2c #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:44:31 +01:00
Applevangelist
5fdbfc17ca Merge remote-tracking branch 'origin/develop' into develop 2023-03-10 10:10:22 +01:00
Applevangelist
c3974e4b9d Merge remote-tracking branch 'origin/master' into develop 2023-03-10 10:10:14 +01:00
Applevangelist
9d3e069090 #CTLD
* Added/completed add/get/set stock functions
2023-03-10 10:07:58 +01:00
Applevangelist
8783c21cf1 Merge remote-tracking branch 'origin/develop' into develop 2023-03-09 08:54:53 +01:00
Applevangelist
9194a97756 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2023-03-09 08:54:41 +01:00
Applevangelist
62bca72c6d #GROUP
* Fix for GetMaxHeight()
2023-03-09 08:49:24 +01:00
Applevangelist
7409afb11f UTILS.PlotRacetrack 2023-03-07 10:56:08 +01:00
Applevangelist
125ecb44c5 #GROUP
* Callsign translation refactor
2023-03-05 11:03:47 +01:00
Applevangelist
b6397b2926 Merge remote-tracking branch 'origin/develop' into develop 2023-02-28 08:01:21 +01:00
Applevangelist
0a7d520473 Merge remote-tracking branch 'origin/master' into develop 2023-02-28 08:01:15 +01:00
Applevangelist
edf1e1a3e3 #SPAWN 2023-02-28 07:59:01 +01:00
Applevangelist
3e692d6677 Merge remote-tracking branch 'origin/develop' into develop 2023-02-28 07:39:42 +01:00
Applevangelist
28a44d9e05 Merge remote-tracking branch 'origin/master' into develop 2023-02-28 07:39:36 +01:00
Applevangelist
7db7919207 Merge remote-tracking branch 'origin/develop' into develop 2023-02-26 10:25:21 +01:00
Applevangelist
095f2eef5d Merge remote-tracking branch 'origin/develop' into develop 2023-02-24 14:06:03 +01:00
Applevangelist
4bc4e631d8 Merge remote-tracking branch 'origin/master' into develop 2023-02-24 14:05:57 +01:00
Applevangelist
3c2a4dcc70 #AWACS - do not convert speed to IAS, as already done in AUFTRAG 2023-02-23 11:11:48 +01:00
Applevangelist
5670764f3b Merge remote-tracking branch 'origin/master' into develop 2023-02-23 10:31:59 +01:00
Applevangelist
d0e6a29486 Merge remote-tracking branch 'origin/develop' into develop 2023-02-23 10:20:22 +01:00
Applevangelist
a92790c9d0 Merge remote-tracking branch 'origin/master' into develop 2023-02-23 10:18:39 +01:00
Applevangelist
0b692d045f #CTLD logic correction for loading 2023-02-21 11:38:24 +01:00
Applevangelist
7b58ca9134 Merge remote-tracking branch 'origin/develop' into develop 2023-02-19 17:17:45 +01:00
Applevangelist
8e6eb17ef5 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Net.lua
2023-02-19 17:17:35 +01:00
Applevangelist
93c92d49f7 NET 2023-02-19 17:15:35 +01:00
Applevangelist
70386811e6 AICSAR 2023-02-19 12:31:57 +01:00
Applevangelist
55a055a047 #NET - further ado 2023-02-18 15:03:07 +01:00
Applevangelist
9b62710d64 #AICSAR
* Named functions for the events
2023-02-18 11:04:37 +01:00
Applevangelist
a1f028aa5e Merge remote-tracking branch 'origin/develop' into develop 2023-02-17 16:43:01 +01:00
Applevangelist
5187bc04c1 Merge remote-tracking branch 'origin/master' into develop 2023-02-17 16:42:56 +01:00
Applevangelist
7959f650d5 NET 2023-02-17 16:42:25 +01:00
Applevangelist
6a9e868035 Merge remote-tracking branch 'origin/develop' into develop 2023-02-17 16:23:52 +01:00
Applevangelist
5da82a6b01 Merge remote-tracking branch 'origin/master' into develop 2023-02-17 16:23:46 +01:00
Applevangelist
ffb6cbfb17 NET 2023-02-17 16:23:16 +01:00
Applevangelist
2b02f6659a #Net 2023-02-17 15:41:10 +01:00
Applevangelist
6acf051539 #Net Fixes 2023-02-17 15:02:03 +01:00
Applevangelist
8c083cccc8 #NET - bug fix 2023-02-17 14:32:17 +01:00
Applevangelist
d132447af8 #Net 2023-02-17 13:22:39 +01:00
Applevangelist
985adc0267 Fixes 2023-02-17 08:54:33 +01:00
Applevangelist
39b94a2ac1 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2023-02-16 18:24:35 +01:00
Applevangelist
5f007be781 Merge remote-tracking branch 'origin/master' into develop 2023-02-16 18:23:18 +01:00
Applevangelist
578b68f635 #AICSAR 2023-02-16 18:22:26 +01:00
Applevangelist
44b6315361 #NET
* Added event management for clients and block/unblock functions
2023-02-16 11:42:10 +01:00
Applevangelist
a3f9219460 fx 2023-02-15 12:19:55 +01:00
Applevangelist
65d3c3f277 #SPOT - minor fixes 2023-02-15 12:17:49 +01:00
Applevangelist
250b12c041 fix 2023-02-15 12:16:46 +01:00
Applevangelist
b649ad73a8 Fixes 2023-02-15 10:31:40 +01:00
Applevangelist
bf50adaa22 #PLAYERTASKCONTROLLER
* Added ship detail types
2023-02-14 12:58:39 +01:00
Applevangelist
055cbf4f7a DB 2023-02-13 17:12:25 +01:00
Applevangelist
6d9e2fbfe1 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Database.lua
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2023-02-13 16:41:32 +01:00
Applevangelist
0ec039bb39 #PLAYERTASKCONTROLLER
* Added `AddAgentSet()`
2023-02-10 11:38:45 +01:00
Applevangelist
0823eb1ed0 #fix 2023-02-10 11:37:51 +01:00
Applevangelist
c1ab696774 #NET 2023-02-10 10:41:59 +01:00
Applevangelist
93d61a99fa Merge remote-tracking branch 'origin/develop' into develop 2023-02-09 16:13:11 +01:00
Applevangelist
c2b8261133 Merge remote-tracking branch 'origin/master' into develop 2023-02-09 16:13:06 +01:00
Applevangelist
cb00a3fa38 #DETECTION
* Docu fixes
2023-02-09 16:11:59 +01:00
Applevangelist
48aaf8179d Merge remote-tracking branch 'origin/develop' into develop 2023-02-09 13:21:25 +01:00
Applevangelist
292bc790ee #AICSAR
* Docu additions
2023-02-09 13:17:34 +01:00
Applevangelist
5a0a761c08 Merge remote-tracking branch 'origin/Apple/Develop' into develop 2023-02-09 11:57:46 +01:00
Applevangelist
e44f61181a #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:41 +01:00
Applevangelist
387aef6626 fxi 2023-02-09 11:53:45 +01:00
Thomas
da93126d58 Update Moose.files 2023-02-07 11:05:54 +01:00
Applevangelist
49c45f97fc Test smaller dev moose 2023-02-07 10:51:14 +01:00
Applevangelist
b225e44cfa Merge remote-tracking branch 'origin/develop' into develop 2023-02-07 08:02:11 +01:00
Applevangelist
afa17f95f9 Merge remote-tracking branch 'origin/master' into develop 2023-02-07 08:02:05 +01:00
Applevangelist
790f8ec127 Merge remote-tracking branch 'origin/develop' into develop 2023-02-06 08:18:21 +01:00
Applevangelist
b4d5650cb0 Merge remote-tracking branch 'origin/master' into develop 2023-02-06 08:18:08 +01:00
Applevangelist
9ea831a0f2 added weapon 2023-02-06 08:17:43 +01:00
Applevangelist
f44893e4c1 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2023-02-05 13:51:22 +01:00
Applevangelist
10dd7eff78 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2023-02-05 13:50:25 +01:00
Applevangelist
02d63e244d Merge remote-tracking branch 'origin/develop' into develop 2023-02-04 21:51:05 +01:00
Applevangelist
dd10a49519 Merge remote-tracking branch 'origin/master' into develop 2023-02-04 21:50:59 +01:00
Thomas
b250111d57 Scoring credits a kill to player who hit the same unit before it spawned (#1905) (#1906)
Co-authored-by: Mr.Alien <124381209+MrAlien753@users.noreply.github.com>
2023-02-04 21:48:23 +01:00
Applevangelist
2dce134d15 Merge remote-tracking branch 'origin/develop' into develop 2023-02-04 17:22:43 +01:00
Applevangelist
b4793811a4 Merge remote-tracking branch 'origin/master' into develop 2023-02-04 17:22:37 +01:00
Applevangelist
8a45f78251 fix 2023-02-04 17:20:05 +01:00
Applevangelist
7fec084227 Merge remote-tracking branch 'origin/develop' into develop 2023-02-04 17:16:57 +01:00
Applevangelist
3a120c0a3c Merge remote-tracking branch 'origin/master' into develop 2023-02-04 17:16:52 +01:00
Applevangelist
c08b39f148 #NET
* Added logic to get player ID from client object
2023-02-04 17:15:19 +01:00
Applevangelist
036b6b77b1 #CTLD
* Added preload crates
2023-02-04 17:14:52 +01:00
Applevangelist
a4dd15013d #changes 2023-02-03 16:41:11 +01:00
Applevangelist
2c411736e5 #NET - initial version 2023-02-03 16:41:01 +01:00
Applevangelist
b81bf447a9 fix 2023-02-02 09:47:05 +01:00
Applevangelist
09a2a79a78 Merge remote-tracking branch 'origin/develop' into develop 2023-02-02 09:38:59 +01:00
Applevangelist
69ba31b44d Merge remote-tracking branch 'origin/develop' into develop 2023-02-02 09:38:15 +01:00
Applevangelist
710b488663 Merge remote-tracking branch 'origin/master' into develop 2023-02-02 09:38:06 +01:00
Applevangelist
26fa0693b0 Merge remote-tracking branch 'origin/develop' into develop 2023-01-31 11:28:45 +01:00
Applevangelist
75b30ad2f9 Merge remote-tracking branch 'origin/master' into develop 2023-01-31 11:28:40 +01:00
Applevangelist
9dac61cbb6 #CTLD
* Added Subcategories for static cargo objects
2023-01-31 11:28:14 +01:00
Applevangelist
d504472418 Merge remote-tracking branch 'origin/master' into develop 2023-01-30 18:02:45 +01:00
Applevangelist
375e4231aa #POINT
* Added COORDINATE:SetAtLandheight()
2023-01-30 18:00:29 +01:00
Applevangelist
e5c003a6bf Merge remote-tracking branch 'origin/develop' into develop 2023-01-29 18:38:02 +01:00
Applevangelist
fdf2d936f9 Merge remote-tracking branch 'origin/master' into develop 2023-01-29 18:37:57 +01:00
Applevangelist
ab4bf1f0a8 Merge remote-tracking branch 'origin/develop' into develop 2023-01-29 17:21:30 +01:00
Applevangelist
332dcf9fe5 Merge remote-tracking branch 'origin/master' into develop 2023-01-29 17:21:16 +01:00
Applevangelist
c2aee52bc0 Merge remote-tracking branch 'origin/develop' into develop 2023-01-25 17:56:44 +01:00
Applevangelist
14a851d582 Merge remote-tracking branch 'origin/master' into develop 2023-01-25 17:56:34 +01:00
Applevangelist
58032b0075 * AIRBASE.SouthAtlantic.Rio_Turbio 2023-01-25 17:56:03 +01:00
Applevangelist
3055793cff Merge remote-tracking branch 'origin/develop' into develop 2023-01-25 17:18:22 +01:00
Applevangelist
1e749747b4 Merge remote-tracking branch 'origin/master' into develop 2023-01-25 17:18:16 +01:00
Applevangelist
3d86aee249 Merge remote-tracking branch 'origin/develop' into develop 2023-01-24 15:28:00 +01:00
Applevangelist
cd8845299f #CTLD added documentation 2023-01-24 15:27:50 +01:00
Applevangelist
95d149274f #1885
#PSEUDOATC - Menu shows Waypoint name if it has been set
2023-01-24 10:05:39 +01:00
Applevangelist
3880c3deac Merge remote-tracking branch 'origin/develop' into develop 2023-01-23 17:13:59 +01:00
Applevangelist
8c68a6d9ce Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2023-01-23 17:13:51 +01:00
Applevangelist
67cad1963f #CONTROLLABLE
* Added CommandActivateACLS()
* Added CommandDeactivateACLS()
2023-01-23 17:10:52 +01:00
Thomas
cad8f8678e Adding ACLS 2023-01-23 10:53:58 +01:00
Applevangelist
cb0de264e8 Merge remote-tracking branch 'origin/develop' into develop 2023-01-22 13:23:18 +01:00
Applevangelist
30654806e8 Merge remote-tracking branch 'origin/master' into develop 2023-01-22 13:23:11 +01:00
Applevangelist
b62058b36a changes 2023-01-22 13:10:45 +01:00
Applevangelist
a6c194f5c4 Merge remote-tracking branch 'origin/develop' into develop 2023-01-21 15:40:47 +01:00
Applevangelist
23553f0f4c #AUFTRAG
* Added checking of bespoke conditions within the status call of AUFTRAG and not only when AUFTRAG is done already
2023-01-21 15:40:18 +01:00
Applevangelist
6b7fe137ca Merge remote-tracking branch 'origin/develop' into develop 2023-01-20 10:36:17 +01:00
Applevangelist
d12def4a97 Merge remote-tracking branch 'origin/master' into develop 2023-01-20 10:36:09 +01:00
Applevangelist
dcacba6803 F 2023-01-19 17:03:07 +01:00
Applevangelist
df9a572656 #FG - nil check on GetClosestAirbase() 2023-01-19 16:58:31 +01:00
Applevangelist
8648b0a24d Merge remote-tracking branch 'origin/develop' into develop 2023-01-19 15:01:45 +01:00
Applevangelist
511ca918f4 Merge remote-tracking branch 'origin/master' into develop 2023-01-19 15:01:34 +01:00
Applevangelist
a51176967c #UTILS - make LoadSetOfGroups save(r) for groups spawned with SpawnScheduled 2023-01-19 15:00:18 +01:00
Applevangelist
9a8727f499 Merge remote-tracking branch 'origin/develop' into develop 2023-01-19 10:34:17 +01:00
Applevangelist
03ea4ccd44 Merge remote-tracking branch 'origin/master' into develop 2023-01-19 10:34:10 +01:00
Applevangelist
0b1c287f68 #Controllable - docu changes 2023-01-17 12:08:57 +01:00
Applevangelist
eef7675d95 Merge remote-tracking branch 'origin/develop' into develop 2023-01-17 09:26:47 +01:00
Applevangelist
a06f2f9731 Merge remote-tracking branch 'origin/master' into develop 2023-01-17 09:26:40 +01:00
Applevangelist
b04624bd60 #ATIS docu fix 2023-01-17 09:25:24 +01:00
Applevangelist
808fb4f5ac Merge remote-tracking branch 'origin/develop' into develop 2023-01-15 17:40:31 +01:00
Applevangelist
26d675dc26 Merge remote-tracking branch 'origin/master' into develop 2023-01-15 17:40:24 +01:00
Applevangelist
144b50cfc9 Merge remote-tracking branch 'origin/develop' into develop 2023-01-12 13:21:30 +01:00
Applevangelist
28df12c1a9 Merge remote-tracking branch 'origin/master' into develop 2023-01-12 13:21:23 +01:00
Applevangelist
44f6f0fd40 #PLAYERTASK
* Even nicer MGRS readouts
2023-01-10 17:08:08 +01:00
Applevangelist
01cf713ec2 Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 13:08:44 +01:00
Applevangelist
85422f3427 Merge remote-tracking branch 'origin/master' into develop 2023-01-10 13:08:36 +01:00
Applevangelist
43123ec93e #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:34 +01:00
Applevangelist
e5dd9661d7 Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 07:49:44 +01:00
Applevangelist
6f5e6240bc Merge remote-tracking branch 'origin/master' into develop 2023-01-10 07:49:37 +01:00
Applevangelist
581b5b3de9 fix 2023-01-10 07:48:13 +01:00
Applevangelist
5dd48cbd23 Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 07:32:02 +01:00
Applevangelist
10eb512244 Merge remote-tracking branch 'origin/develop' into develop 2023-01-09 17:08:06 +01:00
Applevangelist
c232f8ccff Merge remote-tracking branch 'origin/master' into develop 2023-01-09 17:07:59 +01:00
Applevangelist
cf4d6f46b5 Merge remote-tracking branch 'origin/develop' into develop 2023-01-08 18:38:56 +01:00
Applevangelist
4b19cbcf67 #PLAYERTASK
* Added FSM events PlayerJoinedTask and PlayerAbortedTask
2023-01-08 18:08:53 +01:00
Applevangelist
85aa46ad2b Merge remote-tracking branch 'origin/develop' into develop 2023-01-08 14:50:11 +01:00
Applevangelist
1b6169bf2e Merge remote-tracking branch 'origin/develop' into develop 2023-01-05 10:59:31 +01:00
Applevangelist
6b995f8b13 Merge remote-tracking branch 'origin/master' into develop 2023-01-05 10:59:23 +01:00
Applevangelist
d56bc000a1 Merge remote-tracking branch 'origin/develop' into develop 2023-01-05 10:48:03 +01:00
Applevangelist
b38f167a27 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2023-01-05 10:47:52 +01:00
Applevangelist
16af086cc5 #CTLD 2023-01-05 10:46:06 +01:00
Thomas
24cc5ca32d Update CTLD.lua 2023-01-04 11:53:59 +01:00
Thomas
47f6f7e8cc Update CTLD.lua 2023-01-04 11:42:56 +01:00
Thomas
dde458aea0 Update CSAR.lua 2023-01-04 11:42:25 +01:00
Thomas
d34d902413 Develop (#1874)
* #FG
* make us AB the default

* 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

* AWACS -correct error in SetAwacsDetails (#1873)

Corrected setting of Angels

Co-authored-by: Frank <frank@inter-zone.de>
2023-01-04 09:24:57 +01:00
Applevangelist
812aff7f2e AB useage 2023-01-03 10:34:07 +01:00
Applevangelist
39535cef7b Merge remote-tracking branch 'origin/develop' into develop 2023-01-03 10:23:02 +01:00
Applevangelist
d3ba0bbb22 Merge remote-tracking branch 'origin/master' into develop 2023-01-03 10:22:55 +01:00
Applevangelist
f401179c57 #FlightGroup
* Added options to allow afterburner, jettison of empty tanks and jettison of weapons
2023-01-03 10:14:06 +01:00
Applevangelist
0bd481d4f0 Merge remote-tracking branch 'origin/develop' into develop 2023-01-02 17:29:15 +01:00
Applevangelist
0942f02d2c Merge remote-tracking branch 'origin/master' into develop 2023-01-02 17:29:09 +01:00
Applevangelist
659188e3cb UNIT 2023-01-02 17:27:27 +01:00
Applevangelist
9657976f63 FG 2023-01-02 17:27:20 +01:00
Applevangelist
97e44b2042 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Auftrag.lua
2023-01-02 16:56:29 +01:00
Applevangelist
112457cb4b Merge remote-tracking branch 'origin/master' into develop 2023-01-02 16:55:49 +01:00
Thomas
dcd9915fe0 Merge master in Apple-Dev (#1871)
* #TIMER
* Added `StartIf()`

* PseudoATC - Option to display playername (#1870)

Use `myatc:SetReportPlayername()` to switch this on #1864
2023-01-02 14:34:12 +01:00
Thomas
4373ee8d13 Develop (#1869)
* #TIMER
* Added `StartIf()`

* OPS

request

* AUFTRAG CAP

- Fixed mission speed (unit conversion)

* ZONE

Co-authored-by: Frank <frank@inter-zone.de>
2023-01-02 13:56:55 +01:00
Thomas
8ed85795c6 #TIMER (#1867)
* Added `StartIf()`
2023-01-02 13:34:32 +01:00
Thomas
671f4a131e Update FlightGroup.lua
Output 3775 AddWaypoint Controls
2023-01-02 13:32:51 +01:00
Thomas
9680f38dc8 Update Auftrag.lua
NewCAP Line 1313: mission.missionSpeed = UTILS.KnotsToKmph(UTILS.KnotsToAltKIAS(Speed or 350, Altitude))
2023-01-02 13:28:36 +01:00
Applevangelist
d36ceb861a FG Mission Speed Fix 2023-01-01 13:30:46 +01:00
Applevangelist
6fa3f0a11c #TIMER
* Added `StartIf()`
2023-01-01 12:33:35 +01:00
Applevangelist
144521936a Merge branch 'develop-2' into develop 2023-01-01 11:48:11 +01:00
Applevangelist
1d3abdb268 Merge remote-tracking branch 'origin/develop' into develop 2022-12-31 18:09:08 +01:00
Applevangelist
a35d3e180b FG 2022-12-31 18:08:20 +01:00
Applevangelist
b811aa09a8 # FG improvements 2022-12-31 17:54:04 +01:00
Applevangelist
ecf4f14222 #PLAYERTASK -menu issues 2022-12-31 15:56:21 +01:00
Applevangelist
892be1b2cf Merge remote-tracking branch 'origin/develop' into develop 2022-12-31 12:43:10 +01:00
Applevangelist
41be279a89 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Awacs.lua
2022-12-31 12:18:49 +01:00
Applevangelist
56b7364a13 # Helo 2022-12-31 12:18:12 +01:00
Applevangelist
d12799a892 OPS 2022-12-30 17:39:18 +01:00
Applevangelist
1f1efe553a Merge remote-tracking branch 'origin/master' into develop 2022-12-29 16:34:39 +01:00
Applevangelist
65f8da77d2 # Make SRS say TACAN not T A C A N 2022-12-29 16:32:29 +01:00
Applevangelist
193f83fcc3 #AWACS
* Added option for helos
2022-12-29 11:57:18 +01:00
Applevangelist
972f079bd5 Merge remote-tracking branch 'origin/master' into develop 2022-12-28 15:48:03 +01:00
Applevangelist
340c5abdb5 #UTILS 2022-12-28 15:47:44 +01:00
Applevangelist
86ea757a16 #ATIS
* FARP support
2022-12-25 14:19:27 +01:00
Applevangelist
c6f4c6f0fa #EVENT
* Small fix for hit event on coordinates
2022-12-24 12:03:34 +01:00
Applevangelist
849c6ae88b #AUFTRAG 2022-12-23 13:47:35 +01:00
Applevangelist
7ff5e13876 Merge remote-tracking branch 'origin/develop' into develop 2022-12-23 13:45:24 +01:00
Applevangelist
f833137455 Merge remote-tracking branch 'origin/master' into develop 2022-12-23 13:42:56 +01:00
Applevangelist
68092e5966 #CTLD 2022-12-23 13:42:48 +01:00
Applevangelist
e5a9bf6568 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Unit.lua
2022-12-21 14:11:54 +01:00
Applevangelist
e74c377bfd #CTLD
* Added option to inject troops into helo
2022-12-21 14:06:28 +01:00
Applevangelist
669e55d435 #Fixes 2022-12-21 12:52:24 +01:00
Applevangelist
3564843e1b #fixes 2022-12-20 18:18:44 +01:00
Applevangelist
56c9cb2978 Merge remote-tracking branch 'origin/master' into develop 2022-12-19 16:13:21 +01:00
Applevangelist
aa072b5ad8 fixes 2022-12-19 16:12:41 +01:00
Applevangelist
c08f79de50 #CTLD 2022-12-19 14:03:35 +01:00
Applevangelist
9c665f83d3 #Fixes 2022-12-19 13:52:49 +01:00
Applevangelist
a151c5587a AUFTRAG - fix for racetrack orbit 2022-12-19 13:07:01 +01:00
Applevangelist
676d942d54 Merge remote-tracking branch 'origin/master' into develop 2022-12-16 18:44:35 +01:00
Applevangelist
a02d9817ce Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2022-12-15 18:28:57 +01:00
Applevangelist
d88b31f43a #UTILS
* UTILS.LoadSetOfStatics(Path,Filename) ignore statics which do not exist
2022-12-15 18:28:24 +01:00
Applevangelist
b8e2d438c6 #SET_CLIENT
* Additions
2022-12-15 11:47:36 +01:00
Applevangelist
df4cf982dd #PLAYERTASK - additions for multiple setups 2022-12-15 11:47:15 +01:00
Applevangelist
21da2625e9 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2022-12-14 15:06:08 +01:00
Applevangelist
52d20ed8ef Additions 2022-12-14 14:48:49 +01:00
Applevangelist
21e12068c7 Merge remote-tracking branch 'origin/master' into develop 2022-12-14 09:42:33 +01:00
Applevangelist
9cf209d62b #SET_Client additions 2022-12-14 09:42:10 +01:00
Thomas
4368bef32f Update Set.lua
Added SET_CLIENT:FilterCallsigns() and SET_CLIENT:FilterPlayernames()
2022-12-13 16:59:06 +01:00
Applevangelist
2e4f7956ac #PlayerTask
* typename options added
2022-12-12 16:23:23 +01:00
Applevangelist
90eca9f6a3 #minor enhancements 2022-12-11 15:51:41 +01:00
Applevangelist
7dc8285fd5 #CTLD
* Added disallow building in loadzones: my_ctld.nobuildinloadzones = true
2022-12-09 12:37:24 +01:00
Applevangelist
ba5b2e827c Merge remote-tracking branch 'origin/develop' into develop 2022-12-09 09:07:58 +01:00
Thomas
2c75ea1a18 Update Set.lua
Improve GetLast and GetRandom
2022-12-08 14:33:50 +01:00
Applevangelist
047a108689 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2022-12-07 19:00:59 +01:00
Applevangelist
2fc2031665 #minor enhancements 2022-12-07 18:55:32 +01:00
Applevangelist
aed8cb9cf5 #CTLD - enforce modulation on beacons 2022-12-07 18:55:03 +01:00
Applevangelist
96344e3abf Radio enum 2022-12-07 18:54:56 +01:00
Applevangelist
73d53176d1 #PLAYERRECCE
* Smoke own position on ground, not mid-air
2022-12-06 18:05:29 +01:00
Applevangelist
edb0f25449 Merge remote-tracking branch 'origin/master' into develop 2022-12-06 12:50:38 +01:00
Applevangelist
2b572f4948 #PLAYERTASK
* slower callout for MGRS coordinates
#CTLD
* Reduce log noise
2022-12-06 12:49:05 +01:00
Applevangelist
df901e7433 Merge branch 'master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Message.lua
#	Moose Development/Moose/Core/Set.lua
2022-12-03 14:38:27 +01:00
Applevangelist
60d91cb2fb Small fixes 2022-12-03 14:36:14 +01:00
Applevangelist
d011c8e72f #CTLD Frequency Beacons 2022-12-02 17:30:59 +01:00
Applevangelist
3295dd3635 # CTLD BEACON zone fixes 2022-12-02 16:52:20 +01:00
Applevangelist
b7413f1dff * Small fixes 2022-12-02 16:36:33 +01:00
Applevangelist
7c689d0f5c Merge remote-tracking branch 'origin/master' into develop 2022-12-01 13:24:20 +01:00
Applevangelist
3281b669ae * minor fixes 2022-12-01 13:23:57 +01:00
Applevangelist
2a4d339ff3 Merge remote-tracking branch 'origin/master' into develop 2022-11-29 17:54:40 +01:00
Applevangelist
35c6e4b9fb Merge remote-tracking branch 'origin/master' into develop 2022-11-29 15:43:12 +01:00
Applevangelist
65d25f6544 #PLAYERTASK
* PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent) Silent option added
#CTLD
* Small fix for BEACON Zones
2022-11-29 15:40:58 +01:00
Applevangelist
af0106d466 Merge remote-tracking branch 'origin/master' into develop 2022-11-28 17:46:28 +01:00
Thomas
df94c89ce8 RAT - Remove the #... at the end on ATC callouts
RAT - Remove the #... at the end on ATC callouts to nicefy immersion
2022-11-28 09:28:55 +01:00
Applevangelist
8faf911df8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2022-11-27 17:36:38 +01:00
Applevangelist
136d4109f5 * less noise 2022-11-27 17:34:46 +01:00
Applevangelist
1a8f9fca26 #Auftrag
* Fix for Orbit task
2022-11-23 12:58:26 +01:00
Applevangelist
2304ea3829 #SPAWN
* Fix callsign dupplication of numbers introduced with 2.8
2022-11-23 09:56:08 +01:00
Applevangelist
dd7dfcff68 Merge remote-tracking branch 'origin/master' into develop 2022-11-21 15:53:33 +01:00
Applevangelist
959e4883df Merge remote-tracking branch 'origin/master' into develop 2022-11-20 11:52:25 +01:00
Applevangelist
f7e42b6e31 Merge remote-tracking branch 'origin/master' into develop 2022-11-18 11:29:18 +01:00
Applevangelist
0eb5834e1c Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2022-11-18 11:25:47 +01:00
Applevangelist
6f02f67168 #GROUP
* Added additional push of tanker task to GROUP:SetAsRecoveryTanker() for a working setup
2022-11-18 11:24:54 +01:00
Applevangelist
74b1a23ca8 #GROUP/CONTROLLABLE
* Added RecoveryTanker Task
2022-11-18 09:59:00 +01:00
Applevangelist
592ca34923 #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:16 +01:00
Applevangelist
d77c347f24 #CSAR
* Make rescued pilot's weight configureable
2022-11-17 13:56:10 +01:00
Applevangelist
45b78a2e26 Fixes 2022-11-17 13:21:57 +01:00
Applevangelist
416ea2490c Merge remote-tracking branch 'origin/develop' into develop 2022-11-16 11:18:18 +01:00
Applevangelist
567c290117 Merge remote-tracking branch 'origin/master' into develop 2022-11-16 11:16:48 +01:00
Applevangelist
aab22ef402 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/AmmoTruck.lua
#	Moose Development/Moose/Ops/Awacs.lua
2022-11-16 11:16:25 +01:00
Applevangelist
502a8a0186 #SPAWN
* Ensure we have a numbered table for InitRandomizeTemplate/Zone so math.random actually works
* Also, pre-shuffle tables
2022-11-16 11:13:07 +01:00
Applevangelist
591132deac Merge remote-tracking branch 'origin/master' into develop 2022-11-16 09:40:31 +01:00
Applevangelist
709da6b6e6 #Fixes 2022-11-15 17:55:24 +01:00
Applevangelist
67a2deb3a4 #PLAYERTASK
* Added option to show coord of target in info (always)
2022-11-15 16:33:12 +01:00
Applevangelist
ed84d7453d #Bug fixes 2022-11-14 18:14:04 +01:00
Applevangelist
6365298e4b #PLAYERTASK
* Added a couple of QOL functions for internal INTEL object
2022-11-14 17:37:49 +01:00
Applevangelist
f0bbc5a777 Merge remote-tracking branch 'origin/master' into develop 2022-11-13 13:51:32 +01:00
Applevangelist
159f7f3b29 #CTLD
* Change call order to move troops, vehicle on `onafter..` internally
* added pseudo-function for "OnBefore..."
2022-11-13 13:37:45 +01:00
Applevangelist
38b17ff66a * Fix NewHover 2022-11-11 15:40:22 +01:00
Applevangelist
484ea06c80 Merge remote-tracking branch 'origin/master' into develop 2022-11-11 11:43:01 +01:00
Applevangelist
f1ff66b39c #AUFTRAG - slight improvement to NewHover 2022-11-11 09:59:11 +01:00
Applevangelist
27a2f42e48 Merge remote-tracking branch 'origin/master' into develop 2022-11-11 09:36:38 +01:00
Applevangelist
744427da46 tdada 2022-11-10 17:53:43 +01:00
Applevangelist
3ae8b05e1f Merge remote-tracking branch 'origin/master' into develop 2022-11-10 17:33:15 +01:00
Applevangelist
3907e49b9e #Docu fixes 2022-11-10 17:30:00 +01:00
Applevangelist
4194614d65 #AMMOTRUCK 2022-11-10 17:11:00 +01:00
Applevangelist
ff10144ad7 #AWACS
* SRS output for "ShowTask"
* Some minor bug fixing
2022-11-10 12:20:39 +01:00
Applevangelist
54247d17c1 Merge remote-tracking branch 'origin/master' into develop 2022-11-09 16:11:02 +01:00
Applevangelist
326733a312 AWACS 2022-11-09 16:10:34 +01:00
Applevangelist
fb203df364 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Awacs.lua
2022-11-09 16:06:40 +01:00
Applevangelist
8d5fe02105 Merge remote-tracking branch 'origin/master' into develop 2022-11-09 16:06:01 +01:00
Thomas
dda96d8f05 AWACS - Speak task info
Feature request
2022-11-09 13:08:06 +01:00
Applevangelist
e2bae31e55 #AWACS
* Minor Enhancements
2022-11-08 17:24:11 +01:00
Applevangelist
dcaaa11608 #AWACS
* Minor Enhancements
2022-11-08 16:59:29 +01:00
Applevangelist
b057e83898 * POINT/PLAYERTASK
* Added option to get BR/BRA with add'l magnetic heading
2022-11-08 15:43:00 +01:00
Applevangelist
17f2a3e79a #MSRS
* Docu corrections
* Added `AddFrequencies()` and `AddModulations()`
2022-11-08 10:10:57 +01:00
Applevangelist
071b72e3fd Merge remote-tracking branch 'origin/master' into develop 2022-11-07 19:13:21 +01:00
Applevangelist
63aff9dcd1 #CTLD Fix Ship Zones 2022-11-07 19:12:36 +01:00
Applevangelist
1bc7e5d6cd Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2022-11-07 17:37:18 +01:00
Thomas
c08d54c16b CTLD - Fix Ship Zones
CTLD - Fix Ship Zones
2022-11-07 14:11:16 +01:00
Thomas
2eea8520d8 Merge CTLD Bronco update into master (#1829)
* Update Range.lua (#1825)

Add meter text to RANGE bombing result.

* CTLD - added Bronco (#1828)

Added data for the Bronco-OV-10A - needs further additions to ensure to work, as this is a plane, not a chopper #1827

Co-authored-by: TommyC81 <tommyc81@gmail.com>
2022-11-07 11:23:39 +01:00
Applevangelist
6f254b06b0 #SCORING
* Added option to switch AutoSave
2022-11-06 11:28:20 +01:00
Applevangelist
e512569d5c Merge remote-tracking branch 'origin/develop' into develop 2022-11-05 14:05:16 +01:00
Applevangelist
d805352a97 Merge remote-tracking branch 'origin/master' into develop 2022-11-05 14:04:39 +01:00
Applevangelist
ce7a86842f #INTEL 2022-11-04 13:31:03 +01:00
Applevangelist
13e5b03aa8 Merge remote-tracking branch 'origin/master' into develop 2022-11-02 17:33:00 +01:00
Applevangelist
0e2ec4836a Merge remote-tracking branch 'origin/Apple/Develop' into develop 2022-11-02 17:31:38 +01:00
Applevangelist
0c35cd9680 #CHIEF
* Fix to auto-create CAS/CAS-Enhanced Missions from detected targets; Added BAI mission option for TANKS as target
2022-11-02 17:31:26 +01:00
Thomas
0839055b7e Documentation fixes. (#1820) (#1822)
* Documentation fixes.

* Update Airboss.lua

Escape links.

Co-authored-by: TommyC81 <tommyc81@gmail.com>
2022-11-02 11:24:40 +01:00
Applevangelist
c8d2a0540f Merge remote-tracking branch 'origin/master' into develop 2022-11-01 16:33:09 +01:00
Applevangelist
3ba981a890 #ZONE_POLYGON
* Scan for Scenery - changed scan strategy as box seems not to work properly all the time
2022-11-01 16:32:03 +01:00
Applevangelist
e3e2c68114 Merge remote-tracking branch 'origin/master' into develop 2022-11-01 14:32:31 +01:00
Applevangelist
4b0d48922d #CHIEF, CTLD, UNIT 2022-11-01 14:30:09 +01:00
Applevangelist
bb9ce9e26f Merge remote-tracking branch 'origin/master' into develop 2022-10-31 16:08:10 +01:00
Applevangelist
feca5acc7e #CTLD_HERCULES
* Fix for `CTLD_HERCULES:Cargo_Track(cargo, initiator)` when flying very low
2022-10-31 16:07:41 +01:00
Applevangelist
85cf78407c #EVENT
* Added events from 2.8.0
2022-10-31 15:44:50 +01:00
Applevangelist
33f4ace038 #AWACS
* Added airborne check
2022-10-31 12:22:59 +01:00
Applevangelist
b613f59b42 Merge remote-tracking branch 'origin/master' into develop 2022-10-31 10:26:02 +01:00
Applevangelist
fc829c79c7 or self:HasAttribute("Modern Tanks") 2022-10-31 10:25:34 +01:00
Applevangelist
2925e0b8e3 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerTask.lua
2022-10-31 08:06:10 +01:00
Applevangelist
911bfc44c1 Merge remote-tracking branch 'origin/master' into develop 2022-10-31 08:04:57 +01:00
Applevangelist
7731b6c892 fixes 2022-10-21 15:15:32 +02:00
Applevangelist
485b743208 Merge remote-tracking branch 'origin/master' into develop 2022-10-21 15:10:49 +02:00
Applevangelist
a6c9ba2ec8 #Ops - fixes 2022-10-21 15:10:14 +02:00
Applevangelist
e0648b7f36 Merge remote-tracking branch 'origin/master' into develop 2022-10-21 08:57:23 +02:00
Applevangelist
5db3775b96 #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 08:56:40 +02:00
Applevangelist
a82252680d Merge remote-tracking branch 'origin/master' into develop 2022-10-20 11:41:34 +02:00
Applevangelist
b6394ad7d3 #MANTIS
* Add systems from SMA mod
2022-10-20 11:39:29 +02:00
Applevangelist
59e436ba69 #TARGET additions 2022-10-19 19:14:16 +02:00
Applevangelist
3308f16de6 #TARGET
* Some additions for ease of use, and SCENERY
2022-10-19 17:24:58 +02:00
Applevangelist
4e79123c11 #PLAYERTASKCONTROLLER
* No spaces in callsign-Nos in task info pilot list
2022-10-19 13:03:25 +02:00
Applevangelist
bf1fa581ba Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Core/Zone.lua
2022-10-19 12:44:28 +02:00
Applevangelist
3214316663 Merge remote-tracking branch 'origin/master' into develop 2022-10-19 12:27:22 +02:00
Applevangelist
6d92bff3e9 #SCENERY; SET_SCENERY
* enhancements
2022-10-19 12:26:26 +02:00
Applevangelist
9cd2346cd5 #CTLD
* added a check for zones; not added when zone does not exist
2022-10-18 17:27:33 +02:00
Applevangelist
19ec4af427 Merge remote-tracking branch 'origin/master' into develop 2022-10-18 17:00:25 +02:00
Applevangelist
7e12a48a8a #Ops - various fixes 2022-10-18 16:55:54 +02:00
Applevangelist
2bf5cc2369 #CSAR - use custom callsigns, add weight to helo per saved pilot 2022-10-18 16:14:32 +02:00
Applevangelist
30ce1aa907 PlayerTask 2022-10-18 13:26:48 +02:00
Applevangelist
4c073a30d7 RECCE 2022-10-18 12:54:09 +02:00
Applevangelist
f495a583eb #PLAYERRECCE - add picture 2022-10-18 10:29:34 +02:00
Applevangelist
7c724bdee7 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2022-10-17 18:09:27 +02:00
Applevangelist
59578a8868 #SET_SCENERY 2022-10-17 18:08:31 +02:00
Applevangelist
dc239c8137 #SET_SCENERY - Scenery and Target additions 2022-10-17 17:57:31 +02:00
Applevangelist
c0bc62d79a Merge remote-tracking branch 'origin/master' into develop 2022-10-17 17:04:05 +02:00
Thomas
7428ad21ee Update Set.lua 2022-10-17 15:53:15 +02:00
Thomas
fb52fb0517 Update Scenery.lua 2022-10-17 15:49:45 +02:00
Thomas
53023c97c5 CTLD - No radius check (#1800) (#1802)
Get rid of radius check in IsUnitInZone()
2022-10-17 12:45:37 +02:00
Applevangelist
4263abae70 Merge remote-tracking branch 'origin/master' into develop 2022-10-16 13:48:55 +02:00
Applevangelist
b40b4ec500 #PLAYERTASKCONTROLLER
* Show Freetext as Briefing in all tasks when available
* Use average coordinates in TARGET
2022-10-16 13:48:23 +02:00
Applevangelist
57f34f934c short if 2022-10-16 12:05:38 +02:00
Applevangelist
bacbf33d1d Merge remote-tracking branch 'origin/master' into develop 2022-10-14 16:51:15 +02:00
Applevangelist
60a1ceb7a0 #Docu changes 2022-10-14 16:50:54 +02:00
Applevangelist
8279ac79c8 #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:16:50 +02:00
Applevangelist
220e530bf3 #PLAYERTASK - CSAR Integration 2022-10-13 17:42:02 +02:00
Applevangelist
b7552a6579 Merge remote-tracking branch 'origin/master' into develop 2022-10-13 12:54:40 +02:00
Applevangelist
1bda9d40e1 #SCENERY
* Improvements
2022-10-13 12:53:13 +02:00
Applevangelist
6f2354f8fc #SCENERY - Improvements 2022-10-13 10:50:34 +02:00
Applevangelist
d0b6791efd #SCENERY - Improvements 2022-10-13 10:48:51 +02:00
Applevangelist
dc6159f90a Merge remote-tracking branch 'origin/master' into develop 2022-10-12 16:23:32 +02:00
Applevangelist
751f84befd #SCENERY 2022-10-12 16:22:58 +02:00
Applevangelist
9a2829730c #CTLD PlayerTask 2022-10-12 12:46:32 +02:00
Applevangelist
d6363d0f80 Misc 2022-10-12 09:33:57 +02:00
Applevangelist
72085a7962 #Core.Point
* Cleanup GetClosestAirbase()
2022-10-10 17:44:03 +02:00
Applevangelist
aaa956287f #Core.Point
* Cleanup GetClosestAirbase()
2022-10-10 17:43:12 +02:00
Applevangelist
c659bc6f2f Merge remote-tracking branch 'origin/Apple/Develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerTask.lua
2022-10-10 16:56:49 +02:00
Applevangelist
0323144248 #Playertask 2022-10-10 16:55:58 +02:00
Thomas
19ca30527e Update PlayerTask.lua
Added PLAYERTASK:IlluminateTarget(Power,Height)
2022-10-10 14:30:54 +02:00
Thomas
2b6eba0106 Update PlayerTask.lua
#PLAYERTASK
* Added Coalition, Freetext and FreetextTTS addition options
2022-10-10 14:02:37 +02:00
Applevangelist
c0845443d0 #PLAYERRECCE
* Minor enhancements
2022-10-09 12:51:53 +02:00
Applevangelist
ff194b4425 #PLAYERRECCE
* Added setting of laser distance as camera sight calc is a no-starter
* Added specific laser zone of 20mxlength to catch targets to lase
* Reworked detection of hit on lased target
2022-10-07 14:29:54 +02:00
Applevangelist
6a22e03689 #PLAYERTASKCONTROLLER
* Enable PLAYERTASKCONTROLLER:EnableBuddyLasing(Recce) - buddy lasing precision bombing tasks with a PLAYERRECCE connection
2022-10-06 17:05:35 +02:00
Applevangelist
120b77d853 #PLAYERRECCE
* Gazelle sight correcions
* Added Shack event
2022-10-06 13:27:26 +02:00
Applevangelist
e2dce132df #PLAYERTASKCONTROLLER
* switch names on opening comms
2022-10-06 08:14:54 +02:00
Applevangelist
b7c572f800 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerRecce.lua
2022-10-06 08:09:04 +02:00
Applevangelist
44f7df2ea5 Fixes 2022-10-06 08:07:54 +02:00
Applevangelist
c9ab7dd8e7 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Zone.lua
2022-10-06 08:02:09 +02:00
Thomas
22d98fe753 Update Zone.lua
fix for #1797
2022-10-05 16:01:56 +02:00
Thomas
929f3d2e16 Update PlayerRecce.lua 2022-10-05 14:27:03 +02:00
Thomas
db85478381 ZONE_BASE/RADIUS not registering in the DB
if not _DATABASE:FindZone(ZoneName) then
	  _EVENTDISPATCHER:CreateEventNewZone(self)
  end

-- problem when creating zones on the fly and trying to find them with :FindByName() laters
2022-10-05 14:19:39 +02:00
Applevangelist
8fa4c04b16 Merge remote-tracking branch 'origin/develop' into develop 2022-10-05 07:34:27 +02:00
Applevangelist
41cd3ea23c Merge remote-tracking branch 'origin/master' into develop 2022-10-05 07:33:17 +02:00
Applevangelist
dae2da4a5d PlayerRecce 2022-10-05 07:32:57 +02:00
Applevangelist
63a03dc361 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/Airboss.lua
2022-10-02 19:36:41 +02:00
Applevangelist
94fb59f8bf #PLAYERRECCE
-- DONE: Sort for multiple targets in one direction
-- DONE: Targets with forget timeout, also report
2022-10-02 19:33:46 +02:00
Applevangelist
6c7a5d1321 Merge remote-tracking branch 'origin/master' into develop 2022-10-02 13:17:27 +02:00
Applevangelist
d9acce04b6 #POINT
* Added COORDINATE:ToStringFromRPShort
2022-10-02 13:16:21 +02:00
Applevangelist
c351c446a0 * SRS silent when no player is on 2022-10-01 16:35:51 +02:00
Applevangelist
ad49b051e1 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerRecce.lua
2022-10-01 16:07:29 +02:00
Applevangelist
ddde0f8629 #PLAYERRECCE
* Integrated SRS
* Integrated PLAYERTASKCONTROLLER (optional), can upload target data from Recce
2022-10-01 16:01:41 +02:00
Applevangelist
6574544edc Merge remote-tracking branch 'origin/master' into develop 2022-10-01 11:59:08 +02:00
Applevangelist
dd1cd3bc79 ATIS 2022-10-01 11:56:39 +02:00
Applevangelist
fb4f7acb16 SRS additions 2022-10-01 11:53:50 +02:00
Applevangelist
ab42e506e8 #PLAYERRECCE
* Some nicefications
2022-09-30 19:07:26 +02:00
Applevangelist
3322609f87 #AWACS
* Make markers and drawings strictly coalition specific
2022-09-30 19:02:45 +02:00
Applevangelist
c7baaa26f2 #PLAYERRECCE
* Initial Release
2022-09-30 18:47:28 +02:00
Applevangelist
aefc655535 Merge remote-tracking branch 'origin/develop' into develop 2022-09-30 14:49:30 +02:00
Applevangelist
054fc7c5a6 Merge remote-tracking branch 'origin/master' into develop 2022-09-30 14:49:09 +02:00
Applevangelist
c8600cd24b *SET
* Added IsInSet()
2022-09-30 14:42:17 +02:00
Applevangelist
4cdcbdc6fa Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Spot.lua
2022-09-29 16:44:51 +02:00
Applevangelist
26025bb2a1 #SPOT - Set relative position to start lasing
#ZONE_POLYGON - Added `ZONE_POLYGON:NewFromPointsArray( ZoneName, PointsArray )`
2022-09-29 16:42:08 +02:00
Applevangelist
03dbdd5ed6 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Functional/Autolase.lua
2022-09-28 13:22:19 +02:00
Applevangelist
7d938ac8fa #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:06:54 +02:00
Applevangelist
117e41dafb #ZONE_CAPTURE_COALITION - allow zone to be a ZONE_POLYGON 2022-09-28 11:51:59 +02:00
Applevangelist
5e5f1398fa #ZONE_CAPTURE_COALITION - allow zone to be a ZONE_POLYGON
#RANGE Messaging changes in case >1 player per group
2022-09-28 11:49:56 +02:00
Applevangelist
9121624c3c Merge remote-tracking branch 'origin/master' into develop 2022-09-27 11:17:33 +02:00
Applevangelist
811c37549a #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:15:44 +02:00
Applevangelist
c171e756f0 Merge remote-tracking branch 'origin/master' into develop 2022-09-27 09:30:02 +02:00
Applevangelist
693497265a #CSAR
* Added mycsar.ADFRadioPwr = 1000 for ADF beacon radio sending power
2022-09-26 17:02:09 +02:00
Applevangelist
60d25ea131 #AWACS - corrected aggressive 2022-09-25 15:04:24 +02:00
Applevangelist
716bb26800 Merge remote-tracking branch 'origin/master' into develop 2022-09-25 14:43:25 +02:00
Applevangelist
8806c91dd9 ATIS - added google option 2022-09-25 14:41:00 +02:00
Applevangelist
e4002233ef #FlightControl - Option to set Google key once on New() 2022-09-25 14:40:47 +02:00
Applevangelist
4355b3a2c8 SRS - correct enumerator 2022-09-25 14:40:42 +02:00
Applevangelist
bc7345704d #MSRS - put "" around frequencies and modulations 2022-09-25 14:15:27 +02:00
Applevangelist
d17f4cf46c #AWACS - give full frequency in info 2022-09-25 14:11:40 +02:00
Applevangelist
737465064b Merge remote-tracking branch 'origin/master' into develop 2022-09-24 10:10:33 +02:00
Applevangelist
24b2794696 Merge remote-tracking branch 'origin/master' into develop 2022-09-23 10:29:07 +02:00
Applevangelist
ba6f16943d #CSAR
* Added option to change top menu name
2022-09-23 10:28:20 +02:00
Applevangelist
0698ba3a18 Merge remote-tracking branch 'origin/master' into develop 2022-09-23 10:00:38 +02:00
Applevangelist
b6358933b2 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2022-09-22 17:31:47 +02:00
Applevangelist
276805ab28 CTLD
* make troops mass count
2022-09-22 17:30:44 +02:00
Applevangelist
31882458dc Merge remote-tracking branch 'origin/master' into develop 2022-09-22 15:50:26 +02:00
Applevangelist
22a5f05e32 #SPAWN
* Fix for InitCleanup()
2022-09-22 10:57:26 +02:00
Thomas
69b70bfed6 Update Spawn.lua (#1786)
Update function SPAWN:_SpawnCleanUpScheduler() to better cater for Helos
2022-09-21 11:43:54 +02:00
Applevangelist
8d2660508b Merge remote-tracking branch 'origin/master' into develop 2022-09-20 17:16:48 +02:00
Applevangelist
13d9562bcd #ATIS
* Added MSRSQueue to avoid overlaps
2022-09-20 17:16:20 +02:00
Applevangelist
a908e159e2 Merge remote-tracking branch 'origin/master' into develop 2022-09-20 15:52:17 +02:00
Applevangelist
9f7729fa0f #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:51:36 +02:00
Applevangelist
9ebc4fd5fe Merge remote-tracking branch 'origin/master' into develop 2022-09-20 10:48:47 +02:00
Applevangelist
4f4182f574 #RANGE
* Add using SRS
2022-09-20 10:48:13 +02:00
Applevangelist
3585a40d56 Merge remote-tracking branch 'origin/master' into develop 2022-09-19 18:26:26 +02:00
Applevangelist
273858a34a Merge remote-tracking branch 'origin/master' into develop 2022-09-19 13:21:43 +02:00
Applevangelist
d2872bebe9 Merge remote-tracking branch 'origin/master' into develop 2022-09-19 11:46:49 +02:00
Applevangelist
d8b0c1903f Changes 2022-09-19 11:45:29 +02:00
Applevangelist
0df1e58e16 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/OpsGroup.lua
2022-09-19 08:48:14 +02:00
Applevangelist
282b199754 #CSAR
- triple try to get coordinate for beacon
2022-09-15 19:54:00 +02:00
Applevangelist
c461c1e2e3 * coordtext fix 2022-09-15 19:50:19 +02:00
Applevangelist
5b5380c746 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Ops/PlayerTask.lua
2022-09-15 14:11:37 +02:00
Applevangelist
255a28cdf8 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 13:51:45 +02:00
Applevangelist
ab0a722f2c #OPSGROUP
* Allow for customized CallSigns

#PLAYERTASK
* SRS output finetuning
2022-09-15 13:51:01 +02:00
Applevangelist
6226a2a2d7 #ATIS
* No radio queue when using SRS

#FLIGHTCONTROL
* Allow for multiple frequencies, modulations to be used
* Use same callsign logic as AWACS and PLAYERTASK

#FLIGHTGROUP
* Nicefy message output
2022-09-15 13:49:40 +02:00
Applevangelist
9ca2a2f624 Merge remote-tracking branch 'origin/master' into develop 2022-09-15 08:19:27 +02:00
Applevangelist
498b7a033f #AWACS
* Align CallSign Generation
2022-09-14 18:08:12 +02:00
Applevangelist
83a7055065 #PLAYERTASKCONTROLLER
* Clean up menu builds
2022-09-13 17:19:29 +02:00
Applevangelist
b6fb7d94c8 'Menu changes 2022-09-13 13:13:06 +02:00
Applevangelist
4dbfef028e *options 2022-09-13 11:02:03 +02:00
Applevangelist
439f858a82 Merge remote-tracking branch 'origin/master' into develop 2022-09-13 10:55:14 +02:00
Applevangelist
2f62ae4e8b Merge remote-tracking branch 'origin/master' into develop 2022-09-12 17:34:50 +02:00
Applevangelist
acab17a21f Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2022-09-12 17:32:18 +02:00
Thomas
53380409de GROUP / customizes, TTS Callsigns
Added function to get customized TTS friendly callsigns from the GROUP
2022-09-12 14:38:44 +02:00
Applevangelist
3890375272 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
2022-09-11 18:24:04 +02:00
Applevangelist
e4f1e1a57a #AWACS
* Fix custom AWACS callsign not observed
2022-09-11 18:22:35 +02:00
Applevangelist
04abebfa10 Merge remote-tracking branch 'origin/master' into develop 2022-09-11 14:27:12 +02:00
Applevangelist
93abef86dc VArious fixes 2022-09-11 14:23:48 +02:00
Applevangelist
2d2f901545 Foreign class definition 2022-09-10 15:13:55 +02:00
Applevangelist
24df7c02f6 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	Moose Setup/Moose.files
2022-09-10 12:56:06 +02:00
Applevangelist
e97c294849 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2022-09-10 12:23:33 +02:00
Applevangelist
8d8bd162b3 #AmmoTruck 2022-09-10 11:34:24 +02:00
Applevangelist
3dc7e458e1 Merge remote-tracking branch 'origin/develop' into develop 2022-09-09 17:52:23 +02:00
Applevangelist
91d2e43671 Merge remote-tracking branch 'origin/master' into develop 2022-09-09 17:36:07 +02:00
Applevangelist
5d6488bfa4 #OPSGROUP 2022-09-09 17:32:00 +02:00
Applevangelist
f8fa6acc60 #AMMOTRUCK 2022-09-09 15:30:39 +02:00
Applevangelist
9ad4ce7a49 #AMMOTRUCK
* optionally use ARMYGROUP (but routing there sucks)
2022-09-09 15:01:34 +02:00
Applevangelist
247377e98c #OPSGROUP
* Fix for always teleporting
2022-09-09 15:01:00 +02:00
Applevangelist
612419e615 ZONE
* change to distance calc for finding spots w/o buildings
2022-09-09 15:00:42 +02:00
Thomas
949e1fc013 Update Moose.files 2022-09-08 15:56:45 +02:00
Applevangelist
34b80727a2 #AMMOTRUCK
* Initial Release
2022-09-08 15:54:22 +02:00
Applevangelist
825e88353a Merge remote-tracking branch 'origin/master' into develop 2022-09-08 15:51:34 +02:00
Applevangelist
31cd125954 #GROUP, #UNIT
* Improve GetAmmunition() to include artillery shells
2022-09-08 15:51:07 +02:00
Applevangelist
3bc274a651 Merge remote-tracking branch 'origin/develop' into develop 2022-09-08 11:59:15 +02:00
Applevangelist
eed41a121c #AUTOLASE
* Added option for blacklist of attributes
* Added radar unit higher priority over launchers
* Removed the "#001-01" appendix on message output for spawned Recce
2022-09-08 11:57:02 +02:00
186 changed files with 21031 additions and 8744 deletions

View File

@@ -57,6 +57,7 @@ jobs:
- name: Update apt-get (needed for act docker image) - name: Update apt-get (needed for act docker image)
run: | run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -qq update sudo apt-get -qq update
- name: Install tree - name: Install tree

View File

@@ -5,6 +5,8 @@ on:
branches: branches:
- master - master
- develop - develop
- Apple/Develop
paths: paths:
- 'Moose Setup/**/*.lua' - 'Moose Setup/**/*.lua'
- 'Moose Development/**/*.lua' - 'Moose Development/**/*.lua'
@@ -47,6 +49,7 @@ jobs:
- name: Update apt-get (needed for act docker image) - name: Update apt-get (needed for act docker image)
run: | run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -qq update sudo apt-get -qq update
- name: Install tree - name: Install tree
@@ -95,10 +98,6 @@ jobs:
export COMMIT_TIME=$(git show -s --format=%cd ${{ github.sha }} --date=iso-strict) 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" 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 # Run LuaCheck
######################################################################### #########################################################################
@@ -108,6 +107,10 @@ jobs:
run: | run: |
luacheck --std=lua51c --config=.luacheckrc -gurasqq "Moose Development/Moose" luacheck --std=lua51c --config=.luacheckrc -gurasqq "Moose Development/Moose"
- name: Run LuaSrcDiet
run: |
luasrcdiet --basic --opt-emptylines ./build/result/Moose_Include_Static/Moose.lua -o ./build/result/Moose_Include_Static/Moose_.lua
######################################################################### #########################################################################
# Push to MOOSE_INCLUDE # Push to MOOSE_INCLUDE
######################################################################### #########################################################################

View File

@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
@@ -43,7 +43,7 @@ jobs:
working-directory: docs/ working-directory: docs/
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v3 uses: actions/configure-pages@v4
- name: Build with Jekyll - name: Build with Jekyll
# Outputs to the './_site' directory by default # Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
@@ -52,7 +52,7 @@ jobs:
working-directory: docs/ working-directory: docs/
- name: Upload artifact - name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default # Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v3
with: with:
path: docs/_site/ path: docs/_site/
@@ -66,13 +66,13 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v1 uses: actions/deploy-pages@v4
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: deploy needs: deploy
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
- run: npm install linkinator - run: npm install linkinator
- run: npx linkinator https://flightcontrol-master.github.io/MOOSE/ --verbosity error --timeout 5000 --recurse --skip "(java.com)" --retry-errors --retry-errors-count 3 --retry-errors-jitter - run: npx linkinator https://flightcontrol-master.github.io/MOOSE/ --verbosity error --timeout 5000 --recurse --skip "(java.com)" --retry-errors --retry-errors-count 3 --retry-errors-jitter

3
.gitignore vendored
View File

@@ -228,6 +228,9 @@ pip-log.txt
#Goodsync #Goodsync
_gsdata_/ _gsdata_/
# PyCharm
.idea
#GITHUB #GITHUB
Moose Test Missions/MOOSE_Test_Template.miz Moose Test Missions/MOOSE_Test_Template.miz
Moose Development/Moose/.vscode/launch.json Moose Development/Moose/.vscode/launch.json

View File

@@ -1,7 +1,17 @@
{ {
"Lua.workspace.preloadFileSize": 1000, "Lua.workspace.preloadFileSize": 10000,
"Lua.diagnostics.disable": [ "Lua.diagnostics.disable": [
"undefined-doc-name" "undefined-doc-name",
"duplicate-set-field",
"trailing-space",
"need-check-nil",
"ambiguity-1",
"undefined-doc-param",
"redundant-parameter",
"param-type-mismatch",
"deprecated",
"undefined-global",
"lowercase-global"
], ],
"Lua.diagnostics.globals": [ "Lua.diagnostics.globals": [
"BASE", "BASE",

View File

@@ -11,7 +11,7 @@
-- @module AI.AI_A2A_Cap -- @module AI.AI_A2A_Cap
-- @image AI_Combat_Air_Patrol.JPG -- @image AI_Combat_Air_Patrol.JPG
--- @type AI_A2A_CAP -- @type AI_A2A_CAP
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL -- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE -- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE

View File

@@ -23,7 +23,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [AID-A2A - AI A2A Dispatching](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching) -- [AID-A2A - AI A2A Dispatching](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher)
-- --
-- === -- ===
-- --
@@ -310,7 +310,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to set a specific Engage Radius. -- Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to set a specific Engage Radius.
-- **The Engage Radius is defined for ALL squadrons which are operational.** -- **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/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-019%20-%20Engage%20Range%20Test) -- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher/AID-A2A-019%20-%20Engage%20Range%20Test)
-- --
-- In this example an Engage Radius is set to various values. -- In this example an Engage Radius is set to various values.
-- --
@@ -333,7 +333,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetGciRadius}() to set a specific controlled ground intercept radius. -- 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.** -- **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/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-013%20-%20Intercept%20Test) -- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher/AID-A2A-013%20-%20Intercept%20Test)
-- --
-- In these examples, the Gci Radius is set to various values: -- In these examples, the Gci Radius is set to various values:
-- --
@@ -366,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. -- 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. -- 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/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-009%20-%20Border%20Test) -- Demonstration Mission: [AID-009 - AI_A2A - Border Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher/AID-A2A-009%20-%20Border%20Test)
-- --
-- In this example a border is set for the CCCP A2A dispatcher: -- In this example a border is set for the CCCP A2A dispatcher:
-- --
@@ -1151,14 +1151,14 @@ do -- AI_A2A_DISPATCHER
local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured. local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured.
self:I( "Captured " .. AirbaseName ) self:T( "Captured " .. AirbaseName )
-- Now search for all squadrons located at the airbase, and sanitize them. -- Now search for all squadrons located at the airbase, and sanitize them.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning. Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." ) self:T( "Squadron " .. SquadronName .. " captured." )
end end
end end
end end
@@ -1233,7 +1233,7 @@ do -- AI_A2A_DISPATCHER
-- --
-- **Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to modify the default Engage Radius for ALL squadrons.** -- **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/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-019%20-%20Engage%20Range%20Test) -- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher/AID-A2A-019%20-%20Engage%20Range%20Test)
-- --
-- @param #AI_A2A_DISPATCHER self -- @param #AI_A2A_DISPATCHER self
-- @param #number EngageRadius (Optional, Default = 100000) The radius to report friendlies near the target. -- @param #number EngageRadius (Optional, Default = 100000) The radius to report friendlies near the target.
@@ -1283,7 +1283,7 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetGciRadius}() to set a specific controlled ground intercept radius. -- 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.** -- **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/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching/AID-A2A-013%20-%20Intercept%20Test) -- Demonstration Mission: [AID-013 - AI_A2A - Intercept Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher/AID-A2A-013%20-%20Intercept%20Test)
-- --
-- @param #AI_A2A_DISPATCHER self -- @param #AI_A2A_DISPATCHER self
-- @param #number GciRadius (Optional, Default = 200000) The radius to ground control intercept detected targets from the nearest airbase. -- @param #number GciRadius (Optional, Default = 200000) The radius to ground control intercept detected targets from the nearest airbase.
@@ -1828,7 +1828,7 @@ do -- AI_A2A_DISPATCHER
self:SetSquadronCapInterval( SquadronName, self.DefenderDefault.CapLimit, self.DefenderDefault.CapMinSeconds, self.DefenderDefault.CapMaxSeconds, 1 ) self:SetSquadronCapInterval( SquadronName, self.DefenderDefault.CapLimit, self.DefenderDefault.CapMinSeconds, self.DefenderDefault.CapMaxSeconds, 1 )
self:I( { CAP = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, Zone, PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageAltType } } ) self:T( { CAP = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, Zone, PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageAltType } } )
-- Add the CAP to the EWR network. -- Add the CAP to the EWR network.
@@ -2085,7 +2085,7 @@ do -- AI_A2A_DISPATCHER
Intercept.EngageCeilingAltitude = EngageCeilingAltitude Intercept.EngageCeilingAltitude = EngageCeilingAltitude
Intercept.EngageAltType = EngageAltType Intercept.EngageAltType = EngageAltType
self:I( { GCI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { GCI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
end end
--- Set squadron GCI. --- Set squadron GCI.
@@ -3000,17 +3000,17 @@ do -- AI_A2A_DISPATCHER
for FriendlyDistance, AIFriendly in UTILS.spairs( DefenderFriendlies or {} ) do for FriendlyDistance, AIFriendly in UTILS.spairs( DefenderFriendlies or {} ) do
-- We only allow to ENGAGE targets as long as the Units on both sides are balanced. -- We only allow to ENGAGE targets as long as the Units on both sides are balanced.
if AttackerCount > DefenderCount then if AttackerCount > DefenderCount then
--self:I("***** AI_A2A_DISPATCHER:CountDefendersToBeEngaged() *****\nThis is supposed to be a UNIT:") --self:T("***** AI_A2A_DISPATCHER:CountDefendersToBeEngaged() *****\nThis is supposed to be a UNIT:")
if AIFriendly then if AIFriendly then
local classname = AIFriendly.ClassName or "No Class Name" local classname = AIFriendly.ClassName or "No Class Name"
local unitname = AIFriendly.IdentifiableName or "No Unit Name" local unitname = AIFriendly.IdentifiableName or "No Unit Name"
--self:I("Class Name: " .. classname) --self:T("Class Name: " .. classname)
--self:I("Unit Name: " .. unitname) --self:T("Unit Name: " .. unitname)
--self:I({AIFriendly}) --self:T({AIFriendly})
end end
local Friendly = nil local Friendly = nil
if AIFriendly and AIFriendly:IsAlive() then if AIFriendly and AIFriendly:IsAlive() then
--self:I("AIFriendly alive, getting GROUP") --self:T("AIFriendly alive, getting GROUP")
Friendly = AIFriendly:GetGroup() -- Wrapper.Group#GROUP Friendly = AIFriendly:GetGroup() -- Wrapper.Group#GROUP
end end
@@ -3257,7 +3257,8 @@ do -- AI_A2A_DISPATCHER
end end
end end
--- @param #AI_A2A_DISPATCHER self --- AI_A2A_Fsm:onafterHome
-- @param #AI_A2A_DISPATCHER self
function AI_A2A_Fsm:onafterHome( Defender, From, Event, To, Action ) function AI_A2A_Fsm:onafterHome( Defender, From, Event, To, Action )
if Defender and Defender:IsAlive() then if Defender and Defender:IsAlive() then
self:F( { "CAP Home", Defender:GetName() } ) self:F( { "CAP Home", Defender:GetName() } )
@@ -3505,7 +3506,8 @@ do -- AI_A2A_DISPATCHER
Dispatcher:ClearDefenderTaskTarget( DefenderGroup ) Dispatcher:ClearDefenderTaskTarget( DefenderGroup )
end end
--- @param #AI_A2A_DISPATCHER self --- function Fsm:onafterLostControl
-- @param #AI_A2A_DISPATCHER self
function Fsm:onafterLostControl( Defender, From, Event, To ) function Fsm:onafterLostControl( Defender, From, Event, To )
self:F( { "GCI LostControl", Defender:GetName() } ) self:F( { "GCI LostControl", Defender:GetName() } )
self:GetParent( self ).onafterHome( self, Defender, From, Event, To ) self:GetParent( self ).onafterHome( self, Defender, From, Event, To )
@@ -3518,7 +3520,8 @@ do -- AI_A2A_DISPATCHER
end end
end end
--- @param #AI_A2A_DISPATCHER self --- function Fsm:onafterHome
-- @param #AI_A2A_DISPATCHER self
function Fsm:onafterHome( DefenderGroup, From, Event, To, Action ) function Fsm:onafterHome( DefenderGroup, From, Event, To, Action )
self:F( { "GCI Home", DefenderGroup:GetName() } ) self:F( { "GCI Home", DefenderGroup:GetName() } )
self:GetParent( self ).onafterHome( self, DefenderGroup, From, Event, To ) self:GetParent( self ).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3949,7 +3952,7 @@ end
do do
--- @type AI_A2A_GCICAP -- @type AI_A2A_GCICAP
-- @extends #AI_A2A_DISPATCHER -- @extends #AI_A2A_DISPATCHER
--- Create an automatic air defence system for a coalition setting up GCI and CAP air defenses. --- Create an automatic air defence system for a coalition setting up GCI and CAP air defenses.
@@ -3959,7 +3962,7 @@ do
-- --
-- # Demo Missions -- # Demo Missions
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2A%20-%20AI%20A2A%20Dispatching) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher)
-- --
-- === -- ===
-- --
@@ -4319,23 +4322,23 @@ do
-- Setup squadrons -- Setup squadrons
self:I( { Airbases = AirbaseNames } ) self:T( { Airbases = AirbaseNames } )
self:I( "Defining Templates for Airbases ..." ) self:T( "Defining Templates for Airbases ..." )
for AirbaseID, AirbaseName in pairs( AirbaseNames ) do for AirbaseID, AirbaseName in pairs( AirbaseNames ) do
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName() local AirbaseName = Airbase:GetName()
local AirbaseCoord = Airbase:GetCoordinate() local AirbaseCoord = Airbase:GetCoordinate()
local AirbaseZone = ZONE_RADIUS:New( "Airbase", AirbaseCoord:GetVec2(), 3000 ) local AirbaseZone = ZONE_RADIUS:New( "Airbase", AirbaseCoord:GetVec2(), 3000 )
local Templates = nil local Templates = nil
self:I( { Airbase = AirbaseName } ) self:T( { Airbase = AirbaseName } )
for TemplateID, Template in pairs( self.Templates:GetSet() ) do for TemplateID, Template in pairs( self.Templates:GetSet() ) do
local Template = Template -- Wrapper.Group#GROUP local Template = Template -- Wrapper.Group#GROUP
local TemplateCoord = Template:GetCoordinate() local TemplateCoord = Template:GetCoordinate()
if AirbaseZone:IsVec2InZone( TemplateCoord:GetVec2() ) then if AirbaseZone:IsVec2InZone( TemplateCoord:GetVec2() ) then
Templates = Templates or {} Templates = Templates or {}
table.insert( Templates, Template:GetName() ) table.insert( Templates, Template:GetName() )
self:I( { Template = Template:GetName() } ) self:T( { Template = Template:GetName() } )
end end
end end
if Templates then if Templates then
@@ -4351,13 +4354,13 @@ do
self.CAPTemplates:FilterPrefixes( CapPrefixes ) self.CAPTemplates:FilterPrefixes( CapPrefixes )
self.CAPTemplates:FilterOnce() self.CAPTemplates:FilterOnce()
self:I( "Setting up CAP ..." ) self:T( "Setting up CAP ..." )
for CAPID, CAPTemplate in pairs( self.CAPTemplates:GetSet() ) do for CAPID, CAPTemplate in pairs( self.CAPTemplates:GetSet() ) do
local CAPZone = ZONE_POLYGON:New( CAPTemplate:GetName(), CAPTemplate ) local CAPZone = ZONE_POLYGON:New( CAPTemplate:GetName(), CAPTemplate )
-- Now find the closest airbase from the ZONE (start or center) -- Now find the closest airbase from the ZONE (start or center)
local AirbaseDistance = 99999999 local AirbaseDistance = 99999999
local AirbaseClosest = nil -- Wrapper.Airbase#AIRBASE local AirbaseClosest = nil -- Wrapper.Airbase#AIRBASE
self:I( { CAPZoneGroup = CAPID } ) self:T( { CAPZoneGroup = CAPID } )
for AirbaseID, AirbaseName in pairs( AirbaseNames ) do for AirbaseID, AirbaseName in pairs( AirbaseNames ) do
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName() local AirbaseName = Airbase:GetName()
@@ -4365,7 +4368,7 @@ do
local Squadron = self.DefenderSquadrons[AirbaseName] local Squadron = self.DefenderSquadrons[AirbaseName]
if Squadron then if Squadron then
local Distance = AirbaseCoord:Get2DDistance( CAPZone:GetCoordinate() ) local Distance = AirbaseCoord:Get2DDistance( CAPZone:GetCoordinate() )
self:I( { AirbaseDistance = Distance } ) self:T( { AirbaseDistance = Distance } )
if Distance < AirbaseDistance then if Distance < AirbaseDistance then
AirbaseDistance = Distance AirbaseDistance = Distance
AirbaseClosest = Airbase AirbaseClosest = Airbase
@@ -4373,7 +4376,7 @@ do
end end
end end
if AirbaseClosest then if AirbaseClosest then
self:I( { CAPAirbase = AirbaseClosest:GetName() } ) self:T( { CAPAirbase = AirbaseClosest:GetName() } )
self:SetSquadronCap( AirbaseClosest:GetName(), CAPZone, 6000, 10000, 500, 800, 800, 1200, "RADIO" ) self:SetSquadronCap( AirbaseClosest:GetName(), CAPZone, 6000, 10000, 500, 800, 800, 1200, "RADIO" )
self:SetSquadronCapInterval( AirbaseClosest:GetName(), CapLimit, 300, 600, 1 ) self:SetSquadronCapInterval( AirbaseClosest:GetName(), CapLimit, 300, 600, 1 )
end end
@@ -4381,14 +4384,14 @@ do
-- Setup GCI. -- Setup GCI.
-- GCI is setup for all Squadrons. -- GCI is setup for all Squadrons.
self:I( "Setting up GCI ..." ) self:T( "Setting up GCI ..." )
for AirbaseID, AirbaseName in pairs( AirbaseNames ) do for AirbaseID, AirbaseName in pairs( AirbaseNames ) do
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName() local AirbaseName = Airbase:GetName()
local Squadron = self.DefenderSquadrons[AirbaseName] local Squadron = self.DefenderSquadrons[AirbaseName]
self:F( { Airbase = AirbaseName } ) self:F( { Airbase = AirbaseName } )
if Squadron then if Squadron then
self:I( { GCIAirbase = AirbaseName } ) self:T( { GCIAirbase = AirbaseName } )
self:SetSquadronGci( AirbaseName, 800, 1200 ) self:SetSquadronGci( AirbaseName, 800, 1200 )
end end
end end

View File

@@ -13,8 +13,8 @@
--- @type AI_A2A_GCI -- @type AI_A2A_GCI
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE -- @extends AI.AI_A2A#AI_A2A
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders. --- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
@@ -39,6 +39,8 @@
-- --
-- ## 2. AI_A2A_GCI is a FSM -- ## 2. AI_A2A_GCI is a FSM
-- --
-- ![Process](..\Presentations\AI_GCI\Dia2.JPG)
--
-- ### 2.1 AI_A2A_GCI States -- ### 2.1 AI_A2A_GCI States
-- --
-- * **None** ( Group ): The process is not started yet. -- * **None** ( Group ): The process is not started yet.

View File

@@ -10,8 +10,8 @@
-- @image AI_Air_Patrolling.JPG -- @image AI_Air_Patrolling.JPG
--- @type AI_A2A_PATROL -- @type AI_A2A_PATROL
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL -- @extends AI.AI_A2A#AI_A2A
--- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} or @{Wrapper.Group}. --- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} or @{Wrapper.Group}.
-- --

View File

@@ -11,9 +11,8 @@
-- @module AI.AI_A2G_BAI -- @module AI.AI_A2G_BAI
-- @image AI_Air_To_Ground_Engage.JPG -- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_BAI -- @type AI_A2G_BAI
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL -- @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_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders. --- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
-- --
@@ -47,7 +46,7 @@ AI_A2G_BAI = {
function AI_A2G_BAI:New2( AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) 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 = AI_AIR:New( AIGroup )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType ) 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 ) local self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -11,9 +11,8 @@
-- @module AI.AI_A2G_CAS -- @module AI.AI_A2G_CAS
-- @image AI_Air_To_Ground_Engage.JPG -- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_CAS -- @type AI_A2G_CAS
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL -- @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_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders. --- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
-- --
@@ -47,7 +46,7 @@ AI_A2G_CAS = {
function AI_A2G_CAS:New2( AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) 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 = AI_AIR:New( AIGroup )
local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) local AI_Air_Patrol = AI_AIR_PATROL:New( AI_Air, AIGroup, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType ) -- #AI_AIR_PATROL
local AI_Air_Engage = AI_AIR_ENGAGE:New( AI_Air_Patrol, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType ) 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 ) local self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -24,7 +24,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [AID-A2G - AI A2G Dispatching](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching/AID-A2G%20-%20AI%20A2G%20Dispatching) -- [AID-A2G - AI A2G Dispatching](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2G_Dispatcher)
-- --
-- === -- ===
-- --
@@ -904,14 +904,14 @@ do -- AI_A2G_DISPATCHER
-- @type AI_A2G_DISPATCHER.DefenseCoordinates -- @type AI_A2G_DISPATCHER.DefenseCoordinates
-- @map <#string,Core.Point#COORDINATE> A list of all defense coordinates mapped per defense coordinate name. -- @map <#string,Core.Point#COORDINATE> A list of all defense coordinates mapped per defense coordinate name.
--- @field #AI_A2G_DISPATCHER.DefenseCoordinates DefenseCoordinates -- @field #AI_A2G_DISPATCHER.DefenseCoordinates DefenseCoordinates
AI_A2G_DISPATCHER.DefenseCoordinates = {} AI_A2G_DISPATCHER.DefenseCoordinates = {}
--- Enumerator for spawns at airbases. --- Enumerator for spawns at airbases.
-- @type AI_A2G_DISPATCHER.Takeoff -- @type AI_A2G_DISPATCHER.Takeoff
-- @extends Wrapper.Group#GROUP.Takeoff -- @extends Wrapper.Group#GROUP.Takeoff
--- @field #AI_A2G_DISPATCHER.Takeoff Takeoff -- @field #AI_A2G_DISPATCHER.Takeoff Takeoff
AI_A2G_DISPATCHER.Takeoff = GROUP.Takeoff AI_A2G_DISPATCHER.Takeoff = GROUP.Takeoff
--- Defines Landing location. --- Defines Landing location.
@@ -942,7 +942,7 @@ do -- AI_A2G_DISPATCHER
-- @type AI_A2G_DISPATCHER.DefenseQueue -- @type AI_A2G_DISPATCHER.DefenseQueue
-- @list<#AI_A2G_DISPATCHER.DefenseQueueItem> DefenseQueueItem A list of all defenses being queued ... -- @list<#AI_A2G_DISPATCHER.DefenseQueueItem> DefenseQueueItem A list of all defenses being queued ...
--- @field #AI_A2G_DISPATCHER.DefenseQueue DefenseQueue -- @field #AI_A2G_DISPATCHER.DefenseQueue DefenseQueue
AI_A2G_DISPATCHER.DefenseQueue = {} AI_A2G_DISPATCHER.DefenseQueue = {}
--- Defense approach types. --- Defense approach types.
@@ -1136,7 +1136,7 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:onafterStart( From, Event, To ) function AI_A2G_DISPATCHER:onafterStart( From, Event, To )
self:GetParent( self ).onafterStart( self, From, Event, To ) self:GetParent( self ).onafterStart( self, From, Event, To )
@@ -1147,7 +1147,7 @@ do -- AI_A2G_DISPATCHER
for Resource = 1, DefenderSquadron.ResourceCount or 0 do for Resource = 1, DefenderSquadron.ResourceCount or 0 do
self:ResourcePark( DefenderSquadron ) self:ResourcePark( DefenderSquadron )
end end
self:I( "Parked resources for squadron " .. DefenderSquadron.Name ) self:T( "Parked resources for squadron " .. DefenderSquadron.Name )
end end
end end
@@ -1201,7 +1201,7 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:ResourcePark( DefenderSquadron ) function AI_A2G_DISPATCHER:ResourcePark( DefenderSquadron )
local TemplateID = math.random( 1, #DefenderSquadron.Spawn ) local TemplateID = math.random( 1, #DefenderSquadron.Spawn )
local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN
@@ -1218,33 +1218,33 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventBaseCaptured( EventData ) function AI_A2G_DISPATCHER:OnEventBaseCaptured( EventData )
local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured. local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured.
self:I( "Captured " .. AirbaseName ) self:T( "Captured " .. AirbaseName )
-- Now search for all squadrons located at the airbase, and sanitize them. -- Now search for all squadrons located at the airbase, and sanitize them.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning. Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." ) self:T( "Squadron " .. SquadronName .. " captured." )
end end
end end
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventCrashOrDead( EventData ) function AI_A2G_DISPATCHER:OnEventCrashOrDead( EventData )
self.Detection:ForgetDetectedUnit( EventData.IniUnitName ) self.Detection:ForgetDetectedUnit( EventData.IniUnitName )
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventLand( EventData ) function AI_A2G_DISPATCHER:OnEventLand( EventData )
self:F( "Landed" ) self:F( "Landed" )
@@ -1261,7 +1261,7 @@ do -- AI_A2G_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender ) self:RemoveDefenderFromSquadron( Squadron, Defender )
end end
DefenderUnit:Destroy() DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender ) self:ResourcePark( Squadron )
return return
end end
if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then
@@ -1273,7 +1273,7 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventEngineShutdown( EventData ) function AI_A2G_DISPATCHER:OnEventEngineShutdown( EventData )
local DefenderUnit = EventData.IniUnit local DefenderUnit = EventData.IniUnit
@@ -1289,7 +1289,7 @@ do -- AI_A2G_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender ) self:RemoveDefenderFromSquadron( Squadron, Defender )
end end
DefenderUnit:Destroy() DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender ) self:ResourcePark( Squadron )
end end
end end
end end
@@ -1297,7 +1297,7 @@ do -- AI_A2G_DISPATCHER
do -- Manage the defensive behaviour do -- Manage the defensive behaviour
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string DefenseCoordinateName The name of the coordinate to be defended by A2G defenses. -- @param #string DefenseCoordinateName The name of the coordinate to be defended by A2G defenses.
-- @param Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by A2G defenses. -- @param Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by A2G defenses.
function AI_A2G_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate ) function AI_A2G_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate )
@@ -1305,19 +1305,19 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityLow() function AI_A2G_DISPATCHER:SetDefenseReactivityLow()
self.DefenseReactivity = 0.05 self.DefenseReactivity = 0.05
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityMedium() function AI_A2G_DISPATCHER:SetDefenseReactivityMedium()
self.DefenseReactivity = 0.15 self.DefenseReactivity = 0.15
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityHigh() function AI_A2G_DISPATCHER:SetDefenseReactivityHigh()
self.DefenseReactivity = 0.5 self.DefenseReactivity = 0.5
end end
@@ -1351,14 +1351,14 @@ do -- AI_A2G_DISPATCHER
-- 1. the **distance of the closest airbase to target**, being smaller than the **Defend Radius**. -- 1. the **distance of the closest airbase to target**, being smaller than the **Defend Radius**.
-- 2. the **distance to any defense reference point**. -- 2. the **distance to any defense reference point**.
-- --
-- The **default** defense radius is defined as **400000** or **40km**. Override the default defense radius when the era of the warfare is early, or, -- The **default** defense radius is defined as **40000** or **40km**. Override the default defense radius when the era of the warfare is early, or,
-- when you don't want to let the AI_A2G_DISPATCHER react immediately when a certain border or area is not being crossed. -- when you don't want to let the AI_A2G_DISPATCHER react immediately when a certain border or area is not being crossed.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetDefendRadius}() to set a specific defend radius for all squadrons, -- Use the method @{#AI_A2G_DISPATCHER.SetDefendRadius}() to set a specific defend radius for all squadrons,
-- **the Defense Radius is defined for ALL squadrons which are operational.** -- **the Defense Radius is defined for ALL squadrons which are operational.**
-- --
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number DefenseRadius (Optional, Default = 200000) The defense radius to engage detected targets from the nearest capable and available squadron airbase. -- @param #number DefenseRadius (Optional, Default = 20000) The defense radius to engage detected targets from the nearest capable and available squadron airbase.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
-- --
@@ -1373,7 +1373,7 @@ do -- AI_A2G_DISPATCHER
-- --
function AI_A2G_DISPATCHER:SetDefenseRadius( DefenseRadius ) function AI_A2G_DISPATCHER:SetDefenseRadius( DefenseRadius )
self.DefenseRadius = DefenseRadius or 100000 self.DefenseRadius = DefenseRadius or 40000
self.Detection:SetAcceptRange( self.DefenseRadius ) self.Detection:SetAcceptRange( self.DefenseRadius )
@@ -1868,7 +1868,7 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps. -- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps.
-- @usage -- @usage
@@ -2144,7 +2144,7 @@ do -- AI_A2G_DISPATCHER
Sead.EngageAltType = EngageAltType Sead.EngageAltType = EngageAltType
Sead.Defend = true Sead.Defend = true
self:I( { SEAD = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { SEAD = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self return self
end end
@@ -2234,7 +2234,7 @@ do -- AI_A2G_DISPATCHER
self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "SEAD" ) self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "SEAD" )
self:I( { SEAD = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { SEAD = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
end end
@@ -2295,7 +2295,7 @@ do -- AI_A2G_DISPATCHER
Cas.EngageAltType = EngageAltType Cas.EngageAltType = EngageAltType
Cas.Defend = true Cas.Defend = true
self:I( { CAS = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { CAS = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self return self
end end
@@ -2385,7 +2385,7 @@ do -- AI_A2G_DISPATCHER
self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "CAS" ) self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "CAS" )
self:I( { CAS = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { CAS = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
end end
@@ -2446,7 +2446,7 @@ do -- AI_A2G_DISPATCHER
Bai.EngageAltType = EngageAltType Bai.EngageAltType = EngageAltType
Bai.Defend = true Bai.Defend = true
self:I( { BAI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { BAI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self return self
end end
@@ -2536,7 +2536,7 @@ do -- AI_A2G_DISPATCHER
self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "BAI" ) self:SetSquadronPatrolInterval( SquadronName, self.DefenderDefault.PatrolLimit, self.DefenderDefault.PatrolMinSeconds, self.DefenderDefault.PatrolMaxSeconds, 1, "BAI" )
self:I( { BAI = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } ) self:T( { BAI = { Zone:GetName(), PatrolMinSpeed, PatrolMaxSpeed, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolAltType, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
end end
@@ -3369,7 +3369,7 @@ do -- AI_A2G_DISPATCHER
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size ) function AI_A2G_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
self.Defenders = self.Defenders or {} self.Defenders = self.Defenders or {}
local DefenderName = Defender:GetName() local DefenderName = Defender:GetName()
@@ -3380,7 +3380,7 @@ do -- AI_A2G_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } ) self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } )
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender ) function AI_A2G_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender )
self.Defenders = self.Defenders or {} self.Defenders = self.Defenders or {}
local DefenderName = Defender:GetName() local DefenderName = Defender:GetName()
@@ -3796,7 +3796,7 @@ do -- AI_A2G_DISPATCHER
Dispatcher:ClearDefenderTaskTarget( DefenderGroup ) Dispatcher:ClearDefenderTaskTarget( DefenderGroup )
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To ) function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To )
self:F({"LostControl", DefenderGroup:GetName()}) self:F({"LostControl", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To ) self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3813,7 +3813,7 @@ do -- AI_A2G_DISPATCHER
end end
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action ) function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action )
self:F({"Home", DefenderGroup:GetName()}) self:F({"Home", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To ) self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3894,11 +3894,15 @@ do -- AI_A2G_DISPATCHER
local Squadron = Dispatcher:GetSquadronFromDefender( DefenderGroup ) local Squadron = Dispatcher:GetSquadronFromDefender( DefenderGroup )
if Squadron then if Squadron then
local FirstUnit = AttackSetUnit:GetFirst() local FirstUnit = AttackSetUnit:GetRandomSurely()
if FirstUnit then
local Coordinate = FirstUnit:GetCoordinate() -- Core.Point#COORDINATE local Coordinate = FirstUnit:GetCoordinate() -- Core.Point#COORDINATE
if self.SetSendPlayerMessages then if self.SetSendPlayerMessages then
Dispatcher:MessageToPlayers( Squadron, DefenderName .. ", on route to ground target at " .. Coordinate:ToStringA2G( DefenderGroup ), DefenderGroup ) Dispatcher:MessageToPlayers( Squadron, DefenderName .. ", on route to ground target at " .. Coordinate:ToStringA2G( DefenderGroup ), DefenderGroup )
end end
else
return
end
end end
self:GetParent(self).onafterEngageRoute( self, DefenderGroup, From, Event, To, AttackSetUnit ) self:GetParent(self).onafterEngageRoute( self, DefenderGroup, From, Event, To, AttackSetUnit )
end end
@@ -3933,7 +3937,7 @@ do -- AI_A2G_DISPATCHER
Dispatcher:ClearDefenderTaskTarget( DefenderGroup ) Dispatcher:ClearDefenderTaskTarget( DefenderGroup )
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To ) function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To )
self:F({"Defender LostControl", DefenderGroup:GetName()}) self:F({"Defender LostControl", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To ) self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3950,7 +3954,7 @@ do -- AI_A2G_DISPATCHER
end end
end end
--- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action ) function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action )
self:F({"Defender Home", DefenderGroup:GetName()}) self:F({"Defender Home", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To ) self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -4785,3 +4789,4 @@ end
end end
self:T({Squadron = Squadron.Name,SquadronResourceCount = Squadron.ResourceCount}) self:T({Squadron = Squadron.Name,SquadronResourceCount = Squadron.ResourceCount})
end end

View File

@@ -13,9 +13,8 @@
--- @type AI_A2G_SEAD -- @type AI_A2G_SEAD
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL -- @extends AI.AI_A2G_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. --- Implements the core functions to SEAD intruders. Use the Engage trigger to intercept intruders.

View File

@@ -9,7 +9,8 @@
-- @module AI.AI_Air -- @module AI.AI_Air
-- @image MOOSE.JPG -- @image MOOSE.JPG
--- @type AI_AIR ---
-- @type AI_AIR
-- @extends Core.Fsm#FSM_CONTROLLABLE -- @extends Core.Fsm#FSM_CONTROLLABLE
--- The AI_AIR class implements the core functions to operate an AI @{Wrapper.Group}. --- The AI_AIR class implements the core functions to operate an AI @{Wrapper.Group}.
@@ -264,7 +265,7 @@ function AI_AIR:New( AIGroup )
return self return self
end end
--- @param Wrapper.Group#GROUP self -- @param Wrapper.Group#GROUP self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function GROUP:OnEventTakeoff( EventData, Fsm ) function GROUP:OnEventTakeoff( EventData, Fsm )
Fsm:Takeoff() Fsm:Takeoff()
@@ -446,13 +447,13 @@ function AI_AIR:onafterReturn( Controllable, From, Event, To )
end end
--- @param #AI_AIR self -- @param #AI_AIR self
function AI_AIR:onbeforeStatus() function AI_AIR:onbeforeStatus()
return self.CheckStatus return self.CheckStatus
end end
--- @param #AI_AIR self -- @param #AI_AIR self
function AI_AIR:onafterStatus() function AI_AIR:onafterStatus()
if self.Controllable and self.Controllable:IsAlive() then if self.Controllable and self.Controllable:IsAlive() then
@@ -465,7 +466,7 @@ function AI_AIR:onafterStatus()
local DistanceFromHomeBase = self.HomeAirbase:GetCoordinate():Get2DDistance( self.Controllable:GetCoordinate() ) local DistanceFromHomeBase = self.HomeAirbase:GetCoordinate():Get2DDistance( self.Controllable:GetCoordinate() )
if DistanceFromHomeBase > self.DisengageRadius then if DistanceFromHomeBase > self.DisengageRadius then
self:I( self.Controllable:GetName() .. " is too far from home base, RTB!" ) self:T( self.Controllable:GetName() .. " is too far from home base, RTB!" )
self:Hold( 300 ) self:Hold( 300 )
RTB = false RTB = false
end end
@@ -489,10 +490,10 @@ function AI_AIR:onafterStatus()
if Fuel < self.FuelThresholdPercentage then if Fuel < self.FuelThresholdPercentage then
if self.TankerName then if self.TankerName then
self:I( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... Refuelling at Tanker!" ) self:T( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... Refuelling at Tanker!" )
self:Refuel() self:Refuel()
else else
self:I( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" ) self:T( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" )
local OldAIControllable = self.Controllable local OldAIControllable = self.Controllable
local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed ) local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
@@ -518,7 +519,7 @@ function AI_AIR:onafterStatus()
-- Note that a group can consist of more units, so if one unit is damaged of a group, the mission may continue. -- Note that a group can consist of more units, so if one unit is damaged of a group, the mission may continue.
-- The damaged unit will RTB due to DCS logic, and the others will continue to engage. -- The damaged unit will RTB due to DCS logic, and the others will continue to engage.
if ( Damage / InitialLife ) < self.PatrolDamageThreshold then if ( Damage / InitialLife ) < self.PatrolDamageThreshold then
self:I( self.Controllable:GetName() .. " is damaged: " .. Damage .. " ... RTB!" ) self:T( self.Controllable:GetName() .. " is damaged: " .. Damage .. " ... RTB!" )
self:Damaged() self:Damaged()
RTB = true RTB = true
self:SetStatusOff() self:SetStatusOff()
@@ -536,7 +537,7 @@ function AI_AIR:onafterStatus()
if Damage ~= InitialLife then if Damage ~= InitialLife then
self:Damaged() self:Damaged()
else else
self:I( self.Controllable:GetName() .. " control lost! " ) self:T( self.Controllable:GetName() .. " control lost! " )
self:LostControl() self:LostControl()
end end
@@ -560,7 +561,7 @@ function AI_AIR:onafterStatus()
end end
--- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.RTBRoute( AIGroup, Fsm ) function AI_AIR.RTBRoute( AIGroup, Fsm )
AIGroup:F( { "AI_AIR.RTBRoute:", AIGroup:GetName() } ) AIGroup:F( { "AI_AIR.RTBRoute:", AIGroup:GetName() } )
@@ -571,7 +572,7 @@ function AI_AIR.RTBRoute( AIGroup, Fsm )
end end
--- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.RTBHold( AIGroup, Fsm ) function AI_AIR.RTBHold( AIGroup, Fsm )
AIGroup:F( { "AI_AIR.RTBHold:", AIGroup:GetName() } ) AIGroup:F( { "AI_AIR.RTBHold:", AIGroup:GetName() } )
@@ -598,7 +599,7 @@ function AI_AIR:SetRTBSpeedFactors(MinFactor,MaxFactor)
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterRTB( AIGroup, From, Event, To ) function AI_AIR:onafterRTB( AIGroup, From, Event, To )
self:F( { AIGroup, From, Event, To } ) self:F( { AIGroup, From, Event, To } )
@@ -617,7 +618,10 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
--- Calculate the target route point. --- Calculate the target route point.
local FromCoord = AIGroup:GetCoordinate() local FromCoord = AIGroup:GetCoordinate()
if not FromCoord then return end
local ToTargetCoord = self.HomeAirbase:GetCoordinate() -- coordinate is on land height(!) local ToTargetCoord = self.HomeAirbase:GetCoordinate() -- coordinate is on land height(!)
local ToTargetVec3 = ToTargetCoord:GetVec3() local ToTargetVec3 = ToTargetCoord:GetVec3()
ToTargetVec3.y = ToTargetCoord:GetLandHeight()+3000 -- let's set this 1000m/3000 feet above ground ToTargetVec3.y = ToTargetCoord:GetLandHeight()+3000 -- let's set this 1000m/3000 feet above ground
local ToTargetCoord2 = COORDINATE:NewFromVec3( ToTargetVec3 ) local ToTargetCoord2 = COORDINATE:NewFromVec3( ToTargetVec3 )
@@ -638,13 +642,13 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
local ToAirbaseCoord = ToTargetCoord2 local ToAirbaseCoord = ToTargetCoord2
if Distance < 5000 then if Distance < 5000 then
self:I( "RTB and near the airbase!" ) self:T( "RTB and near the airbase!" )
self:Home() self:Home()
return return
end end
if not AIGroup:InAir() == true then if not AIGroup:InAir() == true then
self:I( "Not anymore in the air, considered Home." ) self:T( "Not anymore in the air, considered Home." )
self:Home() self:Home()
return return
end end
@@ -686,12 +690,12 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterHome( AIGroup, From, Event, To ) function AI_AIR:onafterHome( AIGroup, From, Event, To )
self:F( { AIGroup, From, Event, To } ) self:F( { AIGroup, From, Event, To } )
self:I( "Group " .. self.Controllable:GetName() .. " ... Home! ( " .. self:GetState() .. " )" ) self:T( "Group " .. self.Controllable:GetName() .. " ... Home! ( " .. self:GetState() .. " )" )
if AIGroup and AIGroup:IsAlive() then if AIGroup and AIGroup:IsAlive() then
end end
@@ -700,15 +704,17 @@ end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterHold( AIGroup, From, Event, To, HoldTime ) function AI_AIR:onafterHold( AIGroup, From, Event, To, HoldTime )
self:F( { AIGroup, From, Event, To } ) self:F( { AIGroup, From, Event, To } )
self:I( "Group " .. self.Controllable:GetName() .. " ... Holding! ( " .. self:GetState() .. " )" ) self:T( "Group " .. self.Controllable:GetName() .. " ... Holding! ( " .. self:GetState() .. " )" )
if AIGroup and AIGroup:IsAlive() then if AIGroup and AIGroup:IsAlive() then
local OrbitTask = AIGroup:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed ) local Coordinate = AIGroup:GetCoordinate()
if Coordinate == nil then return end
local OrbitTask = AIGroup:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed, Coordinate )
local TimedOrbitTask = AIGroup:TaskControlled( OrbitTask, AIGroup:TaskCondition( nil, nil, nil, nil, HoldTime , nil ) ) local TimedOrbitTask = AIGroup:TaskControlled( OrbitTask, AIGroup:TaskCondition( nil, nil, nil, nil, HoldTime , nil ) )
local RTBTask = AIGroup:TaskFunction( "AI_AIR.RTBHold", self ) local RTBTask = AIGroup:TaskFunction( "AI_AIR.RTBHold", self )
@@ -722,17 +728,17 @@ function AI_AIR:onafterHold( AIGroup, From, Event, To, HoldTime )
end end
--- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.Resume( AIGroup, Fsm ) function AI_AIR.Resume( AIGroup, Fsm )
AIGroup:I( { "AI_AIR.Resume:", AIGroup:GetName() } ) AIGroup:T( { "AI_AIR.Resume:", AIGroup:GetName() } )
if AIGroup:IsAlive() then if AIGroup:IsAlive() then
Fsm:__RTB( Fsm.TaskDelay ) Fsm:__RTB( Fsm.TaskDelay )
end end
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterRefuel( AIGroup, From, Event, To ) function AI_AIR:onafterRefuel( AIGroup, From, Event, To )
self:F( { AIGroup, From, Event, To } ) self:F( { AIGroup, From, Event, To } )
@@ -744,7 +750,7 @@ function AI_AIR:onafterRefuel( AIGroup, From, Event, To )
if Tanker and Tanker:IsAlive() and Tanker:IsAirPlane() then if Tanker and Tanker:IsAlive() and Tanker:IsAirPlane() then
self:I( "Group " .. self.Controllable:GetName() .. " ... Refuelling! State=" .. self:GetState() .. ", Refuelling tanker " .. self.TankerName ) self:T( "Group " .. self.Controllable:GetName() .. " ... Refuelling! State=" .. self:GetState() .. ", Refuelling tanker " .. self.TankerName )
local RefuelRoute = {} local RefuelRoute = {}
@@ -798,13 +804,13 @@ end
--- @param #AI_AIR self -- @param #AI_AIR self
function AI_AIR:onafterDead() function AI_AIR:onafterDead()
self:SetStatusOff() self:SetStatusOff()
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnCrash( EventData ) function AI_AIR:OnCrash( EventData )
@@ -815,7 +821,7 @@ function AI_AIR:OnCrash( EventData )
end end
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnEjection( EventData ) function AI_AIR:OnEjection( EventData )
@@ -824,7 +830,7 @@ function AI_AIR:OnEjection( EventData )
end end
end end
--- @param #AI_AIR self -- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnPilotDead( EventData ) function AI_AIR:OnPilotDead( EventData )

View File

@@ -24,7 +24,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [AID-AIR - AI AIR Dispatching](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AID%20-%20AI%20Dispatching) -- [AI_A2A_Dispatcher](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_A2A_Dispatcher)
-- --
-- === -- ===
-- --
@@ -900,14 +900,14 @@ do -- AI_AIR_DISPATCHER
-- @type AI_AIR_DISPATCHER.DefenseCoordinates -- @type AI_AIR_DISPATCHER.DefenseCoordinates
-- @map <#string,Core.Point#COORDINATE> A list of all defense coordinates mapped per defense coordinate name. -- @map <#string,Core.Point#COORDINATE> A list of all defense coordinates mapped per defense coordinate name.
--- @field #AI_AIR_DISPATCHER.DefenseCoordinates DefenseCoordinates -- @field #AI_AIR_DISPATCHER.DefenseCoordinates DefenseCoordinates
AI_AIR_DISPATCHER.DefenseCoordinates = {} AI_AIR_DISPATCHER.DefenseCoordinates = {}
--- Enumerator for spawns at airbases --- Enumerator for spawns at airbases
-- @type AI_AIR_DISPATCHER.Takeoff -- @type AI_AIR_DISPATCHER.Takeoff
-- @extends Wrapper.Group#GROUP.Takeoff -- @extends Wrapper.Group#GROUP.Takeoff
--- @field #AI_AIR_DISPATCHER.Takeoff Takeoff -- @field #AI_AIR_DISPATCHER.Takeoff Takeoff
AI_AIR_DISPATCHER.Takeoff = GROUP.Takeoff AI_AIR_DISPATCHER.Takeoff = GROUP.Takeoff
--- Defnes Landing location. --- Defnes Landing location.
@@ -938,7 +938,7 @@ do -- AI_AIR_DISPATCHER
-- @type AI_AIR_DISPATCHER.DefenseQueue -- @type AI_AIR_DISPATCHER.DefenseQueue
-- @list<#AI_AIR_DISPATCHER.DefenseQueueItem> DefenseQueueItem A list of all defenses being queued ... -- @list<#AI_AIR_DISPATCHER.DefenseQueueItem> DefenseQueueItem A list of all defenses being queued ...
--- @field #AI_AIR_DISPATCHER.DefenseQueue DefenseQueue -- @field #AI_AIR_DISPATCHER.DefenseQueue DefenseQueue
AI_AIR_DISPATCHER.DefenseQueue = {} AI_AIR_DISPATCHER.DefenseQueue = {}
--- Defense approach types --- Defense approach types
@@ -1130,7 +1130,7 @@ do -- AI_AIR_DISPATCHER
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:onafterStart( From, Event, To ) function AI_AIR_DISPATCHER:onafterStart( From, Event, To )
self:GetParent( self ).onafterStart( self, From, Event, To ) self:GetParent( self ).onafterStart( self, From, Event, To )
@@ -1141,7 +1141,7 @@ do -- AI_AIR_DISPATCHER
for Resource = 1, DefenderSquadron.ResourceCount or 0 do for Resource = 1, DefenderSquadron.ResourceCount or 0 do
self:ResourcePark( DefenderSquadron ) self:ResourcePark( DefenderSquadron )
end end
self:I( "Parked resources for squadron " .. DefenderSquadron.Name ) self:T( "Parked resources for squadron " .. DefenderSquadron.Name )
end end
end end
@@ -1194,7 +1194,7 @@ do -- AI_AIR_DISPATCHER
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:ResourcePark( DefenderSquadron ) function AI_AIR_DISPATCHER:ResourcePark( DefenderSquadron )
local TemplateID = math.random( 1, #DefenderSquadron.Spawn ) local TemplateID = math.random( 1, #DefenderSquadron.Spawn )
local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN
@@ -1211,31 +1211,31 @@ do -- AI_AIR_DISPATCHER
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventBaseCaptured( EventData ) function AI_AIR_DISPATCHER:OnEventBaseCaptured( EventData )
local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured. local AirbaseName = EventData.PlaceName -- The name of the airbase that was captured.
self:I( "Captured " .. AirbaseName ) self:T( "Captured " .. AirbaseName )
-- Now search for all squadrons located at the airbase, and sanitize them. -- Now search for all squadrons located at the airbase, and sanitize them.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning. Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." ) self:T( "Squadron " .. SquadronName .. " captured." )
end end
end end
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventCrashOrDead( EventData ) function AI_AIR_DISPATCHER:OnEventCrashOrDead( EventData )
self.Detection:ForgetDetectedUnit( EventData.IniUnitName ) self.Detection:ForgetDetectedUnit( EventData.IniUnitName )
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventLand( EventData ) function AI_AIR_DISPATCHER:OnEventLand( EventData )
self:F( "Landed" ) self:F( "Landed" )
@@ -1252,7 +1252,7 @@ do -- AI_AIR_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender ) self:RemoveDefenderFromSquadron( Squadron, Defender )
end end
DefenderUnit:Destroy() DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender ) self:ResourcePark( Squadron )
return return
end end
if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then
@@ -1263,7 +1263,7 @@ do -- AI_AIR_DISPATCHER
end end
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventEngineShutdown( EventData ) function AI_AIR_DISPATCHER:OnEventEngineShutdown( EventData )
local DefenderUnit = EventData.IniUnit local DefenderUnit = EventData.IniUnit
@@ -1279,31 +1279,31 @@ do -- AI_AIR_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender ) self:RemoveDefenderFromSquadron( Squadron, Defender )
end end
DefenderUnit:Destroy() DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender ) self:ResourcePark( Squadron )
end end
end end
end end
do -- Manage the defensive behaviour do -- Manage the defensive behaviour
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param #string DefenseCoordinateName The name of the coordinate to be defended by AIR defenses. -- @param #string DefenseCoordinateName The name of the coordinate to be defended by AIR defenses.
-- @param Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by AIR defenses. -- @param Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by AIR defenses.
function AI_AIR_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate ) function AI_AIR_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate )
self.DefenseCoordinates[DefenseCoordinateName] = DefenseCoordinate self.DefenseCoordinates[DefenseCoordinateName] = DefenseCoordinate
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityLow() function AI_AIR_DISPATCHER:SetDefenseReactivityLow()
self.DefenseReactivity = 0.05 self.DefenseReactivity = 0.05
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityMedium() function AI_AIR_DISPATCHER:SetDefenseReactivityMedium()
self.DefenseReactivity = 0.15 self.DefenseReactivity = 0.15
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityHigh() function AI_AIR_DISPATCHER:SetDefenseReactivityHigh()
self.DefenseReactivity = 0.5 self.DefenseReactivity = 0.5
end end
@@ -1867,7 +1867,7 @@ do -- AI_AIR_DISPATCHER
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps. -- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps.
-- @usage -- @usage
@@ -2769,7 +2769,7 @@ do -- AI_AIR_DISPATCHER
-- TODO: Need to model the resources in a squadron. -- TODO: Need to model the resources in a squadron.
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param AI.AI_Air_Squadron#AI_AIR_SQUADRON Squadron -- @param AI.AI_Air_Squadron#AI_AIR_SQUADRON Squadron
function AI_AIR_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size ) function AI_AIR_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
self.Defenders = self.Defenders or {} self.Defenders = self.Defenders or {}
@@ -2782,7 +2782,7 @@ do -- AI_AIR_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } ) self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } )
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param AI.AI_Air_Squadron#AI_AIR_SQUADRON Squadron -- @param AI.AI_Air_Squadron#AI_AIR_SQUADRON Squadron
function AI_AIR_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender ) function AI_AIR_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender )
self.Defenders = self.Defenders or {} self.Defenders = self.Defenders or {}
@@ -2795,7 +2795,7 @@ do -- AI_AIR_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = SquadronResourceCount } ) self:F( { DefenderName = DefenderName, SquadronResourceCount = SquadronResourceCount } )
end end
--- @param #AI_AIR_DISPATCHER self -- @param #AI_AIR_DISPATCHER self
-- @param Wrapper.Group#GROUP Defender -- @param Wrapper.Group#GROUP Defender
-- @return AI.AI_Air_Squadron#AI_AIR_SQUADRON The Squadron. -- @return AI.AI_Air_Squadron#AI_AIR_SQUADRON The Squadron.
function AI_AIR_DISPATCHER:GetSquadronFromDefender( Defender ) function AI_AIR_DISPATCHER:GetSquadronFromDefender( Defender )

View File

@@ -13,8 +13,8 @@
--- @type AI_AIR_ENGAGE -- @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. --- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
@@ -351,7 +351,7 @@ function AI_AIR_ENGAGE:onafterAbort( AIGroup, From, Event, To )
end end
--- @param #AI_AIR_ENGAGE self -- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM. -- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -361,7 +361,7 @@ function AI_AIR_ENGAGE:onafterAccomplish( AIGroup, From, Event, To )
--self:SetDetectionOff() --self:SetDetectionOff()
end end
--- @param #AI_AIR_ENGAGE self -- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM. -- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -374,7 +374,7 @@ function AI_AIR_ENGAGE:onafterDestroy( AIGroup, From, Event, To, EventData )
end end
end end
--- @param #AI_AIR_ENGAGE self -- @param #AI_AIR_ENGAGE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_AIR_ENGAGE:OnEventDead( EventData ) function AI_AIR_ENGAGE:OnEventDead( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )
@@ -387,9 +387,9 @@ function AI_AIR_ENGAGE:OnEventDead( EventData )
end end
--- @param Wrapper.Group#GROUP AIControllable -- @param Wrapper.Group#GROUP AIControllable
function AI_AIR_ENGAGE.___EngageRoute( AIGroup, Fsm, AttackSetUnit ) function AI_AIR_ENGAGE.___EngageRoute( AIGroup, Fsm, AttackSetUnit )
Fsm:I(string.format("AI_AIR_ENGAGE.___EngageRoute: %s", tostring(AIGroup:GetName()))) Fsm:T(string.format("AI_AIR_ENGAGE.___EngageRoute: %s", tostring(AIGroup:GetName())))
if AIGroup and AIGroup:IsAlive() then if AIGroup and AIGroup:IsAlive() then
Fsm:__EngageRoute( Fsm.TaskDelay or 0.1, AttackSetUnit ) Fsm:__EngageRoute( Fsm.TaskDelay or 0.1, AttackSetUnit )
@@ -397,14 +397,14 @@ function AI_AIR_ENGAGE.___EngageRoute( AIGroup, Fsm, AttackSetUnit )
end end
--- @param #AI_AIR_ENGAGE self -- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM. -- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
-- @param #string To The To State string. -- @param #string To The To State string.
-- @param Core.Set#SET_UNIT AttackSetUnit Unit set to be attacked. -- @param Core.Set#SET_UNIT AttackSetUnit Unit set to be attacked.
function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, AttackSetUnit ) function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, AttackSetUnit )
self:I( { DefenderGroup, From, Event, To, AttackSetUnit } ) self:T( { DefenderGroup, From, Event, To, AttackSetUnit } )
local DefenderGroupName = DefenderGroup:GetName() local DefenderGroupName = DefenderGroup:GetName()
@@ -426,7 +426,13 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
local DefenderCoord = DefenderGroup:GetPointVec3() local DefenderCoord = DefenderGroup:GetPointVec3()
DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude. DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
local TargetCoord = AttackSetUnit:GetFirst():GetPointVec3() local TargetCoord = AttackSetUnit:GetRandomSurely():GetPointVec3()
if TargetCoord == nil then
self:Return()
return
end
TargetCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude. TargetCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
local TargetDistance = DefenderCoord:Get2DDistance( TargetCoord ) local TargetDistance = DefenderCoord:Get2DDistance( TargetCoord )
@@ -435,12 +441,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! -- TODO: A factor of * 3 is way too close. This causes the AI not to engange until merged sometimes!
if TargetDistance <= EngageDistance * 9 then if TargetDistance <= EngageDistance * 9 then
--self:I(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000)) --self:T(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000))
self:__Engage( 0.1, AttackSetUnit ) self:__Engage( 0.1, AttackSetUnit )
else else
--self:I(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000)) --self:T(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000))
local EngageRoute = {} local EngageRoute = {}
local AttackTasks = {} local AttackTasks = {}
@@ -472,16 +478,16 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
end end
else else
-- TODO: This will make an A2A Dispatcher CAP flight to return rather than going back to patrolling! -- TODO: This will make an A2A Dispatcher CAP flight to return rather than going back to patrolling!
self:I( DefenderGroupName .. ": No targets found -> Going RTB") self:T( DefenderGroupName .. ": No targets found -> Going RTB")
self:Return() self:Return()
end end
end end
--- @param Wrapper.Group#GROUP AIControllable -- @param Wrapper.Group#GROUP AIControllable
function AI_AIR_ENGAGE.___Engage( AIGroup, Fsm, AttackSetUnit ) function AI_AIR_ENGAGE.___Engage( AIGroup, Fsm, AttackSetUnit )
Fsm:I(string.format("AI_AIR_ENGAGE.___Engage: %s", tostring(AIGroup:GetName()))) Fsm:T(string.format("AI_AIR_ENGAGE.___Engage: %s", tostring(AIGroup:GetName())))
if AIGroup and AIGroup:IsAlive() then if AIGroup and AIGroup:IsAlive() then
local delay=Fsm.TaskDelay or 0.1 local delay=Fsm.TaskDelay or 0.1
@@ -490,7 +496,7 @@ function AI_AIR_ENGAGE.___Engage( AIGroup, Fsm, AttackSetUnit )
end end
--- @param #AI_AIR_ENGAGE self -- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM. -- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -516,7 +522,7 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
local DefenderCoord = DefenderGroup:GetPointVec3() local DefenderCoord = DefenderGroup:GetPointVec3()
DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude. DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
local TargetCoord = AttackSetUnit:GetFirst():GetPointVec3() local TargetCoord = AttackSetUnit:GetRandomSurely():GetPointVec3()
if not TargetCoord then if not TargetCoord then
self:Return() self:Return()
return return
@@ -547,12 +553,12 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
local AttackUnitTasks = self:CreateAttackUnitTasks( AttackSetUnit, DefenderGroup, EngageAltitude ) -- Polymorphic local AttackUnitTasks = self:CreateAttackUnitTasks( AttackSetUnit, DefenderGroup, EngageAltitude ) -- Polymorphic
if #AttackUnitTasks == 0 then if #AttackUnitTasks == 0 then
self:I( DefenderGroupName .. ": No valid targets found -> Going RTB") self:T( DefenderGroupName .. ": No valid targets found -> Going RTB")
self:Return() self:Return()
return return
else else
local text=string.format("%s: Engaging targets at distance %.2f NM", DefenderGroupName, UTILS.MetersToNM(TargetDistance)) local text=string.format("%s: Engaging targets at distance %.2f NM", DefenderGroupName, UTILS.MetersToNM(TargetDistance))
self:I(text) self:T(text)
DefenderGroup:OptionROEOpenFire() DefenderGroup:OptionROEOpenFire()
DefenderGroup:OptionROTEvadeFire() DefenderGroup:OptionROTEvadeFire()
DefenderGroup:OptionKeepWeaponsOnThreat() DefenderGroup:OptionKeepWeaponsOnThreat()
@@ -569,13 +575,13 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
end end
else else
-- TODO: This will make an A2A Dispatcher CAP flight to return rather than going back to patrolling! -- TODO: This will make an A2A Dispatcher CAP flight to return rather than going back to patrolling!
self:I( DefenderGroupName .. ": No targets found -> returning.") self:T( DefenderGroupName .. ": No targets found -> returning.")
self:Return() self:Return()
return return
end end
end end
--- @param Wrapper.Group#GROUP AIEngage -- @param Wrapper.Group#GROUP AIEngage
function AI_AIR_ENGAGE.Resume( AIEngage, Fsm ) function AI_AIR_ENGAGE.Resume( AIEngage, Fsm )
AIEngage:F( { "Resume:", AIEngage:GetName() } ) AIEngage:F( { "Resume:", AIEngage:GetName() } )

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Air_Patrol -- @module AI.AI_Air_Patrol
-- @image AI_Air_To_Ground_Patrol.JPG -- @image AI_Air_To_Ground_Patrol.JPG
--- @type AI_AIR_PATROL -- @type AI_AIR_PATROL
-- @extends AI.AI_Air#AI_AIR -- @extends AI.AI_Air#AI_AIR
--- The AI_AIR_PATROL class implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} --- The AI_AIR_PATROL class implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group}

View File

@@ -13,7 +13,7 @@
--- @type AI_AIR_SQUADRON -- @type AI_AIR_SQUADRON
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
@@ -38,7 +38,7 @@ AI_AIR_SQUADRON = {
-- @return #AI_AIR_SQUADRON -- @return #AI_AIR_SQUADRON
function AI_AIR_SQUADRON:New( SquadronName, AirbaseName, TemplatePrefixes, ResourceCount ) function AI_AIR_SQUADRON:New( SquadronName, AirbaseName, TemplatePrefixes, ResourceCount )
self:I( { Air_Squadron = { SquadronName, AirbaseName, TemplatePrefixes, ResourceCount } } ) self:T( { Air_Squadron = { SquadronName, AirbaseName, TemplatePrefixes, ResourceCount } } )
local AI_Air_Squadron = BASE:New() -- #AI_AIR_SQUADRON local AI_Air_Squadron = BASE:New() -- #AI_AIR_SQUADRON

View File

@@ -11,7 +11,7 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/BAI%20-%20Battlefield%20Air%20Interdiction) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_BAI)
-- --
-- === -- ===
-- --
@@ -408,7 +408,7 @@ function AI_BAI_ZONE:onafterStart( Controllable, From, Event, To )
self:SetDetectionDeactivated() -- When not engaging, set the detection off. self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable -- @param Wrapper.Controllable#CONTROLLABLE AIControllable
function _NewEngageRoute( AIControllable ) function _NewEngageRoute( AIControllable )
AIControllable:T( "NewEngageRoute" ) AIControllable:T( "NewEngageRoute" )
@@ -417,7 +417,7 @@ function _NewEngageRoute( AIControllable )
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -429,7 +429,7 @@ function AI_BAI_ZONE:onbeforeEngage( Controllable, From, Event, To )
end end
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -478,7 +478,7 @@ function AI_BAI_ZONE:onafterTarget( Controllable, From, Event, To )
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -488,7 +488,7 @@ function AI_BAI_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 ) self:__Route( 1 )
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -612,7 +612,7 @@ function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To,
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -623,7 +623,7 @@ function AI_BAI_ZONE:onafterAccomplish( Controllable, From, Event, To )
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -637,7 +637,7 @@ function AI_BAI_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end end
--- @param #AI_BAI_ZONE self -- @param #AI_BAI_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_BAI_ZONE:OnEventDead( EventData ) function AI_BAI_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )

View File

@@ -9,7 +9,7 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AIB%20-%20AI%20Balancing) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Balancer)
-- --
-- === -- ===
-- --
@@ -27,7 +27,7 @@
-- @module AI.AI_Balancer -- @module AI.AI_Balancer
-- @image AI_Balancing.JPG -- @image AI_Balancing.JPG
--- @type AI_BALANCER -- @type AI_BALANCER
-- @field Core.Set#SET_CLIENT SetClient -- @field Core.Set#SET_CLIENT SetClient
-- @field Core.Spawn#SPAWN SpawnAI -- @field Core.Spawn#SPAWN SpawnAI
-- @field Wrapper.Group#GROUP Test -- @field Wrapper.Group#GROUP Test
@@ -168,7 +168,8 @@ function AI_BALANCER:ReturnToHomeAirbase( ReturnThresholdRange )
self.ReturnThresholdRange = ReturnThresholdRange self.ReturnThresholdRange = ReturnThresholdRange
end end
--- @param #AI_BALANCER self --- AI_BALANCER:onenterSpawning
-- @param #AI_BALANCER self
-- @param Core.Set#SET_GROUP SetGroup -- @param Core.Set#SET_GROUP SetGroup
-- @param #string ClientName -- @param #string ClientName
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
@@ -190,7 +191,8 @@ function AI_BALANCER:onenterSpawning( SetGroup, From, Event, To, ClientName )
end end
end end
--- @param #AI_BALANCER self --- AI_BALANCER:onenterDestroying
-- @param #AI_BALANCER self
-- @param Core.Set#SET_GROUP SetGroup -- @param Core.Set#SET_GROUP SetGroup
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, ClientName, AIGroup ) function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, ClientName, AIGroup )
@@ -233,15 +235,16 @@ function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup )
end end
--- AI_BALANCER:onenterMonitoring
--- @param #AI_BALANCER self -- @param #AI_BALANCER self
function AI_BALANCER:onenterMonitoring( SetGroup ) function AI_BALANCER:onenterMonitoring( SetGroup )
self:T2( { self.SetClient:Count() } ) self:T2( { self.SetClient:Count() } )
--self.SetClient:Flush() --self.SetClient:Flush()
self.SetClient:ForEachClient( self.SetClient:ForEachClient(
--- @param Wrapper.Client#CLIENT Client --- SetClient:ForEachClient
-- @param Wrapper.Client#CLIENT Client
function( Client ) function( Client )
self:T3(Client.ClientName) self:T3(Client.ClientName)
@@ -264,7 +267,8 @@ function AI_BALANCER:onenterMonitoring( SetGroup )
self:T2( RangeZone ) self:T2( RangeZone )
_DATABASE:ForEachPlayerUnit( _DATABASE:ForEachPlayerUnit(
--- @param Wrapper.Unit#UNIT RangeTestUnit --- Nameless function
-- @param Wrapper.Unit#UNIT RangeTestUnit
function( RangeTestUnit, RangeZone, AIGroup, PlayerInRange ) function( RangeTestUnit, RangeZone, AIGroup, PlayerInRange )
self:T2( { PlayerInRange, RangeTestUnit.UnitName, RangeZone.ZoneName } ) self:T2( { PlayerInRange, RangeTestUnit.UnitName, RangeZone.ZoneName } )
if RangeTestUnit:IsInZone( RangeZone ) == true then if RangeTestUnit:IsInZone( RangeZone ) == true then
@@ -276,7 +280,8 @@ function AI_BALANCER:onenterMonitoring( SetGroup )
end end
end, end,
--- @param Core.Zone#ZONE_RADIUS RangeZone --- Nameless function
-- @param Core.Zone#ZONE_RADIUS RangeZone
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function( RangeZone, AIGroup, PlayerInRange ) function( RangeZone, AIGroup, PlayerInRange )
if PlayerInRange.Value == false then if PlayerInRange.Value == false then
@@ -307,6 +312,3 @@ function AI_BALANCER:onenterMonitoring( SetGroup )
self:__Monitor( 10 ) self:__Monitor( 10 )
end end

View File

@@ -9,7 +9,7 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAP%20-%20Combat%20Air%20Patrol) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_CAP)
-- --
-- === -- ===
-- --
@@ -31,7 +31,7 @@
-- @module AI.AI_CAP -- @module AI.AI_CAP
-- @image AI_Combat_Air_Patrol.JPG -- @image AI_Combat_Air_Patrol.JPG
--- @type AI_CAP_ZONE -- @type AI_CAP_ZONE
-- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Wrapper.Controllable} patrolling. -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Wrapper.Controllable} patrolling.
-- @field Core.Zone#ZONE_BASE TargetZone The @{Core.Zone} where the patrol needs to be executed. -- @field Core.Zone#ZONE_BASE TargetZone The @{Core.Zone} where the patrol needs to be executed.
-- @extends AI.AI_Patrol#AI_PATROL_ZONE -- @extends AI.AI_Patrol#AI_PATROL_ZONE
@@ -344,7 +344,7 @@ function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To )
end end
--- @param AI.AI_CAP#AI_CAP_ZONE -- @param AI.AI_CAP#AI_CAP_ZONE
-- @param Wrapper.Group#GROUP EngageGroup -- @param Wrapper.Group#GROUP EngageGroup
function AI_CAP_ZONE.EngageRoute( EngageGroup, Fsm ) function AI_CAP_ZONE.EngageRoute( EngageGroup, Fsm )
@@ -355,7 +355,7 @@ function AI_CAP_ZONE.EngageRoute( EngageGroup, Fsm )
end end
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -367,7 +367,7 @@ function AI_CAP_ZONE:onbeforeEngage( Controllable, From, Event, To )
end end
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -395,7 +395,7 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
end end
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -405,7 +405,7 @@ function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 ) self:__Route( 1 )
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -505,7 +505,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
end end
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -515,7 +515,7 @@ function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To )
self:SetDetectionOff() self:SetDetectionOff()
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -528,7 +528,7 @@ function AI_CAP_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end end
end end
--- @param #AI_CAP_ZONE self -- @param #AI_CAP_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_CAP_ZONE:OnEventDead( EventData ) function AI_CAP_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )

View File

@@ -11,7 +11,7 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAS%20-%20Close%20Air%20Support) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_CAS)
-- --
-- === -- ===
-- --
@@ -363,7 +363,7 @@ function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To )
self:SetDetectionDeactivated() -- When not engaging, set the detection off. self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end end
--- @param AI.AI_CAS#AI_CAS_ZONE -- @param AI.AI_CAS#AI_CAS_ZONE
-- @param Wrapper.Group#GROUP EngageGroup -- @param Wrapper.Group#GROUP EngageGroup
function AI_CAS_ZONE.EngageRoute( EngageGroup, Fsm ) function AI_CAS_ZONE.EngageRoute( EngageGroup, Fsm )
@@ -375,7 +375,7 @@ function AI_CAS_ZONE.EngageRoute( EngageGroup, Fsm )
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -387,7 +387,7 @@ function AI_CAS_ZONE:onbeforeEngage( Controllable, From, Event, To )
end end
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -420,7 +420,7 @@ function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -430,7 +430,7 @@ function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 ) self:__Route( 1 )
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -530,7 +530,7 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To,
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -541,7 +541,7 @@ function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To )
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
@@ -555,7 +555,7 @@ function AI_CAS_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end end
--- @param #AI_CAS_ZONE self -- @param #AI_CAS_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_CAS_ZONE:OnEventDead( EventData ) function AI_CAS_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo -- @module AI.AI_Cargo
-- @image Cargo.JPG -- @image Cargo.JPG
--- @type AI_CARGO -- @type AI_CARGO
-- @extends Core.Fsm#FSM_CONTROLLABLE -- @extends Core.Fsm#FSM_CONTROLLABLE
@@ -547,7 +547,7 @@ function AI_CARGO:onafterUnloaded( Carrier, From, Event, To, Cargo, CarrierUnit,
for _, CarrierUnit in pairs( Carrier:GetUnits() ) do for _, CarrierUnit in pairs( Carrier:GetUnits() ) do
local CarrierUnit = CarrierUnit -- Wrapper.Unit#UNIT local CarrierUnit = CarrierUnit -- Wrapper.Unit#UNIT
local IsEmpty = CarrierUnit:IsCargoEmpty() local IsEmpty = CarrierUnit:IsCargoEmpty()
self:I({ IsEmpty = IsEmpty }) self:T({ IsEmpty = IsEmpty })
if not IsEmpty then if not IsEmpty then
AllUnloaded = false AllUnloaded = false
break break

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_APC -- @module AI.AI_Cargo_APC
-- @image AI_Cargo_Dispatching_For_APC.JPG -- @image AI_Cargo_Dispatching_For_APC.JPG
--- @type AI_CARGO_APC -- @type AI_CARGO_APC
-- @extends AI.AI_Cargo#AI_CARGO -- @extends AI.AI_Cargo#AI_CARGO

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_Airplane -- @module AI.AI_Cargo_Airplane
-- @image AI_Cargo_Dispatching_For_Airplanes.JPG -- @image AI_Cargo_Dispatching_For_Airplanes.JPG
--- @type AI_CARGO_AIRPLANE -- @type AI_CARGO_AIRPLANE
-- @extends Core.Fsm#FSM_CONTROLLABLE -- @extends Core.Fsm#FSM_CONTROLLABLE

View File

@@ -18,7 +18,7 @@
-- --
-- Test missions can be located on the main GITHUB site. -- Test missions can be located on the main GITHUB site.
-- --
-- [FlightControl-Master/MOOSE_MISSIONS/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/AID%20-%20AI%20Dispatching/AID-CGO%20-%20AI%20Cargo%20Dispatching) -- [FlightControl-Master/MOOSE_MISSIONS/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Cargo_Dispatcher)
-- --
-- === -- ===
-- --
@@ -116,7 +116,7 @@
-- @image AI_Cargo_Dispatcher.JPG -- @image AI_Cargo_Dispatcher.JPG
--- @type AI_CARGO_DISPATCHER -- @type AI_CARGO_DISPATCHER
-- @field Core.Set#SET_GROUP CarrierSet The set of @{Wrapper.Group#GROUP} objects of carriers that will transport the cargo. -- @field Core.Set#SET_GROUP CarrierSet The set of @{Wrapper.Group#GROUP} objects of carriers that will transport the cargo.
-- @field Core.Set#SET_CARGO CargoSet The set of @{Cargo.Cargo#CARGO} objects, which can be CARGO_GROUP, CARGO_CRATE, CARGO_SLINGLOAD objects. -- @field Core.Set#SET_CARGO CargoSet The set of @{Cargo.Cargo#CARGO} objects, which can be CARGO_GROUP, CARGO_CRATE, CARGO_SLINGLOAD objects.
-- @field Core.Zone#SET_ZONE PickupZoneSet The set of pickup zones, which are used to where the cargo can be picked up by the carriers. If nil, then cargo can be picked up everywhere. -- @field Core.Zone#SET_ZONE PickupZoneSet The set of pickup zones, which are used to where the cargo can be picked up by the carriers. If nil, then cargo can be picked up everywhere.
@@ -583,10 +583,12 @@ AI_CARGO_DISPATCHER = {
PickupCargo = {} PickupCargo = {}
} }
--- @field #list --- List of AI_Cargo
-- @field #list
AI_CARGO_DISPATCHER.AI_Cargo = {} AI_CARGO_DISPATCHER.AI_Cargo = {}
--- @field #list --- List of PickupCargo
-- @field #list
AI_CARGO_DISPATCHER.PickupCargo = {} AI_CARGO_DISPATCHER.PickupCargo = {}
@@ -1159,7 +1161,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
else else
local text=string.format("WARNING: Cargo %s is too heavy to be loaded into transport. Cargo weight %.1f > %.1f load capacity of carrier %s.", local text=string.format("WARNING: Cargo %s is too heavy to be loaded into transport. Cargo weight %.1f > %.1f load capacity of carrier %s.",
tostring(Cargo:GetName()), Cargo:GetWeight(), LargestLoadCapacity, tostring(Carrier:GetName())) tostring(Cargo:GetName()), Cargo:GetWeight(), LargestLoadCapacity, tostring(Carrier:GetName()))
self:I(text) self:T(text)
end end
end end
end end

View File

@@ -30,7 +30,7 @@
-- @module AI.AI_Cargo_Dispatcher_APC -- @module AI.AI_Cargo_Dispatcher_APC
-- @image AI_Cargo_Dispatching_For_APC.JPG -- @image AI_Cargo_Dispatching_For_APC.JPG
--- @type AI_CARGO_DISPATCHER_APC -- @type AI_CARGO_DISPATCHER_APC
-- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER -- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER

View File

@@ -24,7 +24,7 @@
-- @image AI_Cargo_Dispatching_For_Airplanes.JPG -- @image AI_Cargo_Dispatching_For_Airplanes.JPG
--- @type AI_CARGO_DISPATCHER_AIRPLANE -- @type AI_CARGO_DISPATCHER_AIRPLANE
-- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER -- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER

View File

@@ -25,7 +25,7 @@
-- @module AI.AI_Cargo_Dispatcher_Helicopter -- @module AI.AI_Cargo_Dispatcher_Helicopter
-- @image AI_Cargo_Dispatching_For_Helicopters.JPG -- @image AI_Cargo_Dispatching_For_Helicopters.JPG
--- @type AI_CARGO_DISPATCHER_HELICOPTER -- @type AI_CARGO_DISPATCHER_HELICOPTER
-- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER -- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER

View File

@@ -23,7 +23,7 @@
-- @module AI.AI_Cargo_Dispatcher_Ship -- @module AI.AI_Cargo_Dispatcher_Ship
-- @image AI_Cargo_Dispatcher.JPG -- @image AI_Cargo_Dispatcher.JPG
--- @type AI_CARGO_DISPATCHER_SHIP -- @type AI_CARGO_DISPATCHER_SHIP
-- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER -- @extends AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER
@@ -160,7 +160,7 @@ AI_CARGO_DISPATCHER_SHIP = {
-- local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() -- local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart()
-- local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() -- local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart()
-- NEED MORE THOUGHT - ShippingLane is part of Warehouse....... -- NEED MORE THOUGHT - ShippingLane is part of Warehouse.......
-- local ShippingLane = GROUP:New():FilterPrefixes( "ShippingLane" ):FilterStart() -- local ShippingLane = SET_GROUP:New():FilterPrefixes( "ShippingLane" ):FilterOnce():GetSetObjects()
-- --
-- AICargoDispatcherShip = AI_CARGO_DISPATCHER_SHIP:New( SetShip, SetCargoInfantry, SetPickupZones, SetDeployZones, ShippingLane ) -- AICargoDispatcherShip = AI_CARGO_DISPATCHER_SHIP:New( SetShip, SetCargoInfantry, SetPickupZones, SetDeployZones, ShippingLane )
-- AICargoDispatcherShip:Start() -- AICargoDispatcherShip:Start()

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_Helicopter -- @module AI.AI_Cargo_Helicopter
-- @image AI_Cargo_Dispatching_For_Helicopters.JPG -- @image AI_Cargo_Dispatching_For_Helicopters.JPG
--- @type AI_CARGO_HELICOPTER -- @type AI_CARGO_HELICOPTER
-- @extends Core.Fsm#FSM_CONTROLLABLE -- @extends Core.Fsm#FSM_CONTROLLABLE
@@ -287,7 +287,7 @@ function AI_CARGO_HELICOPTER:SetLandingSpeedAndHeight(speed, height)
return self return self
end end
--- @param #AI_CARGO_HELICOPTER self -- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter -- @param Wrapper.Group#GROUP Helicopter
-- @param From -- @param From
-- @param Event -- @param Event
@@ -326,7 +326,7 @@ function AI_CARGO_HELICOPTER:onafterLanded( Helicopter, From, Event, To )
end end
--- @param #AI_CARGO_HELICOPTER self -- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter -- @param Wrapper.Group#GROUP Helicopter
-- @param From -- @param From
-- @param Event -- @param Event
@@ -409,7 +409,7 @@ function AI_CARGO_HELICOPTER:onafterQueue( Helicopter, From, Event, To, Coordina
end end
--- @param #AI_CARGO_HELICOPTER self -- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter -- @param Wrapper.Group#GROUP Helicopter
-- @param From -- @param From
-- @param Event -- @param Event

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_Ship -- @module AI.AI_Cargo_Ship
-- @image AI_Cargo_Dispatcher.JPG -- @image AI_Cargo_Dispatcher.JPG
--- @type AI_CARGO_SHIP -- @type AI_CARGO_SHIP
-- @extends AI.AI_Cargo#AI_CARGO -- @extends AI.AI_Cargo#AI_CARGO
--- Brings a dynamic cargo handling capability for an AI naval group. --- Brings a dynamic cargo handling capability for an AI naval group.

View File

@@ -19,7 +19,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ESC%20-%20Escorting) -- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Escort)
-- --
-- === -- ===
-- --
@@ -556,7 +556,7 @@ function AI_ESCORT:SetFlightMenuFormation( Formation )
if MenuFormation then if MenuFormation then
local Arguments = MenuFormation.Arguments local Arguments = MenuFormation.Arguments
--self:I({Arguments=unpack(Arguments)}) --self:T({Arguments=unpack(Arguments)})
local FlightMenuFormation = MENU_GROUP:New( self.PlayerGroup, "Formation", self.MainMenu ) local FlightMenuFormation = MENU_GROUP:New( self.PlayerGroup, "Formation", self.MainMenu )
local MenuFlightFormationID = MENU_GROUP_COMMAND:New( self.PlayerGroup, Formation, FlightMenuFormation, local MenuFlightFormationID = MENU_GROUP_COMMAND:New( self.PlayerGroup, Formation, FlightMenuFormation,
function ( self, Formation, ... ) function ( self, Formation, ... )

View File

@@ -15,7 +15,7 @@
-- @image MOOSE.JPG -- @image MOOSE.JPG
--- @type AI_ESCORT_DISPATCHER -- @type AI_ESCORT_DISPATCHER
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
@@ -33,7 +33,7 @@ AI_ESCORT_DISPATCHER = {
ClassName = "AI_ESCORT_DISPATCHER", ClassName = "AI_ESCORT_DISPATCHER",
} }
--- @field #list -- @field #list
AI_ESCORT_DISPATCHER.AI_Escorts = {} AI_ESCORT_DISPATCHER.AI_Escorts = {}
@@ -102,7 +102,7 @@ function AI_ESCORT_DISPATCHER:onafterStart( From, Event, To )
end end
--- @param #AI_ESCORT_DISPATCHER self -- @param #AI_ESCORT_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_ESCORT_DISPATCHER:OnEventExit( EventData ) function AI_ESCORT_DISPATCHER:OnEventExit( EventData )
@@ -110,11 +110,11 @@ function AI_ESCORT_DISPATCHER:OnEventExit( EventData )
local PlayerGroup = EventData.IniGroup local PlayerGroup = EventData.IniGroup
local PlayerUnit = EventData.IniUnit local PlayerUnit = EventData.IniUnit
self:I({EscortAirbase= self.EscortAirbase } ) self:T({EscortAirbase= self.EscortAirbase } )
self:I({PlayerGroupName = PlayerGroupName } ) self:T({PlayerGroupName = PlayerGroupName } )
self:I({PlayerGroup = PlayerGroup}) self:T({PlayerGroup = PlayerGroup})
self:I({FirstGroup = self.CarrierSet:GetFirst()}) self:T({FirstGroup = self.CarrierSet:GetFirst()})
self:I({FindGroup = self.CarrierSet:FindGroup( PlayerGroupName )}) self:T({FindGroup = self.CarrierSet:FindGroup( PlayerGroupName )})
if self.CarrierSet:FindGroup( PlayerGroupName ) then if self.CarrierSet:FindGroup( PlayerGroupName ) then
if self.AI_Escorts[PlayerGroupName] then if self.AI_Escorts[PlayerGroupName] then
@@ -125,7 +125,7 @@ function AI_ESCORT_DISPATCHER:OnEventExit( EventData )
end end
--- @param #AI_ESCORT_DISPATCHER self -- @param #AI_ESCORT_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_ESCORT_DISPATCHER:OnEventBirth( EventData ) function AI_ESCORT_DISPATCHER:OnEventBirth( EventData )
@@ -133,17 +133,17 @@ function AI_ESCORT_DISPATCHER:OnEventBirth( EventData )
local PlayerGroup = EventData.IniGroup local PlayerGroup = EventData.IniGroup
local PlayerUnit = EventData.IniUnit local PlayerUnit = EventData.IniUnit
self:I({EscortAirbase= self.EscortAirbase } ) self:T({EscortAirbase= self.EscortAirbase } )
self:I({PlayerGroupName = PlayerGroupName } ) self:T({PlayerGroupName = PlayerGroupName } )
self:I({PlayerGroup = PlayerGroup}) self:T({PlayerGroup = PlayerGroup})
self:I({FirstGroup = self.CarrierSet:GetFirst()}) self:T({FirstGroup = self.CarrierSet:GetFirst()})
self:I({FindGroup = self.CarrierSet:FindGroup( PlayerGroupName )}) self:T({FindGroup = self.CarrierSet:FindGroup( PlayerGroupName )})
if self.CarrierSet:FindGroup( PlayerGroupName ) then if self.CarrierSet:FindGroup( PlayerGroupName ) then
if not self.AI_Escorts[PlayerGroupName] then if not self.AI_Escorts[PlayerGroupName] then
local LeaderUnit = PlayerUnit local LeaderUnit = PlayerUnit
local EscortGroup = self.EscortSpawn:SpawnAtAirbase( self.EscortAirbase, SPAWN.Takeoff.Hot ) local EscortGroup = self.EscortSpawn:SpawnAtAirbase( self.EscortAirbase, SPAWN.Takeoff.Hot )
self:I({EscortGroup = EscortGroup}) self:T({EscortGroup = EscortGroup})
self:ScheduleOnce( 1, self:ScheduleOnce( 1,
function( EscortGroup ) function( EscortGroup )

View File

@@ -15,7 +15,7 @@
-- @image MOOSE.JPG -- @image MOOSE.JPG
--- @type AI_ESCORT_DISPATCHER_REQUEST -- @type AI_ESCORT_DISPATCHER_REQUEST
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
@@ -33,7 +33,7 @@ AI_ESCORT_DISPATCHER_REQUEST = {
ClassName = "AI_ESCORT_DISPATCHER_REQUEST", ClassName = "AI_ESCORT_DISPATCHER_REQUEST",
} }
--- @field #list -- @field #list
AI_ESCORT_DISPATCHER_REQUEST.AI_Escorts = {} AI_ESCORT_DISPATCHER_REQUEST.AI_Escorts = {}
@@ -80,7 +80,7 @@ function AI_ESCORT_DISPATCHER_REQUEST:onafterStart( From, Event, To )
end end
--- @param #AI_ESCORT_DISPATCHER_REQUEST self -- @param #AI_ESCORT_DISPATCHER_REQUEST self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_ESCORT_DISPATCHER_REQUEST:OnEventExit( EventData ) function AI_ESCORT_DISPATCHER_REQUEST:OnEventExit( EventData )
@@ -97,7 +97,7 @@ function AI_ESCORT_DISPATCHER_REQUEST:OnEventExit( EventData )
end end
--- @param #AI_ESCORT_DISPATCHER_REQUEST self -- @param #AI_ESCORT_DISPATCHER_REQUEST self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_ESCORT_DISPATCHER_REQUEST:OnEventBirth( EventData ) function AI_ESCORT_DISPATCHER_REQUEST:OnEventBirth( EventData )

View File

@@ -19,7 +19,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ESC%20-%20Escorting) -- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Escort)
-- --
-- === -- ===
-- --
@@ -136,12 +136,12 @@
-- --
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint. -- 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. -- 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 -- # Developer Note
-- --
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE -- 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 -- Therefore, this class is considered to be deprecated
-- --
-- === -- ===
-- --
-- ### Authors: **FlightControl** -- ### Authors: **FlightControl**
@@ -153,7 +153,7 @@
--- @type AI_ESCORT_REQUEST -- @type AI_ESCORT_REQUEST
-- @extends AI.AI_Escort#AI_ESCORT -- @extends AI.AI_Escort#AI_ESCORT
--- AI_ESCORT_REQUEST class --- AI_ESCORT_REQUEST class
@@ -228,7 +228,7 @@ function AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, EscortAirbase, EscortNa
return self return self
end end
--- @param #AI_ESCORT_REQUEST self -- @param #AI_ESCORT_REQUEST self
function AI_ESCORT_REQUEST:SpawnEscort() function AI_ESCORT_REQUEST:SpawnEscort()
local EscortGroup = self.EscortSpawn:SpawnAtAirbase( self.EscortAirbase, SPAWN.Takeoff.Hot ) local EscortGroup = self.EscortSpawn:SpawnAtAirbase( self.EscortAirbase, SPAWN.Takeoff.Hot )
@@ -253,7 +253,7 @@ function AI_ESCORT_REQUEST:SpawnEscort()
self:_InitEscortMenus( EscortGroup ) self:_InitEscortMenus( EscortGroup )
self:_InitEscortRoute( EscortGroup ) self:_InitEscortRoute( EscortGroup )
--- @param #AI_ESCORT self -- @param #AI_ESCORT self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function EscortGroup:OnEventDeadOrCrash( EventData ) function EscortGroup:OnEventDeadOrCrash( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )
@@ -268,7 +268,7 @@ function AI_ESCORT_REQUEST:SpawnEscort()
end end
--- @param #AI_ESCORT_REQUEST self -- @param #AI_ESCORT_REQUEST self
-- @param Core.Set#SET_GROUP EscortGroupSet -- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT_REQUEST:onafterStart( EscortGroupSet ) function AI_ESCORT_REQUEST:onafterStart( EscortGroupSet )
@@ -290,14 +290,14 @@ function AI_ESCORT_REQUEST:onafterStart( EscortGroupSet )
end end
--- @param #AI_ESCORT_REQUEST self -- @param #AI_ESCORT_REQUEST self
-- @param Core.Set#SET_GROUP EscortGroupSet -- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT_REQUEST:onafterStop( EscortGroupSet ) function AI_ESCORT_REQUEST:onafterStop( EscortGroupSet )
self:F() self:F()
EscortGroupSet:ForEachGroup( EscortGroupSet:ForEachGroup(
--- @param Wrapper.Group#GROUP EscortGroup -- @param Core.Group#GROUP EscortGroup
function( EscortGroup ) function( EscortGroup )
EscortGroup:WayPointInitialize() EscortGroup:WayPointInitialize()

View File

@@ -8,11 +8,11 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/FOR%20-%20AI%20Group%20Formation) -- ## Additional Material:
-- --
-- === -- * **Demo Missions:** [GitHub](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Formation)
-- -- * **YouTube videos:** [Playlist](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl0bFIJ9jIdYM22uaWmIN4oz)
-- ### [YouTube Playlist](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl0bFIJ9jIdYM22uaWmIN4oz) -- * **Guides:** None
-- --
-- === -- ===
-- --
@@ -34,8 +34,8 @@
-- @field Core.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 #number FollowDistance The current follow distance.
-- @field #boolean ReportTargets If true, nearby targets are reported. -- @field #boolean ReportTargets If true, nearby targets are reported.
-- @field DCS#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup. -- @Field DCSTypes#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 DCSTypes#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. -- @field #number dtFollow Time step between position updates.
@@ -92,12 +92,12 @@
-- local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) -- local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" )
-- LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 ) -- LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 )
-- LargeFormation:__Start( 1 ) -- LargeFormation:__Start( 1 )
-- --
-- # Developer Note -- # Developer Note
-- --
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE -- 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 -- Therefore, this class is considered to be deprecated
-- --
-- @field #AI_FORMATION -- @field #AI_FORMATION
AI_FORMATION = { AI_FORMATION = {
ClassName = "AI_FORMATION", ClassName = "AI_FORMATION",
@@ -117,7 +117,7 @@ AI_FORMATION = {
AI_FORMATION.__Enum = {} AI_FORMATION.__Enum = {}
--- @type AI_FORMATION.__Enum.Formation -- @type AI_FORMATION.__Enum.Formation
-- @field #number None -- @field #number None
-- @field #number Line -- @field #number Line
-- @field #number Trail -- @field #number Trail
@@ -142,7 +142,7 @@ AI_FORMATION.__Enum.Formation = {
Box = 10, Box = 10,
} }
--- @type AI_FORMATION.__Enum.Mode -- @type AI_FORMATION.__Enum.Mode
-- @field #number Mission -- @field #number Mission
-- @field #number Formation -- @field #number Formation
AI_FORMATION.__Enum.Mode = { AI_FORMATION.__Enum.Mode = {
@@ -152,13 +152,13 @@ AI_FORMATION.__Enum.Mode = {
Reconnaissance = "R", Reconnaissance = "R",
} }
--- @type AI_FORMATION.__Enum.ReportType -- @type AI_FORMATION.__Enum.ReportType
-- @field #number All -- @field #number All
-- @field #number Airborne -- @field #number Airborne
-- @field #number GroundRadar -- @field #number GroundRadar
-- @field #number Ground -- @field #number Ground
AI_FORMATION.__Enum.ReportType = { AI_FORMATION.__Enum.ReportType = {
Airborne = "*", All = "*",
Airborne = "A", Airborne = "A",
GroundRadar = "R", GroundRadar = "R",
Ground = "G", Ground = "G",
@@ -996,7 +996,7 @@ function AI_FORMATION:SetFlightModeMission( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
else else
self.FollowGroupSet:ForSomeGroupAlive( self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup -- @param Core.Group#GROUP EscortGroup
function( FollowGroup ) function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
@@ -1020,7 +1020,7 @@ function AI_FORMATION:SetFlightModeAttack( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
else else
self.FollowGroupSet:ForSomeGroupAlive( self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup -- @param Core.Group#GROUP EscortGroup
function( FollowGroup ) function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
@@ -1044,7 +1044,7 @@ function AI_FORMATION:SetFlightModeFormation( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
else else
self.FollowGroupSet:ForSomeGroupAlive( self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup -- @param Core.Group#GROUP EscortGroup
function( FollowGroup ) function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) ) FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation ) FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
@@ -1222,7 +1222,7 @@ function AI_FORMATION:FollowMe(FollowGroup, ClientUnit, CT1, CV1, CT2, CV2)
local CVI = { local CVI = {
x = CV2.x + CS * 10 * math.sin(Ca), x = CV2.x + CS * 10 * math.sin(Ca),
y = GH2.y + Inclination, -- + FollowFormation.y, y = GH2.y + Inclination, -- + FollowFormation.y,
y = GH2.y, --y = GH2.y,
z = CV2.z + CS * 10 * math.cos(Ca), z = CV2.z + CS * 10 * math.cos(Ca),
} }

View File

@@ -16,7 +16,7 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/PAT%20-%20Patrolling) -- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/AI/AI_Patrol)
-- --
-- === -- ===
-- --
@@ -652,15 +652,15 @@ function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To )
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @param Wrapper.Controllable#CONTROLLABLE Controllable+
function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To ) function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To )
return self.DetectOn and self.DetectActivated return self.DetectOn and self.DetectActivated
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @param Wrapper.Controllable#CONTROLLABLE Controllable
function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To )
local Detected = false local Detected = false
@@ -705,7 +705,7 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To )
end end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable -- @param Wrapper.Controllable#CONTROLLABLE AIControllable
-- This static method is called from the route path within the last task at the last waypoint of the Controllable. -- This static method is called from the route path within the last task at the last waypoint of the Controllable.
-- Note that this method is required, as triggers the next route when patrolling for the Controllable. -- Note that this method is required, as triggers the next route when patrolling for the Controllable.
function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable ) function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable )
@@ -822,13 +822,13 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onbeforeStatus() function AI_PATROL_ZONE:onbeforeStatus()
return self.CheckStatus return self.CheckStatus
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterStatus() function AI_PATROL_ZONE:onafterStatus()
self:F2() self:F2()
@@ -838,7 +838,7 @@ function AI_PATROL_ZONE:onafterStatus()
local Fuel = self.Controllable:GetFuelMin() local Fuel = self.Controllable:GetFuelMin()
if Fuel < self.PatrolFuelThresholdPercentage then if Fuel < self.PatrolFuelThresholdPercentage then
self:I( self.Controllable:GetName() .. " is out of fuel:" .. Fuel .. ", RTB!" ) self:T( self.Controllable:GetName() .. " is out of fuel:" .. Fuel .. ", RTB!" )
local OldAIControllable = self.Controllable local OldAIControllable = self.Controllable
local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed ) local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
@@ -852,7 +852,7 @@ function AI_PATROL_ZONE:onafterStatus()
-- TODO: Check GROUP damage function. -- TODO: Check GROUP damage function.
local Damage = self.Controllable:GetLife() local Damage = self.Controllable:GetLife()
if Damage <= self.PatrolDamageThreshold then if Damage <= self.PatrolDamageThreshold then
self:I( self.Controllable:GetName() .. " is damaged:" .. Damage .. ", RTB!" ) self:T( self.Controllable:GetName() .. " is damaged:" .. Damage .. ", RTB!" )
RTB = true RTB = true
end end
@@ -864,7 +864,7 @@ function AI_PATROL_ZONE:onafterStatus()
end end
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterRTB() function AI_PATROL_ZONE:onafterRTB()
self:F2() self:F2()
@@ -903,13 +903,13 @@ function AI_PATROL_ZONE:onafterRTB()
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterDead() function AI_PATROL_ZONE:onafterDead()
self:SetDetectionOff() self:SetDetectionOff()
self:SetStatusOff() self:SetStatusOff()
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnCrash( EventData ) function AI_PATROL_ZONE:OnCrash( EventData )
@@ -920,7 +920,7 @@ function AI_PATROL_ZONE:OnCrash( EventData )
end end
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnEjection( EventData ) function AI_PATROL_ZONE:OnEjection( EventData )
@@ -929,7 +929,7 @@ function AI_PATROL_ZONE:OnEjection( EventData )
end end
end end
--- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnPilotDead( EventData ) function AI_PATROL_ZONE:OnPilotDead( EventData )

View File

@@ -274,7 +274,7 @@ do -- ACT_ACCOUNT_DEADS
--- DCS Events --- DCS Events
--- @param #ACT_ACCOUNT_DEADS self -- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:OnEventHit( EventData ) function ACT_ACCOUNT_DEADS:OnEventHit( EventData )
self:T( { "EventDead", EventData } ) self:T( { "EventDead", EventData } )
@@ -285,7 +285,7 @@ do -- ACT_ACCOUNT_DEADS
end end
end end
--- @param #ACT_ACCOUNT_DEADS self -- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:onfuncEventDead( EventData ) function ACT_ACCOUNT_DEADS:onfuncEventDead( EventData )
self:T( { "EventDead", EventData } ) self:T( { "EventDead", EventData } )
@@ -297,7 +297,7 @@ do -- ACT_ACCOUNT_DEADS
--- DCS Events --- DCS Events
--- @param #ACT_ACCOUNT_DEADS self -- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:onfuncEventCrash( EventData ) function ACT_ACCOUNT_DEADS:onfuncEventCrash( EventData )
self:T( { "EventDead", EventData } ) self:T( { "EventDead", EventData } )

View File

@@ -200,7 +200,7 @@ do -- ACT_ASSIST_SMOKE_TARGETS_ZONE
function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To ) function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To )
self.TargetSetUnit:ForEachUnit( self.TargetSetUnit:ForEachUnit(
--- @param Wrapper.Unit#UNIT SmokeUnit -- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit ) function( SmokeUnit )
if math.random( 1, ( 100 * self.TargetSetUnit:Count() ) / 4 ) <= 100 then if math.random( 1, ( 100 * self.TargetSetUnit:Count() ) / 4 ) <= 100 then
SCHEDULER:New( self, SCHEDULER:New( self,

View File

@@ -370,7 +370,7 @@ CARGOS = {}
do -- CARGO do -- CARGO
--- @type CARGO -- @type CARGO
-- @extends Core.Fsm#FSM_PROCESS -- @extends Core.Fsm#FSM_PROCESS
-- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers. -- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.
-- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo. -- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo.
@@ -433,7 +433,7 @@ do -- CARGO
Reported = {}, Reported = {},
} }
--- @type CARGO.CargoObjects -- @type CARGO.CargoObjects
-- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo.
--- CARGO Constructor. This class is an abstract class and should not be instantiated. --- CARGO Constructor. This class is an abstract class and should not be instantiated.
@@ -447,7 +447,7 @@ do -- CARGO
function CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) --R2.1 function CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) --R2.1
local self = BASE:Inherit( self, FSM:New() ) -- #CARGO local self = BASE:Inherit( self, FSM:New() ) -- #CARGO
self:F( { Type, Name, Weight, LoadRadius, NearRadius } ) self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
self:SetStartState( "UnLoaded" ) self:SetStartState( "UnLoaded" )
self:AddTransition( { "UnLoaded", "Boarding" }, "Board", "Boarding" ) self:AddTransition( { "UnLoaded", "Boarding" }, "Board", "Boarding" )
@@ -711,7 +711,7 @@ do -- CARGO
-- @param #CARGO self -- @param #CARGO self
-- @return #CARGO -- @return #CARGO
function CARGO:Spawn( PointVec2 ) function CARGO:Spawn( PointVec2 )
self:F() self:T()
end end
@@ -812,7 +812,7 @@ do -- CARGO
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the CargoGroup is within the loading radius. -- @return #boolean true if the CargoGroup is within the loading radius.
function CARGO:IsInLoadRadius( Coordinate ) function CARGO:IsInLoadRadius( Coordinate )
self:F( { Coordinate, LoadRadius = self.LoadRadius } ) self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -832,7 +832,7 @@ do -- CARGO
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo can report itself. -- @return #boolean true if the Cargo can report itself.
function CARGO:IsInReportRadius( Coordinate ) function CARGO:IsInReportRadius( Coordinate )
self:F( { Coordinate } ) self:T( { Coordinate } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -853,23 +853,23 @@ do -- CARGO
-- @param #number NearRadius The radius when the cargo will board the Carrier (to avoid collision). -- @param #number NearRadius The radius when the cargo will board the Carrier (to avoid collision).
-- @return #boolean -- @return #boolean
function CARGO:IsNear( Coordinate, NearRadius ) function CARGO:IsNear( Coordinate, NearRadius )
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius } ) --self:T( { PointVec2 = PointVec2, NearRadius = NearRadius } )
if self.CargoObject:IsAlive() then if self.CargoObject:IsAlive() then
--local Distance = PointVec2:Get2DDistance( self.CargoObject:GetPointVec2() ) --local Distance = PointVec2:Get2DDistance( self.CargoObject:GetPointVec2() )
--self:F( { CargoObjectName = self.CargoObject:GetName() } ) --self:T( { CargoObjectName = self.CargoObject:GetName() } )
--self:F( { CargoObjectVec2 = self.CargoObject:GetVec2() } ) --self:T( { CargoObjectVec2 = self.CargoObject:GetVec2() } )
--self:F( { PointVec2 = PointVec2:GetVec2() } ) --self:T( { PointVec2 = PointVec2:GetVec2() } )
local Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() ) local Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
--self:F( { Distance = Distance, NearRadius = NearRadius or "nil" } ) --self:T( { Distance = Distance, NearRadius = NearRadius or "nil" } )
if Distance <= NearRadius then if Distance <= NearRadius then
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } ) --self:T( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } )
return true return true
end end
end end
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = false } ) --self:T( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = false } )
return false return false
end end
@@ -878,12 +878,12 @@ do -- CARGO
-- @param Core.Zone#ZONE_BASE Zone -- @param Core.Zone#ZONE_BASE Zone
-- @return #boolean **true** if cargo is in the Zone, **false** if cargo is not in the Zone. -- @return #boolean **true** if cargo is in the Zone, **false** if cargo is not in the Zone.
function CARGO:IsInZone( Zone ) function CARGO:IsInZone( Zone )
--self:F( { Zone } ) --self:T( { Zone } )
if self:IsLoaded() then if self:IsLoaded() then
return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() ) return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() )
else else
--self:F( { Size = self.CargoObject:GetSize(), Units = self.CargoObject:GetUnits() } ) --self:T( { Size = self.CargoObject:GetSize(), Units = self.CargoObject:GetUnits() } )
if self.CargoObject:GetSize() ~= 0 then if self.CargoObject:GetSize() ~= 0 then
return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() ) return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() )
else else
@@ -1034,7 +1034,7 @@ end -- CARGO
do -- CARGO_REPRESENTABLE do -- CARGO_REPRESENTABLE
--- @type CARGO_REPRESENTABLE -- @type CARGO_REPRESENTABLE
-- @extends #CARGO -- @extends #CARGO
-- @field test -- @field test
@@ -1056,7 +1056,7 @@ do -- CARGO_REPRESENTABLE
-- Inherit CARGO. -- Inherit CARGO.
local self = BASE:Inherit( self, CARGO:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_REPRESENTABLE local self = BASE:Inherit( self, CARGO:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_REPRESENTABLE
self:F( { Type, Name, LoadRadius, NearRadius } ) self:T( { Type, Name, LoadRadius, NearRadius } )
-- Descriptors. -- Descriptors.
local Desc=CargoObject:GetDesc() local Desc=CargoObject:GetDesc()
@@ -1086,7 +1086,7 @@ do -- CARGO_REPRESENTABLE
function CARGO_REPRESENTABLE:Destroy() function CARGO_REPRESENTABLE:Destroy()
-- Cargo objects are deleted from the _DATABASE and SET_CARGO objects. -- Cargo objects are deleted from the _DATABASE and SET_CARGO objects.
self:F( { CargoName = self:GetName() } ) self:T( { CargoName = self:GetName() } )
--_EVENTDISPATCHER:CreateEventDeleteCargo( self ) --_EVENTDISPATCHER:CreateEventDeleteCargo( self )
return self return self
@@ -1123,12 +1123,12 @@ do -- CARGO_REPRESENTABLE
CoordinateZone:Scan( { Object.Category.UNIT } ) CoordinateZone:Scan( { Object.Category.UNIT } )
for _, DCSUnit in pairs( CoordinateZone:GetScannedUnits() ) do for _, DCSUnit in pairs( CoordinateZone:GetScannedUnits() ) do
local NearUnit = UNIT:Find( DCSUnit ) local NearUnit = UNIT:Find( DCSUnit )
self:F({NearUnit=NearUnit}) self:T({NearUnit=NearUnit})
local NearUnitCoalition = NearUnit:GetCoalition() local NearUnitCoalition = NearUnit:GetCoalition()
local CargoCoalition = self:GetCoalition() local CargoCoalition = self:GetCoalition()
if NearUnitCoalition == CargoCoalition then if NearUnitCoalition == CargoCoalition then
local Attributes = NearUnit:GetDesc() local Attributes = NearUnit:GetDesc()
self:F({Desc=Attributes}) self:T({Desc=Attributes})
if NearUnit:HasAttribute( "Trucks" ) then if NearUnit:HasAttribute( "Trucks" ) then
MESSAGE:New( Message, 20, NearUnit:GetCallsign() .. " reporting - Cargo " .. self:GetName() ):ToGroup( TaskGroup ) MESSAGE:New( Message, 20, NearUnit:GetCallsign() .. " reporting - Cargo " .. self:GetName() ):ToGroup( TaskGroup )
break break
@@ -1142,7 +1142,7 @@ end -- CARGO_REPRESENTABLE
do -- CARGO_REPORTABLE do -- CARGO_REPORTABLE
--- @type CARGO_REPORTABLE -- @type CARGO_REPORTABLE
-- @extends #CARGO -- @extends #CARGO
CARGO_REPORTABLE = { CARGO_REPORTABLE = {
ClassName = "CARGO_REPORTABLE" ClassName = "CARGO_REPORTABLE"
@@ -1158,7 +1158,7 @@ do -- CARGO_REPORTABLE
-- @return #CARGO_REPORTABLE -- @return #CARGO_REPORTABLE
function CARGO_REPORTABLE:New( Type, Name, Weight, LoadRadius, NearRadius ) function CARGO_REPORTABLE:New( Type, Name, Weight, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_REPORTABLE local self = BASE:Inherit( self, CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_REPORTABLE
self:F( { Type, Name, Weight, LoadRadius, NearRadius } ) self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
return self return self
end end
@@ -1178,7 +1178,7 @@ end
do -- CARGO_PACKAGE do -- CARGO_PACKAGE
--- @type CARGO_PACKAGE -- @type CARGO_PACKAGE
-- @extends #CARGO_REPRESENTABLE -- @extends #CARGO_REPRESENTABLE
CARGO_PACKAGE = { CARGO_PACKAGE = {
ClassName = "CARGO_PACKAGE" ClassName = "CARGO_PACKAGE"
@@ -1195,7 +1195,7 @@ do -- CARGO_PACKAGE
-- @return #CARGO_PACKAGE -- @return #CARGO_PACKAGE
function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius ) function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_PACKAGE local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_PACKAGE
self:F( { Type, Name, Weight, LoadRadius, NearRadius } ) self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
self:T( CargoCarrier ) self:T( CargoCarrier )
self.CargoCarrier = CargoCarrier self.CargoCarrier = CargoCarrier
@@ -1213,7 +1213,7 @@ end
-- @param #number BoardDistance -- @param #number BoardDistance
-- @param #number Angle -- @param #number Angle
function CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) function CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle )
self:F() self:T()
self.CargoInAir = self.CargoCarrier:InAir() self.CargoInAir = self.CargoCarrier:InAir()
@@ -1246,7 +1246,7 @@ end
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
-- @return #boolean -- @return #boolean
function CARGO_PACKAGE:IsNear( CargoCarrier ) function CARGO_PACKAGE:IsNear( CargoCarrier )
self:F() self:T()
local CargoCarrierPoint = CargoCarrier:GetCoordinate() local CargoCarrierPoint = CargoCarrier:GetCoordinate()
@@ -1271,7 +1271,7 @@ end
-- @param #number LoadDistance -- @param #number LoadDistance
-- @param #number Angle -- @param #number Angle
function CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) function CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle )
self:F() self:T()
if self:IsNear( CargoCarrier ) then if self:IsNear( CargoCarrier ) then
self:__Load( 1, CargoCarrier, Speed, LoadDistance, Angle ) self:__Load( 1, CargoCarrier, Speed, LoadDistance, Angle )
@@ -1292,7 +1292,7 @@ end
-- @param #number Radius -- @param #number Radius
-- @param #number Angle -- @param #number Angle
function CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) function CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle )
self:F() self:T()
self.CargoInAir = self.CargoCarrier:InAir() self.CargoInAir = self.CargoCarrier:InAir()
@@ -1331,7 +1331,7 @@ end
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number Speed -- @param #number Speed
function CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed ) function CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed )
self:F() self:T()
if self:IsNear( CargoCarrier ) then if self:IsNear( CargoCarrier ) then
self:__UnLoad( 1, CargoCarrier, Speed ) self:__UnLoad( 1, CargoCarrier, Speed )
@@ -1350,7 +1350,7 @@ end
-- @param #number LoadDistance -- @param #number LoadDistance
-- @param #number Angle -- @param #number Angle
function CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle ) function CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle )
self:F() self:T()
self.CargoCarrier = CargoCarrier self.CargoCarrier = CargoCarrier
@@ -1378,7 +1378,7 @@ end
-- @param #number Distance -- @param #number Distance
-- @param #number Angle -- @param #number Angle
function CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle ) function CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle )
self:F() self:T()
local StartPointVec2 = self.CargoCarrier:GetPointVec2() local StartPointVec2 = self.CargoCarrier:GetPointVec2()
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees. local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.

View File

@@ -59,7 +59,7 @@ do -- CARGO_CRATE
-- @return #CARGO_CRATE -- @return #CARGO_CRATE
function CARGO_CRATE:New( CargoStatic, Type, Name, LoadRadius, NearRadius ) function CARGO_CRATE:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_CRATE local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_CRATE
self:F( { Type, Name, NearRadius } ) self:T( { Type, Name, NearRadius } )
self.CargoObject = CargoStatic -- Wrapper.Static#STATIC self.CargoObject = CargoStatic -- Wrapper.Static#STATIC
@@ -78,7 +78,7 @@ do -- CARGO_CRATE
return self return self
end end
--- @param #CARGO_CRATE self -- @param #CARGO_CRATE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function CARGO_CRATE:OnEventCargoDead( EventData ) function CARGO_CRATE:OnEventCargoDead( EventData )
@@ -116,7 +116,7 @@ do -- CARGO_CRATE
-- @param #string To -- @param #string To
-- @param Core.Point#POINT_VEC2 -- @param Core.Point#POINT_VEC2
function CARGO_CRATE:onenterUnLoaded( From, Event, To, ToPointVec2 ) function CARGO_CRATE:onenterUnLoaded( From, Event, To, ToPointVec2 )
--self:F( { ToPointVec2, From, Event, To } ) --self:T( { ToPointVec2, From, Event, To } )
local Angle = 180 local Angle = 180
local Speed = 10 local Speed = 10
@@ -153,7 +153,7 @@ do -- CARGO_CRATE
-- @param #string To -- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_CRATE:onenterLoaded( From, Event, To, CargoCarrier ) function CARGO_CRATE:onenterLoaded( From, Event, To, CargoCarrier )
--self:F( { From, Event, To, CargoCarrier } ) --self:T( { From, Event, To, CargoCarrier } )
self.CargoCarrier = CargoCarrier self.CargoCarrier = CargoCarrier
@@ -190,7 +190,7 @@ do -- CARGO_CRATE
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Crate is within the report radius. -- @return #boolean true if the Cargo Crate is within the report radius.
function CARGO_CRATE:IsInReportRadius( Coordinate ) function CARGO_CRATE:IsInReportRadius( Coordinate )
--self:F( { Coordinate, LoadRadius = self.LoadRadius } ) --self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -210,7 +210,7 @@ do -- CARGO_CRATE
-- @param Core.Point#Coordinate Coordinate -- @param Core.Point#Coordinate Coordinate
-- @return #boolean true if the Cargo Crate is within the loading radius. -- @return #boolean true if the Cargo Crate is within the loading radius.
function CARGO_CRATE:IsInLoadRadius( Coordinate ) function CARGO_CRATE:IsInLoadRadius( Coordinate )
--self:F( { Coordinate, LoadRadius = self.NearRadius } ) --self:T( { Coordinate, LoadRadius = self.NearRadius } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -231,7 +231,7 @@ do -- CARGO_CRATE
-- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup. -- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup.
-- @return #nil There is no valid Cargo in the CargoGroup. -- @return #nil There is no valid Cargo in the CargoGroup.
function CARGO_CRATE:GetCoordinate() function CARGO_CRATE:GetCoordinate()
--self:F() --self:T()
return self.CargoObject:GetCoordinate() return self.CargoObject:GetCoordinate()
end end
@@ -261,7 +261,7 @@ do -- CARGO_CRATE
-- @param #CARGO_CRATE self -- @param #CARGO_CRATE self
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
function CARGO_CRATE:RouteTo( Coordinate ) function CARGO_CRATE:RouteTo( Coordinate )
self:F( {Coordinate = Coordinate } ) self:T( {Coordinate = Coordinate } )
end end
@@ -274,7 +274,7 @@ do -- CARGO_CRATE
-- @return #boolean The Cargo is near to the Carrier. -- @return #boolean The Cargo is near to the Carrier.
-- @return #nil The Cargo is not near to the Carrier. -- @return #nil The Cargo is not near to the Carrier.
function CARGO_CRATE:IsNear( CargoCarrier, NearRadius ) function CARGO_CRATE:IsNear( CargoCarrier, NearRadius )
self:F( {NearRadius = NearRadius } ) self:T( {NearRadius = NearRadius } )
return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius ) return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius )
end end
@@ -283,7 +283,7 @@ do -- CARGO_CRATE
-- @param #CARGO_CRATE self -- @param #CARGO_CRATE self
function CARGO_CRATE:Respawn() function CARGO_CRATE:Respawn()
self:F( { "Respawning crate " .. self:GetName() } ) self:T( { "Respawning crate " .. self:GetName() } )
-- Respawn the group... -- Respawn the group...
@@ -300,7 +300,7 @@ do -- CARGO_CRATE
-- @param #CARGO_CRATE self -- @param #CARGO_CRATE self
function CARGO_CRATE:onafterReset() function CARGO_CRATE:onafterReset()
self:F( { "Reset crate " .. self:GetName() } ) self:T( { "Reset crate " .. self:GetName() } )
-- Respawn the group... -- Respawn the group...

View File

@@ -64,7 +64,7 @@ do -- CARGO_GROUP
-- Inherit CAROG_REPORTABLE -- Inherit CAROG_REPORTABLE
local self = BASE:Inherit( self, CARGO_REPORTABLE:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_GROUP local self = BASE:Inherit( self, CARGO_REPORTABLE:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_GROUP
self:F( { Type, Name, LoadRadius } ) self:T( { Type, Name, LoadRadius } )
self.CargoSet = SET_CARGO:New() self.CargoSet = SET_CARGO:New()
self.CargoGroup = CargoGroup self.CargoGroup = CargoGroup
@@ -146,7 +146,7 @@ do -- CARGO_GROUP
-- @param #CARGO_GROUP self -- @param #CARGO_GROUP self
function CARGO_GROUP:Respawn() function CARGO_GROUP:Respawn()
self:F( { "Respawning" } ) self:T( { "Respawning" } )
for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do
local Cargo = CargoData -- Cargo.Cargo#CARGO local Cargo = CargoData -- Cargo.Cargo#CARGO
@@ -227,7 +227,7 @@ do -- CARGO_GROUP
-- @param #CARGO_GROUP self -- @param #CARGO_GROUP self
function CARGO_GROUP:Regroup() function CARGO_GROUP:Regroup()
self:F("Regroup") self:T("Regroup")
if self.Grouped == false then if self.Grouped == false then
@@ -241,7 +241,7 @@ do -- CARGO_GROUP
for CargoUnitName, CargoUnit in pairs( self.CargoSet:GetSet() ) do for CargoUnitName, CargoUnit in pairs( self.CargoSet:GetSet() ) do
local CargoUnit = CargoUnit -- Cargo.CargoUnit#CARGO_UNIT local CargoUnit = CargoUnit -- Cargo.CargoUnit#CARGO_UNIT
self:F( { CargoUnit:GetName(), UnLoaded = CargoUnit:IsUnLoaded() } ) self:T( { CargoUnit:GetName(), UnLoaded = CargoUnit:IsUnLoaded() } )
if CargoUnit:IsUnLoaded() then if CargoUnit:IsUnLoaded() then
@@ -258,7 +258,7 @@ do -- CARGO_GROUP
-- Then we register the new group in the database -- Then we register the new group in the database
self.CargoGroup = GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID ) self.CargoGroup = GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID )
self:F( { "Regroup", GroupTemplate } ) self:T( { "Regroup", GroupTemplate } )
-- Now we spawn the new group based on the template created. -- Now we spawn the new group based on the template created.
self.CargoObject = _DATABASE:Spawn( GroupTemplate ) self.CargoObject = _DATABASE:Spawn( GroupTemplate )
@@ -271,7 +271,7 @@ do -- CARGO_GROUP
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function CARGO_GROUP:OnEventCargoDead( EventData ) function CARGO_GROUP:OnEventCargoDead( EventData )
self:E(EventData) self:T(EventData)
local Destroyed = false local Destroyed = false
@@ -296,7 +296,7 @@ do -- CARGO_GROUP
if Destroyed then if Destroyed then
self:Destroyed() self:Destroyed()
self:E( { "Cargo group destroyed" } ) self:T( { "Cargo group destroyed" } )
end end
end end
@@ -309,14 +309,14 @@ do -- CARGO_GROUP
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier. -- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... ) function CARGO_GROUP:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... )
self:F( { CargoCarrier.UnitName, From, Event, To, NearRadius = NearRadius } ) self:T( { CargoCarrier.UnitName, From, Event, To, NearRadius = NearRadius } )
NearRadius = NearRadius or self.NearRadius NearRadius = NearRadius or self.NearRadius
-- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2
self.CargoSet:ForEach( self.CargoSet:ForEach(
function( Cargo, ... ) function( Cargo, ... )
self:F( { "Board Unit", Cargo:GetName( ), Cargo:IsDestroyed(), Cargo.CargoObject:IsAlive() } ) self:T( { "Board Unit", Cargo:GetName( ), Cargo:IsDestroyed(), Cargo.CargoObject:IsAlive() } )
local CargoGroup = Cargo.CargoObject --Wrapper.Group#GROUP local CargoGroup = Cargo.CargoObject --Wrapper.Group#GROUP
CargoGroup:OptionAlarmStateGreen() CargoGroup:OptionAlarmStateGreen()
Cargo:__Board( 1, CargoCarrier, NearRadius, ... ) Cargo:__Board( 1, CargoCarrier, NearRadius, ... )
@@ -334,7 +334,7 @@ do -- CARGO_GROUP
-- @param #string To -- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_GROUP:onafterLoad( From, Event, To, CargoCarrier, ... ) function CARGO_GROUP:onafterLoad( From, Event, To, CargoCarrier, ... )
--self:F( { From, Event, To, CargoCarrier, ...} ) --self:T( { From, Event, To, CargoCarrier, ...} )
if From == "UnLoaded" then if From == "UnLoaded" then
-- For each Cargo object within the CARGO_GROUP, load each cargo to the CargoCarrier. -- For each Cargo object within the CARGO_GROUP, load each cargo to the CargoCarrier.
@@ -359,7 +359,7 @@ do -- CARGO_GROUP
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier. -- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... ) function CARGO_GROUP:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... )
--self:F( { CargoCarrier.UnitName, From, Event, To } ) --self:T( { CargoCarrier.UnitName, From, Event, To } )
local Boarded = true local Boarded = true
local Cancelled = false local Cancelled = false
@@ -393,7 +393,7 @@ do -- CARGO_GROUP
if not Boarded then if not Boarded then
self:__Boarding( -5, CargoCarrier, NearRadius, ... ) self:__Boarding( -5, CargoCarrier, NearRadius, ... )
else else
self:F("Group Cargo is loaded") self:T("Group Cargo is loaded")
self:__Load( 1, CargoCarrier, ... ) self:__Load( 1, CargoCarrier, ... )
end end
else else
@@ -413,7 +413,7 @@ do -- CARGO_GROUP
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier. -- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterUnBoard( From, Event, To, ToPointVec2, NearRadius, ... ) function CARGO_GROUP:onafterUnBoard( From, Event, To, ToPointVec2, NearRadius, ... )
self:F( {From, Event, To, ToPointVec2, NearRadius } ) self:T( {From, Event, To, ToPointVec2, NearRadius } )
NearRadius = NearRadius or 25 NearRadius = NearRadius or 25
@@ -456,7 +456,7 @@ do -- CARGO_GROUP
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier. -- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius, ... ) function CARGO_GROUP:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius, ... )
--self:F( { From, Event, To, ToPointVec2, NearRadius } ) --self:T( { From, Event, To, ToPointVec2, NearRadius } )
--local NearRadius = NearRadius or 25 --local NearRadius = NearRadius or 25
@@ -493,7 +493,7 @@ do -- CARGO_GROUP
-- @param #string To -- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
function CARGO_GROUP:onafterUnLoad( From, Event, To, ToPointVec2, ... ) function CARGO_GROUP:onafterUnLoad( From, Event, To, ToPointVec2, ... )
--self:F( { From, Event, To, ToPointVec2 } ) --self:T( { From, Event, To, ToPointVec2 } )
if From == "Loaded" then if From == "Loaded" then
@@ -598,7 +598,7 @@ do -- CARGO_GROUP
end end
--- Get the amount of cargo units in the group. --- Get the underlying GROUP object from the CARGO_GROUP.
-- @param #CARGO_GROUP self -- @param #CARGO_GROUP self
-- @return #CARGO_GROUP -- @return #CARGO_GROUP
function CARGO_GROUP:GetGroup( Cargo ) function CARGO_GROUP:GetGroup( Cargo )
@@ -611,7 +611,7 @@ do -- CARGO_GROUP
-- @param #CARGO_GROUP self -- @param #CARGO_GROUP self
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
function CARGO_GROUP:RouteTo( Coordinate ) function CARGO_GROUP:RouteTo( Coordinate )
--self:F( {Coordinate = Coordinate } ) --self:T( {Coordinate = Coordinate } )
-- For each Cargo within the CargoSet, route each object to the Coordinate -- For each Cargo within the CargoSet, route each object to the Coordinate
self.CargoSet:ForEach( self.CargoSet:ForEach(
@@ -629,13 +629,13 @@ do -- CARGO_GROUP
-- @param #number NearRadius -- @param #number NearRadius
-- @return #boolean The Cargo is near to the Carrier or #nil if the Cargo is not near to the Carrier. -- @return #boolean The Cargo is near to the Carrier or #nil if the Cargo is not near to the Carrier.
function CARGO_GROUP:IsNear( CargoCarrier, NearRadius ) function CARGO_GROUP:IsNear( CargoCarrier, NearRadius )
self:F( {NearRadius = NearRadius } ) self:T( {NearRadius = NearRadius } )
for _, Cargo in pairs( self.CargoSet:GetSet() ) do for _, Cargo in pairs( self.CargoSet:GetSet() ) do
local Cargo = Cargo -- Cargo.Cargo#CARGO local Cargo = Cargo -- Cargo.Cargo#CARGO
if Cargo:IsAlive() then if Cargo:IsAlive() then
if Cargo:IsNear( CargoCarrier:GetCoordinate(), NearRadius ) then if Cargo:IsNear( CargoCarrier:GetCoordinate(), NearRadius ) then
self:F( "Near" ) self:T( "Near" )
return true return true
end end
end end
@@ -649,7 +649,7 @@ do -- CARGO_GROUP
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Group is within the load radius. -- @return #boolean true if the Cargo Group is within the load radius.
function CARGO_GROUP:IsInLoadRadius( Coordinate ) function CARGO_GROUP:IsInLoadRadius( Coordinate )
--self:F( { Coordinate } ) --self:T( { Coordinate } )
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
@@ -669,7 +669,7 @@ do -- CARGO_GROUP
return false return false
end end
self:F( { Distance = Distance, LoadRadius = self.LoadRadius } ) self:T( { Distance = Distance, LoadRadius = self.LoadRadius } )
if Distance <= self.LoadRadius then if Distance <= self.LoadRadius then
return true return true
else else
@@ -687,12 +687,12 @@ do -- CARGO_GROUP
-- @param Core.Point#Coordinate Coordinate -- @param Core.Point#Coordinate Coordinate
-- @return #boolean true if the Cargo Group is within the report radius. -- @return #boolean true if the Cargo Group is within the report radius.
function CARGO_GROUP:IsInReportRadius( Coordinate ) function CARGO_GROUP:IsInReportRadius( Coordinate )
--self:F( { Coordinate } ) --self:T( { Coordinate } )
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then if Cargo then
self:F( { Cargo } ) self:T( { Cargo } )
local Distance = 0 local Distance = 0
if Cargo:IsUnLoaded() then if Cargo:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( Cargo.CargoObject:GetCoordinate() ) Distance = Coordinate:Get2DDistance( Cargo.CargoObject:GetCoordinate() )
@@ -738,7 +738,7 @@ do -- CARGO_GROUP
-- @return #boolean **true** if the first element of the CargoGroup is in the Zone -- @return #boolean **true** if the first element of the CargoGroup is in the Zone
-- @return #boolean **false** if there is no element of the CargoGroup in the Zone. -- @return #boolean **false** if there is no element of the CargoGroup in the Zone.
function CARGO_GROUP:IsInZone( Zone ) function CARGO_GROUP:IsInZone( Zone )
--self:F( { Zone } ) --self:T( { Zone } )
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO

View File

@@ -52,7 +52,7 @@ do -- CARGO_SLINGLOAD
-- @return #CARGO_SLINGLOAD -- @return #CARGO_SLINGLOAD
function CARGO_SLINGLOAD:New( CargoStatic, Type, Name, LoadRadius, NearRadius ) function CARGO_SLINGLOAD:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_SLINGLOAD local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_SLINGLOAD
self:F( { Type, Name, NearRadius } ) self:T( { Type, Name, NearRadius } )
self.CargoObject = CargoStatic self.CargoObject = CargoStatic
@@ -72,7 +72,7 @@ do -- CARGO_SLINGLOAD
end end
--- @param #CARGO_SLINGLOAD self -- @param #CARGO_SLINGLOAD self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function CARGO_SLINGLOAD:OnEventCargoDead( EventData ) function CARGO_SLINGLOAD:OnEventCargoDead( EventData )
@@ -130,7 +130,7 @@ do -- CARGO_SLINGLOAD
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Crate is within the report radius. -- @return #boolean true if the Cargo Crate is within the report radius.
function CARGO_SLINGLOAD:IsInReportRadius( Coordinate ) function CARGO_SLINGLOAD:IsInReportRadius( Coordinate )
--self:F( { Coordinate, LoadRadius = self.LoadRadius } ) --self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -149,7 +149,7 @@ do -- CARGO_SLINGLOAD
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Slingload is within the loading radius. -- @return #boolean true if the Cargo Slingload is within the loading radius.
function CARGO_SLINGLOAD:IsInLoadRadius( Coordinate ) function CARGO_SLINGLOAD:IsInLoadRadius( Coordinate )
--self:F( { Coordinate } ) --self:T( { Coordinate } )
local Distance = 0 local Distance = 0
if self:IsUnLoaded() then if self:IsUnLoaded() then
@@ -169,7 +169,7 @@ do -- CARGO_SLINGLOAD
-- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup. -- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup.
-- @return #nil There is no valid Cargo in the CargoGroup. -- @return #nil There is no valid Cargo in the CargoGroup.
function CARGO_SLINGLOAD:GetCoordinate() function CARGO_SLINGLOAD:GetCoordinate()
--self:F() --self:T()
return self.CargoObject:GetCoordinate() return self.CargoObject:GetCoordinate()
end end
@@ -199,7 +199,7 @@ do -- CARGO_SLINGLOAD
-- @param #CARGO_SLINGLOAD self -- @param #CARGO_SLINGLOAD self
-- @param Core.Point#COORDINATE Coordinate -- @param Core.Point#COORDINATE Coordinate
function CARGO_SLINGLOAD:RouteTo( Coordinate ) function CARGO_SLINGLOAD:RouteTo( Coordinate )
--self:F( {Coordinate = Coordinate } ) --self:T( {Coordinate = Coordinate } )
end end
@@ -212,7 +212,7 @@ do -- CARGO_SLINGLOAD
-- @return #boolean The Cargo is near to the Carrier. -- @return #boolean The Cargo is near to the Carrier.
-- @return #nil The Cargo is not near to the Carrier. -- @return #nil The Cargo is not near to the Carrier.
function CARGO_SLINGLOAD:IsNear( CargoCarrier, NearRadius ) function CARGO_SLINGLOAD:IsNear( CargoCarrier, NearRadius )
--self:F( {NearRadius = NearRadius } ) --self:T( {NearRadius = NearRadius } )
return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius ) return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius )
end end
@@ -222,7 +222,7 @@ do -- CARGO_SLINGLOAD
-- @param #CARGO_SLINGLOAD self -- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:Respawn() function CARGO_SLINGLOAD:Respawn()
--self:F( { "Respawning slingload " .. self:GetName() } ) --self:T( { "Respawning slingload " .. self:GetName() } )
-- Respawn the group... -- Respawn the group...
@@ -239,7 +239,7 @@ do -- CARGO_SLINGLOAD
-- @param #CARGO_SLINGLOAD self -- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:onafterReset() function CARGO_SLINGLOAD:onafterReset()
--self:F( { "Reset slingload " .. self:GetName() } ) --self:T( { "Reset slingload " .. self:GetName() } )
-- Respawn the group... -- Respawn the group...

View File

@@ -75,7 +75,7 @@ do -- CARGO_UNIT
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param #number NearRadius (optional) Defaut 25 m. -- @param #number NearRadius (optional) Defaut 25 m.
function CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius ) function CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:F( { From, Event, To, ToPointVec2, NearRadius } ) self:T( { From, Event, To, ToPointVec2, NearRadius } )
local Angle = 180 local Angle = 180
local Speed = 60 local Speed = 60
@@ -114,7 +114,7 @@ do -- CARGO_UNIT
else else
self.CargoObject:ReSpawnAt( FromPointVec2, CargoDeployHeading ) self.CargoObject:ReSpawnAt( FromPointVec2, CargoDeployHeading )
end end
self:F( { "CargoUnits:", self.CargoObject:GetGroup():GetName() } ) self:T( { "CargoUnits:", self.CargoObject:GetGroup():GetName() } )
self.CargoCarrier = nil self.CargoCarrier = nil
local Points = {} local Points = {}
@@ -148,7 +148,7 @@ do -- CARGO_UNIT
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m. -- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2, NearRadius ) function CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:F( { From, Event, To, ToPointVec2, NearRadius } ) self:T( { From, Event, To, ToPointVec2, NearRadius } )
local Angle = 180 local Angle = 180
local Speed = 10 local Speed = 10
@@ -174,7 +174,7 @@ do -- CARGO_UNIT
-- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m. -- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius ) function CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:F( { From, Event, To, ToPointVec2, NearRadius } ) self:T( { From, Event, To, ToPointVec2, NearRadius } )
self.CargoInAir = self.CargoObject:InAir() self.CargoInAir = self.CargoObject:InAir()
@@ -199,7 +199,7 @@ do -- CARGO_UNIT
-- @param #string To -- @param #string To
-- @param Core.Point#POINT_VEC2 -- @param Core.Point#POINT_VEC2
function CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 ) function CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 )
self:F( { ToPointVec2, From, Event, To } ) self:T( { ToPointVec2, From, Event, To } )
local Angle = 180 local Angle = 180
local Speed = 10 local Speed = 10
@@ -236,7 +236,7 @@ do -- CARGO_UNIT
-- @param Wrapper.Group#GROUP CargoCarrier -- @param Wrapper.Group#GROUP CargoCarrier
-- @param #number NearRadius -- @param #number NearRadius
function CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... ) function CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... )
self:F( { From, Event, To, CargoCarrier, NearRadius = NearRadius } ) self:T( { From, Event, To, CargoCarrier, NearRadius = NearRadius } )
self.CargoInAir = self.CargoObject:InAir() self.CargoInAir = self.CargoObject:InAir()
@@ -244,7 +244,7 @@ do -- CARGO_UNIT
local MaxSpeed = Desc.speedMaxOffRoad local MaxSpeed = Desc.speedMaxOffRoad
local TypeName = Desc.typeName local TypeName = Desc.typeName
--self:F({Unit=self.CargoObject:GetName()}) --self:T({Unit=self.CargoObject:GetName()})
-- A cargo unit can only be boarded if it is not dead -- A cargo unit can only be boarded if it is not dead
@@ -298,9 +298,9 @@ do -- CARGO_UNIT
-- @param Wrapper.Client#CLIENT CargoCarrier -- @param Wrapper.Client#CLIENT CargoCarrier
-- @param #number NearRadius Default 25 m. -- @param #number NearRadius Default 25 m.
function CARGO_UNIT:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... ) function CARGO_UNIT:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... )
self:F( { From, Event, To, CargoCarrier:GetName(), NearRadius = NearRadius } ) self:T( { From, Event, To, CargoCarrier:GetName(), NearRadius = NearRadius } )
self:F( { IsAlive=self.CargoObject:IsAlive() } ) self:T( { IsAlive=self.CargoObject:IsAlive() } )
if CargoCarrier and CargoCarrier:IsAlive() then -- and self.CargoObject and self.CargoObject:IsAlive() then if CargoCarrier and CargoCarrier:IsAlive() then -- and self.CargoObject and self.CargoObject:IsAlive() then
if (CargoCarrier:IsAir() and not CargoCarrier:InAir()) or true then if (CargoCarrier:IsAir() and not CargoCarrier:InAir()) or true then
@@ -321,7 +321,7 @@ do -- CARGO_UNIT
local Angle = 180 local Angle = 180
local Distance = 0 local Distance = 0
--self:F({Unit=self.CargoObject:GetName()}) --self:T({Unit=self.CargoObject:GetName()})
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2() local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees. local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.
@@ -348,7 +348,7 @@ do -- CARGO_UNIT
self.CargoObject:SetCommand( self.CargoObject:CommandStopRoute( true ) ) self.CargoObject:SetCommand( self.CargoObject:CommandStopRoute( true ) )
end end
else else
self:E("Something is wrong") self:T("Something is wrong")
end end
end end
@@ -361,11 +361,11 @@ do -- CARGO_UNIT
-- @param #string To -- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier -- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier ) function CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier )
self:F( { From, Event, To, CargoCarrier } ) self:T( { From, Event, To, CargoCarrier } )
self.CargoCarrier = CargoCarrier self.CargoCarrier = CargoCarrier
--self:F({Unit=self.CargoObject:GetName()}) --self:T({Unit=self.CargoObject:GetName()})
-- Only destroy the CargoObject if there is a CargoObject (packages don't have CargoObjects). -- Only destroy the CargoObject if there is a CargoObject (packages don't have CargoObjects).
if self.CargoObject then if self.CargoObject then

View File

@@ -26,7 +26,7 @@
-- @module Core.Base -- @module Core.Base
-- @image Core_Base.JPG -- @image Core_Base.JPG
local _TraceOnOff = true local _TraceOnOff = false -- default to no tracing
local _TraceLevel = 1 local _TraceLevel = 1
local _TraceAll = false local _TraceAll = false
local _TraceClass = {} local _TraceClass = {}
@@ -742,6 +742,30 @@ do -- Event Handling
-- @param #BASE self -- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure. -- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
-- @function [parent=#BASE] OnEventNewDynamicCargo
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a player loads a dynamic cargo object with the F8 ground crew menu into a helo.
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
-- @function [parent=#BASE] OnEventDynamicCargoLoaded
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a player unloads a dynamic cargo object with the F8 ground crew menu from a helo.
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
-- @function [parent=#BASE] OnEventDynamicCargoUnloaded
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a dynamic cargo crate is removed.
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
-- @function [parent=#BASE] OnEventDynamicCargoRemoved
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
end end
--- Creation of a Birth Event. --- Creation of a Birth Event.
@@ -863,6 +887,62 @@ end
world.onEvent(Event) world.onEvent(Event)
end end
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
-- @param #BASE self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function BASE:CreateEventNewDynamicCargo(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.NewDynamicCargo,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.
-- @param #BASE self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function BASE:CreateEventDynamicCargoLoaded(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoLoaded,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
-- @param #BASE self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function BASE:CreateEventDynamicCargoUnloaded(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoUnloaded,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
-- @param #BASE self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function BASE:CreateEventDynamicCargoRemoved(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoRemoved,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- The main event handling function... This function captures all events generated for the class. --- The main event handling function... This function captures all events generated for the class.
-- @param #BASE self -- @param #BASE self
-- @param DCS#Event event -- @param DCS#Event event
@@ -1144,6 +1224,28 @@ function BASE:TraceClassMethod( Class, Method )
self:I( "Tracing method " .. Method .. " of class " .. Class ) self:I( "Tracing method " .. Method .. " of class " .. Class )
end end
--- (Internal) Serialize arguments
-- @param #BASE self
-- @param #table Arguments
-- @return #string Text
function BASE:_Serialize(Arguments)
local text = UTILS.PrintTableToLog({Arguments}, 0, true)
text = string.gsub(text,"(\n+)","")
text = string.gsub(text,"%(%(","%(")
text = string.gsub(text,"%)%)","%)")
text = string.gsub(text,"(%s+)"," ")
return text
end
----- (Internal) Serialize arguments
---- @param #BASE self
---- @param #table Arguments
---- @return #string Text
--function BASE:_Serialize(Arguments)
-- local text=UTILS.BasicSerialize(Arguments)
-- return text
--end
--- Trace a function call. This function is private. --- Trace a function call. This function is private.
-- @param #BASE self -- @param #BASE self
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
@@ -1168,7 +1270,7 @@ function BASE:_F( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if DebugInfoFrom then if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline LineFrom = DebugInfoFrom.currentline
end end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, BASE:_Serialize(Arguments) ) )
end end
end end
end end
@@ -1178,7 +1280,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:F( Arguments ) function BASE:F( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1193,7 +1295,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:F2( Arguments ) function BASE:F2( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true and _TraceLevel >= 2 then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1208,7 +1310,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:F3( Arguments ) function BASE:F3( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true and _TraceLevel >= 3 then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1242,7 +1344,7 @@ function BASE:_T( Arguments, DebugInfoCurrentParam, DebugInfoFromParam )
if DebugInfoFrom then if DebugInfoFrom then
LineFrom = DebugInfoFrom.currentline LineFrom = DebugInfoFrom.currentline
end end
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s", LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s", LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, BASE:_Serialize(Arguments) ) )
end end
end end
end end
@@ -1252,7 +1354,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:T( Arguments ) function BASE:T( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1267,7 +1369,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:T2( Arguments ) function BASE:T2( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true and _TraceLevel >= 2 then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1282,7 +1384,7 @@ end
-- @param Arguments A #table or any field. -- @param Arguments A #table or any field.
function BASE:T3( Arguments ) function BASE:T3( Arguments )
if BASE.Debug and _TraceOnOff then if BASE.Debug and _TraceOnOff == true and _TraceLevel >= 3 then
local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" ) local DebugInfoCurrent = BASE.Debug.getinfo( 2, "nl" )
local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" ) local DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1314,7 +1416,7 @@ function BASE:E( Arguments )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) )
else else
env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, BASE:_Serialize(Arguments) ) )
end end
end end
@@ -1341,39 +1443,8 @@ function BASE:I( Arguments )
env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "I", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "I", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) )
else else
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, UTILS.BasicSerialize( Arguments ) ) ) env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, BASE:_Serialize(Arguments)) )
end end
end end
--- old stuff
-- function BASE:_Destructor()
-- --self:E("_Destructor")
--
-- --self:EventRemoveAll()
-- end
-- THIS IS WHY WE NEED LUA 5.2 ...
-- function BASE:_SetDestructor()
--
-- -- TODO: Okay, this is really technical...
-- -- When you set a proxy to a table to catch __gc, weak tables don't behave like weak...
-- -- Therefore, I am parking this logic until I've properly discussed all this with the community.
--
-- local proxy = newproxy(true)
-- local proxyMeta = getmetatable(proxy)
--
-- proxyMeta.__gc = function ()
-- env.info("In __gc for " .. self:GetClassNameAndID() )
-- if self._Destructor then
-- self:_Destructor()
-- end
-- end
--
-- -- keep the userdata from newproxy reachable until the object
-- -- table is about to be garbage-collected - then the __gc hook
-- -- will be invoked and the destructor called
-- rawset( self, '__proxy', proxy )
--
-- end

View File

@@ -8,6 +8,10 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Core/Beacon)
--
-- ===
--
-- ### Authors: Hugues "Grey_Echo" Bousquet, funkyfranky -- ### Authors: Hugues "Grey_Echo" Bousquet, funkyfranky
-- --
-- @module Core.Beacon -- @module Core.Beacon
@@ -34,11 +38,13 @@
-- @type BEACON -- @type BEACON
-- @field #string ClassName Name of the class "BEACON". -- @field #string ClassName Name of the class "BEACON".
-- @field Wrapper.Controllable#CONTROLLABLE Positionable The @{Wrapper.Controllable#CONTROLLABLE} that will receive radio capabilities. -- @field Wrapper.Controllable#CONTROLLABLE Positionable The @{Wrapper.Controllable#CONTROLLABLE} that will receive radio capabilities.
-- @field #number UniqueName Counter to make the unique naming work.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
BEACON = { BEACON = {
ClassName = "BEACON", ClassName = "BEACON",
Positionable = nil, Positionable = nil,
name = nil, name = nil,
UniqueName = 0,
} }
--- Beacon types supported by DCS. --- Beacon types supported by DCS.
@@ -286,6 +292,7 @@ end
-- myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon -- myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon
function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration)
self:F({TACANChannel, Message, Bearing, BeaconDuration}) self:F({TACANChannel, Message, Bearing, BeaconDuration})
self:E("This method is DEPRECATED! Please use ActivateTACAN() instead.")
local IsValid = true local IsValid = true
@@ -380,6 +387,8 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
self:F({FileName, Frequency, Modulation, Power, BeaconDuration}) self:F({FileName, Frequency, Modulation, Power, BeaconDuration})
local IsValid = false local IsValid = false
Modulation = Modulation or radio.modulation.AM
-- Check the filename -- Check the filename
if type(FileName) == "string" then if type(FileName) == "string" then
if FileName:find(".ogg") or FileName:find(".wav") then if FileName:find(".ogg") or FileName:find(".wav") then
@@ -390,7 +399,7 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
end end
end end
if not IsValid then if not IsValid then
self:E({"File name invalid. Maybe something wrong with the extension ? ", FileName}) self:E({"File name invalid. Maybe something wrong with the extension? ", FileName})
end end
-- Check the Frequency -- Check the Frequency
@@ -416,7 +425,9 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
if IsValid then if IsValid then
self:T2({"Activating Beacon on ", Frequency, Modulation}) self:T2({"Activating Beacon on ", Frequency, Modulation})
-- Note that this is looped. I have to give this transmission a unique name, I use the class ID -- Note that this is looped. I have to give this transmission a unique name, I use the class ID
trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power, tostring(self.ID)) BEACON.UniqueName = BEACON.UniqueName + 1
self.BeaconName = "MooseBeacon"..tostring(BEACON.UniqueName)
trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power, self.BeaconName)
if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD
SCHEDULER:New( nil, SCHEDULER:New( nil,
@@ -425,6 +436,7 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
end, {}, BeaconDuration) end, {}, BeaconDuration)
end end
end end
return self
end end
--- Stops the Radio Beacon --- Stops the Radio Beacon
@@ -433,7 +445,7 @@ end
function BEACON:StopRadioBeacon() function BEACON:StopRadioBeacon()
self:F() self:F()
-- The unique name of the transmission is the class ID -- The unique name of the transmission is the class ID
trigger.action.stopRadioTransmission(tostring(self.ID)) trigger.action.stopRadioTransmission(self.BeaconName)
return self return self
end end

View File

@@ -20,7 +20,7 @@
-- --
-- @module Core.ClientMenu -- @module Core.ClientMenu
-- @image Core_Menu.JPG -- @image Core_Menu.JPG
-- last change: Oct 2023 -- last change: May 2024
-- TODO -- TODO
---------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------
@@ -51,6 +51,7 @@
-- @field #boolean Generic -- @field #boolean Generic
-- @field #boolean debug -- @field #boolean debug
-- @field #CLIENTMENUMANAGER Controller -- @field #CLIENTMENUMANAGER Controller
-- @field #active boolean
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- ---
@@ -58,7 +59,7 @@
CLIENTMENU = { CLIENTMENU = {
ClassName = "CLIENTMENUE", ClassName = "CLIENTMENUE",
lid = "", lid = "",
version = "0.1.1", version = "0.1.2",
name = nil, name = nil,
path = nil, path = nil,
group = nil, group = nil,
@@ -70,6 +71,7 @@ CLIENTMENU = {
debug = false, debug = false,
Controller = nil, Controller = nil,
groupname = nil, groupname = nil,
active = false,
} }
--- ---
@@ -78,7 +80,7 @@ CLIENTMENU_ID = 0
--- Create an new CLIENTMENU object. --- Create an new CLIENTMENU object.
-- @param #CLIENTMENU self -- @param #CLIENTMENU self
-- @param Wrapper.Client#CLIENT Client The client for whom this entry is. -- @param Wrapper.Client#CLIENT Client The client for whom this entry is. Leave as nil for a generic entry.
-- @param #string Text Text of the F10 menu entry. -- @param #string Text Text of the F10 menu entry.
-- @param #CLIENTMENU Parent The parent menu entry. -- @param #CLIENTMENU Parent The parent menu entry.
-- @param #string Function (optional) Function to call when the entry is used. -- @param #string Function (optional) Function to call when the entry is used.
@@ -114,7 +116,7 @@ function CLIENTMENU:NewEntry(Client,Text,Parent,Function,...)
if self.Functionargs and self.debug then if self.Functionargs and self.debug then
self:T({"Functionargs",self.Functionargs}) self:T({"Functionargs",self.Functionargs})
end end
if not self.Generic then if not self.Generic and self.active == false then
if Function ~= nil then if Function ~= nil then
local ErrorHandler = function( errmsg ) local ErrorHandler = function( errmsg )
env.info( "MOOSE Error in CLIENTMENU COMMAND function: " .. errmsg ) env.info( "MOOSE Error in CLIENTMENU COMMAND function: " .. errmsg )
@@ -133,8 +135,10 @@ function CLIENTMENU:NewEntry(Client,Text,Parent,Function,...)
end end
end end
self.path = missionCommands.addCommandForGroup(self.GroupID,Text,self.parentpath, self.CallHandler) self.path = missionCommands.addCommandForGroup(self.GroupID,Text,self.parentpath, self.CallHandler)
self.active = true
else else
self.path = missionCommands.addSubMenuForGroup(self.GroupID,Text,self.parentpath) self.path = missionCommands.addSubMenuForGroup(self.GroupID,Text,self.parentpath)
self.active = true
end end
else else
if self.parentpath then if self.parentpath then
@@ -200,6 +204,7 @@ function CLIENTMENU:RemoveF10()
if not status then if not status then
self:I(string.format("**** Error Removing Menu Entry %s for %s!",tostring(self.name),self.groupname)) self:I(string.format("**** Error Removing Menu Entry %s for %s!",tostring(self.name),self.groupname))
end end
self.active = false
end end
return self return self
end end
@@ -324,6 +329,22 @@ end
-- --
-- Many functions can either change the tree for one client or for all clients. -- Many functions can either change the tree for one client or for all clients.
-- --
-- ## Conceptual remarks
--
-- There's a couple of things to fully understand:
--
-- 1) **CLIENTMENUMANAGER** manages a set of entries from **CLIENTMENU**, it's main purpose is to administer the *shadow menu tree*, ie. a menu structure which is not
-- (yet) visible to any client
-- 2) The entries are **CLIENTMENU** objects, which are linked in a tree form. There's two ways to create them:
-- A) in the manager with ":NewEntry()" which initially
-- adds it to the shadow menu **only**
-- B) stand-alone directly as `CLIENTMENU:NewEntry()` - here it depends on whether or not you gave a CLIENT object if the entry is created as generic entry or pushed
-- a **specific** client. **Be aware** though that the entries are not managed by the CLIENTMANAGER before the next step!
-- A generic entry can be added to the manager (and the shadow tree) with `:AddEntry()` - this will also push it to all clients(!) if no client is given, or a specific client only.
-- 3) Pushing only works for alive clients.
-- 4) Live and shadow tree entries are managed via the CLIENTMENUMANAGER object.
-- 5) `Propagate()`refreshes the menu tree for all, or a single client.
--
-- ## Create a base reference tree and send to all clients -- ## Create a base reference tree and send to all clients
-- --
-- local clientset = SET_CLIENT:New():FilterStart() -- local clientset = SET_CLIENT:New():FilterStart()
@@ -396,7 +417,7 @@ end
CLIENTMENUMANAGER = { CLIENTMENUMANAGER = {
ClassName = "CLIENTMENUMANAGER", ClassName = "CLIENTMENUMANAGER",
lid = "", lid = "",
version = "0.1.4", version = "0.1.6",
name = nil, name = nil,
clientset = nil, clientset = nil,
menutree = {}, menutree = {},
@@ -492,7 +513,7 @@ function CLIENTMENUMANAGER:_EventHandler(EventData)
return self return self
end end
--- Set this Client Manager to auto-propagate menus to newly joined players. Useful if you have **one** menu structure only. --- Set this Client Manager to auto-propagate menus **once** to newly joined players. Useful if you have **one** menu structure only. Does not automatically push follow-up changes to the client(s).
-- @param #CLIENTMENUMANAGER self -- @param #CLIENTMENUMANAGER self
-- @return #CLIENTMENUMANAGER self -- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:InitAutoPropagation() function CLIENTMENUMANAGER:InitAutoPropagation()
@@ -507,7 +528,7 @@ function CLIENTMENUMANAGER:InitAutoPropagation()
return self return self
end end
--- Create a new entry in the generic structure. --- Create a new entry in the **generic** structure.
-- @param #CLIENTMENUMANAGER self -- @param #CLIENTMENUMANAGER self
-- @param #string Text Text of the F10 menu entry. -- @param #string Text Text of the F10 menu entry.
-- @param #CLIENTMENU Parent The parent menu entry. -- @param #CLIENTMENU Parent The parent menu entry.
@@ -660,6 +681,7 @@ end
function CLIENTMENUMANAGER:Propagate(Client) function CLIENTMENUMANAGER:Propagate(Client)
self:T(self.lid.."Propagate") self:T(self.lid.."Propagate")
--self:I(UTILS.PrintTableToLog(Client,1)) --self:I(UTILS.PrintTableToLog(Client,1))
local knownunits = {} -- track so we can ID multi seated
local Set = self.clientset.Set local Set = self.clientset.Set
if Client then if Client then
Set = {Client} Set = {Client}
@@ -668,34 +690,42 @@ function CLIENTMENUMANAGER:Propagate(Client)
for _,_client in pairs(Set) do for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then if client and client:IsAlive() then
local playerunit = client:GetName()
--local playergroup = client:GetGroup()
local playername = client:GetPlayerName() or "none" local playername = client:GetPlayerName() or "none"
if not self.playertree[playername] then if not knownunits[playerunit] then
self.playertree[playername] = {} knownunits[playerunit] = true
end else
for level,branch in pairs (self.menutree) do self:I("Player in multi seat unit: "..playername)
self:T("Building branch:" .. level) break -- multi seat already build
for _,leaf in pairs(branch) do end
self:T("Building leaf:" .. leaf) if not self.playertree[playername] then
local entry = self:FindEntryByUUID(leaf) self.playertree[playername] = {}
if entry then end
self:T("Found generic entry:" .. entry.UUID) for level,branch in pairs (self.menutree) do
local parent = nil self:T("Building branch:" .. level)
if entry.Parent and entry.Parent.UUID then for _,leaf in pairs(branch) do
parent = self.playertree[playername][entry.Parent.UUID] or self:FindEntryByUUID(entry.Parent.UUID) self:T("Building leaf:" .. leaf)
end local entry = self:FindEntryByUUID(leaf)
self.playertree[playername][entry.UUID] = CLIENTMENU:NewEntry(client,entry.name,parent,entry.Function,unpack(entry.Functionargs)) if entry then
self.playertree[playername][entry.UUID].Once = entry.Once self:T("Found generic entry:" .. entry.UUID)
else local parent = nil
self:T("NO generic entry for:" .. leaf) if entry.Parent and entry.Parent.UUID then
parent = self.playertree[playername][entry.Parent.UUID] or self:FindEntryByUUID(entry.Parent.UUID)
end 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
end end
end end
return self return self
end end
--- Push a single previously created entry into the menu structure of all clients. --- Push a single previously created entry into the F10 menu structure of all clients.
-- @param #CLIENTMENUMANAGER self -- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry to add. -- @param #CLIENTMENU Entry The entry to add.
-- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client. -- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client.
@@ -703,13 +733,21 @@ end
function CLIENTMENUMANAGER:AddEntry(Entry,Client) function CLIENTMENUMANAGER:AddEntry(Entry,Client)
self:T(self.lid.."AddEntry") self:T(self.lid.."AddEntry")
local Set = self.clientset.Set local Set = self.clientset.Set
local knownunits = {}
if Client then if Client then
Set = {Client} Set = {Client}
end end
for _,_client in pairs(Set) do for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then if client and client:IsAlive() then
local playername = client:GetPlayerName() local playername = client:GetPlayerName() or "None"
local unitname = client:GetName()
if not knownunits[unitname] then
knownunits[unitname] = true
else
self:I("Player in multi seat unit: "..playername)
break
end
if Entry then if Entry then
self:T("Adding generic entry:" .. Entry.UUID) self:T("Adding generic entry:" .. Entry.UUID)
local parent = nil local parent = nil

View File

@@ -20,6 +20,7 @@
-- * Manage database of hits to units and statics. -- * Manage database of hits to units and statics.
-- * Manage database of destroys of units and statics. -- * Manage database of destroys of units and statics.
-- * Manage database of @{Core.Zone#ZONE_BASE} objects. -- * Manage database of @{Core.Zone#ZONE_BASE} objects.
-- * Manage database of @{Wrapper.DynamicCargo#DYNAMICCARGO} objects alive in the mission.
-- --
-- === -- ===
-- --
@@ -37,6 +38,9 @@
-- @field #table Templates Templates: Units, Groups, Statics, ClientsByName, ClientsByID. -- @field #table Templates Templates: Units, Groups, Statics, ClientsByName, ClientsByID.
-- @field #table CLIENTS Clients. -- @field #table CLIENTS Clients.
-- @field #table STORAGES DCS warehouse storages. -- @field #table STORAGES DCS warehouse storages.
-- @field #table STNS Used Link16 octal numbers for F16/15/18/AWACS planes.
-- @field #table SADL Used Link16 octal numbers for A10/C-II planes.
-- @field #table DYNAMICCARGO Dynamic Cargo objects.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- Contains collections of wrapper objects defined within MOOSE that reflect objects within the simulator. --- Contains collections of wrapper objects defined within MOOSE that reflect objects within the simulator.
@@ -52,6 +56,7 @@
-- * PLAYERS -- * PLAYERS
-- * CARGOS -- * CARGOS
-- * STORAGES (DCS warehouses) -- * STORAGES (DCS warehouses)
-- * DYNAMICCARGO
-- --
-- On top, for internal MOOSE administration purposes, the DATABASE administers the Unit and Group TEMPLATES as defined within the Mission Editor. -- On top, for internal MOOSE administration purposes, the DATABASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.
-- --
@@ -93,6 +98,9 @@ DATABASE = {
OPSZONES = {}, OPSZONES = {},
PATHLINES = {}, PATHLINES = {},
STORAGES = {}, STORAGES = {},
STNS={},
SADL={},
DYNAMICCARGO={},
} }
local _DATABASECoalition = local _DATABASECoalition =
@@ -131,7 +139,7 @@ function DATABASE:New()
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash ) self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash ) self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.RemoveUnit, self._EventOnDeadOrCrash ) self:HandleEvent( EVENTS.RemoveUnit, self._EventOnDeadOrCrash )
--self:HandleEvent( EVENTS.UnitLost, self._EventOnDeadOrCrash ) -- DCS 2.7.1 for Aerial units no dead event ATM self:HandleEvent( EVENTS.UnitLost, self._EventOnDeadOrCrash ) -- DCS 2.7.1 for Aerial units no dead event ATM
self:HandleEvent( EVENTS.Hit, self.AccountHits ) self:HandleEvent( EVENTS.Hit, self.AccountHits )
self:HandleEvent( EVENTS.NewCargo ) self:HandleEvent( EVENTS.NewCargo )
self:HandleEvent( EVENTS.DeleteCargo ) self:HandleEvent( EVENTS.DeleteCargo )
@@ -139,6 +147,8 @@ function DATABASE:New()
self:HandleEvent( EVENTS.DeleteZone ) self:HandleEvent( EVENTS.DeleteZone )
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) -- This is not working anymore!, handling this through the birth event. --self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) -- This is not working anymore!, handling this through the birth event.
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit ) self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
-- DCS 2.9.7 Moose own dynamic cargo events
self:HandleEvent( EVENTS.DynamicCargoRemoved, self._EventOnDynamicCargoRemoved)
self:_RegisterTemplates() self:_RegisterTemplates()
self:_RegisterGroupsAndUnits() self:_RegisterGroupsAndUnits()
@@ -166,24 +176,30 @@ end
--- Adds a Unit based on the Unit Name in the DATABASE. --- Adds a Unit based on the Unit Name in the DATABASE.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string DCSUnitName Unit name. -- @param #string DCSUnitName Unit name.
-- @param #boolean force
-- @return Wrapper.Unit#UNIT The added unit. -- @return Wrapper.Unit#UNIT The added unit.
function DATABASE:AddUnit( DCSUnitName ) function DATABASE:AddUnit( DCSUnitName, force )
if not self.UNITS[DCSUnitName] then local DCSunitName = DCSUnitName
if type(DCSunitName) == "number" then DCSunitName = string.format("%d",DCSUnitName) end
if not self.UNITS[DCSunitName] or force == true then
-- Debug info. -- Debug info.
self:T( { "Add UNIT:", DCSUnitName } ) self:T( { "Add UNIT:", DCSunitName } )
-- Register unit -- Register unit
self.UNITS[DCSUnitName]=UNIT:Register(DCSUnitName) self.UNITS[DCSunitName]=UNIT:Register(DCSunitName)
end end
return self.UNITS[DCSUnitName] return self.UNITS[DCSunitName]
end end
--- Deletes a Unit from the DATABASE based on the Unit Name. --- Deletes a Unit from the DATABASE based on the Unit Name.
-- @param #DATABASE self -- @param #DATABASE self
function DATABASE:DeleteUnit( DCSUnitName ) function DATABASE:DeleteUnit( DCSUnitName )
self:T("DeleteUnit "..tostring(DCSUnitName))
self.UNITS[DCSUnitName] = nil self.UNITS[DCSUnitName] = nil
end end
@@ -218,6 +234,34 @@ function DATABASE:FindStatic( StaticName )
return StaticFound return StaticFound
end end
--- Add a DynamicCargo to the database.
-- @param #DATABASE self
-- @param #string Name Name of the dynamic cargo.
-- @return Wrapper.DynamicCargo#DYNAMICCARGO The dynamic cargo object.
function DATABASE:AddDynamicCargo( Name )
if not self.DYNAMICCARGO[Name] then
self.DYNAMICCARGO[Name] = DYNAMICCARGO:Register(Name)
return self.DYNAMICCARGO[Name]
end
return nil
end
--- Finds a DYNAMICCARGO based on the Dynamic Cargo Name.
-- @param #DATABASE self
-- @param #string DynamicCargoName
-- @return Wrapper.DynamicCargo#DYNAMICCARGO The found DYNAMICCARGO.
function DATABASE:FindDynamicCargo( DynamicCargoName )
local StaticFound = self.DYNAMICCARGO[DynamicCargoName]
return StaticFound
end
--- Deletes a DYNAMICCARGO from the DATABASE based on the Dynamic Cargo Name.
-- @param #DATABASE self
function DATABASE:DeleteDynamicCargo( DynamicCargoName )
self.DYNAMICCARGO[DynamicCargoName] = nil
return self
end
--- Adds a Airbase based on the Airbase Name in the DATABASE. --- Adds a Airbase based on the Airbase Name in the DATABASE.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase. -- @param #string AirbaseName The name of the airbase.
@@ -489,8 +533,30 @@ do -- Zones and Pathlines
-- Create new polygon zone. -- Create new polygon zone.
local Zone=ZONE_POLYGON:NewFromPointsArray(ZoneName, points) local Zone=ZONE_POLYGON:NewFromPointsArray(ZoneName, points)
--Zone.DrawID = objectID
-- Set color. -- Set color.
Zone:SetColor({1, 0, 0}, 0.15) Zone:SetColor({1, 0, 0}, 0.15)
Zone:SetFillColor({1, 0, 0}, 0.15)
if objectData.colorString then
-- eg colorString = 0xff0000ff
local color = string.gsub(objectData.colorString,"^0x","")
local r = tonumber(string.sub(color,1,2),16)/255
local g = tonumber(string.sub(color,3,4),16)/255
local b = tonumber(string.sub(color,5,6),16)/255
local a = tonumber(string.sub(color,7,8),16)/255
Zone:SetColor({r, g, b}, a)
end
if objectData.fillColorString then
-- eg fillColorString = 0xff00004b
local color = string.gsub(objectData.colorString,"^0x","")
local r = tonumber(string.sub(color,1,2),16)/255
local g = tonumber(string.sub(color,3,4),16)/255
local b = tonumber(string.sub(color,5,6),16)/255
local a = tonumber(string.sub(color,7,8),16)/255
Zone:SetFillColor({r, g, b}, a)
end
-- Store in DB. -- Store in DB.
self.ZONENAMES[ZoneName] = ZoneName self.ZONENAMES[ZoneName] = ZoneName
@@ -533,6 +599,25 @@ do -- Zones and Pathlines
-- Set color. -- Set color.
Zone:SetColor({1, 0, 0}, 0.15) Zone:SetColor({1, 0, 0}, 0.15)
if objectData.colorString then
-- eg colorString = 0xff0000ff
local color = string.gsub(objectData.colorString,"^0x","")
local r = tonumber(string.sub(color,1,2),16)/255
local g = tonumber(string.sub(color,3,4),16)/255
local b = tonumber(string.sub(color,5,6),16)/255
local a = tonumber(string.sub(color,7,8),16)/255
Zone:SetColor({r, g, b}, a)
end
if objectData.fillColorString then
-- eg fillColorString = 0xff00004b
local color = string.gsub(objectData.colorString,"^0x","")
local r = tonumber(string.sub(color,1,2),16)/255
local g = tonumber(string.sub(color,3,4),16)/255
local b = tonumber(string.sub(color,5,6),16)/255
local a = tonumber(string.sub(color,7,8),16)/255
Zone:SetFillColor({r, g, b}, a)
end
-- Store in DB. -- Store in DB.
self.ZONENAMES[ZoneName] = ZoneName self.ZONENAMES[ZoneName] = ZoneName
@@ -756,7 +841,7 @@ end -- cargo
--- Finds a CLIENT based on the ClientName. --- Finds a CLIENT based on the ClientName.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string ClientName -- @param #string ClientName - Note this is the UNIT name of the client!
-- @return Wrapper.Client#CLIENT The found CLIENT. -- @return Wrapper.Client#CLIENT The found CLIENT.
function DATABASE:FindClient( ClientName ) function DATABASE:FindClient( ClientName )
@@ -768,14 +853,19 @@ end
--- Adds a CLIENT based on the ClientName in the DATABASE. --- Adds a CLIENT based on the ClientName in the DATABASE.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string ClientName Name of the Client unit. -- @param #string ClientName Name of the Client unit.
-- @param #boolean Force (optional) Force registration of client.
-- @return Wrapper.Client#CLIENT The client object. -- @return Wrapper.Client#CLIENT The client object.
function DATABASE:AddClient( ClientName ) function DATABASE:AddClient( ClientName, Force )
if not self.CLIENTS[ClientName] then local DCSUnitName = ClientName
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
if type(DCSUnitName) == "number" then DCSUnitName = string.format("%d",ClientName) end
if not self.CLIENTS[DCSUnitName] or Force == true then
self.CLIENTS[DCSUnitName] = CLIENT:Register( DCSUnitName )
end end
return self.CLIENTS[ClientName] return self.CLIENTS[DCSUnitName]
end end
@@ -786,15 +876,25 @@ end
function DATABASE:FindGroup( GroupName ) function DATABASE:FindGroup( GroupName )
local GroupFound = self.GROUPS[GroupName] local GroupFound = self.GROUPS[GroupName]
if GroupFound == nil and GroupName ~= nil and self.Templates.Groups[GroupName] == nil then
-- see if the group exists in the API, maybe a dynamic slot
self:_RegisterDynamicGroup(GroupName)
return self.GROUPS[GroupName]
end
return GroupFound return GroupFound
end end
--- Adds a GROUP based on the GroupName in the DATABASE. --- Adds a GROUP based on the GroupName in the DATABASE.
-- @param #DATABASE self -- @param #DATABASE self
function DATABASE:AddGroup( GroupName ) -- @param #string GroupName
-- @param #boolean force
-- @return Wrapper.Group#GROUP The Group
function DATABASE:AddGroup( GroupName, force )
if not self.GROUPS[GroupName] then if not self.GROUPS[GroupName] or force == true then
self:T( { "Add GROUP:", GroupName } ) self:T( { "Add GROUP:", GroupName } )
self.GROUPS[GroupName] = GROUP:Register( GroupName ) self.GROUPS[GroupName] = GROUP:Register( GroupName )
end end
@@ -806,8 +906,10 @@ end
-- @param #DATABASE self -- @param #DATABASE self
function DATABASE:AddPlayer( UnitName, PlayerName ) function DATABASE:AddPlayer( UnitName, PlayerName )
if type(UnitName) == "number" then UnitName = string.format("%d",UnitName) end
if PlayerName then if PlayerName then
self:T( { "Add player for unit:", UnitName, PlayerName } ) self:I( { "Add player for unit:", UnitName, PlayerName } )
self.PLAYERS[PlayerName] = UnitName self.PLAYERS[PlayerName] = UnitName
self.PLAYERUNITS[PlayerName] = self:FindUnit( UnitName ) self.PLAYERUNITS[PlayerName] = self:FindUnit( UnitName )
self.PLAYERSJOINED[PlayerName] = PlayerName self.PLAYERSJOINED[PlayerName] = PlayerName
@@ -815,6 +917,21 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
end end
--- Get a PlayerName by UnitName from PLAYERS in DATABASE.
-- @param #DATABASE self
-- @return #string PlayerName
-- @return Wrapper.Unit#UNIT PlayerUnit
function DATABASE:_FindPlayerNameByUnitName(UnitName)
if UnitName then
for playername,unitname in pairs(self.PLAYERS) do
if unitname == UnitName and self.PLAYERUNITS[playername] and self.PLAYERUNITS[playername]:IsAlive() then
return playername, self.PLAYERUNITS[playername]
end
end
end
return nil
end
--- Deletes a player from the DATABASE based on the Player Name. --- Deletes a player from the DATABASE based on the Player Name.
-- @param #DATABASE self -- @param #DATABASE self
function DATABASE:DeletePlayer( UnitName, PlayerName ) function DATABASE:DeletePlayer( UnitName, PlayerName )
@@ -887,7 +1004,7 @@ function DATABASE:Spawn( SpawnTemplate )
SpawnTemplate.CountryID = nil SpawnTemplate.CountryID = nil
SpawnTemplate.CategoryID = nil SpawnTemplate.CategoryID = nil
self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID ) self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID, SpawnTemplate.name )
self:T3( SpawnTemplate ) self:T3( SpawnTemplate )
coalition.addGroup( SpawnCountryID, SpawnCategoryID, SpawnTemplate ) coalition.addGroup( SpawnCountryID, SpawnCategoryID, SpawnTemplate )
@@ -989,6 +1106,27 @@ function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionSide, Category
self.Templates.ClientsByID[UnitTemplate.unitId] = UnitTemplate self.Templates.ClientsByID[UnitTemplate.unitId] = UnitTemplate
end end
if UnitTemplate.AddPropAircraft then
if UnitTemplate.AddPropAircraft.STN_L16 then
local stn = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.STN_L16)
if stn == nil or stn < 1 then
self:E("WARNING: Invalid STN "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
else
self.STNS[stn] = UnitTemplate.name
self:I("Register STN "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
end
end
if UnitTemplate.AddPropAircraft.SADL_TN then
local sadl = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.SADL_TN)
if sadl == nil or sadl < 1 then
self:E("WARNING: Invalid SADL "..tostring(UnitTemplate.AddPropAircraft.SADL_TN).." for ".. UnitTemplate.name)
else
self.SADL[sadl] = UnitTemplate.name
self:I("Register SADL "..tostring(UnitTemplate.AddPropAircraft.SADL_TN).." for ".. UnitTemplate.name)
end
end
end
UnitNames[#UnitNames+1] = self.Templates.Units[UnitTemplate.name].UnitName UnitNames[#UnitNames+1] = self.Templates.Units[UnitTemplate.name].UnitName
end end
@@ -1002,15 +1140,92 @@ function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionSide, Category
) )
end end
--- Get next (consecutive) free STN as octal number.
-- @param #DATABASE self
-- @param #number octal Starting octal.
-- @param #string unitname Name of the associated unit.
-- @return #number Octal
function DATABASE:GetNextSTN(octal,unitname)
local first = UTILS.OctalToDecimal(octal) or 0
if self.STNS[first] == unitname then return octal end
local nextoctal = 77777
local found = false
if 32767-first < 10 then
first = 0
end
for i=first+1,32767 do
if self.STNS[i] == nil then
found = true
nextoctal = UTILS.DecimalToOctal(i)
self.STNS[i] = unitname
self:T("Register STN "..tostring(nextoctal).." for ".. unitname)
break
end
end
if not found then
self:E(string.format("WARNING: No next free STN past %05d found!",octal))
-- cleanup
local NewSTNS = {}
for _id,_name in pairs(self.STNS) do
if self.UNITS[_name] ~= nil then
NewSTNS[_id] = _name
end
end
self.STNS = nil
self.STNS = NewSTNS
end
return nextoctal
end
--- Get next (consecutive) free SADL as octal number.
-- @param #DATABASE self
-- @param #number octal Starting octal.
-- @param #string unitname Name of the associated unit.
-- @return #number Octal
function DATABASE:GetNextSADL(octal,unitname)
local first = UTILS.OctalToDecimal(octal) or 0
if self.SADL[first] == unitname then return octal end
local nextoctal = 7777
local found = false
if 4095-first < 10 then
first = 0
end
for i=first+1,4095 do
if self.STNS[i] == nil then
found = true
nextoctal = UTILS.DecimalToOctal(i)
self.SADL[i] = unitname
self:T("Register SADL "..tostring(nextoctal).." for ".. unitname)
break
end
end
if not found then
self:E(string.format("WARNING: No next free SADL past %04d found!",octal))
-- cleanup
local NewSTNS = {}
for _id,_name in pairs(self.SADL) do
if self.UNITS[_name] ~= nil then
NewSTNS[_id] = _name
end
end
self.SADL = nil
self.SADL = NewSTNS
end
return nextoctal
end
--- Get group template. --- Get group template.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string GroupName Group name. -- @param #string GroupName Group name.
-- @return #table Group template table. -- @return #table Group template table.
function DATABASE:GetGroupTemplate( GroupName ) function DATABASE:GetGroupTemplate( GroupName )
local GroupTemplate = self.Templates.Groups[GroupName].Template local GroupTemplate=nil
GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID if self.Templates.Groups[GroupName] then
GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID GroupTemplate = self.Templates.Groups[GroupName].Template
GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID
GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID
GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID
end
return GroupTemplate return GroupTemplate
end end
@@ -1055,6 +1270,43 @@ function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, Category
return self return self
end end
--- Get a generic static cargo group template from scratch for dynamic cargo spawns register. Does not register the template!
-- @param #DATABASE self
-- @param #string Name Name of the static.
-- @param #string Typename Typename of the static. Defaults to "container_cargo".
-- @param #number Mass Mass of the static. Defaults to 0.
-- @param #number Coalition Coalition of the static. Defaults to coalition.side.BLUE.
-- @param #number Country Country of the static. Defaults to country.id.GERMANY.
-- @return #table Static template table.
function DATABASE:_GetGenericStaticCargoGroupTemplate(Name,Typename,Mass,Coalition,Country)
local StaticTemplate = {}
StaticTemplate.name = Name or "None"
StaticTemplate.units = { [1] = {
name = Name,
resourcePayload = {
["weapons"] = {},
["aircrafts"] = {},
["gasoline"] = 0,
["diesel"] = 0,
["methanol_mixture"] = 0,
["jet_fuel"] = 0,
},
["mass"] = Mass or 0,
["category"] = "Cargos",
["canCargo"] = true,
["type"] = Typename or "container_cargo",
["rate"] = 100,
["y"] = 0,
["x"] = 0,
["heading"] = 0,
}}
StaticTemplate.CategoryID = "static"
StaticTemplate.CoalitionID = Coalition or coalition.side.BLUE
StaticTemplate.CountryID = Country or country.id.GERMANY
--UTILS.PrintTableToLog(StaticTemplate)
return StaticTemplate
end
--- Get static group template. --- Get static group template.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string StaticName Name of the static. -- @param #string StaticName Name of the static.
@@ -1128,7 +1380,11 @@ end
-- @param #string ClientName Name of the Client. -- @param #string ClientName Name of the Client.
-- @return #number Coalition ID. -- @return #number Coalition ID.
function DATABASE:GetCoalitionFromClientTemplate( ClientName ) function DATABASE:GetCoalitionFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CoalitionID if self.Templates.ClientsByName[ClientName] then
return self.Templates.ClientsByName[ClientName].CoalitionID
end
self:E("WARNING: Template does not exist for client "..tostring(ClientName))
return nil
end end
--- Get category ID from client name. --- Get category ID from client name.
@@ -1136,7 +1392,11 @@ end
-- @param #string ClientName Name of the Client. -- @param #string ClientName Name of the Client.
-- @return #number Category ID. -- @return #number Category ID.
function DATABASE:GetCategoryFromClientTemplate( ClientName ) function DATABASE:GetCategoryFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CategoryID if self.Templates.ClientsByName[ClientName] then
return self.Templates.ClientsByName[ClientName].CategoryID
end
self:E("WARNING: Template does not exist for client "..tostring(ClientName))
return nil
end end
--- Get country ID from client name. --- Get country ID from client name.
@@ -1144,7 +1404,11 @@ end
-- @param #string ClientName Name of the Client. -- @param #string ClientName Name of the Client.
-- @return #number Country ID. -- @return #number Country ID.
function DATABASE:GetCountryFromClientTemplate( ClientName ) function DATABASE:GetCountryFromClientTemplate( ClientName )
return self.Templates.ClientsByName[ClientName].CountryID if self.Templates.ClientsByName[ClientName] then
return self.Templates.ClientsByName[ClientName].CountryID
end
self:E("WARNING: Template does not exist for client "..tostring(ClientName))
return nil
end end
--- Airbase --- Airbase
@@ -1190,6 +1454,36 @@ function DATABASE:_RegisterPlayers()
return self return self
end end
--- Private method that registers a single dynamic slot Group and Units within in the mission.
-- @param #DATABASE self
-- @return #DATABASE self
function DATABASE:_RegisterDynamicGroup(Groupname)
local DCSGroup = Group.getByName(Groupname)
if DCSGroup and DCSGroup:isExist() then
-- Group name.
local DCSGroupName = DCSGroup:getName()
-- Add group.
self:I(string.format("Register Group: %s", tostring(DCSGroupName)))
self:AddGroup( DCSGroupName, true )
-- Loop over units in group.
for DCSUnitId, DCSUnit in pairs( DCSGroup:getUnits() ) do
-- Get unit name.
local DCSUnitName = DCSUnit:getName()
-- Add unit.
self:I(string.format("Register Unit: %s", tostring(DCSUnitName)))
self:AddUnit( tostring(DCSUnitName), true )
end
else
self:E({"Group does not exist: ", DCSGroup})
end
return self
end
--- Private method that registers all Groups and Units within in the mission. --- Private method that registers all Groups and Units within in the mission.
-- @param #DATABASE self -- @param #DATABASE self
@@ -1303,8 +1597,16 @@ function DATABASE:_RegisterAirbase(airbase)
-- Unique ID. -- Unique ID.
local airbaseUID=airbase:GetID(true) local airbaseUID=airbase:GetID(true)
local typename = airbase:GetTypeName()
local category = airbase.category
if category == Airbase.Category.SHIP and typename == "FARP_SINGLE_01" then
category = Airbase.Category.HELIPAD
end
-- Debug output. -- Debug output.
local text=string.format("Register %s: %s (UID=%d), Runways=%d, Parking=%d [", AIRBASE.CategoryName[airbase.category], tostring(DCSAirbaseName), airbaseUID, #airbase.runways, airbase.NparkingTotal) local text=string.format("Register %s: %s (UID=%d), Runways=%d, Parking=%d [", AIRBASE.CategoryName[category], tostring(DCSAirbaseName), airbaseUID, #airbase.runways, airbase.NparkingTotal)
for _,terminalType in pairs(AIRBASE.TerminalType) do for _,terminalType in pairs(AIRBASE.TerminalType) do
if airbase.NparkingTerminal and airbase.NparkingTerminal[terminalType] then if airbase.NparkingTerminal and airbase.NparkingTerminal[terminalType] then
text=text..string.format("%d=%d ", terminalType, airbase.NparkingTerminal[terminalType]) text=text..string.format("%d=%d ", terminalType, airbase.NparkingTerminal[terminalType])
@@ -1325,7 +1627,7 @@ end
-- @param #DATABASE self -- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event -- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnBirth( Event ) function DATABASE:_EventOnBirth( Event )
self:F( { Event } ) self:T( { Event } )
if Event.IniDCSUnit then if Event.IniDCSUnit then
@@ -1334,6 +1636,16 @@ function DATABASE:_EventOnBirth( Event )
-- Add static object to DB. -- Add static object to DB.
self:AddStatic( Event.IniDCSUnitName ) self:AddStatic( Event.IniDCSUnitName )
elseif Event.IniObjectCategory == Object.Category.CARGO and string.match(Event.IniUnitName,".+|%d%d:%d%d|PKG%d+") then
-- Add dynamic cargo object to DB
local cargo = self:AddDynamicCargo(Event.IniDCSUnitName)
self:I(string.format("Adding dynamic cargo %s", tostring(Event.IniDCSUnitName)))
self:CreateEventNewDynamicCargo( cargo )
else else
if Event.IniObjectCategory == Object.Category.UNIT then if Event.IniObjectCategory == Object.Category.UNIT then
@@ -1355,8 +1667,8 @@ function DATABASE:_EventOnBirth( Event )
if Event.IniObjectCategory == Object.Category.UNIT then if Event.IniObjectCategory == Object.Category.UNIT then
Event.IniUnit = self:FindUnit( Event.IniDCSUnitName )
Event.IniGroup = self:FindGroup( Event.IniDCSGroupName ) Event.IniGroup = self:FindGroup( Event.IniDCSGroupName )
Event.IniUnit = self:FindUnit( Event.IniDCSUnitName )
-- Client -- Client
local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT
@@ -1374,8 +1686,8 @@ function DATABASE:_EventOnBirth( Event )
self:I(string.format("Player '%s' joined 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. -- Add client in case it does not exist already.
if not client then if client == nil or (client and client:CountPlayers() == 0) then
client=self:AddClient(Event.IniDCSUnitName) client=self:AddClient(Event.IniDCSUnitName, true)
end end
-- Add player. -- Add player.
@@ -1386,12 +1698,17 @@ function DATABASE:_EventOnBirth( Event )
self:AddPlayer( Event.IniUnitName, PlayerName ) self:AddPlayer( Event.IniUnitName, PlayerName )
end end
-- Player settings. local function SetPlayerSettings(self,PlayerName,IniUnit)
local Settings = SETTINGS:Set( PlayerName ) -- Player settings.
Settings:SetPlayerMenu(Event.IniUnit) local Settings = SETTINGS:Set( PlayerName )
--Settings:SetPlayerMenu(Event.IniUnit)
Settings:SetPlayerMenu(IniUnit)
-- Create an event.
self:CreateEventPlayerEnterAircraft(IniUnit)
--self:CreateEventPlayerEnterAircraft(Event.IniUnit)
end
-- Create an event. self:ScheduleOnce(1,SetPlayerSettings,self,PlayerName,Event.IniUnit)
self:CreateEventPlayerEnterAircraft(Event.IniUnit)
end end
@@ -1406,7 +1723,6 @@ end
-- @param #DATABASE self -- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event -- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnDeadOrCrash( Event ) function DATABASE:_EventOnDeadOrCrash( Event )
if Event.IniDCSUnit then if Event.IniDCSUnit then
local name=Event.IniDCSUnitName local name=Event.IniDCSUnitName
@@ -1447,7 +1763,8 @@ function DATABASE:_EventOnDeadOrCrash( Event )
-- Delete unit. -- Delete unit.
if self.UNITS[Event.IniDCSUnitName] then if self.UNITS[Event.IniDCSUnitName] then
self:DeleteUnit(Event.IniDCSUnitName) self:ScheduleOnce(1,self.DeleteUnit,self,Event.IniDCSUnitName)
--self:DeleteUnit(Event.IniDCSUnitName)
end end
-- Remove client players. -- Remove client players.
@@ -1514,6 +1831,15 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
end end
end end
--- Handles the OnDynamicCargoRemoved event to clean the active dynamic cargo table.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnDynamicCargoRemoved( Event )
self:T( { Event } )
if Event.IniDynamicCargoName then
self:DeleteDynamicCargo(Event.IniDynamicCargoName)
end
end
--- Handles the OnPlayerLeaveUnit event to clean the active players table. --- Handles the OnPlayerLeaveUnit event to clean the active players table.
-- @param #DATABASE self -- @param #DATABASE self
@@ -1537,7 +1863,7 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
if Event.IniObjectCategory == 1 then if Event.IniObjectCategory == 1 then
-- Try to get the player name. This can be buggy for multicrew aircraft! -- Try to get the player name. This can be buggy for multicrew aircraft!
local PlayerName = Event.IniUnit:GetPlayerName() or FindPlayerName(Event.IniUnitName) local PlayerName = Event.IniPlayerName or Event.IniUnit:GetPlayerName() or FindPlayerName(Event.IniUnitName)
if PlayerName then if PlayerName then
@@ -1555,6 +1881,7 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT
if client then if client then
client:RemovePlayer(PlayerName) client:RemovePlayer(PlayerName)
--self.PLAYERSETTINGS[PlayerName] = nil
end end
end end
@@ -1852,7 +2179,7 @@ end
--- Add a flight control to the data base. --- Add a flight control to the data base.
-- @param #DATABASE self -- @param #DATABASE self
-- @param Ops.FlightControl#FLIGHTCONTROL flightcontrol -- @param OPS.FlightControl#FLIGHTCONTROL flightcontrol
function DATABASE:AddFlightControl(flightcontrol) function DATABASE:AddFlightControl(flightcontrol)
self:F2( { flightcontrol } ) self:F2( { flightcontrol } )
self.FLIGHTCONTROLS[flightcontrol.airbasename]=flightcontrol self.FLIGHTCONTROLS[flightcontrol.airbasename]=flightcontrol
@@ -1861,7 +2188,7 @@ end
--- Get a flight control object from the data base. --- Get a flight control object from the data base.
-- @param #DATABASE self -- @param #DATABASE self
-- @param #string airbasename Name of the associated airbase. -- @param #string airbasename Name of the associated airbase.
-- @return Ops.FlightControl#FLIGHTCONTROL The FLIGHTCONTROL object.s -- @return OPS.FlightControl#FLIGHTCONTROL The FLIGHTCONTROL object.s
function DATABASE:GetFlightControl(airbasename) function DATABASE:GetFlightControl(airbasename)
return self.FLIGHTCONTROLS[airbasename] return self.FLIGHTCONTROLS[airbasename]
end end

View File

@@ -194,6 +194,11 @@ world.event.S_EVENT_NEW_ZONE_GOAL = world.event.S_EVENT_MAX + 1004
world.event.S_EVENT_DELETE_ZONE_GOAL = world.event.S_EVENT_MAX + 1005 world.event.S_EVENT_DELETE_ZONE_GOAL = world.event.S_EVENT_MAX + 1005
world.event.S_EVENT_REMOVE_UNIT = world.event.S_EVENT_MAX + 1006 world.event.S_EVENT_REMOVE_UNIT = world.event.S_EVENT_MAX + 1006
world.event.S_EVENT_PLAYER_ENTER_AIRCRAFT = world.event.S_EVENT_MAX + 1007 world.event.S_EVENT_PLAYER_ENTER_AIRCRAFT = world.event.S_EVENT_MAX + 1007
-- dynamic cargo
world.event.S_EVENT_NEW_DYNAMIC_CARGO = world.event.S_EVENT_MAX + 1008
world.event.S_EVENT_DYNAMIC_CARGO_LOADED = world.event.S_EVENT_MAX + 1009
world.event.S_EVENT_DYNAMIC_CARGO_UNLOADED = world.event.S_EVENT_MAX + 1010
world.event.S_EVENT_DYNAMIC_CARGO_REMOVED = world.event.S_EVENT_MAX + 1011
--- The different types of events supported by MOOSE. --- The different types of events supported by MOOSE.
@@ -261,17 +266,29 @@ EVENTS = {
SimulationStart = world.event.S_EVENT_SIMULATION_START or -1, SimulationStart = world.event.S_EVENT_SIMULATION_START or -1,
WeaponRearm = world.event.S_EVENT_WEAPON_REARM or -1, WeaponRearm = world.event.S_EVENT_WEAPON_REARM or -1,
WeaponDrop = world.event.S_EVENT_WEAPON_DROP or -1, WeaponDrop = world.event.S_EVENT_WEAPON_DROP or -1,
-- Added with DCS 2.9.0 -- Added with DCS 2.9.x
UnitTaskTimeout = world.event.S_EVENT_UNIT_TASK_TIMEOUT or -1, --UnitTaskTimeout = world.event.S_EVENT_UNIT_TASK_TIMEOUT or -1,
UnitTaskComplete = world.event.S_EVENT_UNIT_TASK_COMPLETE or -1,
UnitTaskStage = world.event.S_EVENT_UNIT_TASK_STAGE or -1, UnitTaskStage = world.event.S_EVENT_UNIT_TASK_STAGE or -1,
MacSubtaskScore = world.event.S_EVENT_MAC_SUBTASK_SCORE or -1, --MacSubtaskScore = world.event.S_EVENT_MAC_SUBTASK_SCORE or -1,
MacExtraScore = world.event.S_EVENT_MAC_EXTRA_SCORE or -1, MacExtraScore = world.event.S_EVENT_MAC_EXTRA_SCORE or -1,
MissionRestart = world.event.S_EVENT_MISSION_RESTART or -1, MissionRestart = world.event.S_EVENT_MISSION_RESTART or -1,
MissionWinner = world.event.S_EVENT_MISSION_WINNER or -1, MissionWinner = world.event.S_EVENT_MISSION_WINNER or -1,
PostponedTakeoff = world.event.S_EVENT_POSTPONED_TAKEOFF or -1, RunwayTakeoff = world.event.S_EVENT_RUNWAY_TAKEOFF or -1,
PostponedLand = world.event.S_EVENT_POSTPONED_LAND or -1, RunwayTouch = world.event.S_EVENT_RUNWAY_TOUCH or -1,
MacLMSRestart = world.event.S_EVENT_MAC_LMS_RESTART or -1,
SimulationFreeze = world.event.S_EVENT_SIMULATION_FREEZE or -1,
SimulationUnfreeze = world.event.S_EVENT_SIMULATION_UNFREEZE or -1,
HumanAircraftRepairStart = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_START or -1,
HumanAircraftRepairFinish = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH or -1,
-- dynamic cargo
NewDynamicCargo = world.event.S_EVENT_NEW_DYNAMIC_CARGO or -1,
DynamicCargoLoaded = world.event.S_EVENT_DYNAMIC_CARGO_LOADED or -1,
DynamicCargoUnloaded = world.event.S_EVENT_DYNAMIC_CARGO_UNLOADED or -1,
DynamicCargoRemoved = world.event.S_EVENT_DYNAMIC_CARGO_REMOVED or -1,
} }
--- The Event structure --- The Event structure
-- Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event: -- Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event:
-- --
@@ -327,6 +344,9 @@ EVENTS = {
-- --
-- @field Core.Zone#ZONE Zone The zone object. -- @field Core.Zone#ZONE Zone The zone object.
-- @field #string ZoneName The name of the zone. -- @field #string ZoneName The name of the zone.
--
-- @field Wrapper.DynamicCargo#DYNAMICCARGO IniDynamicCargo The dynamic cargo object.
-- @field #string IniDynamicCargoName The dynamic cargo unit name.
@@ -646,24 +666,24 @@ local _EVENTMETA = {
Text = "S_EVENT_WEAPON_DROP" Text = "S_EVENT_WEAPON_DROP"
}, },
-- DCS 2.9 -- DCS 2.9
[EVENTS.UnitTaskTimeout] = { --[EVENTS.UnitTaskTimeout] = {
Order = 1, -- Order = 1,
Side = "I", -- Side = "I",
Event = "OnEventUnitTaskTimeout", -- Event = "OnEventUnitTaskTimeout",
Text = "S_EVENT_UNIT_TASK_TIMEOUT " -- Text = "S_EVENT_UNIT_TASK_TIMEOUT "
}, --},
[EVENTS.UnitTaskStage] = { [EVENTS.UnitTaskStage] = {
Order = 1, Order = 1,
Side = "I", Side = "I",
Event = "OnEventUnitTaskStage", Event = "OnEventUnitTaskStage",
Text = "S_EVENT_UNIT_TASK_STAGE " Text = "S_EVENT_UNIT_TASK_STAGE "
}, },
[EVENTS.MacSubtaskScore] = { --[EVENTS.MacSubtaskScore] = {
Order = 1, -- Order = 1,
Side = "I", --Side = "I",
Event = "OnEventMacSubtaskScore", --Event = "OnEventMacSubtaskScore",
Text = "S_EVENT_MAC_SUBTASK_SCORE" --Text = "S_EVENT_MAC_SUBTASK_SCORE"
}, --},
[EVENTS.MacExtraScore] = { [EVENTS.MacExtraScore] = {
Order = 1, Order = 1,
Side = "I", Side = "I",
@@ -682,20 +702,76 @@ local _EVENTMETA = {
Event = "OnEventMissionWinner", Event = "OnEventMissionWinner",
Text = "S_EVENT_MISSION_WINNER" Text = "S_EVENT_MISSION_WINNER"
}, },
[EVENTS.PostponedTakeoff] = { [EVENTS.RunwayTakeoff] = {
Order = 1, Order = 1,
Side = "I", Side = "I",
Event = "OnEventPostponedTakeoff", Event = "OnEventRunwayTakeoff",
Text = "S_EVENT_POSTPONED_TAKEOFF" Text = "S_EVENT_RUNWAY_TAKEOFF"
}, },
[EVENTS.PostponedLand] = { [EVENTS.RunwayTouch] = {
Order = 1, Order = 1,
Side = "I", Side = "I",
Event = "OnEventPostponedLand", Event = "OnEventRunwayTouch",
Text = "S_EVENT_POSTPONED_LAND" Text = "S_EVENT_RUNWAY_TOUCH"
},
[EVENTS.MacLMSRestart] = {
Order = 1,
Side = "I",
Event = "OnEventMacLMSRestart",
Text = "S_EVENT_MAC_LMS_RESTART"
},
[EVENTS.SimulationFreeze] = {
Order = 1,
Side = "I",
Event = "OnEventSimulationFreeze",
Text = "S_EVENT_SIMULATION_FREEZE"
},
[EVENTS.SimulationUnfreeze] = {
Order = 1,
Side = "I",
Event = "OnEventSimulationUnfreeze",
Text = "S_EVENT_SIMULATION_UNFREEZE"
},
[EVENTS.HumanAircraftRepairStart] = {
Order = 1,
Side = "I",
Event = "OnEventHumanAircraftRepairStart",
Text = "S_EVENT_HUMAN_AIRCRAFT_REPAIR_START"
},
[EVENTS.HumanAircraftRepairFinish] = {
Order = 1,
Side = "I",
Event = "OnEventHumanAircraftRepairFinish",
Text = "S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH"
},
-- dynamic cargo
[EVENTS.NewDynamicCargo] = {
Order = 1,
Side = "I",
Event = "OnEventNewDynamicCargo",
Text = "S_EVENT_NEW_DYNAMIC_CARGO"
},
[EVENTS.DynamicCargoLoaded] = {
Order = 1,
Side = "I",
Event = "OnEventDynamicCargoLoaded",
Text = "S_EVENT_DYNAMIC_CARGO_LOADED"
},
[EVENTS.DynamicCargoUnloaded] = {
Order = 1,
Side = "I",
Event = "OnEventDynamicCargoUnloaded",
Text = "S_EVENT_DYNAMIC_CARGO_UNLOADED"
},
[EVENTS.DynamicCargoRemoved] = {
Order = 1,
Side = "I",
Event = "OnEventDynamicCargoRemoved",
Text = "S_EVENT_DYNAMIC_CARGO_REMOVED"
}, },
} }
--- The Events structure --- The Events structure
-- @type EVENT.Events -- @type EVENT.Events
-- @field #number IniUnit -- @field #number IniUnit
@@ -1109,6 +1185,62 @@ do -- Event Creation
world.onEvent( Event ) world.onEvent( Event )
end end
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
-- @param #EVENT self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function EVENT:CreateEventNewDynamicCargo(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.NewDynamicCargo,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_LOADED event.
-- @param #EVENT self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function EVENT:CreateEventDynamicCargoLoaded(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoLoaded,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_UNLOADED event.
-- @param #EVENT self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function EVENT:CreateEventDynamicCargoUnloaded(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoUnloaded,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_DYNAMIC_CARGO_REMOVED event.
-- @param #EVENT self
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
function EVENT:CreateEventDynamicCargoRemoved(DynamicCargo)
self:F({DynamicCargo})
local Event = {
id = EVENTS.DynamicCargoRemoved,
time = timer.getTime(),
dynamiccargo = DynamicCargo,
initiator = DynamicCargo:GetDCSObject(),
}
world.onEvent( Event )
end
end end
--- Main event function. --- Main event function.
@@ -1223,7 +1355,13 @@ function EVENT:onEvent( Event )
Event.IniDCSUnit = Event.initiator Event.IniDCSUnit = Event.initiator
Event.IniDCSUnitName = Event.IniDCSUnit:getName() Event.IniDCSUnitName = Event.IniDCSUnit:getName()
Event.IniUnitName = Event.IniDCSUnitName Event.IniUnitName = Event.IniDCSUnitName
Event.IniUnit = CARGO:FindByName( Event.IniDCSUnitName ) if string.match(Event.IniUnitName,".+|%d%d:%d%d|PKG%d+") then
Event.IniDynamicCargo = DYNAMICCARGO:FindByName(Event.IniUnitName)
Event.IniDynamicCargoName = Event.IniUnitName
Event.IniPlayerName = string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+")
else
Event.IniUnit = CARGO:FindByName( Event.IniDCSUnitName )
end
Event.IniCoalition = Event.IniDCSUnit:getCoalition() Event.IniCoalition = Event.IniDCSUnit:getCoalition()
Event.IniCategory = Event.IniDCSUnit:getDesc().category Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.IniDCSUnit:getTypeName() Event.IniTypeName = Event.IniDCSUnit:getTypeName()
@@ -1301,7 +1439,7 @@ function EVENT:onEvent( Event )
-- STATIC -- STATIC
--- ---
Event.TgtDCSUnit = Event.target Event.TgtDCSUnit = Event.target
if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object if Event.target.isExist and Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object, check that isExist exists (Kiowa Hellfire issue, Special K)
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName() Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
-- Workaround for borked target info on cruise missiles -- Workaround for borked target info on cruise missiles
if Event.TgtDCSUnitName and Event.TgtDCSUnitName ~= "" then if Event.TgtDCSUnitName and Event.TgtDCSUnitName ~= "" then
@@ -1344,15 +1482,15 @@ function EVENT:onEvent( Event )
end end
-- Weapon. -- Weapon.
if Event.weapon then if Event.weapon and type(Event.weapon) == "table" and Event.weapon.isExist and Event.weapon:isExist() then
Event.Weapon = Event.weapon Event.Weapon = Event.weapon
Event.WeaponName = Event.Weapon:getTypeName() Event.WeaponName = Event.weapon:isExist() and Event.weapon:getTypeName() or "Unknown Weapon"
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit! Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName() Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()
--Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon:getPlayerName() --Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon:getPlayerName()
Event.WeaponCoalition = Event.WeaponUNIT and Event.Weapon:getCoalition() Event.WeaponCoalition = Event.WeaponUNIT and Event.Weapon.getCoalition and Event.Weapon:getCoalition()
Event.WeaponCategory = Event.WeaponUNIT and Event.Weapon:getDesc().category Event.WeaponCategory = Event.WeaponUNIT and Event.Weapon.getDesc and Event.Weapon:getDesc().category
Event.WeaponTypeName = Event.WeaponUNIT and Event.Weapon:getTypeName() Event.WeaponTypeName = Event.WeaponUNIT and Event.Weapon.getTypeName and Event.Weapon:getTypeName()
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget() --Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
end end
@@ -1378,6 +1516,7 @@ function EVENT:onEvent( Event )
Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos)
Event.MarkText=Event.text Event.MarkText=Event.text
Event.MarkCoalition=Event.coalition Event.MarkCoalition=Event.coalition
Event.IniCoalition=Event.coalition
Event.MarkGroupID = Event.groupID Event.MarkGroupID = Event.groupID
end end
@@ -1387,6 +1526,15 @@ function EVENT:onEvent( Event )
Event.CargoName = Event.cargo.Name Event.CargoName = Event.cargo.Name
end end
-- Dynamic cargo Object
if Event.dynamiccargo then
Event.IniDynamicCargo = Event.dynamiccargo
Event.IniDynamicCargoName = Event.IniDynamicCargo.StaticName
if Event.IniDynamicCargo.Owner or Event.IniUnitName then
Event.IniPlayerName = Event.IniDynamicCargo.Owner or string.match(Event.IniUnitName or "None|00:00|PKG00","^(.+)|%d%d:%d%d|PKG%d+")
end
end
-- Zone object. -- Zone object.
if Event.zone then if Event.zone then
Event.Zone = Event.zone Event.Zone = Event.zone

View File

@@ -79,7 +79,7 @@
do -- FSM do -- FSM
--- @type FSM -- @type FSM
-- @field #string ClassName Name of the class. -- @field #string ClassName Name of the class.
-- @field Core.Scheduler#SCHEDULER CallScheduler Call scheduler. -- @field Core.Scheduler#SCHEDULER CallScheduler Call scheduler.
-- @field #table options Options. -- @field #table options Options.
@@ -249,7 +249,7 @@ do -- FSM
-- --
-- ### Linear Transition Example -- ### 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_MISSIONS/blob/master/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/tree/master/Core/FSM/FSM-100%20-%20Transition%20Explanation)
-- --
-- It models a unit standing still near Batumi, and flaring every 5 seconds while switching between a Green flare and a Red flare. -- 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. -- The purpose of this example is not to show how exciting flaring is, but it demonstrates how a Linear Transition FSM can be build.
@@ -949,7 +949,7 @@ end
do -- FSM_CONTROLLABLE do -- FSM_CONTROLLABLE
--- @type FSM_CONTROLLABLE -- @type FSM_CONTROLLABLE
-- @field Wrapper.Controllable#CONTROLLABLE Controllable -- @field Wrapper.Controllable#CONTROLLABLE Controllable
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
@@ -1082,7 +1082,7 @@ end
do -- FSM_PROCESS do -- FSM_PROCESS
--- @type FSM_PROCESS -- @type FSM_PROCESS
-- @field Tasking.Task#TASK Task -- @field Tasking.Task#TASK Task
-- @extends Core.Fsm#FSM_CONTROLLABLE -- @extends Core.Fsm#FSM_CONTROLLABLE

View File

@@ -24,7 +24,7 @@
do -- Goal do -- Goal
--- @type GOAL -- @type GOAL
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
--- Models processes that have an objective with a defined achievement. Derived classes implement the ways how the achievements can be realized. --- Models processes that have an objective with a defined achievement. Derived classes implement the ways how the achievements can be realized.
@@ -71,10 +71,10 @@ do -- Goal
ClassName = "GOAL", ClassName = "GOAL",
} }
--- @field #table GOAL.Players -- @field #table GOAL.Players
GOAL.Players = {} GOAL.Players = {}
--- @field #number GOAL.TotalContributions -- @field #number GOAL.TotalContributions
GOAL.TotalContributions = 0 GOAL.TotalContributions = 0
--- GOAL Constructor. --- GOAL Constructor.
@@ -145,7 +145,7 @@ do -- Goal
self.TotalContributions = self.TotalContributions + 1 self.TotalContributions = self.TotalContributions + 1
end end
--- @param #GOAL self -- @param #GOAL self
-- @param #number Player contribution. -- @param #number Player contribution.
function GOAL:GetPlayerContribution( PlayerName ) function GOAL:GetPlayerContribution( PlayerName )
return self.Players[PlayerName] or 0 return self.Players[PlayerName] or 0

View File

@@ -17,7 +17,7 @@
-- ### Author: **Applevangelist** -- ### Author: **Applevangelist**
-- --
-- Date: 5 May 2021 -- Date: 5 May 2021
-- Last Update: Feb 2023 -- Last Update: Mar 2023
-- --
-- === -- ===
--- ---
@@ -50,7 +50,7 @@ MARKEROPS_BASE = {
ClassName = "MARKEROPS", ClassName = "MARKEROPS",
Tag = "mytag", Tag = "mytag",
Keywords = {}, Keywords = {},
version = "0.1.1", version = "0.1.3",
debug = false, debug = false,
Casesensitive = true, Casesensitive = true,
} }
@@ -114,6 +114,8 @@ function MARKEROPS_BASE:New(Tagname,Keywords,Casesensitive)
-- @param #string Text The text on the marker -- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text -- @param #table Keywords Table of matching keywords found in the Event text
-- @param Core.Point#COORDINATE Coord Coordinate of the marker. -- @param Core.Point#COORDINATE Coord Coordinate of the marker.
-- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
--- On after "MarkChanged" event. Triggered when a Marker is changed on the F10 map. --- On after "MarkChanged" event. Triggered when a Marker is changed on the F10 map.
-- @function [parent=#MARKEROPS_BASE] OnAfterMarkChanged -- @function [parent=#MARKEROPS_BASE] OnAfterMarkChanged
@@ -124,7 +126,8 @@ function MARKEROPS_BASE:New(Tagname,Keywords,Casesensitive)
-- @param #string Text The text on the marker -- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text -- @param #table Keywords Table of matching keywords found in the Event text
-- @param Core.Point#COORDINATE Coord Coordinate of the marker. -- @param Core.Point#COORDINATE Coord Coordinate of the marker.
-- @param #number idx DCS Marker ID -- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
--- On after "MarkDeleted" event. Triggered when a Marker is deleted from the F10 map. --- On after "MarkDeleted" event. Triggered when a Marker is deleted from the F10 map.
-- @function [parent=#MARKEROPS_BASE] OnAfterMarkDeleted -- @function [parent=#MARKEROPS_BASE] OnAfterMarkDeleted
@@ -133,7 +136,7 @@ function MARKEROPS_BASE:New(Tagname,Keywords,Casesensitive)
-- @param #string Event The Event called -- @param #string Event The Event called
-- @param #string To The To state -- @param #string To The To state
--- "Stop" trigger. Used to stop the function an unhandle events --- "Stop" trigger. Used to stop the function an unhandle events
-- @function [parent=#MARKEROPS_BASE] Stop -- @function [parent=#MARKEROPS_BASE] Stop
end end
@@ -155,29 +158,30 @@ function MARKEROPS_BASE:OnEventMark(Event)
local text = tostring(Event.text) local text = tostring(Event.text)
local m = MESSAGE:New(string.format("Mark added at %s with text: %s",coordtext,text),10,"Info",false):ToAll() local m = MESSAGE:New(string.format("Mark added at %s with text: %s",coordtext,text),10,"Info",false):ToAll()
end end
local coalition = Event.MarkCoalition
-- decision -- decision
if Event.id==world.event.S_EVENT_MARK_ADDED then if Event.id==world.event.S_EVENT_MARK_ADDED then
self:T({event="S_EVENT_MARK_ADDED", carrier=self.groupname, vec3=Event.pos}) self:T({event="S_EVENT_MARK_ADDED", carrier=Event.IniGroupName, vec3=Event.pos})
-- Handle event -- Handle event
local Eventtext = tostring(Event.text) local Eventtext = tostring(Event.text)
if Eventtext~=nil then if Eventtext~=nil then
if self:_MatchTag(Eventtext) then if self:_MatchTag(Eventtext) then
local matchtable = self:_MatchKeywords(Eventtext) local matchtable = self:_MatchKeywords(Eventtext)
self:MarkAdded(Eventtext,matchtable,coord) self:MarkAdded(Eventtext,matchtable,coord,Event.idx,coalition)
end end
end end
elseif Event.id==world.event.S_EVENT_MARK_CHANGE then elseif Event.id==world.event.S_EVENT_MARK_CHANGE then
self:T({event="S_EVENT_MARK_CHANGE", carrier=self.groupname, vec3=Event.pos}) self:T({event="S_EVENT_MARK_CHANGE", carrier=Event.IniGroupName, vec3=Event.pos})
-- Handle event. -- Handle event.
local Eventtext = tostring(Event.text) local Eventtext = tostring(Event.text)
if Eventtext~=nil then if Eventtext~=nil then
if self:_MatchTag(Eventtext) then if self:_MatchTag(Eventtext) then
local matchtable = self:_MatchKeywords(Eventtext) local matchtable = self:_MatchKeywords(Eventtext)
self:MarkChanged(Eventtext,matchtable,coord,Event.idx) self:MarkChanged(Eventtext,matchtable,coord,Event.idx,coalition)
end end
end end
elseif Event.id==world.event.S_EVENT_MARK_REMOVED then elseif Event.id==world.event.S_EVENT_MARK_REMOVED then
self:T({event="S_EVENT_MARK_REMOVED", carrier=self.groupname, vec3=Event.pos}) self:T({event="S_EVENT_MARK_REMOVED", carrier=Event.IniGroupName, vec3=Event.pos})
-- Hande event. -- Hande event.
local Eventtext = tostring(Event.text) local Eventtext = tostring(Event.text)
if Eventtext~=nil then if Eventtext~=nil then
@@ -230,8 +234,10 @@ end
-- @param #string To The To state -- @param #string To The To state
-- @param #string Text The text on the marker -- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text -- @param #table Keywords Table of matching keywords found in the Event text
-- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
-- @param Core.Point#COORDINATE Coord Coordinate of the marker. -- @param Core.Point#COORDINATE Coord Coordinate of the marker.
function MARKEROPS_BASE:onbeforeMarkAdded(From,Event,To,Text,Keywords,Coord) function MARKEROPS_BASE:onbeforeMarkAdded(From,Event,To,Text,Keywords,Coord,MarkerID,CoalitionNumber)
self:T({self.lid,From,Event,To,Text,Keywords,Coord:ToStringLLDDM()}) self:T({self.lid,From,Event,To,Text,Keywords,Coord:ToStringLLDDM()})
end end
@@ -242,8 +248,10 @@ end
-- @param #string To The To state -- @param #string To The To state
-- @param #string Text The text on the marker -- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text -- @param #table Keywords Table of matching keywords found in the Event text
-- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
-- @param Core.Point#COORDINATE Coord Coordinate of the marker. -- @param Core.Point#COORDINATE Coord Coordinate of the marker.
function MARKEROPS_BASE:onbeforeMarkChanged(From,Event,To,Text,Keywords,Coord) function MARKEROPS_BASE:onbeforeMarkChanged(From,Event,To,Text,Keywords,Coord,MarkerID,CoalitionNumber)
self:T({self.lid,From,Event,To,Text,Keywords,Coord:ToStringLLDDM()}) self:T({self.lid,From,Event,To,Text,Keywords,Coord:ToStringLLDDM()})
end end

View File

@@ -2,7 +2,7 @@
-- --
-- === -- ===
-- --
-- ### Features: -- ## Features:
-- --
-- * Setup mission sub menus. -- * Setup mission sub menus.
-- * Setup mission command menus. -- * Setup mission command menus.
@@ -44,7 +44,11 @@
-- * @{Core.Menu#MENU_GROUP_COMMAND}: Manages command menus for GROUPs. -- * @{Core.Menu#MENU_GROUP_COMMAND}: Manages command menus for GROUPs.
-- --
-- === -- ===
--- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Core/Menu)
--
-- ===
--
-- ### Author: **FlightControl** -- ### Author: **FlightControl**
-- ### Contributions: -- ### Contributions:
-- --
@@ -166,7 +170,8 @@ function MENU_INDEX:Refresh( Group )
end end
do -- MENU_BASE do -- MENU_BASE
--- @type MENU_BASE ---
-- @type MENU_BASE
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- Defines the main MENU class where other MENU classes are derived from. --- Defines the main MENU class where other MENU classes are derived from.
-- This is an abstract class, so don't use it. -- This is an abstract class, so don't use it.
@@ -206,6 +211,7 @@ do -- MENU_BASE
return self return self
end end
function MENU_BASE:SetParentMenu( MenuText, Menu ) function MENU_BASE:SetParentMenu( MenuText, Menu )
if self.ParentMenu then if self.ParentMenu then
self.ParentMenu.Menus = self.ParentMenu.Menus or {} self.ParentMenu.Menus = self.ParentMenu.Menus or {}
@@ -277,8 +283,10 @@ do -- MENU_BASE
end end
end end
do -- MENU_COMMAND_BASE do
--- @type MENU_COMMAND_BASE ---
-- MENU_COMMAND_BASE
-- @type MENU_COMMAND_BASE
-- @field #function MenuCallHandler -- @field #function MenuCallHandler
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_BASE
@@ -343,8 +351,10 @@ do -- MENU_COMMAND_BASE
end end
end end
do -- MENU_MISSION do
--- @type MENU_MISSION ---
-- MENU_MISSION
-- @type MENU_MISSION
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_BASE
--- Manages the main menus for a complete mission. --- Manages the main menus for a complete mission.
-- --
@@ -509,8 +519,9 @@ do -- MENU_MISSION_COMMAND
return self return self
end end
end end
do -- MENU_COALITION do
--- @type MENU_COALITION --- MENU_COALITION
-- @type MENU_COALITION
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_BASE
--- Manages the main menus for DCS.coalition. --- Manages the main menus for DCS.coalition.
@@ -635,9 +646,10 @@ do -- MENU_COALITION
return self return self
end end
end end
do -- MENU_COALITION_COMMAND do
--- @type MENU_COALITION_COMMAND --- MENU_COALITION_COMMAND
-- @type MENU_COALITION_COMMAND
-- @extends Core.Menu#MENU_COMMAND_BASE -- @extends Core.Menu#MENU_COMMAND_BASE
--- Manages the command menus for coalitions, which allow players to execute functions during mission execution. --- Manages the command menus for coalitions, which allow players to execute functions during mission execution.
@@ -725,8 +737,11 @@ do
-- So every menu for a client created must be tracked so that program logic accidentally does not create. -- So every menu for a client created must be tracked so that program logic accidentally does not create.
-- the same menus twice during initialization logic. -- the same menus twice during initialization logic.
-- These menu classes are handling this logic with this variable. -- These menu classes are handling this logic with this variable.
local _MENUGROUPS = {} local _MENUGROUPS = {}
--- @type MENU_GROUP
---
-- @type MENU_GROUP
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_BASE
@@ -757,7 +772,7 @@ do
-- MenuStatus[MenuGroupName]:Remove() -- MenuStatus[MenuGroupName]:Remove()
-- end -- end
-- --
-- --- @param Wrapper.Group#GROUP MenuGroup -- -- @param Wrapper.Group#GROUP MenuGroup
-- local function AddStatusMenu( MenuGroup ) -- local function AddStatusMenu( MenuGroup )
-- local MenuGroupName = MenuGroup:GetName() -- local MenuGroupName = MenuGroup:GetName()
-- -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. -- -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
@@ -899,8 +914,8 @@ do
return self return self
end end
---
--- @type MENU_GROUP_COMMAND -- @type MENU_GROUP_COMMAND
-- @extends Core.Menu#MENU_COMMAND_BASE -- @extends Core.Menu#MENU_COMMAND_BASE
--- The @{Core.Menu#MENU_GROUP_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution. --- The @{Core.Menu#MENU_GROUP_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
@@ -983,7 +998,8 @@ do
end end
--- MENU_GROUP_DELAYED --- MENU_GROUP_DELAYED
do do
--- @type MENU_GROUP_DELAYED ---
-- @type MENU_GROUP_DELAYED
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_BASE
@@ -1034,6 +1050,7 @@ do
-- @param #MENU_GROUP_DELAYED self -- @param #MENU_GROUP_DELAYED self
-- @return #MENU_GROUP_DELAYED -- @return #MENU_GROUP_DELAYED
function MENU_GROUP_DELAYED:Set() function MENU_GROUP_DELAYED:Set()
if not self.GroupID then return end
do do
if not self.MenuSet then if not self.MenuSet then
missionCommands.addSubMenuForGroup( self.GroupID, self.MenuText, self.MenuParentPath ) missionCommands.addSubMenuForGroup( self.GroupID, self.MenuText, self.MenuParentPath )
@@ -1106,8 +1123,8 @@ do
return self return self
end end
---
--- @type MENU_GROUP_COMMAND_DELAYED -- @type MENU_GROUP_COMMAND_DELAYED
-- @extends Core.Menu#MENU_COMMAND_BASE -- @extends Core.Menu#MENU_COMMAND_BASE
--- Manages the command menus for coalitions, which allow players to execute functions during mission execution. --- Manages the command menus for coalitions, which allow players to execute functions during mission execution.

View File

@@ -177,40 +177,22 @@ end
-- --
-- -- Send the 2 messages created with the @{New} method to the Client Group. -- -- Send the 2 messages created with the @{New} method to the Client Group.
-- -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1. -- -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
-- ClientGroup = Group.getByName( "ClientGroup" ) -- Client = CLIENT:FindByName("NameOfClientUnit")
-- --
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup ) -- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" ):ToClient( Client )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup ) -- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score" ):ToClient( Client )
-- or -- or
-- MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25 ):ToClient( ClientGroup ) -- MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score"):ToClient( Client )
-- MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25 ):ToClient( ClientGroup ) -- MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score"):ToClient( Client )
-- or -- or
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25 ) -- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score")
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25 ) -- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
-- MessageClient1:ToClient( ClientGroup ) -- MessageClient1:ToClient( Client )
-- MessageClient2:ToClient( ClientGroup ) -- MessageClient2:ToClient( Client )
-- --
function MESSAGE:ToClient( Client, Settings ) function MESSAGE:ToClient( Client, Settings )
self:F( Client ) self:F( Client )
self:ToUnit(Client,Settings)
if Client and Client:GetClientGroupID() then
if self.MessageType then
local Settings = Settings or ( Client and _DATABASE:GetPlayerSettings( Client:GetPlayerName() ) ) or _SETTINGS -- Core.Settings#SETTINGS
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
self.MessageCategory = "" -- self.MessageType .. ": "
end
local Unit = Client:GetClient()
if self.MessageDuration ~= 0 then
local ClientGroupID = Client:GetClientGroupID()
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
--trigger.action.outTextForGroup( ClientGroupID, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration , self.ClearScreen)
trigger.action.outTextForUnit( Unit:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration , self.ClearScreen)
end
end
return self return self
end end
@@ -257,6 +239,7 @@ function MESSAGE:ToUnit( Unit, Settings )
if self.MessageDuration ~= 0 then if self.MessageDuration ~= 0 then
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
local ID = Unit:GetID()
trigger.action.outTextForUnit( Unit:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration, self.ClearScreen ) trigger.action.outTextForUnit( Unit:GetID(), self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration, self.ClearScreen )
end end
end end
@@ -305,11 +288,11 @@ end
-- @usage -- @usage
-- --
-- -- Send a message created with the @{New} method to the BLUE coalition. -- -- Send a message created with the @{New} method to the BLUE coalition.
-- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25):ToBlue() -- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToBlue()
-- or -- or
-- MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ):ToBlue() -- MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToBlue()
-- or -- or
-- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ) -- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", 25, "Penalty")
-- MessageBLUE:ToBlue() -- MessageBLUE:ToBlue()
-- --
function MESSAGE:ToBlue() function MESSAGE:ToBlue()
@@ -326,11 +309,11 @@ end
-- @usage -- @usage
-- --
-- -- Send a message created with the @{New} method to the RED coalition. -- -- Send a message created with the @{New} method to the RED coalition.
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ):ToRed() -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToRed()
-- or -- or
-- MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ):ToRed() -- MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToRed()
-- or -- or
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ) -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty")
-- MessageRED:ToRed() -- MessageRED:ToRed()
-- --
function MESSAGE:ToRed() function MESSAGE:ToRed()
@@ -349,11 +332,11 @@ end
-- @usage -- @usage
-- --
-- -- Send a message created with the @{New} method to the RED coalition. -- -- Send a message created with the @{New} method to the RED coalition.
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ):ToCoalition( coalition.side.RED ) -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToCoalition( coalition.side.RED )
-- or -- or
-- MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ):ToCoalition( coalition.side.RED ) -- MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty"):ToCoalition( coalition.side.RED )
-- or -- or
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25 ) -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty")
-- MessageRED:ToCoalition( coalition.side.RED ) -- MessageRED:ToCoalition( coalition.side.RED )
-- --
function MESSAGE:ToCoalition( CoalitionSide, Settings ) function MESSAGE:ToCoalition( CoalitionSide, Settings )
@@ -368,7 +351,7 @@ function MESSAGE:ToCoalition( CoalitionSide, Settings )
if CoalitionSide then if CoalitionSide then
if self.MessageDuration ~= 0 then if self.MessageDuration ~= 0 then
self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration ) self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration )
trigger.action.outTextForCoalition( CoalitionSide, self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen ) trigger.action.outTextForCoalition( CoalitionSide, self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
end end
end end
@@ -395,29 +378,36 @@ end
--- Sends a MESSAGE to all players. --- Sends a MESSAGE to all players.
-- @param #MESSAGE self -- @param #MESSAGE self
-- @param Core.Settings#Settings Settings (Optional) Settings for message display. -- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @return #MESSAGE -- @param #number Delay (Optional) Delay in seconds before the message is send. Default instantly (`nil`).
-- @return #MESSAGE self
-- @usage -- @usage
-- --
-- -- Send a message created to all players. -- -- Send a message created to all players.
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25 ):ToAll() -- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission"):ToAll()
-- or -- or
-- MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25 ):ToAll() -- MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission"):ToAll()
-- or -- or
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25 ) -- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission")
-- MessageAll:ToAll() -- MessageAll:ToAll()
-- --
function MESSAGE:ToAll( Settings ) function MESSAGE:ToAll( Settings, Delay )
self:F() self:F()
if self.MessageType then if Delay and Delay>0 then
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS self:ScheduleOnce(Delay, MESSAGE.ToAll, self, Settings, 0)
self.MessageDuration = Settings:GetMessageTime( self.MessageType ) else
self.MessageCategory = "" -- self.MessageType .. ": "
end if self.MessageType then
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
self.MessageCategory = "" -- self.MessageType .. ": "
end
if self.MessageDuration ~= 0 then
self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration )
trigger.action.outText( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
end
if self.MessageDuration ~= 0 then
self:T( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ) .. " / " .. self.MessageDuration )
trigger.action.outText( self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ), self.MessageDuration, self.ClearScreen )
end end
return self return self
@@ -459,14 +449,14 @@ end
_MESSAGESRS = {} _MESSAGESRS = {}
--- Set up MESSAGE generally to allow Text-To-Speech via SRS and TTS functions. --- Set up MESSAGE generally to allow Text-To-Speech via SRS and TTS functions. `SetMSRS()` will try to use as many attributes configured with @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #string PathToSRS Path to SRS Folder, defaults to "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone". -- @param #string PathToSRS (optional) Path to SRS Folder, defaults to "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone" or your configuration file setting.
-- @param #number Port Port number of SRS, defaults to 5002. -- @param #number Port Port (optional) number of SRS, defaults to 5002 or your configuration file setting.
-- @param #string PathToCredentials (optional) Path to credentials file for e.g. Google. -- @param #string PathToCredentials (optional) Path to credentials file for Google.
-- @param #number Frequency Frequency in MHz. Can also be given as a #table of frequencies. -- @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 #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 Gender (optional) Gender, i.e. "male" or "female", defaults to "female" or your configuration file setting.
-- @param #string Culture (optional) Culture, e.g. "en-US", defaults to "en-GB" -- @param #string Culture (optional) Culture, e.g. "en-US", defaults to "en-GB" or your configuration file setting.
-- @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 #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 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 #number Volume (optional) Volume, can be between 0.0 and 1.0 (loudest).
@@ -480,45 +470,51 @@ _MESSAGESRS = {}
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS() -- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
-- --
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate) 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.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
_MESSAGESRS.modulation = Modulation or radio.modulation.AM
_MESSAGESRS.MSRS:SetCoalition(Coalition or coalition.side.NEUTRAL) _MESSAGESRS.frequency = Frequency or MSRS.frequencies or 243
_MESSAGESRS.coalition = Coalition or coalition.side.NEUTRAL _MESSAGESRS.modulation = Modulation or MSRS.modulations or radio.modulation.AM
_MESSAGESRS.MSRS = MSRS:New(_MESSAGESRS.PathToSRS,_MESSAGESRS.frequency, _MESSAGESRS.modulation)
_MESSAGESRS.coalition = Coalition or MSRS.coalition or coalition.side.NEUTRAL
_MESSAGESRS.MSRS:SetCoalition(_MESSAGESRS.coalition)
_MESSAGESRS.coordinate = Coordinate _MESSAGESRS.coordinate = Coordinate
_MESSAGESRS.MSRS:SetCoordinate(Coordinate)
if Coordinate then
_MESSAGESRS.MSRS:SetCoordinate(Coordinate)
end
_MESSAGESRS.Culture = Culture or MSRS.culture or "en-GB"
_MESSAGESRS.MSRS:SetCulture(Culture) _MESSAGESRS.MSRS:SetCulture(Culture)
_MESSAGESRS.Culture = Culture or "en-GB"
_MESSAGESRS.Gender = Gender or MSRS.gender or "female"
_MESSAGESRS.MSRS:SetGender(Gender) _MESSAGESRS.MSRS:SetGender(Gender)
_MESSAGESRS.Gender = Gender or "female"
_MESSAGESRS.MSRS:SetGoogle(PathToCredentials) if PathToCredentials then
_MESSAGESRS.google = PathToCredentials _MESSAGESRS.MSRS:SetProviderOptionsGoogle(PathToCredentials)
_MESSAGESRS.MSRS:SetProvider(MSRS.Provider.GOOGLE)
end
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE") _MESSAGESRS.label = Label or MSRS.Label or "MESSAGE"
_MESSAGESRS.label = Label or "MESSAGE" _MESSAGESRS.MSRS:SetLabel(_MESSAGESRS.label)
_MESSAGESRS.MSRS:SetPort(Port or 5002) _MESSAGESRS.port = Port or MSRS.port or 5002
_MESSAGESRS.port = Port or 5002 _MESSAGESRS.MSRS:SetPort(_MESSAGESRS.port)
_MESSAGESRS.volume = Volume or 1 _MESSAGESRS.volume = Volume or MSRS.volume or 1
_MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume) _MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume)
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end
_MESSAGESRS.voice = Voice --or MSRS.Voices.Microsoft.Hedda _MESSAGESRS.voice = Voice or MSRS.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") _MESSAGESRS.SRSQ = MSRSQUEUE:New(_MESSAGESRS.label)
end end
--- Sends a message via SRS. --- Sends a message via SRS. `ToSRS()` will try to use as many attributes configured with @{Core.Message#MESSAGE.SetMSRS}() and @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #MESSAGE self -- @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 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 #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.
@@ -546,7 +542,7 @@ function MESSAGE:ToSRS(frequency,modulation,gender,culture,voice,coalition,volum
_MESSAGESRS.MSRS:SetCoordinate(coordinate) _MESSAGESRS.MSRS:SetCoordinate(coordinate)
end end
local category = string.gsub(self.MessageCategory,":","") 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) _MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,0.5,1,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 end
return self return self
end end

View File

@@ -73,7 +73,7 @@ PATHLINE = {
--- PATHLINE class version. --- PATHLINE class version.
-- @field #string version -- @field #string version
PATHLINE.version="0.1.0" PATHLINE.version="0.1.1"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@@ -237,13 +237,14 @@ end
--- Get COORDINATES of pathline. Note that COORDINATE objects are created when calling this function. That does involve deep copy calls and can have an impact on performance if done too often. --- Get COORDINATES of pathline. Note that COORDINATE objects are created when calling this function. That does involve deep copy calls and can have an impact on performance if done too often.
-- @param #PATHLINE self -- @param #PATHLINE self
-- @return <Core.Point#COORDINATE> List of COORDINATES points. -- @return <Core.Point#COORDINATE> List of COORDINATES points.
function PATHLINE:GetCoordinats() function PATHLINE:GetCoordinates()
local vecs={} local vecs={}
for _,_point in pairs(self.points) do for _,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point local point=_point --#PATHLINE.Point
local coord=COORDINATE:NewFromVec3(point.vec3) local coord=COORDINATE:NewFromVec3(point.vec3)
table.insert(vecs,coord)
end end
return vecs return vecs
@@ -262,7 +263,7 @@ function PATHLINE:GetPointFromIndex(n)
local point=nil --#PATHLINE.Point local point=nil --#PATHLINE.Point
if n>=1 and n<=N then if n>=1 and n<=N then
point=self.point[n] point=self.points[n]
else else
self:E(self.lid..string.format("ERROR: No point in pathline for N=%s", tostring(n))) self:E(self.lid..string.format("ERROR: No point in pathline for N=%s", tostring(n)))
end end

View File

@@ -25,7 +25,8 @@
do -- COORDINATE do -- COORDINATE
--- @type COORDINATE ---
-- @type COORDINATE
-- @field #string ClassName Name of the class -- @field #string ClassName Name of the class
-- @field #number x Component of the 3D vector. -- @field #number x Component of the 3D vector.
-- @field #number y Component of the 3D vector. -- @field #number y Component of the 3D vector.
@@ -180,7 +181,7 @@ do -- COORDINATE
-- * @{#COORDINATE.ToStringBR}(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance. -- * @{#COORDINATE.ToStringBR}(): Generates a Bearing & Range text in the format of DDD for DI where DDD is degrees and DI is distance.
-- * @{#COORDINATE.ToStringBRA}(): Generates a Bearing, Range & Altitude text. -- * @{#COORDINATE.ToStringBRA}(): Generates a Bearing, Range & Altitude text.
-- * @{#COORDINATE.ToStringBRAANATO}(): Generates a Generates a Bearing, Range, Aspect & Altitude text in NATOPS. -- * @{#COORDINATE.ToStringBRAANATO}(): Generates a Generates a Bearing, Range, Aspect & Altitude text in NATOPS.
-- * @{#COORDINATE.ToStringLL}(): Generates a Latutide & Longitude text. -- * @{#COORDINATE.ToStringLL}(): Generates a Latitude & Longitude text.
-- * @{#COORDINATE.ToStringLLDMS}(): Generates a Lat, Lon, Degree, Minute, Second text. -- * @{#COORDINATE.ToStringLLDMS}(): Generates a Lat, Lon, Degree, Minute, Second text.
-- * @{#COORDINATE.ToStringLLDDM}(): Generates a Lat, Lon, Degree, decimal Minute text. -- * @{#COORDINATE.ToStringLLDDM}(): Generates a Lat, Lon, Degree, decimal Minute text.
-- * @{#COORDINATE.ToStringMGRS}(): Generates a MGRS grid coordinate text. -- * @{#COORDINATE.ToStringMGRS}(): Generates a MGRS grid coordinate text.
@@ -702,6 +703,7 @@ do -- COORDINATE
-- @return DCS#Distance The distance from the reference @{#COORDINATE} in meters. -- @return DCS#Distance The distance from the reference @{#COORDINATE} in meters.
function COORDINATE:DistanceFromPointVec2( PointVec2Reference ) function COORDINATE:DistanceFromPointVec2( PointVec2Reference )
self:F2( PointVec2Reference ) self:F2( PointVec2Reference )
if not PointVec2Reference then return math.huge end
local Distance = ( ( PointVec2Reference.x - self.x ) ^ 2 + ( PointVec2Reference.z - self.z ) ^2 ) ^ 0.5 local Distance = ( ( PointVec2Reference.x - self.x ) ^ 2 + ( PointVec2Reference.z - self.z ) ^2 ) ^ 0.5
@@ -2231,7 +2233,7 @@ do -- COORDINATE
-- local MarkGroup = GROUP:FindByName( "AttackGroup" ) -- local MarkGroup = GROUP:FindByName( "AttackGroup" )
-- local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup ) -- local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup )
-- <<< logic >>> -- <<< logic >>>
-- RemoveMark( MarkID ) -- The mark is now removed -- TargetCoord:RemoveMark( MarkID ) -- The mark is now removed
function COORDINATE:RemoveMark( MarkID ) function COORDINATE:RemoveMark( MarkID )
trigger.action.removeMark( MarkID ) trigger.action.removeMark( MarkID )
end end
@@ -2455,15 +2457,18 @@ do -- COORDINATE
-- Write command as string and execute that. Idea by Grimes https://forum.dcs.world/topic/324201-mark-to-all-function/#comment-5273793 -- 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) local s=string.format("trigger.action.markupToAll(7, %d, %d,", Coalition, MarkID)
for _,vec in pairs(vecs) do for _,vec in pairs(vecs) do
s=s..string.format("%s,", UTILS._OneLineSerialize(vec)) --s=s..string.format("%s,", UTILS._OneLineSerialize(vec))
s=s..string.format("{x=%.1f, y=%.1f, z=%.1f},", vec.x, vec.y, vec.z)
end end
s=s..string.format("%s, %s, %s, %s", UTILS._OneLineSerialize(Color), UTILS._OneLineSerialize(FillColor), tostring(LineType), tostring(ReadOnly)) s=s..string.format("{%.3f, %.3f, %.3f, %.3f},", Color[1], Color[2], Color[3], Color[4])
if Text and Text~="" then s=s..string.format("{%.3f, %.3f, %.3f, %.3f},", FillColor[1], FillColor[2], FillColor[3], FillColor[4])
s=s..string.format(", \"%s\"", Text) s=s..string.format("%d,", LineType or 1)
s=s..string.format("%s", tostring(ReadOnly))
if Text and type(Text)=="string" and string.len(Text)>0 then
s=s..string.format(", \"%s\"", tostring(Text))
end end
s=s..")" s=s..")"
-- Execute string command -- Execute string command
local success=UTILS.DoString(s) local success=UTILS.DoString(s)
@@ -2551,7 +2556,7 @@ do -- COORDINATE
Offset=Offset or 2 Offset=Offset or 2
-- Measurement of visibility should not be from the ground, so Adding a hypotethical 2 meters to each Coordinate. -- Measurement of visibility should not be from the ground, so Adding a hypothetical 2 meters to each Coordinate.
local FromVec3 = self:GetVec3() local FromVec3 = self:GetVec3()
FromVec3.y = FromVec3.y + Offset FromVec3.y = FromVec3.y + Offset
@@ -2664,9 +2669,9 @@ do -- COORDINATE
local date=UTILS.GetDCSMissionDate() local date=UTILS.GetDCSMissionDate()
-- Debug output. -- Debug output.
--self:I(string.format("Sun rise at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff)) --self:I(string.format("Sun rise at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%s sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), tonumber(sunrise) or "0", Tdiff))
if InSeconds then if InSeconds or type(sunrise) == "string" then
return sunrise return sunrise
else else
return UTILS.SecondsToClock(sunrise, true) return UTILS.SecondsToClock(sunrise, true)
@@ -2743,6 +2748,9 @@ do -- COORDINATE
local sunrise=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, true, Tdiff) local sunrise=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, true, Tdiff)
local sunset=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, false, Tdiff) local sunset=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, false, Tdiff)
if sunrise == "N/R" then return false end
if sunrise == "N/S" then return true end
local time=UTILS.ClockToSeconds(clock) local time=UTILS.ClockToSeconds(clock)
-- Check if time is between sunrise and sunset. -- Check if time is between sunrise and sunset.
@@ -2829,9 +2837,9 @@ do -- COORDINATE
local date=UTILS.GetDCSMissionDate() local date=UTILS.GetDCSMissionDate()
-- Debug output. -- Debug output.
--self:I(string.format("Sun set at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%d sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), sunrise, Tdiff)) --self:I(string.format("Sun set at lat=%.3f long=%.3f on %s (DayOfYear=%d): %s (%s sec of the day) (GMT %d)", Latitude, Longitude, date, DayOfYear, tostring(UTILS.SecondsToClock(sunrise)), tostring(sunrise) or "0", Tdiff))
if InSeconds then if InSeconds or type(sunrise) == "string" then
return sunrise return sunrise
else else
return UTILS.SecondsToClock(sunrise, true) return UTILS.SecondsToClock(sunrise, true)
@@ -2952,10 +2960,10 @@ do -- COORDINATE
end end
-- corrected Track to be direction of travel of bogey (self in this case) -- corrected Track to be direction of travel of bogey (self in this case)
local track = "Maneuver" local track = "Maneuver"
if self.Heading then if self.Heading then
track = UTILS.BearingToCardinal(self.Heading) or "North" track = UTILS.BearingToCardinal(self.Heading) or "North"
end end
if rangeNM > 3 then if rangeNM > 3 then
@@ -3067,6 +3075,18 @@ do -- COORDINATE
return coord.LOtoLL( self:GetVec3() ) return coord.LOtoLL( self:GetVec3() )
end end
--- Get Latitude & Longitude text.
-- @param #COORDINATE self
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @return #string LLText
function COORDINATE:ToStringLL( Settings )
local LL_Accuracy = Settings and Settings.LL_Accuracy or _SETTINGS.LL_Accuracy
local lat, lon = coord.LOtoLL( self:GetVec3() )
return string.format('%f', lat) .. ' ' .. string.format('%f', lon)
end
--- Provides a Lat Lon string in Degree Minute Second format. --- Provides a Lat Lon string in Degree Minute Second format.
-- @param #COORDINATE self -- @param #COORDINATE self
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object. -- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
@@ -3101,6 +3121,50 @@ do -- COORDINATE
return "MGRS " .. UTILS.tostringMGRS( MGRS, MGRS_Accuracy ) return "MGRS " .. UTILS.tostringMGRS( MGRS, MGRS_Accuracy )
end end
--- Provides a COORDINATE from an MGRS String
-- @param #COORDINATE self
-- @param #string MGRSString MGRS String, e.g. "MGRS 37T DK 12345 12345"
-- @return #COORDINATE self
function COORDINATE:NewFromMGRSString( MGRSString )
local myparts = UTILS.Split(MGRSString," ")
local northing = tostring(myparts[5]) or ""
local easting = tostring(myparts[4]) or ""
if string.len(easting) < 5 then easting = easting..string.rep("0",5-string.len(easting)) end
if string.len(northing) < 5 then northing = northing..string.rep("0",5-string.len(northing)) end
local MGRS = {
UTMZone = myparts[2],
MGRSDigraph = myparts[3],
Easting = easting,
Northing = northing,
}
local lat, lon = coord.MGRStoLL(MGRS)
local point = coord.LLtoLO(lat, lon, 0)
local coord = COORDINATE:NewFromVec2({x=point.x,y=point.z})
return coord
end
--- Provides a COORDINATE from an MGRS Coordinate
-- @param #COORDINATE self
-- @param #string UTMZone UTM Zone, e.g. "37T"
-- @param #string MGRSDigraph Digraph, e.g. "DK"
-- @param #string Easting Meters easting - string in order to allow for leading zeros, e.g. "01234". Should be 5 digits.
-- @param #string Northing Meters northing - string in order to allow for leading zeros, e.g. "12340". Should be 5 digits.
-- @return #COORDINATE self
function COORDINATE:NewFromMGRS( UTMZone, MGRSDigraph, Easting, Northing )
if string.len(Easting) < 5 then Easting = tostring(Easting..string.rep("0",5-string.len(Easting) )) end
if string.len(Northing) < 5 then Northing = tostring(Northing..string.rep("0",5-string.len(Northing) )) end
local MGRS = {
UTMZone = UTMZone,
MGRSDigraph = MGRSDigraph,
Easting = tostring(Easting),
Northing = tostring(Northing),
}
local lat, lon = coord.MGRStoLL(MGRS)
local point = coord.LLtoLO(lat, lon, 0)
local coord = COORDINATE:NewFromVec2({x=point.x,y=point.z})
return coord
end
--- Provides a coordinate string of the point, based on a coordinate format system: --- Provides a coordinate string of the point, based on a coordinate format system:
-- * Uses default settings in COORDINATE. -- * Uses default settings in COORDINATE.
-- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default. -- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
@@ -3350,7 +3414,7 @@ do -- COORDINATE
-- @param #COORDINATE self -- @param #COORDINATE self
-- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter) -- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter)
-- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters) -- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters)
-- @return #boolen IsSteep If true, area is steep -- @return #boolean IsSteep If true, area is steep
-- @return #number MaxElevation Elevation in meters measured over 100m -- @return #number MaxElevation Elevation in meters measured over 100m
function COORDINATE:IsInSteepArea(Radius,Minelevation) function COORDINATE:IsInSteepArea(Radius,Minelevation)
local steep = false local steep = false
@@ -3382,7 +3446,7 @@ do -- COORDINATE
-- @param #COORDINATE self -- @param #COORDINATE self
-- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter) -- @param #number Radius (Optional) Radius to check around the coordinate, defaults to 50m (100m diameter)
-- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters) -- @param #number Minelevation (Optional) Elevation from which on a area is defined as steep, defaults to 8% (8m height gain across 100 meters)
-- @return #boolen IsFlat If true, area is flat -- @return #boolean IsFlat If true, area is flat
-- @return #number MaxElevation Elevation in meters measured over 100m -- @return #number MaxElevation Elevation in meters measured over 100m
function COORDINATE:IsInFlatArea(Radius,Minelevation) function COORDINATE:IsInFlatArea(Radius,Minelevation)
local steep, elev = self:IsInSteepArea(Radius,Minelevation) local steep, elev = self:IsInSteepArea(Radius,Minelevation)
@@ -3613,7 +3677,7 @@ end
do -- POINT_VEC2 do -- POINT_VEC2
--- @type POINT_VEC2 -- @type POINT_VEC2
-- @field DCS#Distance x The x coordinate in meters. -- @field DCS#Distance x The x coordinate in meters.
-- @field DCS#Distance y the y coordinate in meters. -- @field DCS#Distance y the y coordinate in meters.
-- @extends Core.Point#COORDINATE -- @extends Core.Point#COORDINATE

View File

@@ -15,7 +15,8 @@
-- @module Core.Report -- @module Core.Report
-- @image Core_Report.JPG -- @image Core_Report.JPG
--- @type REPORT ---
-- @type REPORT
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- Provides a handy means to create messages and reports. --- Provides a handy means to create messages and reports.

View File

@@ -1,4 +1,4 @@
--- **Core** - SCHEDULEDISPATCHER dispatches the different schedules. ---- **Core** - SCHEDULEDISPATCHER dispatches the different schedules.
-- --
-- === -- ===
-- --

View File

@@ -14,17 +14,13 @@
-- --
-- # Demo Missions -- # Demo Missions
-- --
-- ### [SCHEDULER Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCH%20-%20Scheduler) -- ### [SCHEDULER Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Core/Scheduler)
--
-- ### [SCHEDULER Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCH%20-%20Scheduler)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
-- --
-- === -- ===
-- --
-- # YouTube Channel -- # YouTube Channel
-- --
-- ### [SCHEDULER YouTube Channel (none)]() -- ### None
-- --
-- === -- ===
-- --

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,9 @@
-- @module Core.Settings -- @module Core.Settings
-- @image Core_Settings.JPG -- @image Core_Settings.JPG
--- @type SETTINGS
---
-- @type SETTINGS
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework. --- Takes care of various settings that influence the behavior of certain functionalities and classes within the MOOSE framework.
@@ -218,7 +220,8 @@ SETTINGS = {
SETTINGS.__Enum = {} SETTINGS.__Enum = {}
--- @type SETTINGS.__Enum.Era ---
-- @type SETTINGS.__Enum.Era
-- @field #number WWII -- @field #number WWII
-- @field #number Korea -- @field #number Korea
-- @field #number Cold -- @field #number Cold
@@ -491,7 +494,7 @@ do -- SETTINGS
return (self.A2ASystem and self.A2ASystem == "MGRS") or (not self.A2ASystem and _SETTINGS:IsA2A_MGRS()) return (self.A2ASystem and self.A2ASystem == "MGRS") or (not self.A2ASystem and _SETTINGS:IsA2A_MGRS())
end end
--- @param #SETTINGS self -- @param #SETTINGS self
-- @param Wrapper.Group#GROUP MenuGroup Group for which to add menus. -- @param Wrapper.Group#GROUP MenuGroup Group for which to add menus.
-- @param #table RootMenu Root menu table -- @param #table RootMenu Root menu table
-- @return #SETTINGS -- @return #SETTINGS
@@ -737,8 +740,8 @@ do -- SETTINGS
if _SETTINGS.ShowPlayerMenu == true then if _SETTINGS.ShowPlayerMenu == true then
local PlayerGroup = PlayerUnit:GetGroup() local PlayerGroup = PlayerUnit:GetGroup()
local PlayerName = PlayerUnit:GetPlayerName() local PlayerName = PlayerUnit:GetPlayerName() or "None"
local PlayerNames = PlayerGroup:GetPlayerNames() --local PlayerNames = PlayerGroup:GetPlayerNames()
local PlayerMenu = MENU_GROUP:New( PlayerGroup, 'Settings "' .. PlayerName .. '"' ) local PlayerMenu = MENU_GROUP:New( PlayerGroup, 'Settings "' .. PlayerName .. '"' )
@@ -945,49 +948,49 @@ do -- SETTINGS
return self return self
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:A2GMenuSystem( MenuGroup, RootMenu, A2GSystem ) function SETTINGS:A2GMenuSystem( MenuGroup, RootMenu, A2GSystem )
self.A2GSystem = A2GSystem self.A2GSystem = A2GSystem
MESSAGE:New( string.format( "Settings: Default A2G coordinate system set to %s for all players!", A2GSystem ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default A2G coordinate system set to %s for all players!", A2GSystem ), 5 ):ToAll()
self:SetSystemMenu( MenuGroup, RootMenu ) self:SetSystemMenu( MenuGroup, RootMenu )
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:A2AMenuSystem( MenuGroup, RootMenu, A2ASystem ) function SETTINGS:A2AMenuSystem( MenuGroup, RootMenu, A2ASystem )
self.A2ASystem = A2ASystem self.A2ASystem = A2ASystem
MESSAGE:New( string.format( "Settings: Default A2A coordinate system set to %s for all players!", A2ASystem ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default A2A coordinate system set to %s for all players!", A2ASystem ), 5 ):ToAll()
self:SetSystemMenu( MenuGroup, RootMenu ) self:SetSystemMenu( MenuGroup, RootMenu )
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuLL_DDM_Accuracy( MenuGroup, RootMenu, LL_Accuracy ) function SETTINGS:MenuLL_DDM_Accuracy( MenuGroup, RootMenu, LL_Accuracy )
self.LL_Accuracy = LL_Accuracy self.LL_Accuracy = LL_Accuracy
MESSAGE:New( string.format( "Settings: Default LL accuracy set to %s for all players!", LL_Accuracy ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default LL accuracy set to %s for all players!", LL_Accuracy ), 5 ):ToAll()
self:SetSystemMenu( MenuGroup, RootMenu ) self:SetSystemMenu( MenuGroup, RootMenu )
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuMGRS_Accuracy( MenuGroup, RootMenu, MGRS_Accuracy ) function SETTINGS:MenuMGRS_Accuracy( MenuGroup, RootMenu, MGRS_Accuracy )
self.MGRS_Accuracy = MGRS_Accuracy self.MGRS_Accuracy = MGRS_Accuracy
MESSAGE:New( string.format( "Settings: Default MGRS accuracy set to %s for all players!", MGRS_Accuracy ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default MGRS accuracy set to %s for all players!", MGRS_Accuracy ), 5 ):ToAll()
self:SetSystemMenu( MenuGroup, RootMenu ) self:SetSystemMenu( MenuGroup, RootMenu )
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuMWSystem( MenuGroup, RootMenu, MW ) function SETTINGS:MenuMWSystem( MenuGroup, RootMenu, MW )
self.Metric = MW self.Metric = MW
MESSAGE:New( string.format( "Settings: Default measurement format set to %s for all players!", MW and "Metric" or "Imperial" ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default measurement format set to %s for all players!", MW and "Metric" or "Imperial" ), 5 ):ToAll()
self:SetSystemMenu( MenuGroup, RootMenu ) self:SetSystemMenu( MenuGroup, RootMenu )
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuMessageTimingsSystem( MenuGroup, RootMenu, MessageType, MessageTime ) function SETTINGS:MenuMessageTimingsSystem( MenuGroup, RootMenu, MessageType, MessageTime )
self:SetMessageTime( MessageType, MessageTime ) self:SetMessageTime( MessageType, MessageTime )
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToAll() MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToAll()
end end
do do
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem ) function SETTINGS:MenuGroupA2GSystem( PlayerUnit, PlayerGroup, PlayerName, A2GSystem )
--BASE:E( {PlayerUnit:GetName(), A2GSystem } ) --BASE:E( {PlayerUnit:GetName(), A2GSystem } )
self.A2GSystem = A2GSystem self.A2GSystem = A2GSystem
@@ -998,7 +1001,7 @@ do -- SETTINGS
end end
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupA2ASystem( PlayerUnit, PlayerGroup, PlayerName, A2ASystem ) function SETTINGS:MenuGroupA2ASystem( PlayerUnit, PlayerGroup, PlayerName, A2ASystem )
self.A2ASystem = A2ASystem self.A2ASystem = A2ASystem
MESSAGE:New( string.format( "Settings: A2A format set to %s for player %s.", A2ASystem, PlayerName ), 5 ):ToGroup( PlayerGroup ) MESSAGE:New( string.format( "Settings: A2A format set to %s for player %s.", A2ASystem, PlayerName ), 5 ):ToGroup( PlayerGroup )
@@ -1008,7 +1011,7 @@ do -- SETTINGS
end end
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupLL_DDM_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy ) function SETTINGS:MenuGroupLL_DDM_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy )
self.LL_Accuracy = LL_Accuracy self.LL_Accuracy = LL_Accuracy
MESSAGE:New( string.format( "Settings: LL format accuracy set to %d decimal places for player %s.", LL_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup ) MESSAGE:New( string.format( "Settings: LL format accuracy set to %d decimal places for player %s.", LL_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
@@ -1018,7 +1021,7 @@ do -- SETTINGS
end end
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupMGRS_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy ) function SETTINGS:MenuGroupMGRS_AccuracySystem( PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy )
self.MGRS_Accuracy = MGRS_Accuracy self.MGRS_Accuracy = MGRS_Accuracy
MESSAGE:New( string.format( "Settings: MGRS format accuracy set to %d for player %s.", MGRS_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup ) MESSAGE:New( string.format( "Settings: MGRS format accuracy set to %d for player %s.", MGRS_Accuracy, PlayerName ), 5 ):ToGroup( PlayerGroup )
@@ -1028,7 +1031,7 @@ do -- SETTINGS
end end
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW ) function SETTINGS:MenuGroupMWSystem( PlayerUnit, PlayerGroup, PlayerName, MW )
self.Metric = MW self.Metric = MW
MESSAGE:New( string.format( "Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup ) MESSAGE:New( string.format( "Settings: Measurement format set to %s for player %s.", MW and "Metric" or "Imperial", PlayerName ), 5 ):ToGroup( PlayerGroup )
@@ -1038,7 +1041,7 @@ do -- SETTINGS
end end
end end
--- @param #SETTINGS self -- @param #SETTINGS self
function SETTINGS:MenuGroupMessageTimingsSystem( PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime ) function SETTINGS:MenuGroupMessageTimingsSystem( PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime )
self:SetMessageTime( MessageType, MessageTime ) self:SetMessageTime( MessageType, MessageTime )
MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToGroup( PlayerGroup ) MESSAGE:New( string.format( "Settings: Default message time set for %s to %d.", MessageType, MessageTime ), 5 ):ToGroup( PlayerGroup )

File diff suppressed because it is too large Load Diff

View File

@@ -15,14 +15,14 @@
-- --
-- # Demo Missions -- # Demo Missions
-- --
-- ## [SPAWNSTATIC Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SPS%20-%20Spawning%20Statics) -- ## [SPAWNSTATIC Demo Missions](https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Core/SpawnStatic)
-- --
-- --
-- === -- ===
-- --
-- # YouTube Channel -- # YouTube Channel
-- --
-- ## [SPAWNSTATIC YouTube Channel]() [No videos yet!] -- ## No videos yet!
-- --
-- === -- ===
-- --
@@ -189,6 +189,7 @@ function SPAWNSTATIC:NewFromType(StaticType, StaticCategory, CountryID)
self.InitStaticCategory=StaticCategory self.InitStaticCategory=StaticCategory
self.CountryID=CountryID or country.id.USA self.CountryID=CountryID or country.id.USA
self.SpawnTemplatePrefix=self.InitStaticType self.SpawnTemplatePrefix=self.InitStaticType
self.TemplateStaticUnit = {}
self.InitStaticCoordinate=COORDINATE:New(0, 0, 0) self.InitStaticCoordinate=COORDINATE:New(0, 0, 0)
self.InitStaticHeading=0 self.InitStaticHeading=0
@@ -196,6 +197,61 @@ function SPAWNSTATIC:NewFromType(StaticType, StaticCategory, CountryID)
return self return self
end end
--- (Internal/Cargo) Init the resource table for STATIC object that should be spawned containing storage objects.
-- NOTE that you have to init many other parameters as the resources.
-- @param #SPAWNSTATIC self
-- @param #number CombinedWeight The weight this cargo object should have (some have fixed weights!), defaults to 1kg.
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:_InitResourceTable(CombinedWeight)
if not self.TemplateStaticUnit.resourcePayload then
self.TemplateStaticUnit.resourcePayload = {
["weapons"] = {},
["aircrafts"] = {},
["gasoline"] = 0,
["diesel"] = 0,
["methanol_mixture"] = 0,
["jet_fuel"] = 0,
}
end
self:InitCargo(true)
self:InitCargoMass(CombinedWeight or 1)
return self
end
--- (User/Cargo) Add to resource table for STATIC object that should be spawned containing storage objects. Inits the object table if necessary and sets it to be cargo for helicopters.
-- @param #SPAWNSTATIC self
-- @param #string Type Type of cargo. Known types are: STORAGE.Type.WEAPONS, STORAGE.Type.LIQUIDS, STORAGE.Type.AIRCRAFT. Liquids are fuel.
-- @param #string Name Name of the cargo type. Liquids can be STORAGE.LiquidName.JETFUEL, STORAGE.LiquidName.GASOLINE, STORAGE.LiquidName.MW50 and STORAGE.LiquidName.DIESEL. The currently available weapon items are available in the `ENUMS.Storage.weapons`, e.g. `ENUMS.Storage.weapons.bombs.Mk_82Y`. Aircraft go by their typename.
-- @param #number Amount of tons (liquids) or number (everything else) to add.
-- @param #number CombinedWeight Combined weight to be set to this static cargo object. NOTE - some static cargo objects have fixed weights!
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:AddCargoResource(Type,Name,Amount,CombinedWeight)
if not self.TemplateStaticUnit.resourcePayload then
self:_InitResourceTable(CombinedWeight)
end
if Type == STORAGE.Type.LIQUIDS and type(Name) == "string" then
self.TemplateStaticUnit.resourcePayload[Name] = Amount
else
self.TemplateStaticUnit.resourcePayload[Type] = {
[Name] = {
["amount"] = Amount,
}
}
end
UTILS.PrintTableToLog(self.TemplateStaticUnit)
return self
end
--- (User/Cargo) Resets resource table to zero for STATIC object that should be spawned containing storage objects. Inits the object table if necessary and sets it to be cargo for helicopters.
-- Handy if you spawn from cargo statics which have resources already set.
-- @param #SPAWNSTATIC self
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:ResetCargoResources()
self.TemplateStaticUnit.resourcePayload = nil
self:_InitResourceTable()
return self
end
--- Initialize heading of the spawned static. --- Initialize heading of the spawned static.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param Core.Point#COORDINATE Coordinate Position where the static is spawned. -- @param Core.Point#COORDINATE Coordinate Position where the static is spawned.
@@ -317,6 +373,25 @@ function SPAWNSTATIC:InitLinkToUnit(Unit, OffsetX, OffsetY, OffsetAngle)
return self return self
end end
--- Allows to place a CallFunction hook when a new static spawns.
-- The provided method will be called when a new group is spawned, including its given parameters.
-- The first parameter of the SpawnFunction is the @{Wrapper.Static#STATIC} that was spawned.
-- @param #SPAWNSTATIC self
-- @param #function SpawnCallBackFunction The function to be called when a group spawns.
-- @param SpawnFunctionArguments A random amount of arguments to be provided to the function when the group spawns.
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:OnSpawnStatic( SpawnCallBackFunction, ... )
self:F( "OnSpawnStatic" )
self.SpawnFunctionHook = SpawnCallBackFunction
self.SpawnFunctionArguments = {}
if arg then
self.SpawnFunctionArguments = arg
end
return self
end
--- Spawn a new STATIC object. --- Spawn a new STATIC object.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param #number Heading (Optional) The heading of the static, which is a number in degrees from 0 to 360. Default is the heading of the template. -- @param #number Heading (Optional) The heading of the static, which is a number in degrees from 0 to 360. Default is the heading of the template.
@@ -488,7 +563,7 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
-- ED's dirty way to spawn FARPS. -- ED's dirty way to spawn FARPS.
Static=coalition.addGroup(CountryID, -1, TemplateGroup) Static=coalition.addGroup(CountryID, -1, TemplateGroup)
-- Currently DCS 2.8 does not trigger birth events if FAPRS are spawned! -- Currently DCS 2.8 does not trigger birth events if FARPS are spawned!
-- We create such an event. The airbase is registered in Core.Event -- We create such an event. The airbase is registered in Core.Event
local Event = { local Event = {
id = EVENTS.Birth, id = EVENTS.Birth,
@@ -504,5 +579,11 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
Static=coalition.addStaticObject(CountryID, Template) Static=coalition.addStaticObject(CountryID, Template)
end end
-- If there is a SpawnFunction hook defined, call it.
if self.SpawnFunctionHook then
-- delay calling this for .3 seconds so that it hopefully comes after the BIRTH event of the group.
self:ScheduleOnce(0.3,self.SpawnFunctionHook,mystatic, unpack(self.SpawnFunctionArguments))
end
return mystatic return mystatic
end end

View File

@@ -18,7 +18,7 @@
do -- UserFlag do -- UserFlag
--- @type USERFLAG -- @type USERFLAG
-- @field #string ClassName Name of the class -- @field #string ClassName Name of the class
-- @field #string UserFlagName Name of the flag. -- @field #string UserFlagName Name of the flag.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
@@ -58,7 +58,7 @@ do -- UserFlag
--- Set the userflag to a given Number. --- Set the userflag to a given Number.
-- @param #USERFLAG self -- @param #USERFLAG self
-- @param #number Number The number value to be checked if it is the same as the userflag. -- @param #number Number The number value to set the flag to.
-- @param #number Delay Delay in seconds, before the flag is set. -- @param #number Delay Delay in seconds, before the flag is set.
-- @return #USERFLAG The userflag instance. -- @return #USERFLAG The userflag instance.
-- @usage -- @usage

View File

@@ -20,7 +20,7 @@
do -- Velocity do -- Velocity
--- @type VELOCITY -- @type VELOCITY
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
@@ -127,7 +127,7 @@ end
do -- VELOCITY_POSITIONABLE do -- VELOCITY_POSITIONABLE
--- @type VELOCITY_POSITIONABLE -- @type VELOCITY_POSITIONABLE
-- @extends Core.Base#BASE -- @extends Core.Base#BASE

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,8 @@
-- @module Core.Zone_Detection -- @module Core.Zone_Detection
-- @image MOOSE.JPG -- @image MOOSE.JPG
--- @type ZONE_DETECTION ---
-- @type ZONE_DETECTION
-- @field DCS#Vec2 Vec2 The current location of the zone. -- @field DCS#Vec2 Vec2 The current location of the zone.
-- @field DCS#Distance Radius The radius of the zone. -- @field DCS#Distance Radius The radius of the zone.
-- @extends #ZONE_BASE -- @extends #ZONE_BASE

View File

@@ -25,38 +25,68 @@ do -- world
--- [https://wiki.hoggitworld.com/view/DCS_enum_world](https://wiki.hoggitworld.com/view/DCS_enum_world) --- [https://wiki.hoggitworld.com/view/DCS_enum_world](https://wiki.hoggitworld.com/view/DCS_enum_world)
-- @type world.event -- @type world.event
-- @field S_EVENT_INVALID -- @field S_EVENT_INVALID = 0
-- @field S_EVENT_SHOT [https://wiki.hoggitworld.com/view/DCS_event_shot](https://wiki.hoggitworld.com/view/DCS_event_shot) -- @field S_EVENT_SHOT = 1
-- @field S_EVENT_HIT [https://wiki.hoggitworld.com/view/DCS_event_hit](https://wiki.hoggitworld.com/view/DCS_event_hit) -- @field S_EVENT_HIT = 2
-- @field S_EVENT_TAKEOFF [https://wiki.hoggitworld.com/view/DCS_event_takeoff](https://wiki.hoggitworld.com/view/DCS_event_takeoff) -- @field S_EVENT_TAKEOFF = 3
-- @field S_EVENT_LAND [https://wiki.hoggitworld.com/view/DCS_event_land](https://wiki.hoggitworld.com/view/DCS_event_land) -- @field S_EVENT_LAND = 4
-- @field S_EVENT_CRASH [https://wiki.hoggitworld.com/view/DCS_event_crash](https://wiki.hoggitworld.com/view/DCS_event_crash) -- @field S_EVENT_CRASH = 5
-- @field S_EVENT_EJECTION [https://wiki.hoggitworld.com/view/DCS_event_ejection](https://wiki.hoggitworld.com/view/DCS_event_ejection) -- @field S_EVENT_EJECTION = 6
-- @field S_EVENT_REFUELING [https://wiki.hoggitworld.com/view/DCS_event_refueling](https://wiki.hoggitworld.com/view/DCS_event_refueling) -- @field S_EVENT_REFUELING = 7
-- @field S_EVENT_DEAD [https://wiki.hoggitworld.com/view/DCS_event_dead](https://wiki.hoggitworld.com/view/DCS_event_dead) -- @field S_EVENT_DEAD = 8
-- @field S_EVENT_PILOT_DEAD [https://wiki.hoggitworld.com/view/DCS_event_pilot_dead](https://wiki.hoggitworld.com/view/DCS_event_pilot_dead) -- @field S_EVENT_PILOT_DEAD = 9
-- @field S_EVENT_BASE_CAPTURED [https://wiki.hoggitworld.com/view/DCS_event_base_captured](https://wiki.hoggitworld.com/view/DCS_event_base_captured) -- @field S_EVENT_BASE_CAPTURED = 10
-- @field S_EVENT_MISSION_START [https://wiki.hoggitworld.com/view/DCS_event_mission_start](https://wiki.hoggitworld.com/view/DCS_event_mission_start) -- @field S_EVENT_MISSION_START = 11
-- @field S_EVENT_MISSION_END [https://wiki.hoggitworld.com/view/DCS_event_mission_end](https://wiki.hoggitworld.com/view/DCS_event_mission_end) -- @field S_EVENT_MISSION_END = 12
-- @field S_EVENT_TOOK_CONTROL -- @field S_EVENT_TOOK_CONTROL = 13
-- @field S_EVENT_REFUELING_STOP [https://wiki.hoggitworld.com/view/DCS_event_refueling_stop](https://wiki.hoggitworld.com/view/DCS_event_refueling_stop) -- @field S_EVENT_REFUELING_STOP = 14
-- @field S_EVENT_BIRTH [https://wiki.hoggitworld.com/view/DCS_event_birth](https://wiki.hoggitworld.com/view/DCS_event_birth) -- @field S_EVENT_BIRTH = 15
-- @field S_EVENT_HUMAN_FAILURE [https://wiki.hoggitworld.com/view/DCS_event_human_failure](https://wiki.hoggitworld.com/view/DCS_event_human_failure) -- @field S_EVENT_HUMAN_FAILURE = 16
-- @field S_EVENT_ENGINE_STARTUP [https://wiki.hoggitworld.com/view/DCS_event_engine_startup](https://wiki.hoggitworld.com/view/DCS_event_engine_startup) -- @field S_EVENT_DETAILED_FAILURE = 17
-- @field S_EVENT_ENGINE_SHUTDOWN [https://wiki.hoggitworld.com/view/DCS_event_engine_shutdown](https://wiki.hoggitworld.com/view/DCS_event_engine_shutdown) -- @field S_EVENT_ENGINE_STARTUP = 18
-- @field S_EVENT_PLAYER_ENTER_UNIT [https://wiki.hoggitworld.com/view/DCS_event_player_enter_unit](https://wiki.hoggitworld.com/view/DCS_event_player_enter_unit) -- @field S_EVENT_ENGINE_SHUTDOWN = 19
-- @field S_EVENT_PLAYER_LEAVE_UNIT [https://wiki.hoggitworld.com/view/DCS_event_player_leave_unit](https://wiki.hoggitworld.com/view/DCS_event_player_leave_unit) -- @field S_EVENT_PLAYER_ENTER_UNIT = 20
-- @field S_EVENT_PLAYER_COMMENT -- @field S_EVENT_PLAYER_LEAVE_UNIT = 21
-- @field S_EVENT_SHOOTING_START [https://wiki.hoggitworld.com/view/DCS_event_shooting_start](https://wiki.hoggitworld.com/view/DCS_event_shooting_start) -- @field S_EVENT_PLAYER_COMMENT = 22
-- @field S_EVENT_SHOOTING_END [https://wiki.hoggitworld.com/view/DCS_event_shooting_end](https://wiki.hoggitworld.com/view/DCS_event_shooting_end) -- @field S_EVENT_SHOOTING_START = 23
-- @field S_EVENT_MARK ADDED [https://wiki.hoggitworld.com/view/DCS_event_mark_added](https://wiki.hoggitworld.com/view/DCS_event_mark_added) DCS>=2.5.1 -- @field S_EVENT_SHOOTING_END = 24
-- @field S_EVENT_MARK CHANGE [https://wiki.hoggitworld.com/view/DCS_event_mark_change](https://wiki.hoggitworld.com/view/DCS_event_mark_change) DCS>=2.5.1 -- @field S_EVENT_MARK_ADDED = 25
-- @field S_EVENT_MARK REMOVE [https://wiki.hoggitworld.com/view/DCS_event_mark_remove](https://wiki.hoggitworld.com/view/DCS_event_mark_remove) DCS>=2.5.1 -- @field S_EVENT_MARK_CHANGE = 26
-- @field S_EVENT_KILL [https://wiki.hoggitworld.com/view/DCS_event_kill](https://wiki.hoggitworld.com/view/DCS_event_kill) DCS>=2.5.6 -- @field S_EVENT_MARK_REMOVED = 27
-- @field S_EVENT_SCORE [https://wiki.hoggitworld.com/view/DCS_event_score](https://wiki.hoggitworld.com/view/DCS_event_score) DCS>=2.5.6 -- @field S_EVENT_KILL = 28
-- @field S_EVENT_UNIT_LOST [https://wiki.hoggitworld.com/view/DCS_event_unit_lost](https://wiki.hoggitworld.com/view/DCS_event_unit_lost) DCS>=2.5.6 -- @field S_EVENT_SCORE = 29
-- @field S_EVENT_LANDING_AFTER_EJECTION [https://wiki.hoggitworld.com/view/DCS_event_landing_after_ejection](https://wiki.hoggitworld.com/view/DCS_event_landing_after_ejection) DCS>=2.5.6 -- @field S_EVENT_UNIT_LOST = 30
-- @field S_EVENT_MAX -- @field S_EVENT_LANDING_AFTER_EJECTION = 31
-- @field S_EVENT_PARATROOPER_LENDING = 32 -- who's lending whom what? ;)
-- @field S_EVENT_DISCARD_CHAIR_AFTER_EJECTION = 33
-- @field S_EVENT_WEAPON_ADD = 34
-- @field S_EVENT_TRIGGER_ZONE = 35
-- @field S_EVENT_LANDING_QUALITY_MARK = 36
-- @field S_EVENT_BDA = 37 -- battle damage assessment
-- @field S_EVENT_AI_ABORT_MISSION = 38
-- @field S_EVENT_DAYNIGHT = 39
-- @field S_EVENT_FLIGHT_TIME = 40
-- @field S_EVENT_PLAYER_SELF_KILL_PILOT = 41
-- @field S_EVENT_PLAYER_CAPTURE_AIRFIELD = 42
-- @field S_EVENT_EMERGENCY_LANDING = 43
-- @field S_EVENT_UNIT_CREATE_TASK = 44
-- @field S_EVENT_UNIT_DELETE_TASK = 45
-- @field S_EVENT_SIMULATION_START = 46
-- @field S_EVENT_WEAPON_REARM = 47
-- @field S_EVENT_WEAPON_DROP = 48
-- @field S_EVENT_UNIT_TASK_COMPLETE = 49
-- @field S_EVENT_UNIT_TASK_STAGE = 50
-- @field S_EVENT_MAC_EXTRA_SCORE= 51 -- not sure what this is
-- @field S_EVENT_MISSION_RESTART= 52
-- @field S_EVENT_MISSION_WINNER = 53
-- @field S_EVENT_RUNWAY_TAKEOFF= 54
-- @field S_EVENT_RUNWAY_TOUCH= 55
-- @field S_EVENT_MAC_LMS_RESTART= 56 -- not sure what this is
-- @field S_EVENT_SIMULATION_FREEZE = 57
-- @field S_EVENT_SIMULATION_UNFREEZE = 58
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_START = 59
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH = 60
-- @field S_EVENT_MAX = 61
--- The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events. --- The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events.
-- @type world.BirthPlace -- @type world.BirthPlace
@@ -1665,6 +1695,7 @@ do -- AI
-- @field ALARM_STATE @{#AI.Option.Ground.val.ALARM_STATE} -- @field ALARM_STATE @{#AI.Option.Ground.val.ALARM_STATE}
-- @field ENGAGE_AIR_WEAPONS -- @field ENGAGE_AIR_WEAPONS
-- @field AC_ENGAGEMENT_RANGE_RESTRICTION -- @field AC_ENGAGEMENT_RANGE_RESTRICTION
-- @field EVASION_OF_ARM
--- ---
-- @type AI.Option.Ground.mid -- Moose added -- @type AI.Option.Ground.mid -- Moose added

View File

@@ -17,7 +17,7 @@
-- --
-- ## Example Missions: -- ## Example Missions:
-- --
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/CSR-001%20-%20Basics). -- Demo missions can be found on [GitHub](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Functional/AICSAR).
-- --
-- === -- ===
-- --
@@ -527,7 +527,7 @@ end
--- [User] Switch sound output on and use SRS output for sound files. --- [User] Switch sound output on and use SRS output for sound files.
-- @param #AICSAR self -- @param #AICSAR self
-- @param #boolean OnOff Switch on (true) or off (false). -- @param #boolean OnOff Switch on (true) or off (false).
-- @param #string Path Path to your SRS Server Component, e.g. "E:\\\\Program Files\\\\DCS-SimpleRadio-Standalone" -- @param #string Path Path to your SRS Server Component, e.g. "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone"
-- @param #number Frequency Defaults to 243 (guard) -- @param #number Frequency Defaults to 243 (guard)
-- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM -- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM
-- @param #string SoundPath Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor. -- @param #string SoundPath Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor.
@@ -538,13 +538,13 @@ function AICSAR:SetSRSRadio(OnOff,Path,Frequency,Modulation,SoundPath,Port)
self.SRSRadio = OnOff and true self.SRSRadio = OnOff and true
self.SRSTTSRadio = false self.SRSTTSRadio = false
self.SRSFrequency = Frequency or 243 self.SRSFrequency = Frequency or 243
self.SRSPath = Path or "c:\\" self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
self.SRS:SetLabel("ACSR") self.SRS:SetLabel("ACSR")
self.SRS:SetCoalition(self.coalition) self.SRS:SetCoalition(self.coalition)
self.SRSModulation = Modulation or radio.modulation.AM self.SRSModulation = Modulation or radio.modulation.AM
local soundpath = os.getenv('TMP') .. "\\DCS\\Mission\\l10n\\DEFAULT" -- defaults to "l10n/DEFAULT/", i.e. add messages by "Sound to..." in the ME local soundpath = os.getenv('TMP') .. "\\DCS\\Mission\\l10n\\DEFAULT" -- defaults to "l10n/DEFAULT/", i.e. add messages by "Sound to..." in the ME
self.SRSSoundPath = SoundPath or soundpath self.SRSSoundPath = SoundPath or soundpath
self.SRSPort = Port or 5002 self.SRSPort = Port or MSRS.port or 5002
if OnOff then if OnOff then
self.SRS = MSRS:New(Path,Frequency,Modulation) self.SRS = MSRS:New(Path,Frequency,Modulation)
self.SRS:SetPort(self.SRSPort) self.SRS:SetPort(self.SRSPort)
@@ -570,11 +570,11 @@ function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Cultur
self.SRSTTSRadio = OnOff and true self.SRSTTSRadio = OnOff and true
self.SRSRadio = false self.SRSRadio = false
self.SRSFrequency = Frequency or 243 self.SRSFrequency = Frequency or 243
self.SRSPath = Path or "C:\\Program Files\\DCS-SimpleRadio-Standalone" self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
self.SRSModulation = Modulation or radio.modulation.AM self.SRSModulation = Modulation or radio.modulation.AM
self.SRSPort = Port or 5002 self.SRSPort = Port or MSRS.port or 5002
if OnOff then if OnOff then
self.SRS = MSRS:New(Path,Frequency,Modulation,1) self.SRS = MSRS:New(self.SRSPath,Frequency,Modulation)
self.SRS:SetPort(self.SRSPort) self.SRS:SetPort(self.SRSPort)
self.SRS:SetCoalition(self.coalition) self.SRS:SetCoalition(self.coalition)
self.SRS:SetLabel("ACSR") self.SRS:SetLabel("ACSR")
@@ -582,7 +582,8 @@ function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Cultur
self.SRS:SetCulture(Culture) self.SRS:SetCulture(Culture)
self.SRS:SetGender(Gender) self.SRS:SetGender(Gender)
if GoogleCredentials then if GoogleCredentials then
self.SRS:SetGoogle(GoogleCredentials) self.SRS:SetProviderOptionsGoogle(GoogleCredentials,GoogleCredentials)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
self.SRSGoogle = true self.SRSGoogle = true
end end
self.SRSQ = MSRSQUEUE:New(self.alias) self.SRSQ = MSRSQUEUE:New(self.alias)
@@ -600,14 +601,16 @@ end
function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender) function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender)
self:T(self.lid .. "SetPilotTTSVoice") self:T(self.lid .. "SetPilotTTSVoice")
self.SRSPilotVoice = true self.SRSPilotVoice = true
self.SRSPilot = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation,1) self.SRSPilot = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation)
self.SRSPilot:SetCoalition(self.coalition) self.SRSPilot:SetCoalition(self.coalition)
self.SRSPilot:SetVoice(Voice) self.SRSPilot:SetVoice(Voice)
self.SRSPilot:SetCulture(Culture or "en-US") self.SRSPilot:SetCulture(Culture or "en-US")
self.SRSPilot:SetGender(Gender or "male") self.SRSPilot:SetGender(Gender or "male")
self.SRSPilot:SetLabel("PILOT") self.SRSPilot:SetLabel("PILOT")
if self.SRS.google then if self.SRSGoogle then
self.SRSPilot:SetGoogle(self.SRS.google) local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
self.SRSPilot:SetProviderOptionsGoogle(poptions.credentials,poptions.key)
self.SRSPilot:SetProvider(MSRS.Provider.GOOGLE)
end end
return self return self
end end
@@ -622,14 +625,16 @@ end
function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender) function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender)
self:T(self.lid .. "SetOperatorTTSVoice") self:T(self.lid .. "SetOperatorTTSVoice")
self.SRSOperatorVoice = true self.SRSOperatorVoice = true
self.SRSOperator = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation,1) self.SRSOperator = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation)
self.SRSOperator:SetCoalition(self.coalition) self.SRSOperator:SetCoalition(self.coalition)
self.SRSOperator:SetVoice(Voice) self.SRSOperator:SetVoice(Voice)
self.SRSOperator:SetCulture(Culture or "en-GB") self.SRSOperator:SetCulture(Culture or "en-GB")
self.SRSOperator:SetGender(Gender or "female") self.SRSOperator:SetGender(Gender or "female")
self.SRSPilot:SetLabel("RESCUE") self.SRSOperator:SetLabel("RESCUE")
if self.SRS.google then if self.SRSGoogle then
self.SRSOperator:SetGoogle(self.SRS.google) local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
self.SRSOperator:SetProviderOptionsGoogle(poptions.credentials,poptions.key)
self.SRSOperator:SetProvider(MSRS.Provider.GOOGLE)
end end
return self return self
end end

View File

@@ -10,9 +10,7 @@
-- --
-- === -- ===
-- --
-- ## Missions: -- ## Missions: None
--
-- [ABP - Airbase Police](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police)
-- --
-- === -- ===
-- --
@@ -699,7 +697,8 @@ end
function ATC_GROUND_UNIVERSAL:_AirbaseMonitor() function ATC_GROUND_UNIVERSAL:_AirbaseMonitor()
self:I("_AirbaseMonitor") self:I("_AirbaseMonitor")
self.SetClient:ForEachClient( self.SetClient:ForEachClient(
--- @param Wrapper.Client#CLIENT Client --- Nameless function
-- @param Wrapper.Client#CLIENT Client
function( Client ) function( Client )
if Client:IsAlive() then if Client:IsAlive() then

View File

@@ -8,7 +8,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- ### [AmmoTruck](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/AMT%20-%20AmmoTruck/AmmoTruck%20100%20-%20NTTR%20-%20Basic) -- Demo missions can be found on [GitHub](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Functional/AmmoTruck)
-- --
-- === -- ===
-- --
@@ -20,7 +20,7 @@
-- Last update: July 2023 -- Last update: July 2023
------------------------------------------------------------------------- -------------------------------------------------------------------------
--- **AMMOTRUCK** class, extends Core.FSM#FSM --- **AMMOTRUCK** class, extends Core.Fsm#FSM
-- @type AMMOTRUCK -- @type AMMOTRUCK
-- @field #string ClassName Class Name -- @field #string ClassName Class Name
-- @field #string lid Lid for log entries -- @field #string lid Lid for log entries
@@ -41,7 +41,7 @@
-- @field #number waitingtime Max waiting time in seconds -- @field #number waitingtime Max waiting time in seconds
-- @field #boolean routeonroad Route truck on road if true (default) -- @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 -- @field #number reloads Number of reloads a single truck can do before he must return home
-- @extends Core.FSM#FSM -- @extends Core.Fsm#FSM
--- *Amateurs talk about tactics, but professionals study logistics.* - General Robert H Barrow, USMC --- *Amateurs talk about tactics, but professionals study logistics.* - General Robert H Barrow, USMC
-- --
@@ -77,7 +77,7 @@
-- ammotruck.monitor = -60 -- 1 minute - AMMOTRUCK checks run every one minute -- ammotruck.monitor = -60 -- 1 minute - AMMOTRUCK checks run every one minute
-- ammotruck.routeonroad = true -- Trucks will **try** to drive on roads -- 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.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 -- 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 -- ## 3 FSM Events to shape mission
-- --

View File

@@ -45,6 +45,7 @@
-- @field #table currentMove Holds the current commanded move, if there is one assigned. -- @field #table currentMove Holds the current commanded move, if there is one assigned.
-- @field #number Nammo0 Initial amount total ammunition (shells+rockets+missiles) of the whole group. -- @field #number Nammo0 Initial amount total ammunition (shells+rockets+missiles) of the whole group.
-- @field #number Nshells0 Initial amount of shells of the whole group. -- @field #number Nshells0 Initial amount of shells of the whole group.
-- @field #number Narty0 Initial amount of artillery shells of the whole group.
-- @field #number Nrockets0 Initial amount of rockets of the whole group. -- @field #number Nrockets0 Initial amount of rockets of the whole group.
-- @field #number Nmissiles0 Initial amount of missiles of the whole group. -- @field #number Nmissiles0 Initial amount of missiles of the whole group.
-- @field #number Nukes0 Initial amount of tactical nukes of the whole group. Default is 0. -- @field #number Nukes0 Initial amount of tactical nukes of the whole group. Default is 0.
@@ -415,7 +416,7 @@
-- arty set, battery "Paladin Alpha", rearming place -- arty set, battery "Paladin Alpha", rearming place
-- --
-- Setting the rearming group is independent of the position of the mark. Just create one anywhere on the map and type -- Setting the rearming group is independent of the position of the mark. Just create one anywhere on the map and type
-- arty set, battery "Mortar Bravo", rearming group "Ammo Truck M818" -- arty set, battery "Mortar Bravo", rearming group "Ammo Truck M939"
-- Note that the name of the rearming group has to be given in quotation marks and spelt exactly as the group name defined in the mission editor. -- Note that the name of the rearming group has to be given in quotation marks and spelt exactly as the group name defined in the mission editor.
-- --
-- ## Transporting -- ## Transporting
@@ -453,7 +454,7 @@
-- -- Creat a new ARTY object from a Paladin group. -- -- Creat a new ARTY object from a Paladin group.
-- paladin=ARTY:New(GROUP:FindByName("Blue Paladin")) -- paladin=ARTY:New(GROUP:FindByName("Blue Paladin"))
-- --
-- -- Define a rearming group. This is a Transport M818 truck. -- -- Define a rearming group. This is a Transport M939 truck.
-- paladin:SetRearmingGroup(GROUP:FindByName("Blue Ammo Truck")) -- paladin:SetRearmingGroup(GROUP:FindByName("Blue Ammo Truck"))
-- --
-- -- Set the max firing range. A Paladin unit has a range of 20 km. -- -- Set the max firing range. A Paladin unit has a range of 20 km.
@@ -694,7 +695,7 @@ ARTY.db={
--- Arty script version. --- Arty script version.
-- @field #string version -- @field #string version
ARTY.version="1.3.0" ARTY.version="1.3.1"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -707,7 +708,7 @@ ARTY.version="1.3.0"
-- DONE: Add user defined rearm weapon types. -- DONE: Add user defined rearm weapon types.
-- DONE: Check if target is in range. Maybe this requires a data base with the ranges of all arty units. <solved by user function> -- DONE: Check if target is in range. Maybe this requires a data base with the ranges of all arty units. <solved by user function>
-- DONE: Make ARTY move to rearming position. -- DONE: Make ARTY move to rearming position.
-- DONE: Check that right rearming vehicle is specified. Blue M818, Red Ural-375. Are there more? <user needs to know!> -- DONE: Check that right rearming vehicle is specified. Blue M939, Red Ural-375. Are there more? <user needs to know!>
-- DONE: Check if ARTY group is still alive. -- DONE: Check if ARTY group is still alive.
-- DONE: Handle dead events. -- DONE: Handle dead events.
-- DONE: Abort firing task if no shooting event occured with 5(?) minutes. Something went wrong then. Min/max range for example. -- DONE: Abort firing task if no shooting event occured with 5(?) minutes. Something went wrong then. Min/max range for example.
@@ -1532,7 +1533,7 @@ end
--- Assign a group, which is responsible for rearming the ARTY group. If the group is too far away from the ARTY group it will be guided towards the ARTY group. --- Assign a group, which is responsible for rearming the ARTY group. If the group is too far away from the ARTY group it will be guided towards the ARTY group.
-- @param #ARTY self -- @param #ARTY self
-- @param Wrapper.Group#GROUP group Group that is supposed to rearm the ARTY group. For the blue coalition, this is often a unarmed M818 transport whilst for red an unarmed Ural-375 transport can be used. -- @param Wrapper.Group#GROUP group Group that is supposed to rearm the ARTY group. For the blue coalition, this is often a unarmed M939 transport whilst for red an unarmed Ural-375 transport can be used.
-- @return self -- @return self
function ARTY:SetRearmingGroup(group) function ARTY:SetRearmingGroup(group)
self:F({group=group}) self:F({group=group})
@@ -1887,7 +1888,7 @@ function ARTY:onafterStart(Controllable, From, Event, To)
MESSAGE:New(text, 5):ToAllIf(self.Debug) MESSAGE:New(text, 5):ToAllIf(self.Debug)
-- Get Ammo. -- Get Ammo.
self.Nammo0, self.Nshells0, self.Nrockets0, self.Nmissiles0=self:GetAmmo(self.Debug) self.Nammo0, self.Nshells0, self.Nrockets0, self.Nmissiles0, self.Narty0=self:GetAmmo(self.Debug)
-- Init nuclear explosion parameters if they were not set by user. -- Init nuclear explosion parameters if they were not set by user.
if self.nukerange==nil then if self.nukerange==nil then
@@ -2093,7 +2094,7 @@ function ARTY:_StatusReport(display)
end end
-- Get Ammo. -- Get Ammo.
local Nammo, Nshells, Nrockets, Nmissiles=self:GetAmmo() local Nammo, Nshells, Nrockets, Nmissiles, Narty=self:GetAmmo()
local Nnukes=self.Nukes local Nnukes=self.Nukes
local Nillu=self.Nillu local Nillu=self.Nillu
local Nsmoke=self.Nsmoke local Nsmoke=self.Nsmoke
@@ -2106,7 +2107,7 @@ function ARTY:_StatusReport(display)
text=text..string.format("Clock = %s\n", Clock) text=text..string.format("Clock = %s\n", Clock)
text=text..string.format("FSM state = %s\n", self:GetState()) text=text..string.format("FSM state = %s\n", self:GetState())
text=text..string.format("Total ammo count = %d\n", Nammo) text=text..string.format("Total ammo count = %d\n", Nammo)
text=text..string.format("Number of shells = %d\n", Nshells) text=text..string.format("Number of shells = %d\n", Narty)
text=text..string.format("Number of rockets = %d\n", Nrockets) text=text..string.format("Number of rockets = %d\n", Nrockets)
text=text..string.format("Number of missiles = %d\n", Nmissiles) text=text..string.format("Number of missiles = %d\n", Nmissiles)
text=text..string.format("Number of nukes = %d\n", Nnukes) text=text..string.format("Number of nukes = %d\n", Nnukes)
@@ -2293,19 +2294,19 @@ function ARTY:OnEventShot(EventData)
end end
-- Get current ammo. -- Get current ammo.
local _nammo,_nshells,_nrockets,_nmissiles=self:GetAmmo() local _nammo,_nshells,_nrockets,_nmissiles,_narty=self:GetAmmo()
-- Decrease available nukes because we just fired one. -- Decrease available nukes because we just fired one.
if self.currentTarget.weapontype==ARTY.WeaponType.TacticalNukes then if self.currentTarget.weapontype==ARTY.WeaponType.TacticalNukes then
self.Nukes=self.Nukes-1 self.Nukes=self.Nukes-1
end end
-- Decrease available illuminatin shells because we just fired one. -- Decrease available illumination shells because we just fired one.
if self.currentTarget.weapontype==ARTY.WeaponType.IlluminationShells then if self.currentTarget.weapontype==ARTY.WeaponType.IlluminationShells then
self.Nillu=self.Nillu-1 self.Nillu=self.Nillu-1
end end
-- Decrease available illuminatin shells because we just fired one. -- Decrease available smoke shells because we just fired one.
if self.currentTarget.weapontype==ARTY.WeaponType.SmokeShells then if self.currentTarget.weapontype==ARTY.WeaponType.SmokeShells then
self.Nsmoke=self.Nsmoke-1 self.Nsmoke=self.Nsmoke-1
end end
@@ -2323,7 +2324,7 @@ function ARTY:OnEventShot(EventData)
-- Weapon type name for current target. -- Weapon type name for current target.
local _weapontype=self:_WeaponTypeName(self.currentTarget.weapontype) local _weapontype=self:_WeaponTypeName(self.currentTarget.weapontype)
self:T(self.lid..string.format("Group %s ammo: total=%d, shells=%d, rockets=%d, missiles=%d", self.groupname, _nammo, _nshells, _nrockets, _nmissiles)) self:T(self.lid..string.format("Group %s ammo: total=%d, shells=%d, rockets=%d, missiles=%d", self.groupname, _nammo, _narty, _nrockets, _nmissiles))
self:T(self.lid..string.format("Group %s uses weapontype %s for current target.", self.groupname, _weapontype)) self:T(self.lid..string.format("Group %s uses weapontype %s for current target.", self.groupname, _weapontype))
-- Default switches for cease fire and relocation. -- Default switches for cease fire and relocation.
@@ -2771,7 +2772,7 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
self:_EventFromTo("onafterStatus", Event, From, To) self:_EventFromTo("onafterStatus", Event, From, To)
-- Get ammo. -- Get ammo.
local nammo, nshells, nrockets, nmissiles=self:GetAmmo() local nammo, nshells, nrockets, nmissiles, narty=self:GetAmmo()
-- We have a cargo group ==> check if group was loaded into a carrier. -- We have a cargo group ==> check if group was loaded into a carrier.
if self.iscargo and self.cargogroup then if self.iscargo and self.cargogroup then
@@ -2788,7 +2789,7 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
-- FSM state. -- FSM state.
local fsmstate=self:GetState() local fsmstate=self:GetState()
self:T(self.lid..string.format("Status %s, Ammo total=%d: shells=%d [smoke=%d, illu=%d, nukes=%d*%.3f kT], rockets=%d, missiles=%d", fsmstate, nammo, nshells, self.Nsmoke, self.Nillu, self.Nukes, self.nukewarhead/1000000, nrockets, nmissiles)) self:T(self.lid..string.format("Status %s, Ammo total=%d: shells=%d [smoke=%d, illu=%d, nukes=%d*%.3f kT], rockets=%d, missiles=%d", fsmstate, nammo, narty, self.Nsmoke, self.Nillu, self.Nukes, self.nukewarhead/1000000, nrockets, nmissiles))
if self.Controllable and self.Controllable:IsAlive() then if self.Controllable and self.Controllable:IsAlive() then
@@ -2872,19 +2873,18 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
self:CeaseFire(self.currentTarget) self:CeaseFire(self.currentTarget)
end end
-- Open fire on timed target. if self:is("CombatReady") then
self:OpenFire(_timedTarget) -- Open fire on timed target.
self:OpenFire(_timedTarget)
end
elseif _normalTarget then elseif _normalTarget then
-- Open fire on normal target. if self:is("CombatReady") then
self:OpenFire(_normalTarget) -- Open fire on normal target.
self:OpenFire(_normalTarget)
end
end end
-- Get ammo.
--local nammo, nshells, nrockets, nmissiles=self:GetAmmo()
-- Check if we have a target in the queue for which weapons are still available. -- Check if we have a target in the queue for which weapons are still available.
local gotsome=false local gotsome=false
if #self.targets>0 then if #self.targets>0 then
@@ -3045,14 +3045,14 @@ function ARTY:onafterOpenFire(Controllable, From, Event, To, target)
local range=Controllable:GetCoordinate():Get2DDistance(target.coord) local range=Controllable:GetCoordinate():Get2DDistance(target.coord)
-- Get ammo. -- Get ammo.
local Nammo, Nshells, Nrockets, Nmissiles=self:GetAmmo() local Nammo, Nshells, Nrockets, Nmissiles, Narty=self:GetAmmo()
local nfire=Nammo local nfire=Narty
local _type="shots" local _type="shots"
if target.weapontype==ARTY.WeaponType.Auto then if target.weapontype==ARTY.WeaponType.Auto then
nfire=Nammo nfire=Narty
_type="shots" _type="shots"
elseif target.weapontype==ARTY.WeaponType.Cannon then elseif target.weapontype==ARTY.WeaponType.Cannon then
nfire=Nshells nfire=Narty
_type="shells" _type="shells"
elseif target.weapontype==ARTY.WeaponType.TacticalNukes then elseif target.weapontype==ARTY.WeaponType.TacticalNukes then
nfire=self.Nukes nfire=self.Nukes
@@ -3337,7 +3337,7 @@ function ARTY:_CheckRearmed()
self:F2() self:F2()
-- Get current ammo. -- Get current ammo.
local nammo,nshells,nrockets,nmissiles=self:GetAmmo() local nammo,nshells,nrockets,nmissiles,narty=self:GetAmmo()
-- Number of units still alive. -- Number of units still alive.
local units=self.Controllable:GetUnits() local units=self.Controllable:GetUnits()
@@ -3546,7 +3546,7 @@ end
-- @param #string To To state. -- @param #string To To state.
function ARTY:onafterRespawn(Controllable, From, Event, To) function ARTY:onafterRespawn(Controllable, From, Event, To)
self:_EventFromTo("onafterRespawn", Event, From, To) self:_EventFromTo("onafterRespawn", Event, From, To)
self:I("Respawning arty group")
local group=self.Controllable --Wrapper.Group#GROUP local group=self.Controllable --Wrapper.Group#GROUP
-- Respawn group. -- Respawn group.
@@ -3604,6 +3604,10 @@ function ARTY:_FireAtCoord(coord, radius, nshells, weapontype)
weapontype=ARTY.WeaponType.Cannon weapontype=ARTY.WeaponType.Cannon
end end
if group:HasTask() then
group:ClearTasks()
end
-- Set ROE to weapon free. -- Set ROE to weapon free.
group:OptionROEOpenFire() group:OptionROEOpenFire()
@@ -3614,7 +3618,7 @@ function ARTY:_FireAtCoord(coord, radius, nshells, weapontype)
local fire=group:TaskFireAtPoint(vec2, radius, nshells, weapontype) local fire=group:TaskFireAtPoint(vec2, radius, nshells, weapontype)
-- Execute task. -- Execute task.
group:SetTask(fire) group:SetTask(fire,1)
end end
--- Set task for attacking a group. --- Set task for attacking a group.
@@ -3632,6 +3636,10 @@ function ARTY:_AttackGroup(target)
weapontype=ARTY.WeaponType.Cannon weapontype=ARTY.WeaponType.Cannon
end end
if group:HasTask() then
group:ClearTasks()
end
-- Set ROE to weapon free. -- Set ROE to weapon free.
group:OptionROEOpenFire() group:OptionROEOpenFire()
@@ -3642,7 +3650,7 @@ function ARTY:_AttackGroup(target)
local fire=group:TaskAttackGroup(targetgroup, weapontype, AI.Task.WeaponExpend.ONE, 1) local fire=group:TaskAttackGroup(targetgroup, weapontype, AI.Task.WeaponExpend.ONE, 1)
-- Execute task. -- Execute task.
group:SetTask(fire) group:SetTask(fire,1)
end end
@@ -3709,51 +3717,6 @@ function ARTY:_NuclearBlast(_coord)
ignite(_fires) ignite(_fires)
end end
--[[
local ZoneNuke=ZONE_RADIUS:New("Nukezone", _coord:GetVec2(), 2000)
-- Scan for Scenery objects.
ZoneNuke:Scan(Object.Category.SCENERY)
-- Array with all possible hideouts, i.e. scenery objects in the vicinity of the group.
local scenery={}
for SceneryTypeName, SceneryData in pairs(ZoneNuke:GetScannedScenery()) do
for SceneryName, SceneryObject in pairs(SceneryData) do
local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY
-- Position of the scenery object.
local spos=SceneryObject:GetCoordinate()
-- Distance from group to impact point.
local distance= spos:Get2DDistance(_coord)
-- Place markers on every possible scenery object.
if self.Debug then
local MarkerID=spos:MarkToAll(string.format("%s scenery object %s", self.Controllable:GetName(), SceneryObject:GetTypeName()))
local text=string.format("%s scenery: %s, Coord %s", self.Controllable:GetName(), SceneryObject:GetTypeName(), SceneryObject:GetCoordinate():ToStringLLDMS())
self:T2(SUPPRESSION.id..text)
end
-- Add to table.
table.insert(scenery, {object=SceneryObject, distance=distance})
--SceneryObject:Destroy()
end
end
-- Sort scenery wrt to distance from impact point.
-- local _sort = function(a,b) return a.distance < b.distance end
-- table.sort(scenery,_sort)
-- for _,object in pairs(scenery) do
-- local sobject=object -- Wrapper.Scenery#SCENERY
-- sobject:Destroy()
-- end
]]
end end
--- Route group to a certain point. --- Route group to a certain point.
@@ -3915,6 +3878,7 @@ end
-- @return #number Number of shells the group has left. -- @return #number Number of shells the group has left.
-- @return #number Number of rockets the group has left. -- @return #number Number of rockets the group has left.
-- @return #number Number of missiles the group has left. -- @return #number Number of missiles the group has left.
-- @return #number Number of artillery shells the group has left.
function ARTY:GetAmmo(display) function ARTY:GetAmmo(display)
self:F3({display=display}) self:F3({display=display})
@@ -3928,6 +3892,7 @@ function ARTY:GetAmmo(display)
local nshells=0 local nshells=0
local nrockets=0 local nrockets=0
local nmissiles=0 local nmissiles=0
local nartyshells=0
-- Get all units. -- Get all units.
local units=self.Controllable:GetUnits() local units=self.Controllable:GetUnits()
@@ -4030,7 +3995,8 @@ function ARTY:GetAmmo(display)
-- Add up all shells. -- Add up all shells.
nshells=nshells+Nammo nshells=nshells+Nammo
local _,_,_,_,_,shells = unit:GetAmmunition()
nartyshells=nartyshells+shells
-- Debug info. -- Debug info.
text=text..string.format("- %d shells of type %s\n", Nammo, _weaponName) text=text..string.format("- %d shells of type %s\n", Nammo, _weaponName)
@@ -4076,7 +4042,7 @@ function ARTY:GetAmmo(display)
-- Total amount of ammunition. -- Total amount of ammunition.
nammo=nshells+nrockets+nmissiles nammo=nshells+nrockets+nmissiles
return nammo, nshells, nrockets, nmissiles return nammo, nshells, nrockets, nmissiles, nartyshells
end end
--- Returns a name of a missile category. --- Returns a name of a missile category.
@@ -4827,7 +4793,10 @@ function ARTY:_CheckShootingStarted()
-- Check if we waited long enough and no shot was fired. -- Check if we waited long enough and no shot was fired.
--if dt > self.WaitForShotTime and self.Nshots==0 then --if dt > self.WaitForShotTime and self.Nshots==0 then
if dt > self.WaitForShotTime and (self.Nshots==0 or self.currentTarget.nshells >= self.Nshots) then --https://github.com/FlightControl-Master/MOOSE/issues/1356
self:T(string.format("dt = %d WaitTime = %d | shots = %d TargetShells = %d",dt,self.WaitForShotTime,self.Nshots,self.currentTarget.nshells))
if (dt > self.WaitForShotTime and self.Nshots==0) or (self.currentTarget.nshells <= self.Nshots) then --https://github.com/FlightControl-Master/MOOSE/issues/1356
-- Debug info. -- Debug info.
self:T(self.lid..string.format("%s, no shot event after %d seconds. Removing current target %s from list.", self.groupname, self.WaitForShotTime, name)) self:T(self.lid..string.format("%s, no shot event after %d seconds. Removing current target %s from list.", self.groupname, self.WaitForShotTime, name))
@@ -4889,7 +4858,7 @@ end
function ARTY:_CheckOutOfAmmo(targets) function ARTY:_CheckOutOfAmmo(targets)
-- Get current ammo. -- Get current ammo.
local _nammo,_nshells,_nrockets,_nmissiles=self:GetAmmo() local _nammo,_nshells,_nrockets,_nmissiles,_narty=self:GetAmmo()
-- Special weapon type requested ==> Check if corresponding ammo is empty. -- Special weapon type requested ==> Check if corresponding ammo is empty.
local _partlyoutofammo=false local _partlyoutofammo=false
@@ -4901,7 +4870,7 @@ function ARTY:_CheckOutOfAmmo(targets)
self:T(self.lid..string.format("Group %s, auto weapon requested for target %s but all ammo is empty.", self.groupname, Target.name)) self:T(self.lid..string.format("Group %s, auto weapon requested for target %s but all ammo is empty.", self.groupname, Target.name))
_partlyoutofammo=true _partlyoutofammo=true
elseif Target.weapontype==ARTY.WeaponType.Cannon and _nshells==0 then elseif Target.weapontype==ARTY.WeaponType.Cannon and _narty==0 then
self:T(self.lid..string.format("Group %s, cannons requested for target %s but shells empty.", self.groupname, Target.name)) self:T(self.lid..string.format("Group %s, cannons requested for target %s but shells empty.", self.groupname, Target.name))
_partlyoutofammo=true _partlyoutofammo=true
@@ -4945,14 +4914,14 @@ end
function ARTY:_CheckWeaponTypeAvailable(target) function ARTY:_CheckWeaponTypeAvailable(target)
-- Get current ammo of group. -- Get current ammo of group.
local Nammo, Nshells, Nrockets, Nmissiles=self:GetAmmo() local Nammo, Nshells, Nrockets, Nmissiles, Narty=self:GetAmmo()
-- Check if enough ammo is there for the selected weapon type. -- Check if enough ammo is there for the selected weapon type.
local nfire=Nammo local nfire=Nammo
if target.weapontype==ARTY.WeaponType.Auto then if target.weapontype==ARTY.WeaponType.Auto then
nfire=Nammo nfire=Nammo
elseif target.weapontype==ARTY.WeaponType.Cannon then elseif target.weapontype==ARTY.WeaponType.Cannon then
nfire=Nshells nfire=Narty
elseif target.weapontype==ARTY.WeaponType.TacticalNukes then elseif target.weapontype==ARTY.WeaponType.TacticalNukes then
nfire=self.Nukes nfire=self.Nukes
elseif target.weapontype==ARTY.WeaponType.IlluminationShells then elseif target.weapontype==ARTY.WeaponType.IlluminationShells then

View File

@@ -8,7 +8,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- ### [Autolase](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/) -- None yet.
-- --
-- === -- ===
-- --
@@ -74,7 +74,7 @@
-- @image Designation.JPG -- @image Designation.JPG
-- --
-- Date: 24 Oct 2021 -- Date: 24 Oct 2021
-- Last Update: Oct 2023 -- Last Update: May 2024
-- --
--- Class AUTOLASE --- Class AUTOLASE
-- @type AUTOLASE -- @type AUTOLASE
@@ -87,6 +87,8 @@
-- @field Core.Set#SET_GROUP RecceSet -- @field Core.Set#SET_GROUP RecceSet
-- @field #table LaserCodes -- @field #table LaserCodes
-- @field #table playermenus -- @field #table playermenus
-- @field #boolean smokemenu
-- @field #boolean threatmenu
-- @extends Ops.Intel#INTEL -- @extends Ops.Intel#INTEL
--- ---
@@ -97,6 +99,7 @@ AUTOLASE = {
verbose = 0, verbose = 0,
alias = "", alias = "",
debug = false, debug = false,
smokemenu = true,
} }
--- Laser spot info --- Laser spot info
@@ -115,7 +118,7 @@ AUTOLASE = {
--- AUTOLASE class version. --- AUTOLASE class version.
-- @field #string version -- @field #string version
AUTOLASE.version = "0.1.22" AUTOLASE.version = "0.1.25"
------------------------------------------------------------------- -------------------------------------------------------------------
-- Begin Functional.Autolase.lua -- Begin Functional.Autolase.lua
@@ -202,6 +205,8 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
self.blacklistattributes = {} self.blacklistattributes = {}
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
self.playermenus = {} self.playermenus = {}
self.smokemenu = true
self.threatmenu = true
-- Set some string id for output to DCS.log file. -- Set some string id for output to DCS.log file.
self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown") self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
@@ -320,37 +325,51 @@ end
function AUTOLASE:SetPilotMenu() function AUTOLASE:SetPilotMenu()
if self.usepilotset then if self.usepilotset then
local pilottable = self.pilotset:GetSetObjects() or {} local pilottable = self.pilotset:GetSetObjects() or {}
local grouptable = {}
for _,_unit in pairs (pilottable) do for _,_unit in pairs (pilottable) do
local Unit = _unit -- Wrapper.Unit#UNIT local Unit = _unit -- Wrapper.Unit#UNIT
if Unit and Unit:IsAlive() then if Unit and Unit:IsAlive() then
local Group = Unit:GetGroup() local Group = Unit:GetGroup()
local GroupName = Group:GetName() or "none"
local unitname = Unit:GetName() local unitname = Unit:GetName()
if self.playermenus[unitname] then self.playermenus[unitname]:Remove() end if not grouptable[GroupName] == true then
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil) if self.playermenus[unitname] then self.playermenus[unitname]:Remove() end -- menus
self.playermenus[unitname] = lasetopm local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit) self.playermenus[unitname] = lasetopm
local smoke = (self.smoketargets == true) and "off" or "on" local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
local smoketext = string.format("Switch smoke targets to %s",smoke) if self.smokemenu then
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets)) local smoke = (self.smoketargets == true) and "off" or "on"
for _,_grp in pairs(self.RecceSet.Set) do local smoketext = string.format("Switch smoke targets to %s",smoke)
local grp = _grp -- Wrapper.Group#GROUP local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
local unit = grp:GetUnit(1) end -- smokement
--local name = grp:GetName() if self.threatmenu then
if unit and unit:IsAlive() then local threatmenutop = MENU_GROUP:New(Group,"Set min lasing threat",lasetopm)
local name = unit:GetName() for i=0,10,2 do
local mname = string.gsub(name,".%d+.%d+$","") local text = "Threatlevel "..tostring(i)
local code = self:GetLaserCode(name) local threatmenu = MENU_GROUP_COMMAND:New(Group,text,threatmenutop,self.SetMinThreatLevel,self,i)
local unittop = MENU_GROUP:New(Group,"Change laser code for "..mname,lasetopm) end -- threatlevel
for _,_code in pairs(self.LaserCodes) do end -- threatmenu
local text = tostring(_code) for _,_grp in pairs(self.RecceSet.Set) do
if _code == code then text = text.."(*)" end local grp = _grp -- Wrapper.Group#GROUP
local changemenu = MENU_GROUP_COMMAND:New(Group,text,unittop,self.SetRecceLaserCode,self,name,_code,true) local unit = grp:GetUnit(1)
end --local name = grp:GetName()
end if unit and unit:IsAlive() then
end local name = unit:GetName()
local mname = string.gsub(name,".%d+.%d+$","")
local code = self:GetLaserCode(name)
local unittop = MENU_GROUP:New(Group,"Change laser code for "..mname,lasetopm)
for _,_code in pairs(self.LaserCodes) do
local text = tostring(_code)
if _code == code then text = text.."(*)" end
local changemenu = MENU_GROUP_COMMAND:New(Group,text,unittop,self.SetRecceLaserCode,self,name,_code,true)
end -- Codes
end -- unit alive
end -- Recceset
grouptable[GroupName] = true
end -- grouptable[GroupName]
--lasemenu:Refresh() --lasemenu:Refresh()
end end -- unit alive
end end -- pilot loop
else else
if not self.NoMenus then if not self.NoMenus then
self.Menu = MENU_COALITION_COMMAND:New(self.coalition,"Autolase",nil,self.ShowStatus,self) self.Menu = MENU_COALITION_COMMAND:New(self.coalition,"Autolase",nil,self.ShowStatus,self)
@@ -443,7 +462,7 @@ end
-- @param #string Gender (Optional) Defaults to "male" -- @param #string Gender (Optional) Defaults to "male"
-- @param #string Culture (Optional) Defaults to "en-US" -- @param #string Culture (Optional) Defaults to "en-US"
-- @param #number Port (Optional) Defaults to 5002 -- @param #number Port (Optional) Defaults to 5002
-- @param #string Voice (Optional) Use a specifc voice with the @{Sound.SRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`. -- @param #string Voice (Optional) Use a specifc voice with the @{Sound.SRS#SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS. -- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest) -- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS -- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS
@@ -451,18 +470,18 @@ end
function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey) function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
if OnOff then if OnOff then
self.useSRS = true self.useSRS = true
self.SRSPath = Path or "C:\\Program Files\\DCS-SimpleRadio-Standalone" self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
self.SRSFreq = Frequency or 271 self.SRSFreq = Frequency or 271
self.SRSMod = Modulation or radio.modulation.AM self.SRSMod = Modulation or radio.modulation.AM
self.Gender = Gender or "male" self.Gender = Gender or MSRS.gender or "male"
self.Culture = Culture or "en-US" self.Culture = Culture or MSRS.culture or "en-US"
self.Port = Port or 5002 self.Port = Port or MSRS.port or 5002
self.Voice = Voice self.Voice = Voice
self.PathToGoogleKey = PathToGoogleKey self.PathToGoogleKey = PathToGoogleKey
self.Volume = Volume or 1.0 self.Volume = Volume or 1.0
self.Label = Label self.Label = Label
-- set up SRS -- set up SRS
self.SRS = MSRS:New(self.SRSPath,self.SRSFreq,self.SRSMod,self.Volume) self.SRS = MSRS:New(self.SRSPath,self.SRSFreq,self.SRSMod)
self.SRS:SetCoalition(self.coalition) self.SRS:SetCoalition(self.coalition)
self.SRS:SetLabel(self.MenuName or self.Name) self.SRS:SetLabel(self.MenuName or self.Name)
self.SRS:SetGender(self.Gender) self.SRS:SetGender(self.Gender)
@@ -470,8 +489,10 @@ function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Cultu
self.SRS:SetPort(self.Port) self.SRS:SetPort(self.Port)
self.SRS:SetVoice(self.Voice) self.SRS:SetVoice(self.Voice)
self.SRS:SetCoalition(self.coalition) self.SRS:SetCoalition(self.coalition)
self.SRS:SetVolume(self.Volume)
if self.PathToGoogleKey then if self.PathToGoogleKey then
self.SRS:SetGoogle(self.PathToGoogleKey) self.SRS:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
end end
self.SRSQueue = MSRSQUEUE:New(self.alias) self.SRSQueue = MSRSQUEUE:New(self.alias)
else else
@@ -579,6 +600,38 @@ function AUTOLASE:SetSmokeTargets(OnOff,Color)
return self return self
end end
--- (User) Show the "Switch smoke target..." menu entry for pilots. On by default.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:EnableSmokeMenu()
self.smokemenu = true
return self
end
--- (User) Do not show the "Switch smoke target..." menu entry for pilots.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:DisableSmokeMenu()
self.smokemenu = false
return self
end
--- (User) Show the "Switch min threat lasing..." menu entry for pilots. On by default.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:EnableThreatLevelMenu()
self.threatmenu = true
return self
end
--- (User) Do not show the "Switch min threat lasing..." menu entry for pilots.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:DisableThreatLevelMenu()
self.threatmenu = false
return self
end
--- (Internal) Function to calculate line of sight. --- (Internal) Function to calculate line of sight.
-- @param #AUTOLASE self -- @param #AUTOLASE self
-- @param Wrapper.Unit#UNIT Unit -- @param Wrapper.Unit#UNIT Unit
@@ -706,6 +759,7 @@ function AUTOLASE:ShowStatus(Group,Unit)
report:Add(string.format("Recce %s has code %d",name,code)) report:Add(string.format("Recce %s has code %d",name,code))
end end
end end
report:Add(string.format("Lasing min threat level %d",self.minthreatlevel))
local lines = 0 local lines = 0
for _ind,_entry in pairs(self.CurrentLasing) do for _ind,_entry in pairs(self.CurrentLasing) do
local entry = _entry -- #AUTOLASE.LaserSpot local entry = _entry -- #AUTOLASE.LaserSpot
@@ -890,12 +944,12 @@ function AUTOLASE:onafterMonitor(From, Event, To)
self:SetPilotMenu() self:SetPilotMenu()
local detecteditems = self.Contacts or {} -- #table of Ops.Intelligence#INTEL.Contact local detecteditems = self.Contacts or {} -- #table of Ops.Intel#INTEL.Contact
local groupsbythreat = {} local groupsbythreat = {}
local report = REPORT:New("Detections") local report = REPORT:New("Detections")
local lines = 0 local lines = 0
for _,_contact in pairs(detecteditems) do for _,_contact in pairs(detecteditems) do
local contact = _contact -- Ops.Intelligence#INTEL.Contact local contact = _contact -- Ops.Intel#INTEL.Contact
local grp = contact.group local grp = contact.group
local coord = contact.position local coord = contact.position
local reccename = contact.recce or "none" local reccename = contact.recce or "none"

View File

@@ -14,7 +14,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [CLA - CleanUp Airbase](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase) -- [CLA - CleanUp Airbase](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/CleanUp)
-- --
-- === -- ===
-- --
@@ -52,11 +52,13 @@
-- @module Functional.CleanUp -- @module Functional.CleanUp
-- @image CleanUp_Airbases.JPG -- @image CleanUp_Airbases.JPG
--- @type CLEANUP_AIRBASE.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-) ---
-- @type CLEANUP_AIRBASE.__ Methods which are not intended for mission designers, but which are used interally by the moose designer :-)
-- @field #map<#string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases. -- @field #map<#string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- @type CLEANUP_AIRBASE ---
-- @type CLEANUP_AIRBASE
-- @extends #CLEANUP_AIRBASE.__ -- @extends #CLEANUP_AIRBASE.__
--- Keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat. --- Keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.
@@ -93,7 +95,7 @@ CLEANUP_AIRBASE = {
-- @field #CLEANUP_AIRBASE.__ -- @field #CLEANUP_AIRBASE.__
CLEANUP_AIRBASE.__ = {} CLEANUP_AIRBASE.__ = {}
--- @field #CLEANUP_AIRBASE.__.Airbases -- @field #CLEANUP_AIRBASE.__.Airbases
CLEANUP_AIRBASE.__.Airbases = {} CLEANUP_AIRBASE.__.Airbases = {}
--- Creates the main object which is handling the cleaning of the debris within the given Zone Names. --- Creates the main object which is handling the cleaning of the debris within the given Zone Names.
@@ -240,7 +242,8 @@ function CLEANUP_AIRBASE.__:DestroyMissile( MissileObject )
end end
end end
--- @param #CLEANUP_AIRBASE self ---
-- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function CLEANUP_AIRBASE.__:OnEventBirth( EventData ) function CLEANUP_AIRBASE.__:OnEventBirth( EventData )
self:F( { EventData } ) self:F( { EventData } )

View File

@@ -0,0 +1,687 @@
--- **Functional** - Manage and track client slots easily to add your own client-based menus and modules to.
--
-- The @{#CLIENTWATCH} class adds a simplified way to create scripts and menus for individual clients. Instead of creating large algorithms and juggling multiple event handlers, you can simply provide one or more prefixes to the class and use the callback functions on spawn, despawn, and any aircraft related events to script to your hearts content.
--
-- ===
--
-- ## Features:
--
-- * Find clients by prefixes or by providing a Wrapper.CLIENT object
-- * Trigger functions when the client spawns and despawns
-- * Create multiple client instances without overwriting event handlers between instances
-- * More reliable aircraft lost events for when DCS thinks the aircraft id dead but a dead event fails to trigger
-- * Easily manage clients spawned in dynamic slots
--
-- ====
--
-- ### Author: **Statua**
--
-- ### Contributions: **FlightControl**: Wrapper.CLIENT
--
-- ====
-- @module Functional.ClientWatch
-- @image clientwatch.jpg
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- CLIENTWATCH class
-- @type CLIENTWATCH
-- @field #string ClassName Name of the class.
-- @field #boolean Debug Write Debug messages to DCS log file and send Debug messages to all players.
-- @field #string lid String for DCS log file.
-- @field #number FilterCoalition If not nil, will only activate for aircraft of the given coalition value.
-- @field #number FilterCategory If not nil, will only activate for aircraft of the given category value.
-- @extends Core.Fsm#FSM_CONTROLLABLE
--- Manage and track client slots easily to add your own client-based menus and modules to.
--
-- ## Creating a new instance
--
-- To start, you must first create a new instance of the client manager and provide it with either a Wrapper.Client#CLIENT object, a string prefix of the unit name, or a table of string prefixes for unit names. These are used to capture the client unit when it spawns and apply your scripted functions to it. Only fixed wing and rotary wing aircraft controlled by players can be used by this class.
-- **This will not work if the client aircraft is alive!**
--
-- ### Examples
--
-- -- Create an instance with a Wrapper.Client#CLIENT object
-- local heliClient = CLIENT:FindByName('Rotary1-1')
-- local clientInstance = CLIENTWATCH:New(heliClient)
--
-- -- Create an instance with part of the unit name in the Mission Editor
-- local clientInstance = CLIENTWATCH:New("Rotary")
--
-- -- Create an instance using prefixes for a few units as well as a FARP name for any dynamic spawns coming out of it
-- local clientInstance = CLIENTWATCH:New({"Rescue","UH-1H","FARP ALPHA"})
--
-- ## Applying functions and methods to client aircraft when they spawn
--
-- Once the instance is created, it will watch for birth events. If the unit name of the client aircraft matches the one provided in the instance, the callback method @{#CLIENTWATCH:OnAfterSpawn}() can be used to apply functions and methods to the client object.
--
-- In the OnAfterSpawn() callback method are four values. From, Event, To, and ClientObject. From,Event,To are standard FSM strings for the state changes. ClientObject is where the magic happens. This is a special object which you can use to access all the data of the client aircraft. The following entries in ClientObject are available for you to use:
--
-- * **ClientObject.Unit**: The Moose @{Wrapper.Unit#UNIT} of the client aircraft
-- * **ClientObject.Group**: The Moose @{Wrapper.Group#GRUP} of the client aircraft
-- * **ClientObject.Client**: The Moose @{Wrapper.Client#CLIENT} of the client aircraft
-- * **ClientObject.PlayerName**: A #string of the player controlling the aircraft
-- * **ClientObject.UnitName**: A #string of the client aircraft unit.
-- * **ClientObject.GroupName**: A #string of the client aircraft group.
--
-- ### Examples
--
-- -- Create an instance with a client unit prefix and send them a message when they spawn
-- local clientInstance = CLIENTWATCH:New("Rotary")
-- function clientInstance:OnAfterSpawn(From,Event,To,ClientObject,EventData)
-- MESSAGE:New("Welcome to your aircraft!",10):ToUnit(ClientObject.Unit)
-- end
--
-- ## Using event callbacks
--
-- In a normal setting, you can only use a callback function for a specific option in one location. If you have multiple scripts that rely on the same callback from the same object, this can get quite messy. With the ClientWatch module, these callbacks are isolated t the instances and therefore open the possibility to use many instances with the same callback doing different things. ClientWatch instances subscribe to all events that are applicable to player controlled aircraft and provides callbacks for each, forwarding the EventData in the callback function.
--
-- The following event callbacks can be used inside the OnAfterSpawn() callback:
--
-- * **:OnAfterDespawn(From,Event,To)**: Triggers whenever DCS no longer sees the aircraft as 'alive'. No event data is given in this callback as it is derived from other events
-- * **:OnAfterHit(From,Event,To,EventData)**: Triggers every time the aircraft takes damage or is struck by a weapon/explosion
-- * **:OnAfterKill(From,Event,To,EventData)**: Triggers after the aircraft kills something with its weapons
-- * **:OnAfterScore(From,Event,To,EventData)**: Triggers after accumulating score
-- * **:OnAfterShot(From,Event,To,EventData)**: Triggers after a single-shot weapon is released
-- * **:OnAfterShootingStart(From,Event,To,EventData)**: Triggers when an automatic weapon begins firing
-- * **:OnAfterShootingEnd(From,Event,To,EventData)**: Triggers when an automatic weapon stops firing
-- * **:OnAfterLand(From,Event,To,EventData)**: Triggers when an aircraft transitions from being airborne to on the ground
-- * **:OnAfterTakeoff(From,Event,To,EventData)**: Triggers when an aircraft transitions from being on the ground to airborne
-- * **:OnAfterRunwayTakeoff(From,Event,To,EventData)**: Triggers after lifting off from a runway
-- * **:OnAfterRunwayTouch(From,Event,To,EventData)**: Triggers when an aircraft's gear makes contact with a runway
-- * **:OnAfterRefueling(From,Event,To,EventData)**: Triggers when an aircraft begins taking on fuel
-- * **:OnAfterRefuelingStop(From,Event,To,EventData)**: Triggers when an aircraft stops taking on fuel
-- * **:OnAfterPlayerLeaveUnit(From,Event,To,EventData)**: Triggers when a player leaves an operational aircraft
-- * **:OnAfterCrash(From,Event,To,EventData)**: Triggers when an aircraft is destroyed (may fail to trigger if the aircraft is only partially destroyed)
-- * **:OnAfterDead(From,Event,To,EventData)**: Triggers when an aircraft is considered dead (may fail to trigger if the aircraft was partially destroyed first)
-- * **:OnAfterPilotDead(From,Event,To,EventData)**: Triggers when the pilot is killed (may fail to trigger if the aircraft was partially destroyed first)
-- * **:OnAfterUnitLost(From,Event,To,EventData)**: Triggers when an aircraft is lost for any reason (may fail to trigger if the aircraft was partially destroyed first)
-- * **:OnAfterEjection(From,Event,To,EventData)**: Triggers when a pilot ejects from an aircraft
-- * **:OnAfterHumanFailure(From,Event,To,EventData)**: Triggers when an aircraft or system is damaged from any source or action by the player
-- * **:OnAfterHumanAircraftRepairStart(From,Event,To,EventData)**: Triggers when an aircraft repair is started
-- * **:OnAfterHumanAircraftRepairFinish(From,Event,To,EventData)**: Triggers when an aircraft repair is completed
-- * **:OnAfterEngineStartup(From,Event,To,EventData)**: Triggers when the engine enters what DCS considers to be a started state. Parameters vary by aircraft
-- * **:OnAfterEngineShutdown(From,Event,To,EventData)**: Triggers when the engine enters what DCS considers to be a stopped state. Parameters vary by aircraft
-- * **:OnAfterWeaponAdd(From,Event,To,EventData)**: Triggers when an item is added to an aircraft's payload
-- * **:OnAfterWeaponDrop(From,Event,To,EventData)**: Triggers when an item is jettisoned or dropped from an aircraft (unconfirmed)
-- * **:OnAfterWeaponRearm(From,Event,To,EventData)**: Triggers when an item with internal supply is restored (unconfirmed)
--
-- ### Examples
--
-- -- Show a message to player when they take damage from a weapon
-- local clientInstance = CLIENTWATCH:New("Rotary")
-- function clientInstance:OnAfterSpawn(From,Event,To,ClientObject,EventData)
-- function ClientObject:OnAfterHit(From,Event,To,EventData)
-- local typeShooter = EventData.IniTypeName
-- local nameWeapon = EventData.weapon_name
-- MESSAGE:New("A "..typeShooter.." hit you with a "..nameWeapon,20):ToUnit(ClientObject.Unit)
-- end
-- end
--
-- @field #CLIENTWATCH
CLIENTWATCH = {}
CLIENTWATCH.ClassName = "CLIENTWATCH"
CLIENTWATCH.Debug = false
CLIENTWATCH.DebugEventData = false
CLIENTWATCH.lid = nil
-- @type CLIENTWATCHTools
-- @field #table Unit Wrapper.UNIT of the cient object
-- @field #table Group Wrapper.GROUP of the cient object
-- @field #table Client Wrapper.CLIENT of the cient object
-- @field #string PlayerName Name of the player controlling the client object
-- @field #string UnitName Name of the unit that is the client object
-- @field #string GroupName Name of the group the client object belongs to
CLIENTWATCHTools = {}
--- CLIENTWATCH version
-- @field #string version
CLIENTWATCH.version="1.0.1"
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Creates a new instance of CLIENTWATCH to add scripts to. Can be used multiple times with the same client/prefixes if you need it for multiple scripts.
-- @param #CLIENTWATCH self
-- @param #string Will watch for clients whos UNIT NAME or GROUP NAME matches part of the #string as a prefix.
-- @param #table Put strings in a table to use multiple prefixes for the above method.
-- @param Wrapper.Client#CLIENT Provide a Moose CLIENT object to apply to that specific aircraft slot (static slots only!)
-- @param #nil Leave blank to activate for ALL CLIENTS
-- @return #CLIENTWATCH self
function CLIENTWATCH:New(client)
--Init FSM
local self=BASE:Inherit(self, FSM:New())
self:SetStartState( "Idle" )
self:AddTransition( "*", "Spawn", "*" )
self.FilterCoalition = nil
self.FilterCategory = nil
--- User function for OnAfter "Spawn" event.
-- @function [parent=#CLIENTWATCH] OnAfterSpawn
-- @param #CLIENTWATCH self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable Controllable of the group.
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #table clientObject Custom object that handles events and stores Moose object data. See top documentation for more details.
-- @param #table eventdata Data from EVENTS.Birth.
--Set up spawn tracking
if not client then
if self.Debug then self:I({"New client instance created. ClientType = All clients"}) end
self:HandleEvent(EVENTS.Birth)
function self:OnEventBirth(eventdata)
if (eventdata.IniCategory == 0 or eventdata.IniCategory == 1) and eventdata.IniPlayerName
and (not self.FilterCoalition or self.FilterCoalition == eventdata.IniCoalition)
and (not self.FilterCategory or self.FilterCategory == eventdata.IniCategory) then
if self.Debug then
self:I({"Client spawned in.",IniCategory = eventdata.IniCategory})
end
local clientWatchDebug = self.Debug
local clientObject = CLIENTWATCHTools:_newClient(clientWatchDebug,eventdata)
self:Spawn(clientObject,eventdata)
end
end
elseif type(client) == "table" or type(client) == "string" then
if type(client) == "table" then
--CLIENT TABLE
if client.ClassName == "CLIENT" then
if self.Debug then self:I({"New client instance created. ClientType = Wrapper.CLIENT",client}) end
self.ClientName = client:GetName()
self:HandleEvent(EVENTS.Birth)
function self:OnEventBirth(eventdata)
if (eventdata.IniCategory == 0 or eventdata.IniCategory == 1) and eventdata.IniPlayerName
and (not self.FilterCoalition or self.FilterCoalition == eventdata.IniCoalition)
and (not self.FilterCategory or self.FilterCategory == eventdata.IniCategory) then
if self.ClientName == eventdata.IniUnitName then
if self.Debug then
self:I({"Client spawned in.",IniCategory = eventdata.IniCategory})
end
local clientWatchDebug = self.Debug
local clientObject = CLIENTWATCHTools:_newClient(clientWatchDebug,eventdata)
self:Spawn(clientObject,eventdata)
end
end
end
--STRING TABLE
else
if self.Debug then self:I({"New client instance created. ClientType = Multiple Prefixes",client}) end
local tableValid = true
for _,entry in pairs(client) do
if type(entry) ~= "string" then
tableValid = false
self:E({"The base handler failed to start because at least one entry in param1's table is not a string!",InvalidEntry = entry})
return nil
end
end
if tableValid then
self:HandleEvent(EVENTS.Birth)
function self:OnEventBirth(eventdata)
for _,entry in pairs(client) do
if (eventdata.IniCategory == 0 or eventdata.IniCategory == 1) and eventdata.IniPlayerName
and (not self.FilterCoalition or self.FilterCoalition == eventdata.IniCoalition)
and (not self.FilterCategory or self.FilterCategory == eventdata.IniCategory) then
if string.match(eventdata.IniUnitName,entry) or string.match(eventdata.IniGroupName,entry) then
if self.Debug then
self:I({"Client spawned in.",IniCategory = eventdata.IniCategory})
end
local clientWatchDebug = self.Debug
local clientObject = CLIENTWATCHTools:_newClient(clientWatchDebug,eventdata)
self:Spawn(clientObject,eventdata)
break
end
end
end
end
end
end
else
if self.Debug then self:I({"New client instance created. ClientType = Single Prefix",client}) end
--SOLO STRING
self:HandleEvent(EVENTS.Birth)
function self:OnEventBirth(eventdata)
if (eventdata.IniCategory == 0 or eventdata.IniCategory == 1) and eventdata.IniPlayerName
and (not self.FilterCoalition or self.FilterCoalition == eventdata.IniCoalition)
and (not self.FilterCategory or self.FilterCategory == eventdata.IniCategory) then
if string.match(eventdata.IniUnitName,client) or string.match(eventdata.IniGroupName,client) then
if self.Debug then
self:I({"Client spawned in.",IniCategory = eventdata.IniCategory})
end
local clientWatchDebug = self.Debug
local clientObject = CLIENTWATCHTools:_newClient(clientWatchDebug,eventdata)
self:Spawn(clientObject,eventdata)
end
end
end
end
else
self:E({"The base handler failed to start because param1 is not a CLIENT object or a prefix string!",param1 = client})
return nil
end
return self
end
--- Filter out all clients not belonging to the provided coalition
-- @param #CLIENTWATCH self
-- @param #number Coalition number (1 = red, 2 = blue)
-- @param #string Coalition string ('red' or 'blue')
function CLIENTWATCH:FilterByCoalition(value)
if value == 1 or value == "red" then
self.FilterCoalition = 1
else
self.FilterCoalition = 2
end
return self
end
--- Filter out all clients that are not of the given category
-- @param #CLIENTWATCH self
-- @param #number Category number (0 = airplane, 1 = helicopter)
-- @param #string Category string ('airplane' or 'helicopter')
function CLIENTWATCH:FilterByCategory(value)
if value == 1 or value == "helicopter" then
self.FilterCategory = 1
else
self.FilterCategory = 0
end
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Internal function for creating a new client on birth. Do not use!!!.
-- @param #CLIENTWATCHTools self
-- @param #EVENTS.Birth EventData
-- @return #CLIENTWATCHTools self
function CLIENTWATCHTools:_newClient(clientWatchDebug,eventdata)
--Init FSM
local self=BASE:Inherit(self, FSM:New())
self:SetStartState( "Alive" )
self:AddTransition( "Alive", "Despawn", "Dead" )
self.Unit = eventdata.IniUnit
self.Group = self.Unit:GetGroup()
self.Client = self.Unit:GetClient()
self.PlayerName = self.Unit:GetPlayerName()
self.UnitName = self.Unit:GetName()
self.GroupName = self.Group:GetName()
--Event events
self:AddTransition( "*", "Hit", "*" )
self:AddTransition( "*", "Kill", "*" )
self:AddTransition( "*", "Score", "*" )
self:AddTransition( "*", "Shot", "*" )
self:AddTransition( "*", "ShootingStart", "*" )
self:AddTransition( "*", "ShootingEnd", "*" )
self:AddTransition( "*", "Land", "*" )
self:AddTransition( "*", "Takeoff", "*" )
self:AddTransition( "*", "RunwayTakeoff", "*" )
self:AddTransition( "*", "RunwayTouch", "*" )
self:AddTransition( "*", "Refueling", "*" )
self:AddTransition( "*", "RefuelingStop", "*" )
self:AddTransition( "*", "PlayerLeaveUnit", "*" )
self:AddTransition( "*", "Crash", "*" )
self:AddTransition( "*", "Dead", "*" )
self:AddTransition( "*", "PilotDead", "*" )
self:AddTransition( "*", "UnitLost", "*" )
self:AddTransition( "*", "Ejection", "*" )
self:AddTransition( "*", "HumanFailure", "*" )
self:AddTransition( "*", "HumanAircraftRepairFinish", "*" )
self:AddTransition( "*", "HumanAircraftRepairStart", "*" )
self:AddTransition( "*", "EngineShutdown", "*" )
self:AddTransition( "*", "EngineStartup", "*" )
self:AddTransition( "*", "WeaponAdd", "*" )
self:AddTransition( "*", "WeaponDrop", "*" )
self:AddTransition( "*", "WeaponRearm", "*" )
--Event Handlers
self:HandleEvent( EVENTS.Hit )
self:HandleEvent( EVENTS.Kill )
self:HandleEvent( EVENTS.Score )
self:HandleEvent( EVENTS.Shot )
self:HandleEvent( EVENTS.ShootingStart )
self:HandleEvent( EVENTS.ShootingEnd )
self:HandleEvent( EVENTS.Land )
self:HandleEvent( EVENTS.Takeoff )
self:HandleEvent( EVENTS.RunwayTakeoff )
self:HandleEvent( EVENTS.RunwayTouch )
self:HandleEvent( EVENTS.Refueling )
self:HandleEvent( EVENTS.RefuelingStop )
self:HandleEvent( EVENTS.PlayerLeaveUnit )
self:HandleEvent( EVENTS.Crash )
self:HandleEvent( EVENTS.Dead )
self:HandleEvent( EVENTS.PilotDead )
self:HandleEvent( EVENTS.UnitLost )
self:HandleEvent( EVENTS.Ejection )
self:HandleEvent( EVENTS.HumanFailure )
self:HandleEvent( EVENTS.HumanAircraftRepairFinish )
self:HandleEvent( EVENTS.HumanAircraftRepairStart )
self:HandleEvent( EVENTS.EngineShutdown )
self:HandleEvent( EVENTS.EngineStartup )
self:HandleEvent( EVENTS.WeaponAdd )
self:HandleEvent( EVENTS.WeaponDrop )
self:HandleEvent( EVENTS.WeaponRearm )
function self:OnEventHit(EventData)
if EventData.TgtUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered hit event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Hit(EventData)
end
end
function self:OnEventKill(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered kill event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Kill(EventData)
end
end
function self:OnEventScore(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered score event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Score(EventData)
end
end
function self:OnEventShot(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered shot event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Shot(EventData)
end
end
function self:OnEventShootingStart(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered shooting start event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:ShootingStart(EventData)
end
end
function self:OnEventShootingEnd(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered shooting end event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:ShootingEnd(EventData)
end
end
function self:OnEventLand(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered land event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Land(EventData)
end
end
function self:OnEventTakeoff(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered takeoff event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Takeoff(EventData)
end
end
function self:OnEventRunwayTakeoff(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered runway takeoff event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:RunwayTakeoff(EventData)
end
end
function self:OnEventRunwayTouch(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered runway touch event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:RunwayTouch(EventData)
end
end
function self:OnEventRefueling(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered refueling event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Refueling(EventData)
end
end
function self:OnEventRefuelingStop(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered refueling event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:RefuelingStop(EventData)
end
end
function self:OnEventPlayerLeaveUnit(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered leave unit event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:PlayerLeaveUnit(EventData)
self._deadRoutine()
end
end
function self:OnEventCrash(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered crash event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Crash(EventData)
self._deadRoutine()
end
end
function self:OnEventDead(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered dead event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Dead(EventData)
self._deadRoutine()
end
end
function self:OnEventPilotDead(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered pilot dead event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:PilotDead(EventData)
self._deadRoutine()
end
end
function self:OnEventUnitLost(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered unit lost event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:UnitLost(EventData)
self._deadRoutine()
end
end
function self:OnEventEjection(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered ejection event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:Ejection(EventData)
self._deadRoutine()
end
end
function self:OnEventHumanFailure(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered human failure event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:HumanFailure(EventData)
if not self.Unit:IsAlive() then
self._deadRoutine()
end
end
end
function self:OnEventHumanAircraftRepairFinish(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered repair finished event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:HumanAircraftRepairFinish(EventData)
end
end
function self:OnEventHumanAircraftRepairStart(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered repair start event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:HumanAircraftRepairStart(EventData)
end
end
function self:OnEventEngineShutdown(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered engine shutdown event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:EngineShutdown(EventData)
end
end
function self:OnEventEngineStartup(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered engine startup event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:EngineStartup(EventData)
end
end
function self:OnEventWeaponAdd(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered weapon add event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:WeaponAdd(EventData)
end
end
function self:OnEventWeaponDrop(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered weapon drop event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:WeaponDrop(EventData)
end
end
function self:OnEventWeaponRearm(EventData)
if EventData.IniUnitName == self.UnitName then
if clientWatchDebug then
self:I({"Client triggered weapon rearm event.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self:WeaponRearm(EventData)
end
end
--Fallback timer
self.FallbackTimer = TIMER:New(function()
if not self.Unit:IsAlive() then
if clientWatchDebug then
self:I({"Client is registered as dead without an event trigger. Running fallback dead routine.",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName})
end
self._deadRoutine()
end
end)
self.FallbackTimer:Start(5,5)
--Stop event handlers and trigger Despawn
function self._deadRoutine()
if clientWatchDebug then self:I({"Client dead routine triggered. Shutting down tracking...",Player = self.PlayerName,Group = self.GroupName,Unit = self.UnitName}) end
self:UnHandleEvent( EVENTS.Hit )
self:UnHandleEvent( EVENTS.Kill )
self:UnHandleEvent( EVENTS.Score )
self:UnHandleEvent( EVENTS.Shot )
self:UnHandleEvent( EVENTS.ShootingStart )
self:UnHandleEvent( EVENTS.ShootingEnd )
self:UnHandleEvent( EVENTS.Land )
self:UnHandleEvent( EVENTS.Takeoff )
self:UnHandleEvent( EVENTS.RunwayTakeoff )
self:UnHandleEvent( EVENTS.RunwayTouch )
self:UnHandleEvent( EVENTS.Refueling )
self:UnHandleEvent( EVENTS.RefuelingStop )
self:UnHandleEvent( EVENTS.PlayerLeaveUnit )
self:UnHandleEvent( EVENTS.Crash )
self:UnHandleEvent( EVENTS.Dead )
self:UnHandleEvent( EVENTS.PilotDead )
self:UnHandleEvent( EVENTS.UnitLost )
self:UnHandleEvent( EVENTS.Ejection )
self:UnHandleEvent( EVENTS.HumanFailure )
self:UnHandleEvent( EVENTS.HumanAircraftRepairFinish )
self:UnHandleEvent( EVENTS.HumanAircraftRepairStart )
self:UnHandleEvent( EVENTS.EngineShutdown )
self:UnHandleEvent( EVENTS.EngineStartup )
self:UnHandleEvent( EVENTS.WeaponAdd )
self:UnHandleEvent( EVENTS.WeaponDrop )
self:UnHandleEvent( EVENTS.WeaponRearm )
self.FallbackTimer:Stop()
self:Despawn()
end
self:I({"Detected client spawn and applied internal functions and events.", PlayerName = self.PlayerName, UnitName = self.UnitName, GroupName = self.GroupName})
return self
end

View File

@@ -15,9 +15,11 @@
-- --
-- === -- ===
-- --
-- ## Missions: -- ## Additional Material:
-- --
-- [DES - Designation](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation) -- * **Demo Missions:** [GitHub](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Designate)
-- * **YouTube videos:** None
-- * **Guides:** None
-- --
-- === -- ===
-- --
@@ -182,7 +184,7 @@
do -- DESIGNATE do -- DESIGNATE
--- @type DESIGNATE -- @type DESIGNATE
-- @extends Core.Fsm#FSM_PROCESS -- @extends Core.Fsm#FSM_PROCESS
--- Manage the designation of detected targets. --- Manage the designation of detected targets.
@@ -523,7 +525,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive( self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup -- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup ) function( AttackGroup )
self.FlashStatusMenu[AttackGroup] = FlashMenu self.FlashStatusMenu[AttackGroup] = FlashMenu
end end
@@ -552,7 +554,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive( self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup -- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup ) function( AttackGroup )
self.FlashDetectionMessage[AttackGroup] = FlashDetectionMessage self.FlashDetectionMessage[AttackGroup] = FlashDetectionMessage
end end
@@ -824,7 +826,7 @@ do -- DESIGNATE
-- This Detection is obsolete, remove from the designate scope -- This Detection is obsolete, remove from the designate scope
self.Designating[DesignateIndex] = nil self.Designating[DesignateIndex] = nil
self.AttackSet:ForEachGroupAlive( self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup -- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup ) function( AttackGroup )
if AttackGroup:IsAlive() == true then if AttackGroup:IsAlive() == true then
local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " ) local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " )
@@ -901,7 +903,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive( self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP GroupReport -- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup ) function( AttackGroup )
if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then
@@ -1058,7 +1060,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive( self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP GroupReport -- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup ) function( AttackGroup )
self:ScheduleOnce( Delay, self.SetMenu, self, AttackGroup ) self:ScheduleOnce( Delay, self.SetMenu, self, AttackGroup )
@@ -1196,7 +1198,7 @@ do -- DESIGNATE
--local ReportTypes = REPORT:New() --local ReportTypes = REPORT:New()
--local ReportLaserCodes = REPORT:New() --local ReportLaserCodes = REPORT:New()
TargetSetUnit:Flush( self ) --TargetSetUnit:Flush( self )
--self:F( { Recces = self.Recces } ) --self:F( { Recces = self.Recces } )
for TargetUnit, RecceData in pairs( self.Recces ) do for TargetUnit, RecceData in pairs( self.Recces ) do
@@ -1227,10 +1229,12 @@ do -- DESIGNATE
end end
end end
if TargetSetUnit == nil then return end
if self.AutoLase or ( not self.AutoLase and ( self.LaseStart + Duration >= timer.getTime() ) ) then if self.AutoLase or ( not self.AutoLase and ( self.LaseStart + Duration >= timer.getTime() ) ) then
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0, TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit -- @param Wrapper.Unit#UNIT SmokeUnit
function( TargetUnit ) function( TargetUnit )
self:F( { TargetUnit = TargetUnit:GetName() } ) self:F( { TargetUnit = TargetUnit:GetName() } )
@@ -1251,7 +1255,7 @@ do -- DESIGNATE
local RecceUnit = UnitData -- Wrapper.Unit#UNIT local RecceUnit = UnitData -- Wrapper.Unit#UNIT
local RecceUnitDesc = RecceUnit:GetDesc() local RecceUnitDesc = RecceUnit:GetDesc()
--self:F( { RecceUnit = RecceUnit:GetName(), RecceDescription = RecceUnitDesc } ) --self:F( { RecceUnit = RecceUnit:GetName(), RecceDescription = RecceUnitDesc } )x
if RecceUnit:IsLasing() == false then if RecceUnit:IsLasing() == false then
--self:F( { IsDetected = RecceUnit:IsDetected( TargetUnit ), IsLOS = RecceUnit:IsLOS( TargetUnit ) } ) --self:F( { IsDetected = RecceUnit:IsDetected( TargetUnit ), IsLOS = RecceUnit:IsLOS( TargetUnit ) } )
@@ -1273,9 +1277,10 @@ do -- DESIGNATE
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration ) local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
local AttackSet = self.AttackSet local AttackSet = self.AttackSet
local DesignateName = self.DesignateName local DesignateName = self.DesignateName
local typename = TargetUnit:GetTypeName()
function Spot:OnAfterDestroyed( From, Event, To ) function Spot:OnAfterDestroyed( From, Event, To )
self.Recce:MessageToSetGroup( "Target " .. TargetUnit:GetTypeName() .. " destroyed. " .. TargetSetUnit:Count() .. " targets left.", self.Recce:MessageToSetGroup( "Target " ..typename .. " destroyed. " .. TargetSetUnit:CountAlive() .. " targets left.",
5, AttackSet, self.DesignateName ) 5, AttackSet, self.DesignateName )
end end
@@ -1283,7 +1288,7 @@ do -- DESIGNATE
-- OK. We have assigned for the Recce a TargetUnit. We can exit the function. -- OK. We have assigned for the Recce a TargetUnit. We can exit the function.
MarkingCount = MarkingCount + 1 MarkingCount = MarkingCount + 1
local TargetUnitType = TargetUnit:GetTypeName() local TargetUnitType = TargetUnit:GetTypeName()
RecceUnit:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.", RecceUnit:MessageToSetGroup( "Marking " .. TargetUnitType .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.",
10, self.AttackSet, DesignateName ) 10, self.AttackSet, DesignateName )
if not MarkedTypes[TargetUnitType] then if not MarkedTypes[TargetUnitType] then
MarkedTypes[TargetUnitType] = true MarkedTypes[TargetUnitType] = true
@@ -1390,7 +1395,7 @@ do -- DESIGNATE
local MarkedCount = 0 local MarkedCount = 0
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0, TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit -- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit ) function( SmokeUnit )
if MarkedCount < self.MaximumMarkings then if MarkedCount < self.MaximumMarkings then
@@ -1455,9 +1460,10 @@ do -- DESIGNATE
-- @param #DESIGNATE self -- @param #DESIGNATE self
-- @return #DESIGNATE -- @return #DESIGNATE
function DESIGNATE:onafterDoneSmoking( From, Event, To, Index ) function DESIGNATE:onafterDoneSmoking( From, Event, To, Index )
if self.Designating[Index] ~= nil then
self.Designating[Index] = string.gsub( self.Designating[Index], "S", "" ) self.Designating[Index] = string.gsub( self.Designating[Index], "S", "" )
self:SetDesignateMenu() self:SetDesignateMenu()
end
end end
--- DoneIlluminating --- DoneIlluminating
@@ -1470,5 +1476,3 @@ do -- DESIGNATE
end end
end end

View File

@@ -15,7 +15,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [DET - Detection](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection) -- [DET - Detection](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Functional/Detection)
-- --
-- === -- ===
-- --
@@ -39,7 +39,8 @@
do -- DETECTION_BASE do -- DETECTION_BASE
--- @type DETECTION_BASE ---
-- @type DETECTION_BASE
-- @field Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role. -- @field Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role.
-- @field DCS#Distance DetectionRange The range till which targets are accepted to be detected. -- @field DCS#Distance DetectionRange The range till which targets are accepted to be detected.
-- @field #DETECTION_BASE.DetectedObjects DetectedObjects The list of detected objects. -- @field #DETECTION_BASE.DetectedObjects DetectedObjects The list of detected objects.
@@ -91,6 +92,11 @@ do -- DETECTION_BASE
-- --
-- DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } ) -- DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
-- --
--
-- ## Radar Blur - use to make the radar less exact, e.g. for WWII scenarios
--
-- * @{#DETECTION_BASE.SetRadarBlur}(): Set the radar blur to be used.
--
-- ## **DETECTION_ derived classes** group the detected units into a **DetectedItems[]** list -- ## **DETECTION_ derived classes** group the detected units into a **DetectedItems[]** list
-- --
-- DETECTION_BASE derived classes build a list called DetectedItems[], which is essentially a first later -- DETECTION_BASE derived classes build a list called DetectedItems[], which is essentially a first later
@@ -269,10 +275,12 @@ do -- DETECTION_BASE
DetectedItemsByIndex = {}, DetectedItemsByIndex = {},
} }
--- @type DETECTION_BASE.DetectedObjects ---
-- @type DETECTION_BASE.DetectedObjects
-- @list <#DETECTION_BASE.DetectedObject> -- @list <#DETECTION_BASE.DetectedObject>
--- @type DETECTION_BASE.DetectedObject ---
-- @type DETECTION_BASE.DetectedObject
-- @field #string Name -- @field #string Name
-- @field #boolean IsVisible -- @field #boolean IsVisible
-- @field #boolean KnowType -- @field #boolean KnowType
@@ -284,7 +292,8 @@ do -- DETECTION_BASE
-- @field #boolean LastPos -- @field #boolean LastPos
-- @field #number LastVelocity -- @field #number LastVelocity
--- @type DETECTION_BASE.DetectedItems ---
-- @type DETECTION_BASE.DetectedItems
-- @list <#DETECTION_BASE.DetectedItem> -- @list <#DETECTION_BASE.DetectedItem>
--- Detected item data structure. --- Detected item data structure.
@@ -522,7 +531,7 @@ do -- DETECTION_BASE
do -- State Transition Handling do -- State Transition Handling
--- @param #DETECTION_BASE self -- @param #DETECTION_BASE self
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
-- @param #string To The To State string. -- @param #string To The To State string.
@@ -530,13 +539,13 @@ do -- DETECTION_BASE
self:__Detect( 1 ) self:__Detect( 1 )
end end
--- @param #DETECTION_BASE self -- @param #DETECTION_BASE self
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
-- @param #string To The To State string. -- @param #string To The To State string.
function DETECTION_BASE:onafterDetect( From, Event, To ) function DETECTION_BASE:onafterDetect( From, Event, To )
local DetectDelay = 0.1 local DetectDelay = 0.15
self.DetectionCount = 0 self.DetectionCount = 0
self.DetectionRun = 0 self.DetectionRun = 0
self:UnIdentifyAllDetectedObjects() -- Resets the DetectedObjectsIdentified table self:UnIdentifyAllDetectedObjects() -- Resets the DetectedObjectsIdentified table
@@ -570,7 +579,7 @@ do -- DETECTION_BASE
end end
--- @param #DETECTION_BASE self -- @param #DETECTION_BASE self
-- @param #number The amount of alive recce. -- @param #number The amount of alive recce.
function DETECTION_BASE:CountAliveRecce() function DETECTION_BASE:CountAliveRecce()
@@ -578,7 +587,7 @@ do -- DETECTION_BASE
end end
--- @param #DETECTION_BASE self -- @param #DETECTION_BASE self
function DETECTION_BASE:ForEachAliveRecce( IteratorFunction, ... ) function DETECTION_BASE:ForEachAliveRecce( IteratorFunction, ... )
self:F2( arg ) self:F2( arg )
@@ -587,7 +596,8 @@ do -- DETECTION_BASE
return self return self
end end
--- @param #DETECTION_BASE self ---
-- @param #DETECTION_BASE self
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
-- @param #string To The To State string. -- @param #string To The To State string.
@@ -595,7 +605,7 @@ do -- DETECTION_BASE
-- @param #number DetectionTimeStamp Time stamp of detection event. -- @param #number DetectionTimeStamp Time stamp of detection event.
function DETECTION_BASE:onafterDetection( From, Event, To, Detection, DetectionTimeStamp ) function DETECTION_BASE:onafterDetection( From, Event, To, Detection, DetectionTimeStamp )
-- self:F( { DetectedObjects = self.DetectedObjects } ) self:T( { DetectedObjects = self.DetectedObjects } )
self.DetectionRun = self.DetectionRun + 1 self.DetectionRun = self.DetectionRun + 1
@@ -603,14 +613,14 @@ do -- DETECTION_BASE
if Detection and Detection:IsAlive() then if Detection and Detection:IsAlive() then
-- self:T( { "DetectionGroup is Alive", DetectionGroup:GetName() } ) self:T( { "DetectionGroup is Alive", Detection:GetName() } )
local DetectionGroupName = Detection:GetName() local DetectionGroupName = Detection:GetName()
local DetectionUnit = Detection:GetUnit( 1 ) local DetectionUnit = Detection:GetFirstUnitAlive()
local DetectedUnits = {} local DetectedUnits = {}
local DetectedTargets = Detection:GetDetectedTargets( local DetectedTargets = DetectionUnit:GetDetectedTargets(
self.DetectVisual, self.DetectVisual,
self.DetectOptical, self.DetectOptical,
self.DetectRadar, self.DetectRadar,
@@ -619,9 +629,11 @@ do -- DETECTION_BASE
self.DetectDLINK self.DetectDLINK
) )
self:F( { DetectedTargets = DetectedTargets } ) --self:T( { DetectedTargets = DetectedTargets } )
--self:T(UTILS.PrintTableToLog(DetectedTargets))
for DetectionObjectID, Detection in pairs( DetectedTargets ) do
for DetectionObjectID, Detection in pairs( DetectedTargets or {}) do
local DetectedObject = Detection.object -- DCS#Object local DetectedObject = Detection.object -- DCS#Object
if DetectedObject and DetectedObject:isExist() and DetectedObject.id_ < 50000000 then -- and ( DetectedObject:getCategory() == Object.Category.UNIT or DetectedObject:getCategory() == Object.Category.STATIC ) then if DetectedObject and DetectedObject:isExist() and DetectedObject.id_ < 50000000 then -- and ( DetectedObject:getCategory() == Object.Category.UNIT or DetectedObject:getCategory() == Object.Category.STATIC ) then
@@ -634,7 +646,7 @@ do -- DETECTION_BASE
end end
end end
for DetectionObjectName, DetectedObjectData in pairs( self.DetectedObjects ) do for DetectionObjectName, DetectedObjectData in pairs( self.DetectedObjects or {}) do
local DetectedObject = DetectedObjectData.Object local DetectedObject = DetectedObjectData.Object
@@ -712,6 +724,31 @@ do -- DETECTION_BASE
end end
end end
-- Calculate radar blur probability
if self.RadarBlur then
MESSAGE:New("Radar Blur",10):ToLogIf(self.debug):ToAllIf(self.verbose)
local minheight = self.RadarBlurMinHeight or 250 -- meters
local thresheight = self.RadarBlurThresHeight or 90 -- 10% chance to find a low flying group
local thresblur = self.RadarBlurThresBlur or 85 -- 25% chance to escape the radar overall
local dist = math.floor(Distance)
if dist <= self.RadarBlurClosing then
thresheight = (((dist*dist)/self.RadarBlurClosingSquare)*thresheight)
thresblur = (((dist*dist)/self.RadarBlurClosingSquare)*thresblur)
end
local fheight = math.floor(math.random(1,10000)/100)
local fblur = math.floor(math.random(1,10000)/100)
local unit = UNIT:FindByName(DetectedObjectName)
if unit and unit:IsAlive() then
local AGL = unit:GetAltitude(true)
MESSAGE:New("Unit "..DetectedObjectName.." is at "..math.floor(AGL).."m. Distance "..math.floor(Distance).."km.",10):ToLogIf(self.debug):ToAllIf(self.verbose)
MESSAGE:New(string.format("fheight = %d/%d | fblur = %d/%d",fheight,thresheight,fblur,thresblur),10):ToLogIf(self.debug):ToAllIf(self.verbose)
if fblur > thresblur then DetectionAccepted = false end
if AGL <= minheight and fheight < thresheight then DetectionAccepted = false end
MESSAGE:New("Detection Accepted = "..tostring(DetectionAccepted),10):ToLogIf(self.debug):ToAllIf(self.verbose)
end
end
-- Calculate additional probabilities -- Calculate additional probabilities
if not self.DetectedObjects[DetectedObjectName] and TargetIsVisible and self.DistanceProbability then if not self.DetectedObjects[DetectedObjectName] and TargetIsVisible and self.DistanceProbability then
@@ -1012,6 +1049,23 @@ do -- DETECTION_BASE
end end
--- Method to make the radar detection less accurate, e.g. for WWII scenarios.
-- @param #DETECTION_BASE self
-- @param #number minheight Minimum flight height to be detected, in meters AGL (above ground)
-- @param #number thresheight Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)
-- @param #number thresblur Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)
-- @param #number closing Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.
-- @return #DETECTION_BASE self
function DETECTION_BASE:SetRadarBlur(minheight,thresheight,thresblur,closing)
self.RadarBlur = true
self.RadarBlurMinHeight = minheight or 250 -- meters
self.RadarBlurThresHeight = thresheight or 90 -- 10% chance to find a low flying group
self.RadarBlurThresBlur = thresblur or 85 -- 25% chance to escape the radar overall
self.RadarBlurClosing = closing or 20 -- 20km
self.RadarBlurClosingSquare = self.RadarBlurClosing * self.RadarBlurClosing
return self
end
end end
do do
@@ -1354,7 +1408,7 @@ do -- DETECTION_BASE
} }
} }
--- @param DCS#Unit FoundDCSUnit -- @param DCS#Unit FoundDCSUnit
-- @param Wrapper.Group#GROUP ReportGroup -- @param Wrapper.Group#GROUP ReportGroup
-- @param Core.Set#SET_GROUP ReportSetGroup -- @param Core.Set#SET_GROUP ReportSetGroup
local FindNearByFriendlies = function( FoundDCSUnit, ReportGroupData ) local FindNearByFriendlies = function( FoundDCSUnit, ReportGroupData )
@@ -1419,7 +1473,7 @@ do -- DETECTION_BASE
DetectedItem.PlayersNearBy = nil DetectedItem.PlayersNearBy = nil
_DATABASE:ForEachPlayer( _DATABASE:ForEachPlayer(
--- @param Wrapper.Unit#UNIT PlayerUnit -- @param Wrapper.Unit#UNIT PlayerUnit
function( PlayerUnitName ) function( PlayerUnitName )
local PlayerUnit = UNIT:FindByName( PlayerUnitName ) local PlayerUnit = UNIT:FindByName( PlayerUnitName )
@@ -1976,7 +2030,8 @@ end
do -- DETECTION_UNITS do -- DETECTION_UNITS
--- @type DETECTION_UNITS ---
-- @type DETECTION_UNITS
-- @field DCS#Distance DetectionRange The range till which targets are detected. -- @field DCS#Distance DetectionRange The range till which targets are detected.
-- @extends Functional.Detection#DETECTION_BASE -- @extends Functional.Detection#DETECTION_BASE
@@ -2232,7 +2287,8 @@ end
do -- DETECTION_TYPES do -- DETECTION_TYPES
--- @type DETECTION_TYPES ---
-- @type DETECTION_TYPES
-- @extends Functional.Detection#DETECTION_BASE -- @extends Functional.Detection#DETECTION_BASE
--- Will detect units within the battle zone. --- Will detect units within the battle zone.
@@ -2435,7 +2491,8 @@ end
do -- DETECTION_AREAS do -- DETECTION_AREAS
--- @type DETECTION_AREAS ---
-- @type DETECTION_AREAS
-- @field DCS#Distance DetectionZoneRange The range till which targets are grouped upon the first detected target. -- @field DCS#Distance DetectionZoneRange The range till which targets are grouped upon the first detected target.
-- @field #DETECTION_BASE.DetectedItems DetectedItems A list of areas containing the set of @{Wrapper.Unit}s, @{Core.Zone}s, the center @{Wrapper.Unit} within the zone, and ID of each area that was detected within a DetectionZoneRange. -- @field #DETECTION_BASE.DetectedItems DetectedItems A list of areas containing the set of @{Wrapper.Unit}s, @{Core.Zone}s, the center @{Wrapper.Unit} within the zone, and ID of each area that was detected within a DetectionZoneRange.
-- @extends Functional.Detection#DETECTION_BASE -- @extends Functional.Detection#DETECTION_BASE
@@ -2961,7 +3018,7 @@ do -- DETECTION_AREAS
-- DetectedSet:Flush( self ) -- DetectedSet:Flush( self )
DetectedSet:ForEachUnit( --- @param Wrapper.Unit#UNIT DetectedUnit DetectedSet:ForEachUnit( -- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit ) function( DetectedUnit )
if DetectedUnit:IsAlive() then if DetectedUnit:IsAlive() then
-- self:T( "Detected Set #" .. DetectedItem.ID .. ":" .. DetectedUnit:GetName() ) -- self:T( "Detected Set #" .. DetectedItem.ID .. ":" .. DetectedUnit:GetName() )

View File

@@ -4,7 +4,7 @@
do -- DETECTION_ZONES do -- DETECTION_ZONES
--- @type DETECTION_ZONES -- @type DETECTION_ZONES
-- @field DCS#Distance DetectionZoneRange The range till which targets are grouped upon the first detected target. -- @field DCS#Distance DetectionZoneRange The range till which targets are grouped upon the first detected target.
-- @field #DETECTION_BASE.DetectedItems DetectedItems A list of areas containing the set of @{Wrapper.Unit}s, @{Core.Zone}s, the center @{Wrapper.Unit} within the zone, and ID of each area that was detected within a DetectionZoneRange. -- @field #DETECTION_BASE.DetectedItems DetectedItems A list of areas containing the set of @{Wrapper.Unit}s, @{Core.Zone}s, the center @{Wrapper.Unit} within the zone, and ID of each area that was detected within a DetectionZoneRange.
-- @extends Functional.Detection#DETECTION_BASE -- @extends Functional.Detection#DETECTION_BASE
@@ -68,7 +68,7 @@ do -- DETECTION_ZONES
return self return self
end end
--- @param #DETECTION_ZONES self -- @param #DETECTION_ZONES self
-- @param #number The amount of alive recce. -- @param #number The amount of alive recce.
function DETECTION_ZONES:CountAliveRecce() function DETECTION_ZONES:CountAliveRecce()
@@ -76,7 +76,7 @@ do -- DETECTION_ZONES
end end
--- @param #DETECTION_ZONES self -- @param #DETECTION_ZONES self
function DETECTION_ZONES:ForEachAliveRecce( IteratorFunction, ... ) function DETECTION_ZONES:ForEachAliveRecce( IteratorFunction, ... )
self:F2( arg ) self:F2( arg )
@@ -352,7 +352,7 @@ do -- DETECTION_ZONES
--DetectedSet:Flush( self ) --DetectedSet:Flush( self )
DetectedSet:ForEachUnit( DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit -- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit ) function( DetectedUnit )
if DetectedUnit:IsAlive() then if DetectedUnit:IsAlive() then
--self:T( "Detected Set #" .. DetectedItem.ID .. ":" .. DetectedUnit:GetName() ) --self:T( "Detected Set #" .. DetectedItem.ID .. ":" .. DetectedUnit:GetName() )
@@ -380,7 +380,7 @@ do -- DETECTION_ZONES
end end
--- @param #DETECTION_ZONES self -- @param #DETECTION_ZONES self
-- @param #string From The From State string. -- @param #string From The From State string.
-- @param #string Event The Event string. -- @param #string Event The Event string.
-- @param #string To The To State string. -- @param #string To The To State string.

View File

@@ -17,9 +17,11 @@
-- --
-- === -- ===
-- --
-- ## Missions: -- ## Additional Material:
-- --
-- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ESC%20-%20Escorting) -- * **Demo Missions:** [GitHub](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Escort)
-- * **YouTube videos:** None
-- * **Guides:** None
-- --
-- === -- ===
-- --

View File

@@ -19,6 +19,10 @@
-- --
-- === -- ===
-- --
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Functional/FOX)
--
-- ===
--
-- ### Author: **funkyfranky** -- ### Author: **funkyfranky**
-- @module Functional.Fox -- @module Functional.Fox
-- @image Functional_FOX.png -- @image Functional_FOX.png
@@ -137,7 +141,7 @@ FOX = {
explosiondist = 200, explosiondist = 200,
explosiondist2 = 500, explosiondist2 = 500,
bigmissilemass = 50, bigmissilemass = 50,
destroy = nil, --destroy = nil,
dt50 = 5, dt50 = 5,
dt10 = 1, dt10 = 1,
dt05 = 0.5, dt05 = 0.5,
@@ -437,7 +441,7 @@ function FOX:SetProtectedGroupSet(groupset)
return self return self
end end
--- Add a group to the protected set. --- Add a group to the protected set. Works only with AI!
-- @param #FOX self -- @param #FOX self
-- @param Wrapper.Group#GROUP group Protected group. -- @param Wrapper.Group#GROUP group Protected group.
-- @return #FOX self -- @return #FOX self

View File

@@ -13,7 +13,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- ### [MANTIS - Modular, Automatic and Network capable Targeting and Interception System](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/MTS%20-%20Mantis/MTS-010%20-%20Basic%20Mantis%20Demo) -- ### [MANTIS - Modular, Automatic and Network capable Targeting and Interception System](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Mantis)
-- --
-- === -- ===
-- --
@@ -22,7 +22,7 @@
-- @module Functional.Mantis -- @module Functional.Mantis
-- @image Functional.Mantis.jpg -- @image Functional.Mantis.jpg
-- --
-- Last Update: Nov 2023 -- Last Update: July 2024
------------------------------------------------------------------------- -------------------------------------------------------------------------
--- **MANTIS** class, extends Core.Base#BASE --- **MANTIS** class, extends Core.Base#BASE
@@ -58,6 +58,8 @@
-- @field #boolean ShoradLink If true, #MANTIS has #SHORAD enabled -- @field #boolean ShoradLink If true, #MANTIS has #SHORAD enabled
-- @field #number ShoradTime Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range -- @field #number ShoradTime Timer in seconds, how long #SHORAD will be active after a detection inside of the defense range
-- @field #number ShoradActDistance Distance of an attacker in meters from a Mantis SAM site, on which Shorad will be switched on. Useful to not give away Shorad sites too early. Default 15km. Should be smaller than checkradius. -- @field #number ShoradActDistance Distance of an attacker in meters from a Mantis SAM site, on which Shorad will be switched on. Useful to not give away Shorad sites too early. Default 15km. Should be smaller than checkradius.
-- @field #boolean checkforfriendlies If true, do not activate a SAM installation if a friendly aircraft is in firing range.
-- @field #table FilterZones 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.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
@@ -94,7 +96,7 @@
-- Known SAM types at the time of writing are: -- Known SAM types at the time of writing are:
-- --
-- * Avenger -- * Avenger
-- * Chaparrel -- * Chaparral
-- * Hawk -- * Hawk
-- * Linebacker -- * Linebacker
-- * NASAMS -- * NASAMS
@@ -187,29 +189,34 @@
-- -- This is effectively a 3-stage filter allowing for zone overlap. A coordinate is accepted first when -- -- This is effectively a 3-stage filter allowing for zone overlap. A coordinate is accepted first when
-- -- it is inside any AcceptZone. Then RejectZones are checked, which enforces both borders, but also overlaps of -- -- it is inside any AcceptZone. Then RejectZones are checked, which enforces both borders, but also overlaps of
-- -- Accept- and RejectZones. Last, if it is inside a conflict zone, it is accepted. -- -- Accept- and RejectZones. Last, if it is inside a conflict zone, it is accepted.
-- `mybluemantis:AddZones(AcceptZones,RejectZones,ConflictZones)` -- mybluemantis:AddZones(AcceptZones,RejectZones,ConflictZones)
-- --
-- --
-- ### 2.1.2 Change the number of long-, mid- and short-range systems going live on a detected target: -- ### 2.1.2 Change the number of long-, mid- and short-range systems going live on a detected target:
-- --
-- -- parameters are numbers. Defaults are 1,2,2,6 respectively -- -- parameters are numbers. Defaults are 1,2,2,6 respectively
-- `mybluemantis:SetMaxActiveSAMs(Short,Mid,Long,Classic)` -- mybluemantis:SetMaxActiveSAMs(Short,Mid,Long,Classic)
-- --
-- ### 2.1.3 SHORAD will automatically be added from SAM sites of type "short-range" -- ### 2.1.3 SHORAD will automatically be added from SAM sites of type "short-range"
-- --
-- ### 2.1.4 Advanced features -- ### 2.1.4 Advanced features
-- --
-- -- switch off auto mode **before** you start MANTIS. -- -- switch off auto mode **before** you start MANTIS.
-- `mybluemantis.automode = false` -- mybluemantis.automode = false
-- --
-- -- switch off auto shorad **before** you start MANTIS. -- -- switch off auto shorad **before** you start MANTIS.
-- `mybluemantis.autoshorad = false` -- mybluemantis.autoshorad = false
-- --
-- -- scale of the activation range, i.e. don't activate at the fringes of max range, defaults below. -- -- scale of the activation range, i.e. don't activate at the fringes of max range, defaults below.
-- -- also see engagerange below. -- -- also see engagerange below.
-- ` self.radiusscale[MANTIS.SamType.LONG] = 1.1` -- self.radiusscale[MANTIS.SamType.LONG] = 1.1
-- ` self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2` -- self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2
-- ` self.radiusscale[MANTIS.SamType.SHORT] = 1.3` -- self.radiusscale[MANTIS.SamType.SHORT] = 1.3
--
-- ### 2.1.5 Friendlies check in firing range
--
-- -- For some scenarios, like Cold War, it might be useful not to activate SAMs if friendly aircraft are around to avoid death by friendly fire.
-- mybluemantis.checkforfriendlies = true
-- --
-- # 3. Default settings [both modes unless stated otherwise] -- # 3. Default settings [both modes unless stated otherwise]
-- --
@@ -233,7 +240,7 @@
-- --
-- Use this option if you want to make use of or allow advanced SEAD tactics. -- Use this option if you want to make use of or allow advanced SEAD tactics.
-- --
-- # 5. Integrate SHORAD [classic mode] -- # 5. Integrate SHORAD [classic mode, not necessary in automode]
-- --
-- You can also choose to integrate Mantis with @{Functional.Shorad#SHORAD} for protection against HARMs and AGMs. When SHORAD detects a missile fired at one of MANTIS' SAM sites, it will activate SHORAD systems in -- You can also choose to integrate Mantis with @{Functional.Shorad#SHORAD} for protection against HARMs and AGMs. When SHORAD detects a missile fired at one of MANTIS' SAM sites, it will activate SHORAD systems in
-- the given defense checkradius around that SAM site. Create a SHORAD object first, then integrate with MANTIS like so: -- the given defense checkradius around that SAM site. Create a SHORAD object first, then integrate with MANTIS like so:
@@ -321,6 +328,7 @@ MANTIS = {
automode = true, automode = true,
autoshorad = true, autoshorad = true,
ShoradGroupSet = nil, ShoradGroupSet = nil,
checkforfriendlies = false,
} }
--- Advanced state enumerator --- Advanced state enumerator
@@ -347,17 +355,17 @@ MANTIS.SamType = {
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) -- @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) -- @field #string Radar Radar typename on unit level (used as key)
MANTIS.SamData = { MANTIS.SamData = {
["Hawk"] = { Range=44, Blindspot=0, Height=9, Type="Medium", Radar="Hawk" }, -- measures in km ["Hawk"] = { Range=35, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km
["NASAMS"] = { Range=14, Blindspot=0, Height=3, Type="Short", Radar="NSAMS" }, ["NASAMS"] = { Range=14, Blindspot=0, Height=7, Type="Short", Radar="NSAMS" }, -- AIM 120B
["Patriot"] = { Range=99, Blindspot=0, Height=9, Type="Long", Radar="Patriot" }, ["Patriot"] = { Range=99, Blindspot=0, Height=25, Type="Long", Radar="Patriot" },
["Rapier"] = { Range=6, Blindspot=0, Height=3, Type="Short", Radar="rapier" }, ["Rapier"] = { Range=10, Blindspot=0, Height=3, Type="Short", Radar="rapier" },
["SA-2"] = { Range=40, Blindspot=7, Height=25, Type="Medium", Radar="S_75M_Volhov" }, ["SA-2"] = { Range=40, Blindspot=7, Height=25, Type="Medium", Radar="S_75M_Volhov" },
["SA-3"] = { Range=18, Blindspot=6, Height=18, Type="Short", Radar="5p73 s-125 ln" }, ["SA-3"] = { Range=18, Blindspot=6, Height=18, Type="Short", Radar="5p73 s-125 ln" },
["SA-5"] = { Range=250, Blindspot=7, Height=40, Type="Long", Radar="5N62V" }, ["SA-5"] = { Range=250, Blindspot=7, Height=40, Type="Long", Radar="5N62V" },
["SA-6"] = { Range=25, Blindspot=0, Height=8, Type="Medium", Radar="1S91" }, ["SA-6"] = { Range=25, Blindspot=0, Height=8, Type="Medium", Radar="1S91" },
["SA-10"] = { Range=119, Blindspot=0, Height=18, Type="Long" , Radar="S-300PS 4"}, ["SA-10"] = { Range=119, Blindspot=0, Height=18, Type="Long" , Radar="S-300PS 4"},
["SA-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" }, ["SA-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" },
["Roland"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Roland" }, ["Roland"] = { Range=5, Blindspot=0, Height=5, Type="Short", Radar="Roland" },
["HQ-7"] = { Range=12, Blindspot=0, Height=3, Type="Short", Radar="HQ-7" }, ["HQ-7"] = { Range=12, Blindspot=0, Height=3, Type="Short", Radar="HQ-7" },
["SA-9"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Strela" }, ["SA-9"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Strela" },
["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" }, ["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" },
@@ -365,7 +373,7 @@ MANTIS.SamData = {
["SA-15"] = { Range=11, Blindspot=0, Height=6, Type="Short", Radar="Tor 9A331" }, ["SA-15"] = { Range=11, Blindspot=0, Height=6, Type="Short", Radar="Tor 9A331" },
["SA-13"] = { Range=5, Blindspot=0, Height=3, Type="Short", Radar="Strela" }, ["SA-13"] = { Range=5, Blindspot=0, Height=3, Type="Short", Radar="Strela" },
["Avenger"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Avenger" }, ["Avenger"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Avenger" },
["Chaparrel"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Chaparral" }, ["Chaparral"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Chaparral" },
["Linebacker"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Linebacker" }, ["Linebacker"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Linebacker" },
["Silkworm"] = { Range=90, Blindspot=1, Height=0.2, Type="Long", Radar="Silkworm" }, ["Silkworm"] = { Range=90, Blindspot=1, Height=0.2, Type="Long", Radar="Silkworm" },
-- units from HDS Mod, multi launcher options is tricky -- units from HDS Mod, multi launcher options is tricky
@@ -503,6 +511,7 @@ do
-- DONE: Allow tables of prefixes for the setup -- DONE: Allow tables of prefixes for the setup
-- DONE: Auto-Mode with range setups for various known SAM types. -- DONE: Auto-Mode with range setups for various known SAM types.
self.name = name or "mymantis"
self.SAM_Templates_Prefix = samprefix or "Red SAM" self.SAM_Templates_Prefix = samprefix or "Red SAM"
self.EWR_Templates_Prefix = ewrprefix or "Red EWR" self.EWR_Templates_Prefix = ewrprefix or "Red EWR"
self.HQ_Template_CC = hq or nil self.HQ_Template_CC = hq or nil
@@ -631,7 +640,7 @@ do
-- TODO Version -- TODO Version
-- @field #string version -- @field #string version
self.version="0.8.15" self.version="0.8.18"
self:I(string.format("***** Starting MANTIS Version %s *****", self.version)) self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
--- FSM Functions --- --- FSM Functions ---
@@ -1149,7 +1158,7 @@ do
--self:T(self.lid.." Relocating HQ") --self:T(self.lid.." Relocating HQ")
local text = self.lid.." Relocating HQ" local text = self.lid.." Relocating HQ"
--local m= MESSAGE:New(text,10,"MANTIS"):ToAll() --local m= MESSAGE:New(text,10,"MANTIS"):ToAll()
_hqgrp:RelocateGroundRandomInRadius(20,500,true,true) _hqgrp:RelocateGroundRandomInRadius(20,500,true,true,nil,true)
end end
--relocate EWR --relocate EWR
-- TODO: maybe dependent on AlarmState? Observed: SA11 SR only relocates if no objects in reach -- TODO: maybe dependent on AlarmState? Observed: SA11 SR only relocates if no objects in reach
@@ -1163,7 +1172,7 @@ do
local text = self.lid.." Relocating EWR ".._grp:GetName() local text = self.lid.." Relocating EWR ".._grp:GetName()
local m= MESSAGE:New(text,10,"MANTIS"):ToAllIf(self.debug) local m= MESSAGE:New(text,10,"MANTIS"):ToAllIf(self.debug)
if self.verbose then self:I(text) end if self.verbose then self:I(text) end
_grp:RelocateGroundRandomInRadius(20,500,true,true) _grp:RelocateGroundRandomInRadius(20,500,true,true,nil,true)
end end
end end
end end
@@ -1222,10 +1231,10 @@ do
function MANTIS:_PreFilterHeight(height) function MANTIS:_PreFilterHeight(height)
self:T(self.lid.."_PreFilterHeight") self:T(self.lid.."_PreFilterHeight")
local set = {} local set = {}
local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK local dlink = self.Detection -- Ops.Intel#INTEL_DLINK
local detectedgroups = dlink:GetContactTable() local detectedgroups = dlink:GetContactTable()
for _,_contact in pairs(detectedgroups) do for _,_contact in pairs(detectedgroups) do
local contact = _contact -- Ops.Intelligence#INTEL.Contact local contact = _contact -- Ops.Intel#INTEL.Contact
local grp = contact.group -- Wrapper.Group#GROUP local grp = contact.group -- Wrapper.Group#GROUP
if grp:IsAlive() then if grp:IsAlive() then
if grp:GetHeight(true) < height then if grp:GetHeight(true) < height then
@@ -1255,6 +1264,10 @@ do
-- DEBUG -- DEBUG
set = self:_PreFilterHeight(height) set = self:_PreFilterHeight(height)
end end
local friendlyset -- Core.Set#SET_GROUP
if self.checkforfriendlies == true then
friendlyset = SET_GROUP:New():FilterCoalitions(self.Coalition):FilterCategories({"plane","helicopter"}):FilterFunction(function(grp) if grp and grp:InAir() then return true else return false end end):FilterOnce()
end
for _,_coord in pairs (set) do for _,_coord in pairs (set) do
local coord = _coord -- get current coord to check local coord = _coord -- get current coord to check
-- output for cross-check -- output for cross-check
@@ -1279,8 +1292,16 @@ do
local m = MESSAGE:New(text,10,"Check"):ToAllIf(self.debug) local m = MESSAGE:New(text,10,"Check"):ToAllIf(self.debug)
self:T(self.lid..text) self:T(self.lid..text)
end end
-- friendlies around?
local nofriendlies = true
if self.checkforfriendlies == true then
local closestfriend, distance = friendlyset:GetClosestGroup(samcoordinate)
if closestfriend and distance and distance < rad then
nofriendlies = false
end
end
-- end output to cross-check -- end output to cross-check
if targetdistance <= rad and zonecheck then if targetdistance <= rad and zonecheck == true and nofriendlies == true then
return true, targetdistance return true, targetdistance
end end
end end
@@ -1777,7 +1798,7 @@ do
-- @return #MANTIS self -- @return #MANTIS self
function MANTIS:_CheckDLinkState() function MANTIS:_CheckDLinkState()
self:T(self.lid .. "_CheckDLinkState") self:T(self.lid .. "_CheckDLinkState")
local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK local dlink = self.Detection -- Ops.Intel#INTEL_DLINK
local TS = timer.getAbsTime() local TS = timer.getAbsTime()
if not dlink:Is("Running") and (TS - self.DLTimeStamp > 29) then if not dlink:Is("Running") and (TS - self.DLTimeStamp > 29) then
self.DLink = false self.DLink = false

View File

@@ -14,7 +14,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [MIT - Missile Trainer](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/MIT%20-%20Missile%20Trainer) -- [MIT - Missile Trainer](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/MissileTrainer)
-- --
-- === -- ===
-- --

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
-- Implementation is based on the [Simple Range Script](https://forums.eagle.ru/showthread.php?t=157991) by Ciribob, 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). -- 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. -- [476th - Air Weapons Range Objects mod](https://www.476vfightergroup.com/downloads.php?do=download&downloadid=482) is highly recommended for this class.
-- --
-- **Main Features:** -- **Main Features:**
-- --
@@ -106,6 +106,7 @@
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor. -- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
-- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor. -- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor.
-- @field #number Coalition Coalition side for the menu, if any. -- @field #number Coalition Coalition side for the menu, if any.
-- @field Core.Menu#MENU_MISSION menuF10root Specific user defined root F10 menu.
-- @extends Core.Fsm#FSM -- @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 --- *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
@@ -593,13 +594,14 @@ RANGE.MenuF10Root = nil
--- Range script version. --- Range script version.
-- @field #string version -- @field #string version
RANGE.version = "2.7.3" RANGE.version = "2.8.0"
-- TODO list: -- TODO list:
-- TODO: Verbosity level for messages. -- TODO: Verbosity level for messages.
-- TODO: Add option for default settings such as smoke off. -- TODO: Add option for default settings such as smoke off.
-- TODO: Add custom weapons, which can be specified by the user. -- TODO: Add custom weapons, which can be specified by the user.
-- TODO: Check if units are still alive. -- TODO: Check if units are still alive.
-- TODO: Option for custom sound files.
-- DONE: Scenery as targets. -- DONE: Scenery as targets.
-- DONE: Add statics for strafe pits. -- DONE: Add statics for strafe pits.
-- DONE: Add missiles. -- DONE: Add missiles.
@@ -858,16 +860,16 @@ function RANGE:onafterStart()
self.rangecontrol.schedonce = true self.rangecontrol.schedonce = true
-- Init numbers. -- Init numbers.
self.rangecontrol:SetDigit( 0, RANGE.Sound.RC0.filename, RANGE.Sound.RC0.duration, self.soundpath ) self.rangecontrol:SetDigit( 0, self.Sound.RC0.filename, self.Sound.RC0.duration, self.soundpath )
self.rangecontrol:SetDigit( 1, RANGE.Sound.RC1.filename, RANGE.Sound.RC1.duration, self.soundpath ) self.rangecontrol:SetDigit( 1, self.Sound.RC1.filename, self.Sound.RC1.duration, self.soundpath )
self.rangecontrol:SetDigit( 2, RANGE.Sound.RC2.filename, RANGE.Sound.RC2.duration, self.soundpath ) self.rangecontrol:SetDigit( 2, self.Sound.RC2.filename, self.Sound.RC2.duration, self.soundpath )
self.rangecontrol:SetDigit( 3, RANGE.Sound.RC3.filename, RANGE.Sound.RC3.duration, self.soundpath ) self.rangecontrol:SetDigit( 3, self.Sound.RC3.filename, self.Sound.RC3.duration, self.soundpath )
self.rangecontrol:SetDigit( 4, RANGE.Sound.RC4.filename, RANGE.Sound.RC4.duration, self.soundpath ) self.rangecontrol:SetDigit( 4, self.Sound.RC4.filename, self.Sound.RC4.duration, self.soundpath )
self.rangecontrol:SetDigit( 5, RANGE.Sound.RC5.filename, RANGE.Sound.RC5.duration, self.soundpath ) self.rangecontrol:SetDigit( 5, self.Sound.RC5.filename, self.Sound.RC5.duration, self.soundpath )
self.rangecontrol:SetDigit( 6, RANGE.Sound.RC6.filename, RANGE.Sound.RC6.duration, self.soundpath ) self.rangecontrol:SetDigit( 6, self.Sound.RC6.filename, self.Sound.RC6.duration, self.soundpath )
self.rangecontrol:SetDigit( 7, RANGE.Sound.RC7.filename, RANGE.Sound.RC7.duration, self.soundpath ) self.rangecontrol:SetDigit( 7, self.Sound.RC7.filename, self.Sound.RC7.duration, self.soundpath )
self.rangecontrol:SetDigit( 8, RANGE.Sound.RC8.filename, RANGE.Sound.RC8.duration, self.soundpath ) self.rangecontrol:SetDigit( 8, self.Sound.RC8.filename, self.Sound.RC8.duration, self.soundpath )
self.rangecontrol:SetDigit( 9, RANGE.Sound.RC9.filename, RANGE.Sound.RC9.duration, self.soundpath ) self.rangecontrol:SetDigit( 9, self.Sound.RC9.filename, self.Sound.RC9.duration, self.soundpath )
-- Set location where the messages are transmitted from. -- Set location where the messages are transmitted from.
self.rangecontrol:SetSenderCoordinate( self.location ) self.rangecontrol:SetSenderCoordinate( self.location )
@@ -884,16 +886,16 @@ function RANGE:onafterStart()
self.instructor.schedonce = true self.instructor.schedonce = true
-- Init numbers. -- Init numbers.
self.instructor:SetDigit( 0, RANGE.Sound.IR0.filename, RANGE.Sound.IR0.duration, self.soundpath ) self.instructor:SetDigit( 0, self.Sound.IR0.filename, self.Sound.IR0.duration, self.soundpath )
self.instructor:SetDigit( 1, RANGE.Sound.IR1.filename, RANGE.Sound.IR1.duration, self.soundpath ) self.instructor:SetDigit( 1, self.Sound.IR1.filename, self.Sound.IR1.duration, self.soundpath )
self.instructor:SetDigit( 2, RANGE.Sound.IR2.filename, RANGE.Sound.IR2.duration, self.soundpath ) self.instructor:SetDigit( 2, self.Sound.IR2.filename, self.Sound.IR2.duration, self.soundpath )
self.instructor:SetDigit( 3, RANGE.Sound.IR3.filename, RANGE.Sound.IR3.duration, self.soundpath ) self.instructor:SetDigit( 3, self.Sound.IR3.filename, self.Sound.IR3.duration, self.soundpath )
self.instructor:SetDigit( 4, RANGE.Sound.IR4.filename, RANGE.Sound.IR4.duration, self.soundpath ) self.instructor:SetDigit( 4, self.Sound.IR4.filename, self.Sound.IR4.duration, self.soundpath )
self.instructor:SetDigit( 5, RANGE.Sound.IR5.filename, RANGE.Sound.IR5.duration, self.soundpath ) self.instructor:SetDigit( 5, self.Sound.IR5.filename, self.Sound.IR5.duration, self.soundpath )
self.instructor:SetDigit( 6, RANGE.Sound.IR6.filename, RANGE.Sound.IR6.duration, self.soundpath ) self.instructor:SetDigit( 6, self.Sound.IR6.filename, self.Sound.IR6.duration, self.soundpath )
self.instructor:SetDigit( 7, RANGE.Sound.IR7.filename, RANGE.Sound.IR7.duration, self.soundpath ) self.instructor:SetDigit( 7, self.Sound.IR7.filename, self.Sound.IR7.duration, self.soundpath )
self.instructor:SetDigit( 8, RANGE.Sound.IR8.filename, RANGE.Sound.IR8.duration, self.soundpath ) self.instructor:SetDigit( 8, self.Sound.IR8.filename, self.Sound.IR8.duration, self.soundpath )
self.instructor:SetDigit( 9, RANGE.Sound.IR9.filename, RANGE.Sound.IR9.duration, self.soundpath ) self.instructor:SetDigit( 9, self.Sound.IR9.filename, self.Sound.IR9.duration, self.soundpath )
-- Set location where the messages are transmitted from. -- Set location where the messages are transmitted from.
self.instructor:SetSenderCoordinate( self.location ) self.instructor:SetSenderCoordinate( self.location )
@@ -920,13 +922,23 @@ function RANGE:onafterStart()
self.rangezone:SmokeZone( SMOKECOLOR.White ) self.rangezone:SmokeZone( SMOKECOLOR.White )
end end
self:__Status( -60 ) self:__Status( -10 )
end end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions -- User Functions
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set the root F10 menu under which the range F10 menu is created.
-- @param #RANGE self
-- @param Core.Menu#MENU_MISSION menu The root F10 menu.
-- @return #RANGE self
function RANGE:SetMenuRoot(menu)
self.menuF10root=menu
return self
end
--- Set maximal strafing altitude. Player entering a strafe pit above that altitude are not registered for a valid pass. --- Set maximal strafing altitude. Player entering a strafe pit above that altitude are not registered for a valid pass.
-- @param #RANGE self -- @param #RANGE self
-- @param #number maxalt Maximum altitude in meters AGL. Default is 914 m = 3000 ft. -- @param #number maxalt Maximum altitude in meters AGL. Default is 914 m = 3000 ft.
@@ -1066,6 +1078,9 @@ end
-- @param Core.Zone#ZONE zone MOOSE zone defining the range perimeters. -- @param Core.Zone#ZONE zone MOOSE zone defining the range perimeters.
-- @return #RANGE self -- @return #RANGE self
function RANGE:SetRangeZone( zone ) function RANGE:SetRangeZone( zone )
if zone and type(zone)=="string" then
zone=ZONE:FindByName(zone)
end
self.rangezone = zone self.rangezone = zone
return self return self
end end
@@ -1207,25 +1222,29 @@ end
-- @return #RANGE self -- @return #RANGE self
function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume, PathToGoogleKey) function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume, PathToGoogleKey)
if PathToSRS then if PathToSRS or MSRS.path then
self.useSRS=true self.useSRS=true
self.controlmsrs=MSRS:New(PathToSRS, Frequency or 256, Modulation or radio.modulation.AM, Volume or 1.0) self.controlmsrs=MSRS:New(PathToSRS or MSRS.path, Frequency or 256, Modulation or radio.modulation.AM)
self.controlmsrs:SetPort(Port) self.controlmsrs:SetPort(Port or MSRS.port)
self.controlmsrs:SetCoalition(Coalition or coalition.side.BLUE) self.controlmsrs:SetCoalition(Coalition or coalition.side.BLUE)
self.controlmsrs:SetLabel("RANGEC") self.controlmsrs:SetLabel("RANGEC")
self.controlmsrs:SetVolume(Volume or 1.0)
self.controlsrsQ = MSRSQUEUE:New("CONTROL") self.controlsrsQ = MSRSQUEUE:New("CONTROL")
self.instructmsrs=MSRS:New(PathToSRS, Frequency or 305, Modulation or radio.modulation.AM, Volume or 1.0) self.instructmsrs=MSRS:New(PathToSRS or MSRS.path, Frequency or 305, Modulation or radio.modulation.AM)
self.instructmsrs:SetPort(Port) self.instructmsrs:SetPort(Port or MSRS.port)
self.instructmsrs:SetCoalition(Coalition or coalition.side.BLUE) self.instructmsrs:SetCoalition(Coalition or coalition.side.BLUE)
self.instructmsrs:SetLabel("RANGEI") self.instructmsrs:SetLabel("RANGEI")
self.instructmsrs:SetVolume(Volume or 1.0)
self.instructsrsQ = MSRSQUEUE:New("INSTRUCT") self.instructsrsQ = MSRSQUEUE:New("INSTRUCT")
if PathToGoogleKey then if PathToGoogleKey then
self.controlmsrs:SetGoogle(PathToGoogleKey) self.controlmsrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.instructmsrs:SetGoogle(PathToGoogleKey) self.controlmsrs:SetProvider(MSRS.Provider.GOOGLE)
self.instructmsrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.instructmsrs:SetProvider(MSRS.Provider.GOOGLE)
end end
else else
@@ -1321,10 +1340,57 @@ end
-- @return #RANGE self -- @return #RANGE self
function RANGE:SetSoundfilesPath( path ) function RANGE:SetSoundfilesPath( path )
self.soundpath = tostring( path or "Range Soundfiles/" ) self.soundpath = tostring( path or "Range Soundfiles/" )
self:I( self.lid .. string.format( "Setting sound files path to %s", self.soundpath ) ) self:T2( self.lid .. string.format( "Setting sound files path to %s", self.soundpath ) )
return self return self
end end
--- Set the path to the csv file that contains information about the used sound files.
-- The parameter file has to be located on your local disk (**not** inside the miz file).
-- @param #RANGE self
-- @param #string csvfile Full path to the csv file on your local disk.
-- @return #RANGE self
function RANGE:SetSoundfilesInfo( csvfile )
--- Local function to return the ATIS.Soundfile for a given file name
local function getSound(filename)
for key,_soundfile in pairs(self.Sound) do
local soundfile=_soundfile --#RANGE.Soundfile
if filename==soundfile.filename then
return soundfile
end
end
return nil
end
-- Read csv file
local data=UTILS.ReadCSV(csvfile)
if data then
for i,sound in pairs(data) do
-- Get the ATIS.Soundfile
local soundfile=getSound(sound.filename..".ogg") --#RANGE.Soundfile
if soundfile then
-- Set duration
soundfile.duration=tonumber(sound.duration)
else
self:E(string.format("ERROR: Could not get info for sound file %s", sound.filename))
end
end
else
self:E(string.format("ERROR: Could not read sound csv file!"))
end
return self
end
--- Add new strafe pit. For a strafe pit, hits from guns are counted. One pit can consist of several units. --- Add new strafe pit. For a strafe pit, hits from guns are counted. One pit can consist of several units.
-- A strafe run approach is only valid if the player enters via a zone in front of the pit, which is defined by boxlength, boxwidth, and heading. -- A strafe run approach is only valid if the player enters via a zone in front of the pit, which is defined by boxlength, boxwidth, and heading.
-- Furthermore, the player must not be too high and fly in the direction of the pit to make a valid target apporoach. -- Furthermore, the player must not be too high and fly in the direction of the pit to make a valid target apporoach.
@@ -1570,9 +1636,9 @@ function RANGE:AddBombingTargetUnit( unit, goodhitrange, randommove )
-- Debug or error output. -- Debug or error output.
if _isstatic == true then if _isstatic == true then
self:I( self.lid .. string.format( "Adding STATIC bombing target %s with good hit range %d. Random move = %s.", name, goodhitrange, tostring( randommove ) ) ) self:T( self.lid .. string.format( "Adding STATIC bombing target %s with good hit range %d. Random move = %s.", name, goodhitrange, tostring( randommove ) ) )
elseif _isstatic == false then elseif _isstatic == false then
self:I( self.lid .. string.format( "Adding UNIT bombing target %s with good hit range %d. Random move = %s.", name, goodhitrange, tostring( randommove ) ) ) self:T( self.lid .. string.format( "Adding UNIT bombing target %s with good hit range %d. Random move = %s.", name, goodhitrange, tostring( randommove ) ) )
else else
self:E( self.lid .. string.format( "ERROR! No bombing target with name %s could be found. Carefully check all UNIT and STATIC names defined in the mission editor!", name ) ) self:E( self.lid .. string.format( "ERROR! No bombing target with name %s could be found. Carefully check all UNIT and STATIC names defined in the mission editor!", name ) )
end end
@@ -1640,7 +1706,7 @@ function RANGE:AddBombingTargetScenery( scenery, goodhitrange)
-- Debug or error output. -- Debug or error output.
if name then if name then
self:I( self.lid .. string.format( "Adding SCENERY bombing target %s with good hit range %d", name, goodhitrange) ) self:T( self.lid .. string.format( "Adding SCENERY bombing target %s with good hit range %d", name, goodhitrange) )
else else
self:E( self.lid .. string.format( "ERROR! No bombing target with name %s could be found!", name ) ) self:E( self.lid .. string.format( "ERROR! No bombing target with name %s could be found!", name ) )
end end
@@ -1663,13 +1729,17 @@ end
--- Add all units of a group as bombing targets. --- Add all units of a group as bombing targets.
-- @param #RANGE self -- @param #RANGE self
-- @param Wrapper.Group#GROUP group Group of bombing targets. -- @param Wrapper.Group#GROUP group Group of bombing targets. Can also be given as group name.
-- @param #number goodhitrange Max distance from unit which is considered as a good hit. -- @param #number goodhitrange Max distance from unit which is considered as a good hit.
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false. -- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
-- @return #RANGE self -- @return #RANGE self
function RANGE:AddBombingTargetGroup( group, goodhitrange, randommove ) function RANGE:AddBombingTargetGroup( group, goodhitrange, randommove )
self:F( { group = group, goodhitrange = goodhitrange, randommove = randommove } ) self:F( { group = group, goodhitrange = goodhitrange, randommove = randommove } )
if group and type(group)=="string" then
group=GROUP:FindByName(group)
end
if group then if group then
local _units = group:GetUnits() local _units = group:GetUnits()
@@ -1738,8 +1808,10 @@ end
function RANGE:OnEventBirth( EventData ) function RANGE:OnEventBirth( EventData )
self:F( { eventbirth = EventData } ) self:F( { eventbirth = EventData } )
if not EventData.IniPlayerName then return end
local _unitName = EventData.IniUnitName local _unitName = EventData.IniUnitName
local _unit, _playername = self:_GetPlayerUnitAndName( _unitName ) local _unit, _playername = self:_GetPlayerUnitAndName( _unitName, EventData.IniPlayerName )
self:T3( self.lid .. "BIRTH: unit = " .. tostring( EventData.IniUnitName ) ) self:T3( self.lid .. "BIRTH: unit = " .. tostring( EventData.IniUnitName ) )
self:T3( self.lid .. "BIRTH: group = " .. tostring( EventData.IniGroupName ) ) self:T3( self.lid .. "BIRTH: group = " .. tostring( EventData.IniGroupName ) )
@@ -1896,6 +1968,8 @@ end
-- @param #number attackVel Attack velocity. -- @param #number attackVel Attack velocity.
function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackVel) function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackVel)
if not playerData then return end
-- Get closet target to last position. -- Get closet target to last position.
local _closetTarget = nil -- #RANGE.BombTarget local _closetTarget = nil -- #RANGE.BombTarget
local _distance = nil local _distance = nil
@@ -1912,13 +1986,13 @@ function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackV
-- Coordinate of impact point. -- Coordinate of impact point.
local impactcoord = weapon:GetImpactCoordinate() local impactcoord = weapon:GetImpactCoordinate()
-- Check if impact happened in range zone. -- Check if impact happened in range zone.+
local insidezone = self.rangezone:IsCoordinateInZone( impactcoord ) local insidezone = self.rangezone:IsCoordinateInZone( impactcoord )
-- Smoke impact point of bomb. -- Smoke impact point of bomb.
if playerData.smokebombimpact and insidezone then if playerData and playerData.smokebombimpact and insidezone then
if playerData.delaysmoke then if playerData and playerData.delaysmoke then
timer.scheduleFunction( self._DelayedSmoke, { coord = impactcoord, color = playerData.smokecolor }, timer.getTime() + self.TdelaySmoke ) timer.scheduleFunction( self._DelayedSmoke, { coord = impactcoord, color = playerData.smokecolor }, timer.getTime() + self.TdelaySmoke )
else else
impactcoord:Smoke( playerData.smokecolor ) impactcoord:Smoke( playerData.smokecolor )
@@ -2012,7 +2086,7 @@ function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackV
if self.useSRS then if self.useSRS then
self.controlsrsQ:NewTransmission(_message,nil,self.controlmsrs,nil,1) self.controlsrsQ:NewTransmission(_message,nil,self.controlmsrs,nil,1)
else else
self.rangecontrol:NewTransmission( RANGE.Sound.RCWeaponImpactedTooFar.filename, RANGE.Sound.RCWeaponImpactedTooFar.duration, self.soundpath, nil, nil, _message, self.subduration ) self.rangecontrol:NewTransmission( self.Sound.RCWeaponImpactedTooFar.filename, self.Sound.RCWeaponImpactedTooFar.duration, self.soundpath, nil, nil, _message, self.subduration )
end end
end end
@@ -2043,7 +2117,7 @@ function RANGE:OnEventShot( EventData )
local _unitName = EventData.IniUnitName local _unitName = EventData.IniUnitName
-- Get player unit and name. -- Get player unit and name.
local _unit, _playername = self:_GetPlayerUnitAndName( _unitName ) local _unit, _playername = self:_GetPlayerUnitAndName( _unitName, EventData.IniPlayerName )
-- Distance Player-to-Range. Set this to larger value than the threshold. -- Distance Player-to-Range. Set this to larger value than the threshold.
local dPR = self.BombtrackThreshold * 2 local dPR = self.BombtrackThreshold * 2
@@ -2055,11 +2129,13 @@ function RANGE:OnEventShot( EventData )
end end
-- Only track if distance player to range is < 25 km. Also check that a player shot. No need to track AI weapons. -- Only track if distance player to range is < 25 km. Also check that a player shot. No need to track AI weapons.
if _track and dPR <= self.BombtrackThreshold and _unit and _playername then if _track and dPR <= self.BombtrackThreshold and _unit and _playername and self.PlayerSettings[_playername] then
-- Player data. -- Player data.
local playerData = self.PlayerSettings[_playername] -- #RANGE.PlayerData local playerData = self.PlayerSettings[_playername] -- #RANGE.PlayerData
if not playerData then return end
-- Attack parameters. -- Attack parameters.
local attackHdg=_unit:GetHeading() local attackHdg=_unit:GetHeading()
local attackAlt=_unit:GetHeight() local attackAlt=_unit:GetHeight()
@@ -2120,7 +2196,7 @@ function RANGE:onafterStatus( From, Event, To )
end end
-- Check range status. -- Check range status.
self:I( self.lid .. text ) self:T( self.lid .. text )
end end
@@ -2159,15 +2235,15 @@ function RANGE:onafterEnterRange( From, Event, To, player )
-- Radio message that player entered the range -- Radio message that player entered the range
-- You entered the bombing range. For hit assessment, contact the range controller at xy MHz -- You entered the bombing range. For hit assessment, contact the range controller at xy MHz
self.instructor:NewTransmission( RANGE.Sound.IREnterRange.filename, RANGE.Sound.IREnterRange.duration, self.soundpath ) self.instructor:NewTransmission( self.Sound.IREnterRange.filename, self.Sound.IREnterRange.duration, self.soundpath )
self.instructor:Number2Transmission( RF[1] ) self.instructor:Number2Transmission( RF[1] )
if tonumber( RF[2] ) > 0 then if tonumber( RF[2] ) > 0 then
self.instructor:NewTransmission( RANGE.Sound.IRDecimal.filename, RANGE.Sound.IRDecimal.duration, self.soundpath ) self.instructor:NewTransmission( self.Sound.IRDecimal.filename, self.Sound.IRDecimal.duration, self.soundpath )
self.instructor:Number2Transmission( RF[2] ) self.instructor:Number2Transmission( RF[2] )
end end
self.instructor:NewTransmission( RANGE.Sound.IRMegaHertz.filename, RANGE.Sound.IRMegaHertz.duration, self.soundpath ) self.instructor:NewTransmission( self.Sound.IRMegaHertz.filename, self.Sound.IRMegaHertz.duration, self.soundpath )
end end
end end
@@ -2187,7 +2263,7 @@ function RANGE:onafterExitRange( From, Event, To, player )
local text = "You left the bombing range zone. " local text = "You left the bombing range zone. "
local r=math.random(2) local r=math.random(5)
if r==1 then if r==1 then
text=text.."Have a nice day!" text=text.."Have a nice day!"
@@ -2203,7 +2279,7 @@ function RANGE:onafterExitRange( From, Event, To, player )
self.instructsrsQ:NewTransmission(text, nil, self.instructmsrs, nil, 1, {player.client:GetGroup()}, text, 10) self.instructsrsQ:NewTransmission(text, nil, self.instructmsrs, nil, 1, {player.client:GetGroup()}, text, 10)
else else
self.instructor:NewTransmission( RANGE.Sound.IRExitRange.filename, RANGE.Sound.IRExitRange.duration, self.soundpath ) self.instructor:NewTransmission( self.Sound.IRExitRange.filename, self.Sound.IRExitRange.duration, self.soundpath )
end end
end end
@@ -2239,20 +2315,20 @@ function RANGE:onafterImpact( From, Event, To, result, player )
local group = player.client:GetGroup() local group = player.client:GetGroup()
self.controlsrsQ:NewTransmission(text,nil,self.controlmsrs,nil,1,{group},text,10) self.controlsrsQ:NewTransmission(text,nil,self.controlmsrs,nil,1,{group},text,10)
else else
self.rangecontrol:NewTransmission( RANGE.Sound.RCImpact.filename, RANGE.Sound.RCImpact.duration, self.soundpath, nil, nil, text, self.subduration ) self.rangecontrol:NewTransmission( self.Sound.RCImpact.filename, self.Sound.RCImpact.duration, self.soundpath, nil, nil, text, self.subduration )
self.rangecontrol:Number2Transmission( string.format( "%03d", result.radial ), nil, 0.1 ) self.rangecontrol:Number2Transmission( string.format( "%03d", result.radial ), nil, 0.1 )
self.rangecontrol:NewTransmission( RANGE.Sound.RCDegrees.filename, RANGE.Sound.RCDegrees.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCDegrees.filename, self.Sound.RCDegrees.duration, self.soundpath )
self.rangecontrol:NewTransmission( RANGE.Sound.RCFor.filename, RANGE.Sound.RCFor.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCFor.filename, self.Sound.RCFor.duration, self.soundpath )
self.rangecontrol:Number2Transmission( string.format( "%d", UTILS.MetersToFeet( result.distance ) ) ) self.rangecontrol:Number2Transmission( string.format( "%d", UTILS.MetersToFeet( result.distance ) ) )
self.rangecontrol:NewTransmission( RANGE.Sound.RCFeet.filename, RANGE.Sound.RCFeet.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCFeet.filename, self.Sound.RCFeet.duration, self.soundpath )
if result.quality == "POOR" then if result.quality == "POOR" then
self.rangecontrol:NewTransmission( RANGE.Sound.RCPoorHit.filename, RANGE.Sound.RCPoorHit.duration, self.soundpath, nil, 0.5 ) self.rangecontrol:NewTransmission( self.Sound.RCPoorHit.filename, self.Sound.RCPoorHit.duration, self.soundpath, nil, 0.5 )
elseif result.quality == "INEFFECTIVE" then elseif result.quality == "INEFFECTIVE" then
self.rangecontrol:NewTransmission( RANGE.Sound.RCIneffectiveHit.filename, RANGE.Sound.RCIneffectiveHit.duration, self.soundpath, nil, 0.5 ) self.rangecontrol:NewTransmission( self.Sound.RCIneffectiveHit.filename, self.Sound.RCIneffectiveHit.duration, self.soundpath, nil, 0.5 )
elseif result.quality == "GOOD" then elseif result.quality == "GOOD" then
self.rangecontrol:NewTransmission( RANGE.Sound.RCGoodHit.filename, RANGE.Sound.RCGoodHit.duration, self.soundpath, nil, 0.5 ) self.rangecontrol:NewTransmission( self.Sound.RCGoodHit.filename, self.Sound.RCGoodHit.duration, self.soundpath, nil, 0.5 )
elseif result.quality == "EXCELLENT" then elseif result.quality == "EXCELLENT" then
self.rangecontrol:NewTransmission( RANGE.Sound.RCExcellentHit.filename, RANGE.Sound.RCExcellentHit.duration, self.soundpath, nil, 0.5 ) self.rangecontrol:NewTransmission( self.Sound.RCExcellentHit.filename, self.Sound.RCExcellentHit.duration, self.soundpath, nil, 0.5 )
end end
end end
end end
@@ -2321,14 +2397,14 @@ function RANGE:onafterSave( From, Event, To )
if f then if f then
f:write( data ) f:write( data )
f:close() f:close()
self:I( self.lid .. string.format( "Saving player results to file %s", tostring( filename ) ) ) self:T( self.lid .. string.format( "Saving player results to file %s", tostring( filename ) ) )
else else
self:E( self.lid .. string.format( "ERROR: Could not save results to file %s", tostring( filename ) ) ) self:E( self.lid .. string.format( "ERROR: Could not save results to file %s", tostring( filename ) ) )
end end
end end
-- Path. -- Path.
local path = lfs.writedir() .. [[Logs\]] local path = self.targetpath or lfs.writedir() .. [[Logs\]]
-- Set file name. -- Set file name.
local filename = path .. string.format( "RANGE-%s_BombingResults.csv", self.rangename ) local filename = path .. string.format( "RANGE-%s_BombingResults.csv", self.rangename )
@@ -2393,14 +2469,14 @@ function RANGE:onafterLoad( From, Event, To )
end end
-- Path in DCS log file. -- Path in DCS log file.
local path = lfs.writedir() .. [[Logs\]] local path = self.targetpath or lfs.writedir() .. [[Logs\]]
-- Set file name. -- Set file name.
local filename = path .. string.format( "RANGE-%s_BombingResults.csv", self.rangename ) local filename = path .. string.format( "RANGE-%s_BombingResults.csv", self.rangename )
-- Info message. -- Info message.
local text = string.format( "Loading player bomb results from file %s", filename ) local text = string.format( "Loading player bomb results from file %s", filename )
self:I( self.lid .. text ) self:T( self.lid .. text )
-- Load asset data from file. -- Load asset data from file.
local data = _loadfile( filename ) local data = _loadfile( filename )
@@ -2773,7 +2849,7 @@ function RANGE:_DisplayRangeInfo( _unitname )
-- Check if we have a player. -- Check if we have a player.
if unit and playername then if unit and playername then
self:I(playername) --self:I(playername)
-- Message text. -- Message text.
local text = "" local text = ""
@@ -3148,7 +3224,7 @@ function RANGE:_CheckInZone( _unitName )
self.controlsrsQ:NewTransmission(text,nil,self.controlmsrs,nil,1) self.controlsrsQ:NewTransmission(text,nil,self.controlmsrs,nil,1)
else else
-- You left the strafing zone too quickly! No score! -- You left the strafing zone too quickly! No score!
self.rangecontrol:NewTransmission( RANGE.Sound.RCLeftStrafePitTooQuickly.filename, RANGE.Sound.RCLeftStrafePitTooQuickly.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCLeftStrafePitTooQuickly.filename, self.Sound.RCLeftStrafePitTooQuickly.duration, self.soundpath )
end end
end end
else else
@@ -3175,23 +3251,23 @@ function RANGE:_CheckInZone( _unitName )
local resulttext="" local resulttext=""
if _result.pastfoulline == true then -- if _result.pastfoulline == true then --
resulttext = "* INVALID - PASSED FOUL LINE *" resulttext = "* INVALID - PASSED FOUL LINE *"
_sound = RANGE.Sound.RCPoorPass -- _sound = self.Sound.RCPoorPass --
else else
if accur >= 90 then if accur >= 90 then
resulttext = "DEADEYE PASS" resulttext = "DEADEYE PASS"
_sound = RANGE.Sound.RCExcellentPass _sound = self.Sound.RCExcellentPass
elseif accur >= 75 then elseif accur >= 75 then
resulttext = "EXCELLENT PASS" resulttext = "EXCELLENT PASS"
_sound = RANGE.Sound.RCExcellentPass _sound = self.Sound.RCExcellentPass
elseif accur >= 50 then elseif accur >= 50 then
resulttext = "GOOD PASS" resulttext = "GOOD PASS"
_sound = RANGE.Sound.RCGoodPass _sound = self.Sound.RCGoodPass
elseif accur >= 25 then elseif accur >= 25 then
resulttext = "INEFFECTIVE PASS" resulttext = "INEFFECTIVE PASS"
_sound = RANGE.Sound.RCIneffectivePass _sound = self.Sound.RCIneffectivePass
else else
resulttext = "POOR PASS" resulttext = "POOR PASS"
_sound = RANGE.Sound.RCPoorPass _sound = self.Sound.RCPoorPass
end end
end end
@@ -3238,14 +3314,14 @@ function RANGE:_CheckInZone( _unitName )
if self.useSRS then if self.useSRS then
self.controlsrsQ:NewTransmission(ttstext,nil,self.controlmsrs,nil,1) self.controlsrsQ:NewTransmission(ttstext,nil,self.controlmsrs,nil,1)
else else
self.rangecontrol:NewTransmission( RANGE.Sound.RCHitsOnTarget.filename, RANGE.Sound.RCHitsOnTarget.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCHitsOnTarget.filename, self.Sound.RCHitsOnTarget.duration, self.soundpath )
self.rangecontrol:Number2Transmission( string.format( "%d", _result.hits ) ) self.rangecontrol:Number2Transmission( string.format( "%d", _result.hits ) )
if shots and accur then if shots and accur then
self.rangecontrol:NewTransmission( RANGE.Sound.RCTotalRoundsFired.filename, RANGE.Sound.RCTotalRoundsFired.duration, self.soundpath, nil, 0.2 ) self.rangecontrol:NewTransmission( self.Sound.RCTotalRoundsFired.filename, self.Sound.RCTotalRoundsFired.duration, self.soundpath, nil, 0.2 )
self.rangecontrol:Number2Transmission( string.format( "%d", shots ), nil, 0.2 ) self.rangecontrol:Number2Transmission( string.format( "%d", shots ), nil, 0.2 )
self.rangecontrol:NewTransmission( RANGE.Sound.RCAccuracy.filename, RANGE.Sound.RCAccuracy.duration, self.soundpath, nil, 0.2 ) self.rangecontrol:NewTransmission( self.Sound.RCAccuracy.filename, self.Sound.RCAccuracy.duration, self.soundpath, nil, 0.2 )
self.rangecontrol:Number2Transmission( string.format( "%d", UTILS.Round( accur, 0 ) ) ) self.rangecontrol:Number2Transmission( string.format( "%d", UTILS.Round( accur, 0 ) ) )
self.rangecontrol:NewTransmission( RANGE.Sound.RCPercent.filename, RANGE.Sound.RCPercent.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCPercent.filename, self.Sound.RCPercent.duration, self.soundpath )
end end
self.rangecontrol:NewTransmission( _sound.filename, _sound.duration, self.soundpath, nil, 0.5 ) self.rangecontrol:NewTransmission( _sound.filename, _sound.duration, self.soundpath, nil, 0.5 )
end end
@@ -3290,7 +3366,7 @@ function RANGE:_CheckInZone( _unitName )
if self.useSRS then if self.useSRS then
self.controlsrsQ:NewTransmission(_msg,nil,self.controlmsrs,nil,1) self.controlsrsQ:NewTransmission(_msg,nil,self.controlmsrs,nil,1)
else else
self.rangecontrol:NewTransmission( RANGE.Sound.RCRollingInOnStrafeTarget.filename, RANGE.Sound.RCRollingInOnStrafeTarget.duration, self.soundpath ) self.rangecontrol:NewTransmission( self.Sound.RCRollingInOnStrafeTarget.filename, self.Sound.RCRollingInOnStrafeTarget.duration, self.soundpath )
end end
end end
@@ -3339,16 +3415,23 @@ function RANGE:_AddF10Commands( _unitName )
self.MenuAddedTo[_gid] = true self.MenuAddedTo[_gid] = true
-- Range root menu path. -- Range root menu path.
local _rangePath = nil local _rootMenu = nil
if RANGE.MenuF10Root then if self.menuF10root then
------------------- -------------------
-- MISSION LEVEL -- -- MISSION LEVEL --
------------------- -------------------
-- _rangePath = missionCommands.addSubMenuForGroup(_gid, self.rangename, RANGE.MenuF10Root) --_rootMenu = MENU_GROUP:New( group, self.rangename, self.menuF10root )
_rangePath = MENU_GROUP:New( group, "On the Range" ) _rootMenu = self.menuF10root
self:T2(self.lid..string.format("Creating F10 menu for group %s", group:GetName()))
elseif RANGE.MenuF10Root then
-- Main F10 menu: F10/<RANGE.MenuF10Root>/<Range Name>
--_rootMenu = MENU_GROUP:New( group, self.rangename, RANGE.MenuF10Root )
_rootMenu = RANGE.MenuF10Root
else else
@@ -3358,13 +3441,18 @@ function RANGE:_AddF10Commands( _unitName )
-- Main F10 menu: F10/On the Range/<Range Name>/ -- Main F10 menu: F10/On the Range/<Range Name>/
if RANGE.MenuF10[_gid] == nil then if RANGE.MenuF10[_gid] == nil then
-- RANGE.MenuF10[_gid]=missionCommands.addSubMenuForGroup(_gid, "On the Range") self:T2(self.lid..string.format("Creating F10 menu 'On the Range' for group %s", group:GetName()))
RANGE.MenuF10[_gid] = MENU_GROUP:New( group, "On the Range" ) else
self:T2(self.lid..string.format("F10 menu 'On the Range' already EXISTS for group %s", group:GetName()))
end end
-- _rangePath = missionCommands.addSubMenuForGroup(_gid, self.rangename, RANGE.MenuF10[_gid])
_rangePath = MENU_GROUP:New( group, self.rangename, RANGE.MenuF10[_gid] ) _rootMenu=RANGE.MenuF10[_gid] or MENU_GROUP:New( group, "On the Range" )
end end
-- Range menu
local _rangePath = MENU_GROUP:New( group, self.rangename, _rootMenu )
local _statsPath = MENU_GROUP:New( group, "Statistics", _rangePath ) local _statsPath = MENU_GROUP:New( group, "Statistics", _rangePath )
local _markPath = MENU_GROUP:New( group, "Mark Targets", _rangePath ) local _markPath = MENU_GROUP:New( group, "Mark Targets", _rangePath )
local _settingsPath = MENU_GROUP:New( group, "My Settings", _rangePath ) local _settingsPath = MENU_GROUP:New( group, "My Settings", _rangePath )
@@ -3772,13 +3860,13 @@ function RANGE:_TargetsheetOnOff( _unitname )
-- Inform player. -- Inform player.
if playerData and playerData.targeton == true then if playerData and playerData.targeton == true then
text = string.format( "roger, your targetsheets are now SAVED." ) text = string.format( "Roger, your targetsheets are now SAVED." )
else else
text = string.format( "affirm, your targetsheets are NOT SAVED." ) text = string.format( "Affirm, your targetsheets are NOT SAVED." )
end end
else else
text = "negative, target sheet data recorder is broken on this range." text = "Negative, target sheet data recorder is broken on this range."
end end
-- Message to player. -- Message to player.
@@ -4015,8 +4103,8 @@ end
-- @return Wrapper.Unit#UNIT Unit of player. -- @return Wrapper.Unit#UNIT Unit of player.
-- @return #string Name of the player. -- @return #string Name of the player.
-- @return #boolean If true, group has > 1 player in it -- @return #boolean If true, group has > 1 player in it
function RANGE:_GetPlayerUnitAndName( _unitName ) function RANGE:_GetPlayerUnitAndName( _unitName, PlayerName )
self:F2( _unitName ) --self:I( _unitName )
if _unitName ~= nil then if _unitName ~= nil then
@@ -4025,9 +4113,9 @@ function RANGE:_GetPlayerUnitAndName( _unitName )
-- Get DCS unit from its name. -- Get DCS unit from its name.
local DCSunit = Unit.getByName( _unitName ) local DCSunit = Unit.getByName( _unitName )
if DCSunit then if DCSunit and DCSunit.getPlayerName then
local playername = DCSunit:getPlayerName() local playername = DCSunit:getPlayerName() or PlayerName or "None"
local unit = UNIT:Find( DCSunit ) local unit = UNIT:Find( DCSunit )
self:T2( { DCSunit = DCSunit, unit = unit, playername = playername } ) self:T2( { DCSunit = DCSunit, unit = unit, playername = playername } )

View File

@@ -19,7 +19,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [SCO - Scoring](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCO%20-%20Scoring) -- [SCO - Scoring](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Scoring)
-- --
-- === -- ===
-- --
@@ -79,6 +79,7 @@
-- --
-- ### Contributions: -- ### Contributions:
-- --
-- * **Applevangelist**: Additional functionality, fixes.
-- * **Wingthor (TAW)**: Testing & Advice. -- * **Wingthor (TAW)**: Testing & Advice.
-- * **Dutch-Baron (TAW)**: Testing & Advice. -- * **Dutch-Baron (TAW)**: Testing & Advice.
-- * **Whisper**: Testing and Advice. -- * **Whisper**: Testing and Advice.
@@ -116,11 +117,13 @@
-- Special targets can be set that will give extra scores to the players when these are destroyed. -- Special targets can be set that will give extra scores to the players when these are destroyed.
-- Use the methods @{#SCORING.AddUnitScore}() and @{#SCORING.RemoveUnitScore}() to specify a special additional score for a specific @{Wrapper.Unit}s. -- Use the methods @{#SCORING.AddUnitScore}() and @{#SCORING.RemoveUnitScore}() to specify a special additional score for a specific @{Wrapper.Unit}s.
-- Use the methods @{#SCORING.AddStaticScore}() and @{#SCORING.RemoveStaticScore}() to specify a special additional score for a specific @{Wrapper.Static}s. -- Use the methods @{#SCORING.AddStaticScore}() and @{#SCORING.RemoveStaticScore}() to specify a special additional score for a specific @{Wrapper.Static}s.
-- Use the method @{#SCORING.SetGroupGroup}() to specify a special additional score for a specific @{Wrapper.Group}s. -- Use the method @{#SCORING.AddScoreSetGroup}() to specify a special additional score for a specific @{Wrapper.Group}s gathered in a @{Core.Set#SET_GROUP}.
-- --
-- local Scoring = SCORING:New( "Scoring File" ) -- local Scoring = SCORING:New( "Scoring File" )
-- Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 ) -- Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
-- Scoring:AddStaticScore( STATIC:FindByName( "Static #1" ), 100 ) -- Scoring:AddStaticScore( STATIC:FindByName( "Static #1" ), 100 )
-- local GroupSet = SET_GROUP:New():FilterPrefixes("RAT"):FilterStart()
-- Scoring:AddScoreSetGroup( GroupSet, 100)
-- --
-- The above grants an additional score of 200 points for Unit #001 and an additional 100 points of Static #1 if these are destroyed. -- The above grants an additional score of 200 points for Unit #001 and an additional 100 points of Static #1 if these are destroyed.
-- Note that later in the mission, one can remove these scores set, for example, when the a goal achievement time limit is over. -- Note that later in the mission, one can remove these scores set, for example, when the a goal achievement time limit is over.
@@ -226,7 +229,7 @@ SCORING = {
ClassID = 0, ClassID = 0,
Players = {}, Players = {},
AutoSave = true, AutoSave = true,
version = "1.17.1" version = "1.18.4"
} }
local _SCORINGCoalition = { local _SCORINGCoalition = {
@@ -245,13 +248,15 @@ local _SCORINGCategory = {
--- Creates a new SCORING object to administer the scoring achieved by players. --- Creates a new SCORING object to administer the scoring achieved by players.
-- @param #SCORING self -- @param #SCORING self
-- @param #string GameName The name of the game. This name is also logged in the CSV score file. -- @param #string GameName The name of the game. This name is also logged in the CSV score file.
-- @param #string SavePath (Optional) Path where to save the CSV file, defaults to your **<User>\\Saved Games\\DCS\\Logs** folder.
-- @param #boolean AutoSave (Optional) If passed as `false`, then swith autosave off.
-- @return #SCORING self -- @return #SCORING self
-- @usage -- @usage
-- --
-- -- Define a new scoring object for the mission Gori Valley. -- -- Define a new scoring object for the mission Gori Valley.
-- ScoringObject = SCORING:New( "Gori Valley" ) -- ScoringObject = SCORING:New( "Gori Valley" )
-- --
function SCORING:New( GameName ) function SCORING:New( GameName, SavePath, AutoSave )
-- Inherits from BASE -- Inherits from BASE
local self = BASE:Inherit( self, BASE:New() ) -- #SCORING local self = BASE:Inherit( self, BASE:New() ) -- #SCORING
@@ -276,9 +281,15 @@ function SCORING:New( GameName )
self:SetMessagesZone( true ) self:SetMessagesZone( true )
-- Scales -- Scales
self:SetScaleDestroyScore( 10 ) self:SetScaleDestroyScore( 10 )
self:SetScaleDestroyPenalty( 30 ) self:SetScaleDestroyPenalty( 30 )
-- Hitting a target multiple times before destoying it should not result in a higger score
-- Multiple hits is typically a results of bombs/missles missing their target but still inflict some spash damage
-- Making this configurable to anyone can enable this anyway if they want
self:SetScoreIncrementOnHit(0)
-- Default fratricide penalty level (maximum penalty that can be assigned to a player before he gets kicked). -- Default fratricide penalty level (maximum penalty that can be assigned to a player before he gets kicked).
self:SetFratricide( self.ScaleDestroyPenalty * 3 ) self:SetFratricide( self.ScaleDestroyPenalty * 3 )
self.penaltyonfratricide = true self.penaltyonfratricide = true
@@ -308,7 +319,8 @@ function SCORING:New( GameName )
end ) end )
-- Create the CSV file. -- Create the CSV file.
self.AutoSave = true self.AutoSavePath = SavePath
self.AutoSave = AutoSave or true
self:OpenCSV( GameName ) self:OpenCSV( GameName )
return self return self
@@ -422,6 +434,31 @@ function SCORING:AddScoreGroup( ScoreGroup, Score )
return self return self
end end
--- Specify a special additional score for a @{Core.Set#SET_GROUP}.
-- @param #SCORING self
-- @param Core.Set#SET_GROUP Set The @{Core.Set#SET_GROUP} for which each @{Wrapper.Unit} in each Group a Score is given.
-- @param #number Score The Score value.
-- @return #SCORING
function SCORING:AddScoreSetGroup(Set, Score)
local set = Set:GetSetObjects()
for _,_group in pairs (set) do
if _group and _group:IsAlive() then
self:AddScoreGroup(_group,Score)
end
end
local function AddScore(group)
self:AddScoreGroup(group,Score)
end
function Set:OnAfterAdded(From,Event,To,ObjectName,Object)
AddScore(Object)
end
return self
end
--- Add a @{Core.Zone} to define additional scoring when any object is destroyed in that zone. --- Add a @{Core.Zone} to define additional scoring when any object is destroyed in that zone.
-- Note that if a @{Core.Zone} with the same name is already within the scoring added, the @{Core.Zone} (type) and Score will be replaced! -- Note that if a @{Core.Zone} with the same name is already within the scoring added, the @{Core.Zone} (type) and Score will be replaced!
-- This allows for a dynamic destruction zone evolution within your mission. -- This allows for a dynamic destruction zone evolution within your mission.
@@ -467,6 +504,16 @@ function SCORING:SetMessagesHit( OnOff )
return self return self
end end
--- Configure to increment score after a target has been hit.
-- @param #SCORING self
-- @param #number score amount of point to inclement score on each hit
-- @return #SCORING
function SCORING:SetScoreIncrementOnHit( score )
self.ScoreIncrementOnHit = score
return self
end
--- If to send messages after a target has been hit. --- If to send messages after a target has been hit.
-- @param #SCORING self -- @param #SCORING self
-- @return #boolean -- @return #boolean
@@ -885,6 +932,7 @@ function SCORING:OnEventBirth( Event )
Event.IniUnit.BirthTime = timer.getTime() Event.IniUnit.BirthTime = timer.getTime()
if PlayerName then if PlayerName then
self:_AddPlayerFromUnit( Event.IniUnit ) self:_AddPlayerFromUnit( Event.IniUnit )
self.Players[PlayerName].PlayerKills = 0
self:SetScoringMenu( Event.IniGroup ) self:SetScoringMenu( Event.IniGroup )
end end
end end
@@ -1013,11 +1061,11 @@ function SCORING:_EventOnHit( Event )
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0
PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0 PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0
PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT
-- After an instant kill we can't compute the thread level anymore. To fix this we compute at OnEventBirth -- After an instant kill we can't compute the threat level anymore. To fix this we compute at OnEventBirth
if PlayerHit.UNIT.ThreatType == nil then if PlayerHit.UNIT.ThreatType == nil then
PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel() PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel()
-- if this fails for some reason, set a good default value -- if this fails for some reason, set a good default value
if PlayerHit.ThreatType == nil then if PlayerHit.ThreatType == nil or PlayerHit.ThreatType == "" then
PlayerHit.ThreatLevel = 1 PlayerHit.ThreatLevel = 1
PlayerHit.ThreatType = "Unknown" PlayerHit.ThreatType = "Unknown"
end end
@@ -1060,10 +1108,8 @@ function SCORING:_EventOnHit( Event )
end end
self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType ) self:ScoreCSV( InitPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
else else
-- Hitting a target multiple times before destoying it should not result in a higger score Player.Score = Player.Score + self.ScoreIncrementOnHit
-- Multiple hits is typically a results of bombs/missles missing their target but still inflict some spash damage PlayerHit.Score = PlayerHit.Score + self.ScoreIncrementOnHit
-- Player.Score = Player.Score + 1
-- PlayerHit.Score = PlayerHit.Score + 1
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1 PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
if TargetPlayerName ~= nil then -- It is a player hitting another player ... if TargetPlayerName ~= nil then -- It is a player hitting another player ...
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit enemy player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. InitPlayerName .. "' hit enemy player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. PlayerHit.ScoreHit .. " times. " ..
@@ -1126,9 +1172,9 @@ function SCORING:_EventOnHit( Event )
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit or 0
PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0 PlayerHit.TimeStamp = PlayerHit.TimeStamp or 0
PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT PlayerHit.UNIT = PlayerHit.UNIT or TargetUNIT
-- After an instant kill we can't compute the thread level anymore. To fix this we compute at OnEventBirth -- After an instant kill we can't compute the threat level anymore. To fix this we compute at OnEventBirth
if PlayerHit.UNIT.ThreatType == nil then if PlayerHit.UNIT.ThreatType == nil then
PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel() PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel()
-- if this fails for some reason, set a good default value -- if this fails for some reason, set a good default value
if PlayerHit.ThreatType == nil then if PlayerHit.ThreatType == nil then
PlayerHit.ThreatLevel = 1 PlayerHit.ThreatLevel = 1
@@ -1163,10 +1209,8 @@ function SCORING:_EventOnHit( Event )
:ToCoalitionIf( Event.WeaponCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() ) :ToCoalitionIf( Event.WeaponCoalition, self:IfMessagesHit() and self:IfMessagesToCoalition() )
self:ScoreCSV( Event.WeaponPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, Event.WeaponName, Event.WeaponCoalition, Event.WeaponCategory, Event.WeaponTypeName, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType ) self:ScoreCSV( Event.WeaponPlayerName, TargetPlayerName, "HIT_PENALTY", 1, -10, Event.WeaponName, Event.WeaponCoalition, Event.WeaponCategory, Event.WeaponTypeName, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
else else
-- Hitting a target multiple times before destoying it should not result in a higger score Player.Score = Player.Score + self.ScoreIncrementOnHit
-- Multiple hits is typically a results of bombs/missles missing their target but still inflict some spash damage PlayerHit.Score = PlayerHit.Score + self.ScoreIncrementOnHit
-- Player.Score = Player.Score + 1
-- PlayerHit.Score = PlayerHit.Score + 1
PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1 PlayerHit.ScoreHit = PlayerHit.ScoreHit + 1
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit enemy target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit enemy target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
"Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty, "Score: " .. PlayerHit.Score .. ". Score Total:" .. Player.Score - Player.Penalty,
@@ -1274,13 +1318,18 @@ function SCORING:_EventOnDeadOrCrash( Event )
TargetDestroy.Penalty = TargetDestroy.Penalty + ThreatPenalty TargetDestroy.Penalty = TargetDestroy.Penalty + ThreatPenalty
TargetDestroy.PenaltyDestroy = TargetDestroy.PenaltyDestroy + 1 TargetDestroy.PenaltyDestroy = TargetDestroy.PenaltyDestroy + 1
--self:OnKillPvP(PlayerName, TargetPlayerName, true, TargetThreatLevel, Player.ThreatLevel, ThreatPenalty)
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
self:OnKillPvP(PlayerName, TargetPlayerName, true)
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
"Penalty: -" .. ThreatPenalty .. " = " .. Player.Score - Player.Penalty, "Penalty: -" .. ThreatPenalty .. " = " .. Player.Score - Player.Penalty,
MESSAGE.Type.Information ) MESSAGE.Type.Information )
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() ) :ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
else else
self:OnKillPvE(PlayerName, TargetUnitName, true, TargetThreatLevel, Player.ThreatLevel, ThreatPenalty)
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly target " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed friendly target " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
"Penalty: -" .. ThreatPenalty .. " = " .. Player.Score - Player.Penalty, "Penalty: -" .. ThreatPenalty .. " = " .. Player.Score - Player.Penalty,
MESSAGE.Type.Information ) MESSAGE.Type.Information )
@@ -1303,12 +1352,19 @@ function SCORING:_EventOnDeadOrCrash( Event )
TargetDestroy.Score = TargetDestroy.Score + ThreatScore TargetDestroy.Score = TargetDestroy.Score + ThreatScore
TargetDestroy.ScoreDestroy = TargetDestroy.ScoreDestroy + 1 TargetDestroy.ScoreDestroy = TargetDestroy.ScoreDestroy + 1
if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player if Player.HitPlayers[TargetPlayerName] then -- A player destroyed another player
if Player.PlayerKills ~= nil then
Player.PlayerKills = Player.PlayerKills + 1
else
Player.PlayerKills = 1
end
self:OnKillPvP(PlayerName, TargetPlayerName, false, TargetThreatLevel, Player.ThreatLevel, ThreatScore)
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy player '" .. TargetPlayerName .. "' " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
"Score: +" .. ThreatScore .. " = " .. Player.Score - Player.Penalty, "Score: +" .. ThreatScore .. " = " .. Player.Score - Player.Penalty,
MESSAGE.Type.Information ) MESSAGE.Type.Information )
:ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() ) :ToAllIf( self:IfMessagesDestroy() and self:IfMessagesToAll() )
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() ) :ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
else else
self:OnKillPvE(PlayerName, TargetUnitName, false, TargetThreatLevel, Player.ThreatLevel, ThreatScore)
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' destroyed enemy " .. TargetUnitCategory .. " ( " .. ThreatTypeTarget .. " ) " ..
"Score: +" .. ThreatScore .. " = " .. Player.Score - Player.Penalty, "Score: +" .. ThreatScore .. " = " .. Player.Score - Player.Penalty,
MESSAGE.Type.Information ) MESSAGE.Type.Information )
@@ -1786,10 +1842,11 @@ end
function SCORING:OpenCSV( ScoringCSV ) function SCORING:OpenCSV( ScoringCSV )
self:F( ScoringCSV ) self:F( ScoringCSV )
if lfs and io and os and self.AutoSave then if lfs and io and os and self.AutoSave == true then
if ScoringCSV then if ScoringCSV then
self.ScoringCSV = ScoringCSV self.ScoringCSV = ScoringCSV
local fdir = lfs.writedir() .. [[Logs\]] .. self.ScoringCSV .. " " .. os.date( "%Y-%m-%d %H-%M-%S" ) .. ".csv" local path = self.AutoSavePath or lfs.writedir() .. [[Logs\]]
local fdir = path .. self.ScoringCSV .. " " .. os.date( "%Y-%m-%d %H-%M-%S" ) .. ".csv"
self.CSVFile, self.err = io.open( fdir, "w+" ) self.CSVFile, self.err = io.open( fdir, "w+" )
if not self.CSVFile then if not self.CSVFile then
@@ -1907,3 +1964,26 @@ function SCORING:SwitchAutoSave(OnOff)
self.AutoSave = OnOff self.AutoSave = OnOff
return self return self
end end
--- Handles the event when one player kill another player
-- @param #SCORING self
-- @param #string PlayerName The attacking player
-- @param #string TargetPlayerName The name of the killed player
-- @param #boolean IsTeamKill true if this kill was a team kill
-- @param #number TargetThreatLevel Threat level of the target
-- @param #number PlayerThreatLevel Threat level of the player
-- @param #number Score The score based on both threat levels
function SCORING:OnKillPvP(PlayerName, TargetPlayerName, IsTeamKill, TargetThreatLevel, PlayerThreatLevel, Score)
end
--- Handles the event when one player kill another player
-- @param #SCORING self
-- @param #string PlayerName The attacking player
-- @param #string TargetUnitName the name of the killed unit
-- @param #boolean IsTeamKill true if this kill was a team kill
-- @param #number TargetThreatLevel Threat level of the target
-- @param #number PlayerThreatLevel Threat level of the player
-- @param #number Score The score based on both threat levels
function SCORING:OnKillPvE(PlayerName, TargetUnitName, IsTeamKill, TargetThreatLevel, PlayerThreatLevel, Score)
end

View File

@@ -13,13 +13,13 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [SEV - SEAD Evasion](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SEV%20-%20SEAD%20Evasion) -- [SEV - SEAD Evasion](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Sead)
-- --
-- === -- ===
-- --
-- ### Authors: **FlightControl**, **applevangelist** -- ### Authors: **applevangelist**, **FlightControl**
-- --
-- Last Update: Oct 2023 -- Last Update: Dec 2023
-- --
-- === -- ===
-- --
@@ -144,7 +144,7 @@ function SEAD:New( SEADGroupPrefixes, Padding )
self:AddTransition("*", "ManageEvasion", "*") self:AddTransition("*", "ManageEvasion", "*")
self:AddTransition("*", "CalculateHitZone", "*") self:AddTransition("*", "CalculateHitZone", "*")
self:I("*** SEAD - Started Version 0.4.5") self:I("*** SEAD - Started Version 0.4.6")
return self return self
end end
@@ -320,9 +320,6 @@ function SEAD:onafterCalculateHitZone(From,Event,To,SEADWeapon,pos0,height,SEADG
end end
local seadset = SET_GROUP:New():FilterPrefixes(self.SEADGroupPrefixes):FilterZones({targetzone}):FilterOnce() local seadset = SET_GROUP:New():FilterPrefixes(self.SEADGroupPrefixes):FilterZones({targetzone}):FilterOnce()
local tgtcoord = targetzone:GetRandomPointVec2()
--if tgtcoord and tgtcoord.ClassName == "COORDINATE" then
--local tgtgrp = seadset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtgrp = seadset:GetRandom() local tgtgrp = seadset:GetRandom()
local _targetgroup = nil local _targetgroup = nil
local _targetgroupname = "none" local _targetgroupname = "none"
@@ -401,7 +398,7 @@ function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADP
grp:EnableEmission(false) grp:EnableEmission(false)
end end
grp:OptionAlarmStateGreen() -- needed else we cannot move around grp:OptionAlarmStateGreen() -- needed else we cannot move around
grp:RelocateGroundRandomInRadius(20,300,false,false,"Diamond") grp:RelocateGroundRandomInRadius(20,300,false,false,"Diamond",true)
if self.UseCallBack then if self.UseCallBack then
local object = self.CallBack local object = self.CallBack
object:SeadSuppressionStart(grp,name,attacker) object:SeadSuppressionStart(grp,name,attacker)

View File

@@ -11,7 +11,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- ### [SHORAD - Short Range Air Defense](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SRD%20-%20SHORAD%20Defense) -- ### [SHORAD - Short Range Air Defense](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/Shorad)
-- --
-- === -- ===
-- --

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,591 @@
--- **Functional** - TIRESIAS - manages AI behaviour.
--
-- ===
--
-- The @{#TIRESIAS} class is working in the back to keep your large-scale ground units in check.
--
-- ## Features:
--
-- * Designed to keep CPU and Network usage lower on missions with a lot of ground units.
-- * Does not affect ships to keep the Navy guys happy.
-- * Does not affect OpsGroup type groups.
-- * Distinguishes between SAM groups, AAA groups and other ground groups.
-- * Exceptions can be defined to keep certain actions going.
-- * Works coalition-independent in the back
-- * Easy setup.
--
-- ===
--
-- ## Missions:
--
-- ### [TIRESIAS](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master)
--
-- ===
--
-- ### Author : **applevangelist **
--
-- @module Functional.Tiresias
-- @image Functional.Tiresias.jpg
--
-- Last Update: Dec 2023
-------------------------------------------------------------------------
--- **TIRESIAS** class, extends Core.Base#BASE
-- @type TIRESIAS
-- @field #string ClassName
-- @field #booelan debug
-- @field #string version
-- @field #number Interval
-- @field Core.Set#SET_GROUP GroundSet
-- @field #number Coalition
-- @field Core.Set#SET_GROUP VehicleSet
-- @field Core.Set#SET_GROUP AAASet
-- @field Core.Set#SET_GROUP SAMSet
-- @field Core.Set#SET_GROUP ExceptionSet
-- @field Core.Set#SET_OPSGROUP OpsGroupSet
-- @field #number AAARange
-- @field #number HeloSwitchRange
-- @field #number PlaneSwitchRange
-- @field Core.Set#SET_GROUP FlightSet
-- @field #boolean SwitchAAA
-- @extends Core.Fsm#FSM
---
-- @type TIRESIAS.Data
-- @field #string type
-- @field #number range
-- @field #boolean invisible
-- @field #boolean AIOff
-- @field #boolean exception
--- *Tiresias, Greek demi-god and shapeshifter, blinded by the Gods, works as oracle for you.* (Wiki)
--
-- ===
--
-- ## TIRESIAS Concept
--
-- * Designed to keep CPU and Network usage lower on missions with a lot of ground units.
-- * Does not affect ships to keep the Navy guys happy.
-- * Does not affect OpsGroup type groups.
-- * Distinguishes between SAM groups, AAA groups and other ground groups.
-- * Exceptions can be defined in SET_GROUP objects to keep certain actions going.
-- * Works coalition-independent in the back
-- * Easy setup.
--
-- ## Setup
--
-- Setup is a one-liner:
--
-- local blinder = TIRESIAS:New()
--
-- Optionally you can set up exceptions, e.g. for convoys driving around
--
-- local exceptionset = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes("Convoy"):FilterStart()
-- local blinder = TIRESIAS:New()
-- blinder:AddExceptionSet(exceptionset)
--
-- Options
--
-- -- Setup different radius for activation around helo and airplane groups (applies to AI and humans)
-- blinder:SetActivationRanges(10,25) -- defaults are 10, and 25
--
-- -- Setup engagement ranges for AAA (non-advanced SAM units like Flaks etc) and if you want them to be AIOff
-- blinder:SetAAARanges(60,true) -- defaults are 60, and true
--
-- @field #TIRESIAS
TIRESIAS = {
ClassName = "TIRESIAS",
debug = false,
version = "0.0.5",
Interval = 20,
GroundSet = nil,
VehicleSet = nil,
AAASet = nil,
SAMSet = nil,
ExceptionSet = nil,
AAARange = 60, -- 60%
HeloSwitchRange = 10, -- NM
PlaneSwitchRange = 25, -- NM
SwitchAAA = true,
}
--- [USER] Create a new Tiresias object and start it up.
-- @param #TIRESIAS self
-- @return #TIRESIAS self
function TIRESIAS:New()
-- Inherit everything from FSM class.
local self = BASE:Inherit(self, FSM:New()) -- #TIRESIAS
--- FSM Functions ---
-- Start State.
self:SetStartState("Stopped")
-- Add FSM transitions.
-- From State --> Event --> To State
self:AddTransition("Stopped", "Start", "Running") -- Start FSM.
self:AddTransition("*", "Status", "*") -- TIRESIAS status update.
self:AddTransition("*", "Stop", "Stopped") -- Stop FSM.
self.ExceptionSet = SET_GROUP:New():Clear(false)
self:HandleEvent(EVENTS.PlayerEnterAircraft,self._EventHandler)
self.lid = string.format("TIRESIAS %s | ",self.version)
self:I(self.lid.."Managing ground groups!")
--- Triggers the FSM event "Stop". Stops TIRESIAS and all its event handlers.
-- @function [parent=#TIRESIAS] Stop
-- @param #TIRESIAS self
--- Triggers the FSM event "Stop" after a delay. Stops TIRESIAS and all its event handlers.
-- @function [parent=#TIRESIAS] __Stop
-- @param #TIRESIAS self
-- @param #number delay Delay in seconds.
--- Triggers the FSM event "Start". Starts TIRESIAS and all its event handlers. Note - `:New()` already starts the instance.
-- @function [parent=#TIRESIAS] Start
-- @param #TIRESIAS self
--- Triggers the FSM event "Start" after a delay. Starts TIRESIAS and all its event handlers. Note - `:New()` already starts the instance.
-- @function [parent=#TIRESIAS] __Start
-- @param #TIRESIAS self
-- @param #number delay Delay in seconds.
self:__Start(1)
return self
end
-------------------------------------------------------------------------------------------------------------
--
-- Helper Functions
--
-------------------------------------------------------------------------------------------------------------
---[USER] Set activation radius for Helos and Planes in Nautical Miles.
-- @param #TIRESIAS self
-- @param #number HeloMiles Radius around a Helicopter in which AI ground units will be activated. Defaults to 10NM.
-- @param #number PlaneMiles Radius around an Airplane in which AI ground units will be activated. Defaults to 25NM.
-- @return #TIRESIAS self
function TIRESIAS:SetActivationRanges(HeloMiles,PlaneMiles)
self.HeloSwitchRange = HeloMiles or 10
self.PlaneSwitchRange = PlaneMiles or 25
return self
end
---[USER] Set AAA Ranges - AAA equals non-SAM systems which qualify as AAA in DCS world.
-- @param #TIRESIAS self
-- @param #number FiringRange The engagement range that AAA units will be set to. Can be 0 to 100 (percent). Defaults to 60.
-- @param #boolean SwitchAAA Decide if these system will have their AI switched off, too. Defaults to true.
-- @return #TIRESIAS self
function TIRESIAS:SetAAARanges(FiringRange,SwitchAAA)
self.AAARange = FiringRange or 60
self.SwitchAAA = (SwitchAAA == false) and false or true
return self
end
--- [USER] Add a SET_GROUP of GROUP objects as exceptions. Can be done multiple times. Does **not** work work for GROUP objects spawned into the SET after start, i.e. the groups need to exist in the game already.
-- @param #TIRESIAS self
-- @param Core.Set#SET_GROUP Set to add to the exception list.
-- @return #TIRESIAS self
function TIRESIAS:AddExceptionSet(Set)
self:T(self.lid.."AddExceptionSet")
local exceptions = self.ExceptionSet
Set:ForEachGroupAlive(
function(grp)
if not grp.Tiresias then
grp.Tiresias = { -- #TIRESIAS.Data
type = "Exception",
exception = true,
}
exceptions:AddGroup(grp,true)
end
BASE:T("TIRESIAS: Added exception group: "..grp:GetName())
end
)
return self
end
--- [INTERNAL] Filter Function
-- @param Wrapper.Group#GROUP Group
-- @return #boolean isin
function TIRESIAS._FilterNotAAA(Group)
local grp = Group -- Wrapper.Group#GROUP
local isaaa = grp:IsAAA()
if isaaa == true and grp:IsGround() and not grp:IsShip() then
return false -- remove from SET
else
return true -- keep in SET
end
end
--- [INTERNAL] Filter Function
-- @param Wrapper.Group#GROUP Group
-- @return #boolean isin
function TIRESIAS._FilterNotSAM(Group)
local grp = Group -- Wrapper.Group#GROUP
local issam = grp:IsSAM()
if issam == true and grp:IsGround() and not grp:IsShip() then
return false -- remove from SET
else
return true -- keep in SET
end
end
--- [INTERNAL] Filter Function
-- @param Wrapper.Group#GROUP Group
-- @return #boolean isin
function TIRESIAS._FilterAAA(Group)
local grp = Group -- Wrapper.Group#GROUP
local isaaa = grp:IsAAA()
if isaaa == true and grp:IsGround() and not grp:IsShip() then
return true -- remove from SET
else
return false -- keep in SET
end
end
--- [INTERNAL] Filter Function
-- @param Wrapper.Group#GROUP Group
-- @return #boolean isin
function TIRESIAS._FilterSAM(Group)
local grp = Group -- Wrapper.Group#GROUP
local issam = grp:IsSAM()
if issam == true and grp:IsGround() and not grp:IsShip() then
return true -- remove from SET
else
return false -- keep in SET
end
end
--- [INTERNAL] Init Groups
-- @param #TIRESIAS self
-- @return #TIRESIAS self
function TIRESIAS:_InitGroups()
self:T(self.lid.."_InitGroups")
-- Set all groups invisible/motionless
local EngageRange = self.AAARange
local SwitchAAA = self.SwitchAAA
--- AAA
self.AAASet:ForEachGroupAlive(
function(grp)
if not grp.Tiresias then
grp:OptionEngageRange(EngageRange)
grp:SetCommandInvisible(true)
if SwitchAAA then
grp:SetAIOff()
grp:EnableEmission(false)
end
grp.Tiresias = { -- #TIRESIAS.Data
type = "AAA",
invisible = true,
range = EngageRange,
exception = false,
AIOff = SwitchAAA,
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias.invisible and grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp.Tiresias.invisible = true
if SwitchAAA then
grp:SetAIOff()
grp:EnableEmission(false)
grp.Tiresias.AIOff = true
end
end
end
--BASE:I(string.format("Init/Switch off AAA %s (Exception %s)",grp:GetName(),tostring(grp.Tiresias.exception)))
end
)
--- Vehicles
self.VehicleSet:ForEachGroupAlive(
function(grp)
if not grp.Tiresias then
grp:SetAIOff()
grp:SetCommandInvisible(true)
grp.Tiresias = { -- #TIRESIAS.Data
type = "Vehicle",
invisible = true,
AIOff = true,
exception = false,
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp:SetAIOff()
grp.Tiresias.invisible = true
end
end
--BASE:I(string.format("Init/Switch off Vehicle %s (Exception %s)",grp:GetName(),tostring(grp.Tiresias.exception)))
end
)
--- SAM
self.SAMSet:ForEachGroupAlive(
function(grp)
if not grp.Tiresias then
grp:SetCommandInvisible(true)
grp.Tiresias = { -- #TIRESIAS.Data
type = "SAM",
invisible = true,
exception = false,
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp.Tiresias.invisible = true
end
end
--BASE:I(string.format("Init/Switch off SAM %s (Exception %s)",grp:GetName(),tostring(grp.Tiresias.exception)))
end
)
return self
end
--- [INTERNAL] Event handler function
-- @param #TIRESIAS self
-- @param Core.Event#EVENTDATA EventData
-- @return #TIRESIAS self
function TIRESIAS:_EventHandler(EventData)
self:T(string.format("%s Event = %d",self.lid, EventData.id))
local event = EventData -- Core.Event#EVENTDATA
if event.id == EVENTS.PlayerEnterAircraft or event.id == EVENTS.PlayerEnterUnit then
--local _coalition = event.IniCoalition
--if _coalition ~= self.Coalition then
-- return --ignore!
--end
local unitname = event.IniUnitName or "none"
local _unit = event.IniUnit
local _group = event.IniGroup
if _group and _group:IsAlive() then
local radius = self.PlaneSwitchRange
if _group:IsHelicopter() then
radius = self.HeloSwitchRange
end
self:_SwitchOnGroups(_group,radius)
end
end
return self
end
--- [INTERNAL] Switch Groups Behaviour
-- @param #TIRESIAS self
-- @param Wrapper.Group#GROUP group
-- @param #number radius Radius in NM
-- @return #TIRESIAS self
function TIRESIAS:_SwitchOnGroups(group,radius)
self:T(self.lid.."_SwitchOnGroups "..group:GetName().." Radius "..radius.." NM")
local zone = ZONE_GROUP:New("Zone-"..group:GetName(),group,UTILS.NMToMeters(radius))
local ground = SET_GROUP:New():FilterCategoryGround():FilterZones({zone}):FilterOnce()
local count = ground:CountAlive()
if self.debug then
local text = string.format("There are %d groups around this plane or helo!",count)
self:I(text)
end
local SwitchAAA = self.SwitchAAA
if ground:CountAlive() > 0 then
ground:ForEachGroupAlive(
function(grp)
local name = grp:GetName()
if grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then
if grp.Tiresias.invisible == true then
grp:SetCommandInvisible(false)
grp.Tiresias.invisible = false
end
if grp.Tiresias.type == "Vehicle" and grp.Tiresias.AIOff and grp.Tiresias.AIOff == true then
grp:SetAIOn()
grp.Tiresias.AIOff = false
end
if SwitchAAA and grp.Tiresias.type == "AAA" and grp.Tiresias.AIOff and grp.Tiresias.AIOff == true then
grp:SetAIOn()
grp:EnableEmission(true)
grp.Tiresias.AIOff = false
end
--BASE:I(string.format("TIRESIAS - Switch on %s %s (Exception %s)",tostring(grp.Tiresias.type),grp:GetName(),tostring(grp.Tiresias.exception)))
else
BASE:T("TIRESIAS - This group "..tostring(name).. " has not been initialized or is an exception!")
end
end
)
end
return self
end
-------------------------------------------------------------------------------------------------------------
--
-- FSM Functions
--
-------------------------------------------------------------------------------------------------------------
--- [INTERNAL] FSM Function
-- @param #TIRESIAS self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #TIRESIAS self
function TIRESIAS:onafterStart(From, Event, To)
self:T({From, Event, To})
local VehicleSet = SET_GROUP:New():FilterCategoryGround():FilterFunction(TIRESIAS._FilterNotAAA):FilterFunction(TIRESIAS._FilterNotSAM):FilterStart()
local AAASet = SET_GROUP:New():FilterCategoryGround():FilterFunction(TIRESIAS._FilterAAA):FilterStart()
local SAMSet = SET_GROUP:New():FilterCategoryGround():FilterFunction(TIRESIAS._FilterSAM):FilterStart()
local OpsGroupSet = SET_OPSGROUP:New():FilterActive(true):FilterStart()
self.FlightSet = SET_GROUP:New():FilterCategories({"plane","helicopter"}):FilterStart()
local EngageRange = self.AAARange
local ExceptionSet = self.ExceptionSet
if self.ExceptionSet then
function ExceptionSet:OnAfterAdded(From,Event,To,ObjectName,Object)
BASE:I("TIRESIAS: EXCEPTION Object Added: "..Object:GetName())
if Object and Object:IsAlive() then
Object.Tiresias = { -- #TIRESIAS.Data
type = "Exception",
exception = true,
}
Object:SetAIOn()
Object:SetCommandInvisible(false)
Object:EnableEmission(true)
end
end
local OGS = OpsGroupSet:GetAliveSet()
for _,_OG in pairs(OGS or {}) do
local OG = _OG -- Ops.OpsGroup#OPSGROUP
local grp = OG:GetGroup()
ExceptionSet:AddGroup(grp,true)
end
function OpsGroupSet:OnAfterAdded(From,Event,To,ObjectName,Object)
local grp = Object:GetGroup()
ExceptionSet:AddGroup(grp,true)
end
end
function VehicleSet:OnAfterAdded(From,Event,To,ObjectName,Object)
BASE:I("TIRESIAS: VEHCILE Object Added: "..Object:GetName())
if Object and Object:IsAlive() then
Object:SetAIOff()
Object:SetCommandInvisible(true)
Object.Tiresias = { -- #TIRESIAS.Data
type = "Vehicle",
invisible = true,
AIOff = true,
exception = false,
}
end
end
local SwitchAAA = self.SwitchAAA
function AAASet:OnAfterAdded(From,Event,To,ObjectName,Object)
if Object and Object:IsAlive() then
BASE:I("TIRESIAS: AAA Object Added: "..Object:GetName())
Object:OptionEngageRange(EngageRange)
Object:SetCommandInvisible(true)
if SwitchAAA then
Object:SetAIOff()
Object:EnableEmission(false)
end
Object.Tiresias = { -- #TIRESIAS.Data
type = "AAA",
invisible = true,
range = EngageRange,
exception = false,
AIOff = SwitchAAA,
}
end
end
function SAMSet:OnAfterAdded(From,Event,To,ObjectName,Object)
if Object and Object:IsAlive() then
BASE:I("TIRESIAS: SAM Object Added: "..Object:GetName())
Object:SetCommandInvisible(true)
Object.Tiresias = { -- #TIRESIAS.Data
type = "SAM",
invisible = true,
exception = false,
}
end
end
self.VehicleSet = VehicleSet
self.AAASet = AAASet
self.SAMSet = SAMSet
self.OpsGroupSet = OpsGroupSet
self:_InitGroups()
self:__Status(1)
return self
end
--- [INTERNAL] FSM Function
-- @param #TIRESIAS self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #TIRESIAS self
function TIRESIAS:onbeforeStatus(From, Event, To)
self:T({From, Event, To})
if self:GetState() == "Stopped" then
return false
end
return self
end
--- [INTERNAL] FSM Function
-- @param #TIRESIAS self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #TIRESIAS self
function TIRESIAS:onafterStatus(From, Event, To)
self:T({From, Event, To})
if self.debug then
local count = self.VehicleSet:CountAlive()
local AAAcount = self.AAASet:CountAlive()
local SAMcount = self.SAMSet:CountAlive()
local text = string.format("Overall: %d | Vehicles: %d | AAA: %d | SAM: %d",count+AAAcount+SAMcount,count,AAAcount,SAMcount)
self:I(text)
end
self:_InitGroups()
if self.FlightSet:CountAlive() > 0 then
local Set = self.FlightSet:GetAliveSet()
for _,_plane in pairs(Set) do
local plane = _plane -- Wrapper.Group#GROUP
local radius = self.PlaneSwitchRange
if plane:IsHelicopter() then
radius = self.HeloSwitchRange
end
self:_SwitchOnGroups(_plane,radius)
end
end
if self:GetState() ~= "Stopped" then
self:__Status(self.Interval)
end
return self
end
--- [INTERNAL] FSM Function
-- @param #TIRESIAS self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #TIRESIAS self
function TIRESIAS:onafterStop(From, Event, To)
self:T({From, Event, To})
self:UnHandleEvent(EVENTS.PlayerEnterAircraft)
return self
end
-------------------------------------------------------------------------------------------------------------
--
-- End
--
-------------------------------------------------------------------------------------------------------------

View File

@@ -87,7 +87,7 @@
-- @field #number respawndelay Delay before respawn in seconds. -- @field #number respawndelay Delay before respawn in seconds.
-- @field #number runwaydestroyed Time stamp timer.getAbsTime() when the runway was destroyed. -- @field #number runwaydestroyed Time stamp timer.getAbsTime() when the runway was destroyed.
-- @field #number runwayrepairtime Time in seconds until runway will be repaired after it was destroyed. Default is 3600 sec (one hour). -- @field #number runwayrepairtime Time in seconds until runway will be repaired after it was destroyed. Default is 3600 sec (one hour).
-- @field Ops.FlightControl#FLIGHTCONTROL flightcontrol Flight control of this warehouse. -- @field OPS.FlightControl#FLIGHTCONTROL flightcontrol Flight control of this warehouse.
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
--- Have your assets at the right place at the right time - or not! --- Have your assets at the right place at the right time - or not!
@@ -1629,7 +1629,7 @@ WAREHOUSE = {
-- @field #boolean arrived If true, asset arrived at its destination. -- @field #boolean arrived If true, asset arrived at its destination.
-- --
-- @field #number damage Damage of asset group in percent. -- @field #number damage Damage of asset group in percent.
-- @field Ops.AirWing#AIRWING.Payload payload The payload of the asset. -- @field Ops.Airwing#AIRWING.Payload payload The payload of the asset.
-- @field Ops.OpsGroup#OPSGROUP flightgroup The flightgroup object. -- @field Ops.OpsGroup#OPSGROUP flightgroup The flightgroup object.
-- @field Ops.Cohort#COHORT cohort The cohort this asset belongs to. -- @field Ops.Cohort#COHORT cohort The cohort this asset belongs to.
-- @field Ops.Legion#LEGION legion The legion this asset belonts to. -- @field Ops.Legion#LEGION legion The legion this asset belonts to.
@@ -3414,7 +3414,7 @@ end
-- FSM states -- FSM states
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- On after Start event. Starts the warehouse. Addes event handlers and schedules status updates of reqests and queue. --- On after Start event. Starts the warehouse. Adds event handlers and schedules status updates of reqests and queue.
-- @param #WAREHOUSE self -- @param #WAREHOUSE self
-- @param #string From From state. -- @param #string From From state.
-- @param #string Event Event. -- @param #string Event Event.
@@ -3595,6 +3595,7 @@ function WAREHOUSE:onafterStatus(From, Event, To)
local Trepair=self:GetRunwayRepairtime() local Trepair=self:GetRunwayRepairtime()
self:I(self.lid..string.format("Runway destroyed! Will be repaired in %d sec", Trepair)) self:I(self.lid..string.format("Runway destroyed! Will be repaired in %d sec", Trepair))
if Trepair==0 then if Trepair==0 then
self.runwaydestroyed = nil
self:RunwayRepaired() self:RunwayRepaired()
end end
end end
@@ -5393,6 +5394,7 @@ function WAREHOUSE:onafterRunwayDestroyed(From, Event, To)
self.runwaydestroyed=timer.getAbsTime() self.runwaydestroyed=timer.getAbsTime()
return self
end end
--- On after "RunwayRepaired" event. --- On after "RunwayRepaired" event.
@@ -5408,6 +5410,7 @@ function WAREHOUSE:onafterRunwayRepaired(From, Event, To)
self.runwaydestroyed=nil self.runwaydestroyed=nil
return self
end end
@@ -6729,7 +6732,7 @@ end
-- @param Wrapper.Group#GROUP deadgroup Group of unit that died. -- @param Wrapper.Group#GROUP deadgroup Group of unit that died.
-- @param #WAREHOUSE.Pendingitem request Request that needs to be updated. -- @param #WAREHOUSE.Pendingitem request Request that needs to be updated.
function WAREHOUSE:_UnitDead(deadunit, deadgroup, request) function WAREHOUSE:_UnitDead(deadunit, deadgroup, request)
self:F(self.lid.."FF unit dead "..deadunit:GetName()) --self:F(self.lid.."FF unit dead "..deadunit:GetName())
-- Find opsgroup. -- Find opsgroup.
local opsgroup=_DATABASE:FindOpsGroup(deadgroup) local opsgroup=_DATABASE:FindOpsGroup(deadgroup)
@@ -7943,10 +7946,12 @@ function WAREHOUSE:_FindParkingForAssets(airbase, assets)
local clients=_DATABASE.CLIENTS local clients=_DATABASE.CLIENTS
for clientname, client in pairs(clients) do for clientname, client in pairs(clients) do
local template=_DATABASE:GetGroupTemplateFromUnitName(clientname) local template=_DATABASE:GetGroupTemplateFromUnitName(clientname)
local units=template.units if template then
for i,unit in pairs(units) do local units=template.units
local coord=COORDINATE:New(unit.x, unit.alt, unit.y) for i,unit in pairs(units) do
coords[unit.name]=coord local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
coords[unit.name]=coord
end
end end
end end
end end

View File

@@ -12,7 +12,7 @@
-- --
-- ## Missions: -- ## Missions:
-- --
-- [CAZ - Capture Zones](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAZ%20-%20Capture%20Zones) -- [CAZ - Capture Zones](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Functional/ZoneCaptureCoalition)
-- --
-- === -- ===
-- --
@@ -48,7 +48,7 @@
do -- ZONE_CAPTURE_COALITION do -- ZONE_CAPTURE_COALITION
--- @type ZONE_CAPTURE_COALITION -- @type ZONE_CAPTURE_COALITION
-- @field #string ClassName Name of the class. -- @field #string ClassName Name of the class.
-- @field #number MarkBlue ID of blue F10 mark. -- @field #number MarkBlue ID of blue F10 mark.
-- @field #number MarkRed ID of red F10 mark. -- @field #number MarkRed ID of red F10 mark.
@@ -161,7 +161,7 @@ do -- ZONE_CAPTURE_COALITION
-- The mission designer can use these values to alter the logic. -- The mission designer can use these values to alter the logic.
-- For example: -- For example:
-- --
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -- -- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) -- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
-- if From ~= "Empty" then -- if From ~= "Empty" then
-- -- Display a message -- -- Display a message
@@ -172,7 +172,7 @@ do -- ZONE_CAPTURE_COALITION
-- --
-- ## Example Event Handler. -- ## Example Event Handler.
-- --
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -- -- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) -- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
-- if From ~= To then -- if From ~= To then
-- local Coalition = self:GetCoalition() -- local Coalition = self:GetCoalition()
@@ -273,7 +273,7 @@ do -- ZONE_CAPTURE_COALITION
-- Depending on the zone ownership, different messages are sent. -- Depending on the zone ownership, different messages are sent.
-- Note the methods `ZoneCaptureCoalition:GetZoneName()`. -- Note the methods `ZoneCaptureCoalition:GetZoneName()`.
-- --
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -- -- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) -- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
-- if From ~= To then -- if From ~= To then
-- local Coalition = self:GetCoalition() -- local Coalition = self:GetCoalition()
@@ -294,7 +294,7 @@ do -- ZONE_CAPTURE_COALITION
-- Next is the Event Handler when the **Empty** state transition is triggered. -- Next is the Event Handler when the **Empty** state transition is triggered.
-- Now we smoke the ZoneCaptureCoalition with a green color, using `self:Smoke( SMOKECOLOR.Green )`. -- Now we smoke the ZoneCaptureCoalition with a green color, using `self:Smoke( SMOKECOLOR.Green )`.
-- --
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self -- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterEmpty() -- function ZoneCaptureCoalition:OnEnterEmpty()
-- self:Smoke( SMOKECOLOR.Green ) -- self:Smoke( SMOKECOLOR.Green )
-- US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) -- US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
@@ -304,7 +304,7 @@ do -- ZONE_CAPTURE_COALITION
-- The next Event Handlers speak for itself. -- The next Event Handlers speak for itself.
-- When the zone is Attacked, we smoke the zone white and send some messages to each coalition. -- When the zone is Attacked, we smoke the zone white and send some messages to each coalition.
-- --
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self -- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterAttacked() -- function ZoneCaptureCoalition:OnEnterAttacked()
-- ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) -- ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
-- local Coalition = self:GetCoalition() -- local Coalition = self:GetCoalition()
@@ -321,7 +321,7 @@ do -- ZONE_CAPTURE_COALITION
-- When the zone is Captured, we send some victory or loss messages to the correct coalition. -- When the zone is Captured, we send some victory or loss messages to the correct coalition.
-- And we add some score. -- And we add some score.
-- --
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self -- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterCaptured() -- function ZoneCaptureCoalition:OnEnterCaptured()
-- local Coalition = self:GetCoalition() -- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition}) -- self:E({Coalition = Coalition})
@@ -641,7 +641,7 @@ do -- ZONE_CAPTURE_COALITION
-- --
-- @usage -- @usage
-- -- For example, one could stop the monitoring when the zone was captured! -- -- For example, one could stop the monitoring when the zone was captured!
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self -- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterCaptured() -- function ZoneCaptureCoalition:OnEnterCaptured()
-- local Coalition = self:GetCoalition() -- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition}) -- self:E({Coalition = Coalition})

View File

@@ -17,7 +17,7 @@
do -- Zone do -- Zone
--- @type ZONE_GOAL -- @type ZONE_GOAL
-- @field #string ClassName Name of the class. -- @field #string ClassName Name of the class.
-- @field Core.Goal#GOAL Goal The goal object. -- @field Core.Goal#GOAL Goal The goal object.
-- @field #number SmokeTime Time stamp in seconds when the last smoke of the zone was triggered. -- @field #number SmokeTime Time stamp in seconds when the last smoke of the zone was triggered.
@@ -178,7 +178,7 @@ do -- Zone
end end
--- @param #ZONE_GOAL self -- @param #ZONE_GOAL self
-- @param Core.Event#EVENTDATA EventData Event data table. -- @param Core.Event#EVENTDATA EventData Event data table.
function ZONE_GOAL:__Destroyed( EventData ) function ZONE_GOAL:__Destroyed( EventData )
self:F( { "EventDead", EventData } ) self:F( { "EventDead", EventData } )

View File

@@ -21,7 +21,7 @@
do -- ZoneGoal do -- ZoneGoal
--- @type ZONE_GOAL_CARGO -- @type ZONE_GOAL_CARGO
-- @extends Functional.ZoneGoal#ZONE_GOAL -- @extends Functional.ZoneGoal#ZONE_GOAL
@@ -55,7 +55,7 @@ do -- ZoneGoal
ClassName = "ZONE_GOAL_CARGO", ClassName = "ZONE_GOAL_CARGO",
} }
--- @field #table ZONE_GOAL_CARGO.States -- @field #table ZONE_GOAL_CARGO.States
ZONE_GOAL_CARGO.States = {} ZONE_GOAL_CARGO.States = {}
--- ZONE_GOAL_CARGO Constructor. --- ZONE_GOAL_CARGO Constructor.

View File

@@ -16,7 +16,7 @@
do -- ZoneGoal do -- ZoneGoal
--- @type ZONE_GOAL_COALITION -- @type ZONE_GOAL_COALITION
-- @field #string ClassName Name of the Class. -- @field #string ClassName Name of the Class.
-- @field #number Coalition The current coalition ID of the zone owner. -- @field #number Coalition The current coalition ID of the zone owner.
-- @field #number PreviousCoalition The previous owner of the zone. -- @field #number PreviousCoalition The previous owner of the zone.
@@ -48,7 +48,7 @@ do -- ZoneGoal
ObjectCategories = nil, ObjectCategories = nil,
} }
--- @field #table ZONE_GOAL_COALITION.States -- @field #table ZONE_GOAL_COALITION.States
ZONE_GOAL_COALITION.States = {} ZONE_GOAL_COALITION.States = {}
--- ZONE_GOAL_COALITION Constructor. --- ZONE_GOAL_COALITION Constructor.

View File

@@ -1,180 +1,191 @@
__Moose.Include( 'Scripts/Moose/Utilities/Enums.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Enums.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/FiFo.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Utils.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Profiler.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Profiler.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Socket.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Templates.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/STTS.lua' ) --__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/STTS.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Templates.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/FiFo.lua' )
__Moose.Include( 'Scripts/Moose/Utilities/Utils.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Socket.lua' )
__Moose.Include( 'Scripts/Moose/Core/Base.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Base.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Astar.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Beacon.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Condition.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/UserFlag.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Report.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Scheduler.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/ScheduleDispatcher.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Event.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Settings.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Menu.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Zone.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Zone_Detection.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Database.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Set.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Point.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Velocity.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Message.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Fsm.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Spawn.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/SpawnStatic.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Timer.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Goal.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Spot.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/MarkerOps_Base.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/TextAndSound.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Pathline.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/ClientMenu.lua')
__Moose.Include( 'Scripts/Moose/Core/Astar.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Object.lua' )
__Moose.Include( 'Scripts/Moose/Core/Beacon.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Identifiable.lua' )
__Moose.Include( 'Scripts/Moose/Core/Condition.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Positionable.lua' )
__Moose.Include( 'Scripts/Moose/Core/ClientMenu.lua') __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Controllable.lua' )
__Moose.Include( 'Scripts/Moose/Core/Database.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Group.lua' )
__Moose.Include( 'Scripts/Moose/Core/Event.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Unit.lua' )
__Moose.Include( 'Scripts/Moose/Core/Fsm.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Client.lua' )
__Moose.Include( 'Scripts/Moose/Core/Goal.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Static.lua' )
__Moose.Include( 'Scripts/Moose/Core/MarkerOps_Base.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Airbase.lua' )
__Moose.Include( 'Scripts/Moose/Core/Menu.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Scenery.lua' )
__Moose.Include( 'Scripts/Moose/Core/Message.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Marker.lua' )
__Moose.Include( 'Scripts/Moose/Core/Point.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Weapon.lua' )
__Moose.Include( 'Scripts/Moose/Core/Report.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Net.lua' )
__Moose.Include( 'Scripts/Moose/Core/ScheduleDispatcher.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Storage.lua' )
__Moose.Include( 'Scripts/Moose/Core/Scheduler.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/DynamicCargo.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/Spot.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/Airbase.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/Cargo.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Client.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoUnit.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Controllable.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoSlingload.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Group.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoCrate.lua' )
__Moose.Include( 'Scripts/Moose/Wrapper/Identifiable.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoGroup.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( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Scoring.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoUnit.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/CleanUp.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoSlingload.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Movement.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoCrate.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Sead.lua' )
__Moose.Include( 'Scripts/Moose/Cargo/CargoGroup.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Escort.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/MissileTrainer.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ATC_Ground.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Detection.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/DetectionZones.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Designate.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/RAT.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Range.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoal.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoalCoalition.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneCaptureCoalition.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Artillery.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Suppression.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/PseudoATC.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Warehouse.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Fox.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Mantis.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Shorad.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AICSAR.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AmmoTruck.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Autolase.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoalCargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Tiresias.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Stratego.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ClientWatch.lua')
__Moose.Include( 'Scripts/Moose/Functional/AICSAR.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Airboss.lua' )
__Moose.Include( 'Scripts/Moose/Functional/AmmoTruck.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RecoveryTanker.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Artillery.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RescueHelo.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ATC_Ground.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ATIS.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Autolase.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD.lua' )
__Moose.Include( 'Scripts/Moose/Functional/CleanUp.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CSAR.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Designate.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/AirWing.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Detection.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ArmyGroup.lua' )
__Moose.Include( 'Scripts/Moose/Functional/DetectionZones.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Auftrag.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Escort.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Awacs.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Fox.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Brigade.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Mantis.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Chief.lua' )
__Moose.Include( 'Scripts/Moose/Functional/MissileTrainer.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Cohort.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Movement.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Commander.lua' )
__Moose.Include( 'Scripts/Moose/Functional/PseudoATC.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Fleet.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Range.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/FlightControl.lua' )
__Moose.Include( 'Scripts/Moose/Functional/RAT.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/FlightGroup.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Scoring.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Flotilla.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Sead.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Intelligence.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Shorad.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Legion.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Suppression.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/NavyGroup.lua' )
__Moose.Include( 'Scripts/Moose/Functional/Warehouse.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Operation.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneCaptureCoalition.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsGroup.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoal.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsTransport.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCargo.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsZone.lua' )
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCoalition.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Platoon.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/PlayerTask.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/PlayerRecce.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Squadron.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Target.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/EasyGCICAP.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Airboss.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Balancer.lua' )
__Moose.Include( 'Scripts/Moose/Ops/AirWing.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air.lua' )
__Moose.Include( 'Scripts/Moose/Ops/ArmyGroup.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air_Patrol.lua' )
__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air_Engage.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Auftrag.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Patrol.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Awacs.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Cap.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Brigade.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Gci.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Chief.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Cohort.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_BAI.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Commander.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_CAS.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CSAR.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_SEAD.lua' )
__Moose.Include( 'Scripts/Moose/Ops/CTLD.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Fleet.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Patrol.lua' )
__Moose.Include( 'Scripts/Moose/Ops/FlightControl.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_CAP.lua' )
__Moose.Include( 'Scripts/Moose/Ops/FlightGroup.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_CAS.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Flotilla.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_BAI.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Intelligence.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Formation.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Legion.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort.lua' )
__Moose.Include( 'Scripts/Moose/Ops/NavyGroup.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Request.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Operation.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsGroup.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Dispatcher_Request.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsTransport.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo.lua' )
__Moose.Include( 'Scripts/Moose/Ops/OpsZone.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_APC.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Platoon.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Helicopter.lua' )
__Moose.Include( 'Scripts/Moose/Ops/PlayerTask.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Airplane.lua' )
__Moose.Include( 'Scripts/Moose/Ops/PlayerRecce.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Ship.lua' )
__Moose.Include( 'Scripts/Moose/Ops/RecoveryTanker.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Ops/RescueHelo.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_APC.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Squadron.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua' )
__Moose.Include( 'Scripts/Moose/Ops/Target.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Airplane.lua' )
__Moose.Include( 'Scripts/Moose/Ops/EasyGCICAP.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Ship.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Balancer.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Assign.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Air.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Route.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Air_Patrol.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Account.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Air_Engage.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Assist.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Patrol.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Cap.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Gci.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_BAI.lua' )
__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_Formation.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Request.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Dispatcher_Request.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_APC.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Helicopter.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Airplane.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Ship.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_APC.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Airplane.lua' )
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Ship.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Assign.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/ShapeBase.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Route.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Circle.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Account.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Cube.lua' )
__Moose.Include( 'Scripts/Moose/Actions/Act_Assist.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Line.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Oval.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Polygon.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Triangle.lua' )
__Moose.Include( 'Scripts/Moose/Sound/Radio.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/UserSound.lua' )
__Moose.Include( 'Scripts/Moose/Sound/RadioQueue.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/SoundOutput.lua' )
__Moose.Include( 'Scripts/Moose/Sound/RadioSpeech.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/Radio.lua' )
__Moose.Include( 'Scripts/Moose/Sound/SoundOutput.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/RadioQueue.lua' )
__Moose.Include( 'Scripts/Moose/Sound/SRS.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/RadioSpeech.lua' )
__Moose.Include( 'Scripts/Moose/Sound/UserSound.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/SRS.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/CommandCenter.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/CommandCenter.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Mission.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Mission.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/TaskInfo.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/TaskInfo.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Manager.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Manager.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/DetectionManager.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/DetectionManager.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2G_Dispatcher.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2G_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2G.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2G.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A_Dispatcher.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2A_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2A.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_CARGO.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_CARGO.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Transport.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_Transport.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_CSAR.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_CSAR.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Dispatcher.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Capture_Zone.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Zone.lua' )
__Moose.Include( 'Scripts/Moose/Tasking/Task_Capture_Dispatcher.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Dispatcher.lua' )
__Moose.Include( 'Scripts/Moose/Globals.lua' ) __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Globals.lua' )

View File

@@ -1,9 +1,7 @@
__Moose.Include( 'Utilities\\Enums.lua' ) __Moose.Include( 'Utilities\\Enums.lua' )
__Moose.Include( 'Utilities\\Routines.lua' )
__Moose.Include( 'Utilities\\Utils.lua' ) __Moose.Include( 'Utilities\\Utils.lua' )
__Moose.Include( 'Utilities\\Profiler.lua' ) __Moose.Include( 'Utilities\\Profiler.lua' )
__Moose.Include( 'Utilities\\Templates.lua' ) --__Moose.Include( 'Utilities\\STTS.lua' )
__Moose.Include( 'Utilities\\STTS.lua' )
__Moose.Include( 'Utilities\\FiFo.lua' ) __Moose.Include( 'Utilities\\FiFo.lua' )
__Moose.Include( 'Utilities\\Socket.lua' ) __Moose.Include( 'Utilities\\Socket.lua' )
@@ -17,11 +15,11 @@ __Moose.Include( 'Core\\Event.lua' )
__Moose.Include( 'Core\\Settings.lua' ) __Moose.Include( 'Core\\Settings.lua' )
__Moose.Include( 'Core\\Menu.lua' ) __Moose.Include( 'Core\\Menu.lua' )
__Moose.Include( 'Core\\Zone.lua' ) __Moose.Include( 'Core\\Zone.lua' )
__Moose.Include( 'Core\\Zone_Detection.lua' ) __Moose.Include( 'Core\\Velocity.lua' )
__Moose.Include( 'Core\\Database.lua' ) __Moose.Include( 'Core\\Database.lua' )
__Moose.Include( 'Core\\Set.lua' ) __Moose.Include( 'Core\\Set.lua' )
__Moose.Include( 'Core\\Point.lua' ) __Moose.Include( 'Core\\Point.lua' )
__Moose.Include( 'Core\\Velocity.lua' ) __Moose.Include( 'Core\\Pathline.lua' )
__Moose.Include( 'Core\\Message.lua' ) __Moose.Include( 'Core\\Message.lua' )
__Moose.Include( 'Core\\Fsm.lua' ) __Moose.Include( 'Core\\Fsm.lua' )
__Moose.Include( 'Core\\Spawn.lua' ) __Moose.Include( 'Core\\Spawn.lua' )
@@ -46,6 +44,10 @@ __Moose.Include( 'Wrapper\\Static.lua' )
__Moose.Include( 'Wrapper\\Airbase.lua' ) __Moose.Include( 'Wrapper\\Airbase.lua' )
__Moose.Include( 'Wrapper\\Scenery.lua' ) __Moose.Include( 'Wrapper\\Scenery.lua' )
__Moose.Include( 'Wrapper\\Marker.lua' ) __Moose.Include( 'Wrapper\\Marker.lua' )
__Moose.Include( 'Wrapper\\Net.lua' )
__Moose.Include( 'Wrapper\\Weapon.lua' )
__Moose.Include( 'Wrapper\\Storage.lua' )
__Moose.Include( 'Wrapper\\DynamicCargo.lua' )
__Moose.Include( 'Cargo\\Cargo.lua' ) __Moose.Include( 'Cargo\\Cargo.lua' )
__Moose.Include( 'Cargo\\CargoUnit.lua' ) __Moose.Include( 'Cargo\\CargoUnit.lua' )
@@ -77,6 +79,10 @@ __Moose.Include( 'Functional\\Mantis.lua' )
__Moose.Include( 'Functional\\Shorad.lua' ) __Moose.Include( 'Functional\\Shorad.lua' )
__Moose.Include( 'Functional\\Autolase.lua' ) __Moose.Include( 'Functional\\Autolase.lua' )
__Moose.Include( 'Functional\\AICSAR.lua' ) __Moose.Include( 'Functional\\AICSAR.lua' )
__Moose.Include( 'Functional\\AmmoTruck.lua' )
__Moose.Include( 'Functional\\Tiresias.lua' )
__Moose.Include( 'Functional\\Stratego.lua' )
__Moose.Include( 'Functional\\ClientWatch.lua' )
__Moose.Include( 'Ops\\Airboss.lua' ) __Moose.Include( 'Ops\\Airboss.lua' )
__Moose.Include( 'Ops\\RecoveryTanker.lua' ) __Moose.Include( 'Ops\\RecoveryTanker.lua' )
@@ -107,6 +113,9 @@ __Moose.Include( 'Ops\\Awacs.lua' )
__Moose.Include( 'Ops\\PlayerTask.lua' ) __Moose.Include( 'Ops\\PlayerTask.lua' )
__Moose.Include( 'Ops\\Operation.lua' ) __Moose.Include( 'Ops\\Operation.lua' )
__Moose.Include( 'Ops\\FlightControl.lua' ) __Moose.Include( 'Ops\\FlightControl.lua' )
__Moose.Include( 'Ops\\PlayerRecce.lua' )
__Moose.Include( 'Ops\\EasyGCICAP.lua' )
__Moose.Include( 'Ops\\EasyA2G.lua' )
__Moose.Include( 'AI\\AI_Balancer.lua' ) __Moose.Include( 'AI\\AI_Balancer.lua' )
__Moose.Include( 'AI\\AI_Air.lua' ) __Moose.Include( 'AI\\AI_Air.lua' )

View File

@@ -63,6 +63,8 @@
-- @field #number power Radio power in Watts. Default 100 W. -- @field #number power Radio power in Watts. Default 100 W.
-- @field Sound.RadioQueue#RADIOQUEUE radioqueue Radio queue for broadcasing messages. -- @field Sound.RadioQueue#RADIOQUEUE radioqueue Radio queue for broadcasing messages.
-- @field #string soundpath Path to sound files. -- @field #string soundpath Path to sound files.
-- @field #string soundpathAirports Path to airport names sound files.
-- @field #string soundpathNato Path to NATO alphabet sound files.
-- @field #string relayunitname Name of the radio relay unit. -- @field #string relayunitname Name of the radio relay unit.
-- @field #table towerfrequency Table with tower frequencies. -- @field #table towerfrequency Table with tower frequencies.
-- @field #string activerunway The active runway specified by the user. -- @field #string activerunway The active runway specified by the user.
@@ -495,7 +497,7 @@ ATIS.Alphabet = {
-- @field #number TheChannel -10° (West). -- @field #number TheChannel -10° (West).
-- @field #number Syria +5° (East). -- @field #number Syria +5° (East).
-- @field #number MarianaIslands +2° (East). -- @field #number MarianaIslands +2° (East).
-- @field #number SinaiMao +5° (East). -- @field #number SinaiMap +5° (East).
ATIS.RunwayM2T = { ATIS.RunwayM2T = {
Caucasus = 0, Caucasus = 0,
Nevada = 12, Nevada = 12,
@@ -618,6 +620,8 @@ ATIS.ICAOPhraseology = {
-- @field #ATIS.Soundfile VORFrequency -- @field #ATIS.Soundfile VORFrequency
ATIS.Sound = { ATIS.Sound = {
ActiveRunway = { filename = "ActiveRunway.ogg", duration = 0.99 }, ActiveRunway = { filename = "ActiveRunway.ogg", duration = 0.99 },
ActiveRunwayDeparture = { filename = "ActiveRunwayDeparture.ogg", duration = 0.99 },
ActiveRunwayArrival = { filename = "ActiveRunwayArrival.ogg", duration = 0.99 },
AdviceOnInitial = { filename = "AdviceOnInitial.ogg", duration = 3.00 }, AdviceOnInitial = { filename = "AdviceOnInitial.ogg", duration = 3.00 },
Airport = { filename = "Airport.ogg", duration = 0.66 }, Airport = { filename = "Airport.ogg", duration = 0.66 },
Altimeter = { filename = "Altimeter.ogg", duration = 0.68 }, Altimeter = { filename = "Altimeter.ogg", duration = 0.68 },
@@ -700,7 +704,7 @@ ATIS.Messages = {
EN = EN =
{ {
HOURS = "hours", HOURS = "hours",
TIME = "hours", TIME = "Hours",
NOCLOUDINFO = "Cloud coverage information not available", NOCLOUDINFO = "Cloud coverage information not available",
OVERCAST = "Overcast", OVERCAST = "Overcast",
BROKEN = "Broken clouds", BROKEN = "Broken clouds",
@@ -878,6 +882,66 @@ ATIS.Messages = {
FARP = "Farp", FARP = "Farp",
DELIMITER = "Punto", -- decimal delimiter DELIMITER = "Punto", -- decimal delimiter
}, },
-- French messages thanks to @Wojtech and Bing
FR = {
HOURS = "Heures",
TIME = "Temps",
NOCLOUDINFO = "Informations sur la couverture nuageuse non disponibles",
OVERCAST = "Ciel couvert",
BROKEN = "Nuages fragmentés",
SCATTERED = "Nuages épars",
FEWCLOUDS = "Nuages rares",
NOCLOUDS = "Clair",
AIRPORT = "Aéroport",
INFORMATION ="Information",
SUNRISEAT = "Levé du soleil à %s heure locale",
SUNSETAT = "Couché du soleil à %s heure locale",
WINDFROMMS = "Vent du %s pour %s mètres par seconde",
WINDFROMKNOTS = "Vent du %s pour %s noeuds",
GUSTING = "Rafale de vent",
VISIKM = "Visibilité %s kilomètres",
VISISM = "Visibilité %s Miles",
RAIN = "Pluie",
TSTORM = "Orage",
SNOW = "Neige",
SSTROM = "Tempête de neige",
FOG = "Brouillard",
DUST = "Poussière",
PHENOMENA = "Phénomène météorologique",
CLOUDBASEM = "Couverture nuageuse de %s à %s mètres",
CLOUDBASEFT = "Couverture nuageuse de %s à %s pieds",
TEMPERATURE = "Température",
DEWPOINT = "Point de rosée",
ALTIMETER = "Altimètre",
ACTIVERUN = "Décollages piste",
ACTIVELANDING = "Atterrissages piste",
LEFT = "Gauche",
RIGHT = "Droite",
RWYLENGTH = "Longueur de piste",
METERS = "Mètre",
FEET = "Pieds",
ELEVATION = "Hauteur",
TOWERFREQ = "Fréquences de la tour",
ILSFREQ = "Fréquences ILS",
OUTERNDB = "Fréquences Outer NDB",
INNERNDB = "Fréquences Inner NDB",
VORFREQ = "Fréquences VOR",
VORFREQTTS = "Fréquences V O R",
TACANCH = "Canal TACAN %d",
RSBNCH = "Canal RSBN",
PRMGCH = "Canal PRMG",
ADVISE = "Informez le contrôle que vous avez copié l'information",
STATUTE = "Statute Miles",
DEGREES = "Degré celcius",
FAHRENHEIT = "Degré Fahrenheit",
INCHHG = "Pouces de mercure",
MMHG = "Millimètres de mercure",
HECTO = "Hectopascals",
METERSPER = "Mètres par seconde",
TACAN = "TAKAN",
FARP = "FARPE",
DELIMITER = "Décimal", -- decimal delimiter
}
} }
--- ---
@@ -890,13 +954,14 @@ _ATIS = {}
--- ATIS class version. --- ATIS class version.
-- @field #string version -- @field #string version
ATIS.version = "0.10.4" ATIS.version = "1.0.0"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Correct fog for elevation. -- TODO: Correct fog for elevation.
-- TODO: Generalize sound files input to be able to use custom made sounds.
-- DONE: Option to add multiple frequencies for SRS -- DONE: Option to add multiple frequencies for SRS
-- DONE: Zulu time --> Zulu in output. -- DONE: Zulu time --> Zulu in output.
-- DONE: Fix for AB not having a runway - Helopost like Naqoura -- DONE: Fix for AB not having a runway - Helopost like Naqoura
@@ -1056,7 +1121,7 @@ end
-- @return #ATIS self -- @return #ATIS self
function ATIS:_InitLocalization() function ATIS:_InitLocalization()
self:T(self.lid.."_InitLocalization") self:T(self.lid.."_InitLocalization")
self.gettext = TEXTANDSOUND:New("AWACS","en") -- Core.TextAndSound#TEXTANDSOUND self.gettext = TEXTANDSOUND:New("ATIS","en") -- Core.TextAndSound#TEXTANDSOUND
self.locale = "en" self.locale = "en"
for locale,table in pairs(self.Messages) do for locale,table in pairs(self.Messages) do
local Locale = string.lower(tostring(locale)) local Locale = string.lower(tostring(locale))
@@ -1078,16 +1143,74 @@ function ATIS:SetLocale(locale)
return self return self
end end
--- Set sound files folder within miz file. --- Set sound files folder within miz file (not your local hard drive!).
-- @param #ATIS self -- @param #ATIS self
-- @param #string path Path for sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end! -- @param #string pathMain Path to folder containing main sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end!
-- @param #string pathAirports Path folder containing the airport names sound files. Default is `"ATIS Soundfiles/<Map Name>"`, *e.g.* `"ATIS Soundfiles/Caucasus/"`.
-- @param #string pathNato Path folder containing the NATO alphabet sound files. Default is "ATIS Soundfiles/NATO Alphabet/".
-- @return #ATIS self -- @return #ATIS self
function ATIS:SetSoundfilesPath( path ) function ATIS:SetSoundfilesPath( pathMain, pathAirports, pathNato )
self.soundpath = tostring( path or "ATIS Soundfiles/" ) self.soundpath = tostring( pathMain or "ATIS Soundfiles/" )
if pathAirports==nil then
self.soundpathAirports=self.soundpath..env.mission.theatre.."/"
else
self.soundpathAirports=pathAirports
end
if pathNato==nil then
self.soundpathNato=self.soundpath.."NATO Alphabet/"
else
self.soundpathNato=pathNato
end
self:T( self.lid .. string.format( "Setting sound files path to %s", self.soundpath ) ) self:T( self.lid .. string.format( "Setting sound files path to %s", self.soundpath ) )
return self return self
end end
--- Set the path to the csv file that contains information about the used sound files.
-- The parameter file has to be located on your local disk (**not** inside the miz file).
-- @param #ATIS self
-- @param #string csvfile Full path to the csv file on your local disk.
-- @return #ATIS self
function ATIS:SetSoundfilesInfo( csvfile )
--- Local function to return the ATIS.Soundfile for a given file name
local function getSound(filename)
for key,_soundfile in pairs(self.Sound) do
local soundfile=_soundfile --#ATIS.Soundfile
if filename==soundfile.filename then
return soundfile
end
end
return nil
end
-- Read csv file
local data=UTILS.ReadCSV(csvfile)
if data then
for i,sound in pairs(data) do
-- Get the ATIS.Soundfile
local soundfile=getSound(sound.filename..".ogg") --#ATIS.Soundfile
if soundfile then
-- Set duration
soundfile.duration=tonumber(sound.duration)
else
self:E(string.format("ERROR: Could not get info for sound file %s", sound.filename))
end
end
else
self:E(string.format("ERROR: Could not read sound csv file!"))
end
return self
end
--- Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles. --- Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles.
-- Best is to place the unit on a parking spot of the airbase and set it to *uncontrolled* in the mission editor. -- Best is to place the unit on a parking spot of the airbase and set it to *uncontrolled* in the mission editor.
-- @param #ATIS self -- @param #ATIS self
@@ -1526,34 +1649,62 @@ function ATIS:MarkRunways( markall )
end end
end end
--- Use SRS Simple-Text-To-Speech for transmissions. No sound files necessary. --- Use SRS Simple-Text-To-Speech for transmissions. No sound files necessary.`SetSRS()` will try to use as many attributes configured with @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #ATIS self -- @param #ATIS self
-- @param #string PathToSRS Path to SRS directory. -- @param #string PathToSRS Path to SRS directory (only necessary if SRS exe backend is used).
-- @param #string Gender Gender: "male" or "female" (default). -- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default). -- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`. -- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port SRS port. Default 5002. -- @param #number Port SRS port. Default 5002.
-- @param #string GoogleKey Path to Google JSON-Key. -- @param #string GoogleKey Path to Google JSON-Key (SRS exe backend) or Google API key (DCS-gRPC backend).
-- @return #ATIS self -- @return #ATIS self
function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey) function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey)
if PathToSRS or MSRS.path then --if PathToSRS or MSRS.path then
self.useSRS=true self.useSRS=true
self.msrs=MSRS:New(PathToSRS, self.frequency, self.modulation)
self.msrs:SetGender(Gender) local path = PathToSRS or MSRS.path
self.msrs:SetCulture(Culture) local gender = Gender or MSRS.gender
self.msrs:SetVoice(Voice) local culture = Culture or MSRS.culture
self.msrs:SetPort(Port) local voice = Voice or MSRS.voice
local port = Port or MSRS.port or 5002
self.msrs=MSRS:New(path, self.frequency, self.modulation)
self.msrs:SetGender(gender)
self.msrs:SetCulture(culture)
self.msrs:SetPort(port)
self.msrs:SetCoalition(self:GetCoalition()) self.msrs:SetCoalition(self:GetCoalition())
self.msrs:SetLabel("ATIS") self.msrs:SetLabel("ATIS")
self.msrs:SetGoogle(GoogleKey) if GoogleKey then
self.msrs:SetProviderOptionsGoogle(GoogleKey,GoogleKey)
self.msrs:SetProvider(MSRS.Provider.GOOGLE)
end
-- Pre-configured Google?
if (not GoogleKey) and self.msrs:GetProvider() == MSRS.Provider.GOOGLE then
voice = Voice or MSRS.poptions.gcloud.voice
end
self.msrs:SetVoice(voice)
self.msrs:SetCoordinate(self.airbase:GetCoordinate()) self.msrs:SetCoordinate(self.airbase:GetCoordinate())
self.msrsQ = MSRSQUEUE:New("ATIS") self.msrsQ = MSRSQUEUE:New("ATIS")
self.msrsQ:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers) self.msrsQ:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
if self.dTQueueCheck<=10 then if self.dTQueueCheck<=10 then
self:SetQueueUpdateTime(90) self:SetQueueUpdateTime(90)
end end
--else
--self:E(self.lid..string.format("ERROR: No SRS path specified!"))
--end
return self
end
--- Set an alternative provider to the one set in your MSRS configuration file.
-- @param #ATIS self
-- @param #string Provider The provider to use. Known providers are: `MSRS.Provider.WINDOWS` and `MSRS.Provider.GOOGLE`
-- @return #ATIS self
function ATIS:SetSRSProvider(Provider)
self:T(self.lid.."SetSRSProvider")
if self.msrs then
self.msrs:SetProvider(Provider)
else else
self:E(self.lid..string.format("ERROR: No SRS path specified!")) MESSAGE:New(self.lid.."Set up SRS first before trying to change the provider!",30,"ATIS"):ToAll():ToLog()
end end
return self return self
end end
@@ -1625,16 +1776,16 @@ function ATIS:onafterStart( From, Event, To )
self.radioqueue:SetRadioPower( self.power ) self.radioqueue:SetRadioPower( self.power )
-- Init numbers. -- Init numbers.
self.radioqueue:SetDigit( 0, ATIS.Sound.N0.filename, ATIS.Sound.N0.duration, self.soundpath ) self.radioqueue:SetDigit( 0, self.Sound.N0.filename, self.Sound.N0.duration, self.soundpath )
self.radioqueue:SetDigit( 1, ATIS.Sound.N1.filename, ATIS.Sound.N1.duration, self.soundpath ) self.radioqueue:SetDigit( 1, self.Sound.N1.filename, self.Sound.N1.duration, self.soundpath )
self.radioqueue:SetDigit( 2, ATIS.Sound.N2.filename, ATIS.Sound.N2.duration, self.soundpath ) self.radioqueue:SetDigit( 2, self.Sound.N2.filename, self.Sound.N2.duration, self.soundpath )
self.radioqueue:SetDigit( 3, ATIS.Sound.N3.filename, ATIS.Sound.N3.duration, self.soundpath ) self.radioqueue:SetDigit( 3, self.Sound.N3.filename, self.Sound.N3.duration, self.soundpath )
self.radioqueue:SetDigit( 4, ATIS.Sound.N4.filename, ATIS.Sound.N4.duration, self.soundpath ) self.radioqueue:SetDigit( 4, self.Sound.N4.filename, self.Sound.N4.duration, self.soundpath )
self.radioqueue:SetDigit( 5, ATIS.Sound.N5.filename, ATIS.Sound.N5.duration, self.soundpath ) self.radioqueue:SetDigit( 5, self.Sound.N5.filename, self.Sound.N5.duration, self.soundpath )
self.radioqueue:SetDigit( 6, ATIS.Sound.N6.filename, ATIS.Sound.N6.duration, self.soundpath ) self.radioqueue:SetDigit( 6, self.Sound.N6.filename, self.Sound.N6.duration, self.soundpath )
self.radioqueue:SetDigit( 7, ATIS.Sound.N7.filename, ATIS.Sound.N7.duration, self.soundpath ) self.radioqueue:SetDigit( 7, self.Sound.N7.filename, self.Sound.N7.duration, self.soundpath )
self.radioqueue:SetDigit( 8, ATIS.Sound.N8.filename, ATIS.Sound.N8.duration, self.soundpath ) self.radioqueue:SetDigit( 8, self.Sound.N8.filename, self.Sound.N8.duration, self.soundpath )
self.radioqueue:SetDigit( 9, ATIS.Sound.N9.filename, ATIS.Sound.N9.duration, self.soundpath ) self.radioqueue:SetDigit( 9, self.Sound.N9.filename, self.Sound.N9.duration, self.soundpath )
-- Start radio queue. -- Start radio queue.
self.radioqueue:Start( 1, 0.1 ) self.radioqueue:Start( 1, 0.1 )
@@ -1884,17 +2035,25 @@ function ATIS:onafterBroadcast( From, Event, To )
local hours = self.gettext:GetEntry("HOURS",self.locale) local hours = self.gettext:GetEntry("HOURS",self.locale)
local sunrise = coord:GetSunrise() local sunrise = coord:GetSunrise()
sunrise = UTILS.Split( sunrise, ":" ) --self:I(sunrise)
local SUNRISE = string.format( "%s%s", sunrise[1], sunrise[2] ) local SUNRISE = "no time"
if self.useSRS then if tostring(sunrise) ~= "N/S" and tostring(sunrise) ~= "N/R" then
SUNRISE = string.format( "%s %s %s", sunrise[1], sunrise[2], hours ) sunrise = UTILS.Split( sunrise, ":" )
SUNRISE = string.format( "%s%s", sunrise[1], sunrise[2] )
if self.useSRS then
SUNRISE = string.format( "%s %s %s", sunrise[1], sunrise[2], hours )
end
end end
local sunset = coord:GetSunset() local sunset = coord:GetSunset()
sunset = UTILS.Split( sunset, ":" ) --self:I(sunset)
local SUNSET = string.format( "%s%s", sunset[1], sunset[2] ) local SUNSET = "no time"
if self.useSRS then if tostring(sunset) ~= "N/S" and tostring(sunset) ~= "N/R" then
SUNSET = string.format( "%s %s %s", sunset[1], sunset[2], hours ) sunset = UTILS.Split( sunset, ":" )
SUNSET = string.format( "%s%s", sunset[1], sunset[2] )
if self.useSRS then
SUNSET = string.format( "%s %s %s", sunset[1], sunset[2], hours )
end
end end
--------------------------------- ---------------------------------
@@ -1985,7 +2144,72 @@ function ATIS:onafterBroadcast( From, Event, To )
-- Precepitation: 0=None, 1=Rain, 2=Thunderstorm, 3=Snow, 4=Snowstorm. -- Precepitation: 0=None, 1=Rain, 2=Thunderstorm, 3=Snow, 4=Snowstorm.
local precepitation = 0 local precepitation = 0
if cloudspreset:find( "Preset10" ) then if cloudspreset:find( "RainyPreset1" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset2" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset3" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset4" ) then
-- Overcast + Rain
clouddens = 5
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset5" ) then
-- Overcast + Rain
clouddens = 5
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset6" ) then
-- Overcast + Rain
clouddens = 5
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
-- NEWRAINPRESET4
elseif cloudspreset:find( "NEWRAINPRESET4" ) then
-- Overcast + Rain
clouddens = 5
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "Preset10" ) then
-- Scattered 5 -- Scattered 5
clouddens = 4 clouddens = 4
elseif cloudspreset:find( "Preset11" ) then elseif cloudspreset:find( "Preset11" ) then
@@ -2066,38 +2290,8 @@ function ATIS:onafterBroadcast( From, Event, To )
elseif cloudspreset:find( "Preset9" ) then elseif cloudspreset:find( "Preset9" ) then
-- Scattered 4 -- Scattered 4
clouddens = 4 clouddens = 4
elseif cloudspreset:find( "RainyPreset" ) then else
-- Overcast + Rain self:E(string.format("WARNING! Unknown weather preset: %s", tostring(cloudspreset)))
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset1" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset2" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
elseif cloudspreset:find( "RainyPreset3" ) then
-- Overcast + Rain
clouddens = 9
if temperature > 5 then
precepitation = 1 -- rain
else
precepitation = 3 -- snow
end
end end
local CLOUDBASE = string.format( "%d", UTILS.MetersToFeet( cloudbase ) ) local CLOUDBASE = string.format( "%d", UTILS.MetersToFeet( cloudbase ) )
@@ -2119,36 +2313,36 @@ function ATIS:onafterBroadcast( From, Event, To )
-- No cloud info for dynamic weather. -- No cloud info for dynamic weather.
local CloudCover = {} -- #ATIS.Soundfile local CloudCover = {} -- #ATIS.Soundfile
CloudCover = ATIS.Sound.CloudsNotAvailable CloudCover = self.Sound.CloudsNotAvailable
--local CLOUDSsub = "Cloud coverage information not available" --local CLOUDSsub = "Cloud coverage information not available"
local CLOUDSsub = self.gettext:GetEntry("NOCLOUDINFO",self.locale) local CLOUDSsub = self.gettext:GetEntry("NOCLOUDINFO",self.locale)
-- Only valid for static weather. -- Only valid for static weather.
if static then if static then
if clouddens >= 9 then if clouddens >= 9 then
-- Overcast 9,10 -- Overcast 9,10
CloudCover = ATIS.Sound.CloudsOvercast CloudCover = self.Sound.CloudsOvercast
--CLOUDSsub = "Overcast" --CLOUDSsub = "Overcast"
CLOUDSsub = self.gettext:GetEntry("OVERCAST",self.locale) CLOUDSsub = self.gettext:GetEntry("OVERCAST",self.locale)
elseif clouddens >= 7 then elseif clouddens >= 7 then
-- Broken 7,8 -- Broken 7,8
CloudCover = ATIS.Sound.CloudsBroken CloudCover = self.Sound.CloudsBroken
--CLOUDSsub = "Broken clouds" --CLOUDSsub = "Broken clouds"
CLOUDSsub = self.gettext:GetEntry("BROKEN",self.locale) CLOUDSsub = self.gettext:GetEntry("BROKEN",self.locale)
elseif clouddens >= 4 then elseif clouddens >= 4 then
-- Scattered 4,5,6 -- Scattered 4,5,6
CloudCover = ATIS.Sound.CloudsScattered CloudCover = self.Sound.CloudsScattered
--CLOUDSsub = "Scattered clouds" --CLOUDSsub = "Scattered clouds"
CLOUDSsub = self.gettext:GetEntry("SCATTERED",self.locale) CLOUDSsub = self.gettext:GetEntry("SCATTERED",self.locale)
elseif clouddens >= 1 then elseif clouddens >= 1 then
-- Few 1,2,3 -- Few 1,2,3
CloudCover = ATIS.Sound.CloudsFew CloudCover = self.Sound.CloudsFew
--CLOUDSsub = "Few clouds" --CLOUDSsub = "Few clouds"
CLOUDSsub = self.gettext:GetEntry("FEWCLOUDS",self.locale) CLOUDSsub = self.gettext:GetEntry("FEWCLOUDS",self.locale)
else else
-- No clouds -- No clouds
CLOUDBASE = nil CLOUDBASE = nil
CLOUDCEIL = nil CLOUDCEIL = nil
CloudCover = ATIS.Sound.CloudsNo CloudCover = self.Sound.CloudsNo
--CLOUDSsub = "No clouds" --CLOUDSsub = "No clouds"
CLOUDSsub = self.gettext:GetEntry("NOCLOUDS",self.locale) CLOUDSsub = self.gettext:GetEntry("NOCLOUDS",self.locale)
end end
@@ -2172,7 +2366,7 @@ function ATIS:onafterBroadcast( From, Event, To )
end end
if not self.useSRS then if not self.useSRS then
--self:I(string.format( "%s/%s.ogg", self.theatre, self.airbasename )) --self:I(string.format( "%s/%s.ogg", self.theatre, self.airbasename ))
self.radioqueue:NewTransmission( string.format( "%s/%s.ogg", self.theatre, self.airbasename ), 3.0, self.soundpath, nil, nil, subtitle, self.subduration ) self.radioqueue:NewTransmission( string.format( "%s.ogg", self.airbasename ), 3.0, self.soundpathAirports, nil, nil, subtitle, self.subduration )
end end
local alltext = subtitle local alltext = subtitle
@@ -2182,8 +2376,8 @@ function ATIS:onafterBroadcast( From, Event, To )
subtitle = string.format( "%s %s", information, NATO ) subtitle = string.format( "%s %s", information, NATO )
local _INFORMATION = subtitle local _INFORMATION = subtitle
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.Information, 0.5, subtitle ) self:Transmission( self.Sound.Information, 0.5, subtitle )
self.radioqueue:NewTransmission( string.format( "NATO Alphabet/%s.ogg", NATO ), 0.75, self.soundpath ) self.radioqueue:NewTransmission( string.format( "%s.ogg", NATO ), 0.75, self.soundpathNato )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2191,7 +2385,7 @@ function ATIS:onafterBroadcast( From, Event, To )
subtitle = string.format( "%s Zulu", ZULU ) subtitle = string.format( "%s Zulu", ZULU )
if not self.useSRS then if not self.useSRS then
self.radioqueue:Number2Transmission( ZULU, nil, 0.5 ) self.radioqueue:Number2Transmission( ZULU, nil, 0.5 )
self:Transmission( ATIS.Sound.Zulu, 0.2, subtitle ) self:Transmission( self.Sound.Zulu, 0.2, subtitle )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2202,9 +2396,9 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Sunrise at %s local time", SUNRISE ) --subtitle = string.format( "Sunrise at %s local time", SUNRISE )
subtitle = string.format( sunrise, SUNRISE ) subtitle = string.format( sunrise, SUNRISE )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.SunriseAt, 0.5, subtitle ) self:Transmission( self.Sound.SunriseAt, 0.5, subtitle )
self.radioqueue:Number2Transmission( SUNRISE, nil, 0.2 ) self.radioqueue:Number2Transmission( SUNRISE, nil, 0.2 )
self:Transmission( ATIS.Sound.TimeLocal, 0.2 ) self:Transmission( self.Sound.TimeLocal, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2213,9 +2407,9 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Sunset at %s local time", SUNSET ) --subtitle = string.format( "Sunset at %s local time", SUNSET )
subtitle = string.format( sunset, SUNSET ) subtitle = string.format( sunset, SUNSET )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.SunsetAt, 0.5, subtitle ) self:Transmission( self.Sound.SunsetAt, 0.5, subtitle )
self.radioqueue:Number2Transmission( SUNSET, nil, 0.5 ) self.radioqueue:Number2Transmission( SUNSET, nil, 0.5 )
self:Transmission( ATIS.Sound.TimeLocal, 0.2 ) self:Transmission( self.Sound.TimeLocal, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2240,17 +2434,17 @@ function ATIS:onafterBroadcast( From, Event, To )
end end
local _WIND = subtitle local _WIND = subtitle
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.WindFrom, 1.0, subtitle ) self:Transmission( self.Sound.WindFrom, 1.0, subtitle )
self.radioqueue:Number2Transmission( WINDFROM ) self.radioqueue:Number2Transmission( WINDFROM )
self:Transmission( ATIS.Sound.At, 0.2 ) self:Transmission( self.Sound.At, 0.2 )
self.radioqueue:Number2Transmission( WINDSPEED ) self.radioqueue:Number2Transmission( WINDSPEED )
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.MetersPerSecond, 0.2 ) self:Transmission( self.Sound.MetersPerSecond, 0.2 )
else else
self:Transmission( ATIS.Sound.Knots, 0.2 ) self:Transmission( self.Sound.Knots, 0.2 )
end end
if turbulence > 0 then if turbulence > 0 then
self:Transmission( ATIS.Sound.Gusting, 0.2 ) self:Transmission( self.Sound.Gusting, 0.2 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2266,12 +2460,12 @@ function ATIS:onafterBroadcast( From, Event, To )
subtitle = string.format( visi, VISIBILITY ) subtitle = string.format( visi, VISIBILITY )
end end
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.Visibilty, 1.0, subtitle ) self:Transmission( self.Sound.Visibilty, 1.0, subtitle )
self.radioqueue:Number2Transmission( VISIBILITY ) self.radioqueue:Number2Transmission( VISIBILITY )
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.Kilometers, 0.2 ) self:Transmission( self.Sound.Kilometers, 0.2 )
else else
self:Transmission( ATIS.Sound.StatuteMiles, 0.2 ) self:Transmission( self.Sound.StatuteMiles, 0.2 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2322,21 +2516,21 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Weather phenomena: %s", wpsub ) --subtitle = string.format( "Weather phenomena: %s", wpsub )
subtitle = string.format( "%s: %s", phenos, wpsub ) subtitle = string.format( "%s: %s", phenos, wpsub )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.WeatherPhenomena, 1.0, subtitle ) self:Transmission( self.Sound.WeatherPhenomena, 1.0, subtitle )
if precepitation == 1 then if precepitation == 1 then
self:Transmission( ATIS.Sound.Rain, 0.5 ) self:Transmission( self.Sound.Rain, 0.5 )
elseif precepitation == 2 then elseif precepitation == 2 then
self:Transmission( ATIS.Sound.ThunderStorm, 0.5 ) self:Transmission( self.Sound.ThunderStorm, 0.5 )
elseif precepitation == 3 then elseif precepitation == 3 then
self:Transmission( ATIS.Sound.Snow, 0.5 ) self:Transmission( self.Sound.Snow, 0.5 )
elseif precepitation == 4 then elseif precepitation == 4 then
self:Transmission( ATIS.Sound.SnowStorm, 0.5 ) self:Transmission( self.Sound.SnowStorm, 0.5 )
end end
if fog then if fog then
self:Transmission( ATIS.Sound.Fog, 0.5 ) self:Transmission( self.Sound.Fog, 0.5 )
end end
if dust then if dust then
self:Transmission( ATIS.Sound.Dust, 0.5 ) self:Transmission( self.Sound.Dust, 0.5 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2362,29 +2556,29 @@ function ATIS:onafterBroadcast( From, Event, To )
subtitle = string.format( cloudbase, cbase, cceil ) subtitle = string.format( cloudbase, cbase, cceil )
end end
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.CloudBase, 1.0, subtitle ) self:Transmission( self.Sound.CloudBase, 1.0, subtitle )
if tonumber( CLOUDBASE1000 ) > 0 then if tonumber( CLOUDBASE1000 ) > 0 then
self.radioqueue:Number2Transmission( CLOUDBASE1000 ) self.radioqueue:Number2Transmission( CLOUDBASE1000 )
self:Transmission( ATIS.Sound.Thousand, 0.1 ) self:Transmission( self.Sound.Thousand, 0.1 )
end end
if tonumber( CLOUDBASE0100 ) > 0 then if tonumber( CLOUDBASE0100 ) > 0 then
self.radioqueue:Number2Transmission( CLOUDBASE0100 ) self.radioqueue:Number2Transmission( CLOUDBASE0100 )
self:Transmission( ATIS.Sound.Hundred, 0.1 ) self:Transmission( self.Sound.Hundred, 0.1 )
end end
-- Ceiling -- Ceiling
self:Transmission( ATIS.Sound.CloudCeiling, 0.5 ) self:Transmission( self.Sound.CloudCeiling, 0.5 )
if tonumber( CLOUDCEIL1000 ) > 0 then if tonumber( CLOUDCEIL1000 ) > 0 then
self.radioqueue:Number2Transmission( CLOUDCEIL1000 ) self.radioqueue:Number2Transmission( CLOUDCEIL1000 )
self:Transmission( ATIS.Sound.Thousand, 0.1 ) self:Transmission( self.Sound.Thousand, 0.1 )
end end
if tonumber( CLOUDCEIL0100 ) > 0 then if tonumber( CLOUDCEIL0100 ) > 0 then
self.radioqueue:Number2Transmission( CLOUDCEIL0100 ) self.radioqueue:Number2Transmission( CLOUDCEIL0100 )
self:Transmission( ATIS.Sound.Hundred, 0.1 ) self:Transmission( self.Sound.Hundred, 0.1 )
end end
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.Meters, 0.1 ) self:Transmission( self.Sound.Meters, 0.1 )
else else
self:Transmission( ATIS.Sound.Feet, 0.1 ) self:Transmission( self.Sound.Feet, 0.1 )
end end
end end
end end
@@ -2412,15 +2606,15 @@ function ATIS:onafterBroadcast( From, Event, To )
end end
local _TEMPERATURE = subtitle local _TEMPERATURE = subtitle
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.Temperature, 1.0, subtitle ) self:Transmission( self.Sound.Temperature, 1.0, subtitle )
if temperature < 0 then if temperature < 0 then
self:Transmission( ATIS.Sound.Minus, 0.2 ) self:Transmission( self.Sound.Minus, 0.2 )
end end
self.radioqueue:Number2Transmission( TEMPERATURE ) self.radioqueue:Number2Transmission( TEMPERATURE )
if self.TDegF then if self.TDegF then
self:Transmission( ATIS.Sound.DegreesFahrenheit, 0.2 ) self:Transmission( self.Sound.DegreesFahrenheit, 0.2 )
else else
self:Transmission( ATIS.Sound.DegreesCelsius, 0.2 ) self:Transmission( self.Sound.DegreesCelsius, 0.2 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2446,15 +2640,15 @@ function ATIS:onafterBroadcast( From, Event, To )
end end
local _DEWPOINT = subtitle local _DEWPOINT = subtitle
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.DewPoint, 1.0, subtitle ) self:Transmission( self.Sound.DewPoint, 1.0, subtitle )
if dewpoint < 0 then if dewpoint < 0 then
self:Transmission( ATIS.Sound.Minus, 0.2 ) self:Transmission( self.Sound.Minus, 0.2 )
end end
self.radioqueue:Number2Transmission( DEWPOINT ) self.radioqueue:Number2Transmission( DEWPOINT )
if self.TDegF then if self.TDegF then
self:Transmission( ATIS.Sound.DegreesFahrenheit, 0.2 ) self:Transmission( self.Sound.DegreesFahrenheit, 0.2 )
else else
self:Transmission( ATIS.Sound.DegreesCelsius, 0.2 ) self:Transmission( self.Sound.DegreesCelsius, 0.2 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2501,33 +2695,33 @@ function ATIS:onafterBroadcast( From, Event, To )
local _ALTIMETER = subtitle local _ALTIMETER = subtitle
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.Altimeter, 1.0, subtitle ) self:Transmission( self.Sound.Altimeter, 1.0, subtitle )
if not self.qnhonly then if not self.qnhonly then
self:Transmission( ATIS.Sound.QNH, 0.5 ) self:Transmission( self.Sound.QNH, 0.5 )
end end
self.radioqueue:Number2Transmission( QNH[1] ) self.radioqueue:Number2Transmission( QNH[1] )
if ATIS.ICAOPhraseology[UTILS.GetDCSMap()] then if ATIS.ICAOPhraseology[UTILS.GetDCSMap()] then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
end end
self.radioqueue:Number2Transmission( QNH[2] ) self.radioqueue:Number2Transmission( QNH[2] )
if not self.qnhonly then if not self.qnhonly then
self:Transmission( ATIS.Sound.QFE, 0.75 ) self:Transmission( self.Sound.QFE, 0.75 )
self.radioqueue:Number2Transmission( QFE[1] ) self.radioqueue:Number2Transmission( QFE[1] )
if ATIS.ICAOPhraseology[UTILS.GetDCSMap()] then if ATIS.ICAOPhraseology[UTILS.GetDCSMap()] then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
end end
self.radioqueue:Number2Transmission( QFE[2] ) self.radioqueue:Number2Transmission( QFE[2] )
end end
if self.PmmHg then if self.PmmHg then
self:Transmission( ATIS.Sound.MillimetersOfMercury, 0.1 ) self:Transmission( self.Sound.MillimetersOfMercury, 0.1 )
else else
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.HectoPascal, 0.1 ) self:Transmission( self.Sound.HectoPascal, 0.1 )
else else
self:Transmission( ATIS.Sound.InchesOfMercury, 0.1 ) self:Transmission( self.Sound.InchesOfMercury, 0.1 )
end end
end end
end end
@@ -2538,41 +2732,55 @@ function ATIS:onafterBroadcast( From, Event, To )
if not self.ATISforFARPs then if not self.ATISforFARPs then
-- Active runway. -- Active runway.
local subtitle = "" local subtitle = ""
if runwayLanding then if runwayLanding and runwayLanding ~= runwayTakeoff then
local actrun = self.gettext:GetEntry("ACTIVELANDING",self.locale) local actrun = self.gettext:GetEntry("ACTIVELANDING",self.locale)
--subtitle=string.format("Active runway landing %s", runwayLanding)
subtitle=string.format("%s %s", actrun, runwayLanding) subtitle=string.format("%s %s", actrun, runwayLanding)
if rwyLandingLeft==true then if rwyLandingLeft==true then
--subtitle=subtitle.." Left"
subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale) subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale)
elseif rwyLandingLeft==false then elseif rwyLandingLeft==false then
--subtitle=subtitle.." Right"
subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale) subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale)
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
if not self.useSRS then
self:Transmission(self.Sound.ActiveRunwayArrival, 1.0, subtitle)
self.radioqueue:Number2Transmission(runwayLanding)
if rwyLandingLeft==true then
self:Transmission(self.Sound.Left, 0.2)
elseif rwyLandingLeft==false then
self:Transmission(self.Sound.Right, 0.2)
end
end
end end
if runwayTakeoff then if runwayTakeoff then
local actrun = self.gettext:GetEntry("ACTIVERUN",self.locale) local actrun = self.gettext:GetEntry("ACTIVERUN",self.locale)
--subtitle=string.format("Active runway %s", runwayLanding)
subtitle=string.format("%s %s", actrun, runwayTakeoff) subtitle=string.format("%s %s", actrun, runwayTakeoff)
if rwyTakeoffLeft==true then if rwyTakeoffLeft==true then
--subtitle=subtitle.." Left"
subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale) subtitle=subtitle.." "..self.gettext:GetEntry("LEFT",self.locale)
elseif rwyTakeoffLeft==false then elseif rwyTakeoffLeft==false then
--subtitle=subtitle.." Right"
subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale) subtitle=subtitle.." "..self.gettext:GetEntry("RIGHT",self.locale)
end end
alltext = alltext .. ";\n" .. subtitle
if not self.useSRS then
self:Transmission(self.Sound.ActiveRunwayDeparture, 1.0, subtitle)
self.radioqueue:Number2Transmission(runwayTakeoff)
if rwyTakeoffLeft==true then
self:Transmission(self.Sound.Left, 0.2)
elseif rwyTakeoffLeft==false then
self:Transmission(self.Sound.Right, 0.2)
end
end
end end
_RUNACT = subtitle _RUNACT = subtitle
if not self.useSRS then
self:Transmission(ATIS.Sound.ActiveRunway, 1.0, subtitle)
self.radioqueue:Number2Transmission(runwayLanding)
if rwyLandingLeft==true then
self:Transmission(ATIS.Sound.Left, 0.2)
elseif rwyLandingLeft==false then
self:Transmission(ATIS.Sound.Right, 0.2)
end
end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
-- Runway length. -- Runway length.
@@ -2601,24 +2809,25 @@ function ATIS:onafterBroadcast( From, Event, To )
-- Transmit. -- Transmit.
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.RunwayLength, 1.0, subtitle ) self:Transmission( self.Sound.RunwayLength, 1.0, subtitle )
if tonumber( L1000 ) > 0 then if tonumber( L1000 ) > 0 then
self.radioqueue:Number2Transmission( L1000 ) self.radioqueue:Number2Transmission( L1000 )
self:Transmission( ATIS.Sound.Thousand, 0.1 ) self:Transmission( self.Sound.Thousand, 0.1 )
end end
if tonumber( L0100 ) > 0 then if tonumber( L0100 ) > 0 then
self.radioqueue:Number2Transmission( L0100 ) self.radioqueue:Number2Transmission( L0100 )
self:Transmission( ATIS.Sound.Hundred, 0.1 ) self:Transmission( self.Sound.Hundred, 0.1 )
end end
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.Meters, 0.1 ) self:Transmission( self.Sound.Meters, 0.1 )
else else
self:Transmission( ATIS.Sound.Feet, 0.1 ) self:Transmission( self.Sound.Feet, 0.1 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
end end
-- Airfield elevation -- Airfield elevation
if self.elevation then if self.elevation then
@@ -2645,19 +2854,19 @@ function ATIS:onafterBroadcast( From, Event, To )
-- Transmit. -- Transmit.
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.Elevation, 1.0, subtitle ) self:Transmission( self.Sound.Elevation, 1.0, subtitle )
if tonumber( L1000 ) > 0 then if tonumber( L1000 ) > 0 then
self.radioqueue:Number2Transmission( L1000 ) self.radioqueue:Number2Transmission( L1000 )
self:Transmission( ATIS.Sound.Thousand, 0.1 ) self:Transmission( self.Sound.Thousand, 0.1 )
end end
if tonumber( L0100 ) > 0 then if tonumber( L0100 ) > 0 then
self.radioqueue:Number2Transmission( L0100 ) self.radioqueue:Number2Transmission( L0100 )
self:Transmission( ATIS.Sound.Hundred, 0.1 ) self:Transmission( self.Sound.Hundred, 0.1 )
end end
if self.metric then if self.metric then
self:Transmission( ATIS.Sound.Meters, 0.1 ) self:Transmission( self.Sound.Meters, 0.1 )
else else
self:Transmission( ATIS.Sound.Feet, 0.1 ) self:Transmission( self.Sound.Feet, 0.1 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2676,16 +2885,16 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Tower frequency %s", freqs ) --subtitle = string.format( "Tower frequency %s", freqs )
subtitle = string.format( "%s %s", twrfrq, freqs ) subtitle = string.format( "%s %s", twrfrq, freqs )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.TowerFrequency, 1.0, subtitle ) self:Transmission( self.Sound.TowerFrequency, 1.0, subtitle )
for _, freq in pairs( self.towerfrequency ) do for _, freq in pairs( self.towerfrequency ) do
local f = string.format( "%.3f", freq ) local f = string.format( "%.3f", freq )
f = UTILS.Split( f, "." ) f = UTILS.Split( f, "." )
self.radioqueue:Number2Transmission( f[1], nil, 0.5 ) self.radioqueue:Number2Transmission( f[1], nil, 0.5 )
if tonumber( f[2] ) > 0 then if tonumber( f[2] ) > 0 then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
self.radioqueue:Number2Transmission( f[2] ) self.radioqueue:Number2Transmission( f[2] )
end end
self:Transmission( ATIS.Sound.MegaHertz, 0.2 ) self:Transmission( self.Sound.MegaHertz, 0.2 )
end end
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2698,15 +2907,15 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "ILS frequency %.2f MHz", ils.frequency ) --subtitle = string.format( "ILS frequency %.2f MHz", ils.frequency )
subtitle = string.format( "%s %.2f MHz", ilstxt, ils.frequency ) subtitle = string.format( "%s %.2f MHz", ilstxt, ils.frequency )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.ILSFrequency, 1.0, subtitle ) self:Transmission( self.Sound.ILSFrequency, 1.0, subtitle )
local f = string.format( "%.2f", ils.frequency ) local f = string.format( "%.2f", ils.frequency )
f = UTILS.Split( f, "." ) f = UTILS.Split( f, "." )
self.radioqueue:Number2Transmission( f[1], nil, 0.5 ) self.radioqueue:Number2Transmission( f[1], nil, 0.5 )
if tonumber( f[2] ) > 0 then if tonumber( f[2] ) > 0 then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
self.radioqueue:Number2Transmission( f[2] ) self.radioqueue:Number2Transmission( f[2] )
end end
self:Transmission( ATIS.Sound.MegaHertz, 0.2 ) self:Transmission( self.Sound.MegaHertz, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2718,15 +2927,15 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Outer NDB frequency %.2f MHz", ndb.frequency ) --subtitle = string.format( "Outer NDB frequency %.2f MHz", ndb.frequency )
subtitle = string.format( "%s %.2f MHz", ndbtxt, ndb.frequency ) subtitle = string.format( "%s %.2f MHz", ndbtxt, ndb.frequency )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.OuterNDBFrequency, 1.0, subtitle ) self:Transmission( self.Sound.OuterNDBFrequency, 1.0, subtitle )
local f = string.format( "%.2f", ndb.frequency ) local f = string.format( "%.2f", ndb.frequency )
f = UTILS.Split( f, "." ) f = UTILS.Split( f, "." )
self.radioqueue:Number2Transmission( f[1], nil, 0.5 ) self.radioqueue:Number2Transmission( f[1], nil, 0.5 )
if tonumber( f[2] ) > 0 then if tonumber( f[2] ) > 0 then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
self.radioqueue:Number2Transmission( f[2] ) self.radioqueue:Number2Transmission( f[2] )
end end
self:Transmission( ATIS.Sound.MegaHertz, 0.2 ) self:Transmission( self.Sound.MegaHertz, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2738,15 +2947,15 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Inner NDB frequency %.2f MHz", ndb.frequency ) --subtitle = string.format( "Inner NDB frequency %.2f MHz", ndb.frequency )
subtitle = string.format( "%s %.2f MHz", ndbtxt, ndb.frequency ) subtitle = string.format( "%s %.2f MHz", ndbtxt, ndb.frequency )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.InnerNDBFrequency, 1.0, subtitle ) self:Transmission( self.Sound.InnerNDBFrequency, 1.0, subtitle )
local f = string.format( "%.2f", ndb.frequency ) local f = string.format( "%.2f", ndb.frequency )
f = UTILS.Split( f, "." ) f = UTILS.Split( f, "." )
self.radioqueue:Number2Transmission( f[1], nil, 0.5 ) self.radioqueue:Number2Transmission( f[1], nil, 0.5 )
if tonumber( f[2] ) > 0 then if tonumber( f[2] ) > 0 then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
self.radioqueue:Number2Transmission( f[2] ) self.radioqueue:Number2Transmission( f[2] )
end end
self:Transmission( ATIS.Sound.MegaHertz, 0.2 ) self:Transmission( self.Sound.MegaHertz, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2762,15 +2971,15 @@ function ATIS:onafterBroadcast( From, Event, To )
subtitle = string.format( "%s %.2f MHz", vorttstxt, self.vor ) subtitle = string.format( "%s %.2f MHz", vorttstxt, self.vor )
end end
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.VORFrequency, 1.0, subtitle ) self:Transmission( self.Sound.VORFrequency, 1.0, subtitle )
local f = string.format( "%.2f", self.vor ) local f = string.format( "%.2f", self.vor )
f = UTILS.Split( f, "." ) f = UTILS.Split( f, "." )
self.radioqueue:Number2Transmission( f[1], nil, 0.5 ) self.radioqueue:Number2Transmission( f[1], nil, 0.5 )
if tonumber( f[2] ) > 0 then if tonumber( f[2] ) > 0 then
self:Transmission( ATIS.Sound.Decimal, 0.2 ) self:Transmission( self.Sound.Decimal, 0.2 )
self.radioqueue:Number2Transmission( f[2] ) self.radioqueue:Number2Transmission( f[2] )
end end
self:Transmission( ATIS.Sound.MegaHertz, 0.2 ) self:Transmission( self.Sound.MegaHertz, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2781,9 +2990,9 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle=string.format("TACAN channel %dX Ray", self.tacan) --subtitle=string.format("TACAN channel %dX Ray", self.tacan)
subtitle=string.format(tactxt, self.tacan) subtitle=string.format(tactxt, self.tacan)
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.TACANChannel, 1.0, subtitle ) self:Transmission( self.Sound.TACANChannel, 1.0, subtitle )
self.radioqueue:Number2Transmission( tostring( self.tacan ), nil, 0.2 ) self.radioqueue:Number2Transmission( tostring( self.tacan ), nil, 0.2 )
self.radioqueue:NewTransmission( "NATO Alphabet/Xray.ogg", 0.75, self.soundpath, nil, 0.2 ) self.radioqueue:NewTransmission( "Xray.ogg", 0.75, self.soundpathNato, nil, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
end end
@@ -2794,7 +3003,7 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "RSBN channel %d", self.rsbn ) --subtitle = string.format( "RSBN channel %d", self.rsbn )
subtitle = string.format( "%s %d", rsbntxt, self.rsbn ) subtitle = string.format( "%s %d", rsbntxt, self.rsbn )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.RSBNChannel, 1.0, subtitle ) self:Transmission( self.Sound.RSBNChannel, 1.0, subtitle )
self.radioqueue:Number2Transmission( tostring( self.rsbn ), nil, 0.2 ) self.radioqueue:Number2Transmission( tostring( self.rsbn ), nil, 0.2 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2807,7 +3016,7 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "PRMG channel %d", ndb.frequency ) --subtitle = string.format( "PRMG channel %d", ndb.frequency )
subtitle = string.format( "%s %d", prmtxt, ndb.frequency ) subtitle = string.format( "%s %d", prmtxt, ndb.frequency )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.PRMGChannel, 1.0, subtitle ) self:Transmission( self.Sound.PRMGChannel, 1.0, subtitle )
self.radioqueue:Number2Transmission( tostring( ndb.frequency ), nil, 0.5 ) self.radioqueue:Number2Transmission( tostring( ndb.frequency ), nil, 0.5 )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2823,8 +3032,8 @@ function ATIS:onafterBroadcast( From, Event, To )
--subtitle = string.format( "Advise on initial contact, you have information %s", NATO ) --subtitle = string.format( "Advise on initial contact, you have information %s", NATO )
subtitle = string.format( "%s %s", advtxt, NATO ) subtitle = string.format( "%s %s", advtxt, NATO )
if not self.useSRS then if not self.useSRS then
self:Transmission( ATIS.Sound.AdviceOnInitial, 0.5, subtitle ) self:Transmission( self.Sound.AdviceOnInitial, 0.5, subtitle )
self.radioqueue:NewTransmission( string.format( "NATO Alphabet/%s.ogg", NATO ), 0.75, self.soundpath ) self.radioqueue:NewTransmission( string.format( "%s.ogg", NATO ), 0.75, self.soundpathNato )
end end
alltext = alltext .. ";\n" .. subtitle alltext = alltext .. ";\n" .. subtitle
@@ -2888,7 +3097,7 @@ function ATIS:onafterReport( From, Event, To, Text )
self:T( "SRS TTS: " .. text ) self:T( "SRS TTS: " .. text )
-- Play text-to-speech report. -- Play text-to-speech report.
local duration = STTS.getSpeechTime(text,0.95) local duration = MSRS.getSpeechTime(text,0.95)
self.msrsQ:NewTransmission(text,duration,self.msrs,nil,2) self.msrsQ:NewTransmission(text,duration,self.msrs,nil,2)
--self.msrs:PlayText( text ) --self.msrs:PlayText( text )
self.SRSText = text self.SRSText = text
@@ -3079,7 +3288,7 @@ end
-- @param #ATIS.Soundfile sound ATIS sound object. -- @param #ATIS.Soundfile sound ATIS sound object.
-- @param #number interval Interval in seconds after the last transmission finished. -- @param #number interval Interval in seconds after the last transmission finished.
-- @param #string subtitle Subtitle of the transmission. -- @param #string subtitle Subtitle of the transmission.
-- @param #string path Path to sound file. Default self.soundpath. -- @param #string path Path to sound file. Default `self.soundpath`.
function ATIS:Transmission( sound, interval, subtitle, path ) function ATIS:Transmission( sound, interval, subtitle, path )
self.radioqueue:NewTransmission( sound.filename, sound.duration, path or self.soundpath, nil, interval, subtitle, self.subduration ) self.radioqueue:NewTransmission( sound.filename, sound.duration, path or self.soundpath, nil, interval, subtitle, self.subduration )
end end

View File

@@ -10,7 +10,7 @@
-- --
-- ## Example Missions: -- ## Example Missions:
-- --
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Airwing). -- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Ops/Airwing).
-- --
-- === -- ===
-- --
@@ -56,6 +56,8 @@
-- @field #boolean despawnAfterHolding Aircraft are despawned after holding. -- @field #boolean despawnAfterHolding Aircraft are despawned after holding.
-- @field #boolean capOptionPatrolRaceTrack Use closer patrol race track or standard orbit auftrag. -- @field #boolean capOptionPatrolRaceTrack Use closer patrol race track or standard orbit auftrag.
-- @field #number capFormation If capOptionPatrolRaceTrack is true, set the formation, also. -- @field #number capFormation If capOptionPatrolRaceTrack is true, set the formation, also.
-- @field #number capOptionVaryStartTime If set, vary mission start time for CAP missions generated random between capOptionVaryStartTime and capOptionVaryEndTime
-- @field #number capOptionVaryEndTime If set, vary mission start time for CAP missions generated random between capOptionVaryStartTime and capOptionVaryEndTime
-- --
-- @extends Ops.Legion#LEGION -- @extends Ops.Legion#LEGION
@@ -132,6 +134,8 @@ AIRWING = {
markpoints = false, markpoints = false,
capOptionPatrolRaceTrack = false, capOptionPatrolRaceTrack = false,
capFormation = nil, capFormation = nil,
capOptionVaryStartTime = nil,
capOptionVaryEndTime = nil,
} }
--- Payload data. --- Payload data.
@@ -183,7 +187,7 @@ AIRWING = {
--- AIRWING class version. --- AIRWING class version.
-- @field #string version -- @field #string version
AIRWING.version="0.9.4" AIRWING.version="0.9.5"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list -- ToDo list
@@ -721,6 +725,17 @@ function AIRWING:SetCapCloseRaceTrack(OnOff)
return self return self
end end
--- Set CAP mission start to vary randomly between Start end End seconds.
-- @param #AIRWING self
-- @param #number Start
-- @param #number End
-- @return #AIRWING self
function AIRWING:SetCapStartTimeVariation(Start, End)
self.capOptionVaryStartTime = Start or 5
self.capOptionVaryEndTime = End or 60
return self
end
--- Set number of TANKER flights with Boom constantly in the air. --- Set number of TANKER flights with Boom constantly in the air.
-- @param #AIRWING self -- @param #AIRWING self
-- @param #number Nboom Number of flights. Default 1. -- @param #number Nboom Number of flights. Default 1.
@@ -1027,6 +1042,9 @@ function AIRWING:onafterStatus(From, Event, To)
-- Check Recon missions. -- Check Recon missions.
self:CheckRECON() self:CheckRECON()
-- Display tactival overview.
self:_TacticalOverview()
---------------- ----------------
-- Transport --- -- Transport ---
---------------- ----------------
@@ -1165,6 +1183,14 @@ function AIRWING:CheckCAP()
end end
if self.capOptionVaryStartTime then
local ClockStart = math.random(self.capOptionVaryStartTime, self.capOptionVaryEndTime)
missionCAP:SetTime(ClockStart)
end
missionCAP.patroldata=patrol missionCAP.patroldata=patrol
patrol.noccupied=patrol.noccupied+1 patrol.noccupied=patrol.noccupied+1
@@ -1398,9 +1424,9 @@ function AIRWING:GetTankerForFlight(flightgroup)
return nil return nil
end end
--- Add the ability to call back an Ops.Awacs#AWACS object with an FSM call "FlightOnMission(FlightGroup, Mission)". --- Add the ability to call back an Ops.AWACS#AWACS object with an FSM call "FlightOnMission(FlightGroup, Mission)".
-- @param #AIRWING self -- @param #AIRWING self
-- @param Ops.Awacs#AWACS ConnectecdAwacs -- @param Ops.AWACS#AWACS ConnectecdAwacs
-- @return #AIRWING self -- @return #AIRWING self
function AIRWING:SetUsingOpsAwacs(ConnectecdAwacs) function AIRWING:SetUsingOpsAwacs(ConnectecdAwacs)
self:I(self.lid .. "Added AWACS Object: "..ConnectecdAwacs:GetName() or "unknown") self:I(self.lid .. "Added AWACS Object: "..ConnectecdAwacs:GetName() or "unknown")
@@ -1409,7 +1435,7 @@ function AIRWING:SetUsingOpsAwacs(ConnectecdAwacs)
return self return self
end end
--- Remove the ability to call back an Ops.Awacs#AWACS object with an FSM call "FlightOnMission(FlightGroup, Mission)". --- Remove the ability to call back an Ops.AWACS#AWACS object with an FSM call "FlightOnMission(FlightGroup, Mission)".
-- @param #AIRWING self -- @param #AIRWING self
-- @return #AIRWING self -- @return #AIRWING self
function AIRWING:RemoveUsingOpsAwacs() function AIRWING:RemoveUsingOpsAwacs()

View File

@@ -70,7 +70,7 @@
-- --
-- ## Example Missions -- ## Example Missions
-- --
-- Example missions can be found [here](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Airboss). -- Example missions can be found [here](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/Ops/Airboss).
-- They contain the latest development Moose.lua file. -- They contain the latest development Moose.lua file.
-- --
-- ## IMPORTANT -- ## IMPORTANT
@@ -255,6 +255,7 @@
-- @field #boolean skipperUturn U-turn on/off via menu. -- @field #boolean skipperUturn U-turn on/off via menu.
-- @field #number skipperOffset Holding offset angle in degrees for Case II/III manual recoveries. -- @field #number skipperOffset Holding offset angle in degrees for Case II/III manual recoveries.
-- @field #number skipperTime Recovery time in min for manual recovery. -- @field #number skipperTime Recovery time in min for manual recovery.
-- @field #boolean intowindold If true, use old into wind calculation.
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
--- Be the boss! --- Be the boss!
@@ -2724,6 +2725,18 @@ function AIRBOSS:SetLSOCallInterval( TimeInterval )
return self return self
end end
--- Set if old into wind calculation is used when carrier turns into the wind for a recovery.
-- @param #AIRBOSS self
-- @param #boolean SwitchOn If `true` or `nil`, use old into wind calculation.
-- @return #AIRBOSS self
function AIRBOSS:SetIntoWindLegacy( SwitchOn )
if SwitchOn==nil then
SwitchOn=true
end
self.intowindold=SwitchOn
return self
end
--- Airboss is a rather nice guy and not strictly following the rules. Fore example, he does allow you into the landing pattern if you are not coming from the Marshal stack. --- Airboss is a rather nice guy and not strictly following the rules. Fore example, he does allow you into the landing pattern if you are not coming from the Marshal stack.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #boolean Switch If true or nil, Airboss bends the rules a bit. -- @param #boolean Switch If true or nil, Airboss bends the rules a bit.
@@ -3062,7 +3075,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
-- SRS -- SRS
local Frequency = self.AirbossRadio.frequency local Frequency = self.AirbossRadio.frequency
local Modulation = self.AirbossRadio.modulation local Modulation = self.AirbossRadio.modulation
self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,Volume,AltBackend) self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,AltBackend)
self.SRS:SetCoalition(self:GetCoalition()) self.SRS:SetCoalition(self:GetCoalition())
self.SRS:SetCoordinate(self:GetCoordinate()) self.SRS:SetCoordinate(self:GetCoordinate())
self.SRS:SetCulture(Culture or "en-US") self.SRS:SetCulture(Culture or "en-US")
@@ -3072,9 +3085,11 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
self.SRS:SetPort(Port or 5002) self.SRS:SetPort(Port or 5002)
self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS") self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS")
self.SRS:SetCoordinate(self.carrier:GetCoordinate()) self.SRS:SetCoordinate(self.carrier:GetCoordinate())
self.SRS:SetVolume(Volume or 1)
--self.SRS:SetModulations(Modulations) --self.SRS:SetModulations(Modulations)
if GoogleCreds then if GoogleCreds then
self.SRS:SetGoogle(GoogleCreds) self.SRS:SetProviderOptionsGoogle(GoogleCreds,GoogleCreds)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
end end
if Voice then if Voice then
self.SRS:SetVoice(Voice) self.SRS:SetVoice(Voice)
@@ -3608,6 +3623,7 @@ function AIRBOSS:onafterStart( From, Event, To )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._PlayerLeft ) self:HandleEvent( EVENTS.PlayerLeaveUnit, self._PlayerLeft )
self:HandleEvent( EVENTS.MissionEnd ) self:HandleEvent( EVENTS.MissionEnd )
self:HandleEvent( EVENTS.RemoveUnit ) self:HandleEvent( EVENTS.RemoveUnit )
self:HandleEvent( EVENTS.UnitLost, self.OnEventRemoveUnit )
-- self.StatusScheduler=SCHEDULER:New(self) -- self.StatusScheduler=SCHEDULER:New(self)
-- self.StatusScheduler:Schedule(self, self._Status, {}, 1, 0.5) -- self.StatusScheduler:Schedule(self, self._Status, {}, 1, 0.5)
@@ -3640,6 +3656,12 @@ function AIRBOSS:onafterStatus( From, Event, To )
local pos = self:GetCoordinate() local pos = self:GetCoordinate()
local speed = self.carrier:GetVelocityKNOTS() local speed = self.carrier:GetVelocityKNOTS()
-- Update magnetic variation if we can get it from DCS.
if require then
self.magvar=pos:GetMagneticDeclination()
--env.info(string.format("FF magvar=%.1f", self.magvar))
end
-- Check water is ahead. -- Check water is ahead.
local collision = false -- self:_CheckCollisionCoord(pos:Translate(self.collisiondist, hdg)) local collision = false -- self:_CheckCollisionCoord(pos:Translate(self.collisiondist, hdg))
@@ -5199,6 +5221,7 @@ function AIRBOSS:_InitVoiceOvers()
TOMCAT = { file = "PILOT-Tomcat", suffix = "ogg", loud = false, subtitle = "", duration = 0.66, subduration = 5 }, TOMCAT = { file = "PILOT-Tomcat", suffix = "ogg", loud = false, subtitle = "", duration = 0.66, subduration = 5 },
HORNET = { file = "PILOT-Hornet", suffix = "ogg", loud = false, subtitle = "", duration = 0.56, subduration = 5 }, HORNET = { file = "PILOT-Hornet", suffix = "ogg", loud = false, subtitle = "", duration = 0.56, subduration = 5 },
VIKING = { file = "PILOT-Viking", suffix = "ogg", loud = false, subtitle = "", duration = 0.61, subduration = 5 }, VIKING = { file = "PILOT-Viking", suffix = "ogg", loud = false, subtitle = "", duration = 0.61, subduration = 5 },
GREYHOUND = { file = "PILOT-Greyhound", suffix = "ogg", loud = false, subtitle = "", duration = 0.61, subduration = 5 },
BALL = { file = "PILOT-Ball", suffix = "ogg", loud = false, subtitle = "", duration = 0.50, subduration = 5 }, BALL = { file = "PILOT-Ball", suffix = "ogg", loud = false, subtitle = "", duration = 0.50, subduration = 5 },
BINGOFUEL = { file = "PILOT-BingoFuel", suffix = "ogg", loud = false, subtitle = "", duration = 0.80 }, BINGOFUEL = { file = "PILOT-BingoFuel", suffix = "ogg", loud = false, subtitle = "", duration = 0.80 },
GASATDIVERT = { file = "PILOT-GasAtDivert", suffix = "ogg", loud = false, subtitle = "", duration = 1.80 }, GASATDIVERT = { file = "PILOT-GasAtDivert", suffix = "ogg", loud = false, subtitle = "", duration = 1.80 },
@@ -6473,7 +6496,7 @@ function AIRBOSS:_LandAI( flight )
or flight.actype == AIRBOSS.AircraftCarrier.RHINOF or flight.actype == AIRBOSS.AircraftCarrier.RHINOF
or flight.actype == AIRBOSS.AircraftCarrier.GROWLER then or flight.actype == AIRBOSS.AircraftCarrier.GROWLER then
Speed = UTILS.KnotsToKmph( 200 ) Speed = UTILS.KnotsToKmph( 200 )
elseif flight.actype == AIRBOSS.AircraftCarrier.E2D then elseif flight.actype == AIRBOSS.AircraftCarrier.E2D or flight.actype == AIRBOSS.AircraftCarrier.C2A then
Speed = UTILS.KnotsToKmph( 150 ) Speed = UTILS.KnotsToKmph( 150 )
elseif flight.actype == AIRBOSS.AircraftCarrier.F14A_AI or flight.actype == AIRBOSS.AircraftCarrier.F14A or flight.actype == AIRBOSS.AircraftCarrier.F14B then elseif flight.actype == AIRBOSS.AircraftCarrier.F14A_AI or flight.actype == AIRBOSS.AircraftCarrier.F14A or flight.actype == AIRBOSS.AircraftCarrier.F14B then
Speed = UTILS.KnotsToKmph( 175 ) Speed = UTILS.KnotsToKmph( 175 )
@@ -8212,7 +8235,7 @@ function AIRBOSS:OnEventBirth( EventData )
self:E( EventData ) self:E( EventData )
return return
end end
if EventData.IniUnit == nil then if EventData.IniUnit == nil and (not EventData.IniObjectCategory == Object.Category.STATIC) then
self:E( self.lid .. "ERROR: EventData.IniUnit=nil in event BIRTH!" ) self:E( self.lid .. "ERROR: EventData.IniUnit=nil in event BIRTH!" )
self:E( EventData ) self:E( EventData )
return return
@@ -9753,7 +9776,7 @@ function AIRBOSS:_Groove( playerData )
local glideslopeError = groovedata.GSE local glideslopeError = groovedata.GSE
local AoA = groovedata.AoA local AoA = groovedata.AoA
if rho <= RXX and playerData.step == AIRBOSS.PatternStep.GROOVE_XX and (math.abs( groovedata.Roll ) <= 4.0 or playerData.unit:IsInZone( self:_GetZoneLineup() )) then if rho <= RXX and playerData.step == AIRBOSS.PatternStep.GROOVE_XX and (math.abs( groovedata.Roll ) <= 4.0 and playerData.unit:IsInZone( self:_GetZoneLineup() )) then
-- Start time in groove -- Start time in groove
playerData.TIG0 = timer.getTime() playerData.TIG0 = timer.getTime()
@@ -11197,7 +11220,7 @@ function AIRBOSS:_AttitudeMonitor( playerData )
end end
text = text .. string.format( "\nPitch=%.1f° | Roll=%.1f° | Yaw=%.1f°", pitch, roll, yaw ) text = text .. string.format( "\nPitch=%.1f° | Roll=%.1f° | Yaw=%.1f°", pitch, roll, yaw )
text = text .. string.format( "\nClimb Angle=%.1f° | Rate=%d ft/min", unit:GetClimbAngle(), velo.y * 196.85 ) text = text .. string.format( "\nClimb Angle=%.1f° | Rate=%d ft/min", unit:GetClimbAngle(), velo.y * 196.85 )
local dist = self:_GetOptLandingCoordinate():Get3DDistance( playerData.unit ) local dist = self:_GetOptLandingCoordinate():Get3DDistance( playerData.unit:GetVec3() )
-- Get player velocity in km/h. -- Get player velocity in km/h.
local vplayer = playerData.unit:GetVelocityKMH() local vplayer = playerData.unit:GetVelocityKMH()
-- Get carrier velocity in km/h. -- Get carrier velocity in km/h.
@@ -11474,7 +11497,7 @@ end
--- Get wind direction and speed at carrier position. --- Get wind direction and speed at carrier position.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #number alt Altitude ASL in meters. Default 15 m. -- @param #number alt Altitude ASL in meters. Default 18 m.
-- @param #boolean magnetic Direction including magnetic declination. -- @param #boolean magnetic Direction including magnetic declination.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate at which to get the wind. Default is current carrier position. -- @param Core.Point#COORDINATE coord (Optional) Coordinate at which to get the wind. Default is current carrier position.
-- @return #number Direction the wind is blowing **from** in degrees. -- @return #number Direction the wind is blowing **from** in degrees.
@@ -11546,10 +11569,31 @@ end
--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. --- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway.
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #number vdeck Desired wind velocity over deck in knots.
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned. -- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. -- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees. -- @return #number Carrier heading in degrees.
function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) -- @return #number Carrier speed in knots to reach desired wind speed on deck.
function AIRBOSS:GetHeadingIntoWind(vdeck, magnetic, coord )
if self.intowindold then
--env.info("FF use OLD into wind")
return self:GetHeadingIntoWind_old(vdeck, magnetic, coord)
else
--env.info("FF use NEW into wind")
return self:GetHeadingIntoWind_new(vdeck, magnetic, coord)
end
end
--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway.
-- @param #AIRBOSS self
-- @param #number vdeck Desired wind velocity over deck in knots.
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees.
function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord )
local function adjustDegreesForWindSpeed(windSpeed) local function adjustDegreesForWindSpeed(windSpeed)
local degreesAdjustment = 0 local degreesAdjustment = 0
@@ -11606,7 +11650,13 @@ function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord )
intowind = intowind + 360 intowind = intowind + 360
end end
return intowind -- Wind speed.
--local _, vwind = self:GetWind()
-- Speed of carrier in m/s but at least 4 knots.
local vtot = math.max(vdeck-UTILS.MpsToKnots(vwind), 4)
return intowind, vtot
end end
--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. --- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway.
@@ -11617,7 +11667,7 @@ end
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. -- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees. -- @return #number Carrier heading in degrees.
-- @return #number Carrier speed in knots to reach desired wind speed on deck. -- @return #number Carrier speed in knots to reach desired wind speed on deck.
function AIRBOSS:GetHeadingIntoWind( vdeck, magnetic, coord ) function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord )
-- Default offset angle. -- Default offset angle.
local Offset=self.carrierparam.rwyangle or 0 local Offset=self.carrierparam.rwyangle or 0
@@ -12121,16 +12171,18 @@ function AIRBOSS:_LSOgrade( playerData )
local GIC, nIC = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IC ) local GIC, nIC = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IC )
local GAR, nAR = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.AR ) local GAR, nAR = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.AR )
-- VTOL approach, which is graded differently (currently only Harrier).
local vtol=playerData.actype==AIRBOSS.AircraftCarrier.AV8B
-- Put everything together. -- Put everything together.
local G = GXX .. " " .. GIM .. " " .. " " .. GIC .. " " .. GAR local G = GXX .. " " .. GIM .. " " .. " " .. GIC .. " " .. GAR
-- Count number of minor, normal and major deviations. -- Count number of minor/small nS, normal nN and major/large deviations nL.
local N=nXX+nIM+nIC+nAR local N=nXX+nIM+nIC+nAR
local Nv=nXX+nIM
local nL=count(G, '_')/2 local nL=count(G, '_')/2
local nS=count(G, '%(') local nS=count(G, '%(')
local nN=N-nS-nL local nN=N-nS-nL
local nNv=Nv-nS-nL
-- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn. -- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn.
local Tgroove=playerData.Tgroove local Tgroove=playerData.Tgroove
@@ -12146,34 +12198,64 @@ function AIRBOSS:_LSOgrade( playerData )
G = "Unicorn" G = "Unicorn"
else else
-- Add AV-8B Harrier devation allowances due to lower groundspeed and 3x conventional groove time, this allows to maintain LSO tolerances while respecting the deviations are not unsafe.--Pene testing if vtol then
-- Large devaitions still result in a No Grade, A Unicorn still requires a clean pass with no deviation.
if nL > 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
-- Larger deviations ==> "No grade" 2.0 points.
grade="--"
points=2.0
elseif nNv >= 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
-- Only average deviations ==> "Fair Pass" Pass with average deviations and corrections.
grade="(OK)"
points=3.0
elseif nNv < 1 and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
-- Only minor average deviations ==> "OK" Pass with minor deviations and corrections. (test nNv<=1 and)
grade="OK"
points=4.0
elseif nL > 0 then
-- Larger deviations ==> "No grade" 2.0 points.
grade="--"
points=2.0
elseif nN> 0 then
-- No larger but average deviations ==> "Fair Pass" Pass with average deviations and corrections.
grade="(OK)"
points=3.0
else
-- Only minor corrections
grade="OK"
points=4.0
end
-- Add AV-8B Harrier devation allowances due to lower groundspeed and 3x conventional groove time, this allows to maintain LSO tolerances while respecting the deviations are not unsafe.--Pene testing
-- Large devaitions still result in a No Grade, A Unicorn still requires a clean pass with no deviation.
-- Normal laning part at the beginning
local Gb = GXX .. " " .. GIM
-- Number of deviations that occurred at the the beginning of the landing (XX or IM). These are graded like in non-VTOL landings, i.e. on deviations is
local N=nXX+nIM
local nL=count(Gb, '_')/2
local nS=count(Gb, '%(')
local nN=N-nS-nL
-- VTOL part of the landing
local Gv = GIC .. " " .. GAR
-- Number of deviations that occurred at the the end (VTOL part) of the landing (IC or AR).
local Nv=nIC+nAR
local nLv=count(Gv, '_')/2
local nSv=count(Gv, '%(')
local nNv=Nv-nSv-nLv
if nL>0 or nLv>1 then
-- Larger deviations at XX or IM or at least one larger deviation IC or AR==> "No grade" 2.0 points.
-- In other words, we allow one larger deviation at IC+AR
grade="--"
points=2.0
elseif nN>0 or nNv>1 or nLv==1 then
-- Average deviations at XX+IM or more than one normal deviation IC or AR ==> "Fair Pass" Pass with average deviations and corrections.
grade="(OK)"
points=3.0
else
-- Only minor corrections
grade="OK"
points=4.0
end
else
-- This is a normal (non-VTOL) landing.
if nL > 0 then
-- Larger deviations ==> "No grade" 2.0 points.
grade="--"
points=2.0
elseif nN> 0 then
-- No larger but average/normal deviations ==> "Fair Pass" Pass with average deviations and corrections.
grade="(OK)"
points=3.0
else
-- Only minor corrections ==> "Okay pass" 4.0 points.
grade="OK"
points=4.0
end
end
end end
-- Replace" )"( and "__" -- Replace" )"( and "__"
@@ -14246,6 +14328,8 @@ function AIRBOSS:_GetACNickname( actype )
nickname = "Harrier" nickname = "Harrier"
elseif actype == AIRBOSS.AircraftCarrier.E2D then elseif actype == AIRBOSS.AircraftCarrier.E2D then
nickname = "Hawkeye" nickname = "Hawkeye"
elseif actype == AIRBOSS.AircraftCarrier.C2A then
nickname = "Greyhound"
elseif actype == AIRBOSS.AircraftCarrier.F14A_AI or actype == AIRBOSS.AircraftCarrier.F14A or actype == AIRBOSS.AircraftCarrier.F14B then elseif actype == AIRBOSS.AircraftCarrier.F14A_AI or actype == AIRBOSS.AircraftCarrier.F14A or actype == AIRBOSS.AircraftCarrier.F14B then
nickname = "Tomcat" nickname = "Tomcat"
elseif actype == AIRBOSS.AircraftCarrier.FA18C or actype == AIRBOSS.AircraftCarrier.HORNET then elseif actype == AIRBOSS.AircraftCarrier.FA18C or actype == AIRBOSS.AircraftCarrier.HORNET then
@@ -14283,32 +14367,55 @@ function AIRBOSS:_GetOnboardNumbers( group, playeronly )
-- Debug text. -- Debug text.
local text = string.format( "Onboard numbers of group %s:", groupname ) local text = string.format( "Onboard numbers of group %s:", groupname )
-- Units of template group. local template=group:GetTemplate()
local units = group:GetTemplate().units
-- Get numbers.
local numbers = {} local numbers = {}
for _, unit in pairs( units ) do if template then
-- Onboard number and unit name. -- Units of template group.
local n = tostring( unit.onboard_num ) local units = template.units
local name = unit.name
local skill = unit.skill or "Unknown"
-- Debug text. -- Get numbers.
text = text .. string.format( "\n- unit %s: onboard #=%s skill=%s", name, n, tostring( skill ) ) for _, unit in pairs( units ) do
if playeronly and skill == "Client" or skill == "Player" then -- Onboard number and unit name.
-- There can be only one player in the group, so we skip everything else. local n = tostring( unit.onboard_num )
return n local name = unit.name
local skill = unit.skill or "Unknown"
-- Debug text.
text = text .. string.format( "\n- unit %s: onboard #=%s skill=%s", name, n, tostring( skill ) )
if playeronly and skill == "Client" or skill == "Player" then
-- There can be only one player in the group, so we skip everything else.
return n
end
-- Table entry.
numbers[name] = n
end end
-- Table entry. -- Debug info.
numbers[name] = n self:T2( self.lid .. text )
end
-- Debug info. else
self:T2( self.lid .. text )
if playeronly then
return 101
else
local units=group:GetUnits()
for i,_unit in pairs(units) do
local name=_unit:GetName()
numbers[name]=100+i
end
end
end
return numbers return numbers
end end
@@ -14573,7 +14680,7 @@ function AIRBOSS:_GetPlayerUnitAndName( _unitName )
-- Get DCS unit from its name. -- Get DCS unit from its name.
local DCSunit = Unit.getByName( _unitName ) local DCSunit = Unit.getByName( _unitName )
if DCSunit then if DCSunit and DCSunit.getPlayerName then
-- Get player name if any. -- Get player name if any.
local playername = DCSunit:getPlayerName() local playername = DCSunit:getPlayerName()
@@ -14957,7 +15064,7 @@ function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture )
self.PilotRadio.gender = Gender or "male" self.PilotRadio.gender = Gender or "male"
self.PilotRadio.culture = Culture or "en-US" self.PilotRadio.culture = Culture or "en-US"
if (not Voice) and self.SRS and self.SRS.google then if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
end end
@@ -15544,7 +15651,7 @@ function AIRBOSS:_Number2Sound( playerData, sender, number, delay )
end end
-- Split string into characters. -- Split string into characters.
local numbers = _split( number ) local numbers = _split( tostring(number) )
local wait = 0 local wait = 0
for i = 1, #numbers do for i = 1, #numbers do
@@ -15606,8 +15713,13 @@ function AIRBOSS:_Number2Radio( radio, number, delay, interval, pilotcall )
Sender = "PilotCall" Sender = "PilotCall"
end end
if Sender=="" then
self:E( self.lid .. string.format( "ERROR: Sender unknown!") )
return
end
-- Split string into characters. -- Split string into characters.
local numbers = _split( number ) local numbers = _split( tostring(number) )
local wait = 0 local wait = 0
for i = 1, #numbers do for i = 1, #numbers do
@@ -17975,7 +18087,7 @@ function AIRBOSS:_MarkCaseZones( _unitName, flare )
self:_GetZoneArcIn( case ):FlareZone( FLARECOLOR.White, 45 ) self:_GetZoneArcIn( case ):FlareZone( FLARECOLOR.White, 45 )
text = text .. "\n* arc turn in with WHITE flares" text = text .. "\n* arc turn in with WHITE flares"
self:_GetZoneArcOut( case ):FlareZone( FLARECOLOR.White, 45 ) self:_GetZoneArcOut( case ):FlareZone( FLARECOLOR.White, 45 )
text = text .. "\n* arc trun out with WHITE flares" text = text .. "\n* arc turn out with WHITE flares"
end end
end end
@@ -18027,7 +18139,7 @@ function AIRBOSS:_MarkCaseZones( _unitName, flare )
self:_GetZoneArcIn( case ):SmokeZone( SMOKECOLOR.Blue, 45 ) self:_GetZoneArcIn( case ):SmokeZone( SMOKECOLOR.Blue, 45 )
text = text .. "\n* arc turn in with BLUE smoke" text = text .. "\n* arc turn in with BLUE smoke"
self:_GetZoneArcOut( case ):SmokeZone( SMOKECOLOR.Blue, 45 ) self:_GetZoneArcOut( case ):SmokeZone( SMOKECOLOR.Blue, 45 )
text = text .. "\n* arc trun out with BLUE smoke" text = text .. "\n* arc turn out with BLUE smoke"
end end
end end

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