Compare commits

..

2448 Commits

Author SHA1 Message Date
Frank
1f20b830b7 Merge branch 'develop' into FF/OpsDev 2025-04-17 21:40:41 +02:00
Frank
0678ad17f8 Merge branch 'master' into develop 2025-04-17 21:34:17 +02:00
Frank
be4beea9d0 Update Airbase.lua
- Removed umlauts and ß in airbase names
2025-04-17 21:34:01 +02:00
Frank
5da899138b Merge pull request #2284 from FlightControl-Master/FF/MasterDevel
Germany CW map
2025-04-17 21:19:48 +02:00
Frank
1ec1e00bde Germany CW map
- ATIS Germany map
- UTILS magnetic declination
2025-04-17 21:19:01 +02:00
Thomas
d7d46d4f1b Merge pull request #2283 from FlightControl-Master/master
Merge from master
2025-04-17 08:45:51 +02:00
Thomas
5d93b33d42 Merge pull request #2282 from shaji-Dev/master
[FIXED] Returns nil for late activated templates we use to mark paths to use in our scripts
2025-04-17 08:44:38 +02:00
shaji
b2077bfc74 [FIXED] Returns nil for late activated templates we use to mark waypoint paths to use in the scripts. 2025-04-16 19:59:13 +02:00
Applevangelist
e958ca103a #EASYGCICAP - make conflict zones setup a bit more explic 2025-04-15 11:45:49 +02:00
Applevangelist
1d9ef869a7 Merge remote-tracking branch 'origin/master' into develop 2025-04-14 12:23:37 +02:00
Applevangelist
6fdf9a649f #AIRBASE rescribe umlauts 2025-04-14 12:23:12 +02:00
Applevangelist
90c6c57449 Merge remote-tracking branch 'origin/master' into develop 2025-04-14 12:11:56 +02:00
Applevangelist
d013bbc751 #STORAGE Enum, some additions 2025-04-14 12:11:27 +02:00
Applevangelist
e0092fdba0 #AIRBASE GermanCW Map airbases 2025-04-14 11:37:45 +02:00
Thomas
ecce2eff9b Merge pull request #2281 from FlightControl-Master/master
Merge
2025-04-12 10:52:39 +02:00
Thomas
fbeada439f Merge pull request #2278 from leka1986/patch-5
Update Group.lua
2025-04-12 10:51:42 +02:00
Thomas
6c8858d2f5 Merge pull request #2280 from leka1986/patch-7
Update Set.lua
2025-04-12 10:51:00 +02:00
Thomas
e2b77878df Merge pull request #2279 from leka1986/patch-6
Update Event.lua
2025-04-12 10:50:39 +02:00
leka1986
53d7972858 Update Set.lua
Removed the Filter={},
2025-04-12 10:48:22 +02:00
leka1986
04a55e4104 Update Event.lua
Added nil checks which was causing nil. had this for a few weeks with no errors.
2025-04-12 10:44:29 +02:00
leka1986
d11acecdac Update Group.lua
Fix for the error attempt to index a nil value called from suppression
2025-04-12 10:26:34 +02:00
Frank
0531b8f57e Merge branch 'FF/Ops' into FF/OpsDev 2025-04-09 22:47:34 +02:00
Frank
98e2997e26 Merge branch 'develop' into FF/OpsDev 2025-04-09 22:43:24 +02:00
Frank
7d3bffcfef Naviation
- Added beacons class
- Added navpoints class
- Added vector class
2025-04-09 22:36:26 +02:00
Frank
5b76ec6b99 Merge branch 'develop' into FF/Ops 2025-04-09 21:17:49 +02:00
Applevangelist
4b23c86daa Merge remote-tracking branch 'origin/master' into develop 2025-04-09 08:16:20 +02:00
Applevangelist
49c11073e6 #MANTIS Mod data updates 2025-04-09 08:15:50 +02:00
Applevangelist
daa5caa125 Merge remote-tracking branch 'origin/master' into develop 2025-04-07 11:57:39 +02:00
Applevangelist
1a156e7e12 #CTLD - make menu build for CA a bit faster 2025-04-07 11:57:15 +02:00
Applevangelist
6fe88a6319 Merge remote-tracking branch 'origin/master' into develop 2025-04-07 10:40:58 +02:00
Applevangelist
1856754614 #Smaller Changes 2025-04-07 10:40:30 +02:00
Thomas
b9f6c1b9c7 Merge pull request #2277 from FlightControl-Master/master
Update docs-header.py
2025-04-06 16:33:05 +02:00
Thomas
6ac452ff15 Update docs-header.py 2025-04-06 16:28:19 +02:00
Applevangelist
b52176a0ff Merge remote-tracking branch 'origin/master' into develop 2025-04-06 16:19:43 +02:00
Applevangelist
d707a4775c xx 2025-04-06 16:19:12 +02:00
Thomas
ffccc31e38 Update CargoGroup.lua 2025-04-06 16:12:13 +02:00
Thomas
0405af2bde Update docs-header.py 2025-04-06 16:04:07 +02:00
Thomas
d09f0b1f6f Update classes-core.md 2025-04-06 15:47:52 +02:00
Thomas
e50e572c78 Update classes-core.md 2025-04-06 15:43:09 +02:00
Applevangelist
2e688e7da1 Merge remote-tracking branch 'origin/master' into develop 2025-04-06 15:38:55 +02:00
Applevangelist
3083599158 #CTLD - Allow CA Ground Transport 2025-04-06 15:38:26 +02:00
Applevangelist
2921f7a76b Merge remote-tracking branch 'origin/master' into develop 2025-04-03 14:22:25 +02:00
Applevangelist
b7b6c1ea19 #RADIOQUEUE - small tweak for a group when a unit dies. 2025-04-03 14:21:58 +02:00
Applevangelist
8a185c352e Merge remote-tracking branch 'origin/master' into develop 2025-04-03 11:49:30 +02:00
Applevangelist
5b107ce2da #CONTROLLABLE:CommandSmokeOnOff(OnOff, Delay) added 2025-04-03 11:48:53 +02:00
Thomas
5c1e342a79 Update classes-core.md 2025-04-03 09:33:49 +02:00
Applevangelist
3fc8f52796 Merge remote-tracking branch 'origin/master' into develop 2025-04-03 09:29:57 +02:00
Applevangelist
ddf33da787 #DYNAMICCARGO - Hover / Sling checks 2025-04-03 09:29:19 +02:00
Thomas
e7cee4d97b Merge pull request #2276 from FlightControl-Master/master
Small fixes
2025-04-02 16:13:50 +02:00
Thomas
b0a192a767 Update DynamicCargo.lua
small fix
2025-04-02 16:12:06 +02:00
Thomas
986c340211 Merge pull request #2275 from FlightControl-Master/Applevangelist-patch-1
Update classes-core.md
2025-04-02 09:54:54 +02:00
Thomas
2109537f86 Update classes-core.md
fix
2025-04-02 09:54:20 +02:00
Thomas
bad9d1ea92 Merge pull request #2274 from FlightControl-Master/master
Fix SpawnStatic
2025-04-02 09:45:44 +02:00
Thomas
690db7f12f Merge pull request #2273 from FlightControl-Master/Applevangelist-SpawnStatic-1
Update SpawnStatic.lua
2025-04-02 09:43:04 +02:00
Thomas
4f3fd06cc9 Update SpawnStatic.lua
Restored previous version as overwritten
2025-04-02 09:42:02 +02:00
Applevangelist
f5b1050086 Merge remote-tracking branch 'origin/master' into develop 2025-04-01 15:27:55 +02:00
Applevangelist
4074023ed3 #DYNAMICCARGO - enhance checks for unloading cargo from hovering Hooks 2025-04-01 15:27:23 +02:00
Applevangelist
f729b1d358 Merge remote-tracking branch 'origin/master' into develop 2025-04-01 14:13:42 +02:00
Applevangelist
6c00b0c7eb #POINT - some catches for POINT_VEC2 behaviour 2025-04-01 14:13:14 +02:00
Applevangelist
5adefe6f7b Merge remote-tracking branch 'origin/master' into develop 2025-04-01 13:18:55 +02:00
Applevangelist
76dc0d690a #POINT - Removal of References to legacy POINT_VEC2/3 classes 2025-04-01 13:17:48 +02:00
Thomas
13c16b8674 Merge pull request #2272 from shaji-Dev/develop
[Fixed] Parameter #1 (unit name) is incorrect
2025-03-31 14:05:41 +02:00
Thomas
222722225e Update OpsGroup.lua
Better make this a unit and alive check
2025-03-31 14:04:07 +02:00
shaji
82e1dcfc04 [Fixed] Parameter #1 (unit name) is incorrect 2025-03-31 13:11:56 +02:00
Thomas
c26220d1fd Merge pull request #2271 from FlightControl-Master/master
DynamicCargo small fixes
2025-03-31 12:32:55 +02:00
Thomas
d783f7be99 Merge pull request #2270 from FlightControl-Master/Applevangelist-patch-1
Update DynamicCargo.lua
2025-03-31 12:31:52 +02:00
Thomas
b66e91b11f Update DynamicCargo.lua
#DYNAMICCARGO small fixes
2025-03-31 12:31:23 +02:00
Applevangelist
dd0b2ace65 Merge remote-tracking branch 'origin/master' into develop 2025-03-30 16:51:23 +02:00
Applevangelist
dc83af4d02 #SHORAD - fix typo for maxscootdist
#CTLD - slight refactoring of fixed wing support.
* Added `CTLD:AddAllowedFixedWingType(typename)` to add new types
* Renamed enabler flags into `enableFixedWing, FixedMinAngels, FixedMaxAngels, FixedMaxSpeed`
* Base support for Mosquito added
2025-03-30 16:50:43 +02:00
Applevangelist
342e901dd1 Merge remote-tracking branch 'origin/master' into develop 2025-03-28 15:05:57 +01:00
Applevangelist
0a38700edb #AI_Patrol - small enhancement 2025-03-28 15:05:30 +01:00
Applevangelist
659615114a xx 2025-03-28 15:04:42 +01:00
Applevangelist
bfd26522d6 Merge remote-tracking branch 'origin/develop' into develop 2025-03-27 11:09:06 +01:00
Applevangelist
00d14c7c0a #PLAYERRECCE - small tweak for visual distance setting 2025-03-27 11:09:01 +01:00
Frank
47c9e1ba1f Update Legion.lua
- Dead assets are removed from cohort & legion
2025-03-23 22:45:15 +01:00
Frank
92e680a276 Merge branch 'master' into develop 2025-03-23 14:11:37 +01:00
Frank
4955fe4d92 Update Spawn.lua
- Fix for problem that helos are not spawned on ships but at origin of the map
2025-03-23 14:11:21 +01:00
Applevangelist
e439bcdd0f Merge remote-tracking branch 'origin/master' into develop 2025-03-22 14:59:08 +01:00
Applevangelist
792aa73832 #AIBRASE - Afghanistan new Airbases 2025-03-22 14:58:24 +01:00
Applevangelist
d375e0ce29 #AUTOLASE - small fix for interval 2025-03-22 10:42:36 +01:00
Applevangelist
e3670219ed Merge remote-tracking branch 'origin/master' into develop 2025-03-21 09:22:36 +01:00
Applevangelist
a915452e6e #COORDINATE - use magnetic for BRAA 2025-03-21 09:22:08 +01:00
Applevangelist
6662a1cf97 Merge remote-tracking branch 'origin/master' into develop 2025-03-16 16:57:38 +01:00
Applevangelist
be8405b72b #MANTIS - fix for data table 2025-03-16 16:57:11 +01:00
Applevangelist
9b24695377 Merge remote-tracking branch 'origin/master' into develop 2025-03-16 13:59:23 +01:00
Applevangelist
5ca3e3b2b8 #SHORAD tweak 2025-03-16 13:58:58 +01:00
Applevangelist
8bbef34b74 Merge remote-tracking branch 'origin/master' into develop 2025-03-16 13:07:19 +01:00
Applevangelist
618a8744a2 #MANTIS - improve point defense behaviour if not SAM to defend is around 2025-03-16 13:06:53 +01:00
Applevangelist
5329da32eb Merge remote-tracking branch 'origin/develop' into develop 2025-03-16 11:02:59 +01:00
Applevangelist
df86c3f2a1 #AUTOLASE - added a function to allow to set the monitoring report frequency 2025-03-16 11:02:55 +01:00
Frank
784fcb7882 Merge branch 'master' into develop 2025-03-15 22:49:57 +01:00
Frank
23aeef7a20 Airbase
- Airbase changes for helipads that are also airdromes
- Improved SpawnAtAirbase function
2025-03-15 22:49:43 +01:00
Applevangelist
0ee24b86dc Merge remote-tracking branch 'origin/master' into develop 2025-03-15 16:30:01 +01:00
Applevangelist
9ac4f136aa #MANTIS - extend scaling for short/point systems to make them more reactive 2025-03-15 16:29:24 +01:00
Applevangelist
ca9b2d79cc Merge remote-tracking branch 'origin/master' into develop 2025-03-15 10:56:34 +01:00
Applevangelist
c9a09c2fc9 #SOUND/MSRS - small fix to delete the "--ssml" tag if google provider is used in conjunction with a file based sound output. 2025-03-15 10:56:13 +01:00
Applevangelist
813286f7f3 Merge remote-tracking branch 'origin/master' into develop 2025-03-14 10:41:13 +01:00
Applevangelist
6028c91f81 #NET small fix if PlayerSlot remains nil 2025-03-14 10:40:52 +01:00
Frank
11b6bb2638 Merge branch 'master' into develop 2025-03-13 16:41:25 +01:00
Frank
3c57928f46 Update Airbase.lua
- Fixed bug in counting the number of parking spots per terminal type
2025-03-13 16:40:57 +01:00
Applevangelist
e091e659a2 Merge remote-tracking branch 'origin/master' into develop 2025-03-13 10:51:00 +01:00
Applevangelist
32f0bb33c3 #ZONE - Trigger added OnAfterZoneEmpty and OnAfterObjectDead 2025-03-13 10:50:15 +01:00
Applevangelist
dea64751c3 Merge remote-tracking branch 'origin/master' into develop 2025-03-12 09:18:43 +01:00
Applevangelist
31d0410284 #TEMPLATES remove files 2025-03-12 08:56:13 +01:00
Applevangelist
9cdf550432 #PLAYERTASKMANAGER - Allow use of multiple drones for lasing of precision bombing tasks 2025-03-12 08:45:08 +01:00
Applevangelist
09525029ab Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2025-03-12 08:44:00 +01:00
Applevangelist
87c436ba34 #STTS - remove from tree 2025-03-12 08:42:38 +01:00
Applevangelist
b1002017e5 Merge remote-tracking branch 'origin/master' into develop 2025-03-11 16:30:07 +01:00
Applevangelist
6e9727e265 xx 2025-03-11 16:29:31 +01:00
Applevangelist
383e953ba1 Merge remote-tracking branch 'origin/master' into develop 2025-03-11 10:52:40 +01:00
Applevangelist
94ee76fe62 #CONTROLLABLE - Improved IR Markers 2025-03-11 10:52:16 +01:00
Frank
9b52b640e6 Merge branch 'master' into develop 2025-03-10 19:53:51 +01:00
Frank
ea23162ca9 Update Spawn.lua
- Enabled explicit parking spots in SpawnAtAirbase
2025-03-10 19:53:24 +01:00
Thomas
68d0220912 Merge pull request #2268 from FlightControl-Master/master
merge from master
2025-03-10 15:35:08 +01:00
Thomas
683388faee Merge pull request #2266 from FlightControl-Master/Applevangelist-IR-1
Update Controllable.lua
2025-03-10 15:32:07 +01:00
Thomas
56ec3920c5 Update Controllable.lua
IR Strobe . some improvements
2025-03-10 13:12:00 +01:00
Thomas
88842d1c67 Merge pull request #2265 from FlightControl-Master/master
Update CTLD.lua
2025-03-10 10:57:19 +01:00
Thomas
f335ffc4ec Update CTLD.lua
Clarify hover min/max height is in meters
2025-03-10 10:55:01 +01:00
Applevangelist
f76aefa976 Merge remote-tracking branch 'origin/master' into develop 2025-03-09 14:37:56 +01:00
Applevangelist
4976cd86f2 ZONE_ELASTIC - function to remove vertices 2025-03-09 14:36:42 +01:00
Frank
2cd66ae1d4 Merge branch 'master' into develop 2025-03-08 21:37:59 +01:00
Frank
c00eff8b23 AIRBASE
- AIRBASE: Workaround for DCS bug that helipads have category of airdrome
- SET_AIRBASE: Added FilterZones function
2025-03-08 21:37:43 +01:00
Applevangelist
7f0376561b Merge remote-tracking branch 'origin/master' into develop 2025-03-06 14:52:15 +01:00
Applevangelist
3c710613a8 CONTROLLABLE added HasIRMarker 2025-03-06 14:51:49 +01:00
Applevangelist
3585208547 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Core/Zone.lua
2025-03-06 12:27:08 +01:00
Applevangelist
29c0017e80 xx 2025-03-06 12:26:24 +01:00
Applevangelist
45ebf9a3c7 #ZONE_ELASTIC - Fix zone filling 2025-03-06 12:25:57 +01:00
Frank
908e505ce3 Merge branch 'master' into develop 2025-03-05 20:48:28 +01:00
Frank
c808e4a4e2 Update Airbase.lua
- Added FighterAircraftSmall parking spot type
2025-03-05 20:48:15 +01:00
Thomas
e129eb97a7 Merge pull request #2263 from FlightControl-Master/master
ATIS
2025-03-03 14:21:02 +01:00
Thomas
e2612b97d7 Merge pull request #2262 from FlightControl-Master/Applevangelist-Atis-Kola
Update ATIS.lua
2025-03-03 14:19:45 +01:00
Thomas
70e9d91bb5 Update ATIS.lua 2025-03-03 14:19:11 +01:00
Thomas
0b8810f8b3 Update ATIS.lua
ATIS - Fix for Kola map when no sunset or sunrise arise and SRS is not used
2025-03-03 14:16:47 +01:00
Applevangelist
3d39ccbdce Merge remote-tracking branch 'origin/master' into develop 2025-03-02 12:40:30 +01:00
Applevangelist
41b867a4ca #GROUP - ensure GROUP:GetCoordinate() returns a group heading data field 2025-03-02 12:40:00 +01:00
Applevangelist
427baa43d7 Merge remote-tracking branch 'origin/master' into develop 2025-02-23 16:12:14 +01:00
Applevangelist
d4e141f3c5 #EASYGCICAP - use onbefore on foreign classes rather than OnAfter to avoid user overwrites 2025-02-23 16:11:36 +01:00
Applevangelist
1c0a8d9380 #SET_CLIENT - added option to handle CA slots
#CONTROLLABLE - fix typos
2025-02-23 16:10:32 +01:00
Thomas
f05680f23d Merge pull request #2259 from FlightControl-Master/master
Master merge
2025-02-23 08:40:49 +01:00
Thomas
2b0b9d44eb Merge pull request #2258 from leka1986/patch-3
Update Controllable.lua
2025-02-23 08:40:00 +01:00
leka1986
2fc7a3b542 Update Controllable.lua
Fixing this error
Line 26056: attempt to index local '_coord' (a nil value)
in this line,
local _tocoord=_coord:GetRandomCoordinateInRadius(_radius,100)
2025-02-23 02:34:04 +01:00
Applevangelist
820ae2759b Merge remote-tracking branch 'origin/master' into develop 2025-02-22 16:36:52 +01:00
Applevangelist
12b596a47f #MANTIS - if no EWR system is left over, MANTIS will switch on a random SR/TR each cycle to detect incoming enemies. 2025-02-22 16:36:15 +01:00
Applevangelist
a06d099917 Merge remote-tracking branch 'origin/master' into develop 2025-02-21 10:43:45 +01:00
Applevangelist
7552309a28 #AUTOLASE - option to make ground units aware of target to be lased 2025-02-21 10:43:14 +01:00
Applevangelist
b9ad5b5ba7 #TARGET - add threat level determination for ZONE and OPSZONE 2025-02-21 10:42:52 +01:00
Applevangelist
8ef781a9ac #SET_BASE - added GetThreatLevelMax() 2025-02-21 10:39:21 +01:00
Applevangelist
5e24e8658b Merge remote-tracking branch 'origin/master' into develop 2025-02-19 17:33:17 +01:00
Applevangelist
43eeaede65 #SET - Error output for Addif the ObjectName variable is empty
#UNIT - Return zero is SpeedMax is nil
2025-02-19 17:32:37 +01:00
Frank
749c5f87de Merge pull request #2257 from leka1986/patch-2
Update Range.lua
2025-02-18 21:37:37 +01:00
leka1986
a520daeb56 Update Range.lua
attempt to index local 'target' (a nil value)

Was using this build in another mission. Added a nilcheck.
env.info('*** MOOSE GITHUB Commit Hash ID: 2025-02-14T06:13:08+01:00-24b320077721d45774acd56b25086ef6bdfb2e5a ***')
2025-02-18 21:23:58 +01:00
Applevangelist
9bb713db10 Merge remote-tracking branch 'origin/master' into develop 2025-02-18 11:14:00 +01:00
Applevangelist
f9ba96f228 #MANTIS - New 4-Tier-Approach 2025-02-18 11:13:23 +01:00
Applevangelist
a49bd23a2a #ATC_GROUND 2025-02-17 08:35:30 +01:00
Thomas
913b2c6d3f Merge pull request #2256 from FlightControl-Master/master
CTLD
2025-02-17 07:01:08 +01:00
Thomas
cea2f18228 Merge pull request #2255 from leka1986/patch-1
Update CTLD.lua
2025-02-17 07:00:18 +01:00
leka1986
fd2d8a5119 Update CTLD.lua
Now in the listcargo, (cargo onboard) I will display CargoName and a number / number instead of listing each crate, 5 lines for 5 crates. 

Now 1 line for each CargoName and 2/2 or 3/3, etc.

"Rescan" have been moved to only show up if it detects lesser then what it's needed when loading.
2025-02-16 17:16:05 +01:00
Thomas
24b3200777 Merge pull request #2254 from FlightControl-Master/master
Tld
2025-02-14 06:13:08 +01:00
Thomas
fa4e0447dd Merge pull request #2253 from leka1986/patch-1
Update CTLD.lua
2025-02-14 06:11:49 +01:00
leka1986
31aa604fc4 Update CTLD.lua
Added _LoadSingleCrateSet Function
Added _refreshLoadCratesMenu Function
Added Event for Takeoff, Land.

Changes to the RefreshF10menus function
the menus does not gets deleted, and rebuild, but only what is inside them. 
So they will remain at the same position. 

tested multiple times
2025-02-14 00:20:23 +01:00
Applevangelist
3518c89791 Merge remote-tracking branch 'origin/master' into develop 2025-02-10 18:03:22 +01:00
Applevangelist
f44db27565 #ATC_GROUND_UNIVERSAL
* Correct usage of airbase names if given
* Exclude FARPs and Ships
2025-02-10 18:02:42 +01:00
Thomas
acaab0c6a9 Merge pull request #2251 from FlightControl-Master/master
CTLD
2025-02-10 06:02:33 +01:00
Thomas
9b1abab73a Merge pull request #2250 from leka1986/master
Update CTLD.lua
2025-02-10 06:01:30 +01:00
leka1986
cad8f15b61 Update CTLD.lua
Reworked the logic of the menu.
Now it will Show be shown :
1. Ammo truck
2. Humvee
3. Ammo truck 1/2 -- 1/2 due to incomplete set.

And for the troops

Squad 8 (2) -- 2 set of squad 8, Selecting this will only deploy 1 set.
Squad 16

Changed so when loading troops, it will state 
Squad 8 boarded. same for the extraction.

I have tested it and it works
Heart8reaker also tested it and no issues so far.
2025-02-09 23:41:16 +01:00
Applevangelist
aafbd8c297 Merge remote-tracking branch 'origin/master' into develop 2025-02-09 12:24:41 +01:00
Applevangelist
1d08bcf2e0 #CTLD docu 2025-02-09 12:24:16 +01:00
Applevangelist
6d38346eb8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2025-02-09 12:05:57 +01:00
Applevangelist
9487a5ae91 #CTLD 2025-02-09 12:05:18 +01:00
Thomas
d2bb6a4fc0 Merge pull request #2248 from leka1986/patch-4
Update CTLD.lua
2025-02-09 12:04:39 +01:00
Applevangelist
c3ccecdd4a #AWACS - Escort vector catch for noobs not reading the description 2025-02-09 12:01:57 +01:00
leka1986
5ad54648ab Update CTLD.lua
Removed the block from partly drop 1. 

It's not helpful for the user to have 1 incomplete a set of crates onboard. 
With this line removed, If someone loads 2 items, and second item is not completed, due to crate limit or due weight, player can unload the uncomplete set.
2025-02-09 11:51:34 +01:00
Applevangelist
96337cc5df #CTLD 2025-02-09 11:48:22 +01:00
Thomas
fa0ce0927b Merge pull request #2247 from leka1986/patch-3
Update CTLD.lua
2025-02-09 11:34:58 +01:00
leka1986
693c2a730f Update CTLD.lua
Added  self:_RefreshDropCratesMenu(Group, Unit) to  function CTLD:_LoadCratesNearby(Group, Unit)
2025-02-09 11:26:38 +01:00
Thomas
0d438a9452 Merge pull request #2246 from FlightControl-Master/master
Ctd changes
2025-02-09 09:23:25 +01:00
Thomas
bc9eee22b7 Merge pull request #2245 from FlightControl-Master/Applevangelist-patch-1
Update CTLD.lua
2025-02-08 14:29:59 +01:00
Thomas
f74d25b31c Update CTLD.lua
Option to unload single cargo items by @lekaa
2025-02-08 14:29:35 +01:00
Applevangelist
66af360ce6 Merge remote-tracking branch 'origin/master' into develop 2025-02-06 16:36:27 +01:00
Applevangelist
ad9893c3ab Merge remote-tracking branch 'origin/develop' into develop 2025-02-06 16:35:03 +01:00
Thomas
1156971d94 Merge pull request #2243 from shaji-Dev/master
[ADDED] `UNIT:IsEWR()`
2025-02-06 12:22:18 +01:00
Shafik
c79b5c37c4 [ADDED] UNIT:IsEWR() 2025-02-06 13:16:03 +02:00
Thomas
b4e6201b68 Merge pull request #2242 from FlightControl-Master/Applevangelist-patch-1
Update Autolase.lua
2025-02-06 08:52:20 +01:00
Thomas
f26d8d6822 Update Autolase.lua
Added option to set offset smoke parameter
2025-02-06 08:52:05 +01:00
Applevangelist
3d0b7b9267 #AUTOLASE - Add offset parameters for autolase:EnableSmokeMenu({Angle=math.random(0,359),Distance=math.random(10,20)}) 2025-02-06 08:50:33 +01:00
Thomas
a2b650a9e3 Merge pull request #2241 from shaji-Dev/master
[FIXED] attempt to index field  (a nil value)
2025-02-03 12:03:04 +01:00
Shafik
905b442e9b [FIXED] attempt to index field (a nil value) 2025-02-03 09:03:43 +02:00
Thomas
7cd95377f9 Merge pull request #2240 from FlightControl-Master/master
Merge from master
2025-02-02 12:54:42 +01:00
Thomas
18fe3112bd Merge pull request #2238 from shaji-Dev/master
[ADDED] Set AI On/Off for units
2025-02-02 12:53:37 +01:00
Thomas
84e85dd0b5 Merge pull request #2239 from shaji-Dev/develop
Develop
2025-02-02 12:53:25 +01:00
Shafik
2744befbab [FIXED] Group not turning off due to conflicting condition checking true and false (if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then)
[FIXED] Units turning on for same coalition aircrafts in radius
2025-02-02 13:27:03 +02:00
Shafik
e87dc525b9 [FIXED] Group not turning off due to conflicting condition checking true and false (if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then)
[FIXED] Units turning on for same coalition aircrafts in radius
2025-02-02 13:25:53 +02:00
Shafik
cc057744ba [ADDED] UNIT:IsSAM() and UNIT:IsAAA() to use used in their respective GROUP functions. 2025-02-02 12:46:55 +02:00
Shafik
db1779e1db [ADDED] Set AI On/Off for units 2025-02-02 11:42:40 +02:00
Applevangelist
ed31b87b2f Merge remote-tracking branch 'origin/master' into develop 2025-02-01 18:40:44 +01:00
Applevangelist
d1e31a3652 #PLAYERRECCE - add parameter for SRS Backend option 2025-02-01 18:40:26 +01:00
Applevangelist
d25a723fc7 #MESSAGE - add parameter for SRS Backend 2025-02-01 18:39:51 +01:00
Applevangelist
3fb4cae7b8 Merge remote-tracking branch 'origin/master' into develop 2025-01-31 14:27:25 +01:00
Applevangelist
f0fe1b431d #SPAWN - Add optional waiting time to InitRepeatOnLanding 2025-01-31 14:26:32 +01:00
Thomas
8e286edd25 Merge pull request #2237 from shaji-Dev/master
[FIXED] attempt to index a nil value
2025-01-31 10:04:01 +01:00
Shafik
74520b1359 [FIXED] attempt to index a nil value (AWACS:_CheckAwacsStatus -> OPSGROUP:GetCallsignName -> GROUP:IsPlayer) 2025-01-31 10:30:18 +02:00
shaji-Dev
0ffcdf2f66 Merge branch 'FlightControl-Master:develop' into develop 2025-01-31 10:21:37 +02:00
Applevangelist
fe0edeb011 Merge remote-tracking branch 'origin/master' into develop 2025-01-30 18:33:06 +01:00
Applevangelist
d06e44d37b #CTLD small additions 2025-01-30 18:32:39 +01:00
Applevangelist
35348d9b81 #UTILS - Added UTILS.Weather for fog stuff 2025-01-30 18:32:25 +01:00
Applevangelist
d06a618582 Merge remote-tracking branch 'origin/master' into develop 2025-01-30 13:20:35 +01:00
Applevangelist
4b16e94eaf #CTLD - Added function for the game designer to get an overview of stock and alive groups, if they want to manage the stock: CTLD:_CountStockPlusInHeloPlusAliveGroups() 2025-01-30 13:19:11 +01:00
Applevangelist
d5253f0420 Merge remote-tracking branch 'origin/master' into develop 2025-01-30 09:04:46 +01:00
Thomas
d983676330 Merge pull request #2236 from Fedge7/fedge/enums-weapons
Fixes AH-64D FCR enum value, adds APKWS.
2025-01-30 06:56:44 +01:00
Fedge
03c30f3cce Adds the 2 primary APKWS rockets as entries in the ENUMS.Storage.weapons.missiles table.
I added them to `missiles`, rather than `nurs` because that's where they appear in the mission editor's storage window.
2025-01-29 18:48:34 -07:00
Fedge
99b93266ad Fixes the AH-64D's FCR enum weapon definition. 2025-01-29 18:47:44 -07:00
Thomas
4530b74367 Merge pull request #2235 from FlightControl-Master/master
merge from master
2025-01-29 15:31:29 +01:00
Thomas
e307b57e67 Merge pull request #2234 from shaji-Dev/master
nil fixes
2025-01-29 13:58:42 +01:00
Shafik
5ef9bb2acd [FIXED] attempt to get length of local 'parking' (a nil value) 2025-01-29 14:44:31 +02:00
Shafik
4aacdc1567 [FIXED] attempt to index local 'CleanUpUnit' (a nil value) 2025-01-29 14:43:43 +02:00
Thomas
57552f4300 Merge pull request #2233 from FlightControl-Master/Applevangelist-patch-3
Update CTLD.lua
2025-01-29 13:24:45 +01:00
Thomas
09d53f7d8c Update CTLD.lua
#CTLD - Added HelicopterLost Event
2025-01-29 13:24:04 +01:00
Shafik
161bdc0413 [FIXED] attempt to concatenate field 'IniGroupName' (a nil value) ?? 2025-01-29 10:13:34 +02:00
Shafik
44ad362dbc [FIXED] attempt to index local 'CleanUpUnit' (a nil value) 2025-01-29 10:06:19 +02:00
Shafik
ea776aeacc [FIXED] attempt to get length of local 'parking' (a nil value) 2025-01-29 10:05:55 +02:00
Frank
e30479329a Merge branch 'master' into develop 2025-01-28 20:29:45 +01:00
Frank
d9948d1a19 Update Group.lua 2025-01-28 20:29:35 +01:00
Frank
b962096661 Update RAT.lua
- Tried to fix bug the Pnow is nil
2025-01-28 20:29:04 +01:00
Frank
725b55a505 Merge branch 'master' into develop 2025-01-28 20:22:57 +01:00
Frank
5f7a4f2bbb Update Group.lua
- Added way to get the coordinate of the group
2025-01-28 20:22:45 +01:00
Thomas
f555399e2f Merge pull request #2231 from FlightControl-Master/master
Master merge
2025-01-28 08:32:34 +01:00
Thomas
1b6945e0b0 Merge pull request #2230 from FlightControl-Master/Applevangelist-patch-2
Update Scenery.lua
2025-01-28 08:31:33 +01:00
Thomas
4fd55b1bd6 Update Scenery.lua
#SCENERY
2025-01-28 08:31:17 +01:00
Applevangelist
fb276cf812 Merge remote-tracking branch 'origin/master' into develop 2025-01-27 18:49:01 +01:00
Applevangelist
41dfaab82a xx 2025-01-27 18:48:39 +01:00
Thomas
20b8deb6de Merge pull request #2228 from FlightControl-Master/Applevangelist-patch-2
Update CTLD.lua
2025-01-27 18:46:07 +01:00
Thomas
6af836c118 Update CTLD.lua 2025-01-27 18:45:39 +01:00
Thomas
f87b8a2c2a Merge pull request #2229 from FlightControl-Master/Applevangelist-patch-3
Update Base.lua
2025-01-27 18:44:50 +01:00
Thomas
daffd7412a Update Base.lua 2025-01-27 18:44:35 +01:00
Thomas
bfb60b318e Update CTLD.lua
update
2025-01-27 13:27:13 +01:00
Thomas
a55959dfbb Update Base.lua
Added property functions
2025-01-27 12:00:25 +01:00
Thomas
4d24eb82be Update CTLD.lua
#CTLD - Add the group name of the extracted group to TroopsExtracted FSM event
2025-01-27 08:51:17 +01:00
Applevangelist
4656d3e019 Merge remote-tracking branch 'origin/develop' into develop 2025-01-26 17:35:11 +01:00
Applevangelist
86b76ba216 Merge remote-tracking branch 'origin/master' into develop 2025-01-26 17:35:06 +01:00
Applevangelist
ff561410ad xx 2025-01-26 17:34:36 +01:00
Applevangelist
e26caa2f74 smaller fixes 2025-01-26 17:34:22 +01:00
Applevangelist
b32d17c2ab Merge remote-tracking branch 'origin/develop' into develop 2025-01-26 14:55:24 +01:00
Applevangelist
29111e1018 xx 2025-01-26 14:55:21 +01:00
Applevangelist
3433ebd665 Merge remote-tracking branch 'origin/master' into develop 2025-01-26 14:54:53 +01:00
Applevangelist
b75fff60c8 xx 2025-01-26 14:54:19 +01:00
Applevangelist
a47fa3f9fc Merge remote-tracking branch 'origin/master' into develop 2025-01-26 13:54:59 +01:00
Applevangelist
4ac57fce7a #CTLD - Added CTLD:GetGenericCargoObjectFromGroupName(GroupName) to get the generic CTLD_CARGO entry from a group name. 2025-01-26 13:54:28 +01:00
Applevangelist
6218b94c99 Merge remote-tracking branch 'origin/develop' into develop 2025-01-26 13:29:57 +01:00
Applevangelist
74a6c89801 Merge remote-tracking branch 'origin/master' into develop 2025-01-26 13:29:53 +01:00
Applevangelist
25a9a0120a #CTLD
- If stock is set, show stock number in menu entries
- Corrected table build for GetStockCrates/Troops/Statics
2025-01-26 13:29:18 +01:00
Thomas
deb0747e66 Merge pull request #2227 from shaji-Dev/develop
[FIXED] `bad argument #2 to 'format' (number expected, got nil)`
2025-01-26 08:38:11 +01:00
Shafik
00f5fde5a8 [FIXED] bad argument #2 to 'format' (number expected, got nil) 2025-01-26 00:19:19 +02:00
Applevangelist
03cd354f9e Merge remote-tracking branch 'origin/master' into develop 2025-01-25 15:55:01 +01:00
Applevangelist
66a1fa8af5 #CTLD - small fix for LoadesGroupsTable inserts 2025-01-25 15:54:29 +01:00
Applevangelist
c2096c8dfd Merge remote-tracking branch 'origin/master' into develop 2025-01-25 15:06:40 +01:00
Applevangelist
1b4033cfce CTLD Small fix for PlayerTask ExtractTroops 2025-01-25 15:04:33 +01:00
Applevangelist
750edf1144 Merge remote-tracking branch 'origin/master' into develop 2025-01-24 12:22:24 +01:00
Applevangelist
48bc41873a #STORAGE - Added small helper to get Syria "H" Helipad warehouses via a zone 2025-01-24 12:21:44 +01:00
Applevangelist
2e54f51229 Merge remote-tracking branch 'origin/develop' into develop 2025-01-24 10:30:29 +01:00
Applevangelist
e39e414e0d Merge remote-tracking branch 'origin/master' into develop 2025-01-24 10:30:25 +01:00
Applevangelist
068a1ab99c #CTLD
- Added `OnAfterLoaded` which gives you access to the rebuild troops and vehicles in a table  of loaded groups, each entry is a table with three values: Group, TimeStamp and CargoType
2025-01-24 10:29:52 +01:00
Thomas
e35d9eb07f Merge pull request #2226 from FlightControl-Master/master
merge from master
2025-01-22 09:45:25 +01:00
Thomas
6551383070 Merge pull request #2225 from FlightControl-Master/Applevangelist-ZoneScaen-1
Update Zone.lua
2025-01-22 09:44:27 +01:00
Thomas
b03978cc3d Update Zone.lua
Correct radius sphere search in  ZONE_RADIUS:SearchZone()
2025-01-22 09:43:57 +01:00
Frank
3a7233b594 Merge branch 'master' into develop 2025-01-19 19:18:26 +01:00
Frank
82f4c5790a Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2025-01-19 19:18:01 +01:00
Frank
5957124e9e ARTY v1.3.3
- Added missing/new arty units to DB (min/max firing range)
- Adjusted immobile speed check because some DCS units report a speed of 1 m/s
2025-01-19 19:17:59 +01:00
Applevangelist
7c91b9847b Merge remote-tracking branch 'origin/master' into develop 2025-01-19 18:23:19 +01:00
Applevangelist
92a05ca74a #CTLD - If troops or vehicles have a stock set, you can only inject as many as there are in stock. Specifically, when using persistence, the load function will restrict to inject more objects than are in stock, each inject draws on the stock. 2025-01-19 18:22:25 +01:00
Applevangelist
a3c13c8cea #PLAYERTASK - added option for custom player callsigns
#PLAYERRECCE - added option for custom player callsigns
#PLAYERRECCE - added KIOWA support
2025-01-19 17:41:17 +01:00
Frank
d02b5db6dd Merge branch 'master' of https://github.com/FlightControl-Master/MOOSE 2025-01-18 22:34:25 +01:00
Frank
bd074728fe Update Artillery.lua
- Update Arty DB
2025-01-18 22:34:21 +01:00
Applevangelist
8d87531464 #PLAYERRECCE - Add standard FOW for Kiowa 2025-01-18 15:32:08 +01:00
Applevangelist
5fbd3d9525 Merge remote-tracking branch 'origin/master' into develop 2025-01-18 15:30:33 +01:00
Applevangelist
61b7b3ead6 Smaller fixes 2025-01-18 15:30:03 +01:00
Applevangelist
8f2178a79c Merge remote-tracking branch 'origin/master' into develop 2025-01-17 09:56:00 +01:00
Applevangelist
72bb23ed0d xx 2025-01-17 09:55:12 +01:00
Applevangelist
7f7999e3e5 #CSAR - Make the list of downed pilots' coordinate dependent on _SETTINGS global or pilot 2025-01-17 09:54:41 +01:00
Applevangelist
0a08e3fdac Merge remote-tracking branch 'origin/master' into develop 2025-01-17 09:22:32 +01:00
Applevangelist
b522b38d31 #SCENERY - Some fixes for kissing getLife function on some objects, and life points being zero on some objects 2025-01-17 09:21:48 +01:00
Thomas
646a2aec66 Merge pull request #2221 from FlightControl-Master/Applevangelist-awacs-1
Update Awacs.lua
2025-01-15 15:34:36 +01:00
Thomas
7392cb9bf3 Update Awacs.lua
#AWACS - clarify use of escort parameters and template
2025-01-15 12:14:14 +01:00
Frank
2e77988473 Merge branch 'master' into develop 2025-01-14 10:36:27 +01:00
Frank
b2dc7bc232 ARTY v1.3.2
- Fixed bug that MLRS does not fire (ammo count if weapon type is auto)
2025-01-14 10:36:12 +01:00
Applevangelist
1b25220729 #AWACS - make # of escorts required assets 2025-01-13 12:38:53 +01:00
Applevangelist
4953000565 Merge remote-tracking branch 'origin/develop' into develop 2025-01-13 11:46:56 +01:00
Applevangelist
01b7575bca #AWACS
- Fix a logic error: cancel the Escort mission when the replacement has arrived
- Workaround for a situation where a player has a checkin-entry in the menu and a managed group entry at the same time - which should not be the case.
- Added Escort options for formation and relative position behind the AWACS
2025-01-13 11:46:51 +01:00
Frank
f6e6dcac9a OPSGROUP ARTY
- Fixed bug in surface type for coord in range
- Improved search for coord in range
- Added option to set mission waypoint
2025-01-12 23:54:44 +01:00
Applevangelist
93c307d9dd Merge remote-tracking branch 'origin/develop' into develop 2025-01-12 17:10:32 +01:00
Applevangelist
852c18cef8 Merge remote-tracking branch 'origin/master' into develop 2025-01-12 17:10:27 +01:00
Applevangelist
def622a02c #CTLD - InjectTroops - if precision coords is true, do also not randomize unit positions. 2025-01-12 17:09:31 +01:00
Frank
acfe1a856e Update OpsGroup.lua
- Added surface type check for ARTY mission
- Improved search for coordinate in range
- Added option to specify distance conversion for weapon ranges
2025-01-11 23:38:15 +01:00
Thomas
9f1f6af647 Merge pull request #2220 from FlightControl-Master/master
Merge master
2025-01-11 10:17:39 +01:00
Thomas
30bedb39f1 Merge pull request #2219 from FlightControl-Master/Applevangelist-patch-1
Update Unit.lua
2025-01-11 10:14:44 +01:00
Thomas
fbcc4ee32b Update Unit.lua
GetSTN fix if template os nil
2025-01-11 10:14:03 +01:00
Thomas
27571cc22f Merge pull request #2217 from shaji-Dev/develop
Develop
2025-01-11 10:04:44 +01:00
Shafik
1182a5eb1e [FIXED] attempt to index field 'IniDCSGroup' (a nil value) 2025-01-10 21:40:03 +02:00
Applevangelist
5f57c71c62 Merge remote-tracking branch 'origin/develop' into develop 2025-01-08 13:05:28 +01:00
Applevangelist
c0d60b1bcf Merge remote-tracking branch 'origin/master' into develop 2025-01-08 13:05:24 +01:00
Applevangelist
63c68d729b #SET_GROUP - fix for lost event if IniDCSGroup isn't filled 2025-01-08 13:04:30 +01:00
Thomas
5fe29e2ba1 Merge pull request #2214 from FlightControl-Master/Applevangelist-patch-3
Update Auftrag.lua
2025-01-07 09:22:12 +01:00
Thomas
16ff1ac3e7 Update Auftrag.lua
#AUFTRAG Added some options for weapontype setting
2025-01-07 09:21:26 +01:00
Applevangelist
0e4f805e1c Merge remote-tracking branch 'origin/develop' into develop 2025-01-06 17:33:09 +01:00
Applevangelist
5f29bdc7a7 Merge remote-tracking branch 'origin/master' into develop 2025-01-06 17:33:04 +01:00
Applevangelist
04f8f6d512 xx 2025-01-06 17:32:29 +01:00
Thomas
f4768aff07 Merge pull request #2213 from FlightControl-Master/master
Master merge
2025-01-06 14:21:42 +01:00
Thomas
b74d46f762 Merge pull request #2211 from FlightControl-Master/Applevangelist-spawn-1
Update Spawn.lua
2025-01-06 14:20:23 +01:00
Thomas
02decc3901 Merge pull request #2212 from Rolln-dev/rolln/range
#RANGE - Changed parameter naming to fix docs
2025-01-06 14:19:02 +01:00
Rolln
dcdea16624 #RANGE - Changed parameter naming to fix docs 2025-01-06 06:15:35 -07:00
Thomas
2635cf6345 Update Spawn.lua
#SPAWN Added option to use the center of the zone rather than a random postion when using InitRandomizeZone
2025-01-06 14:08:05 +01:00
Applevangelist
578c65196c Merge remote-tracking branch 'origin/master' into develop 2025-01-05 17:45:08 +01:00
Applevangelist
64fb24ce96 Merge remote-tracking branch 'origin/develop' into develop 2025-01-05 17:44:37 +01:00
Applevangelist
45dd7117c7 #CLIENTMENUMANAGER Add a retry loop if possibly client not yet exists in Database 2025-01-05 17:44:32 +01:00
Applevangelist
e86069d39c Smaller updates 2025-01-05 17:43:12 +01:00
Thomas
e9db714937 Merge pull request #2210 from FlightControl-Master/master
Master merhe
2025-01-05 10:21:40 +01:00
Thomas
fdcf153b0b Merge pull request #2209 from shaji-Dev/master
[FIXED] `attempt to call method 'GetPlayerName' (a nil value)`
2025-01-05 10:20:23 +01:00
Shafik
8523b7e20a [FIXED] attempt to call method 'GetPlayerName' (a nil value) 2025-01-05 10:47:14 +02:00
Frank
29b992bf81 Merge pull request #2208 from Rolln-dev/rolln/range
ENHANCEMENT: Adds a ceiling to the range.
2025-01-04 19:15:33 +01:00
Rolln
4c52509d6d ENHANCEMENT: Adds a ceiling to the range. 2025-01-04 11:06:39 -07:00
Applevangelist
8d603a0cef Merge remote-tracking branch 'origin/master' into develop 2025-01-04 18:26:32 +01:00
Applevangelist
9bc067f2e8 #STORAGE - Switched saving items from the storage inventory to using the enumerator (+~120 items), better handling of table IDs. 2025-01-04 18:25:32 +01:00
Applevangelist
5fbe0d9a70 #ENUMS - Added items to the storage enumerator, some number corrections 2025-01-04 18:23:24 +01:00
Shafik
4c1c36ef46 [FIXED] attempt to call method 'GetPlayerName' (a nil value) 2025-01-04 16:16:03 +02:00
Applevangelist
067fbcaeaf Merge remote-tracking branch 'origin/develop' into develop 2025-01-04 13:25:38 +01:00
Applevangelist
f0aad83d53 Merge remote-tracking branch 'origin/master' into develop 2025-01-04 13:25:33 +01:00
Applevangelist
474f767e56 #CTLD - Clarify doc for Hook loadable stuff 2025-01-04 13:24:51 +01:00
Frank
be062061d5 Update Auftrag.lua
- Improved docs for ARTY
2025-01-02 23:01:49 +01:00
Frank
eeca95c77f Merge branch 'develop' into FF/Ops 2025-01-02 20:49:06 +01:00
Applevangelist
ac5dfab82f #PLAYERRECCE - Fine tune check when a unit is dead or just per se has less than 2 LifePoints 2025-01-02 17:22:39 +01:00
Applevangelist
13d5f4ac99 Merge remote-tracking branch 'origin/master' into develop 2025-01-02 17:07:29 +01:00
Applevangelist
f9030be843 xx 2025-01-02 17:06:53 +01:00
Applevangelist
3cea1cc78c #PLAYERRECCE - allow to display add'l location in report as per user settings for laser and visual targets. 2025-01-02 16:20:47 +01:00
Applevangelist
37c1423c9f Merge remote-tracking branch 'origin/master' into develop 2025-01-02 13:20:55 +01:00
Applevangelist
538e35d8f0 xx 2025-01-02 13:20:18 +01:00
Applevangelist
d23f029953 Merge remote-tracking branch 'origin/master' into develop 2025-01-02 11:19:39 +01:00
Applevangelist
aafa37f80d Merge remote-tracking branch 'origin/develop' into develop 2025-01-02 11:19:16 +01:00
Applevangelist
203f0c8abc #docu 2025-01-02 11:18:44 +01:00
Thomas
1c0e6362a1 Merge pull request #2205 from shaji-Dev/Heartbreaker
[FIXED] OpsZone never goes to `Attacked` state if `threatlevelCapture` is higher than 0.
2025-01-02 07:31:11 +01:00
Shafik
68165cee75 [FIXED] OpsZone never goes to Attacked state if threatlevelCapture is higher than 0. 2025-01-01 23:08:30 +02:00
Applevangelist
8ef5f0b3f6 Merge remote-tracking branch 'origin/master' into develop 2025-01-01 17:56:35 +01:00
Applevangelist
d0736b0b56 #SHORAD - Switch shorad group back to green&no emissions&scoot if it's directly attacked by a missile 2025-01-01 17:55:55 +01:00
Applevangelist
2fbcd9d2b9 Merge remote-tracking branch 'origin/master' into develop 2025-01-01 14:38:43 +01:00
Applevangelist
15b1ed028e #MANTIS - better handling of stats, verbose dist calc in km, coord in MGRS0 now 2025-01-01 14:38:07 +01:00
Applevangelist
a611a38181 Merge remote-tracking branch 'origin/master' into develop 2025-01-01 09:14:46 +01:00
Applevangelist
008617a35c #MANTIS - Fix for Checkloop if no Sharad instance is alive 2025-01-01 09:14:07 +01:00
Thomas
81a403f02d Merge pull request #2204 from FlightControl-Master/master
Update Mantis.lua
2025-01-01 08:32:57 +01:00
Thomas
6144a61a2e Update Mantis.lua
Fix for zones count on possible empty variables
2025-01-01 08:31:06 +01:00
Applevangelist
df102fba6c Merge remote-tracking branch 'origin/master' into develop 2024-12-31 15:35:23 +01:00
Applevangelist
5d192abd25 #SEAD - Add AGM_65 2024-12-31 15:34:46 +01:00
Applevangelist
902f6dae11 Merge remote-tracking branch 'origin/master' into develop 2024-12-31 14:05:41 +01:00
Applevangelist
62337f445a #CTLD - Save and load special static shapes, if they are set 2024-12-31 14:04:46 +01:00
Applevangelist
b38c1c5827 xx 2024-12-30 14:42:03 +01:00
Thomas
8309768735 Merge pull request #2203 from shaji-Dev/Heartbreaker
Mankind saved.
2024-12-30 13:40:54 +01:00
Shafik
42e6b57296 Mankind saved. 2024-12-30 14:09:25 +02:00
Shafik
2835ec812f Mankind saved. 2024-12-30 14:08:04 +02:00
Applevangelist
990161729b Merge remote-tracking branch 'origin/master' into develop 2024-12-30 11:47:11 +01:00
Applevangelist
c08cee2317 #STORAGE Documentation for persistence 2024-12-30 11:45:31 +01:00
Frank
e406fb0c88 Update Brigade.lua 2024-12-29 21:02:56 +01:00
Applevangelist
e1ea4322a1 Merge remote-tracking branch 'origin/master' into develop 2024-12-29 18:08:45 +01:00
Applevangelist
0f7759d070 #STORAGE - Added StartAutoSave and StopAutoSave() 2024-12-29 18:04:42 +01:00
Applevangelist
6523c4473f Merge remote-tracking branch 'origin/master' into develop 2024-12-29 12:53:35 +01:00
Applevangelist
4a0842bea6 #STORAGE - Added persistence options 2024-12-29 12:52:51 +01:00
Applevangelist
3745e6a8d8 Merge remote-tracking branch 'origin/master' into develop 2024-12-28 14:52:54 +01:00
Applevangelist
3b3666c5f7 #AIRBASE add 2 Kola bases, correct #ENUM for OH-58D weps in STORAGE 2024-12-28 14:52:09 +01:00
Thomas
9e1a28f7ca Merge pull request #2202 from Fedge7/personal/fedge/enums-weapons-oh58-dec2024
Corrects the table values for OH58 weapon enums for patch `2.9.11.4686.`
2024-12-28 09:26:46 +01:00
Fedge
82c7e921eb Corrects the table values for OH58 weapon enums for patch 2.9.11.4686. 2024-12-27 18:48:30 -07:00
Applevangelist
67ccf532ea Merge remote-tracking branch 'origin/master' into develop 2024-12-27 14:41:15 +01:00
Applevangelist
45912911ee #MSRS Google 2025 voice catalog 2024-12-27 14:40:32 +01:00
Applevangelist
c7fe42d919 Merge remote-tracking branch 'origin/master' into develop 2024-12-27 12:26:31 +01:00
Applevangelist
9916afaa49 #COORDINATE Adding names to smoke to be able to switch them off earlier 2024-12-27 12:25:25 +01:00
Applevangelist
55c5a23616 #CTLD Bugfix in selecting correct helo distance when hover/ground for the Chinook 2024-12-27 12:25:00 +01:00
Applevangelist
7b6df08268 #AUTOLASE - Somewhat nicer report display 2024-12-27 12:24:26 +01:00
Applevangelist
9300050573 Merge remote-tracking branch 'origin/master' into develop 2024-12-26 17:18:28 +01:00
Applevangelist
6bee1cc88e Small additions 2024-12-26 17:16:43 +01:00
Applevangelist
c94767a715 Merge remote-tracking branch 'origin/develop' into develop 2024-12-22 13:00:49 +01:00
Applevangelist
7aa3169523 #AWACS - add a mission parameter to ensure selection of AWACS aircraft 2024-12-22 13:00:46 +01:00
Frank
cf86eacb16 Merge branch 'master' into develop 2024-12-18 22:04:55 +01:00
Frank
43ab4d5f38 Update Warehouse.lua
- Removed trace output of qitem and queue because it stalls the game when written to log file
2024-12-18 22:04:38 +01:00
Applevangelist
aa064a1d0e Merge remote-tracking branch 'origin/master' into develop 2024-12-18 12:35:32 +01:00
Applevangelist
21240a60de #AUFTRAG, OpsGroup - added speed option for mission hold, ingress and egress wpts 2024-12-18 12:35:13 +01:00
Applevangelist
0427c0d3a7 #CTLD - Added GetLoadedCargo(Unit) 2024-12-18 12:34:30 +01:00
Applevangelist
3f632b92e2 Merge remote-tracking branch 'origin/master' into develop 2024-12-18 11:35:39 +01:00
Applevangelist
014750ea7f #SET - Documentation fixes 2024-12-18 11:35:13 +01:00
Applevangelist
548b80969a Merge remote-tracking branch 'origin/master' into develop 2024-12-17 12:46:44 +01:00
Applevangelist
e4bbfce314 #MANTIS
- Better status overview
- Some fixes for SHORAD setup
2024-12-17 12:45:45 +01:00
Applevangelist
278f1db9a9 Merge remote-tracking branch 'origin/master' into develop 2024-12-15 13:35:03 +01:00
Applevangelist
359429b17e #GROUP added Teleport(Coordinate) function leveraging Respawn(). Now also translate routes if there are any. 2024-12-15 13:34:13 +01:00
Applevangelist
f151271cb1 Merge remote-tracking branch 'origin/master' into develop 2024-12-15 11:42:04 +01:00
Applevangelist
6001f6abda #EVENT - another fix for scenery without getName function 2024-12-15 11:41:24 +01:00
Applevangelist
18e5012546 Merge remote-tracking branch 'origin/master' into develop 2024-12-15 11:33:35 +01:00
Applevangelist
fd9b5d8d16 #AIRBASE type fix for single Helipad 2024-12-15 11:33:01 +01:00
Frank
da3ee13582 Merge branch 'master' into develop 2024-12-15 10:01:13 +01:00
Frank
b6f184388a ATIS
- Fixed length of niner sound file
2024-12-15 10:00:59 +01:00
Frank
903c065b74 Merge branch 'master' into develop 2024-12-14 16:55:36 +01:00
Frank
d8471698ab Merge pull request #2197 from FlightControl-Master/FF/MasterDevel
SPAWNSTATIC
2024-12-14 16:54:50 +01:00
Frank
6204cecbbd SPAWNSTATIC
- moved AddStatic to after static spawn fixing registration of spawned static
2024-12-14 16:54:39 +01:00
Frank
ddeca49916 Merge pull request #2196 from FlightControl-Master/FF/MasterDevel
DATABASE (fix for SPAWNSTATIC)
2024-12-14 13:48:40 +01:00
Frank
d8dcf37886 DATABASE
- Fixed error that static was not returned in `DATABASE:AddStatic()` (leads to issues if a static object with the same name is spawned)
- Other minor changes
2024-12-14 13:48:04 +01:00
Frank
5ae41a208b Merge branch 'master' into FF/MasterDevel 2024-12-14 11:29:57 +01:00
Applevangelist
0462d900e6 xx 2024-12-13 12:08:54 +01:00
Applevangelist
4fb2ad88bc #OpsGroup - fix holding condition for FG at holding coordinate 2024-12-13 12:07:31 +01:00
Applevangelist
ea55e90e62 Merge remote-tracking branch 'origin/develop' into develop 2024-12-12 13:11:58 +01:00
Applevangelist
6025c05f33 #AUFTRAG #OPSGROUP Handling of Ingress and Holding points for FlightGroups 2024-12-12 13:11:54 +01:00
Frank
64f854e646 Merge branch 'master' into develop 2024-12-12 00:22:59 +01:00
Frank
0f962461e1 DCS Iraq update
- `AIRBASE`: Added Iraq airports to enums
- `ATIS`: Added missing maps to enums
- `UTILS`: Added missing maps to enums
2024-12-12 00:22:44 +01:00
Frank
62dfb5b5ff OPS update
- Set destination base to airwing base for flight groups
- Restored setting of home, destination and current base in OPSGROUP
- Fixed bug if no airbase associated with airwing in check rescuehelo
- Added check that cohort names are unique
- Removed InitWaypoints function from FLIGHTGROUP (obsolete)
2024-12-11 22:49:40 +01:00
Applevangelist
171af5a3c3 #AUFTRAG, #OPSGROUP - Better functionality for Ingress Points (used as IP Holding Point when combined with a push condition) 2024-12-11 16:45:05 +01:00
Applevangelist
874548d1c1 Merge remote-tracking branch 'origin/master' into develop 2024-12-11 14:18:51 +01:00
Applevangelist
aadc03c38d #CTLD Added option/value for my_ctld.TroopUnloadDistHoverHook 2024-12-11 14:17:58 +01:00
Applevangelist
fb0aeafaa2 Merge remote-tracking branch 'origin/master' into develop 2024-12-11 13:58:23 +01:00
Applevangelist
683fa13bb2 #WEAPON - fix for name not available on target 2024-12-11 13:57:55 +01:00
Applevangelist
d3bd55a290 Merge remote-tracking branch 'origin/master' into develop 2024-12-11 13:54:33 +01:00
Applevangelist
e4408a964d #MANTIS - update CHM assets 2024-12-11 13:54:01 +01:00
Frank
1fbe78b667 Merge pull request #2195 from FlightControl-Master/FF/Ops
OPSGROUP v1.0.3
2024-12-10 22:50:30 +01:00
Frank
4902e0f597 OPSGROUP v1.0.3
- fixes for (naval) teleporting
2024-12-10 22:44:44 +01:00
Thomas
34e248b1c3 Merge pull request #2194 from shaji-Dev/Heartbreaker
[Fixed] FlightGroup do not RTB because of incorrect `destbase` assignment.
2024-12-10 19:08:42 +01:00
shaji
5a05917bc2 [Fixed] FlightGroup do not RTB because of incorrect destbase assignment. 2024-12-10 19:04:09 +01:00
Frank
98a613261c Update OpsGroup.lua
- Delayed spawn
2024-12-09 23:32:24 +01:00
Frank
ee880a893e OPSGROUP
- Improved respawn behaviour
2024-12-08 22:47:16 +01:00
Applevangelist
7e8555d6b7 #EASYGCICAP - allow multiple EWR string prefixes in a table 2024-12-08 18:56:28 +01:00
Applevangelist
0a6bdd6e04 #SET_OPSGROUP - fix for teleport/respawn 2024-12-06 14:07:09 +01:00
Frank
f97f33ab59 ATIS v1.1.0
- Added dynamic fog
2024-12-06 00:09:15 +01:00
Frank
f59102ee09 Merge branch 'master' into FF/MasterDevel 2024-12-05 21:06:06 +01:00
Applevangelist
de304d6bb9 Merge remote-tracking branch 'origin/develop' into develop 2024-12-05 10:56:31 +01:00
Applevangelist
73181e3f45 xx 2024-12-05 10:56:27 +01:00
Frank
e42e4e1ddf Merge branch 'master' into FF/MasterDevel 2024-12-03 21:15:46 +01:00
Thomas
86e899f39b Merge pull request #2192 from FlightControl-Master/master
Update Mantis.lua
2024-12-03 18:10:06 +01:00
Thomas
a30079c45b Update Mantis.lua
Less noise
2024-12-03 18:07:38 +01:00
Frank
f644d49e71 OPS Speed
- `AUFTRAG` Fixed speed unit conversion in multiple AUFTRAG types (DCS task parameter speed should be in m/s)
- `OPSGROUP`: Fixed unit conversion for engage target speed
2024-12-01 14:56:02 +01:00
Applevangelist
c0b09b03d9 Merge remote-tracking branch 'origin/master' into develop 2024-11-30 16:20:14 +01:00
Applevangelist
50ffd9aba6 #MANTIS - Correct detail data check is run even if automode isn't defined 2024-11-30 16:19:51 +01:00
Applevangelist
4d4138c1e6 Merge remote-tracking branch 'origin/master' into develop 2024-11-28 09:47:43 +01:00
Frank
936fec1f49 Update Range.lua 2024-11-26 23:06:31 +01:00
Applevangelist
9625d87dd5 #NET - fix for net.force_player_slot(PlayerID, SideID, SlotID ) not working at all - destroy blocked client instead 2024-11-26 10:43:20 +01:00
Frank
c4d0319bb2 Merge branch 'master' into develop 2024-11-24 21:54:19 +01:00
Frank
802139205c Update Unit.lua
- Fixed bug in `UNIT:GetDCSObject()` when DCS unit does not exist.
2024-11-24 21:54:05 +01:00
Frank
6022a3905f TARGET v0.7.1
- Fixed bug if TARGET is a COORDINATE or ZONE, where we cannot check if it is alive or dead. The count alive previously did not count coordinates or zones. Now it does, which is more consistent as we set life=1 and alive=true for these.
2024-11-23 22:10:26 +01:00
Frank
6f724c62fb Merge branch 'master' into develop 2024-11-21 23:44:13 +01:00
Frank
fb918cb2a4 Update DCS.lua 2024-11-21 23:43:58 +01:00
Frank
1a74f112ef Merge branch 'master' into develop 2024-11-21 23:13:18 +01:00
Frank
abb4de46d7 Controllable Detection Improvements/Fixes
- Fixed bug in detection functions for optical detection (enum incorrect)
- Fixed bug in order of return values of `CONTROLLABLE:IsTargetDetected` (both hoggit and DCS are WRONG and MOOSE adopted it).
2024-11-21 23:13:05 +01:00
Frank
5747c49abf Merge branch 'develop' of https://github.com/FlightControl-Master/MOOSE into develop 2024-11-20 11:15:09 +01:00
Frank
b87930738a TARGET v0.7
- Bug fixes
- Improved FSM function docs
2024-11-20 11:15:05 +01:00
Thomas
d2c78516f5 Merge pull request #2191 from shaji-Dev/Heartbreaker
[Added] OPSZONE:SetDrawZoneForCoalition
2024-11-19 06:44:13 +01:00
shaji
93cff96794 [Added] OPSZONE:SetDrawZoneForCoalition to set if zone is drawn on the F10 map for the owner coalition only instead for all. Useful for recon tasking and fog of war. 2024-11-19 00:42:37 +01:00
Thomas
75e80a0091 Merge pull request #2190 from shaji-Dev/Heartbreaker
Added usage docs
2024-11-18 18:36:47 +01:00
shaji
46d2c9c196 [Added] Usage to doc for PLAYERTASK:AddStaticObjectSuccessCondition, PLAYERTASK:AddOpsZoneCaptureSuccessCondition, PLAYERTASK:AddReconSuccessCondition, PLAYERTASK:AddTimeLimitFailureCondition 2024-11-18 09:25:00 +01:00
Applevangelist
6f61d160af Documentation 2024-11-18 08:54:21 +01:00
Thomas
13419171a9 Merge pull request #2189 from shaji-Dev/Heartbreaker
New New Capture OpsZone PlayerTask and Time Limit Conditions
2024-11-18 06:17:00 +01:00
shaji
147cfea587 [Added] New Capture OpsZone PlayerTask with OPSZONE and SET_OPSZONE targets
[Added] Task "Time Limit" failure condition `PLAYERTASK:AddTimeLimitFailureCondition(TimeLimit)`
[Added] `PLAYERTASK:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix, Coalition)`
[Added] `PLAYERTASK:_CheckCaptureOpsZoneSuccess`
2024-11-18 02:35:05 +01:00
Applevangelist
c27da8e54e Merge remote-tracking branch 'origin/develop' into develop 2024-11-17 16:23:10 +01:00
Applevangelist
f3c8b4c1cd Merge remote-tracking branch 'origin/master' into develop 2024-11-17 16:23:06 +01:00
Frank
09e1883488 Merge branch 'master' into develop 2024-11-15 23:22:00 +01:00
Frank
dce9631399 Update Event.lua
- Set `Event.IniGroupName` from db in case group does not exist any more
2024-11-15 23:21:50 +01:00
Thomas
fb2ba1dea0 Merge pull request #2188 from shaji-Dev/Heartbreaker
Docs update PLAYERTASK:AddReconSuccessCondition
2024-11-11 12:19:49 +01:00
Shafik
19073534dd Docs update for:
PLAYERTASK:AddReconSuccessCondition
2024-11-11 12:45:25 +02:00
Thomas
23080e3cc4 Merge pull request #2187 from shaji-Dev/Heartbreaker
PLAYERTASK Added helper functions
2024-11-10 14:56:24 +01:00
Shafik
b50d3fa809 [Added] Constructor PLAYERTASK:NewFromTarget that determines task type based on the target object
[Added] `PLAYERTASK:_GetTaskTypeForTarget` to get the task type based on target description
[Added] `PLAYERTASKCONTROLLER.Scores` for RECON, ESCORT and CAP
[Added] `PLAYERTASK:AddStaticObjectSuccessCondition` task success condition for dead STATIC, SET_STATIC, SCENERY or SET_SCENERY targets
[Added] `PLAYERTASK:AddReconSuccessCondition` for AUFTRAG.Type.RECON tasks for when a client is at a certain LOS distance from the target
2024-11-10 15:41:21 +02:00
Shafik
1f191cf9bb [Added] Constructor PLAYERTASK:NewFromTarget that determines task type based on the target object
[Added] `PLAYERTASK:_GetTaskTypeForTarget` to get the task type based on target description
[Added] `PLAYERTASKCONTROLLER.Scores` for RECON, ESCORT and CAP
[Added] `PLAYERTASK:AddStaticObjectSuccessCondition` task success condition for dead STATIC, SET_STATIC, SCENERY or SET_SCENERY targets
[Added] `PLAYERTASK:AddReconSuccessCondition` for AUFTRAG.Type.RECON tasks for when a client is at a certain LOS distance from the target
2024-11-10 15:37:16 +02:00
Thomas
6c773786d2 Merge pull request #2186 from FlightControl-Master/Applevangelist-patch-2
Update Enums.lua
2024-11-10 13:46:00 +01:00
Thomas
8939963187 Update Enums.lua
OH58d weapons
2024-11-10 13:45:44 +01:00
Thomas
e3fb693cb7 Merge pull request #2185 from Fedge7/personal/fedge/enums-weapons-oh58
Corrects the table values for OH58 weapon enums.
2024-11-10 13:44:01 +01:00
Fedge
7cc11f55bb Corrects the table values for OH58 weapon enums.
After seeing FARP rearming broken for the OH58 in a recent DCS update, I checked all these enum values and updated them by referencing a freshly-created MIZ. I dropped a FARP and added a unique quantity of all the OH58's weapons to the FARP's warehouse. The values were then scraped from the MIZ's `warehouse` lua file.
2024-11-08 00:09:18 -07:00
Thomas
f9747d1c4c Merge pull request #2184 from FlightControl-Master/Applevangelist-pwsh-1
Update SRS.lua
2024-11-04 14:49:56 +01:00
Thomas
60a3d3409e Update SRS.lua
#MSRS Test to get the pwsh window to minimize
2024-11-04 14:49:26 +01:00
Applevangelist
cd8cbc54c8 Merge remote-tracking branch 'origin/master' into develop 2024-10-31 18:16:32 +01:00
Applevangelist
b72124c0d9 #CONTROLLABLE Corrected parameter omissions 2024-10-31 18:16:02 +01:00
Applevangelist
0d6a1644e2 Merge remote-tracking branch 'origin/master' into develop 2024-10-31 16:06:00 +01:00
Applevangelist
d51e761b26 #CONTROLLABLE - Rollback changes for EPLRS command 2024-10-31 16:05:24 +01:00
Applevangelist
1ebe8b82ec Merge remote-tracking branch 'origin/master' into develop 2024-10-30 17:10:25 +01:00
Applevangelist
1445ef61a0 #AIRBASE - added bases from 2.9.9.2280 2024-10-30 17:09:38 +01:00
Applevangelist
f82490f0d5 Merge remote-tracking branch 'origin/master' into develop 2024-10-29 13:57:56 +01:00
Applevangelist
dfe2ed2a98 #EVENT - Fix for TgtUnit Name being unobtainable 2024-10-29 13:57:21 +01:00
Applevangelist
bb5c044a25 Merge remote-tracking branch 'origin/master' into develop 2024-10-29 13:19:40 +01:00
Applevangelist
be87103b53 #CTLD - fixed a collision when extracting on a possible distance key duplication 2024-10-29 13:18:55 +01:00
Applevangelist
54f7627f9c Merge remote-tracking branch 'origin/master' into develop 2024-10-29 11:37:44 +01:00
Applevangelist
2fb460c4bb #ATC_Ground - stop kicking players immediately for speeding 2024-10-29 11:37:06 +01:00
Applevangelist
1b3c94cc57 Merge remote-tracking branch 'origin/master' into develop 2024-10-27 13:25:41 +01:00
Applevangelist
216ea230a8 #BASE - Roll back to "old" serialize method for Trace 2024-10-27 13:25:13 +01:00
Applevangelist
7e727620a4 Merge remote-tracking branch 'origin/develop' into develop 2024-10-26 18:45:45 +02:00
Applevangelist
13ec9bcdd4 Merge remote-tracking branch 'origin/master' into develop 2024-10-26 18:45:40 +02:00
Applevangelist
90096163ee EPLRS - give group ID only if ground 2024-10-26 18:45:01 +02:00
Thomas
d2564d4a54 Merge pull request #2183 from FlightControl-Master/master
Merge from master
2024-10-21 11:35:35 +02:00
Thomas
cd178d6a8c Merge pull request #2182 from FlightControl-Master/Applevangelist-patch-1
Update MarkerOps_Base.lua
2024-10-21 11:33:14 +02:00
Thomas
2aa0b5ddfb Update MarkerOps_Base.lua
Added data to FSM events
2024-10-21 11:32:47 +02:00
Applevangelist
cf6e026392 Merge remote-tracking branch 'origin/master' into develop 2024-10-11 08:06:29 +02:00
Applevangelist
37f819458a #AIRBOSS - Change event Land to event RunwayTouch 2024-10-11 08:06:05 +02:00
Applevangelist
16fb0c3081 Merge remote-tracking branch 'origin/master' into develop 2024-10-08 10:05:56 +02:00
Applevangelist
168f4301d2 #GROUP - extended options to create callsigns for TTS with own function 2024-10-08 10:05:31 +02:00
Applevangelist
9fb03d9d8a xx 2024-10-08 10:04:05 +02:00
Applevangelist
d89ed535b7 Merge remote-tracking branch 'origin/master' into develop 2024-10-03 14:06:42 +02:00
Applevangelist
08b4b890ce #AWACS - added option to increase mission range from 100nm as default 2024-10-03 14:06:26 +02:00
Applevangelist
d5a406c60f #MSRS experimental - option to use PowerShell to execute SRS-TTS - set MSRS.UsePowerShell = true to test it. Known issue - PS window does not close until everything is executed. 2024-10-03 14:05:51 +02:00
Applevangelist
cb16210577 #SEAD - better event management of weapons, return earlier if no (H)ARM, return if SEAD Plane is nil 2024-10-03 14:03:06 +02:00
Applevangelist
8c0e0de45f xx 2024-10-01 12:10:21 +02:00
Applevangelist
3524cba4ef xx 2024-10-01 12:08:51 +02:00
Applevangelist
df6a37a972 Merge remote-tracking branch 'origin/develop' into develop 2024-10-01 12:06:24 +02:00
Applevangelist
13600ff6fd Merge remote-tracking branch 'origin/master' into develop 2024-10-01 12:06:17 +02:00
Frank
a957bb4968 Merge branch 'master' into develop 2024-10-01 09:08:03 +02:00
Frank
5f8d1cf5b0 Update Warehouse.lua
- Added check for incorrect plane attribute
2024-10-01 09:07:51 +02:00
Thomas
a115267e08 Merge pull request #2181 from DarthZyll/patch-6
Update CSAR.lua - Updated correct type name for Kiowa to OH58D
2024-10-01 06:19:29 +02:00
Applevangelist
37998fbf1d Merge remote-tracking branch 'origin/master' into develop 2024-09-30 11:36:06 +02:00
Applevangelist
846aa823d4 fixes for #SEAD and #SPAWN 2024-09-30 11:35:25 +02:00
Applevangelist
0d877853eb Merge remote-tracking branch 'origin/master' into develop 2024-09-27 11:58:08 +02:00
Applevangelist
68298fc585 #EVENT Fix for scenery sometimes nit having a getName() function 2024-09-27 11:57:40 +02:00
Applevangelist
b97a7cf387 Merge remote-tracking branch 'origin/master' into develop 2024-09-26 09:07:20 +02:00
Applevangelist
e9d75f6d94 #CSAR Beacon Name Fix 2024-09-26 09:06:57 +02:00
Applevangelist
1dce2eb747 Merge remote-tracking branch 'origin/develop' into develop 2024-09-26 09:03:05 +02:00
Applevangelist
7c110d90cd Merge remote-tracking branch 'origin/master' into develop 2024-09-26 09:03:00 +02:00
Mike Young
2ecc02ce4d Update CSAR.lua - Updated correct type name for Kiowa to OH58D
Update CSAR.lua - Updated correct type name for Kiowa to OH58D - original Brykeller change
2024-09-26 01:05:38 -04:00
Thomas
8fa5277417 Merge pull request #2178 from brykeller/patch-2
Kiowa rescues sit on the skids, no doors need to be opened
2024-09-26 06:55:02 +02:00
Thomas
7cce5745af Merge pull request #2177 from DarthZyll/patch-5
Update CSAR.lua for BeaconName being built incorrectly
2024-09-26 06:54:20 +02:00
Thomas
231f1f236d Merge pull request #2180 from brykeller/patch-3
Update CTLD.lua to update the correct Kiowa typename to OH58D
2024-09-26 06:53:21 +02:00
Bryan Keller
ece0a46f97 Update CTLD.lua to update the correct Kiowa typename to OH58D
Update CTLD.lua to update the correct Kiowa typename to OH58D
2024-09-25 18:59:26 -07:00
Bryan Keller
2c9b0b8376 Kiowa rescues sit on the skids, no doors need to be opened
Kiowa rescues sit on the skids, no doors need to be opened
2024-09-25 18:51:31 -07:00
Mike Young
76577c03e7 Update CSAR.lua for BeaconName being built incorrectly
Prior to this change, the F10 menu "List Active CSAR" is always blank even after a CSAR activity occurs
2024-09-25 21:13:22 -04:00
Applevangelist
48d30250a0 Merge remote-tracking branch 'origin/master' into develop 2024-09-23 12:44:14 +02:00
Applevangelist
a798f2d61c Small fixes 2024-09-23 12:43:39 +02:00
Applevangelist
d0f8b1436b #EASYGCICAP - Alert5 typo correction, typo corrected to assign correct coalition side 2024-09-23 10:21:05 +02:00
Applevangelist
ddc5e0f86e Merge remote-tracking branch 'origin/master' into develop 2024-09-15 19:25:08 +02:00
Applevangelist
ae08c87822 #CTLD 2024-09-15 19:24:24 +02:00
Thomas
ae880e9d1c Merge pull request #2176 from Maintenance-Partnership-Systems/Minor-Doco-Fixes
Minor doco fixes
2024-09-15 11:16:08 +02:00
Michael Barnes
101d2e1de5 More incorrect AIRBASE constants in examples. 2024-09-15 18:48:42 +10:00
Michael Barnes
f6b7708567 Fixed some outdated references to AIRBASE constants in examples. 2024-09-15 18:34:18 +10:00
Applevangelist
051286acd1 #SPAWN - Tuning measures from DEVELOP encorporated 2024-09-08 13:24:09 +02:00
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
bdec6eb82d Merge branch 'FF/Ops' into FF/OpsDev 2024-07-07 11:33:44 +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
Frank
9bdacfbcf7 Merge branch 'develop' into FF/OpsDev 2024-07-01 16:46:22 +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
Frank
be2eda25df Merge branch 'develop' into FF/OpsDev 2024-06-27 21:31:24 +02: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
fa8e1d2a56 Merge branch 'FF/Ops' into FF/OpsDev 2024-06-19 07:53:54 +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
Frank
5242754c60 Merge branch 'FF/Ops' into FF/OpsDev 2024-04-26 14:33:05 +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
Frank
3dbafd7a19 Update Astar.lua 2024-04-20 14:34:15 +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
56e751193a Merge branch 'FF/Ops' into FF/OpsDev 2024-04-04 09:35:53 +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
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
b2b258cff0 Merge branch 'FF/Ops' into FF/OpsDev 2024-03-30 22:32:42 +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
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
371b100672 xxx 2024-03-27 14:40:47 +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
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
75068a2a26 Merge branch 'FF/Ops' into FF/OpsDev 2024-03-24 17:25: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
13cdb77957 xxx 2024-03-24 13:22:54 +01:00
Applevangelist
caedc314b7 xx 2024-03-23 15:12:16 +01:00
Applevangelist
d7963bb161 xx 2024-03-22 16:04:58 +01:00
Applevangelist
e86afefe79 xxx 2024-03-22 09:27:58 +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
b66ff35b63 #minor fixes 2024-03-15 10:25:58 +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
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
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
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
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
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
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
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
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
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
d7fd9d0968 xxx 2024-03-07 10:20:02 +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
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
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
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
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
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
d9cfaaaa0d SCORING 2024-02-29 09:53:46 +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
1e954de951 #BRIGADE Fixes to save/loadback assets for persistence 2024-02-27 18:13:41 +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
d291e7417d CTLD 2024-02-27 10:19:48 +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
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
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
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
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
fdfc21187c sss 2024-02-22 11:52:54 +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
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
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
15cee84695 Minor fixes 2024-02-20 12:07:08 +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
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
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
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
48b20299b2 xx 2024-02-13 16:45:20 +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
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
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
969a658e15 CLIENTMENUMANAGER - docu 2024-02-04 13:11:57 +01:00
Applevangelist
a66ad1f086 MANTIS 2024-02-03 12:23:18 +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
11551a9816 Sam Data 2024-02-03 09:10:25 +01:00
Applevangelist
d5b7fdab24 Merge remote-tracking branch 'origin/develop' into develop 2024-02-01 09:04:04 +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
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
fb16a29392 M2K specific helper for tostringLL 2024-01-27 14:41:49 +01:00
Frank
d82df93eff Merge branch 'FF/Ops' into FF/OpsDev 2024-01-23 11:05:50 +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
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
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
b03add80c6 SCENERY additions 2024-01-21 16:45:48 +01:00
Applevangelist
d5322466e9 SCENERY add-ons 2024-01-21 16:44:31 +01:00
Frank
5168380eac Update Modules.lua 2024-01-21 16:41:09 +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
c408485c5b Minor fixes 2024-01-19 19:08:42 +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
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
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
Frank
a7ffbab850 Update Modules.lua 2024-01-16 19:44:08 +01:00
Frank
a238294079 Merge branch 'FF/Ops' into FF/OpsDev 2024-01-16 17:37:41 +01:00
Frank
0532c54cd5 Merge branch 'develop' into FF/Ops 2024-01-16 17:11:16 +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
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
36a6d5fede xxx 2024-01-12 18:42:26 +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
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
5680344dfd EASYGCICAP Additions 2024-01-11 12:51:36 +01:00
Applevangelist
b0e0926b70 Added player name to ...PilotDown() event 2024-01-10 15:17:24 +01:00
Applevangelist
27158ee7e8 xxx 2024-01-10 13:38:59 +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
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
Frank
accb4b45fb Merge branch 'FF/Ops' into FF/OpsDev 2024-01-07 21:17:17 +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
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
cf4d35efa2 xxx 2024-01-07 13:25:14 +01:00
Applevangelist
7e842fbd46 xxx 2024-01-07 13:16:52 +01:00
Frank
ba4ff5c9e9 Update Procedure.lua 2024-01-07 10:29:31 +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
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
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
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
fba19bc755 Merge remote-tracking branch 'origin/master' into develop 2024-01-05 15:46:10 +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
1a1c3a6c9f xx 2024-01-05 15:41:01 +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
b8f5e55ac9 Merge remote-tracking branch 'origin/develop' into develop 2024-01-05 10:26:07 +01:00
Applevangelist
8171e3aad2 xxx 2024-01-04 18:48:26 +01:00
Frank
171c450576 Merge branch 'FF/Ops' into FF/OpsDev 2024-01-04 15:14:25 +01:00
Frank
9ea8443286 Merge branch 'develop' into FF/Ops 2024-01-04 15:13:46 +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
170f97d013 xxx 2024-01-04 14:01:02 +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
98d131881f xxx 2024-01-04 11:27:24 +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
e5fbaeafcd xxx 2024-01-03 18:03:53 +01:00
Applevangelist
90e7711788 STRATEGO 2024-01-03 18:03:45 +01:00
Applevangelist
29e255a7bd xxx 2024-01-02 18:12:57 +01:00
Frank
f35078b426 Merge branch 'FF/Ops' into FF/OpsDev 2024-01-02 17:07:15 +01:00
Frank
f76fa58a5f Merge branch 'develop' into FF/Ops 2024-01-02 17:07:03 +01:00
Frank
8921007805 Update Point.lua 2024-01-02 17:04:04 +01:00
Frank
8fd3034503 Merge branch 'FF/Ops' into FF/OpsDev 2024-01-01 21:55:52 +01:00
Frank
c8b36b8c99 Merge branch 'develop' into FF/Ops 2024-01-01 21:54:51 +01:00
Applevangelist
e36f5b3fbd xxx 2024-01-01 13:06:52 +01:00
Applevangelist
04125cef3d xxx 2024-01-01 09:26:19 +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
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
fea05b552c xxx 2023-12-31 14:55:57 +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
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
bfab0fa542 xxx 2023-12-28 13:33:06 +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
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
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
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
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
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
668ba51ba2 xxx 2023-12-23 14:50:57 +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
Applevangelist
63acca90fd xxx 2023-12-21 11:06:31 +01:00
Applevangelist
fc0c54c7fd xx 2023-12-20 10:08:26 +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
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
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
af2517343d #ZONE_POLYGON 2023-12-19 10:15:30 +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
5b37e7b249 Merge branch 'develop' into FF/Ops 2023-12-16 09:32:14 +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
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
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
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
42468f3505 xxx 2023-12-12 10:54:01 +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
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
ec7dd6154d xxx 2023-12-10 11:58:34 +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
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
e60e8b37e6 xx 2023-12-09 15:50:47 +01:00
Applevangelist
e9266ed01c xx 2023-12-09 14:34:21 +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
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
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
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
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
26c5f7bf79 xxx 2023-12-07 12:15:27 +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
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
Frank
a20b6e8a62 Merge branch 'FF/Ops' into FF/OpsDev 2023-12-03 21:10:24 +01:00
Frank
cfca4fdc46 Merge branch 'develop' into FF/Ops 2023-12-03 21:09:17 +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
Frank
a4704d0e2f Update ArmyGroup.lua 2023-11-26 23:57:21 +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
7538f63c00 Merge branch 'develop' into FF/Ops 2023-11-26 16:46:13 +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
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
bfaf88f017 Merge branch 'develop' into FF/Ops 2023-11-23 22:23:50 +01:00
Applevangelist
9eb05fa447 ATC_GROUND fix for scheduler 2023-11-23 18:45:25 +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
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
Frank
b5965bbf81 Merge branch 'develop' into FF/Ops 2023-11-20 13:52:16 +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
Frank
4ce6cc7776 Merge branch 'FF/Ops' into FF/OpsDev 2023-11-17 18:06:17 +01:00
Frank
bcbda4eb64 Merge branch 'develop' into FF/Ops 2023-11-17 18:04:49 +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
Frank
434296ab11 Merge branch 'FF/Ops' into FF/OpsDev 2023-11-07 00:06:35 +01:00
Frank
7306cc1102 Merge branch 'develop' into FF/Ops 2023-11-07 00:05:16 +01:00
Frank
a5232f49c0 Navigation 2023-11-06 21:35:20 +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
Frank
befc8207f5 Update Nav 2023-11-02 23:42:59 +01:00
Frank
23947b7c30 Merge branch 'FF/Ops' into FF/OpsDev 2023-11-02 20:33:53 +01:00
Frank
6406ce696b Merge branch 'develop' into FF/Ops 2023-11-02 20:31:57 +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
Frank
da91b710a9 Merge branch 'FF/Ops' into FF/OpsDev 2023-10-31 20:17:10 +01:00
Frank
0d9d0be0c3 Merge branch 'develop' into FF/Ops 2023-10-31 20:14:46 +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
Frank
059d8ccfc0 Merge branch 'FF/Ops' of https://github.com/FlightControl-Master/MOOSE into FF/Ops 2023-10-31 10:45:58 +01:00
Frank
bd9022c010 ARMYGROUP
Added parameter to delay init group
2023-10-31 10:45:56 +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
Frank
d656bbc014 Update Vector.lua 2023-10-19 21:49:45 +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
Frank
ed23f11e4a Merge branch 'FF/Ops' into FF/OpsDev 2023-10-13 22:00:57 +02:00
Frank
068465a8f2 Merge branch 'FF/Ops' into FF/OpsDev 2023-10-13 21:33:33 +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
Frank
4e24a7bf80 Navigation 2023-10-08 21:49:15 +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
Frank
1ece7238dc NAv 2023-10-05 16:52:41 +02:00
Frank
db53f427e3 Update Point.lua 2023-10-02 17:02:21 +02:00
Frank
d2e2c51275 Update FlightPlan.lua 2023-09-29 13:27:59 +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
Frank
691748082b Merge branch 'FF/Ops' into FF/OpsDev 2023-09-27 22:29:38 +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
Frank
b294ef10c8 Update NavyGroup.lua 2023-09-27 10:54:37 +02:00
Frank
5d40091947 NAVYGROUP
- Improved heading into wind
2023-09-27 10:53:19 +02:00
Frank
7453a6c55d navygroup
- into wind
2023-09-26 17:02:13 +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
Frank
153ef7cd08 utils 2023-09-26 01:44:30 +02:00
Frank
b6a550a247 Update Vector.lua 2023-09-25 16:59:41 +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
Frank
3568f27150 Vector 2023-09-24 22:46:50 +02:00
Frank
c46061466c VECTOR
- Added functions
2023-09-24 22:09:49 +02:00
Frank
9c7b5e8506 VECTOR
**VECTOR**
- New core class for vector algebra
2023-09-23 01:15:08 +02:00
Frank
b11df6b523 Navigation
Refactored names etc.
2023-09-21 23:37:25 +02:00
Frank
66dcd44fb8 Merge branch 'FF/OpsDev' of https://github.com/FlightControl-Master/MOOSE into FF/OpsDev 2023-09-21 17:48:12 +02:00
Frank
f35237f86f Update FlightControl.lua 2023-09-21 17:48:04 +02:00
Frank
f19c877a11 Navigation 2023-09-21 17:01:32 +02:00
Applevangelist
d2450ff776 Merge remote-tracking branch 'origin/develop' into develop 2023-09-21 09:01:49 +02:00
Frank
792a487eeb Merge branch 'FF/Ops' into FF/OpsDev 2023-09-20 22:32:16 +02:00
Applevangelist
f71039e840 #ATIS
* Added Spanish TTS locale ("es"
2023-09-20 17:16:52 +02:00
Frank
f5e8bd0ffc Merge branch 'FF/Ops' into FF/OpsDev 2023-09-20 14:39:41 +02:00
Frank
cbdbf36f32 FC
- Improved taxi phrases
2023-09-20 11:52:14 +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
Frank
1116b19b00 FC 2023-09-19 17:04:37 +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
Frank
edb490fa97 Update Pathline.lua
- json
2023-09-19 03:01:47 +02:00
Frank
9fa16c6385 Update FlightControl.lua 2023-09-18 16:52:13 +02:00
Frank
a0ee957493 Update FlightControl.lua 2023-09-17 23:07:59 +02:00
Frank
f32c303c0a pathline 2023-09-17 22:58:53 +02:00
Frank
6febbbc8e6 FC 2023-09-17 21:55:29 +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
Frank
d5aa9eaf0f Merge branch 'FF/Ops' into FF/OpsDev 2023-09-17 16:26:23 +02:00
Frank
321b2d761d FLIGHTCONTROL
- Improved Taxi comms
2023-09-17 16:10:59 +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
Frank
18581e4a78 Merge branch 'FF/OpsDev' of https://github.com/FlightControl-Master/MOOSE into FF/OpsDev 2023-09-14 17:40:11 +02:00
Frank
b03905154d ASTAR Pathlines 2023-09-14 17:40:02 +02:00
Frank
2fda1709bc Update FlightControl.lua 2023-09-14 16:46:08 +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
Frank
39f626390a Merge branch 'FF/Ops' into FF/OpsDev 2023-09-13 11:14:55 +02:00
Frank
aa1e12163d ASTAR/PATHLINE 2023-09-12 23:57:50 +02:00
Frank
abb7f860ae Update Astar.lua 2023-09-12 03:21:23 +02:00
Frank
cffada1a1e AIRBASE
- Taxiways
2023-09-11 16:54:10 +02:00
Frank
f8d91798e3 Update FlightControl.lua 2023-09-10 23:55:40 +02:00
Frank
548aa8d5a9 Merge branch 'FF/Ops' into FF/OpsDev 2023-09-10 22:43:13 +02:00
Frank
1e929d1d19 ASTAR Taxi 2023-09-10 22:38:00 +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
Frank
d5f215505e Merge branch 'FF/Ops' into FF/OpsDev 2023-09-09 00:32:29 +02:00
Frank
851660c793 NAV 2023-09-08 16:11:11 +02:00
Frank
ee57b46c14 Update Astar.lua 2023-09-07 23:32:07 +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
Frank
36eac9fccc PATH 2023-09-06 22:50:24 +02:00
Frank
1f630ab490 Astar Pathline 2023-09-05 23:29:27 +02:00
Frank
8f0c6948ac Merge branch 'FF/Ops' into FF/OpsDev 2023-09-05 20:53:45 +02:00
Applevangelist
f43924fbb0 #CLIENTMENU 2023-09-05 10:34:07 +02:00
Frank
eb2380c3f6 Merge branch 'FF/Ops' into FF/OpsDev 2023-09-04 23:35:05 +02:00
Frank
df3e182de4 Merge branch 'FF/OpsDev' of https://github.com/FlightControl-Master/MOOSE into FF/OpsDev 2023-09-04 23:34:26 +02:00
Frank
bda7988118 Astar 2023-09-04 23:34:23 +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
Frank
72deb9ee17 Merge branch 'FF/OpsDev' of https://github.com/FlightControl-Master/MOOSE into FF/OpsDev 2023-08-30 15:53:49 +02:00
Frank
ced1f30f3f Update DCS.lua 2023-08-30 15:53:35 +02:00
Frank
47c0006537 ASTAR & PATHLINE 2023-08-29 22:43:36 +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
Frank
21e5c124c0 Astar 2023-08-28 22:38:37 +02:00
Frank
3ff374e1b9 Merge branch 'FF/Ops' into FF/OpsDev 2023-08-27 20:39:51 +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
Frank
02000be9af Merge branch 'FF/Ops' into FF/OpsDev 2023-08-17 19:15:12 +02:00
Frank
663c6cead0 Update FlightControl.lua 2023-08-16 20:46:53 +02:00
Frank
6867df58c4 Merge branch 'FF/Ops' into FF/OpsDev 2023-08-13 18:22:12 +02:00
Frank
639625d3d5 Update FlightControl.lua 2023-08-13 14:16:40 +02:00
Frank
0ace200e5a Nav
- Small stuff
2023-08-04 00:08:16 +02:00
Frank
e76c26ff59 FLIGHTPLAN 2023-08-03 00:41:34 +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
Frank
cb11de6f9c Navigation
- Added NavFix
2023-08-02 10:53:28 +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
Frank
cdd78e5163 Update FlightPlan.lua 2023-08-01 00:25:08 +02:00
Frank
a8da02774a Update FlightPlan.lua 2023-08-01 00:24:49 +02:00
Frank
04258a69c4 Navigation
- Init stuff
2023-07-31 21:58:01 +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
Frank
49882f03d9 Update FlightControl.lua 2023-07-26 16:05:15 +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
172 changed files with 25347 additions and 9861 deletions

View File

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

View File

@@ -5,6 +5,8 @@ on:
branches:
- master
- develop
- Apple/Develop
paths:
- 'Moose Setup/**/*.lua'
- 'Moose Development/**/*.lua'
@@ -47,6 +49,7 @@ jobs:
- name: Update apt-get (needed for act docker image)
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -qq update
- name: Install tree

View File

@@ -1,7 +1,17 @@
{
"Lua.workspace.preloadFileSize": 1000,
"Lua.workspace.preloadFileSize": 10000,
"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": [
"BASE",

View File

@@ -11,7 +11,7 @@
-- @module AI.AI_A2A_Cap
-- @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_Engage#AI_AIR_ENGAGE

View File

@@ -1151,14 +1151,14 @@ do -- AI_A2A_DISPATCHER
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.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." )
self:T( "Squadron " .. SquadronName .. " captured." )
end
end
end
@@ -1828,7 +1828,7 @@ do -- AI_A2A_DISPATCHER
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.
@@ -2085,7 +2085,7 @@ do -- AI_A2A_DISPATCHER
Intercept.EngageCeilingAltitude = EngageCeilingAltitude
Intercept.EngageAltType = EngageAltType
self:I( { GCI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
self:T( { GCI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
end
--- Set squadron GCI.
@@ -3000,17 +3000,17 @@ do -- AI_A2A_DISPATCHER
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.
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
local classname = AIFriendly.ClassName or "No Class Name"
local unitname = AIFriendly.IdentifiableName or "No Unit Name"
--self:I("Class Name: " .. classname)
--self:I("Unit Name: " .. unitname)
--self:I({AIFriendly})
--self:T("Class Name: " .. classname)
--self:T("Unit Name: " .. unitname)
--self:T({AIFriendly})
end
local Friendly = nil
if AIFriendly and AIFriendly:IsAlive() then
--self:I("AIFriendly alive, getting GROUP")
--self:T("AIFriendly alive, getting GROUP")
Friendly = AIFriendly:GetGroup() -- Wrapper.Group#GROUP
end
@@ -3952,7 +3952,7 @@ end
do
--- @type AI_A2A_GCICAP
-- @type AI_A2A_GCICAP
-- @extends #AI_A2A_DISPATCHER
--- Create an automatic air defence system for a coalition setting up GCI and CAP air defenses.
@@ -4322,23 +4322,23 @@ do
-- 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
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName()
local AirbaseCoord = Airbase:GetCoordinate()
local AirbaseZone = ZONE_RADIUS:New( "Airbase", AirbaseCoord:GetVec2(), 3000 )
local Templates = nil
self:I( { Airbase = AirbaseName } )
self:T( { Airbase = AirbaseName } )
for TemplateID, Template in pairs( self.Templates:GetSet() ) do
local Template = Template -- Wrapper.Group#GROUP
local TemplateCoord = Template:GetCoordinate()
if AirbaseZone:IsVec2InZone( TemplateCoord:GetVec2() ) then
Templates = Templates or {}
table.insert( Templates, Template:GetName() )
self:I( { Template = Template:GetName() } )
self:T( { Template = Template:GetName() } )
end
end
if Templates then
@@ -4354,13 +4354,13 @@ do
self.CAPTemplates:FilterPrefixes( CapPrefixes )
self.CAPTemplates:FilterOnce()
self:I( "Setting up CAP ..." )
self:T( "Setting up CAP ..." )
for CAPID, CAPTemplate in pairs( self.CAPTemplates:GetSet() ) do
local CAPZone = ZONE_POLYGON:New( CAPTemplate:GetName(), CAPTemplate )
-- Now find the closest airbase from the ZONE (start or center)
local AirbaseDistance = 99999999
local AirbaseClosest = nil -- Wrapper.Airbase#AIRBASE
self:I( { CAPZoneGroup = CAPID } )
self:T( { CAPZoneGroup = CAPID } )
for AirbaseID, AirbaseName in pairs( AirbaseNames ) do
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName()
@@ -4368,7 +4368,7 @@ do
local Squadron = self.DefenderSquadrons[AirbaseName]
if Squadron then
local Distance = AirbaseCoord:Get2DDistance( CAPZone:GetCoordinate() )
self:I( { AirbaseDistance = Distance } )
self:T( { AirbaseDistance = Distance } )
if Distance < AirbaseDistance then
AirbaseDistance = Distance
AirbaseClosest = Airbase
@@ -4376,7 +4376,7 @@ do
end
end
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:SetSquadronCapInterval( AirbaseClosest:GetName(), CapLimit, 300, 600, 1 )
end
@@ -4384,14 +4384,14 @@ do
-- Setup GCI.
-- GCI is setup for all Squadrons.
self:I( "Setting up GCI ..." )
self:T( "Setting up GCI ..." )
for AirbaseID, AirbaseName in pairs( AirbaseNames ) do
local Airbase = _DATABASE:FindAirbase( AirbaseName ) -- Wrapper.Airbase#AIRBASE
local AirbaseName = Airbase:GetName()
local Squadron = self.DefenderSquadrons[AirbaseName]
self:F( { Airbase = AirbaseName } )
if Squadron then
self:I( { GCIAirbase = AirbaseName } )
self:T( { GCIAirbase = AirbaseName } )
self:SetSquadronGci( AirbaseName, 800, 1200 )
end
end

View File

@@ -13,8 +13,8 @@
--- @type AI_A2A_GCI
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
-- @type AI_A2A_GCI
-- @extends AI.AI_A2A#AI_A2A
--- 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
--
-- ![Process](..\Presentations\AI_GCI\Dia2.JPG)
--
-- ### 2.1 AI_A2A_GCI States
--
-- * **None** ( Group ): The process is not started yet.

View File

@@ -10,8 +10,8 @@
-- @image AI_Air_Patrolling.JPG
--- @type AI_A2A_PATROL
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @type AI_A2A_PATROL
-- @extends AI.AI_A2A#AI_A2A
--- 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
-- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_BAI
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
-- @type AI_A2G_BAI
-- @extends AI.AI_A2A_Engage#AI_A2A_Engage -- TODO: Documentation. This class does not exist, unable to determine what it extends.
--- 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 )
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 self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -11,9 +11,8 @@
-- @module AI.AI_A2G_CAS
-- @image AI_Air_To_Ground_Engage.JPG
--- @type AI_A2G_CAS
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
-- @type AI_A2G_CAS
-- @extends AI.AI_A2G_Patrol#AI_AIR_PATROL TODO: Documentation. This class does not exist, unable to determine what it extends.
--- 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 )
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 self = BASE:Inherit( self, AI_Air_Engage )

View File

@@ -904,14 +904,14 @@ do -- AI_A2G_DISPATCHER
-- @type AI_A2G_DISPATCHER.DefenseCoordinates
-- @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 = {}
--- Enumerator for spawns at airbases.
-- @type AI_A2G_DISPATCHER.Takeoff
-- @extends Wrapper.Group#GROUP.Takeoff
--- @field #AI_A2G_DISPATCHER.Takeoff Takeoff
-- @field #AI_A2G_DISPATCHER.Takeoff Takeoff
AI_A2G_DISPATCHER.Takeoff = GROUP.Takeoff
--- Defines Landing location.
@@ -942,7 +942,7 @@ do -- AI_A2G_DISPATCHER
-- @type AI_A2G_DISPATCHER.DefenseQueue
-- @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 = {}
--- Defense approach types.
@@ -1136,7 +1136,7 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:onafterStart( 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
self:ResourcePark( DefenderSquadron )
end
self:I( "Parked resources for squadron " .. DefenderSquadron.Name )
self:T( "Parked resources for squadron " .. DefenderSquadron.Name )
end
end
@@ -1201,7 +1201,7 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:ResourcePark( DefenderSquadron )
local TemplateID = math.random( 1, #DefenderSquadron.Spawn )
local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN
@@ -1218,33 +1218,33 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventBaseCaptured( EventData )
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.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." )
self:T( "Squadron " .. SquadronName .. " captured." )
end
end
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventCrashOrDead( EventData )
self.Detection:ForgetDetectedUnit( EventData.IniUnitName )
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventLand( EventData )
self:F( "Landed" )
@@ -1261,7 +1261,7 @@ do -- AI_A2G_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender )
end
DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender )
self:ResourcePark( Squadron )
return
end
if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then
@@ -1273,7 +1273,7 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_A2G_DISPATCHER:OnEventEngineShutdown( EventData )
local DefenderUnit = EventData.IniUnit
@@ -1289,7 +1289,7 @@ do -- AI_A2G_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender )
end
DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender )
self:ResourcePark( Squadron )
end
end
end
@@ -1297,7 +1297,7 @@ do -- AI_A2G_DISPATCHER
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 Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by A2G defenses.
function AI_A2G_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate )
@@ -1305,19 +1305,19 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityLow()
self.DefenseReactivity = 0.05
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityMedium()
self.DefenseReactivity = 0.15
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:SetDefenseReactivityHigh()
self.DefenseReactivity = 0.5
end
@@ -1351,14 +1351,14 @@ do -- AI_A2G_DISPATCHER
-- 1. the **distance of the closest airbase to target**, being smaller than the **Defend Radius**.
-- 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.
--
-- 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.**
--
-- @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
-- @usage
--
@@ -1373,7 +1373,7 @@ do -- AI_A2G_DISPATCHER
--
function AI_A2G_DISPATCHER:SetDefenseRadius( DefenseRadius )
self.DefenseRadius = DefenseRadius or 100000
self.DefenseRadius = DefenseRadius or 40000
self.Detection:SetAcceptRange( self.DefenseRadius )
@@ -1868,7 +1868,7 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name.
-- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps.
-- @usage
@@ -2144,7 +2144,7 @@ do -- AI_A2G_DISPATCHER
Sead.EngageAltType = EngageAltType
Sead.Defend = true
self:I( { SEAD = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
self:T( { SEAD = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self
end
@@ -2234,7 +2234,7 @@ do -- AI_A2G_DISPATCHER
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
@@ -2295,7 +2295,7 @@ do -- AI_A2G_DISPATCHER
Cas.EngageAltType = EngageAltType
Cas.Defend = true
self:I( { CAS = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
self:T( { CAS = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self
end
@@ -2385,7 +2385,7 @@ do -- AI_A2G_DISPATCHER
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
@@ -2446,7 +2446,7 @@ do -- AI_A2G_DISPATCHER
Bai.EngageAltType = EngageAltType
Bai.Defend = true
self:I( { BAI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
self:T( { BAI = { SquadronName, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType } } )
return self
end
@@ -2536,7 +2536,7 @@ do -- AI_A2G_DISPATCHER
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
@@ -3369,7 +3369,7 @@ do -- AI_A2G_DISPATCHER
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
self.Defenders = self.Defenders or {}
local DefenderName = Defender:GetName()
@@ -3380,7 +3380,7 @@ do -- AI_A2G_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } )
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender )
self.Defenders = self.Defenders or {}
local DefenderName = Defender:GetName()
@@ -3796,7 +3796,7 @@ do -- AI_A2G_DISPATCHER
Dispatcher:ClearDefenderTaskTarget( DefenderGroup )
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To )
self:F({"LostControl", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3813,7 +3813,7 @@ do -- AI_A2G_DISPATCHER
end
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action )
self:F({"Home", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3894,11 +3894,15 @@ do -- AI_A2G_DISPATCHER
local Squadron = Dispatcher:GetSquadronFromDefender( DefenderGroup )
if Squadron then
local FirstUnit = AttackSetUnit:GetFirst()
local FirstUnit = AttackSetUnit:GetRandomSurely()
if FirstUnit then
local Coordinate = FirstUnit:GetCoordinate() -- Core.Point#COORDINATE
if self.SetSendPlayerMessages then
Dispatcher:MessageToPlayers( Squadron, DefenderName .. ", on route to ground target at " .. Coordinate:ToStringA2G( DefenderGroup ), DefenderGroup )
end
else
return
end
end
self:GetParent(self).onafterEngageRoute( self, DefenderGroup, From, Event, To, AttackSetUnit )
end
@@ -3933,7 +3937,7 @@ do -- AI_A2G_DISPATCHER
Dispatcher:ClearDefenderTaskTarget( DefenderGroup )
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterLostControl( DefenderGroup, From, Event, To )
self:F({"Defender LostControl", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -3950,7 +3954,7 @@ do -- AI_A2G_DISPATCHER
end
end
--- @param #AI_A2G_DISPATCHER self
-- @param #AI_A2G_DISPATCHER self
function AI_A2G_Fsm:onafterHome( DefenderGroup, From, Event, To, Action )
self:F({"Defender Home", DefenderGroup:GetName()})
self:GetParent(self).onafterHome( self, DefenderGroup, From, Event, To )
@@ -4784,4 +4788,5 @@ end
Squadron.ResourceCount = Squadron.ResourceCount - Amount
end
self:T({Squadron = Squadron.Name,SquadronResourceCount = Squadron.ResourceCount})
end
end

View File

@@ -13,9 +13,8 @@
--- @type AI_A2G_SEAD
-- @extends AI.AI_Air_Patrol#AI_AIR_PATROL
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
-- @type AI_A2G_SEAD
-- @extends AI.AI_A2G_Patrol#AI_AIR_PATROL
--- Implements the core functions to SEAD intruders. Use the Engage trigger to intercept intruders.

View File

@@ -9,7 +9,8 @@
-- @module AI.AI_Air
-- @image MOOSE.JPG
--- @type AI_AIR
---
-- @type AI_AIR
-- @extends Core.Fsm#FSM_CONTROLLABLE
--- 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
end
--- @param Wrapper.Group#GROUP self
-- @param Wrapper.Group#GROUP self
-- @param Core.Event#EVENTDATA EventData
function GROUP:OnEventTakeoff( EventData, Fsm )
Fsm:Takeoff()
@@ -446,13 +447,13 @@ function AI_AIR:onafterReturn( Controllable, From, Event, To )
end
--- @param #AI_AIR self
-- @param #AI_AIR self
function AI_AIR:onbeforeStatus()
return self.CheckStatus
end
--- @param #AI_AIR self
-- @param #AI_AIR self
function AI_AIR:onafterStatus()
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() )
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 )
RTB = false
end
@@ -489,10 +490,10 @@ function AI_AIR:onafterStatus()
if Fuel < self.FuelThresholdPercentage 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()
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 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.
-- The damaged unit will RTB due to DCS logic, and the others will continue to engage.
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()
RTB = true
self:SetStatusOff()
@@ -536,7 +537,7 @@ function AI_AIR:onafterStatus()
if Damage ~= InitialLife then
self:Damaged()
else
self:I( self.Controllable:GetName() .. " control lost! " )
self:T( self.Controllable:GetName() .. " control lost! " )
self:LostControl()
end
@@ -560,7 +561,7 @@ function AI_AIR:onafterStatus()
end
--- @param Wrapper.Group#GROUP AIGroup
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.RTBRoute( AIGroup, Fsm )
AIGroup:F( { "AI_AIR.RTBRoute:", AIGroup:GetName() } )
@@ -571,7 +572,7 @@ function AI_AIR.RTBRoute( AIGroup, Fsm )
end
--- @param Wrapper.Group#GROUP AIGroup
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.RTBHold( AIGroup, Fsm )
AIGroup:F( { "AI_AIR.RTBHold:", AIGroup:GetName() } )
@@ -598,7 +599,7 @@ function AI_AIR:SetRTBSpeedFactors(MinFactor,MaxFactor)
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterRTB( 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.
local FromCoord = AIGroup:GetCoordinate()
if not FromCoord then return end
local ToTargetCoord = self.HomeAirbase:GetCoordinate() -- coordinate is on land height(!)
local ToTargetVec3 = ToTargetCoord:GetVec3()
ToTargetVec3.y = ToTargetCoord:GetLandHeight()+3000 -- let's set this 1000m/3000 feet above ground
local ToTargetCoord2 = COORDINATE:NewFromVec3( ToTargetVec3 )
@@ -638,13 +642,13 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
local ToAirbaseCoord = ToTargetCoord2
if Distance < 5000 then
self:I( "RTB and near the airbase!" )
self:T( "RTB and near the airbase!" )
self:Home()
return
end
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()
return
end
@@ -653,8 +657,8 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
--- Create a route point of type air.
local FromRTBRoutePoint = FromCoord:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
RTBSpeed,
true
)
@@ -662,8 +666,8 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
--- Create a route point of type air.
local ToRTBRoutePoint = ToAirbaseCoord:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
RTBSpeed,
true
)
@@ -686,12 +690,12 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterHome( 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
end
@@ -700,15 +704,17 @@ end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterHold( AIGroup, From, Event, To, HoldTime )
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
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 RTBTask = AIGroup:TaskFunction( "AI_AIR.RTBHold", self )
@@ -722,17 +728,17 @@ function AI_AIR:onafterHold( AIGroup, From, Event, To, HoldTime )
end
--- @param Wrapper.Group#GROUP AIGroup
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR.Resume( AIGroup, Fsm )
AIGroup:I( { "AI_AIR.Resume:", AIGroup:GetName() } )
AIGroup:T( { "AI_AIR.Resume:", AIGroup:GetName() } )
if AIGroup:IsAlive() then
Fsm:__RTB( Fsm.TaskDelay )
end
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Wrapper.Group#GROUP AIGroup
function AI_AIR:onafterRefuel( 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
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 = {}
@@ -755,10 +761,10 @@ function AI_AIR:onafterRefuel( AIGroup, From, Event, To )
local ToRefuelSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
--- Create a route point of type air.
local FromRefuelRoutePoint = FromRefuelCoord:WaypointAir(self.PatrolAltType, POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, ToRefuelSpeed, true)
local FromRefuelRoutePoint = FromRefuelCoord:WaypointAir(self.PatrolAltType, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, ToRefuelSpeed, true)
--- Create a route point of type air. NOT used!
local ToRefuelRoutePoint = Tanker:GetCoordinate():WaypointAir(self.PatrolAltType, POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, ToRefuelSpeed, true)
local ToRefuelRoutePoint = Tanker:GetCoordinate():WaypointAir(self.PatrolAltType, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, ToRefuelSpeed, true)
self:F( { ToRefuelSpeed = ToRefuelSpeed } )
@@ -798,13 +804,13 @@ end
--- @param #AI_AIR self
-- @param #AI_AIR self
function AI_AIR:onafterDead()
self:SetStatusOff()
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnCrash( EventData )
@@ -815,7 +821,7 @@ function AI_AIR:OnCrash( EventData )
end
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnEjection( EventData )
@@ -824,7 +830,7 @@ function AI_AIR:OnEjection( EventData )
end
end
--- @param #AI_AIR self
-- @param #AI_AIR self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR:OnPilotDead( EventData )

View File

@@ -900,14 +900,14 @@ do -- AI_AIR_DISPATCHER
-- @type AI_AIR_DISPATCHER.DefenseCoordinates
-- @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 = {}
--- Enumerator for spawns at airbases
-- @type AI_AIR_DISPATCHER.Takeoff
-- @extends Wrapper.Group#GROUP.Takeoff
--- @field #AI_AIR_DISPATCHER.Takeoff Takeoff
-- @field #AI_AIR_DISPATCHER.Takeoff Takeoff
AI_AIR_DISPATCHER.Takeoff = GROUP.Takeoff
--- Defnes Landing location.
@@ -938,7 +938,7 @@ do -- AI_AIR_DISPATCHER
-- @type AI_AIR_DISPATCHER.DefenseQueue
-- @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 = {}
--- Defense approach types
@@ -1130,7 +1130,7 @@ do -- AI_AIR_DISPATCHER
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:onafterStart( 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
self:ResourcePark( DefenderSquadron )
end
self:I( "Parked resources for squadron " .. DefenderSquadron.Name )
self:T( "Parked resources for squadron " .. DefenderSquadron.Name )
end
end
@@ -1194,7 +1194,7 @@ do -- AI_AIR_DISPATCHER
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:ResourcePark( DefenderSquadron )
local TemplateID = math.random( 1, #DefenderSquadron.Spawn )
local Spawn = DefenderSquadron.Spawn[ TemplateID ] -- Core.Spawn#SPAWN
@@ -1211,31 +1211,31 @@ do -- AI_AIR_DISPATCHER
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventBaseCaptured( EventData )
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.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
Squadron.Captured = true
self:I( "Squadron " .. SquadronName .. " captured." )
self:T( "Squadron " .. SquadronName .. " captured." )
end
end
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventCrashOrDead( EventData )
self.Detection:ForgetDetectedUnit( EventData.IniUnitName )
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventLand( EventData )
self:F( "Landed" )
@@ -1252,7 +1252,7 @@ do -- AI_AIR_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender )
end
DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender )
self:ResourcePark( Squadron )
return
end
if DefenderUnit:GetLife() ~= DefenderUnit:GetLife0() then
@@ -1263,7 +1263,7 @@ do -- AI_AIR_DISPATCHER
end
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR_DISPATCHER:OnEventEngineShutdown( EventData )
local DefenderUnit = EventData.IniUnit
@@ -1279,31 +1279,31 @@ do -- AI_AIR_DISPATCHER
self:RemoveDefenderFromSquadron( Squadron, Defender )
end
DefenderUnit:Destroy()
self:ResourcePark( Squadron, Defender )
self:ResourcePark( Squadron )
end
end
end
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 Core.Point#COORDINATE DefenseCoordinate The coordinate to be defended by AIR defenses.
function AI_AIR_DISPATCHER:AddDefenseCoordinate( DefenseCoordinateName, DefenseCoordinate )
self.DefenseCoordinates[DefenseCoordinateName] = DefenseCoordinate
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityLow()
self.DefenseReactivity = 0.05
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityMedium()
self.DefenseReactivity = 0.15
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
function AI_AIR_DISPATCHER:SetDefenseReactivityHigh()
self.DefenseReactivity = 0.5
end
@@ -1867,7 +1867,7 @@ do -- AI_AIR_DISPATCHER
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param #string SquadronName The squadron name.
-- @param #number TakeoffInterval Only Takeoff new units each specified interval in seconds in 10 seconds steps.
-- @usage
@@ -2769,7 +2769,7 @@ do -- AI_AIR_DISPATCHER
-- 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
function AI_AIR_DISPATCHER:AddDefenderToSquadron( Squadron, Defender, Size )
self.Defenders = self.Defenders or {}
@@ -2782,7 +2782,7 @@ do -- AI_AIR_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = Squadron.ResourceCount } )
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param AI.AI_Air_Squadron#AI_AIR_SQUADRON Squadron
function AI_AIR_DISPATCHER:RemoveDefenderFromSquadron( Squadron, Defender )
self.Defenders = self.Defenders or {}
@@ -2795,7 +2795,7 @@ do -- AI_AIR_DISPATCHER
self:F( { DefenderName = DefenderName, SquadronResourceCount = SquadronResourceCount } )
end
--- @param #AI_AIR_DISPATCHER self
-- @param #AI_AIR_DISPATCHER self
-- @param Wrapper.Group#GROUP Defender
-- @return AI.AI_Air_Squadron#AI_AIR_SQUADRON The Squadron.
function AI_AIR_DISPATCHER:GetSquadronFromDefender( Defender )

View File

@@ -13,8 +13,8 @@
--- @type AI_AIR_ENGAGE
-- @extends AI.AI_Air#AI_AIR
-- @type AI_AIR_ENGAGE
-- @extends AI.AI_AIR#AI_AIR
--- 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
--- @param #AI_AIR_ENGAGE self
-- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -361,7 +361,7 @@ function AI_AIR_ENGAGE:onafterAccomplish( AIGroup, From, Event, To )
--self:SetDetectionOff()
end
--- @param #AI_AIR_ENGAGE self
-- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -374,7 +374,7 @@ function AI_AIR_ENGAGE:onafterDestroy( AIGroup, From, Event, To, EventData )
end
end
--- @param #AI_AIR_ENGAGE self
-- @param #AI_AIR_ENGAGE self
-- @param Core.Event#EVENTDATA EventData
function AI_AIR_ENGAGE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )
@@ -387,9 +387,9 @@ function AI_AIR_ENGAGE:OnEventDead( EventData )
end
--- @param Wrapper.Group#GROUP AIControllable
-- @param Wrapper.Group#GROUP AIControllable
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
Fsm:__EngageRoute( Fsm.TaskDelay or 0.1, AttackSetUnit )
@@ -397,14 +397,14 @@ function AI_AIR_ENGAGE.___EngageRoute( AIGroup, Fsm, AttackSetUnit )
end
--- @param #AI_AIR_ENGAGE self
-- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param Core.Set#SET_UNIT AttackSetUnit Unit set to be attacked.
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()
@@ -426,7 +426,13 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
local DefenderCoord = DefenderGroup:GetPointVec3()
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.
local TargetDistance = DefenderCoord:Get2DDistance( TargetCoord )
@@ -435,19 +441,19 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
-- TODO: A factor of * 3 is way too close. This causes the AI not to engange until merged sometimes!
if TargetDistance <= EngageDistance * 9 then
--self:I(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000))
--self:T(string.format("AI_AIR_ENGAGE onafterEngageRoute ==> __Engage - target distance = %.1f km", TargetDistance/1000))
self:__Engage( 0.1, AttackSetUnit )
else
--self:I(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000))
--self:T(string.format("FF AI_AIR_ENGAGE onafterEngageRoute ==> Routing - target distance = %.1f km", TargetDistance/1000))
local EngageRoute = {}
local AttackTasks = {}
--- Calculate the target route point.
local FromWP = DefenderCoord:WaypointAir(self.PatrolAltType or "RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, EngageSpeed, true)
local FromWP = DefenderCoord:WaypointAir(self.PatrolAltType or "RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, EngageSpeed, true)
EngageRoute[#EngageRoute+1] = FromWP
@@ -456,7 +462,7 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
local FromEngageAngle = DefenderCoord:GetAngleDegrees( DefenderCoord:GetDirectionVec3( TargetCoord ) )
local ToCoord=DefenderCoord:Translate( EngageDistance, FromEngageAngle, true )
local ToWP = ToCoord:WaypointAir(self.PatrolAltType or "RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, EngageSpeed, true)
local ToWP = ToCoord:WaypointAir(self.PatrolAltType or "RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, EngageSpeed, true)
EngageRoute[#EngageRoute+1] = ToWP
@@ -472,16 +478,16 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
end
else
-- 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()
end
end
--- @param Wrapper.Group#GROUP AIControllable
-- @param Wrapper.Group#GROUP AIControllable
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
local delay=Fsm.TaskDelay or 0.1
@@ -490,7 +496,7 @@ function AI_AIR_ENGAGE.___Engage( AIGroup, Fsm, AttackSetUnit )
end
--- @param #AI_AIR_ENGAGE self
-- @param #AI_AIR_ENGAGE self
-- @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM.
-- @param #string From The From State 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()
DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
local TargetCoord = AttackSetUnit:GetFirst():GetPointVec3()
local TargetCoord = AttackSetUnit:GetRandomSurely():GetPointVec3()
if not TargetCoord then
self:Return()
return
@@ -530,7 +536,7 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
local EngageRoute = {}
local AttackTasks = {}
local FromWP = DefenderCoord:WaypointAir(self.EngageAltType or "RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, EngageSpeed, true)
local FromWP = DefenderCoord:WaypointAir(self.EngageAltType or "RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, EngageSpeed, true)
EngageRoute[#EngageRoute+1] = FromWP
self:SetTargetDistance( TargetCoord ) -- For RTB status check
@@ -538,7 +544,7 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
local FromEngageAngle = DefenderCoord:GetAngleDegrees( DefenderCoord:GetDirectionVec3( TargetCoord ) )
local ToCoord=DefenderCoord:Translate( EngageDistance, FromEngageAngle, true )
local ToWP = ToCoord:WaypointAir(self.EngageAltType or "RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, EngageSpeed, true)
local ToWP = ToCoord:WaypointAir(self.EngageAltType or "RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, EngageSpeed, true)
EngageRoute[#EngageRoute+1] = ToWP
-- TODO: A factor of * 3 this way too low. This causes the AI NOT to engage until very close or even merged sometimes. Some A2A missiles have a much longer range! Needs more frequent updates of the task!
@@ -547,12 +553,12 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
local AttackUnitTasks = self:CreateAttackUnitTasks( AttackSetUnit, DefenderGroup, EngageAltitude ) -- Polymorphic
if #AttackUnitTasks == 0 then
self:I( DefenderGroupName .. ": No valid targets found -> Going RTB")
self:T( DefenderGroupName .. ": No valid targets found -> Going RTB")
self:Return()
return
else
local text=string.format("%s: Engaging targets at distance %.2f NM", DefenderGroupName, UTILS.MetersToNM(TargetDistance))
self:I(text)
self:T(text)
DefenderGroup:OptionROEOpenFire()
DefenderGroup:OptionROTEvadeFire()
DefenderGroup:OptionKeepWeaponsOnThreat()
@@ -569,13 +575,13 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
end
else
-- 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()
return
end
end
--- @param Wrapper.Group#GROUP AIEngage
-- @param Wrapper.Group#GROUP AIEngage
function AI_AIR_ENGAGE.Resume( AIEngage, Fsm )
AIEngage:F( { "Resume:", AIEngage:GetName() } )

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Air_Patrol
-- @image AI_Air_To_Ground_Patrol.JPG
--- @type AI_AIR_PATROL
-- @type AI_AIR_PATROL
-- @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}
@@ -309,7 +309,7 @@ function AI_AIR_PATROL:onafterPatrolRoute( AIPatrol, From, Event, To )
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
local speedkmh=ToTargetSpeed
local FromWP = CurrentCoord:WaypointAir(self.PatrolAltType or "RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, ToTargetSpeed, true)
local FromWP = CurrentCoord:WaypointAir(self.PatrolAltType or "RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, ToTargetSpeed, true)
PatrolRoute[#PatrolRoute+1] = FromWP
if self.racetrack then
@@ -359,9 +359,9 @@ function AI_AIR_PATROL:onafterPatrolRoute( AIPatrol, From, Event, To )
else
--- Create a route point of type air.
local ToWP = ToTargetCoord:WaypointAir(self.PatrolAltType, POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, ToTargetSpeed, true)
local ToWP = ToTargetCoord:WaypointAir(self.PatrolAltType, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, ToTargetSpeed, true)
PatrolRoute[#PatrolRoute+1] = ToWP
local Tasks = {}
Tasks[#Tasks+1] = AIPatrol:TaskFunction("AI_AIR_PATROL.___PatrolRoute", self)
PatrolRoute[#PatrolRoute].task = AIPatrol:TaskCombo( Tasks )

View File

@@ -13,7 +13,7 @@
--- @type AI_AIR_SQUADRON
-- @type AI_AIR_SQUADRON
-- @extends Core.Base#BASE
@@ -38,7 +38,7 @@ AI_AIR_SQUADRON = {
-- @return #AI_AIR_SQUADRON
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

View File

@@ -174,8 +174,7 @@ function AI_BAI_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Engage.
@@ -408,7 +407,7 @@ function AI_BAI_ZONE:onafterStart( Controllable, From, Event, To )
self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end
--- @param Wrapper.Controllable#CONTROLLABLE AIControllable
-- @param Wrapper.Controllable#CONTROLLABLE AIControllable
function _NewEngageRoute( AIControllable )
AIControllable:T( "NewEngageRoute" )
@@ -417,7 +416,7 @@ function _NewEngageRoute( AIControllable )
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -429,7 +428,7 @@ function AI_BAI_ZONE:onbeforeEngage( 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 #string From The From State string.
-- @param #string Event The Event string.
@@ -478,7 +477,7 @@ function AI_BAI_ZONE:onafterTarget( Controllable, From, Event, To )
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -488,7 +487,7 @@ function AI_BAI_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 )
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -522,12 +521,12 @@ function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To,
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
self.EngageSpeed,
true
)
@@ -578,13 +577,13 @@ function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To,
self:T2( ToTargetVec2 )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
local ToTargetPointVec3 = COORDINATE:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
self.EngageSpeed,
true
)
@@ -612,7 +611,7 @@ function AI_BAI_ZONE:onafterEngage( Controllable, From, Event, To,
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -623,7 +622,7 @@ function AI_BAI_ZONE:onafterAccomplish( Controllable, From, Event, To )
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -637,7 +636,7 @@ function AI_BAI_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end
--- @param #AI_BAI_ZONE self
-- @param #AI_BAI_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_BAI_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )

View File

@@ -27,7 +27,7 @@
-- @module AI.AI_Balancer
-- @image AI_Balancing.JPG
--- @type AI_BALANCER
-- @type AI_BALANCER
-- @field Core.Set#SET_CLIENT SetClient
-- @field Core.Spawn#SPAWN SpawnAI
-- @field Wrapper.Group#GROUP Test
@@ -220,16 +220,9 @@ function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup )
AIGroup:MessageToRed( "Returning to home base ...", 30 )
else
-- Okay, we need to send this Group back to the nearest base of the Coalition of the AI.
--TODO: i need to rework the POINT_VEC2 thing.
local PointVec2 = POINT_VEC2:New( AIGroup:GetVec2().x, AIGroup:GetVec2().y )
local PointVec2 = COORDINATE:New(AIGroup:GetVec2().x, 0, AIGroup:GetVec2().y)
local ClosestAirbase = self.ReturnAirbaseSet:FindNearestAirbaseFromPointVec2( PointVec2 )
self:T( ClosestAirbase.AirbaseName )
--[[
AIGroup:MessageToRed( "Returning to " .. ClosestAirbase:GetName().. " ...", 30 )
local RTBRoute = AIGroup:RouteReturnToAirbase( ClosestAirbase )
AIGroupTemplate.route = RTBRoute
AIGroup:Respawn( AIGroupTemplate )
]]
AIGroup:RouteRTB(ClosestAirbase)
end

View File

@@ -31,7 +31,7 @@
-- @module AI.AI_CAP
-- @image AI_Combat_Air_Patrol.JPG
--- @type AI_CAP_ZONE
-- @type AI_CAP_ZONE
-- @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.
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
@@ -344,7 +344,7 @@ function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To )
end
--- @param AI.AI_CAP#AI_CAP_ZONE
-- @param AI.AI_CAP#AI_CAP_ZONE
-- @param Wrapper.Group#GROUP EngageGroup
function AI_CAP_ZONE.EngageRoute( EngageGroup, Fsm )
@@ -355,7 +355,7 @@ function AI_CAP_ZONE.EngageRoute( EngageGroup, Fsm )
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 #string From The From State string.
-- @param #string Event The Event string.
@@ -367,7 +367,7 @@ function AI_CAP_ZONE:onbeforeEngage( Controllable, From, Event, To )
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 #string From The From State string.
-- @param #string Event The Event string.
@@ -395,7 +395,7 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
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 #string From The From State string.
-- @param #string Event The Event string.
@@ -405,7 +405,7 @@ function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 )
end
--- @param #AI_CAP_ZONE self
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -423,12 +423,12 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
ToEngageZoneSpeed,
true
)
@@ -445,13 +445,13 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
self:T2( { self.PatrolMinSpeed, self.PatrolMaxSpeed, ToTargetSpeed } )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
local ToTargetPointVec3 = COORDINATE:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToPatrolRoutePoint = ToTargetPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
ToTargetSpeed,
true
)
@@ -505,7 +505,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To )
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 #string From The From State string.
-- @param #string Event The Event string.
@@ -515,7 +515,7 @@ function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To )
self:SetDetectionOff()
end
--- @param #AI_CAP_ZONE self
-- @param #AI_CAP_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -528,7 +528,7 @@ function AI_CAP_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end
end
--- @param #AI_CAP_ZONE self
-- @param #AI_CAP_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_CAP_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )

View File

@@ -162,7 +162,6 @@ function AI_CAS_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @return #boolean Return false to cancel Transition.
--- OnAfter Transition Handler for Event Engage.
@@ -363,7 +362,7 @@ function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To )
self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end
--- @param AI.AI_CAS#AI_CAS_ZONE
-- @param AI.AI_CAS#AI_CAS_ZONE
-- @param Wrapper.Group#GROUP EngageGroup
function AI_CAS_ZONE.EngageRoute( EngageGroup, Fsm )
@@ -375,7 +374,7 @@ function AI_CAS_ZONE.EngageRoute( EngageGroup, Fsm )
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -387,7 +386,7 @@ function AI_CAS_ZONE:onbeforeEngage( 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 #string From The From State string.
-- @param #string Event The Event string.
@@ -420,7 +419,7 @@ function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -430,7 +429,7 @@ function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
self:__Route( 1 )
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -466,12 +465,12 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To,
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToEngageZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
self.EngageSpeed,
true
)
@@ -508,13 +507,13 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To,
self:T2( ToTargetVec2 )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
local ToTargetPointVec3 = COORDINATE:New( ToTargetVec2.x, self.EngageAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
self.EngageSpeed,
true
)
@@ -530,7 +529,7 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To,
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -541,7 +540,7 @@ function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To )
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -555,7 +554,7 @@ function AI_CAS_ZONE:onafterDestroy( Controllable, From, Event, To, EventData )
end
--- @param #AI_CAS_ZONE self
-- @param #AI_CAS_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_CAS_ZONE:OnEventDead( EventData )
self:F( { "EventDead", EventData } )

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo
-- @image Cargo.JPG
--- @type AI_CARGO
-- @type AI_CARGO
-- @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
local CarrierUnit = CarrierUnit -- Wrapper.Unit#UNIT
local IsEmpty = CarrierUnit:IsCargoEmpty()
self:I({ IsEmpty = IsEmpty })
self:T({ IsEmpty = IsEmpty })
if not IsEmpty then
AllUnloaded = false
break

View File

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

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_Airplane
-- @image AI_Cargo_Dispatching_For_Airplanes.JPG
--- @type AI_CARGO_AIRPLANE
-- @type AI_CARGO_AIRPLANE
-- @extends Core.Fsm#FSM_CONTROLLABLE
@@ -440,7 +440,7 @@ function AI_CARGO_AIRPLANE:Route( Airplane, Airbase, Speed, Height, Uncontrolled
-- To point.
local AirbasePointVec2 = Airbase:GetPointVec2()
local ToWaypoint = AirbasePointVec2:WaypointAir(POINT_VEC3.RoutePointAltType.BARO, "Land", "Landing", Speed or Airplane:GetSpeedMax()*0.8, true, Airbase)
local ToWaypoint = AirbasePointVec2:WaypointAir(COORDINATE.WaypointAltType.BARO, "Land", "Landing", Speed or Airplane:GetSpeedMax()*0.8, true, Airbase)
--ToWaypoint["airdromeId"] = Airbase:GetID()
--ToWaypoint["speed_locked"] = true

View File

@@ -116,7 +116,7 @@
-- @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_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.
@@ -1161,7 +1161,7 @@ function AI_CARGO_DISPATCHER:onafterMonitor()
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.",
tostring(Cargo:GetName()), Cargo:GetWeight(), LargestLoadCapacity, tostring(Carrier:GetName()))
self:I(text)
self:T(text)
end
end
end

View File

@@ -30,7 +30,7 @@
-- @module AI.AI_Cargo_Dispatcher_APC
-- @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

View File

@@ -24,7 +24,7 @@
-- @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

View File

@@ -25,7 +25,7 @@
-- @module AI.AI_Cargo_Dispatcher_Helicopter
-- @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

View File

@@ -23,7 +23,7 @@
-- @module AI.AI_Cargo_Dispatcher_Ship
-- @image AI_Cargo_Dispatcher.JPG
--- @type AI_CARGO_DISPATCHER_SHIP
-- @type AI_CARGO_DISPATCHER_SHIP
-- @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 SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart()
-- 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:Start()

View File

@@ -9,7 +9,7 @@
-- @module AI.AI_Cargo_Helicopter
-- @image AI_Cargo_Dispatching_For_Helicopters.JPG
--- @type AI_CARGO_HELICOPTER
-- @type AI_CARGO_HELICOPTER
-- @extends Core.Fsm#FSM_CONTROLLABLE
@@ -287,7 +287,7 @@ function AI_CARGO_HELICOPTER:SetLandingSpeedAndHeight(speed, height)
return self
end
--- @param #AI_CARGO_HELICOPTER self
-- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter
-- @param From
-- @param Event
@@ -326,7 +326,7 @@ function AI_CARGO_HELICOPTER:onafterLanded( Helicopter, From, Event, To )
end
--- @param #AI_CARGO_HELICOPTER self
-- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter
-- @param From
-- @param Event
@@ -367,8 +367,8 @@ function AI_CARGO_HELICOPTER:onafterQueue( Helicopter, From, Event, To, Coordina
-- local CoordinateFrom = Helicopter:GetCoordinate()
-- local WaypointFrom = CoordinateFrom:WaypointAir(
-- "RADIO",
-- POINT_VEC3.RoutePointType.TurningPoint,
-- POINT_VEC3.RoutePointAction.TurningPoint,
-- COORDINATE.WaypointType.TurningPoint,
-- COORDINATE.WaypointAction.TurningPoint,
-- Speed,
-- true
-- )
@@ -380,8 +380,8 @@ function AI_CARGO_HELICOPTER:onafterQueue( Helicopter, From, Event, To, Coordina
local WaypointTo = CoordinateTo:WaypointAir(
"RADIO",
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
50,
true
)
@@ -409,7 +409,7 @@ function AI_CARGO_HELICOPTER:onafterQueue( Helicopter, From, Event, To, Coordina
end
--- @param #AI_CARGO_HELICOPTER self
-- @param #AI_CARGO_HELICOPTER self
-- @param Wrapper.Group#GROUP Helicopter
-- @param From
-- @param Event
@@ -427,7 +427,7 @@ function AI_CARGO_HELICOPTER:onafterOrbit( Helicopter, From, Event, To, Coordina
local landheight = CoordinateTo:GetLandHeight() -- get target height
CoordinateTo.y = landheight + 50 -- flight height should be 50m above ground
local WaypointTo = CoordinateTo:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, 50, true)
local WaypointTo = CoordinateTo:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, 50, true)
Route[#Route+1] = WaypointTo
local Tasks = {}
@@ -496,14 +496,14 @@ function AI_CARGO_HELICOPTER:onafterPickup( Helicopter, From, Event, To, Coordin
local CoordinateFrom = Helicopter:GetCoordinate()
--- Create a route point of type air.
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, _speed, true)
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, _speed, true)
--- Create a route point of type air.
local CoordinateTo = Coordinate
local landheight = CoordinateTo:GetLandHeight() -- get target height
CoordinateTo.y = landheight + 50 -- flight height should be 50m above ground
local WaypointTo = CoordinateTo:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint,_speed, true)
local WaypointTo = CoordinateTo:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint,_speed, true)
Route[#Route+1] = WaypointFrom
Route[#Route+1] = WaypointTo
@@ -563,7 +563,7 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
--- Create a route point of type air.
local CoordinateFrom = Helicopter:GetCoordinate()
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, _speed, true)
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, _speed, true)
Route[#Route+1] = WaypointFrom
Route[#Route+1] = WaypointFrom
@@ -573,7 +573,7 @@ function AI_CARGO_HELICOPTER:onafterDeploy( Helicopter, From, Event, To, Coordin
local landheight = CoordinateTo:GetLandHeight() -- get target height
CoordinateTo.y = landheight + 50 -- flight height should be 50m above ground
local WaypointTo = CoordinateTo:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, _speed, true)
local WaypointTo = CoordinateTo:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, _speed, true)
Route[#Route+1] = WaypointTo
Route[#Route+1] = WaypointTo
@@ -631,7 +631,7 @@ function AI_CARGO_HELICOPTER:onafterHome( Helicopter, From, Event, To, Coordinat
--- Create a route point of type air.
local CoordinateFrom = Helicopter:GetCoordinate()
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, Speed, true)
local WaypointFrom = CoordinateFrom:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, Speed, true)
Route[#Route+1] = WaypointFrom
--- Create a route point of type air.
@@ -639,7 +639,7 @@ function AI_CARGO_HELICOPTER:onafterHome( Helicopter, From, Event, To, Coordinat
local landheight = CoordinateTo:GetLandHeight() -- get target height
CoordinateTo.y = landheight + Height -- flight height should be 50m above ground
local WaypointTo = CoordinateTo:WaypointAir("RADIO", POINT_VEC3.RoutePointType.TurningPoint, POINT_VEC3.RoutePointAction.TurningPoint, Speed, true)
local WaypointTo = CoordinateTo:WaypointAir("RADIO", COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, Speed, true)
Route[#Route+1] = WaypointTo

View File

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

View File

@@ -556,7 +556,7 @@ function AI_ESCORT:SetFlightMenuFormation( Formation )
if MenuFormation then
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 MenuFlightFormationID = MENU_GROUP_COMMAND:New( self.PlayerGroup, Formation, FlightMenuFormation,
function ( self, Formation, ... )

View File

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

View File

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

View File

@@ -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.
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- ===
--
-- ### Authors: **FlightControl**
@@ -153,7 +153,7 @@
--- @type AI_ESCORT_REQUEST
-- @type AI_ESCORT_REQUEST
-- @extends AI.AI_Escort#AI_ESCORT
--- AI_ESCORT_REQUEST class
@@ -228,7 +228,7 @@ function AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, EscortAirbase, EscortNa
return self
end
--- @param #AI_ESCORT_REQUEST self
-- @param #AI_ESCORT_REQUEST self
function AI_ESCORT_REQUEST:SpawnEscort()
local EscortGroup = self.EscortSpawn:SpawnAtAirbase( self.EscortAirbase, SPAWN.Takeoff.Hot )
@@ -253,7 +253,7 @@ function AI_ESCORT_REQUEST:SpawnEscort()
self:_InitEscortMenus( EscortGroup )
self:_InitEscortRoute( EscortGroup )
--- @param #AI_ESCORT self
-- @param #AI_ESCORT self
-- @param Core.Event#EVENTDATA EventData
function EscortGroup:OnEventDeadOrCrash( EventData )
self:F( { "EventDead", EventData } )
@@ -268,7 +268,7 @@ function AI_ESCORT_REQUEST:SpawnEscort()
end
--- @param #AI_ESCORT_REQUEST self
-- @param #AI_ESCORT_REQUEST self
-- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT_REQUEST:onafterStart( EscortGroupSet )
@@ -290,14 +290,14 @@ function AI_ESCORT_REQUEST:onafterStart( EscortGroupSet )
end
--- @param #AI_ESCORT_REQUEST self
-- @param #AI_ESCORT_REQUEST self
-- @param Core.Set#SET_GROUP EscortGroupSet
function AI_ESCORT_REQUEST:onafterStop( EscortGroupSet )
self:F()
EscortGroupSet:ForEachGroup(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Core.Group#GROUP EscortGroup
function( EscortGroup )
EscortGroup:WayPointInitialize()

View File

@@ -34,8 +34,8 @@
-- @field Core.Scheduler#SCHEDULER FollowScheduler The instance of the SCHEDULER class.
-- @field #number FollowDistance The current follow distance.
-- @field #boolean ReportTargets If true, nearby targets are reported.
-- @field DCS#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup.
-- @field DCS#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the FollowGroup.
-- @Field DCSTypes#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup.
-- @field DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the FollowGroup.
-- @field #number dtFollow Time step between position updates.
@@ -92,12 +92,12 @@
-- local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" )
-- LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 )
-- LargeFormation:__Start( 1 )
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--
-- @field #AI_FORMATION
AI_FORMATION = {
ClassName = "AI_FORMATION",
@@ -117,7 +117,7 @@ AI_FORMATION = {
AI_FORMATION.__Enum = {}
--- @type AI_FORMATION.__Enum.Formation
-- @type AI_FORMATION.__Enum.Formation
-- @field #number None
-- @field #number Line
-- @field #number Trail
@@ -142,7 +142,7 @@ AI_FORMATION.__Enum.Formation = {
Box = 10,
}
--- @type AI_FORMATION.__Enum.Mode
-- @type AI_FORMATION.__Enum.Mode
-- @field #number Mission
-- @field #number Formation
AI_FORMATION.__Enum.Mode = {
@@ -152,13 +152,13 @@ AI_FORMATION.__Enum.Mode = {
Reconnaissance = "R",
}
--- @type AI_FORMATION.__Enum.ReportType
-- @type AI_FORMATION.__Enum.ReportType
-- @field #number All
-- @field #number Airborne
-- @field #number GroundRadar
-- @field #number Ground
AI_FORMATION.__Enum.ReportType = {
Airborne = "*",
All = "*",
Airborne = "A",
GroundRadar = "R",
Ground = "G",
@@ -725,7 +725,7 @@ function AI_FORMATION:onafterFormationLine( FollowGroupSet, From , Event , To, X
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
local PointVec3 = COORDINATE:New()
PointVec3:SetX( XStart + i * XSpace )
PointVec3:SetY( YStart + i * YSpace )
PointVec3:SetZ( ZStart + i * ZSpace )
@@ -877,7 +877,7 @@ function AI_FORMATION:onafterFormationCenterWing( FollowGroupSet, From , Event ,
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
local PointVec3 = COORDINATE:New()
local Side = ( i % 2 == 0 ) and 1 or -1
local Row = i / 2 + 1
@@ -936,7 +936,7 @@ function AI_FORMATION:onafterFormationBox( FollowGroupSet, From , Event , To, XS
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
local PointVec3 = COORDINATE:New()
local ZIndex = i % ZLevels
local XIndex = math.floor( i / ZLevels )
@@ -996,7 +996,7 @@ function AI_FORMATION:SetFlightModeMission( FollowGroup )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
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 )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
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 )
else
self.FollowGroupSet:ForSomeGroupAlive(
--- @param Wrapper.Group#GROUP EscortGroup
-- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
@@ -1222,7 +1222,7 @@ function AI_FORMATION:FollowMe(FollowGroup, ClientUnit, CT1, CV1, CT2, CV2)
local CVI = {
x = CV2.x + CS * 10 * math.sin(Ca),
y = GH2.y + Inclination, -- + FollowFormation.y,
y = GH2.y,
--y = GH2.y,
z = CV2.z + CS * 10 * math.cos(Ca),
}

View File

@@ -652,15 +652,15 @@ function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To )
end
--- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable+
function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To )
return self.DetectOn and self.DetectActivated
end
--- @param #AI_PATROL_ZONE self
--- @param Wrapper.Controllable#CONTROLLABLE Controllable
-- @param #AI_PATROL_ZONE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable
function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To )
local Detected = false
@@ -705,7 +705,7 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To )
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.
-- Note that this method is required, as triggers the next route when patrolling for the Controllable.
function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable )
@@ -751,12 +751,12 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
if not CurrentVec2 then return end
--Done: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TakeOffParking,
POINT_VEC3.RoutePointAction.FromParkingArea,
COORDINATE.WaypointType.TakeOffParking,
COORDINATE.WaypointAction.FromParkingArea,
ToPatrolZoneSpeed,
true
)
@@ -767,12 +767,12 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
if not CurrentVec2 then return end
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
ToPatrolZoneSpeed,
true
)
@@ -792,13 +792,13 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
self:T2( { self.PatrolMinSpeed, self.PatrolMaxSpeed, ToTargetSpeed } )
--- Obtain a 3D @{Point} from the 2D point + altitude.
local ToTargetPointVec3 = POINT_VEC3:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
local ToTargetPointVec3 = COORDINATE:New( ToTargetVec2.x, ToTargetAltitude, ToTargetVec2.y )
--- Create a route point of type air.
local ToTargetRoutePoint = ToTargetPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
ToTargetSpeed,
true
)
@@ -822,13 +822,13 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To )
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onbeforeStatus()
return self.CheckStatus
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterStatus()
self:F2()
@@ -838,7 +838,7 @@ function AI_PATROL_ZONE:onafterStatus()
local Fuel = self.Controllable:GetFuelMin()
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 OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed )
@@ -846,16 +846,25 @@ function AI_PATROL_ZONE:onafterStatus()
OldAIControllable:SetTask( TimedOrbitTask, 10 )
RTB = true
else
end
-- TODO: Check GROUP damage function.
local Damage = self.Controllable:GetLife()
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
end
if self:IsInstanceOf("AI_CAS") or self:IsInstanceOf("AI_BAI") then
local atotal,shells,rockets,bombs,missiles = self.Controllable:GetAmmunition()
local arelevant = rockets+bombs
if arelevant == 0 or missiles == 0 then
RTB = true
self:T({total=atotal,shells=shells,rockets=rockets,bombs=bombs,missiles=missiles})
self:T( self.Controllable:GetName() .. " is out of ammo, RTB!" )
end
end
if RTB == true then
self:RTB()
else
@@ -864,7 +873,7 @@ function AI_PATROL_ZONE:onafterStatus()
end
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterRTB()
self:F2()
@@ -881,12 +890,12 @@ function AI_PATROL_ZONE:onafterRTB()
--DONE: Create GetAltitude function for GROUP, and delete GetUnit(1).
--local CurrentAltitude = self.Controllable:GetUnit(1):GetAltitude()
local CurrentAltitude = self.Controllable:GetAltitude()
local CurrentPointVec3 = POINT_VEC3:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local CurrentPointVec3 = COORDINATE:New( CurrentVec2.x, CurrentAltitude, CurrentVec2.y )
local ToPatrolZoneSpeed = self.PatrolMaxSpeed
local CurrentRoutePoint = CurrentPointVec3:WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,
COORDINATE.WaypointType.TurningPoint,
COORDINATE.WaypointAction.TurningPoint,
ToPatrolZoneSpeed,
true
)
@@ -903,13 +912,13 @@ function AI_PATROL_ZONE:onafterRTB()
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
function AI_PATROL_ZONE:onafterDead()
self:SetDetectionOff()
self:SetStatusOff()
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnCrash( EventData )
@@ -920,7 +929,7 @@ function AI_PATROL_ZONE:OnCrash( EventData )
end
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnEjection( EventData )
@@ -929,7 +938,7 @@ function AI_PATROL_ZONE:OnEjection( EventData )
end
end
--- @param #AI_PATROL_ZONE self
-- @param #AI_PATROL_ZONE self
-- @param Core.Event#EVENTDATA EventData
function AI_PATROL_ZONE:OnPilotDead( EventData )

View File

@@ -274,7 +274,7 @@ do -- ACT_ACCOUNT_DEADS
--- DCS Events
--- @param #ACT_ACCOUNT_DEADS self
-- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:OnEventHit( EventData )
self:T( { "EventDead", EventData } )
@@ -285,7 +285,7 @@ do -- ACT_ACCOUNT_DEADS
end
end
--- @param #ACT_ACCOUNT_DEADS self
-- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:onfuncEventDead( EventData )
self:T( { "EventDead", EventData } )
@@ -297,7 +297,7 @@ do -- ACT_ACCOUNT_DEADS
--- DCS Events
--- @param #ACT_ACCOUNT_DEADS self
-- @param #ACT_ACCOUNT_DEADS self
-- @param Core.Event#EVENTDATA EventData
function ACT_ACCOUNT_DEADS:onfuncEventCrash( 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 )
self.TargetSetUnit:ForEachUnit(
--- @param Wrapper.Unit#UNIT SmokeUnit
-- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit )
if math.random( 1, ( 100 * self.TargetSetUnit:Count() ) / 4 ) <= 100 then
SCHEDULER:New( self,

View File

@@ -275,14 +275,14 @@
-- The cargo must be in the **Loaded** state.
-- @function [parent=#CARGO] UnBoard
-- @param #CARGO self
-- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.
-- @param Core.Point#COORDINATE ToPointVec2 (optional) @{Core.Point#COORDINATE) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.
--- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier.
-- The cargo must be in the **Loaded** state.
-- @function [parent=#CARGO] __UnBoard
-- @param #CARGO self
-- @param #number DelaySeconds The amount of seconds to delay the action.
-- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.
-- @param Core.Point#COORDINATE ToPointVec2 (optional) @{Core.Point#COORDINATE) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.
-- Load
@@ -307,14 +307,14 @@
-- The cargo must be in the **Loaded** state.
-- @function [parent=#CARGO] UnLoad
-- @param #CARGO self
-- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.
-- @param Core.Point#COORDINATE ToPointVec2 (optional) @{Core.Point#COORDINATE) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.
--- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading.
-- The cargo must be in the **Loaded** state.
-- @function [parent=#CARGO] __UnLoad
-- @param #CARGO self
-- @param #number DelaySeconds The amount of seconds to delay the action.
-- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.
-- @param Core.Point#COORDINATE ToPointVec2 (optional) @{Core.Point#COORDINATE) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.
-- State Transition Functions
@@ -467,7 +467,7 @@ do -- CARGO
self.Type = Type
self.Name = Name
self.Weight = Weight or 0
self.CargoObject = nil
self.CargoObject = nil -- Wrapper.Group#GROUP
self.CargoCarrier = nil -- Wrapper.Client#CLIENT
self.Representable = false
self.Slingloadable = false
@@ -897,7 +897,7 @@ do -- CARGO
--- Get the current PointVec2 of the cargo.
-- @param #CARGO self
-- @return Core.Point#POINT_VEC2
-- @return Core.Point#COORDINATE
function CARGO:GetPointVec2()
return self.CargoObject:GetPointVec2()
end
@@ -1094,7 +1094,7 @@ do -- CARGO_REPRESENTABLE
--- Route a cargo unit to a PointVec2.
-- @param #CARGO_REPRESENTABLE self
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number Speed
-- @return #CARGO_REPRESENTABLE
function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed )

View File

@@ -78,7 +78,7 @@ do -- CARGO_CRATE
return self
end
--- @param #CARGO_CRATE self
-- @param #CARGO_CRATE self
-- @param Core.Event#EVENTDATA EventData
function CARGO_CRATE:OnEventCargoDead( EventData )
@@ -114,7 +114,7 @@ do -- CARGO_CRATE
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2
-- @param Core.Point#COORDINATE
function CARGO_CRATE:onenterUnLoaded( From, Event, To, ToPointVec2 )
--self:T( { ToPointVec2, From, Event, To } )

View File

@@ -22,6 +22,7 @@ do -- CARGO_GROUP
--- @type CARGO_GROUP
-- @field Core.Set#SET_CARGO CargoSet The collection of derived CARGO objects.
-- @field #string GroupName The name of the CargoGroup.
-- @field Wrapper.Group#GROUÜ CargoCarrier The carrier group.
-- @extends Cargo.Cargo#CARGO_REPORTABLE
--- Defines a cargo that is represented by a @{Wrapper.Group} object within the simulator.
@@ -410,7 +411,7 @@ do -- CARGO_GROUP
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @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, ... )
self:T( {From, Event, To, ToPointVec2, NearRadius } )
@@ -453,7 +454,7 @@ do -- CARGO_GROUP
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @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, ... )
--self:T( { From, Event, To, ToPointVec2, NearRadius } )
@@ -491,7 +492,7 @@ do -- CARGO_GROUP
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
function CARGO_GROUP:onafterUnLoad( From, Event, To, ToPointVec2, ... )
--self:T( { From, Event, To, ToPointVec2 } )
@@ -598,7 +599,7 @@ do -- CARGO_GROUP
end
--- Get the amount of cargo units in the group.
--- Get the underlying GROUP object from the CARGO_GROUP.
-- @param #CARGO_GROUP self
-- @return #CARGO_GROUP
function CARGO_GROUP:GetGroup( Cargo )
@@ -771,3 +772,4 @@ do -- CARGO_GROUP
end -- CARGO_GROUP

View File

@@ -72,7 +72,7 @@ do -- CARGO_SLINGLOAD
end
--- @param #CARGO_SLINGLOAD self
-- @param #CARGO_SLINGLOAD self
-- @param Core.Event#EVENTDATA EventData
function CARGO_SLINGLOAD:OnEventCargoDead( EventData )

View File

@@ -72,7 +72,7 @@ do -- CARGO_UNIT
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 25 m.
function CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
@@ -145,7 +145,7 @@ do -- CARGO_UNIT
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
@@ -171,7 +171,7 @@ do -- CARGO_UNIT
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2 ToPointVec2
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
@@ -197,7 +197,7 @@ do -- CARGO_UNIT
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#POINT_VEC2
-- @param Core.Point#COORDINATE
function CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 )
self:T( { ToPointVec2, From, Event, To } )

View File

@@ -157,6 +157,8 @@ ASTAR = {
-- @field #number surfacetype Surface type.
-- @field #table valid Cached valid/invalid nodes.
-- @field #table cost Cached cost.
-- @field Core.Pathline#PATHLINE pathline Pathline that node is part of.
-- @field Core.Pathline#PATHLINE.Point pathpoint Pathline point.
--- ASTAR infinity.
-- @field #number INF
@@ -164,7 +166,7 @@ ASTAR.INF=1/0
--- ASTAR class version.
-- @field #string version
ASTAR.version="0.4.0"
ASTAR.version="0.5.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -172,6 +174,7 @@ ASTAR.version="0.4.0"
-- TODO: Add more valid neighbour functions.
-- TODO: Write docs.
-- DONE: Add pathlines for seach/valid neighbours.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
@@ -244,7 +247,10 @@ end
function ASTAR:AddNode(Node)
self.nodes[Node.id]=Node
self.Nnodes=self.Nnodes+1
self.Nnodes=self.Nnodes+1
self:T3(self.lid..string.format("Adding node UID=%d", Node.id))
--Node.coordinate:MarkToAll(string.format("Node ID=%d", Node.id))
return self
end
@@ -262,6 +268,47 @@ function ASTAR:AddNodeFromCoordinate(Coordinate)
return node
end
--- Adds nodes to the table of grid nodes from a PATHLINE.
-- @param #ASTAR self
-- @param Core.Pathline#PATHLINE Pathline Pathline or name of pathline. Has to exist.
-- @return #ASTAR self
function ASTAR:AddNodeFromPathlineName(Pathline)
if type(Pathline)=="string" then
Pathline=PATHLINE:FindByName(Pathline)
end
if Pathline then
for i,_point in pairs(Pathline.points) do
local point=_point --Core.Pathline#PATHLINE.Point
-- Create node from point coordinate.
local node=self:AddNodeFromCoordinate(COORDINATE:NewFromVec3(point.vec3))
-- Add pathline parameters.
node.pathline=Pathline
node.pathpoint=point
-- Debug.
local name=node.pathline and node.pathline.name or "N/A"
local idx=node.pathline and node.pathline:_GetPointIndex(node.pathpoint) or "N/A"
-- Debug message.
self:T(self.lid..string.format("Adding node UID=%d pathline=%s [%s]", node.id, name, tostring(idx)))
-- Debug mark
--node.coordinate:MarkToAll(string.format("Node ID=%d\npathline=%s [%s]", node.id, name, tostring(idx)))
end
else
env.error("FF error pathline")
end
return self
end
--- Check if the coordinate of a node has is at a valid surface type.
-- @param #ASTAR self
-- @param #ASTAR.Node Node The node to be added.
@@ -340,6 +387,18 @@ function ASTAR:SetValidNeighbourRoad(MaxDistance)
return self
end
--- Set valid neighbours to be on the same pathline or not further apart than 10 meters to jump from one pathline to another.
-- @param #ASTAR self
-- @param #number MaxDistance Max allowed distance between nodes of different pathlines in meters. Default is 10 m.
-- @return #ASTAR self
function ASTAR:SetValidNeighbourPathline(MaxDistance)
self:SetValidNeighbourFunction(ASTAR.Pathline, MaxDistance)
return self
end
--- Set the function which calculates the "cost" to go from one to another node.
-- The first to arguments of this function are always the two nodes under consideration. But you can add optional arguments.
-- Very often the distance between nodes is a good measure for the cost.
@@ -384,7 +443,7 @@ end
-- @return #ASTAR self
function ASTAR:SetCostRoad()
self:SetCostFunction(ASTAR)
self:SetCostFunction(ASTAR.Road)
return self
end
@@ -544,6 +603,55 @@ function ASTAR.Road(nodeA, nodeB)
end
--- Function to check if two nodes are on the same pathline or if nodes are less than 10 meters apart.
-- @param #ASTAR.Node nodeA First node.
-- @param #ASTAR.Node nodeB Other node.
-- @param #number distmax Max distance in meters. Default is 10 m.
-- @return #boolean If true, two nodes are connected.
function ASTAR.Pathline(nodeA, nodeB, distmax)
distmax=distmax or 10
if nodeA.pathline.name==nodeB.pathline.name then
-- Nodes are on the same pathline. We use the index to check if they are neighbours.
local pathline=nodeA.pathline
local idxA=pathline:_GetPointIndex(nodeA.pathpoint)
local idxB=pathline:_GetPointIndex(nodeB.pathpoint)
if math.abs(idxA-idxB)<=1 then
return true
end
else
-- Check if nodeB is close to pathline of nodeA.
local c, dist, segA=nodeA.pathline:GetClosestPoint3D(nodeB.coordinate)
local seg=segA --Core.Pathline#PATHLINE.Segment
if dist<distmax and (nodeA.pathpoint.uid==seg.p1.uid or nodeA.pathpoint.uid==seg.p2.uid) then
--env.info(string.format("FF NodeB=%d [pathline=%s] is close to NodeA=%d [pathline=%s] ==> valid neighbour", nodeB.id, nodeB.pathline.name, nodeA.id, nodeA.pathline.name))
return true
end
-- Check if nodeA is close to pathline of nodeB.
local c, dist, segB=nodeB.pathline:GetClosestPoint3D(nodeA.coordinate)
local seg=segB --Core.Pathline#PATHLINE.Segment
if dist<distmax and (nodeB.pathpoint.uid==seg.p1.uid or nodeB.pathpoint.uid==seg.p2.uid) then
--env.info(string.format("FF NodeA=%d [pathline=%s] is close to NodeB=%d [pathline=%s] ==> valid neighbour", nodeA.id, nodeA.pathline.name, nodeB.id, nodeB.pathline.name))
return true
end
end
return false
end
--- Function to check if distance between two nodes is less than a threshold distance.
-- @param #ASTAR.Node nodeA First node.
-- @param #ASTAR.Node nodeB Other node.
@@ -567,7 +675,9 @@ end
-- @param #ASTAR.Node nodeB Other node.
-- @return #number Distance between the two nodes.
function ASTAR.Dist2D(nodeA, nodeB)
local dist=nodeA.coordinate:Get2DDistance(nodeB)
local dist=nodeA.coordinate:Get2DDistance(nodeB.coordinate)
--local text=string.format("FF Cost Dist2D NodeA=%d-->NodeB=%d = %.1f", nodeA.id, nodeB.id, dist)
--env.info(text)
return dist
end
@@ -594,7 +704,7 @@ function ASTAR.DistRoad(nodeA, nodeB)
local dist=0
for i=2,#path do
local b=path[i] --DCS#Vec2
local b=path[i] --DCS#Vec2
local a=path[i-1] --DCS#Vec2
dist=dist+UTILS.VecDist2D(a,b)
@@ -604,7 +714,6 @@ function ASTAR.DistRoad(nodeA, nodeB)
return dist
end
return math.huge
end
@@ -614,10 +723,11 @@ end
--- Find the closest node from a given coordinate.
-- @param #ASTAR self
-- @param Core.Point#COORDINATE Coordinate.
-- @return #ASTAR.Node Cloest node to the coordinate.
-- @param Core.Point#COORDINATE Coordinate Reference coordinate.
-- @param #table ExcludeNodes Table of nodes that are excluded.
-- @return #ASTAR.Node Closest node to the coordinate.
-- @return #number Distance to closest node in meters.
function ASTAR:FindClosestNode(Coordinate)
function ASTAR:FindClosestNode(Coordinate, ExcludeNodes)
local distMin=math.huge
local closeNode=nil
@@ -625,11 +735,15 @@ function ASTAR:FindClosestNode(Coordinate)
for _,_node in pairs(self.nodes) do
local node=_node --#ASTAR.Node
local dist=node.coordinate:Get2DDistance(Coordinate)
if ExcludeNodes==nil or self:_IsNodeNotInTable(ExcludeNodes, node) then
if dist<distMin then
distMin=dist
closeNode=node
local dist=node.coordinate:Get2DDistance(Coordinate)
if dist<distMin then
distMin=dist
closeNode=node
end
end
end
@@ -637,38 +751,162 @@ function ASTAR:FindClosestNode(Coordinate)
return closeNode, distMin
end
--- Find the closest pathline to a given reference coordinate.
-- @param #ASTAR self
-- @param Core.Point#COORDINATE Coordinate Reference coordinate.
-- @return Core.Pathline#PATHLINE Closest pathline
-- @return #number Distance in meters.
-- @return DCS#Vec3 Closest point on pathline to the ref coordinate.
-- @return Core.Pathline#PATHLINE.Segment Segment.
function ASTAR:FindClosestPathline(Coordinate)
local pathline=nil --Core.Pathline#PATHLINE
local dist=math.huge
local vec3=nil
local S=nil
for _,_node in pairs(self.nodes) do
local node=_node --#ASTAR.Node
if node.pathline then
local vec, d, s=node.pathline:GetClosestPoint3D(Coordinate)
if d<dist then
pathline=node.pathline
dist=d
vec3=vec
S=s
end
end
end
if pathline then
-- Debug info.
self:T(self.lid..string.format("Closest pathline %s: dist=%.1f", pathline.name, dist))
end
return pathline, dist, vec3, S
end
--- Find the closest node to the given coordinate.
-- @param #ASTAR self
-- @param Core.Point#COORDINATE Coord Reference coordinate.
-- @param #table ExcludeNodes Nodes that are excluded.
-- @return #ASTAR.Node The node that was fround
function ASTAR:_FindClosestTerminalNode(Coord, ExcludeNodes)
-- Find the closest pathline to the ref coordinate.
local pathline, dist, vec3, s=self:FindClosestPathline(Coord)
-- Find the closest node to the given start coordinate.
local node, dist2=self:FindClosestNode(Coord)
if pathline and vec3 and dist and dist2>dist then
-- Create a node on the closest pathline so we first go straight there and then along the pathline.
local node=self:AddNodeFromCoordinate(COORDINATE:NewFromVec3(vec3))
-- We also need the pathline point.
local point=pathline:AddPointFromVec3(vec3, nil, s.p1)
node.pathline=pathline
node.pathpoint=point
self:T2(self.lid..string.format("Added new node=%d, which is closest to start coord. dist=%.1f m", node.id, dist))
end
-- Find the closest node to the given start coordinate.
local Node, dist3=self:FindClosestNode(Coord, ExcludeNodes)
-- Debug info.
self:T(self.lid..string.format("CLOSEST node ID=%d, distance=%.1f", Node.id, dist3))
return Node, dist3
end
--- Find the start node.
-- @param #ASTAR self
-- @param #ASTAR.Node Node The node to be added to the nodes table.
-- @return #ASTAR self
function ASTAR:FindStartNode()
-- Find the closest pathline to the
local pathline, dist, vec3, s=self:FindClosestPathline(self.startCoord)
local node, dist=self:FindClosestNode(self.startCoord)
-- Find the closest node to the given start coordinate.
local node, dist2=self:FindClosestNode(self.startCoord)
self.startNode=node
if dist>1000 then
self:T(self.lid.."Adding start node to node grid!")
self:AddNode(node)
if pathline and vec3 and dist and dist2>dist then
-- Create a node on the closest pathline so we first go straight there and then along the pathline.
local node=self:AddNodeFromCoordinate(COORDINATE:NewFromVec3(vec3))
-- We also need the pathline point.
local point=pathline:AddPointFromVec3(vec3, nil, s.p1)
node.pathline=pathline
node.pathpoint=point
self:T2(self.lid..string.format("Added new node=%d, which is closest to start coord. dist=%.1f m", node.id, dist))
end
-- Find the closest node to the given start coordinate.
self.startNode, dist2=self:FindClosestNode(self.startCoord)
--self.startNode.coordinate:MarkToAll("Start Node")
-- Debug info.
self:T(self.lid..string.format("START node ID=%d", self.startNode.id))
-- Not sure why I did this. The node does not need to be added again as it is already contained in self.nodes!
-- if dist>1000 then
-- self:T(self.lid.."Adding start node to node grid!")
-- self:AddNode(node)
-- end
return self
end
--- Add a node.
--- Find the end node.
-- @param #ASTAR self
-- @param #ASTAR.Node Node The node to be added to the nodes table.
-- @return #ASTAR self
function ASTAR:FindEndNode()
local node, dist=self:FindClosestNode(self.endCoord)
self.endNode=node
if dist>1000 then
self:T(self.lid.."Adding end node to node grid!")
self:AddNode(node)
local pathline, dist, vec3, s=self:FindClosestPathline(self.endCoord)
-- Find the closest node to the given start coordinate.
local node, dist2=self:FindClosestNode(self.endCoord)
if pathline and vec3 and dist and dist2>dist then
-- Create a node on the closest pathline so we first go straight there and then along the pathline.
local node=self:AddNodeFromCoordinate(COORDINATE:NewFromVec3(vec3))
-- We also need the point.
local point=pathline:AddPointFromVec3(vec3, nil, s.p1)
-- Add pathline parameters to node.
node.pathline=pathline
node.pathpoint=point
self:T2(self.lid..string.format("Added new node=%d, which is closest to END coord: dist=%.1f m", node.id, dist))
end
-- Find closest node to the end coordinate (exclude the start coordinate.
self.endNode, dist=self:FindClosestNode(self.endCoord, {self.startNode})
--self.endNode.coordinate:MarkToAll("End Node")
-- Debug info.
self:T(self.lid..string.format("END node ID=%d", self.endNode.id))
-- Not sure why I did this. The node does not need to be added again as it is already contained in self.nodes!
-- if dist>1000 then
-- self:T(self.lid.."Adding end node to node grid!")
-- self:AddNode(node)
-- end
return self
end
@@ -684,12 +922,21 @@ end
-- @return #table Table of nodes from start to finish.
function ASTAR:GetPath(ExcludeStartNode, ExcludeEndNode)
self:FindStartNode()
self:FindEndNode()
-- self:FindStartNode()
-- self:FindEndNode()
-- Find start Node (closest node to start coordinate).
self.startNode=self:_FindClosestTerminalNode(self.startCoord)
-- Find end node, which is not the start node (excluded).
self.endNode=self:_FindClosestTerminalNode(self.endCoord, {self.startNode})
local nodes=self.nodes
local start=self.startNode
local goal=self.endNode
-- Debug info.
self:T(self.lid..string.format("GetPath Start Node=%d, End Node=%d", start.id, goal.id))
-- Sets.
local openset = {}
@@ -746,7 +993,12 @@ function ASTAR:GetPath(ExcludeStartNode, ExcludeEndNode)
text=text..string.format(", OS Time %.6f sec", dT)
end
text=text..string.format(", Nvalid=%d [%d cached]", self.nvalid, self.nvalidcache)
text=text..string.format(", Ncost=%d [%d cached]", self.ncost, self.ncostcache)
text=text..string.format(", Ncost=%d [%d cached]", self.ncost, self.ncostcache)
text=text..string.format("\nNodes:")
for i,_node in ipairs(path) do
local node=_node --#ASTAR.Node
text=text..string.format("\n[%d] Node ID=%d", i, node.id)
end
self:T(self.lid..text)
return path
@@ -759,13 +1011,16 @@ function ASTAR:GetPath(ExcludeStartNode, ExcludeEndNode)
-- Get neighbour nodes.
local neighbors=self:_NeighbourNodes(current, nodes)
-- Loop over neighbours.
for _,neighbor in pairs(neighbors) do
-- Node is not in closed set.
if self:_NotIn(closedset, neighbor.id) then
local tentative_g_score=g_score[current.id]+self:_DistNodes(current, neighbor)
-- Calculate tentative_g_score.
--local tentative_g_score=g_score[current.id] + self:_DistNodes(current, neighbor)
local tentative_g_score=g_score[current.id] + self:_HeuristicCost(current, neighbor)
if self:_NotIn(openset, neighbor.id) or tentative_g_score < g_score[neighbor.id] then
@@ -793,6 +1048,73 @@ function ASTAR:GetPath(ExcludeStartNode, ExcludeEndNode)
return nil -- no valid path
end
--- A* pathfinding function. This seaches the path along nodes between start and end nodes/coordinates.
-- It automatically creates a PATHLINE object that is returned in combination with the nodes of the optimal path.
-- @param #ASTAR self
-- @param #boolean ExcludeStartNode If *true*, do not include start node in found path. Default is to include it.
-- @param #boolean ExcludeEndNode If *true*, do not include end node in found path. Default is to include it.
-- @return Core.Pathline#PATHLINE Pathline.
-- @return #table Nodes of path.
function ASTAR:GetPathline(ExcludeStartNode, ExcludeEndNode)
local nodes=self:GetPath(ExcludeStartNode, ExcludeEndNode)
local pathline=nil --Core.Pathline#PATHLINE
if nodes then
pathline=PATHLINE:New("Astar")
for _,_node in pairs(nodes) do
local node=_node --#ASTAR.Node
local point=pathline:AddPointFromVec3(node.coordinate)
point.name=node.pathline.name
end
end
return pathline, nodes
end
--- Get pathlines from nodes.
-- @param #ASTAR self
-- @param #table Nodes Given nodes.
-- @return #table Table of PATHLINES used in the path.
function ASTAR:GetPathlinesFromNodes(Nodes)
local pathlines={}
--for _,_node in pairs(Nodes or {}) do
for i=1,#Nodes do
local node=Nodes[i] --#ASTAR.Node
-- Pathline.
local pathline=node.pathline
if pathline and i>1 and i<#Nodes then
-- Previous and next nodes.
local n=Nodes[i-1] --#ASTAR.Node
local N=Nodes[i+1] --#ASTAR.Node
-- Check if previous and next nodes are on the same pathline.
-- If only one point in beteen is of another pathline, this is a junction and we dont actually switch to the other pathline.
if n.pathline and N.pathline and n.pathline.name==N.pathline.name and n.pathline.name~=pathline.name then
pathline=n.pathline
end
end
-- We do not want to add the same pathline two times in a row.
if #pathlines==0 or (#pathlines>0 and pathlines[#pathlines].name~=pathline.name) then
table.insert(pathlines, pathline)
end
end
return pathlines
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- A* pathfinding helper functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -811,16 +1133,18 @@ function ASTAR:_HeuristicCost(nodeA, nodeB)
local cost=nodeA.cost[nodeB.id]
if cost~=nil then
self.ncostcache=self.ncostcache+1
self:T(self.lid..string.format("Cost nodeA=%d --> nodeB=%d = %.1f (Cashed!)", nodeA.id, nodeB.id, cost))
return cost
end
local cost=nil
if self.CostFunc then
cost=self.CostFunc(nodeA, nodeB, unpack(self.CostArg))
else
cost=self:_DistNodes(nodeA, nodeB)
end
self:T(self.lid..string.format("Cost nodeA=%d --> nodeB=%d = %.1f", nodeA.id, nodeB.id, cost))
nodeA.cost[nodeB.id]=cost
nodeB.cost[nodeA.id]=cost -- Symmetric problem.
@@ -834,9 +1158,10 @@ end
-- @return #boolean If true, transition between nodes is possible.
function ASTAR:_IsValidNeighbour(node, neighbor)
-- Counter.
-- Counter of function calls.
self.nvalid=self.nvalid+1
-- Check if neighbour is in cached set.
local valid=node.valid[neighbor.id]
if valid~=nil then
--env.info(string.format("Node %d has valid=%s neighbour %d", node.id, tostring(valid), neighbor.id))
@@ -844,13 +1169,16 @@ function ASTAR:_IsValidNeighbour(node, neighbor)
return valid
end
-- Check if this is a valid neighbour.
local valid=nil
if self.ValidNeighbourFunc then
valid=self.ValidNeighbourFunc(node, neighbor, unpack(self.ValidNeighbourArg))
else
-- If no valid neighbour function is defined, we assume all nodes are valid neighbours.
valid=true
end
-- Cache valid neighbour.
node.valid[neighbor.id]=valid
neighbor.valid[node.id]=valid -- Symmetric problem.
@@ -884,6 +1212,9 @@ function ASTAR:_LowestFscore(set, f_score)
end
end
-- Debug info.
self:T(self.lid..string.format("Lowest Fscore=%.1f, Node=%s", lowest, tostring(bestNode)))
return self.nodes[bestNode]
end
@@ -928,16 +1259,46 @@ end
-- @param #table map Map.
-- @param #ASTAR.Node current_node The current node.
-- @return #table Unwinded path.
function ASTAR:_UnwindPath( flat_path, map, current_node )
function ASTAR:_UnwindPath(flat_path, map, current_node)
if map [current_node] then
table.insert (flat_path, 1, map[current_node])
return self:_UnwindPath(flat_path, map, map[current_node])
local previous_node=map[current_node]
if previous_node then
table.insert(flat_path, 1, previous_node)
return self:_UnwindPath(flat_path, map, previous_node)
else
-- No previous node ==> return path.
return flat_path
end
end
--- Function to check if a certain node is in a given table.
-- @param #ASTAR self
-- @param #table Nodes Nodes table.
-- @param #ASTAR.Node Node The node to check.
-- @return #boolean If true, the node is not in the set.
function ASTAR:_IsNodeInTable(Nodes, Node)
for _,_node in pairs(Nodes) do
local node=_node --#ASTAR.Node
if node.id==Node.id then
return true
end
end
return false
end
--- Function to check if a certain node is **not** in a given table.
-- @param #ASTAR self
-- @param #table Nodes Nodes table.
-- @param #ASTAR.Node Node The node to check.
-- @return #boolean If true, the node is not in the set.
function ASTAR:_IsNodeNotInTable(Nodes, Node)
local is=self:_IsNodeInTable(Nodes, Node)
return not is
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -26,7 +26,7 @@
-- @module Core.Base
-- @image Core_Base.JPG
local _TraceOnOff = true
local _TraceOnOff = false -- default to no tracing
local _TraceLevel = 1
local _TraceAll = false
local _TraceClass = {}
@@ -34,11 +34,12 @@ local _TraceClassMethod = {}
local _ClassID = 0
---
--- Base class of everything
-- @type BASE
-- @field ClassName The name of the class.
-- @field ClassID The ID number of the class.
-- @field ClassNameAndID The name of the class concatenated with the ID number of the class.
-- @field #string ClassName The name of the class.
-- @field #number ClassID The ID number of the class.
-- @field #string ClassNameAndID The name of the class concatenated with the ID number of the class.
-- @field Core.Scheduler#SCHEDULER Scheduler The scheduler object.
--- BASE class
--
@@ -200,6 +201,7 @@ BASE = {
States = {},
Debug = debug,
Scheduler = nil,
Properties = {},
}
-- @field #BASE.__
@@ -210,14 +212,6 @@ BASE._ = {
Schedules = {}, --- Contains the Schedulers Active
}
--- The Formation Class
-- @type FORMATION
-- @field Cone A cone formation.
FORMATION = {
Cone = "Cone",
Vee = "Vee",
}
--- BASE constructor.
--
-- This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
@@ -741,7 +735,31 @@ do -- Event Handling
-- @function [parent=#BASE] OnEventPlayerEnterAircraft
-- @param #BASE self
-- @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
--- Creation of a Birth Event.
@@ -862,6 +880,62 @@ end
world.onEvent(Event)
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.
-- @param #BASE self
@@ -1036,6 +1110,31 @@ function BASE:ClearState( Object, StateName )
end
end
--- Set one property of an object.
-- @param #BASE self
-- @param Key The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
-- @param Value The value that is stored. Note that the value can be a #string, but it can also be any other type!
function BASE:SetProperty(Key,Value)
self.Properties = self.Properties or {}
self.Properties[Key] = Value
end
--- Get one property of an object by the key.
-- @param #BASE self
-- @param Key The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
-- @return Value The value that is stored. Note that the value can be a #string, but it can also be any other type! Nil if not found.
function BASE:GetProperty(Key)
self.Properties = self.Properties or {}
return self.Properties[Key]
end
--- Get all of the properties of an object in a table.
-- @param #BASE self
-- @return #table of values, indexed by keys.
function BASE:GetProperties()
return self.Properties
end
-- Trace section
-- Log a trace (only shown when trace is on)
@@ -1150,13 +1249,22 @@ end
-- @return #string Text
function BASE:_Serialize(Arguments)
local text = UTILS.PrintTableToLog({Arguments}, 0, true)
text = string.gsub(text,"\n","")
text = string.gsub(text,"(\n+)","")
text = string.gsub(text,"%(%(","%(")
text = string.gsub(text,"%)%)","%)")
text = string.gsub(text,"(%s+)","")
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.
-- @param #BASE self
-- @param Arguments A #table or any field.
@@ -1191,7 +1299,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1206,7 +1314,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1221,7 +1329,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1265,7 +1373,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1280,7 +1388,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1295,7 +1403,7 @@ end
-- @param Arguments A #table or any field.
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 DebugInfoFrom = BASE.Debug.getinfo( 3, "l" )
@@ -1327,7 +1435,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 ) ) )
else
env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, BASE:_Serialize(Arguments) ) )
env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, UTILS.BasicSerialize(Arguments) ) )
end
end
@@ -1354,8 +1462,7 @@ 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 ) ) )
else
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, BASE:_Serialize(Arguments)) )
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, UTILS.BasicSerialize(Arguments)) )
end
end

View File

@@ -38,11 +38,13 @@
-- @type BEACON
-- @field #string ClassName Name of the class "BEACON".
-- @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
BEACON = {
ClassName = "BEACON",
Positionable = nil,
name = nil,
UniqueName = 0,
}
--- Beacon types supported by DCS.
@@ -384,7 +386,9 @@ end
function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration)
self:F({FileName, Frequency, Modulation, Power, BeaconDuration})
local IsValid = false
Modulation = Modulation or radio.modulation.AM
-- Check the filename
if type(FileName) == "string" then
if FileName:find(".ogg") or FileName:find(".wav") then
@@ -395,7 +399,7 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
end
end
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
-- Check the Frequency
@@ -421,7 +425,9 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
if IsValid then
self:T2({"Activating Beacon on ", Frequency, Modulation})
-- Note that this is looped. I have to give this transmission a unique name, I use the class ID
trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power, tostring(self.ID))
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
SCHEDULER:New( nil,
@@ -429,7 +435,8 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati
self:StopRadioBeacon()
end, {}, BeaconDuration)
end
end
end
return self
end
--- Stops the Radio Beacon
@@ -438,7 +445,7 @@ end
function BEACON:StopRadioBeacon()
self:F()
-- The unique name of the transmission is the class ID
trigger.action.stopRadioTransmission(tostring(self.ID))
trigger.action.stopRadioTransmission(self.BeaconName)
return self
end

View File

@@ -20,7 +20,7 @@
--
-- @module Core.ClientMenu
-- @image Core_Menu.JPG
-- last change: Oct 2023
-- last change: Jan 2025
-- TODO
----------------------------------------------------------------------------------------------------------------
@@ -51,14 +51,15 @@
-- @field #boolean Generic
-- @field #boolean debug
-- @field #CLIENTMENUMANAGER Controller
-- @field #active boolean
-- @extends Core.Base#BASE
---
-- @field #CLIENTMENU
CLIENTMENU = {
ClassName = "CLIENTMENUE",
ClassName = "CLIENTMENU",
lid = "",
version = "0.1.1",
version = "0.1.3",
name = nil,
path = nil,
group = nil,
@@ -70,6 +71,7 @@ CLIENTMENU = {
debug = false,
Controller = nil,
groupname = nil,
active = false,
}
---
@@ -114,7 +116,7 @@ function CLIENTMENU:NewEntry(Client,Text,Parent,Function,...)
if self.Functionargs and self.debug then
self:T({"Functionargs",self.Functionargs})
end
if not self.Generic then
if not self.Generic and self.active == false then
if Function ~= nil then
local ErrorHandler = function( errmsg )
env.info( "MOOSE Error in CLIENTMENU COMMAND function: " .. errmsg )
@@ -133,8 +135,10 @@ function CLIENTMENU:NewEntry(Client,Text,Parent,Function,...)
end
end
self.path = missionCommands.addCommandForGroup(self.GroupID,Text,self.parentpath, self.CallHandler)
self.active = true
else
self.path = missionCommands.addSubMenuForGroup(self.GroupID,Text,self.parentpath)
self.active = true
end
else
if self.parentpath then
@@ -200,6 +204,7 @@ function CLIENTMENU:RemoveF10()
if not status then
self:I(string.format("**** Error Removing Menu Entry %s for %s!",tostring(self.name),self.groupname))
end
self.active = false
end
return self
end
@@ -412,7 +417,7 @@ end
CLIENTMENUMANAGER = {
ClassName = "CLIENTMENUMANAGER",
lid = "",
version = "0.1.4",
version = "0.1.6",
name = nil,
clientset = nil,
menutree = {},
@@ -450,7 +455,7 @@ end
-- @param #CLIENTMENUMANAGER self
-- @param Core.Event#EVENTDATA EventData
-- @return #CLIENTMENUMANAGER self
function CLIENTMENUMANAGER:_EventHandler(EventData)
function CLIENTMENUMANAGER:_EventHandler(EventData,Retry)
self:T(self.lid.."_EventHandler: "..EventData.id)
--self:I(self.lid.."_EventHandler: "..tostring(EventData.IniPlayerName))
if EventData.id == EVENTS.PlayerLeaveUnit or EventData.id == EVENTS.Ejection or EventData.id == EVENTS.Crash or EventData.id == EVENTS.PilotDead then
@@ -463,6 +468,10 @@ function CLIENTMENUMANAGER:_EventHandler(EventData)
if EventData.IniPlayerName and EventData.IniGroup then
if (not self.clientset:IsIncludeObject(_DATABASE:FindClient( EventData.IniUnitName ))) then
self:T(self.lid.."Client not in SET: "..EventData.IniPlayerName)
if not Retry then
-- try again in 2 secs
self:ScheduleOnce(2,CLIENTMENUMANAGER._EventHandler,self,EventData,true)
end
return self
end
--self:I(self.lid.."Join event for player: "..EventData.IniPlayerName)
@@ -519,7 +528,7 @@ function CLIENTMENUMANAGER:InitAutoPropagation()
self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterUnit, self._EventHandler)
self:SetEventPriority(5)
self:SetEventPriority(6)
return self
end
@@ -676,6 +685,7 @@ end
function CLIENTMENUMANAGER:Propagate(Client)
self:T(self.lid.."Propagate")
--self:I(UTILS.PrintTableToLog(Client,1))
local knownunits = {} -- track so we can ID multi seated
local Set = self.clientset.Set
if Client then
Set = {Client}
@@ -684,28 +694,36 @@ function CLIENTMENUMANAGER:Propagate(Client)
for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then
local playerunit = client:GetName()
--local playergroup = client:GetGroup()
local playername = client:GetPlayerName() or "none"
if not self.playertree[playername] then
self.playertree[playername] = {}
end
for level,branch in pairs (self.menutree) do
self:T("Building branch:" .. level)
for _,leaf in pairs(branch) do
self:T("Building leaf:" .. leaf)
local entry = self:FindEntryByUUID(leaf)
if entry then
self:T("Found generic entry:" .. entry.UUID)
local parent = nil
if entry.Parent and entry.Parent.UUID then
parent = self.playertree[playername][entry.Parent.UUID] or self:FindEntryByUUID(entry.Parent.UUID)
end
self.playertree[playername][entry.UUID] = CLIENTMENU:NewEntry(client,entry.name,parent,entry.Function,unpack(entry.Functionargs))
self.playertree[playername][entry.UUID].Once = entry.Once
else
self:T("NO generic entry for:" .. leaf)
end
end
if not knownunits[playerunit] then
knownunits[playerunit] = true
else
self:I("Player in multi seat unit: "..playername)
break -- multi seat already build
end
if not self.playertree[playername] then
self.playertree[playername] = {}
end
for level,branch in pairs (self.menutree) do
self:T("Building branch:" .. level)
for _,leaf in pairs(branch) do
self:T("Building leaf:" .. leaf)
local entry = self:FindEntryByUUID(leaf)
if entry then
self:T("Found generic entry:" .. entry.UUID)
local parent = nil
if entry.Parent and entry.Parent.UUID then
parent = self.playertree[playername][entry.Parent.UUID] or self:FindEntryByUUID(entry.Parent.UUID)
end
self.playertree[playername][entry.UUID] = CLIENTMENU:NewEntry(client,entry.name,parent,entry.Function,unpack(entry.Functionargs))
self.playertree[playername][entry.UUID].Once = entry.Once
else
self:T("NO generic entry for:" .. leaf)
end
end
end
end
end
return self
@@ -719,13 +737,21 @@ end
function CLIENTMENUMANAGER:AddEntry(Entry,Client)
self:T(self.lid.."AddEntry")
local Set = self.clientset.Set
local knownunits = {}
if Client then
Set = {Client}
end
for _,_client in pairs(Set) do
local client = _client -- Wrapper.Client#CLIENT
if client and client:IsAlive() then
local playername = client:GetPlayerName()
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
self:T("Adding generic entry:" .. Entry.UUID)
local parent = nil

View File

@@ -20,6 +20,7 @@
-- * Manage database of hits to units and statics.
-- * Manage database of destroys of units and statics.
-- * Manage database of @{Core.Zone#ZONE_BASE} objects.
-- * Manage database of @{Wrapper.DynamicCargo#DYNAMICCARGO} objects alive in the mission.
--
-- ===
--
@@ -39,6 +40,7 @@
-- @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
--- Contains collections of wrapper objects defined within MOOSE that reflect objects within the simulator.
@@ -54,6 +56,7 @@
-- * PLAYERS
-- * CARGOS
-- * 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.
--
@@ -97,6 +100,7 @@ DATABASE = {
STORAGES = {},
STNS={},
SADL={},
DYNAMICCARGO={},
}
local _DATABASECoalition =
@@ -135,7 +139,7 @@ function DATABASE:New()
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.Crash, 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.NewCargo )
self:HandleEvent( EVENTS.DeleteCargo )
@@ -143,6 +147,8 @@ function DATABASE:New()
self:HandleEvent( EVENTS.DeleteZone )
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) -- This is not working anymore!, handling this through the birth event.
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit )
-- DCS 2.9.7 Moose own dynamic cargo events
self:HandleEvent( EVENTS.DynamicCargoRemoved, self._EventOnDynamicCargoRemoved)
self:_RegisterTemplates()
self:_RegisterGroupsAndUnits()
@@ -170,24 +176,30 @@ end
--- Adds a Unit based on the Unit Name in the DATABASE.
-- @param #DATABASE self
-- @param #string DCSUnitName Unit name.
-- @param #boolean force
-- @return Wrapper.Unit#UNIT The added unit.
function DATABASE:AddUnit( DCSUnitName )
if not self.UNITS[DCSUnitName] then
function DATABASE:AddUnit( DCSUnitName, force )
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.
self:T( { "Add UNIT:", DCSUnitName } )
self:T( { "Add UNIT:", DCSunitName } )
-- Register unit
self.UNITS[DCSUnitName]=UNIT:Register(DCSUnitName)
self.UNITS[DCSunitName]=UNIT:Register(DCSunitName)
end
return self.UNITS[DCSUnitName]
return self.UNITS[DCSunitName]
end
--- Deletes a Unit from the DATABASE based on the Unit Name.
-- @param #DATABASE self
function DATABASE:DeleteUnit( DCSUnitName )
self:T("DeleteUnit "..tostring(DCSUnitName))
self.UNITS[DCSUnitName] = nil
end
@@ -199,10 +211,9 @@ function DATABASE:AddStatic( DCSStaticName )
if not self.STATICS[DCSStaticName] then
self.STATICS[DCSStaticName] = STATIC:Register( DCSStaticName )
return self.STATICS[DCSStaticName]
end
return nil
return self.STATICS[DCSStaticName]
end
@@ -212,16 +223,42 @@ function DATABASE:DeleteStatic( DCSStaticName )
self.STATICS[DCSStaticName] = nil
end
--- Finds a STATIC based on the StaticName.
--- Finds a STATIC based on the Static Name.
-- @param #DATABASE self
-- @param #string StaticName
-- @param #string StaticName Name of the static object.
-- @return Wrapper.Static#STATIC The found STATIC.
function DATABASE:FindStatic( StaticName )
local StaticFound = self.STATICS[StaticName]
return StaticFound
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)
end
return self.DYNAMICCARGO[Name]
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.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase.
@@ -813,14 +850,19 @@ end
--- Adds a CLIENT based on the ClientName in the DATABASE.
-- @param #DATABASE self
-- @param #string ClientName Name of the Client unit.
-- @param #boolean Force (optional) Force registration of client.
-- @return Wrapper.Client#CLIENT The client object.
function DATABASE:AddClient( ClientName )
if not self.CLIENTS[ClientName] then
self.CLIENTS[ClientName] = CLIENT:Register( ClientName )
function DATABASE:AddClient( ClientName, Force )
local DCSUnitName = 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
return self.CLIENTS[ClientName]
return self.CLIENTS[DCSUnitName]
end
@@ -831,15 +873,25 @@ end
function DATABASE:FindGroup( 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
end
--- Adds a GROUP based on the GroupName in the DATABASE.
-- @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.GROUPS[GroupName] = GROUP:Register( GroupName )
end
@@ -850,9 +902,11 @@ end
--- Adds a player based on the Player Name in the DATABASE.
-- @param #DATABASE self
function DATABASE:AddPlayer( UnitName, PlayerName )
if type(UnitName) == "number" then UnitName = string.format("%d",UnitName) end
if PlayerName then
self:T( { "Add player for unit:", UnitName, PlayerName } )
self:I( { "Add player for unit:", UnitName, PlayerName } )
self.PLAYERS[PlayerName] = UnitName
self.PLAYERUNITS[PlayerName] = self:FindUnit( UnitName )
self.PLAYERSJOINED[PlayerName] = PlayerName
@@ -860,6 +914,21 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
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.
-- @param #DATABASE self
function DATABASE:DeletePlayer( UnitName, PlayerName )
@@ -1009,7 +1078,7 @@ function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionSide, Category
self.Templates.Groups[GroupTemplateName].CategoryID = CategoryID
self.Templates.Groups[GroupTemplateName].CoalitionID = CoalitionSide
self.Templates.Groups[GroupTemplateName].CountryID = CountryID
local UnitNames = {}
for unit_num, UnitTemplate in pairs( GroupTemplate.units ) do
@@ -1074,7 +1143,7 @@ end
-- @param #string unitname Name of the associated unit.
-- @return #number Octal
function DATABASE:GetNextSTN(octal,unitname)
local first = UTILS.OctalToDecimal(octal)
local first = UTILS.OctalToDecimal(octal) or 0
if self.STNS[first] == unitname then return octal end
local nextoctal = 77777
local found = false
@@ -1111,7 +1180,7 @@ end
-- @param #string unitname Name of the associated unit.
-- @return #number Octal
function DATABASE:GetNextSADL(octal,unitname)
local first = UTILS.OctalToDecimal(octal)
local first = UTILS.OctalToDecimal(octal) or 0
if self.SADL[first] == unitname then return octal end
local nextoctal = 7777
local found = false
@@ -1147,10 +1216,13 @@ end
-- @param #string GroupName Group name.
-- @return #table Group template table.
function DATABASE:GetGroupTemplate( GroupName )
local GroupTemplate = self.Templates.Groups[GroupName].Template
GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID
GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID
GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID
local GroupTemplate=nil
if self.Templates.Groups[GroupName] then
GroupTemplate = self.Templates.Groups[GroupName].Template
GroupTemplate.SpawnCoalitionID = self.Templates.Groups[GroupName].CoalitionID
GroupTemplate.SpawnCategoryID = self.Templates.Groups[GroupName].CategoryID
GroupTemplate.SpawnCountryID = self.Templates.Groups[GroupName].CountryID
end
return GroupTemplate
end
@@ -1195,6 +1267,43 @@ function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, Category
return self
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.
-- @param #DATABASE self
-- @param #string StaticName Name of the static.
@@ -1268,7 +1377,11 @@ end
-- @param #string ClientName Name of the Client.
-- @return #number Coalition ID.
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
--- Get category ID from client name.
@@ -1276,7 +1389,11 @@ end
-- @param #string ClientName Name of the Client.
-- @return #number Category ID.
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
--- Get country ID from client name.
@@ -1284,7 +1401,11 @@ end
-- @param #string ClientName Name of the Client.
-- @return #number Country ID.
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
--- Airbase
@@ -1330,6 +1451,36 @@ function DATABASE:_RegisterPlayers()
return self
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.
-- @param #DATABASE self
@@ -1428,12 +1579,29 @@ end
-- @param DCS#Airbase airbase Airbase.
-- @return #DATABASE self
function DATABASE:_RegisterAirbase(airbase)
local IsSyria = UTILS.GetDCSMap() == "Syria" and true or false
local countHSyria = 0
if airbase then
-- Get the airbase name.
local DCSAirbaseName = airbase:getName()
-- DCS 2.9.8.1107 added 143 helipads all named H with the same object ID ..
if IsSyria and DCSAirbaseName == "H" and countHSyria > 0 then
--[[
local p = airbase:getPosition().p
local mgrs = COORDINATE:New(p.x,p.z,p.y):ToStringMGRS()
self:I("Airbase on Syria map named H @ "..mgrs)
countHSyria = countHSyria + 1
if countHSyria > 1 then return self end
--]]
return self
elseif IsSyria and DCSAirbaseName == "H" and countHSyria == 0 then
countHSyria = countHSyria + 1
end
-- This gave the incorrect value to be inserted into the airdromeID for DCS 2.5.6. Is fixed now.
local airbaseID=airbase:getID()
@@ -1473,7 +1641,7 @@ end
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnBirth( Event )
self:F( { Event } )
self:T( { Event } )
if Event.IniDCSUnit then
@@ -1481,7 +1649,17 @@ function DATABASE:_EventOnBirth( Event )
-- Add static object to DB.
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
if Event.IniObjectCategory == Object.Category.UNIT then
@@ -1502,9 +1680,9 @@ function DATABASE:_EventOnBirth( Event )
end
if Event.IniObjectCategory == Object.Category.UNIT then
Event.IniUnit = self:FindUnit( Event.IniDCSUnitName )
Event.IniGroup = self:FindGroup( Event.IniDCSGroupName )
Event.IniUnit = self:FindUnit( Event.IniDCSUnitName )
-- Client
local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT
@@ -1520,10 +1698,10 @@ function DATABASE:_EventOnBirth( Event )
-- Debug info.
self:I(string.format("Player '%s' joined unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
-- Add client in case it does not exist already.
if not client then
client=self:AddClient(Event.IniDCSUnitName)
if client == nil or (client and client:CountPlayers() == 0) then
client=self:AddClient(Event.IniDCSUnitName, true)
end
-- Add player.
@@ -1533,14 +1711,19 @@ function DATABASE:_EventOnBirth( Event )
if not self.PLAYERS[PlayerName] then
self:AddPlayer( Event.IniUnitName, PlayerName )
end
-- Player settings.
local Settings = SETTINGS:Set( PlayerName )
Settings:SetPlayerMenu(Event.IniUnit)
-- Create an event.
self:CreateEventPlayerEnterAircraft(Event.IniUnit)
local function SetPlayerSettings(self,PlayerName,IniUnit)
-- Player settings.
local Settings = SETTINGS:Set( PlayerName )
--Settings:SetPlayerMenu(Event.IniUnit)
Settings:SetPlayerMenu(IniUnit)
-- Create an event.
self:CreateEventPlayerEnterAircraft(IniUnit)
--self:CreateEventPlayerEnterAircraft(Event.IniUnit)
end
self:ScheduleOnce(1,SetPlayerSettings,self,PlayerName,Event.IniUnit)
end
end
@@ -1554,7 +1737,6 @@ end
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA Event
function DATABASE:_EventOnDeadOrCrash( Event )
if Event.IniDCSUnit then
local name=Event.IniDCSUnitName
@@ -1562,7 +1744,7 @@ function DATABASE:_EventOnDeadOrCrash( Event )
if Event.IniObjectCategory == 3 then
---
-- STATICS
-- STATICS
---
if self.STATICS[Event.IniDCSUnitName] then
@@ -1572,7 +1754,7 @@ function DATABASE:_EventOnDeadOrCrash( Event )
---
-- Maybe a UNIT?
---
-- Delete unit.
if self.UNITS[Event.IniDCSUnitName] then
self:T("STATIC Event for UNIT "..tostring(Event.IniDCSUnitName))
@@ -1595,7 +1777,8 @@ function DATABASE:_EventOnDeadOrCrash( Event )
-- Delete unit.
if self.UNITS[Event.IniDCSUnitName] then
self:DeleteUnit(Event.IniDCSUnitName)
self:ScheduleOnce(1,self.DeleteUnit,self,Event.IniDCSUnitName)
--self:DeleteUnit(Event.IniDCSUnitName)
end
-- Remove client players.
@@ -1662,6 +1845,15 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
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.
-- @param #DATABASE self
@@ -1685,7 +1877,7 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
if Event.IniObjectCategory == 1 then
-- 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
@@ -1703,6 +1895,7 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
local client=self.CLIENTS[Event.IniDCSUnitName] --Wrapper.Client#CLIENT
if client then
client:RemovePlayer(PlayerName)
--self.PLAYERSETTINGS[PlayerName] = nil
end
end
@@ -2081,7 +2274,7 @@ function DATABASE:_RegisterTemplates()
for group_num, Template in pairs(obj_type_data.group) do
if obj_type_name ~= "static" and Template and Template.units and type(Template.units) == 'table' then --making sure again- this is a valid group
self:_RegisterGroupTemplate(Template, CoalitionSide, _DATABASECategory[string.lower(CategoryName)], CountryID)
else

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_REMOVE_UNIT = world.event.S_EVENT_MAX + 1006
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.
@@ -261,17 +266,29 @@ EVENTS = {
SimulationStart = world.event.S_EVENT_SIMULATION_START or -1,
WeaponRearm = world.event.S_EVENT_WEAPON_REARM or -1,
WeaponDrop = world.event.S_EVENT_WEAPON_DROP or -1,
-- Added with DCS 2.9.0
UnitTaskTimeout = world.event.S_EVENT_UNIT_TASK_TIMEOUT or -1,
-- Added with DCS 2.9.x
--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,
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,
MissionRestart = world.event.S_EVENT_MISSION_RESTART or -1,
MissionWinner = world.event.S_EVENT_MISSION_WINNER or -1,
PostponedTakeoff = world.event.S_EVENT_POSTPONED_TAKEOFF or -1,
PostponedLand = world.event.S_EVENT_POSTPONED_LAND or -1,
RunwayTakeoff = world.event.S_EVENT_RUNWAY_TAKEOFF 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
-- 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 #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"
},
-- DCS 2.9
[EVENTS.UnitTaskTimeout] = {
Order = 1,
Side = "I",
Event = "OnEventUnitTaskTimeout",
Text = "S_EVENT_UNIT_TASK_TIMEOUT "
},
--[EVENTS.UnitTaskTimeout] = {
-- Order = 1,
-- Side = "I",
-- Event = "OnEventUnitTaskTimeout",
-- Text = "S_EVENT_UNIT_TASK_TIMEOUT "
--},
[EVENTS.UnitTaskStage] = {
Order = 1,
Side = "I",
Event = "OnEventUnitTaskStage",
Text = "S_EVENT_UNIT_TASK_STAGE "
},
[EVENTS.MacSubtaskScore] = {
Order = 1,
Side = "I",
Event = "OnEventMacSubtaskScore",
Text = "S_EVENT_MAC_SUBTASK_SCORE"
},
--[EVENTS.MacSubtaskScore] = {
-- Order = 1,
--Side = "I",
--Event = "OnEventMacSubtaskScore",
--Text = "S_EVENT_MAC_SUBTASK_SCORE"
--},
[EVENTS.MacExtraScore] = {
Order = 1,
Side = "I",
@@ -682,20 +702,76 @@ local _EVENTMETA = {
Event = "OnEventMissionWinner",
Text = "S_EVENT_MISSION_WINNER"
},
[EVENTS.PostponedTakeoff] = {
[EVENTS.RunwayTakeoff] = {
Order = 1,
Side = "I",
Event = "OnEventPostponedTakeoff",
Text = "S_EVENT_POSTPONED_TAKEOFF"
Event = "OnEventRunwayTakeoff",
Text = "S_EVENT_RUNWAY_TAKEOFF"
},
[EVENTS.PostponedLand] = {
[EVENTS.RunwayTouch] = {
Order = 1,
Side = "I",
Event = "OnEventPostponedLand",
Text = "S_EVENT_POSTPONED_LAND"
Event = "OnEventRunwayTouch",
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
-- @type EVENT.Events
-- @field #number IniUnit
@@ -1108,7 +1184,63 @@ do -- Event Creation
world.onEvent( Event )
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
--- Main event function.
@@ -1197,6 +1329,7 @@ function EVENT:onEvent( Event )
end
Event.IniDCSGroupName = Event.IniUnit and Event.IniUnit.GroupName or ""
Event.IniGroupName=Event.IniDCSGroupName --At least set the group name because group might not exist any more
if Event.IniDCSGroup and Event.IniDCSGroup:isExist() then
Event.IniDCSGroupName = Event.IniDCSGroup:getName()
Event.IniGroup = GROUP:FindByName( Event.IniDCSGroupName )
@@ -1223,7 +1356,13 @@ function EVENT:onEvent( Event )
Event.IniDCSUnit = Event.initiator
Event.IniDCSUnitName = Event.IniDCSUnit:getName()
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.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.IniDCSUnit:getTypeName()
@@ -1233,11 +1372,12 @@ function EVENT:onEvent( Event )
-- Scenery
---
Event.IniDCSUnit = Event.initiator
Event.IniDCSUnitName = Event.IniDCSUnit:getName()
Event.IniDCSUnitName = ( Event.IniDCSUnit and Event.IniDCSUnit.getName ) and Event.IniDCSUnit:getName() or "Scenery no name "..math.random(1,20000)
Event.IniUnitName = Event.IniDCSUnitName
Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator )
Event.IniCategory = Event.IniDCSUnit:getDesc().category
Event.IniTypeName = Event.initiator:isExist() and Event.IniDCSUnit:getTypeName() or "SCENERY"
Event.IniCategory = (Event.IniDCSUnit and Event.IniDCSUnit.getDesc ) and Event.IniDCSUnit:getDesc().category
Event.IniTypeName = (Event.initiator and Event.initiator.isExist
and Event.initiator:isExist() and Event.IniDCSUnit and Event.IniDCSUnit.getTypeName) and Event.IniDCSUnit:getTypeName() or "SCENERY"
elseif Event.IniObjectCategory == Object.Category.BASE then
---
@@ -1301,7 +1441,7 @@ function EVENT:onEvent( Event )
-- STATIC
---
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()
-- Workaround for borked target info on cruise missiles
if Event.TgtDCSUnitName and Event.TgtDCSUnitName ~= "" then
@@ -1335,24 +1475,26 @@ function EVENT:onEvent( Event )
-- SCENERY
---
Event.TgtDCSUnit = Event.target
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
Event.TgtUnitName = Event.TgtDCSUnitName
Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target )
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
Event.TgtDCSUnitName = Event.TgtDCSUnit.getName and Event.TgtDCSUnit.getName() or nil
if Event.TgtDCSUnitName~=nil then
Event.TgtUnitName = Event.TgtDCSUnitName
Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target )
Event.TgtCategory = Event.TgtDCSUnit:getDesc().category
Event.TgtTypeName = Event.TgtDCSUnit:getTypeName()
end
end
end
-- 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.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.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()
--Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon:getPlayerName()
Event.WeaponCoalition = Event.WeaponUNIT and Event.Weapon:getCoalition()
Event.WeaponCategory = Event.WeaponUNIT and Event.Weapon:getDesc().category
Event.WeaponTypeName = Event.WeaponUNIT and Event.Weapon:getTypeName()
Event.WeaponCoalition = Event.WeaponUNIT and Event.Weapon.getCoalition and Event.Weapon:getCoalition()
Event.WeaponCategory = Event.WeaponUNIT and Event.Weapon.getDesc and Event.Weapon:getDesc().category
Event.WeaponTypeName = Event.WeaponUNIT and Event.Weapon.getTypeName and Event.Weapon:getTypeName()
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
end
@@ -1387,6 +1529,15 @@ function EVENT:onEvent( Event )
Event.Cargo = Event.cargo
Event.CargoName = Event.cargo.Name
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.
if Event.zone then

View File

@@ -79,7 +79,7 @@
do -- FSM
--- @type FSM
-- @type FSM
-- @field #string ClassName Name of the class.
-- @field Core.Scheduler#SCHEDULER CallScheduler Call scheduler.
-- @field #table options Options.
@@ -948,8 +948,9 @@ do -- FSM
end
do -- FSM_CONTROLLABLE
--- @type FSM_CONTROLLABLE
---
-- @type FSM_CONTROLLABLE
-- @field Wrapper.Controllable#CONTROLLABLE Controllable
-- @extends Core.Fsm#FSM
@@ -1081,8 +1082,9 @@ do -- FSM_CONTROLLABLE
end
do -- FSM_PROCESS
--- @type FSM_PROCESS
---
-- @type FSM_PROCESS
-- @field Tasking.Task#TASK Task
-- @extends Core.Fsm#FSM_CONTROLLABLE

View File

@@ -24,7 +24,7 @@
do -- Goal
--- @type GOAL
-- @type GOAL
-- @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.
@@ -71,10 +71,10 @@ do -- Goal
ClassName = "GOAL",
}
--- @field #table GOAL.Players
-- @field #table GOAL.Players
GOAL.Players = {}
--- @field #number GOAL.TotalContributions
-- @field #number GOAL.TotalContributions
GOAL.TotalContributions = 0
--- GOAL Constructor.
@@ -145,7 +145,7 @@ do -- Goal
self.TotalContributions = self.TotalContributions + 1
end
--- @param #GOAL self
-- @param #GOAL self
-- @param #number Player contribution.
function GOAL:GetPlayerContribution( PlayerName )
return self.Players[PlayerName] or 0

View File

@@ -108,26 +108,30 @@ function MARKEROPS_BASE:New(Tagname,Keywords,Casesensitive)
--- On after "MarkAdded" event. Triggered when a Marker is added to the F10 map.
-- @function [parent=#MARKEROPS_BASE] OnAfterMarkAdded
-- @param #MARKEROPS_BASE self
-- @param #string From The From state
-- @param #string Event The Event called
-- @param #string To The To state
-- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text
-- @param #string From The From state.
-- @param #string Event The Event called.
-- @param #string To The To state.
-- @param #string Text The text on the marker.
-- @param #table Keywords Table of matching keywords found in the Event text.
-- @param Core.Point#COORDINATE Coord Coordinate of the marker.
-- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
-- @param #number MarkerID Id of this marker.
-- @param #number CoalitionNumber Coalition of the marker creator.
-- @param #string PlayerName Name of the player creating/changing the mark. nil if it cannot be obtained.
-- @param Core.Event#EVENTDATA EventData the event data table.
--- On after "MarkChanged" event. Triggered when a Marker is changed on the F10 map.
-- @function [parent=#MARKEROPS_BASE] OnAfterMarkChanged
-- @param #MARKEROPS_BASE self
-- @param #string From The From state
-- @param #string Event The Event called
-- @param #string To The To state
-- @param #string Text The text on the marker
-- @param #table Keywords Table of matching keywords found in the Event text
-- @param #string From The From state.
-- @param #string Event The Event called.
-- @param #string To The To state.
-- @param #string Text The text on the marker.
-- @param #table Keywords Table of matching keywords found in the Event text.
-- @param Core.Point#COORDINATE Coord Coordinate of the marker.
-- @param #number MarkerID Id of this marker
-- @param #number CoalitionNumber Coalition of the marker creator
-- @param #number MarkerID Id of this marker.
-- @param #number CoalitionNumber Coalition of the marker creator.
-- @param #string PlayerName Name of the player creating/changing the mark. nil if it cannot be obtained.
-- @param Core.Event#EVENTDATA EventData the event data table
--- On after "MarkDeleted" event. Triggered when a Marker is deleted from the F10 map.
-- @function [parent=#MARKEROPS_BASE] OnAfterMarkDeleted
@@ -167,7 +171,7 @@ function MARKEROPS_BASE:OnEventMark(Event)
if Eventtext~=nil then
if self:_MatchTag(Eventtext) then
local matchtable = self:_MatchKeywords(Eventtext)
self:MarkAdded(Eventtext,matchtable,coord,Event.idx,coalition)
self:MarkAdded(Eventtext,matchtable,coord,Event.idx,coalition,Event.PlayerName,Event)
end
end
elseif Event.id==world.event.S_EVENT_MARK_CHANGE then
@@ -177,7 +181,7 @@ function MARKEROPS_BASE:OnEventMark(Event)
if Eventtext~=nil then
if self:_MatchTag(Eventtext) then
local matchtable = self:_MatchKeywords(Eventtext)
self:MarkChanged(Eventtext,matchtable,coord,Event.idx,coalition)
self:MarkChanged(Eventtext,matchtable,coord,Event.idx,coalition,Event.PlayerName,Event)
end
end
elseif Event.id==world.event.S_EVENT_MARK_REMOVED then

File diff suppressed because it is too large Load Diff

View File

@@ -75,35 +75,37 @@ MESSAGE.Type = {
--- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{#MESSAGE.ToClient} or @{#MESSAGE.ToCoalition} or @{#MESSAGE.ToAll} to send these Messages to the respective recipients.
-- @param self
-- @param #string MessageText is the text of the Message.
-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel.
-- @param #string MessageCategory (optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".
-- @param #string Text is the text of the Message.
-- @param #number Duration Duration in seconds how long the message text is shown.
-- @param #string Category (Optional) String expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".
-- @param #boolean ClearScreen (optional) Clear all previous messages if true.
-- @return #MESSAGE
-- @return #MESSAGE self
-- @usage
--
-- -- Create a series of new Messages.
-- -- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
-- -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- -- Create a series of new Messages.
-- -- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
-- -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
--
function MESSAGE:New( MessageText, MessageDuration, MessageCategory, ClearScreen )
function MESSAGE:New( Text, Duration, Category, ClearScreen )
local self = BASE:Inherit( self, BASE:New() )
self:F( { MessageText, MessageDuration, MessageCategory } )
self:F( { Text, Duration, Category } )
self.MessageType = nil
-- When no MessageCategory is given, we don't show it as a title...
if MessageCategory and MessageCategory ~= "" then
if MessageCategory:sub( -1 ) ~= "\n" then
self.MessageCategory = MessageCategory .. ": "
if Category and Category ~= "" then
if Category:sub( -1 ) ~= "\n" then
self.MessageCategory = Category .. ": "
else
self.MessageCategory = MessageCategory:sub( 1, -2 ) .. ":\n"
self.MessageCategory = Category:sub( 1, -2 ) .. ":\n"
end
else
self.MessageCategory = ""
@@ -114,9 +116,9 @@ function MESSAGE:New( MessageText, MessageDuration, MessageCategory, ClearScreen
self.ClearScreen = ClearScreen
end
self.MessageDuration = MessageDuration or 5
self.MessageDuration = Duration or 5
self.MessageTime = timer.getTime()
self.MessageText = MessageText:gsub( "^\n", "", 1 ):gsub( "\n$", "", 1 )
self.MessageText = Text:gsub( "^\n", "", 1 ):gsub( "\n$", "", 1 )
self.MessageSent = false
self.MessageGroup = false
@@ -177,40 +179,22 @@ end
--
-- -- 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.
-- ClientGroup = Group.getByName( "ClientGroup" )
-- Client = CLIENT:FindByName("NameOfClientUnit")
--
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed 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", 25, "Score" ):ToClient( Client )
-- or
-- MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25 ):ToClient( ClientGroup )
-- MESSAGE:New( "Congratulations, you've just killed 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", 25, "Score"):ToClient( Client )
-- or
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25 )
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25 )
-- MessageClient1:ToClient( ClientGroup )
-- MessageClient2:ToClient( ClientGroup )
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score")
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
-- MessageClient1:ToClient( Client )
-- MessageClient2:ToClient( Client )
--
function MESSAGE:ToClient( Client, Settings )
self:F( Client )
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
self:ToUnit(Client,Settings)
return self
end
@@ -257,6 +241,7 @@ function MESSAGE:ToUnit( Unit, Settings )
if self.MessageDuration ~= 0 then
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 )
end
end
@@ -305,11 +290,11 @@ end
-- @usage
--
-- -- 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
-- 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
-- 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()
--
function MESSAGE:ToBlue()
@@ -326,11 +311,11 @@ end
-- @usage
--
-- -- 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
-- 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
-- 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()
--
function MESSAGE:ToRed()
@@ -349,11 +334,11 @@ end
-- @usage
--
-- -- 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
-- 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
-- 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 )
--
function MESSAGE:ToCoalition( CoalitionSide, Settings )
@@ -395,29 +380,36 @@ end
--- Sends a MESSAGE to all players.
-- @param #MESSAGE self
-- @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
--
-- -- 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
-- 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
-- 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()
--
function MESSAGE:ToAll( Settings )
function MESSAGE:ToAll( Settings, Delay )
self:F()
if self.MessageType then
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
self.MessageCategory = "" -- self.MessageType .. ": "
end
if Delay and Delay>0 then
self:ScheduleOnce(Delay, MESSAGE.ToAll, self, Settings, 0)
else
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 )
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
end
return self
@@ -472,6 +464,7 @@ _MESSAGESRS = {}
-- @param #number Volume (optional) Volume, can be between 0.0 and 1.0 (loudest).
-- @param #string Label (optional) Label, defaults to "MESSAGE" or the Message Category set.
-- @param Core.Point#COORDINATE Coordinate (optional) Coordinate this messages originates from.
-- @param #string Backend (optional) Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
@@ -479,7 +472,7 @@ _MESSAGESRS = {}
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
--
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate)
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate,Backend)
_MESSAGESRS.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
@@ -497,6 +490,10 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
_MESSAGESRS.MSRS:SetCoordinate(Coordinate)
end
if Backend then
_MESSAGESRS.MSRS:SetBackend(Backend)
end
_MESSAGESRS.Culture = Culture or MSRS.culture or "en-GB"
_MESSAGESRS.MSRS:SetCulture(Culture)
@@ -509,10 +506,10 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
end
_MESSAGESRS.label = Label or MSRS.Label or "MESSAGE"
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE")
_MESSAGESRS.MSRS:SetLabel(_MESSAGESRS.label)
_MESSAGESRS.port = Port or MSRS.port or 5002
_MESSAGESRS.MSRS:SetPort(Port or 5002)
_MESSAGESRS.MSRS:SetPort(_MESSAGESRS.port)
_MESSAGESRS.volume = Volume or MSRS.volume or 1
_MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume)

View File

@@ -5,11 +5,13 @@
-- * Path from A to B
-- * Arbitrary number of points
-- * Automatically from lines drawtool
-- * Draw line or mark points on F10 map
-- * Find closest points to path
--
-- ===
--
-- ### Author: **funkyfranky**
--
--
-- ===
-- @module Core.Pathline
-- @image CORE_Pathline.png
@@ -21,6 +23,7 @@
-- @field #string lid Class id string for output to DCS log file.
-- @field #string name Name of the path line.
-- @field #table points List of 3D points defining the path.
-- @field #number counter Running number counting the point IDs.
-- @extends Core.Base#BASE
--- *The shortest distance between two points is a straight line.* -- Archimedes
@@ -28,30 +31,30 @@
-- ===
--
-- # The PATHLINE Concept
--
--
-- List of points defining a path from A to B. The pathline can consist of multiple points. Each point holds the information of its position, the surface type, the land height
-- and the water depth (if over sea).
--
--
-- Line drawings created in the mission editor are automatically registered as pathlines and stored in the MOOSE database.
-- They can be accessed with the @{#PATHLINE.FindByName) function.
--
--
-- # Constructor
--
--
-- The @{PATHLINE.New) function creates a new PATHLINE object. This does not hold any points. Points can be added with the @{#PATHLINE.AddPointFromVec2} and @{#PATHLINE.AddPointFromVec3}
--
--
-- For a given table of 2D or 3D positions, a new PATHLINE object can be created with the @{#PATHLINE.NewFromVec2Array} or @{#PATHLINE.NewFromVec3Array}, respectively.
--
--
-- # Line Drawings
--
--
-- The most convenient way to create a pathline is the draw panel feature in the DCS mission editor. You can select "Line" and then "Segments", "Segment" or "Free" to draw your lines.
-- These line drawings are then automatically added to the MOOSE database as PATHLINE objects and can be retrieved with the @{#PATHLINE.FindByName) function, where the name is the one
-- you specify in the draw panel.
--
--
-- # Mark on F10 map
--
-- The ponints of the PATHLINE can be marked on the F10 map with the @{#PATHLINE.MarkPoints}(`true`) function. The mark points contain information of the surface type, land height and
--
-- The ponints of the PATHLINE can be marked on the F10 map with the @{#PATHLINE.MarkPoints}(`true`) function. The mark points contain information of the surface type, land height and
-- water depth.
--
--
-- To remove the marks, use @{#PATHLINE.MarkPoints}(`false`).
--
-- @field #PATHLINE
@@ -59,27 +62,39 @@ PATHLINE = {
ClassName = "PATHLINE",
lid = nil,
points = {},
counter = 0,
}
--- Point of line.
-- @type PATHLINE.Point
-- @field #number uid Unique ID of this point.
-- @field #string mother Name of the pathline this point belongs to.
-- @field #string name Name of this point.
-- @field DCS#Vec3 vec3 3D position.
-- @field DCS#Vec2 vec2 2D position.
-- @field #number surfaceType Surface type.
-- @field #number landHeight Land height in meters.
-- @field #number depth Water depth in meters.
-- @field #number markerID Marker ID.
-- @field #number lineID Marker of pathline ID.
--- Segment of line.
-- @type PATHLINE.Segment
-- @field #PATHLINE.Point p1 First point.
-- @field #PATHLINE.Point p2 Second point.
--- PATHLINE class version.
-- @field #string version
PATHLINE.version="0.1.1"
PATHLINE.version="0.3.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-- TODO: Read/write to JSON file
-- TODO: Translate/rotate pathline
-- TODO: Add color.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
@@ -93,10 +108,10 @@ function PATHLINE:New(Name)
-- Inherit everything from INTEL class.
local self=BASE:Inherit(self, BASE:New()) --#PATHLINE
self.name=Name or "Unknown Path"
self.lid=string.format("PATHLINE %s | ", Name)
self.lid=string.format("PATHLINE %s | ", self.name)
return self
end
@@ -151,41 +166,70 @@ end
--- Add a point to the path from a given 2D position. The third dimension is determined from the land height.
-- @param #PATHLINE self
-- @param DCS#Vec2 Vec2 The 2D vector (x,y) to add.
-- @param #number Index Index to add this point, *e.g.* 1 for first point or 2 for second point. Default is at the end.
-- @param #PATHLINE.Point Point Add point after given point. Default is at the end or at given index.
-- @return #PATHLINE self
function PATHLINE:AddPointFromVec2(Vec2)
function PATHLINE:AddPointFromVec2(Vec2, Index, Point)
if Vec2 then
-- Create a new point.
local point=self:_CreatePoint(Vec2)
table.insert(self.points, point)
if Index then
-- Add at given index.
table.insert(self.points, Index, point)
else
if Point then
-- Get index of given point.
local i=self:_GetPointIndex(Point)
-- Add new point after given point.
table.insert(self.points, i+1, point)
else
-- Add add the end.
table.insert(self.points, point)
end
end
end
return self
end
--- Add a point to the path from a given 3D position.
-- @param #PATHLINE self
-- @param DCS#Vec3 Vec3 The 3D vector (x,y) to add.
-- @return #PATHLINE self
function PATHLINE:AddPointFromVec3(Vec3)
-- @param #number Index Index to add this point, *e.g.* 1 for first point or 2 for second point. Default is at the end.
-- @param #PATHLINE.Point Point Add point after given point. Default is at the end or at given index.
-- @return #PATHLINE.Point Point that was added.
function PATHLINE:AddPointFromVec3(Vec3, Index, Point)
if Vec3 then
local point=self:_CreatePoint(Vec3)
table.insert(self.points, point)
if Index then
-- Add add given index.
table.insert(self.points, Index, point)
else
if Point then
local i=self:_GetPointIndex(Point)
table.insert(self.points, i+1, point)
else
-- Add add the end.
table.insert(self.points, point)
end
end
return point
end
return self
return nil
end
--- Get name of pathline.
-- @param #PATHLINE self
-- @return #string Name of the pathline.
function PATHLINE:GetName()
function PATHLINE:GetName()
return self.name
end
@@ -199,18 +243,35 @@ end
--- Get points of pathline. Not that points are tables, that contain more information as just the 2D or 3D position but also the surface type etc.
-- @param #PATHLINE self
-- @return #list <#PATHLINE.Point> List of points.
function PATHLINE:GetPoints()
-- @return #list <Core.Pathline#PATHLINE.Point> List of points.
function PATHLINE:GetPoints()
return self.points
end
--- Get segments of pathline.
-- @param #PATHLINE self
-- @return #list <Core.Pathline#PATHLINE.Segment> List of points.
function PATHLINE:GetSetments()
local segments={}
for i=1,#self.points-1 do
local segment={} --#PATHLINE.Segment
segment.p1=self.points[i]
segment.p2=self.points[i+1]
table.insert(segments, segment)
end
return segments
end
--- Get 3D points of pathline.
-- @param #PATHLINE self
-- @return <DCS#Vec3> List of DCS#Vec3 points.
-- @return #list <DCS#Vec3> List of DCS#Vec3 points.
function PATHLINE:GetPoints3D()
local vecs={}
for _,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
table.insert(vecs, point.vec3)
@@ -221,11 +282,11 @@ end
--- Get 2D points of pathline.
-- @param #PATHLINE self
-- @return <DCS#Vec2> List of DCS#Vec2 points.
-- @return #list <DCS#Vec2> List of DCS#Vec2 points.
function PATHLINE:GetPoints2D()
local vecs={}
for _,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
table.insert(vecs, point.vec2)
@@ -240,11 +301,11 @@ end
function PATHLINE:GetCoordinates()
local vecs={}
for _,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
local coord=COORDINATE:NewFromVec3(point.vec3)
table.insert(vecs,coord)
table.insert(vecs, coord)
end
return vecs
@@ -257,11 +318,11 @@ end
function PATHLINE:GetPointFromIndex(n)
local N=self:GetNumberOfPoints()
n=n or 1
local point=nil --#PATHLINE.Point
if n>=1 and n<=N then
point=self.points[n]
else
@@ -278,11 +339,11 @@ end
function PATHLINE:GetPoint3DFromIndex(n)
local point=self:GetPointFromIndex(n)
if point then
return point.vec3
end
return nil
end
@@ -293,11 +354,11 @@ end
function PATHLINE:GetPoint2DFromIndex(n)
local point=self:GetPointFromIndex(n)
if point then
return point.vec2
end
return nil
end
@@ -305,33 +366,314 @@ end
--- Mark points on F10 map.
-- @param #PATHLINE self
-- @param #boolean Switch If `true` or nil, set marks. If `false`, remove marks.
-- @return <DCS#Vec3> List of DCS#Vec3 points.
-- @return #PATHLINE self
function PATHLINE:MarkPoints(Switch)
for i,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
if Switch==false then
if point.markerID then
UTILS.RemoveMark(point.markerID, Delay)
end
else
if point.markerID then
UTILS.RemoveMark(point.markerID)
end
else
if point.markerID then
UTILS.RemoveMark(point.markerID)
end
point.markerID=UTILS.GetMarkID()
local text=string.format("Pathline %s: Point #%d\nSurface Type=%d\nHeight=%.1f m\nDepth=%.1f m", self.name, i, point.surfaceType, point.landHeight, point.depth)
local text=string.format("Pathline %s: Point #%d [UID=%d]\nSurface Type=%d\nHeight=%.1f m\nDepth=%.1f m", self.name, i, point.uid, point.surfaceType, point.landHeight, point.depth)
trigger.action.markToAll(point.markerID, text, point.vec3, "")
end
end
return self
end
--- Draw line on F10 map.
-- @param #PATHLINE self
-- @param #boolean Switch If `true` or nil, draw pathline. If `false`, remove drawing.
-- @param #number Coalition Coalition side. Default -1 for all.
-- @param #table Color RGB color and alpha `{r, g, b, a}`. Default {0, 1, 0, 0.5}.
-- @param #number LineType Line type. Default 1=solid.
-- @return #PATHLINE self
function PATHLINE:Draw(Switch, Coalition, Color, LineType)
Coalition=Coalition or -1
Color=Color or {0, 1, 0, 0.5}
LineType=LineType or 1
if Switch==false then
for i,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
if point.lineID then
UTILS.RemoveMark(point.lineID)
end
end
else
for i=2,#self.points do
local p1=self.points[i-1] --#PATHLINE.Point
local p2=self.points[i] --#PATHLINE.Point
if p2.lineID then
UTILS.RemoveMark(p2.lineID)
end
p2.lineID=UTILS.GetMarkID()
trigger.action.lineToAll(Coalition, p2.lineID, p1.vec3, p2.vec3, Color, LineType)
end
end
return self
end
--- Get the closest point on the pathline for a given reference point.
-- @param #PATHLINE self
-- @param DCS#Vec2 Vec2 Reference Point in 2D.
-- @return DCS#Vec2 Cloest point on pathline.
-- @return #number Distance from closest point to ref point in meters.
-- @return #PATHLINE.Segment Closest segment of ref point.
function PATHLINE:GetClosestPoint2D(Vec2)
local P=nil --DCS#Vec2
local D=math.huge
local S={} --#PATHLINE.Segment
for i=2,#self.points do
local A=self.points[i-1] --#PATHLINE.Point
local B=self.points[i] --#PATHLINE.Point
local a=A.vec2
local b=B.vec2
local ab=UTILS.Vec2Substract(b, a)
local ap=UTILS.Vec2Substract(Vec2, a)
local proj=UTILS.Vec2Dot(ap, ab)
local lab=UTILS.Vec2Norm(ab)
local f=proj/lab/lab
-- Debug info.
local text=string.format("FF Proj=%.1f, |ab|=%.1f, f=%.1f", proj, lab, f)
self:T(self.lid..text)
-- Cases for finite segment.
local p=nil --DCS#Vec2
if f<0 then
p=a
elseif f>1 then
p=b
else
local r=UTILS.Vec2Mult(ab, f)
p=UTILS.Vec2Add(a, r)
end
-- Distance.
local d=UTILS.VecDist2D(p, Vec2)
if d<=D then
D=d
P=p
S.p1=A
S.p2=B
end
end
return P, D, S
end
--- Get the closest point on the pathline for a given reference point.
-- This point does not necessarily is a node of the pathline. In general it will be somewhere in between the nodes defining the pathline.
-- @param #PATHLINE self
-- @param DCS#Vec3 Vec3 Reference Point in 3D. Can also be a `COORDINATE`.
-- @return DCS#Vec3 Closest point on pathline.
-- @return #number Distance from closest point to ref point in meters.
-- @return #PATHLINE.Segment Closest segment of ref point.
function PATHLINE:GetClosestPoint3D(Vec3)
local P=nil --DCS#Vec3
local D=math.huge
local S={} --#PATHLINE.Segment
if not Vec3 then
self:E(self.lid.."ERROR: input Vec3 is nil!")
return nil, nil, nil
end
for i=2,#self.points do
local A=self.points[i-1] --#PATHLINE.Point
local B=self.points[i] --#PATHLINE.Point
local a=A.vec3
local b=B.vec3
local ab=UTILS.VecSubstract(b, a)
local ap=UTILS.VecSubstract(Vec3, a)
local proj=UTILS.VecDot(ap, ab)
local lab=UTILS.VecNorm(ab)
local f=proj/lab/lab
-- Debug info.
self:T(self.lid..string.format("Proj=%.1f, |ab|=%.1f, f=%.1f", proj, lab, f))
-- Cases for finite segment.
local p=nil --DCS#Vec2
if f<0 then
p=a
elseif f>1 then
p=b
else
local r=UTILS.VecMult(ab, f)
p=UTILS.VecAdd(a, r)
end
-- Distance.
local d=UTILS.VecDist3D(p, Vec3)
if d<=D then
D=d
P=p
S.p1=A
S.p2=B
end
end
return P, D, S
end
--- Write PATHLINE to JSON file.
-- **NOTE**: Requires `io` and `lfs` to be de-sanitized!
-- @param #PATHLINE self
-- @param #string FileName Name of the file. Default is the name of the pathline.
-- @return #PATHLINE self
function PATHLINE:WriteJSON(FileName)
if io and lfs then
-- JSON script.
local json=loadfile("Scripts\\JSON.lua")()
local data={}
-- We store the name and the points.
data.name=self.name
data.points=self.points
for i,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
--point.markerID=nil
end
-- Encode data to raw JSON. Encode converts a lua table into JSON string that can be written to file.
local raw_json=json:encode(data)
-- Debug data.
self:T(data)
-- Write in "User/Saved Games/" Folder.
local filepath=lfs.writedir() .. FileName
-- Open file for writing.
local f = io.open(filepath, "wb")
if f then
f:write(raw_json)
f:close()
self:T(self.lid .. string.format("Saving PATHLINE %s file %s", self.name, tostring(filepath)))
else
self:E(self.lid .. string.format( "ERROR: Could not save PATHLINE to file %s", tostring(filepath)))
end
else
self:E(self.lid .. string.format( "ERROR: Could not save results because IO and/or LFS are not de-sanitized!"))
end
end
--- Read PATHLINE from JSON file.
-- **NOTE**: Requires `io` and `lfs` to be de-sanitized!
-- @param #PATHLINE self
-- @param #string FileName Name of the file.
-- @return #PATHLINE self
function PATHLINE:NewFromJSON(FileName)
if io and lfs then
-- JSON script.
local json=loadfile("Scripts\\JSON.lua")()
local data={}
-- Write in "User/Saved Games/" Folder.
local filepath=lfs.writedir() .. FileName
--env.info(filepath)
-- Open file in binary mode for reading.
local f = io.open(filepath, "rb")
if f then
data = f:read("*all")
f:close()
else
env.info(string.format("WARNING: Could not load PATHLINE from file %s!", tostring(filepath)))
return nil
end
-- Decode JSON data to get a lua table.
local data=json:decode(data)
if data and data.name then
-- Create a new pathline instance.
local self=PATHLINE:New(data.name)
for i=1,#data.points do
local point=data.points[i] --#PATHLINE.Point
-- Create new point from data.
local p=self:AddPointFromVec3(point.vec3)
-- Set name.
p.name=point.name
-- Remove marker ID.
p.markerID=nil
end
return self
else
BASE:E("ERROR: Cannot find pathline name in data from JSON file. File may be corrupted!")
end
else
BASE:E("ERROR: IO and/or LFS not de-sanitized! Cannot read file.")
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -339,32 +681,56 @@ end
--- Get 3D points of pathline.
-- @param #PATHLINE self
-- @param DCS#Vec3 Vec Position vector. Can also be a DCS#Vec2 in which case the altitude at landheight is taken.
-- @return #PATHLINE.Point
-- @return #PATHLINE.Point Pathline Point.
function PATHLINE:_CreatePoint(Vec)
local point={} --#PATHLINE.Point
self.counter=self.counter+1
point.uid=self.counter
point.mother=self.name
point.name=string.format("%s #%d", self.name, point.uid)
if Vec.z then
-- Given vec is 3D
point.vec3=UTILS.DeepCopy(Vec)
point.vec2={x=Vec.x, y=Vec.z}
else
-- Given vec is 2D
-- Given vec is 2D
point.vec2=UTILS.DeepCopy(Vec)
point.vec3={x=Vec.x, y=land.getHeight(Vec), z=Vec.y}
end
-- Get surface type.
point.surfaceType=land.getSurfaceType(point.vec2)
-- Get land height and depth.
point.landHeight, point.depth=land.getSurfaceHeightWithSeabed(point.vec2)
point.markerID=nil
return point
end
--- Get index of point in the lua table.
-- @param #PATHLINE self
-- @param #PATHLINE.Point Point Given point.
-- @return #number index
function PATHLINE:_GetPointIndex(Point)
for i,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
if point.uid==Point.uid then
return i
end
end
return nil
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -110,7 +110,7 @@ do -- COORDINATE
--
-- ## 4.4) Get the North correction of the current location.
--
-- * @{#COORDINATE.GetNorthCorrection}(): Obtains the north correction at the current 3D point.
-- * @{#COORDINATE.GetNorthCorrectionRadians}(): Obtains the north correction at the current 3D point.
--
-- ## 4.5) Point Randomization
--
@@ -453,6 +453,23 @@ do -- COORDINATE
end
--- Returns the coordinate from the latitude and longitude given in degrees, minutes and seconds (DMS).
-- @param #COORDINATE self
-- @param #string Latitude Latitude in DMS as string, e.g. "`42° 24' 14.3"`". Not that the characters `°`, `'` and `"` are important.
-- @param #string Longitude Longitude in DMS as string, e.g. "`42° 24' 14.3"`". Not that the characters `°`, `'` and `"` are important.
-- @param #number Altitude (Optional) Altitude in meters. Default is the land height at the coordinate.
-- @return #COORDINATE
function COORDINATE:NewFromLLDMS(Latitude, Longitude, Altitude)
local lat=UTILS.LLDMSstringToDD(Latitude)
local lon=UTILS.LLDMSstringToDD(Longitude)
self=COORDINATE:NewFromLLDD(lat, lon, Altitude)
return self
end
--- Returns if the 2 coordinates are at the same 2D position.
-- @param #COORDINATE self
-- @param #COORDINATE Coordinate
@@ -661,7 +678,7 @@ do -- COORDINATE
local _,_,_,_,_,scenerys=self:ScanObjects(radius, false, false, true)
local set={}
for _,_scenery in pairs(scenerys) do
local scenery=_scenery --DCS#Object
@@ -968,8 +985,13 @@ do -- COORDINATE
-- @return DCS#Distance Distance The distance in meters.
function COORDINATE:Get2DDistance(TargetCoordinate)
if not TargetCoordinate then return 1000000 end
local a={x=TargetCoordinate.x-self.x, y=0, z=TargetCoordinate.z-self.z}
local norm=UTILS.VecNorm(a)
--local a={x=TargetCoordinate.x-self.x, y=0, z=TargetCoordinate.z-self.z}
local a = self:GetVec2()
if not TargetCoordinate.ClassName then
TargetCoordinate=COORDINATE:NewFromVec3(TargetCoordinate)
end
local b = TargetCoordinate:GetVec2()
local norm=UTILS.VecDist2D(a,b)
return norm
end
@@ -1152,6 +1174,162 @@ do -- COORDINATE
return vec3
end
--- Return the x coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @return #number The x coordinate.
function COORDINATE:GetX()
return self.x
end
--- Return the y coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @return #number The y coordinate.
function COORDINATE:GetY()
if self:IsInstanceOf("POINT_VEC2") then
return self.z
end
return self.y
end
--- Return the z coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @return #number The z coordinate.
function COORDINATE:GetZ()
return self.z
end
--- Set the x coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number x The x coordinate.
-- @return #COORDINATE
function COORDINATE:SetX( x )
self.x = x
return self
end
--- Set the y coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number y The y coordinate.
-- @return #COORDINATE
function COORDINATE:SetY( y )
if self:IsInstanceOf("POINT_VEC2") then
self.z = y
else
self.y = y
end
return self
end
--- Set the z coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number z The z coordinate.
-- @return #COORDINATE
function COORDINATE:SetZ( z )
self.z = z
return self
end
--- Add to the x coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number x The x coordinate value to add to the current x coordinate.
-- @return #COORDINATE
function COORDINATE:AddX( x )
self.x = self.x + x
return self
end
--- Return Return the Lat(itude) coordinate of the COORDINATE (ie: (parent)COORDINATE.x).
-- @param #COORDINATE self
-- @return #number The x coordinate.
function COORDINATE:GetLat()
return self.x
end
--- Set the Lat(itude) coordinate of the COORDINATE (ie: COORDINATE.x).
-- @param #COORDINATE self
-- @param #number x The x coordinate.
-- @return #COORDINATE
function COORDINATE:SetLat( x )
self.x = x
return self
end
--- Return the Lon(gitude) coordinate of the COORDINATE (ie: (parent)COORDINATE.z).
-- @param #COORDINATE self
-- @return #number The y coordinate.
function COORDINATE:GetLon()
return self.z
end
--- Set the Lon(gitude) coordinate of the COORDINATE (ie: COORDINATE.z).
-- @param #COORDINATE self
-- @param #number y The y coordinate.
-- @return #COORDINATE
function COORDINATE:SetLon( z )
self.z = z
return self
end
--- Return the altitude (height) of the land at the COORDINATE.
-- @param #COORDINATE self
-- @return #number The land altitude.
function COORDINATE:GetAlt()
return self.y ~= 0 or land.getHeight( { x = self.x, y = self.z } )
end
--- Set the altitude of the COORDINATE.
-- @param #COORDINATE self
-- @param #number Altitude The land altitude. If nothing (nil) is given, then the current land altitude is set.
-- @return #COORDINATE
function COORDINATE:SetAlt( Altitude )
self.y = Altitude or land.getHeight( { x = self.x, y = self.z } )
return self
end
--- Add to the current land height an altitude.
-- @param #COORDINATE self
-- @param #number Altitude The Altitude to add. If nothing (nil) is given, then the current land altitude is set.
-- @return #COORDINATE
function COORDINATE:AddAlt( Altitude )
self.y = land.getHeight( { x = self.x, y = self.z } ) + Altitude or 0
return self
end
--- Return a random COORDINATE within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
-- @param #COORDINATE self
-- @param DCS#Distance OuterRadius
-- @param DCS#Distance InnerRadius
-- @return #COORDINATE
function COORDINATE:GetRandomPointVec2InRadius( OuterRadius, InnerRadius )
self:F2( { OuterRadius, InnerRadius } )
return COORDINATE:NewFromVec2( self:GetRandomVec2InRadius( OuterRadius, InnerRadius ) )
end
--- Add to the y coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number y The y coordinate value to add to the current y coordinate.
-- @return #COORDINATE
function COORDINATE:AddY( y )
if self:IsInstanceOf("POINT_VEC2") then
return self:AddZ(y)
else
self.y = self.y + y
end
return self
end
--- Add to the z coordinate of the COORDINATE.
-- @param #COORDINATE self
-- @param #number z The z coordinate value to add to the current z coordinate.
-- @return #COORDINATE
function COORDINATE:AddZ( z )
self.z = self.z +z
return self
end
--- Returns a text documenting the wind direction (from) and strength according the measurement system @{Core.Settings}.
-- The text will reflect the wind like this:
@@ -1216,7 +1394,7 @@ do -- COORDINATE
local s = string.format( '%03d°', AngleDegrees )
if MagVar then
local variation = UTILS.GetMagneticDeclination() or 0
local variation = self:GetMagneticDeclination() or 0
local AngleMagnetic = AngleDegrees - variation
if AngleMagnetic < 0 then AngleMagnetic = 360-AngleMagnetic end
@@ -1329,13 +1507,16 @@ do -- COORDINATE
-- @param Core.Settings#SETTINGS Settings
-- @param #string Language (Optional) Language "en" or "ru"
-- @param #boolean MagVar If true, also state angle in magnetic
-- @param #number Precision Rounding precision, defaults to 0
-- @return #string The BR Text
function COORDINATE:GetBRText( AngleRadians, Distance, Settings, Language, MagVar )
function COORDINATE:GetBRText( AngleRadians, Distance, Settings, Language, MagVar, Precision )
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
Precision = Precision or 0
local BearingText = self:GetBearingText( AngleRadians, 0, Settings, MagVar )
local DistanceText = self:GetDistanceText( Distance, Settings, Language, 0 )
local DistanceText = self:GetDistanceText( Distance, Settings, Language, Precision )
local BRText = BearingText .. DistanceText
@@ -1957,9 +2138,18 @@ do -- COORDINATE
--- Smokes the point in a color.
-- @param #COORDINATE self
-- @param Utilities.Utils#SMOKECOLOR SmokeColor
function COORDINATE:Smoke( SmokeColor )
-- @param #string name (Optional) Name if you want to stop the smoke early (normal duration: 5mins)
function COORDINATE:Smoke( SmokeColor, name )
self:F2( { SmokeColor } )
trigger.action.smoke( self:GetVec3(), SmokeColor )
self.firename = name or "Smoke-"..math.random(1,100000)
trigger.action.smoke( self:GetVec3(), SmokeColor, self.firename )
end
--- Stops smoking the point in a color.
-- @param #COORDINATE self
-- @param #string name (Optional) Name if you want to stop the smoke early (normal duration: 5mins)
function COORDINATE:StopSmoke( name )
self:StopBigSmokeAndFire( name )
end
--- Smoke the COORDINATE Green.
@@ -2233,7 +2423,7 @@ do -- COORDINATE
-- local MarkGroup = GROUP:FindByName( "AttackGroup" )
-- local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup )
-- <<< logic >>>
-- RemoveMark( MarkID ) -- The mark is now removed
-- TargetCoord:RemoveMark( MarkID ) -- The mark is now removed
function COORDINATE:RemoveMark( MarkID )
trigger.action.removeMark( MarkID )
end
@@ -2410,7 +2600,7 @@ do -- COORDINATE
for i,coord in ipairs(Coordinates) do
vecs[i+1]=coord:GetVec3()
end
if #vecs<3 then
self:E("ERROR: A free form polygon needs at least three points!")
elseif #vecs==3 then
@@ -2669,9 +2859,9 @@ do -- COORDINATE
local date=UTILS.GetDCSMissionDate()
-- 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
else
return UTILS.SecondsToClock(sunrise, true)
@@ -2747,7 +2937,10 @@ do -- COORDINATE
local sunrise=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, true, 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)
-- Check if time is between sunrise and sunset.
@@ -2834,9 +3027,9 @@ do -- COORDINATE
local date=UTILS.GetDCSMissionDate()
-- 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
else
return UTILS.SecondsToClock(sunrise, true)
@@ -2897,12 +3090,13 @@ do -- COORDINATE
-- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from.
-- @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 #boolean MagVar If true, also get angle in MagVar for BR/BRA
-- @param #number Precision Rounding precision, currently full km as default (=0)
-- @return #string The BR text.
function COORDINATE:ToStringBR( FromCoordinate, Settings, MagVar )
function COORDINATE:ToStringBR( FromCoordinate, Settings, MagVar, Precision )
local DirectionVec3 = FromCoordinate:GetDirectionVec3( self )
local AngleRadians = self:GetAngleRadians( DirectionVec3 )
local Distance = self:Get2DDistance( FromCoordinate )
return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar )
return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar, Precision )
end
--- Return a BRA string from a COORDINATE to the COORDINATE.
@@ -2938,6 +3132,8 @@ do -- COORDINATE
local AngleRadians = self:GetAngleRadians( DirectionVec3 )
local bearing = UTILS.Round( UTILS.ToDegree( AngleRadians ),0 )
local magnetic = self:GetMagneticDeclination() or 0
bearing = bearing - magnetic
local rangeMetres = self:Get2DDistance(currentCoord)
local rangeNM = UTILS.Round( UTILS.MetersToNM(rangeMetres), 0)
@@ -3310,16 +3506,16 @@ do -- COORDINATE
-- @param #COORDINATE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable to retrieve the settings from, otherwise the default settings will be chosen.
-- @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 Tasking.Task#TASK Task The task for which coordinates need to be calculated.
-- @return #string The coordinate Text in the configured coordinate system.
function COORDINATE:ToString( Controllable, Settings, Task )
function COORDINATE:ToString( Controllable, Settings )
-- self:E( { Controllable = Controllable and Controllable:GetName() } )
local Settings = Settings or ( Controllable and _DATABASE:GetPlayerSettings( Controllable:GetPlayerName() ) ) or _SETTINGS
local ModeA2A = nil
--[[
if Task then
if Task:IsInstanceOf( TASK_A2A ) then
ModeA2A = true
@@ -3336,7 +3532,7 @@ do -- COORDINATE
end
end
end
--]]
if ModeA2A == nil then
local IsAir = Controllable and ( Controllable:IsAirPlane() or Controllable:IsHelicopter() ) or false
@@ -3411,7 +3607,7 @@ do -- COORDINATE
-- @param #COORDINATE self
-- @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)
-- @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
function COORDINATE:IsInSteepArea(Radius,Minelevation)
local steep = false
@@ -3443,7 +3639,7 @@ do -- COORDINATE
-- @param #COORDINATE self
-- @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)
-- @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
function COORDINATE:IsInFlatArea(Radius,Minelevation)
local steep, elev = self:IsInSteepArea(Radius,Minelevation)
@@ -3451,9 +3647,18 @@ do -- COORDINATE
return flat, elev
end
--- Return a random COORDINATE within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.
-- @param #COORDINATE self
-- @param DCS#Distance OuterRadius
-- @param DCS#Distance InnerRadius
-- @return #COORDINATE
function COORDINATE:GetRandomPointVec3InRadius( OuterRadius, InnerRadius )
return COORDINATE:NewFromVec3( self:GetRandomVec3InRadius( OuterRadius, InnerRadius ) )
end
end
do -- POINT_VEC3
do
--- The POINT_VEC3 class
-- @type POINT_VEC3
@@ -3470,6 +3675,8 @@ do -- POINT_VEC3
--- Defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.
--
-- **DEPRECATED - PLEASE USE COORDINATE!**
--
-- **Important Note:** Most of the functions in this section were taken from MIST, and reworked to OO concepts.
-- In order to keep the credibility of the the author,
-- I want to emphasize that the formulas embedded in the MIST framework were created by Grimes or previous authors,
@@ -3557,130 +3764,19 @@ do -- POINT_VEC3
return self
end
--- Create a new POINT_VEC3 object from Vec2 coordinates.
-- @param #POINT_VEC3 self
-- @param DCS#Vec2 Vec2 The Vec2 point.
-- @param DCS#Distance LandHeightAdd (optional) Add a landheight.
-- @return Core.Point#POINT_VEC3 self
function POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd )
local self = BASE:Inherit( self, COORDINATE:NewFromVec2( Vec2, LandHeightAdd ) ) -- Core.Point#POINT_VEC3
self:F2( self )
return self
end
--- Create a new POINT_VEC3 object from Vec3 coordinates.
-- @param #POINT_VEC3 self
-- @param DCS#Vec3 Vec3 The Vec3 point.
-- @return Core.Point#POINT_VEC3 self
function POINT_VEC3:NewFromVec3( Vec3 )
local self = BASE:Inherit( self, COORDINATE:NewFromVec3( Vec3 ) ) -- Core.Point#POINT_VEC3
self:F2( self )
return self
end
--- Return the x coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @return #number The x coordinate.
function POINT_VEC3:GetX()
return self.x
end
--- Return the y coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @return #number The y coordinate.
function POINT_VEC3:GetY()
return self.y
end
--- Return the z coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @return #number The z coordinate.
function POINT_VEC3:GetZ()
return self.z
end
--- Set the x coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetX( x )
self.x = x
return self
end
--- Set the y coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetY( y )
self.y = y
return self
end
--- Set the z coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number z The z coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetZ( z )
self.z = z
return self
end
--- Add to the x coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number x The x coordinate value to add to the current x coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddX( x )
self.x = self.x + x
return self
end
--- Add to the y coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number y The y coordinate value to add to the current y coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddY( y )
self.y = self.y + y
return self
end
--- Add to the z coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number z The z coordinate value to add to the current z coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddZ( z )
self.z = self.z +z
return self
end
--- Return a random POINT_VEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param DCS#Distance OuterRadius
-- @param DCS#Distance InnerRadius
-- @return #POINT_VEC3
function POINT_VEC3:GetRandomPointVec3InRadius( OuterRadius, InnerRadius )
return POINT_VEC3:NewFromVec3( self:GetRandomVec3InRadius( OuterRadius, InnerRadius ) )
end
end
do -- POINT_VEC2
do
-- @type POINT_VEC2
--- @type POINT_VEC2
-- @field DCS#Distance x The x coordinate in meters.
-- @field DCS#Distance y the y coordinate in meters.
-- @extends Core.Point#COORDINATE
--- Defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.
--
-- **DEPRECATED - PLEASE USE COORDINATE!**
--
-- ## POINT_VEC2 constructor
--
-- A new POINT_VEC2 instance can be created with:
@@ -3728,166 +3824,4 @@ do -- POINT_VEC2
return self
end
--- Create a new POINT_VEC2 object from Vec2 coordinates.
-- @param #POINT_VEC2 self
-- @param DCS#Vec2 Vec2 The Vec2 point.
-- @return Core.Point#POINT_VEC2 self
function POINT_VEC2:NewFromVec2( Vec2, LandHeightAdd )
local LandHeight = land.getHeight( Vec2 )
LandHeightAdd = LandHeightAdd or 0
LandHeight = LandHeight + LandHeightAdd
local self = BASE:Inherit( self, COORDINATE:NewFromVec2( Vec2, LandHeightAdd ) ) -- #POINT_VEC2
self:F2( self )
return self
end
--- Create a new POINT_VEC2 object from Vec3 coordinates.
-- @param #POINT_VEC2 self
-- @param DCS#Vec3 Vec3 The Vec3 point.
-- @return Core.Point#POINT_VEC2 self
function POINT_VEC2:NewFromVec3( Vec3 )
local self = BASE:Inherit( self, COORDINATE:NewFromVec3( Vec3 ) ) -- #POINT_VEC2
self:F2( self )
return self
end
--- Return the x coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @return #number The x coordinate.
function POINT_VEC2:GetX()
return self.x
end
--- Return the y coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @return #number The y coordinate.
function POINT_VEC2:GetY()
return self.z
end
--- Set the x coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetX( x )
self.x = x
return self
end
--- Set the y coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetY( y )
self.z = y
return self
end
--- Return Return the Lat(itude) coordinate of the POINT_VEC2 (ie: (parent)POINT_VEC3.x).
-- @param #POINT_VEC2 self
-- @return #number The x coordinate.
function POINT_VEC2:GetLat()
return self.x
end
--- Set the Lat(itude) coordinate of the POINT_VEC2 (ie: POINT_VEC3.x).
-- @param #POINT_VEC2 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetLat( x )
self.x = x
return self
end
--- Return the Lon(gitude) coordinate of the POINT_VEC2 (ie: (parent)POINT_VEC3.z).
-- @param #POINT_VEC2 self
-- @return #number The y coordinate.
function POINT_VEC2:GetLon()
return self.z
end
--- Set the Lon(gitude) coordinate of the POINT_VEC2 (ie: POINT_VEC3.z).
-- @param #POINT_VEC2 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetLon( z )
self.z = z
return self
end
--- Return the altitude (height) of the land at the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @return #number The land altitude.
function POINT_VEC2:GetAlt()
return self.y ~= 0 or land.getHeight( { x = self.x, y = self.z } )
end
--- Set the altitude of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number Altitude The land altitude. If nothing (nil) is given, then the current land altitude is set.
-- @return #POINT_VEC2
function POINT_VEC2:SetAlt( Altitude )
self.y = Altitude or land.getHeight( { x = self.x, y = self.z } )
return self
end
--- Add to the x coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:AddX( x )
self.x = self.x + x
return self
end
--- Add to the y coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:AddY( y )
self.z = self.z + y
return self
end
--- Add to the current land height an altitude.
-- @param #POINT_VEC2 self
-- @param #number Altitude The Altitude to add. If nothing (nil) is given, then the current land altitude is set.
-- @return #POINT_VEC2
function POINT_VEC2:AddAlt( Altitude )
self.y = land.getHeight( { x = self.x, y = self.z } ) + Altitude or 0
return self
end
--- Return a random POINT_VEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param DCS#Distance OuterRadius
-- @param DCS#Distance InnerRadius
-- @return #POINT_VEC2
function POINT_VEC2:GetRandomPointVec2InRadius( OuterRadius, InnerRadius )
self:F2( { OuterRadius, InnerRadius } )
return POINT_VEC2:NewFromVec2( self:GetRandomVec2InRadius( OuterRadius, InnerRadius ) )
end
-- TODO: Check this to replace
--- Calculate the distance from a reference @{#POINT_VEC2}.
-- @param #POINT_VEC2 self
-- @param #POINT_VEC2 PointVec2Reference The reference @{#POINT_VEC2}.
-- @return DCS#Distance The distance from the reference @{#POINT_VEC2} in meters.
function POINT_VEC2:DistanceFromPointVec2( PointVec2Reference )
self:F2( PointVec2Reference )
local Distance = ( ( PointVec2Reference.x - self.x ) ^ 2 + ( PointVec2Reference.z - self.z ) ^2 ) ^ 0.5
self:T2( Distance )
return Distance
end
end

View File

@@ -15,7 +15,8 @@
-- @module Core.Report
-- @image Core_Report.JPG
--- @type REPORT
---
-- @type REPORT
-- @extends Core.Base#BASE
--- 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.
--
-- ===
--

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,9 @@
-- @module Core.Settings
-- @image Core_Settings.JPG
--- @type SETTINGS
---
-- @type SETTINGS
-- @extends Core.Base#BASE
--- 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 = {}
--- @type SETTINGS.__Enum.Era
---
-- @type SETTINGS.__Enum.Era
-- @field #number WWII
-- @field #number Korea
-- @field #number Cold
@@ -737,8 +740,8 @@ do -- SETTINGS
if _SETTINGS.ShowPlayerMenu == true then
local PlayerGroup = PlayerUnit:GetGroup()
local PlayerName = PlayerUnit:GetPlayerName()
local PlayerNames = PlayerGroup:GetPlayerNames()
local PlayerName = PlayerUnit:GetPlayerName() or "None"
--local PlayerNames = PlayerGroup:GetPlayerNames()
local PlayerMenu = MENU_GROUP:New( PlayerGroup, 'Settings "' .. PlayerName .. '"' )

File diff suppressed because it is too large Load Diff

View File

@@ -105,7 +105,7 @@
--
-- * @{#SPAWNSTATIC.Spawn}(Heading, NewName) spawns the static with the set parameters. Optionally, heading and name can be given. The name **must be unique**!
-- * @{#SPAWNSTATIC.SpawnFromCoordinate}(Coordinate, Heading, NewName) spawn the static at the given coordinate. Optionally, heading and name can be given. The name **must be unique**!
-- * @{#SPAWNSTATIC.SpawnFromPointVec2}(PointVec2, Heading, NewName) spawns the static at a POINT_VEC2 coordinate. Optionally, heading and name can be given. The name **must be unique**!
-- * @{#SPAWNSTATIC.SpawnFromPointVec2}(PointVec2, Heading, NewName) spawns the static at a COORDINATE coordinate. Optionally, heading and name can be given. The name **must be unique**!
-- * @{#SPAWNSTATIC.SpawnFromZone}(Zone, Heading, NewName) spawns the static at the center of a @{Core.Zone}. Optionally, heading and name can be given. The name **must be unique**!
--
-- @field #SPAWNSTATIC SPAWNSTATIC
@@ -189,6 +189,7 @@ function SPAWNSTATIC:NewFromType(StaticType, StaticCategory, CountryID)
self.InitStaticCategory=StaticCategory
self.CountryID=CountryID or country.id.USA
self.SpawnTemplatePrefix=self.InitStaticType
self.TemplateStaticUnit = {}
self.InitStaticCoordinate=COORDINATE:New(0, 0, 0)
self.InitStaticHeading=0
@@ -196,6 +197,61 @@ function SPAWNSTATIC:NewFromType(StaticType, StaticCategory, CountryID)
return self
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.
-- @param #SPAWNSTATIC self
-- @param Core.Point#COORDINATE Coordinate Position where the static is spawned.
@@ -317,6 +373,25 @@ function SPAWNSTATIC:InitLinkToUnit(Unit, OffsetX, OffsetY, OffsetAngle)
return self
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.
-- @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.
@@ -336,9 +411,9 @@ function SPAWNSTATIC:Spawn(Heading, NewName)
end
--- Creates a new @{Wrapper.Static} from a POINT_VEC2.
--- Creates a new @{Wrapper.Static} from a COORDINATE.
-- @param #SPAWNSTATIC self
-- @param Core.Point#POINT_VEC2 PointVec2 The 2D coordinate where to spawn the static.
-- @param Core.Point#COORDINATE PointVec2 The 2D coordinate where to spawn the static.
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
-- @param #string NewName (Optional) The name of the new static.
-- @return Wrapper.Static#STATIC The static spawned.
@@ -460,12 +535,6 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
-- Name of the spawned static.
Template.name = self.InitStaticName or string.format("%s#%05d", self.SpawnTemplatePrefix, self.SpawnIndex)
-- Add and register the new static.
local mystatic=_DATABASE:AddStatic(Template.name)
-- Debug output.
self:T(Template)
-- Add static to the game.
local Static=nil --DCS#StaticObject
@@ -488,7 +557,7 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
-- ED's dirty way to spawn FARPS.
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
local Event = {
id = EVENTS.Birth,
@@ -502,6 +571,28 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID)
self:T("Spawning Static")
self:T2({Template=Template})
Static=coalition.addStaticObject(CountryID, Template)
if Static then
self:T(string.format("Succesfully spawned static object \"%s\" ID=%d", Static:getName(), Static:getID()))
--[[
local static=StaticObject.getByName(Static:getName())
if static then
env.info(string.format("FF got static from StaticObject.getByName"))
else
env.error(string.format("FF error did NOT get static from StaticObject.getByName"))
end ]]
else
self:E(string.format("ERROR: DCS static object \"%s\" is nil!", tostring(Template.name)))
end
end
-- Add and register the new static.
local mystatic=_DATABASE:AddStatic(Template.name)
-- 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

View File

@@ -18,7 +18,7 @@
do -- UserFlag
--- @type USERFLAG
-- @type USERFLAG
-- @field #string ClassName Name of the class
-- @field #string UserFlagName Name of the flag.
-- @extends Core.Base#BASE
@@ -58,7 +58,7 @@ do -- UserFlag
--- Set the userflag to a given Number.
-- @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.
-- @return #USERFLAG The userflag instance.
-- @usage
@@ -104,4 +104,4 @@ do -- UserFlag
end
end
end

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,8 @@
-- @module Core.Zone_Detection
-- @image MOOSE.JPG
--- @type ZONE_DETECTION
---
-- @type ZONE_DETECTION
-- @field DCS#Vec2 Vec2 The current location of the zone.
-- @field DCS#Distance Radius The radius of the zone.
-- @extends #ZONE_BASE
@@ -106,7 +107,7 @@ function ZONE_DETECTION:SmokeZone( SmokeColor, Points, AddHeight, AngleOffset )
local Radial = ( Angle + AngleOffset ) * RadialBase / 360
Point.x = Vec2.x + math.cos( Radial ) * self:GetRadius()
Point.y = Vec2.y + math.sin( Radial ) * self:GetRadius()
POINT_VEC2:New( Point.x, Point.y, AddHeight ):Smoke( SmokeColor )
COORDINATE:New( Point.x, AddHeight, Point.y):Smoke( SmokeColor )
end
return self
@@ -137,7 +138,7 @@ function ZONE_DETECTION:FlareZone( FlareColor, Points, Azimuth, AddHeight )
local Radial = Angle * RadialBase / 360
Point.x = Vec2.x + math.cos( Radial ) * self:GetRadius()
Point.y = Vec2.y + math.sin( Radial ) * self:GetRadius()
POINT_VEC2:New( Point.x, Point.y, AddHeight ):Flare( FlareColor, Azimuth )
COORDINATE:New( Point.x, AddHeight, Point.y ):Flare( FlareColor, Azimuth )
end
return self
@@ -201,4 +202,3 @@ function ZONE_DETECTION:IsVec3InZone( Vec3 )
return InZone
end

View File

@@ -14,6 +14,7 @@ do -- world
-- @field #world.event event [https://wiki.hoggitworld.com/view/DCS_enum_world](https://wiki.hoggitworld.com/view/DCS_enum_world)
-- @field #world.BirthPlace BirthPlace The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events.
-- @field #world.VolumeType VolumeType The volumeType enumerator defines the types of 3d geometery used within the [world.searchObjects](https://wiki.hoggitworld.com/view/DCS_func_searchObjects) function.
-- @field #world.weather weather Weather functions for fog etc.
--- The world singleton contains functions centered around two different but extremely useful functions.
-- * Events and event handlers are all governed within world.
@@ -25,38 +26,68 @@ do -- world
--- [https://wiki.hoggitworld.com/view/DCS_enum_world](https://wiki.hoggitworld.com/view/DCS_enum_world)
-- @type world.event
-- @field S_EVENT_INVALID
-- @field S_EVENT_SHOT [https://wiki.hoggitworld.com/view/DCS_event_shot](https://wiki.hoggitworld.com/view/DCS_event_shot)
-- @field S_EVENT_HIT [https://wiki.hoggitworld.com/view/DCS_event_hit](https://wiki.hoggitworld.com/view/DCS_event_hit)
-- @field S_EVENT_TAKEOFF [https://wiki.hoggitworld.com/view/DCS_event_takeoff](https://wiki.hoggitworld.com/view/DCS_event_takeoff)
-- @field S_EVENT_LAND [https://wiki.hoggitworld.com/view/DCS_event_land](https://wiki.hoggitworld.com/view/DCS_event_land)
-- @field S_EVENT_CRASH [https://wiki.hoggitworld.com/view/DCS_event_crash](https://wiki.hoggitworld.com/view/DCS_event_crash)
-- @field S_EVENT_EJECTION [https://wiki.hoggitworld.com/view/DCS_event_ejection](https://wiki.hoggitworld.com/view/DCS_event_ejection)
-- @field S_EVENT_REFUELING [https://wiki.hoggitworld.com/view/DCS_event_refueling](https://wiki.hoggitworld.com/view/DCS_event_refueling)
-- @field S_EVENT_DEAD [https://wiki.hoggitworld.com/view/DCS_event_dead](https://wiki.hoggitworld.com/view/DCS_event_dead)
-- @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_BASE_CAPTURED [https://wiki.hoggitworld.com/view/DCS_event_base_captured](https://wiki.hoggitworld.com/view/DCS_event_base_captured)
-- @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_END [https://wiki.hoggitworld.com/view/DCS_event_mission_end](https://wiki.hoggitworld.com/view/DCS_event_mission_end)
-- @field S_EVENT_TOOK_CONTROL
-- @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_BIRTH [https://wiki.hoggitworld.com/view/DCS_event_birth](https://wiki.hoggitworld.com/view/DCS_event_birth)
-- @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_ENGINE_STARTUP [https://wiki.hoggitworld.com/view/DCS_event_engine_startup](https://wiki.hoggitworld.com/view/DCS_event_engine_startup)
-- @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_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_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_COMMENT
-- @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_SHOOTING_END [https://wiki.hoggitworld.com/view/DCS_event_shooting_end](https://wiki.hoggitworld.com/view/DCS_event_shooting_end)
-- @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_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 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_KILL [https://wiki.hoggitworld.com/view/DCS_event_kill](https://wiki.hoggitworld.com/view/DCS_event_kill) DCS>=2.5.6
-- @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_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_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_MAX
-- @field S_EVENT_INVALID = 0
-- @field S_EVENT_SHOT = 1
-- @field S_EVENT_HIT = 2
-- @field S_EVENT_TAKEOFF = 3
-- @field S_EVENT_LAND = 4
-- @field S_EVENT_CRASH = 5
-- @field S_EVENT_EJECTION = 6
-- @field S_EVENT_REFUELING = 7
-- @field S_EVENT_DEAD = 8
-- @field S_EVENT_PILOT_DEAD = 9
-- @field S_EVENT_BASE_CAPTURED = 10
-- @field S_EVENT_MISSION_START = 11
-- @field S_EVENT_MISSION_END = 12
-- @field S_EVENT_TOOK_CONTROL = 13
-- @field S_EVENT_REFUELING_STOP = 14
-- @field S_EVENT_BIRTH = 15
-- @field S_EVENT_HUMAN_FAILURE = 16
-- @field S_EVENT_DETAILED_FAILURE = 17
-- @field S_EVENT_ENGINE_STARTUP = 18
-- @field S_EVENT_ENGINE_SHUTDOWN = 19
-- @field S_EVENT_PLAYER_ENTER_UNIT = 20
-- @field S_EVENT_PLAYER_LEAVE_UNIT = 21
-- @field S_EVENT_PLAYER_COMMENT = 22
-- @field S_EVENT_SHOOTING_START = 23
-- @field S_EVENT_SHOOTING_END = 24
-- @field S_EVENT_MARK_ADDED = 25
-- @field S_EVENT_MARK_CHANGE = 26
-- @field S_EVENT_MARK_REMOVED = 27
-- @field S_EVENT_KILL = 28
-- @field S_EVENT_SCORE = 29
-- @field S_EVENT_UNIT_LOST = 30
-- @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.
-- @type world.BirthPlace
@@ -102,6 +133,36 @@ do -- world
-- @function [parent=#world] getAirbases
-- @param #number coalitionId The coalition side number ID. Default is all airbases are returned.
-- @return #table Table of DCS airbase objects.
--- Weather functions.
-- @type world.weather
--- Fog animation data structure.
-- @type world.FogAnimation
-- @field #number time
-- @field #number visibility
-- @field #number thickness
--- Returns the current fog thickness.
-- @function [parent=#world.weather] getFogThickness Returns the fog thickness.
-- @return #number Fog thickness in meters. If there is no fog, zero is returned.
--- Sets the fog thickness instantly. Any current fog animation is discarded.
-- @function [parent=#world.weather] setFogThickness
-- @param #number thickness Fog thickness in meters. Set to zero to disable fog.
--- Returns the current fog visibility distance.
-- @function [parent=#world.weather] getFogVisibilityDistance Returns the current maximum visibility distance in meters. Returns zero if fog is not present.
--- Instantly sets the maximum visibility distance of fog at sea level when looking at the horizon. Any current fog animation is discarded. Set zero to disable the fog.
-- @function [parent=#world.weather] setFogVisibilityDistance
-- @param #number visibility Max fog visibility in meters. Set to zero to disable fog.
--- Sets fog animation keys. Time is set in seconds and relative to the current simulation time, where time=0 is the current moment.
-- Time must be increasing. Previous animation is always discarded despite the data being correct.
-- @function [parent=#world.weather] setFogAnimation
-- @param #world.FogAnimation animation List of fog animations
end -- world
@@ -377,7 +438,7 @@ do -- coalition
-- @param #table groupData Group data table.
-- @return DCS#Group The spawned Group object.
--- Dynamically spawns a static object. See [hoggit](https://wiki.hoggitworld.com/view/DCS_func_addGroup)
--- Dynamically spawns a static object. See [hoggit](https://wiki.hoggitworld.com/view/DCS_func_addStaticObject)
-- @function [parent=#coalition] addStaticObject
-- @param #number countryId Id of the country.
-- @param #table groupData Group data table.
@@ -390,6 +451,7 @@ end -- coalition
do -- Types
--- Descriptors.
-- @type Desc
-- @field #number speedMax0 Max speed in meters/second at zero altitude.
-- @field #number massEmpty Empty mass in kg.
@@ -568,9 +630,13 @@ do -- Object
--- @function [parent=#Object] destroy
-- @param #Object self
--- @function [parent=#Object] getCategory
--- Returns an enumerator of the category for the specific object.
-- The enumerator returned is dependent on the category of the object and how the function is called.
-- As of DCS 2.9.2 when this function is called on an Object, Unit, Weapon, or Airbase a 2nd value will be returned which details the object sub-category value.
-- @function [parent=#Object] getCategory
-- @param #Object self
-- @return #Object.Category
-- @return #Object.Category The object category (1=UNIT, 2=WEAPON, 3=STATIC, 4=BASE, 5=SCENERY, 6=Cargo)
-- @return #number The subcategory of the passed object, e.g. Unit.Category if a unit object was passed.
--- Returns type name of the Object.
-- @function [parent=#Object] getTypeName
@@ -983,14 +1049,16 @@ do -- Spot
end -- Spot
do -- Controller
--- Controller is an object that performs A.I.-tasks. Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.
--
-- This class has 2 types of functions:
--
-- * Tasks
-- * Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
-- * Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
--
-- @type Controller
-- @field #Controller.Detection Detection Enum contains identifiers of surface types.
-- @field #Controller.Detection Detection Enum contains identifiers of surface types.
--- Enables and disables the controller.
-- Note: Now it works only for ground / naval groups!
@@ -1049,18 +1117,18 @@ do -- Controller
-- Detection
--- Enum contains identifiers of surface types.
--- Enum containing detection types.
-- @type Controller.Detection
-- @field VISUAL
-- @field OPTIC
-- @field RADAR
-- @field IRST
-- @field RWR
-- @field DLINK
-- @field #number VISUAL Visual detection. Numeric value 1.
-- @field #number OPTIC Optical detection. Numeric value 2.
-- @field #number RADAR Radar detection. Numeric value 4.
-- @field #number IRST Infra-red search and track detection. Numeric value 8.
-- @field #number RWR Radar Warning Receiver detection. Numeric value 16.
-- @field #number DLINK Data link detection. Numeric value 32.
--- Detected target.
-- @type DetectedTarget
-- @field Wrapper.Object#Object object The target
-- @type Controller.DetectedTarget
-- @field DCS#Object object The target
-- @field #boolean visible The target is visible
-- @field #boolean type The target type is known
-- @field #boolean distance Distance to the target is known
@@ -1073,9 +1141,9 @@ do -- Controller
-- @param #Controller.Detection detection Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN
-- @return #boolean detected True if the target is detected.
-- @return #boolean visible Has effect only if detected is true. True if the target is visible now.
-- @return #boolean type Has effect only if detected is true. True if the target type is known.
-- @return #boolean distance Has effect only if detected is true. True if the distance to the target is known.
-- @return #ModelTime lastTime Has effect only if visible is false. Last time when target was seen.
-- @return #boolean type Has effect only if detected is true. True if the target type is known.
-- @return #boolean distance Has effect only if detected is true. True if the distance to the target is known.
-- @return #Vec3 lastPos Has effect only if visible is false. Last position of the target when it was seen.
-- @return #Vec3 lastVel Has effect only if visible is false. Last velocity of the target when it was seen.
@@ -1101,6 +1169,7 @@ end -- Controller
do -- Unit
--- Unit.
-- @type Unit
-- @extends #CoalitionObject
-- @field ID Identifier of an unit. It assigned to an unit by the Mission Editor automatically.
@@ -1665,6 +1734,7 @@ do -- AI
-- @field ALARM_STATE @{#AI.Option.Ground.val.ALARM_STATE}
-- @field ENGAGE_AIR_WEAPONS
-- @field AC_ENGAGEMENT_RANGE_RESTRICTION
-- @field EVASION_OF_ARM
---
-- @type AI.Option.Ground.mid -- Moose added

View File

@@ -18,7 +18,7 @@
-- ### Author: FlightControl - Framework Design & Programming
-- ### Refactoring to use the Runway auto-detection: Applevangelist
-- @date August 2022
-- Last Update Nov 2023
-- Last Update Feb 2025
--
-- ===
--
@@ -416,7 +416,7 @@ end
-- @field #ATC_GROUND_UNIVERSAL
ATC_GROUND_UNIVERSAL = {
ClassName = "ATC_GROUND_UNIVERSAL",
Version = "0.0.1",
Version = "0.0.2",
SetClient = nil,
Airbases = nil,
AirbaseList = nil,
@@ -441,17 +441,25 @@ function ATC_GROUND_UNIVERSAL:New(AirbaseList)
self:T( { self.ClassName } )
self.Airbases = {}
for _name,_ in pairs(_DATABASE.AIRBASES) do
self.Airbases[_name]={}
end
self.AirbaseList = AirbaseList
if not self.AirbaseList then
self.AirbaseList = {}
for _name,_ in pairs(_DATABASE.AIRBASES) do
self.AirbaseList[_name]=_name
for _name,_base in pairs(_DATABASE.AIRBASES) do
-- DONE exclude FARPS and Ships
if _base and _base.isAirdrome == true then
self.AirbaseList[_name]=_name
self.Airbases[_name]={}
end
end
else
for _,_name in pairs(AirbaseList) do
-- DONE exclude FARPS and Ships
local airbase = _DATABASE:FindAirbase(_name)
if airbase and (airbase.isAirdrome == true) then
self.Airbases[_name]={}
end
end
end
@@ -721,14 +729,18 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor()
if NotInRunwayZone then
local Taxi = Client:GetState( self, "Taxi" )
if IsOnGround then
local Taxi = Client:GetState( self, "Taxi" )
self:T( Taxi )
if Taxi == false then
local Velocity = VELOCITY:New( AirbaseMeta.KickSpeed or self.KickSpeed )
Client:Message( "Welcome to " .. AirbaseID .. ". The maximum taxiing speed is " ..
Velocity:ToString() , 20, "ATC" )
Client:SetState( self, "Taxi", true )
Client:SetState( self, "Speeding", false )
Client:SetState( self, "Warnings", 0 )
end
-- TODO: GetVelocityKMH function usage
@@ -737,7 +749,7 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor()
local IsAboveRunway = Client:IsAboveRunway()
self:T( {IsAboveRunway, IsOnGround, Velocity:Get() })
if IsOnGround then
if IsOnGround and not Taxi then
local Speeding = false
if AirbaseMeta.MaximumKickSpeed then
if Velocity:Get() > AirbaseMeta.MaximumKickSpeed then
@@ -749,15 +761,17 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor()
end
end
if Speeding == true then
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() ..
" has been kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
Client:Destroy()
Client:SetState( self, "Speeding", false )
Client:SetState( self, "Warnings", 0 )
--MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() ..
-- " has been kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
--Client:Destroy()
Client:SetState( self, "Speeding", true )
local SpeedingWarnings = Client:GetState( self, "Warnings" )
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " ..
Velocity:ToString(), 5, "ATC" )
end
end
if IsOnGround then
local Speeding = false
@@ -1035,23 +1049,23 @@ end
-- The following airbases are monitored at the Nevada region.
-- Use the @{Wrapper.Airbase#AIRBASE.Nevada} enumeration to select the airbases to be monitored.
--
-- * `AIRBASE.Nevada.Beatty_Airport`
-- * `AIRBASE.Nevada.Boulder_City_Airport`
-- * `AIRBASE.Nevada.Creech_AFB`
-- * `AIRBASE.Nevada.Beatty`
-- * `AIRBASE.Nevada.Boulder_City`
-- * `AIRBASE.Nevada.Creech`
-- * `AIRBASE.Nevada.Echo_Bay`
-- * `AIRBASE.Nevada.Groom_Lake_AFB`
-- * `AIRBASE.Nevada.Henderson_Executive_Airport`
-- * `AIRBASE.Nevada.Jean_Airport`
-- * `AIRBASE.Nevada.Laughlin_Airport`
-- * `AIRBASE.Nevada.Groom_Lake`
-- * `AIRBASE.Nevada.Henderson_Executive`
-- * `AIRBASE.Nevada.Jean`
-- * `AIRBASE.Nevada.Laughlin`
-- * `AIRBASE.Nevada.Lincoln_County`
-- * `AIRBASE.Nevada.McCarran_International_Airport`
-- * `AIRBASE.Nevada.McCarran_International`
-- * `AIRBASE.Nevada.Mesquite`
-- * `AIRBASE.Nevada.Mina_Airport`
-- * `AIRBASE.Nevada.Nellis_AFB`
-- * `AIRBASE.Nevada.Mina`
-- * `AIRBASE.Nevada.Nellis`
-- * `AIRBASE.Nevada.North_Las_Vegas`
-- * `AIRBASE.Nevada.Pahute_Mesa_Airstrip`
-- * `AIRBASE.Nevada.Tonopah_Airport`
-- * `AIRBASE.Nevada.Tonopah_Test_Range_Airfield`
-- * `AIRBASE.Nevada.Pahute_Mesa`
-- * `AIRBASE.Nevada.Tonopah`
-- * `AIRBASE.Nevada.Tonopah_Test_Range`
--
-- # Installation
--
@@ -1088,10 +1102,10 @@ end
--
-- -- Monitor specific airbases.
-- ATC_Ground = ATC_GROUND_NEVADA:New(
-- { AIRBASE.Nevada.Laughlin_Airport,
-- { AIRBASE.Nevada.Laughlin,
-- AIRBASE.Nevada.Lincoln_County,
-- AIRBASE.Nevada.North_Las_Vegas,
-- AIRBASE.Nevada.McCarran_International_Airport
-- AIRBASE.Nevada.McCarran_International
-- }
-- )
--
@@ -1330,33 +1344,33 @@ end
-- The following airbases are monitored at the PersianGulf region.
-- Use the @{Wrapper.Airbase#AIRBASE.PersianGulf} enumeration to select the airbases to be monitored.
--
-- * `AIRBASE.PersianGulf.Abu_Musa_Island_Airport`
-- * `AIRBASE.PersianGulf.Al_Dhafra_AB`
-- * `AIRBASE.PersianGulf.Abu_Musa_Island`
-- * `AIRBASE.PersianGulf.Al_Dhafra_AFB`
-- * `AIRBASE.PersianGulf.Al_Maktoum_Intl`
-- * `AIRBASE.PersianGulf.Al_Minhad_AB`
-- * `AIRBASE.PersianGulf.Al_Minhad_AFB`
-- * `AIRBASE.PersianGulf.Bandar_Abbas_Intl`
-- * `AIRBASE.PersianGulf.Bandar_Lengeh`
-- * `AIRBASE.PersianGulf.Dubai_Intl`
-- * `AIRBASE.PersianGulf.Fujairah_Intl`
-- * `AIRBASE.PersianGulf.Havadarya`
-- * `AIRBASE.PersianGulf.Kerman_Airport`
-- * `AIRBASE.PersianGulf.Kerman`
-- * `AIRBASE.PersianGulf.Khasab`
-- * `AIRBASE.PersianGulf.Lar_Airbase`
-- * `AIRBASE.PersianGulf.Lar`
-- * `AIRBASE.PersianGulf.Qeshm_Island`
-- * `AIRBASE.PersianGulf.Sharjah_Intl`
-- * `AIRBASE.PersianGulf.Shiraz_International_Airport`
-- * `AIRBASE.PersianGulf.Shiraz_Intl`
-- * `AIRBASE.PersianGulf.Sir_Abu_Nuayr`
-- * `AIRBASE.PersianGulf.Sirri_Island`
-- * `AIRBASE.PersianGulf.Tunb_Island_AFB`
-- * `AIRBASE.PersianGulf.Tunb_Kochak`
-- * `AIRBASE.PersianGulf.Sas_Al_Nakheel_Airport`
-- * `AIRBASE.PersianGulf.Bandar_e_Jask_airfield`
-- * `AIRBASE.PersianGulf.Abu_Dhabi_International_Airport`
-- * `AIRBASE.PersianGulf.Al_Bateen_Airport`
-- * `AIRBASE.PersianGulf.Kish_International_Airport`
-- * `AIRBASE.PersianGulf.Al_Ain_International_Airport`
-- * `AIRBASE.PersianGulf.Lavan_Island_Airport`
-- * `AIRBASE.PersianGulf.Jiroft_Airport`
-- * `AIRBASE.PersianGulf.Sas_Al_Nakheel`
-- * `AIRBASE.PersianGulf.Bandar_e_Jask`
-- * `AIRBASE.PersianGulf.Abu_Dhabi_Intl`
-- * `AIRBASE.PersianGulf.Al_Bateen`
-- * `AIRBASE.PersianGulf.Kish_Intl`
-- * `AIRBASE.PersianGulf.Al_Ain_Intl`
-- * `AIRBASE.PersianGulf.Lavan_Island`
-- * `AIRBASE.PersianGulf.Jiroft`
--
-- # Installation
--
@@ -1391,8 +1405,8 @@ end
-- AirbasePoliceCaucasus = ATC_GROUND_PERSIANGULF:New()
--
-- ATC_Ground = ATC_GROUND_PERSIANGULF:New(
-- { AIRBASE.PersianGulf.Kerman_Airport,
-- AIRBASE.PersianGulf.Al_Minhad_AB
-- { AIRBASE.PersianGulf.Kerman,
-- AIRBASE.PersianGulf.Al_Minhad_AFB
-- }
-- )
--
@@ -1441,11 +1455,10 @@ function ATC_GROUND_PERSIANGULF:Start( RepeatScanSeconds )
self.AirbaseMonitor = SCHEDULER:New( self, self._AirbaseMonitor, { self }, 0, RepeatScanSeconds )
end
-- @type ATC_GROUND_MARIANAISLANDS
---
-- @type ATC_GROUND_MARIANAISLANDS
-- @extends #ATC_GROUND
--- # ATC\_GROUND\_MARIANA, extends @{#ATC_GROUND}
--

View File

@@ -77,7 +77,7 @@
-- ammotruck.monitor = -60 -- 1 minute - AMMOTRUCK checks run every one minute
-- ammotruck.routeonroad = true -- Trucks will **try** to drive on roads
-- ammotruck.usearmygroup = false -- If true, will make use of ARMYGROUP in the background (if used in DEV branch)
-- ammotruck.reloads = 5 -- Maxn re-arms a truck can do before he needs to go home and restock. Set to -1 for unlimited
-- 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
--

View File

@@ -45,6 +45,7 @@
-- @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 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 Nmissiles0 Initial amount of missiles of the whole group.
-- @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
--
-- 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.
--
-- ## Transporting
@@ -453,7 +454,7 @@
-- -- Creat a new ARTY object from a Paladin group.
-- 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"))
--
-- -- Set the max firing range. A Paladin unit has a range of 20 km.
@@ -618,63 +619,148 @@ ARTY.WeaponType={
}
--- Database of common artillery unit properties.
-- @type ARTY.dbitem
-- @field #string displayname Name displayed in ME.
-- @field #number minrange Minimum firing range in meters.
-- @field #number maxrange Maximum firing range in meters.
-- @field #number reloadtime Reload time in seconds.
--- Database of common artillery unit properties.
-- Table key is the "type name" and table value is and `ARTY.dbitem`.
-- @type ARTY.db
ARTY.db={
["2B11 mortar"] = { -- type "2B11 mortar"
minrange = 500, -- correct?
maxrange = 7000, -- 7 km
reloadtime = 30, -- 30 sec
["LeFH_18-40-105"] = {
displayname = "FH LeFH-18 105mm", -- name displayed in the ME
minrange = 500, -- min range (green circle) in meters
maxrange = 10500, -- max range (red circle) in meters
reloadtime = nil, -- reload time in seconds
},
["SPH 2S1 Gvozdika"] = { -- type "SAU Gvozdika"
minrange = 300, -- correct?
maxrange = 15000, -- 15 km
reloadtime = nil, -- unknown
["M2A1-105"] = {
displayname = "FH M2A1 105mm",
minrange = 500,
maxrange = 11500,
reloadtime = nil,
},
["SPH 2S19 Msta"] = { --type "SAU Msta", alias "2S19 Msta"
minrange = 300, -- correct?
maxrange = 23500, -- 23.5 km
reloadtime = nil, -- unknown
["Pak40"] = {
displayname = "FH Pak 40 75mm",
minrange = 500,
maxrange = 3000,
reloadtime = nil,
},
["L118_Unit"] = {
displayname = "L118 Light Artillery Gun",
minrange = 500,
maxrange = 17500,
reloadtime = nil,
},
["SPH 2S3 Akatsia"] = { -- type "SAU Akatsia", alias "2S3 Akatsia"
minrange = 300, -- correct?
maxrange = 17000, -- 17 km
reloadtime = nil, -- unknown
["Smerch"] = {
displayname = "MLRS 9A52 Smerch CM 300mm",
minrange = 20000,
maxrange = 70000,
reloadtime = 2160,
},
["SPH 2S9 Nona"] = { --type "SAU 2-C9"
minrange = 500, -- correct?
maxrange = 7000, -- 7 km
reloadtime = nil, -- unknown
["Smerch_HE"] = {
displayname = "MLRS 9A52 Smerch HE 300mm",
minrange = 20000,
maxrange = 70000,
reloadtime = 2160,
},
["SPH M109 Paladin"] = { -- type "M-109", alias "M109"
minrange = 300, -- correct?
maxrange = 22000, -- 22 km
reloadtime = nil, -- unknown
["Uragan_BM-27"] = {
displayname = "MLRS 9K57 Uragan BM-27 220mm",
minrange = 11500,
maxrange = 35800,
reloadtime = 840,
},
["SpGH Dana"] = { -- type "SpGH_Dana"
minrange = 300, -- correct?
maxrange = 18700, -- 18.7 km
reloadtime = nil, -- unknown
["Grad-URAL"] = {
displayname = "MLRS BM-21 Grad 122mm",
minrange = 5000,
maxrange = 19000,
reloadtime = 420,
},
["MLRS BM-21 Grad"] = { --type "Grad-URAL", alias "MLRS BM-21 Grad"
minrange = 5000, -- 5 km
maxrange = 19000, -- 19 km
reloadtime = 420, -- 7 min
["HL_B8M1"] = {
displayname = "MLRS HL with B8M1 80mm",
minrange = 500,
maxrange = 5000,
reloadtime = nil,
},
["MLRS 9K57 Uragan BM-27"] = { -- type "Uragan_BM-27"
minrange = 11500, -- 11.5 km
maxrange = 35800, -- 35.8 km
reloadtime = 840, -- 14 min
["tt_B8M1"] = {
displayname = "MLRS LC with B8M1 80mm",
minrange = 500,
maxrange = 5000,
reloadtime = nil,
},
["MLRS 9A52 Smerch"] = { -- type "Smerch"
minrange = 20000, -- 20 km
maxrange = 70000, -- 70 km
reloadtime = 2160, -- 36 min
["MLRS"] = {
displayname = "MLRS M270 227mm",
minrange = 10000,
maxrange = 32000,
reloadtime = 540,
},
["MLRS M270"] = { --type "MRLS", alias "M270 MRLS"
minrange = 10000, -- 10 km
maxrange = 32000, -- 32 km
reloadtime = 540, -- 9 min
["2B11 mortar"] = {
displayname = "Mortar 2B11 120mm",
minrange = 500,
maxrange = 7000,
reloadtime = 30,
},
["PLZ05"] = {
displayname = "PLZ-05",
minrange = 500,
maxrange = 23500,
reloadtime = nil,
},
["SAU Gvozdika"] = {
displayname = "SPH 2S1 Gvozdika 122mm",
minrange = 300,
maxrange = 15000,
reloadtime = nil,
},
["SAU Msta"] = {
displayname = "SPH 2S19 Msta 152mm",
minrange = 300,
maxrange = 23500,
reloadtime = nil,
},
["SAU Akatsia"] = {
displayname = "SPH 2S3 Akatsia 152mm",
minrange = 300,
maxrange = 17000,
reloadtime = nil,
},
["SpGH_Dana"] = {
displayname = "SPH Dana vz77 152mm",
minrange = 300,
maxrange = 18700,
reloadtime = nil,
},
["M-109"] = {
displayname = "SPH M109 Paladin 155mm",
minrange = 300,
maxrange = 22000,
reloadtime = nil,
},
["M12_GMC"] = {
displayname = "SPH M12 GMC 155mm",
minrange = 300,
maxrange = 18200,
reloadtime = nil,
},
["Wespe124"] = {
displayname = "SPH Sd.Kfz.124 Wespe 105mm",
minrange = 300,
maxrange = 7000,
reloadtime = nil,
},
["T155_Firtina"] = {
displayname = "SPH T155 Firtina 155mm",
minrange = 300,
maxrange = 41000,
reloadtime = nil,
},
["SAU 2-C9"] = {
displayname = "SPM 2S9 Nona 120mm M",
minrange = 500,
maxrange = 7000,
reloadtime = nil,
},
}
--- Target.
@@ -694,7 +780,7 @@ ARTY.db={
--- Arty script version.
-- @field #string version
ARTY.version="1.3.0"
ARTY.version="1.3.3"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -707,7 +793,7 @@ ARTY.version="1.3.0"
-- 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: 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: Handle dead events.
-- DONE: Abort firing task if no shooting event occured with 5(?) minutes. Something went wrong then. Min/max range for example.
@@ -796,8 +882,8 @@ function ARTY:New(group, alias)
-- Maximum speed in km/h.
self.SpeedMax=group:GetSpeedMax()
-- Group is mobile or not (e.g. mortars).
if self.SpeedMax>1 then
-- Group is mobile or not (e.g. mortars). Some immobile units have a speed of 1 m/s = 3.6 km/h. So we check this number.
if self.SpeedMax>3.6 then
self.ismobile=true
else
self.ismobile=false
@@ -1532,7 +1618,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.
-- @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
function ARTY:SetRearmingGroup(group)
self:F({group=group})
@@ -1887,7 +1973,7 @@ function ARTY:onafterStart(Controllable, From, Event, To)
MESSAGE:New(text, 5):ToAllIf(self.Debug)
-- 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.
if self.nukerange==nil then
@@ -1922,7 +2008,7 @@ function ARTY:onafterStart(Controllable, From, Event, To)
end
-- Check if we have and arty type that is in the DB.
local _dbproperties=self:_CheckDB(self.DisplayName)
local _dbproperties=self:_CheckDB(self.Type)
self:T({dbproperties=_dbproperties})
if _dbproperties~=nil then
for property,value in pairs(_dbproperties) do
@@ -1968,8 +2054,8 @@ function ARTY:onafterStart(Controllable, From, Event, To)
text=text..string.format("Type = %s\n", self.Type)
text=text..string.format("Display Name = %s\n", self.DisplayName)
text=text..string.format("Number of units = %d\n", self.IniGroupStrength)
text=text..string.format("Speed max = %d km/h\n", self.SpeedMax)
text=text..string.format("Speed default = %d km/h\n", self.Speed)
text=text..string.format("Speed max = %.1f km/h\n", self.SpeedMax)
text=text..string.format("Speed default = %.1f km/h\n", self.Speed)
text=text..string.format("Is mobile = %s\n", tostring(self.ismobile))
text=text..string.format("Is cargo = %s\n", tostring(self.iscargo))
text=text..string.format("Min range = %.1f km\n", self.minrange/1000)
@@ -2093,7 +2179,7 @@ function ARTY:_StatusReport(display)
end
-- Get Ammo.
local Nammo, Nshells, Nrockets, Nmissiles=self:GetAmmo()
local Nammo, Nshells, Nrockets, Nmissiles, Narty=self:GetAmmo()
local Nnukes=self.Nukes
local Nillu=self.Nillu
local Nsmoke=self.Nsmoke
@@ -2106,7 +2192,7 @@ function ARTY:_StatusReport(display)
text=text..string.format("Clock = %s\n", Clock)
text=text..string.format("FSM state = %s\n", self:GetState())
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 missiles = %d\n", Nmissiles)
text=text..string.format("Number of nukes = %d\n", Nnukes)
@@ -2293,19 +2379,19 @@ function ARTY:OnEventShot(EventData)
end
-- 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.
if self.currentTarget.weapontype==ARTY.WeaponType.TacticalNukes then
self.Nukes=self.Nukes-1
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
self.Nillu=self.Nillu-1
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
self.Nsmoke=self.Nsmoke-1
end
@@ -2323,7 +2409,7 @@ function ARTY:OnEventShot(EventData)
-- Weapon type name for current target.
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))
-- Default switches for cease fire and relocation.
@@ -2771,7 +2857,7 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
self:_EventFromTo("onafterStatus", Event, From, To)
-- 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.
if self.iscargo and self.cargogroup then
@@ -2788,7 +2874,7 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
-- FSM state.
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
@@ -2871,20 +2957,19 @@ function ARTY:onafterStatus(Controllable, From, Event, To)
if self.currentTarget then
self:CeaseFire(self.currentTarget)
end
-- Open fire on timed target.
self:OpenFire(_timedTarget)
if self:is("CombatReady") then
-- Open fire on timed target.
self:OpenFire(_timedTarget)
end
elseif _normalTarget then
-- Open fire on normal target.
self:OpenFire(_normalTarget)
if self:is("CombatReady") then
-- Open fire on normal target.
self:OpenFire(_normalTarget)
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.
local gotsome=false
if #self.targets>0 then
@@ -3045,14 +3130,14 @@ function ARTY:onafterOpenFire(Controllable, From, Event, To, target)
local range=Controllable:GetCoordinate():Get2DDistance(target.coord)
-- Get ammo.
local Nammo, Nshells, Nrockets, Nmissiles=self:GetAmmo()
local nfire=Nammo
local Nammo, Nshells, Nrockets, Nmissiles, Narty=self:GetAmmo()
local nfire=Narty
local _type="shots"
if target.weapontype==ARTY.WeaponType.Auto then
nfire=Nammo
nfire=Nammo -- We take everything that is available
_type="shots"
elseif target.weapontype==ARTY.WeaponType.Cannon then
nfire=Nshells
nfire=Narty
_type="shells"
elseif target.weapontype==ARTY.WeaponType.TacticalNukes then
nfire=self.Nukes
@@ -3070,6 +3155,8 @@ function ARTY:onafterOpenFire(Controllable, From, Event, To, target)
nfire=Nmissiles
_type="cruise missiles"
end
--env.info(string.format("FF type=%s, Nrockets=%d, Nfire=%d target.nshells=%d", _type, Nrockets, nfire, target.nshells))
-- Adjust if less than requested ammo is left.
target.nshells=math.min(target.nshells, nfire)
@@ -3337,7 +3424,7 @@ function ARTY:_CheckRearmed()
self:F2()
-- Get current ammo.
local nammo,nshells,nrockets,nmissiles=self:GetAmmo()
local nammo,nshells,nrockets,nmissiles,narty=self:GetAmmo()
-- Number of units still alive.
local units=self.Controllable:GetUnits()
@@ -3603,7 +3690,11 @@ function ARTY:_FireAtCoord(coord, radius, nshells, weapontype)
if weapontype==ARTY.WeaponType.TacticalNukes or weapontype==ARTY.WeaponType.IlluminationShells or weapontype==ARTY.WeaponType.SmokeShells then
weapontype=ARTY.WeaponType.Cannon
end
if group:HasTask() then
group:ClearTasks()
end
-- Set ROE to weapon free.
group:OptionROEOpenFire()
@@ -3614,7 +3705,7 @@ function ARTY:_FireAtCoord(coord, radius, nshells, weapontype)
local fire=group:TaskFireAtPoint(vec2, radius, nshells, weapontype)
-- Execute task.
group:SetTask(fire)
group:SetTask(fire,1)
end
--- Set task for attacking a group.
@@ -3631,7 +3722,11 @@ function ARTY:_AttackGroup(target)
if weapontype==ARTY.WeaponType.TacticalNukes or weapontype==ARTY.WeaponType.IlluminationShells or weapontype==ARTY.WeaponType.SmokeShells then
weapontype=ARTY.WeaponType.Cannon
end
if group:HasTask() then
group:ClearTasks()
end
-- Set ROE to weapon free.
group:OptionROEOpenFire()
@@ -3642,7 +3737,7 @@ function ARTY:_AttackGroup(target)
local fire=group:TaskAttackGroup(targetgroup, weapontype, AI.Task.WeaponExpend.ONE, 1)
-- Execute task.
group:SetTask(fire)
group:SetTask(fire,1)
end
@@ -3709,51 +3804,6 @@ function ARTY:_NuclearBlast(_coord)
ignite(_fires)
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
--- Route group to a certain point.
@@ -3915,6 +3965,7 @@ end
-- @return #number Number of shells 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 artillery shells the group has left.
function ARTY:GetAmmo(display)
self:F3({display=display})
@@ -3928,6 +3979,7 @@ function ARTY:GetAmmo(display)
local nshells=0
local nrockets=0
local nmissiles=0
local nartyshells=0
-- Get all units.
local units=self.Controllable:GetUnits()
@@ -4030,7 +4082,8 @@ function ARTY:GetAmmo(display)
-- Add up all shells.
nshells=nshells+Nammo
local _,_,_,_,_,shells = unit:GetAmmunition()
nartyshells=nartyshells+shells
-- Debug info.
text=text..string.format("- %d shells of type %s\n", Nammo, _weaponName)
@@ -4076,7 +4129,7 @@ function ARTY:GetAmmo(display)
-- Total amount of ammunition.
nammo=nshells+nrockets+nmissiles
return nammo, nshells, nrockets, nmissiles
return nammo, nshells, nrockets, nmissiles, nartyshells
end
--- Returns a name of a missile category.
@@ -4827,7 +4880,10 @@ function ARTY:_CheckShootingStarted()
-- 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 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.
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 +4945,7 @@ end
function ARTY:_CheckOutOfAmmo(targets)
-- 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.
local _partlyoutofammo=false
@@ -4901,7 +4957,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))
_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))
_partlyoutofammo=true
@@ -4945,14 +5001,14 @@ end
function ARTY:_CheckWeaponTypeAvailable(target)
-- 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.
local nfire=Nammo
if target.weapontype==ARTY.WeaponType.Auto then
nfire=Nammo
elseif target.weapontype==ARTY.WeaponType.Cannon then
nfire=Nshells
nfire=Narty
elseif target.weapontype==ARTY.WeaponType.TacticalNukes then
nfire=self.Nukes
elseif target.weapontype==ARTY.WeaponType.IlluminationShells then

View File

@@ -74,7 +74,7 @@
-- @image Designation.JPG
--
-- Date: 24 Oct 2021
-- Last Update: Jan 2024
-- Last Update: Mar 2025
--
--- Class AUTOLASE
-- @type AUTOLASE
@@ -88,6 +88,11 @@
-- @field #table LaserCodes
-- @field #table playermenus
-- @field #boolean smokemenu
-- @field #boolean threatmenu
-- @field #number RoundingPrecision
-- @field #table smokeoffset
-- @field #boolean increasegroundawareness
-- @field #number MonitorFrequency
-- @extends Ops.Intel#INTEL
---
@@ -99,6 +104,9 @@ AUTOLASE = {
alias = "",
debug = false,
smokemenu = true,
RoundingPrecision = 0,
increasegroundawareness = true,
MonitorFrequency = 30,
}
--- Laser spot info
@@ -117,7 +125,7 @@ AUTOLASE = {
--- AUTOLASE class version.
-- @field #string version
AUTOLASE.version = "0.1.23"
AUTOLASE.version = "0.1.31"
-------------------------------------------------------------------
-- Begin Functional.Autolase.lua
@@ -190,6 +198,7 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
self.reporttimelong = 30
self.smoketargets = false
self.smokecolor = SMOKECOLOR.Red
self.smokeoffset = nil
self.notifypilots = true
self.targetsperrecce = {}
self.RecceUnits = {}
@@ -205,6 +214,12 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
self.playermenus = {}
self.smokemenu = true
self.threatmenu = true
self.RoundingPrecision = 0
self.increasegroundawareness = true
self.MonitorFrequency = 30
self:EnableSmokeMenu({Angle=math.random(0,359),Distance=math.random(10,20)})
-- 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")
@@ -307,55 +322,92 @@ end
-- Helper Functions
-------------------------------------------------------------------
--- [User] When using Monitor, set the frequency here in which the report will appear
-- @param #AUTOLASE self
-- @param #number Seconds Run the report loop every number of seconds defined here.
-- @return #AUTOLASE self
function AUTOLASE:SetMonitorFrequency(Seconds)
self.MonitorFrequency = Seconds or 30
return self
end
--- [User] Set a table of possible laser codes.
-- Each new RECCE can select a code from this table, default is { 1688, 1130, 4785, 6547, 1465, 4578 } .
-- Each new RECCE can select a code from this table, default is { 1688, 1130, 4785, 6547, 1465, 4578 }.
-- @param #AUTOLASE self
-- @param #list<#number> LaserCodes
-- @return #AUTOLASE
-- @return #AUTOLASE self
function AUTOLASE:SetLaserCodes( LaserCodes )
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
return self
end
--- [User] Improve ground unit detection by using a zone scan and LOS check.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:EnableImproveGroundUnitsDetection()
self.increasegroundawareness = true
return self
end
--- [User] Do not improve ground unit detection by using a zone scan and LOS check.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:DisableImproveGroundUnitsDetection()
self.increasegroundawareness = false
return self
end
--- (Internal) Function to set pilot menu.
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:SetPilotMenu()
if self.usepilotset then
local pilottable = self.pilotset:GetSetObjects() or {}
local grouptable = {}
for _,_unit in pairs (pilottable) do
local Unit = _unit -- Wrapper.Unit#UNIT
if Unit and Unit:IsAlive() then
local Group = Unit:GetGroup()
local GroupName = Group:GetName() or "none"
local unitname = Unit:GetName()
if self.playermenus[unitname] then self.playermenus[unitname]:Remove() end
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
self.playermenus[unitname] = lasetopm
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
if self.smokemenu then
local smoke = (self.smoketargets == true) and "off" or "on"
local smoketext = string.format("Switch smoke targets to %s",smoke)
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
end
for _,_grp in pairs(self.RecceSet.Set) do
local grp = _grp -- Wrapper.Group#GROUP
local unit = grp:GetUnit(1)
--local name = grp:GetName()
if unit and unit:IsAlive() then
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
end
end
if not grouptable[GroupName] == true then
if self.playermenus[unitname] then self.playermenus[unitname]:Remove() end -- menus
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
self.playermenus[unitname] = lasetopm
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
if self.smokemenu then
local smoke = (self.smoketargets == true) and "off" or "on"
local smoketext = string.format("Switch smoke targets to %s",smoke)
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
end -- smokement
if self.threatmenu then
local threatmenutop = MENU_GROUP:New(Group,"Set min lasing threat",lasetopm)
for i=0,10,2 do
local text = "Threatlevel "..tostring(i)
local threatmenu = MENU_GROUP_COMMAND:New(Group,text,threatmenutop,self.SetMinThreatLevel,self,i)
end -- threatlevel
end -- threatmenu
for _,_grp in pairs(self.RecceSet.Set) do
local grp = _grp -- Wrapper.Group#GROUP
local unit = grp:GetUnit(1)
--local name = grp:GetName()
if unit and unit:IsAlive() then
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()
end
end
end -- unit alive
end -- pilot loop
else
if not self.NoMenus then
self.Menu = MENU_COALITION_COMMAND:New(self.coalition,"Autolase",nil,self.ShowStatus,self)
@@ -586,11 +638,26 @@ function AUTOLASE:SetSmokeTargets(OnOff,Color)
return self
end
--- (User) Function to set rounding precision for BR distance output.
-- @param #AUTOLASE self
-- @param #number IDP Rounding precision before/after the decimal sign. Defaults to zero. Positive values round right of the decimal sign, negative ones left of the decimal sign.
-- @return #AUTOLASE self
function AUTOLASE:SetRoundingPrecsion(IDP)
self.RoundingPrecision = IDP or 0
return self
end
--- (User) Show the "Switch smoke target..." menu entry for pilots. On by default.
-- @param #AUTOLASE self
-- @param #table Offset (Optional) Define an offset for the smoke, i.e. not directly on the unit itself, angle is degrees and distance is meters. E.g. `autolase:EnableSmokeMenu({Angle=30,Distance=20})`
-- @return #AUTOLASE self
function AUTOLASE:EnableSmokeMenu()
function AUTOLASE:EnableSmokeMenu(Offset)
self.smokemenu = true
if Offset then
self.smokeoffset = {}
self.smokeoffset.Distance = Offset.Distance or math.random(10,20)
self.smokeoffset.Angle = Offset.Angle or math.random(0,359)
end
return self
end
@@ -599,9 +666,25 @@ end
-- @return #AUTOLASE self
function AUTOLASE:DisableSmokeMenu()
self.smokemenu = false
self.smokeoffset = nil
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.
-- @param #AUTOLASE self
@@ -642,7 +725,8 @@ function AUTOLASE:CleanCurrentLasing()
local unit = recce:GetUnit(1)
local name = unit:GetName()
if not self.RecceUnits[name] then
self.RecceUnits[name] = { name=name, unit=unit, cooldown = false, timestamp = timer.getAbsTime() }
local isground = (unit and unit.IsGround) and unit:IsGround() or false
self.RecceUnits[name] = { name=name, unit=unit, cooldown = false, timestamp = timer.getAbsTime(), isground=isground }
end
end
end
@@ -728,8 +812,11 @@ function AUTOLASE:ShowStatus(Group,Unit)
end
local code = self:GetLaserCode(unit:GetName())
report:Add(string.format("Recce %s has code %d",name,code))
report:Add("---------------")
end
end
report:Add(string.format("Lasing min threat level %d",self.minthreatlevel))
report:Add("---------------")
local lines = 0
for _ind,_entry in pairs(self.CurrentLasing) do
local entry = _entry -- #AUTOLASE.LaserSpot
@@ -749,22 +836,28 @@ function AUTOLASE:ShowStatus(Group,Unit)
if playername then
local settings = _DATABASE:GetPlayerSettings(playername)
if settings then
self:I("Get Settings ok!")
self:T("Get Settings ok!")
if settings:IsA2G_MGRS() then
locationstring = entry.coordinate:ToStringMGRS(settings)
elseif settings:IsA2G_LL_DMS() then
locationstring = entry.coordinate:ToStringLLDMS(settings)
elseif settings:IsA2G_LL_DDM() then
locationstring = entry.coordinate:ToStringLLDDM(settings)
elseif settings:IsA2G_BR() then
locationstring = entry.coordinate:ToStringBR(Group:GetCoordinate() or Unit:GetCoordinate(),settings)
-- attention this is the distance from the ASKING unit to target, not from RECCE to target!
local startcoordinate = Unit:GetCoordinate() or Group:GetCoordinate()
locationstring = entry.coordinate:ToStringBR(startcoordinate,settings,false,self.RoundingPrecision)
end
end
end
local text = string.format("%s lasing %s code %d\nat %s",reccename,typename,code,locationstring)
local text = string.format("+ %s lasing %s code %d\nat %s",reccename,typename,code,locationstring)
report:Add(text)
report:Add("---------------")
lines = lines + 1
end
if lines == 0 then
report:Add("No targets!")
report:Add("---------------")
end
local reporttime = self.reporttimelong
if lines == 0 then reporttime = self.reporttimeshort end
@@ -883,6 +976,65 @@ function AUTOLASE:CanLase(Recce,Unit)
return canlase
end
--- (Internal) Function to do a zone check per ground Recce and make found units and statics "known".
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:_Prescient()
-- self.RecceUnits[name] = { name=name, unit=unit, cooldown = false, timestamp = timer.getAbsTime(), isground=isground }
for _,_data in pairs(self.RecceUnits) do
-- ground units only
if _data.isground and _data.unit and _data.unit:IsAlive() then
local unit = _data.unit -- Wrapper.Unit#UNIT
local position = unit:GetCoordinate() -- Core.Point#COORDINATE
local needsinit = false
if position then
local lastposition = unit:GetProperty("lastposition")
-- property initiated?
if not lastposition then
unit:SetProperty("lastposition",position)
lastposition = position
needsinit = true
end
-- has moved?
local dist = position:Get2DDistance(lastposition)
-- refresh?
local TNow = timer.getAbsTime()
-- check
if dist > 10 or needsinit==true or TNow - _data.timestamp > 29 then
-- init scan objects
local hasunits,hasstatics,_,Units,Statics = position:ScanObjects(self.LaseDistance,true,true,false)
-- loop found units
if hasunits then
self:T(self.lid.."Checking possibly visible UNITs for Recce "..unit:GetName())
for _,_target in pairs(Units) do -- Wrapper.Unit#UNIT object here
local target = _target -- Wrapper.Unit#UNIT
if target and target:GetCoalition() ~= self.coalition then
if unit:IsLOS(target) and (not target:IsUnitDetected(unit))then
unit:KnowUnit(target,true,true)
end
end
end
end
-- loop found statics
if hasstatics then
self:T(self.lid.."Checking possibly visible STATICs for Recce "..unit:GetName())
for _,_static in pairs(Statics) do -- DCS static object here
local static = STATIC:Find(_static)
if static and static:GetCoalition() ~= self.coalition then
local IsLOS = position:IsLOS(static:GetCoordinate())
if IsLOS then
unit:KnowUnit(static,true,true)
end
end
end
end
end
end
end
end
return self
end
-------------------------------------------------------------------
-- FSM Functions
-------------------------------------------------------------------
@@ -895,6 +1047,9 @@ end
-- @return #AUTOLASE self
function AUTOLASE:onbeforeMonitor(From, Event, To)
self:T({From, Event, To})
if self.increasegroundawareness then
self:_Prescient()
end
-- Check if group has detected any units.
self:UpdateIntel()
return self
@@ -923,7 +1078,7 @@ function AUTOLASE:onafterMonitor(From, Event, To)
local grp = contact.group
local coord = contact.position
local reccename = contact.recce or "none"
local threat = contact.threatlevel or 0
local threat = contact.threatlevel or 0
local reccegrp = UNIT:FindByName(reccename)
if reccegrp then
local reccecoord = reccegrp:GetCoordinate()
@@ -1047,6 +1202,9 @@ function AUTOLASE:onafterMonitor(From, Event, To)
}
if self.smoketargets then
local coord = unit:GetCoordinate()
if self.smokeoffset then
coord:Translate(self.smokeoffset.Distance,self.smokeoffset.Angle,true,true)
end
local color = self:GetSmokeColor(reccename)
coord:Smoke(color)
end
@@ -1057,7 +1215,8 @@ function AUTOLASE:onafterMonitor(From, Event, To)
end
end
self:__Monitor(-30)
local nextloop = -self.MonitorFrequency or -30
self:__Monitor(nextloop)
return self
end

View File

@@ -52,11 +52,13 @@
-- @module Functional.CleanUp
-- @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.
-- @extends Core.Base#BASE
--- @type CLEANUP_AIRBASE
---
-- @type CLEANUP_AIRBASE
-- @extends #CLEANUP_AIRBASE.__
--- Keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.
@@ -93,7 +95,7 @@ CLEANUP_AIRBASE = {
-- @field #CLEANUP_AIRBASE.__
CLEANUP_AIRBASE.__ = {}
--- @field #CLEANUP_AIRBASE.__.Airbases
-- @field #CLEANUP_AIRBASE.__.Airbases
CLEANUP_AIRBASE.__.Airbases = {}
--- 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
--- @param #CLEANUP_AIRBASE self
---
-- @param #CLEANUP_AIRBASE self
-- @param Core.Event#EVENTDATA EventData
function CLEANUP_AIRBASE.__:OnEventBirth( EventData )
self:F( { EventData } )
@@ -354,7 +357,7 @@ function CLEANUP_AIRBASE.__:EventAddForCleanUp( Event )
self:F({Event})
if Event.IniDCSUnit and Event.IniCategory == Object.Category.UNIT then
if Event.IniDCSUnit and Event.IniUnit and Event.IniCategory == Object.Category.UNIT then
if self.CleanUpList[Event.IniDCSUnitName] == nil then
if self:IsInAirbase( Event.IniUnit:GetVec2() ) then
self:AddForCleanUp( Event.IniUnit, Event.IniDCSUnitName )
@@ -362,7 +365,7 @@ function CLEANUP_AIRBASE.__:EventAddForCleanUp( Event )
end
end
if Event.TgtDCSUnit and Event.TgtCategory == Object.Category.UNIT then
if Event.TgtDCSUnit and Event.TgtUnit and Event.TgtCategory == Object.Category.UNIT then
if self.CleanUpList[Event.TgtDCSUnitName] == nil then
if self:IsInAirbase( Event.TgtUnit:GetVec2() ) then
self:AddForCleanUp( Event.TgtUnit, Event.TgtDCSUnitName )
@@ -384,7 +387,7 @@ function CLEANUP_AIRBASE.__:CleanUpSchedule()
local CleanUpUnit = CleanUpListData.CleanUpUnit -- Wrapper.Unit#UNIT
local CleanUpGroupName = CleanUpListData.CleanUpGroupName
if CleanUpUnit:IsAlive() ~= nil then
if CleanUpUnit and CleanUpUnit:IsAlive() ~= nil then
if self:IsInAirbase( CleanUpUnit:GetVec2() ) then
@@ -411,7 +414,7 @@ function CLEANUP_AIRBASE.__:CleanUpSchedule()
end
end
-- Clean Units which are waiting for a very long time in the CleanUpZone.
if CleanUpUnit and not CleanUpUnit:GetPlayerName() then
if CleanUpUnit and (CleanUpUnit.GetPlayerName == nil or not CleanUpUnit:GetPlayerName()) then
local CleanUpUnitVelocity = CleanUpUnit:GetVelocityKMH()
if CleanUpUnitVelocity < 1 then
if CleanUpListData.CleanUpMoved then

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

@@ -184,7 +184,7 @@
do -- DESIGNATE
--- @type DESIGNATE
-- @type DESIGNATE
-- @extends Core.Fsm#FSM_PROCESS
--- Manage the designation of detected targets.
@@ -525,7 +525,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup
-- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup )
self.FlashStatusMenu[AttackGroup] = FlashMenu
end
@@ -554,7 +554,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup
-- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup )
self.FlashDetectionMessage[AttackGroup] = FlashDetectionMessage
end
@@ -826,7 +826,7 @@ do -- DESIGNATE
-- This Detection is obsolete, remove from the designate scope
self.Designating[DesignateIndex] = nil
self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP AttackGroup
-- @param Wrapper.Group#GROUP AttackGroup
function( AttackGroup )
if AttackGroup:IsAlive() == true then
local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " )
@@ -903,7 +903,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP GroupReport
-- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then
@@ -1060,7 +1060,7 @@ do -- DESIGNATE
self.AttackSet:ForEachGroupAlive(
--- @param Wrapper.Group#GROUP GroupReport
-- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
self:ScheduleOnce( Delay, self.SetMenu, self, AttackGroup )
@@ -1198,7 +1198,7 @@ do -- DESIGNATE
--local ReportTypes = REPORT:New()
--local ReportLaserCodes = REPORT:New()
TargetSetUnit:Flush( self )
--TargetSetUnit:Flush( self )
--self:F( { Recces = self.Recces } )
for TargetUnit, RecceData in pairs( self.Recces ) do
@@ -1229,10 +1229,12 @@ do -- DESIGNATE
end
end
if TargetSetUnit == nil then return end
if self.AutoLase or ( not self.AutoLase and ( self.LaseStart + Duration >= timer.getTime() ) ) then
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit
-- @param Wrapper.Unit#UNIT SmokeUnit
function( TargetUnit )
self:F( { TargetUnit = TargetUnit:GetName() } )
@@ -1253,7 +1255,7 @@ do -- DESIGNATE
local RecceUnit = UnitData -- Wrapper.Unit#UNIT
local RecceUnitDesc = RecceUnit:GetDesc()
--self:F( { RecceUnit = RecceUnit:GetName(), RecceDescription = RecceUnitDesc } )
--self:F( { RecceUnit = RecceUnit:GetName(), RecceDescription = RecceUnitDesc } )x
if RecceUnit:IsLasing() == false then
--self:F( { IsDetected = RecceUnit:IsDetected( TargetUnit ), IsLOS = RecceUnit:IsLOS( TargetUnit ) } )
@@ -1275,9 +1277,10 @@ do -- DESIGNATE
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
local AttackSet = self.AttackSet
local DesignateName = self.DesignateName
local typename = TargetUnit:GetTypeName()
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 )
end
@@ -1285,7 +1288,7 @@ do -- DESIGNATE
-- OK. We have assigned for the Recce a TargetUnit. We can exit the function.
MarkingCount = MarkingCount + 1
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 )
if not MarkedTypes[TargetUnitType] then
MarkedTypes[TargetUnitType] = true
@@ -1392,7 +1395,7 @@ do -- DESIGNATE
local MarkedCount = 0
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit
-- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit )
if MarkedCount < self.MaximumMarkings then
@@ -1457,9 +1460,10 @@ do -- DESIGNATE
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterDoneSmoking( From, Event, To, Index )
self.Designating[Index] = string.gsub( self.Designating[Index], "S", "" )
self:SetDesignateMenu()
if self.Designating[Index] ~= nil then
self.Designating[Index] = string.gsub( self.Designating[Index], "S", "" )
self:SetDesignateMenu()
end
end
--- DoneIlluminating
@@ -1472,5 +1476,3 @@ do -- DESIGNATE
end
end

View File

@@ -545,7 +545,7 @@ do -- DETECTION_BASE
-- @param #string To The To State string.
function DETECTION_BASE:onafterDetect( From, Event, To )
local DetectDelay = 0.1
local DetectDelay = 0.15
self.DetectionCount = 0
self.DetectionRun = 0
self:UnIdentifyAllDetectedObjects() -- Resets the DetectedObjectsIdentified table
@@ -595,7 +595,8 @@ do -- DETECTION_BASE
return self
end
---
-- @param #DETECTION_BASE self
-- @param #string From The From State string.
-- @param #string Event The Event string.
@@ -604,7 +605,7 @@ do -- DETECTION_BASE
-- @param #number DetectionTimeStamp Time stamp of detection event.
function DETECTION_BASE:onafterDetection( From, Event, To, Detection, DetectionTimeStamp )
-- self:F( { DetectedObjects = self.DetectedObjects } )
self:T( { DetectedObjects = self.DetectedObjects } )
self.DetectionRun = self.DetectionRun + 1
@@ -612,14 +613,14 @@ do -- DETECTION_BASE
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 DetectionUnit = Detection:GetUnit( 1 )
local DetectionUnit = Detection:GetFirstUnitAlive()
local DetectedUnits = {}
local DetectedTargets = Detection:GetDetectedTargets(
local DetectedTargets = DetectionUnit:GetDetectedTargets(
self.DetectVisual,
self.DetectOptical,
self.DetectRadar,
@@ -628,28 +629,30 @@ do -- DETECTION_BASE
self.DetectDLINK
)
self:F( { DetectedTargets = DetectedTargets } )
for DetectionObjectID, Detection in pairs( DetectedTargets ) do
--self:T( { DetectedTargets = DetectedTargets } )
--self:T(UTILS.PrintTableToLog(DetectedTargets))
for DetectionObjectID, Detection in pairs( DetectedTargets or {}) do
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
local DetectedObjectName = DetectedObject:getName()
if not self.DetectedObjects[DetectedObjectName] then
self.DetectedObjects[DetectedObjectName] = self.DetectedObjects[DetectedObjectName] or {}
self.DetectedObjects[DetectedObjectName].Name = DetectedObjectName
self.DetectedObjects[DetectedObjectName].Name = DetectedObjectName
self.DetectedObjects[DetectedObjectName].Object = DetectedObject
end
end
end
for DetectionObjectName, DetectedObjectData in pairs( self.DetectedObjects ) do
for DetectionObjectName, DetectedObjectData in pairs( self.DetectedObjects or {}) do
local DetectedObject = DetectedObjectData.Object
if DetectedObject:isExist() then
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity = DetectionUnit:IsTargetDetected(
local TargetIsDetected, TargetIsVisible, TargetKnowType, TargetKnowDistance, TargetLastTime, TargetLastPos, TargetLastVelocity = DetectionUnit:IsTargetDetected(
DetectedObject,
self.DetectVisual,
self.DetectOptical,

View File

@@ -4,7 +4,7 @@
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 #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
@@ -68,7 +68,7 @@ do -- DETECTION_ZONES
return self
end
--- @param #DETECTION_ZONES self
-- @param #DETECTION_ZONES self
-- @param #number The amount of alive recce.
function DETECTION_ZONES:CountAliveRecce()
@@ -76,7 +76,7 @@ do -- DETECTION_ZONES
end
--- @param #DETECTION_ZONES self
-- @param #DETECTION_ZONES self
function DETECTION_ZONES:ForEachAliveRecce( IteratorFunction, ... )
self:F2( arg )
@@ -352,7 +352,7 @@ do -- DETECTION_ZONES
--DetectedSet:Flush( self )
DetectedSet:ForEachUnit(
--- @param Wrapper.Unit#UNIT DetectedUnit
-- @param Wrapper.Unit#UNIT DetectedUnit
function( DetectedUnit )
if DetectedUnit:IsAlive() then
--self:T( "Detected Set #" .. DetectedItem.ID .. ":" .. DetectedUnit:GetName() )
@@ -380,7 +380,7 @@ do -- DETECTION_ZONES
end
--- @param #DETECTION_ZONES self
-- @param #DETECTION_ZONES self
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.

View File

@@ -1154,8 +1154,6 @@ function ESCORT:_ReportTargetsScheduler()
if self.EscortGroup:IsAlive() and self.EscortClient:IsAlive() then
if true then
local EscortGroupName = self.EscortGroup:GetName()
self.EscortMenuAttackNearbyTargets:RemoveSubMenus()
@@ -1226,177 +1224,6 @@ function ESCORT:_ReportTargetsScheduler()
end
return true
else
-- local EscortGroupName = self.EscortGroup:GetName()
-- local EscortTargets = self.EscortGroup:GetDetectedTargets()
--
-- local ClientEscortTargets = self.EscortClient._EscortGroups[EscortGroupName].Targets
--
-- local EscortTargetMessages = ""
-- for EscortTargetID, EscortTarget in pairs( EscortTargets ) do
-- local EscortObject = EscortTarget.object
-- self:T( EscortObject )
-- if EscortObject and EscortObject:isExist() and EscortObject.id_ < 50000000 then
--
-- local EscortTargetUnit = UNIT:Find( EscortObject )
-- local EscortTargetUnitName = EscortTargetUnit:GetName()
--
--
--
-- -- local EscortTargetIsDetected,
-- -- EscortTargetIsVisible,
-- -- EscortTargetLastTime,
-- -- EscortTargetKnowType,
-- -- EscortTargetKnowDistance,
-- -- EscortTargetLastPos,
-- -- EscortTargetLastVelocity
-- -- = self.EscortGroup:IsTargetDetected( EscortObject )
-- --
-- -- self:T( { EscortTargetIsDetected,
-- -- EscortTargetIsVisible,
-- -- EscortTargetLastTime,
-- -- EscortTargetKnowType,
-- -- EscortTargetKnowDistance,
-- -- EscortTargetLastPos,
-- -- EscortTargetLastVelocity } )
--
--
-- local EscortTargetUnitVec3 = EscortTargetUnit:GetVec3()
-- local EscortVec3 = self.EscortGroup:GetVec3()
-- local Distance = ( ( EscortTargetUnitVec3.x - EscortVec3.x )^2 +
-- ( EscortTargetUnitVec3.y - EscortVec3.y )^2 +
-- ( EscortTargetUnitVec3.z - EscortVec3.z )^2
-- ) ^ 0.5 / 1000
--
-- self:T( { self.EscortGroup:GetName(), EscortTargetUnit:GetName(), Distance, EscortTarget } )
--
-- if Distance <= 15 then
--
-- if not ClientEscortTargets[EscortTargetUnitName] then
-- ClientEscortTargets[EscortTargetUnitName] = {}
-- end
-- ClientEscortTargets[EscortTargetUnitName].AttackUnit = EscortTargetUnit
-- ClientEscortTargets[EscortTargetUnitName].visible = EscortTarget.visible
-- ClientEscortTargets[EscortTargetUnitName].type = EscortTarget.type
-- ClientEscortTargets[EscortTargetUnitName].distance = EscortTarget.distance
-- else
-- if ClientEscortTargets[EscortTargetUnitName] then
-- ClientEscortTargets[EscortTargetUnitName] = nil
-- end
-- end
-- end
-- end
--
-- self:T( { "Sorting Targets Table:", ClientEscortTargets } )
-- table.sort( ClientEscortTargets, function( a, b ) return a.Distance < b.Distance end )
-- self:T( { "Sorted Targets Table:", ClientEscortTargets } )
--
-- -- Remove the sub menus of the Attack menu of the Escort for the EscortGroup.
-- self.EscortMenuAttackNearbyTargets:RemoveSubMenus()
--
-- if self.EscortMenuTargetAssistance then
-- self.EscortMenuTargetAssistance:RemoveSubMenus()
-- end
--
-- --for MenuIndex = 1, #self.EscortMenuAttackTargets do
-- -- self:T( { "Remove Menu:", self.EscortMenuAttackTargets[MenuIndex] } )
-- -- self.EscortMenuAttackTargets[MenuIndex] = self.EscortMenuAttackTargets[MenuIndex]:Remove()
-- --end
--
--
-- if ClientEscortTargets then
-- for ClientEscortTargetUnitName, ClientEscortTargetData in pairs( ClientEscortTargets ) do
--
-- for ClientEscortGroupName, EscortGroupData in pairs( self.EscortClient._EscortGroups ) do
--
-- if ClientEscortTargetData and ClientEscortTargetData.AttackUnit:IsAlive() then
--
-- local EscortTargetMessage = ""
-- local EscortTargetCategoryName = ClientEscortTargetData.AttackUnit:GetCategoryName()
-- local EscortTargetCategoryType = ClientEscortTargetData.AttackUnit:GetTypeName()
-- if ClientEscortTargetData.type then
-- EscortTargetMessage = EscortTargetMessage .. EscortTargetCategoryName .. " (" .. EscortTargetCategoryType .. ") at "
-- else
-- EscortTargetMessage = EscortTargetMessage .. "Unknown target at "
-- end
--
-- local EscortTargetUnitVec3 = ClientEscortTargetData.AttackUnit:GetVec3()
-- local EscortVec3 = self.EscortGroup:GetVec3()
-- local Distance = ( ( EscortTargetUnitVec3.x - EscortVec3.x )^2 +
-- ( EscortTargetUnitVec3.y - EscortVec3.y )^2 +
-- ( EscortTargetUnitVec3.z - EscortVec3.z )^2
-- ) ^ 0.5 / 1000
--
-- self:T( { self.EscortGroup:GetName(), ClientEscortTargetData.AttackUnit:GetName(), Distance, ClientEscortTargetData.AttackUnit } )
-- if ClientEscortTargetData.visible == false then
-- EscortTargetMessage = EscortTargetMessage .. string.format( "%.2f", Distance ) .. " estimated km"
-- else
-- EscortTargetMessage = EscortTargetMessage .. string.format( "%.2f", Distance ) .. " km"
-- end
--
-- if ClientEscortTargetData.visible then
-- EscortTargetMessage = EscortTargetMessage .. ", visual"
-- end
--
-- if ClientEscortGroupName == EscortGroupName then
--
-- MENU_GROUP_COMMAND:New( self.EscortClient,
-- EscortTargetMessage,
-- self.EscortMenuAttackNearbyTargets,
-- ESCORT._AttackTarget,
-- { ParamSelf = self,
-- ParamUnit = ClientEscortTargetData.AttackUnit
-- }
-- )
-- EscortTargetMessages = EscortTargetMessages .. "\n - " .. EscortTargetMessage
-- else
-- if self.EscortMenuTargetAssistance then
-- local MenuTargetAssistance = MENU_GROUP:New( self.EscortClient, EscortGroupData.EscortName, self.EscortMenuTargetAssistance )
-- MENU_GROUP_COMMAND:New( self.EscortClient,
-- EscortTargetMessage,
-- MenuTargetAssistance,
-- ESCORT._AssistTarget,
-- self,
-- EscortGroupData.EscortGroup,
-- ClientEscortTargetData.AttackUnit
-- )
-- end
-- end
-- else
-- ClientEscortTargetData = nil
-- end
-- end
-- end
--
-- if EscortTargetMessages ~= "" and self.ReportTargets == true then
-- self.EscortGroup:MessageToClient( "Detected targets within 15 km range:" .. EscortTargetMessages:gsub("\n$",""), 20, self.EscortClient )
-- else
-- self.EscortGroup:MessageToClient( "No targets detected!", 20, self.EscortClient )
-- end
-- end
--
-- if self.EscortMenuResumeMission then
-- self.EscortMenuResumeMission:RemoveSubMenus()
--
-- -- if self.EscortMenuResumeWayPoints then
-- -- for MenuIndex = 1, #self.EscortMenuResumeWayPoints do
-- -- self:T( { "Remove Menu:", self.EscortMenuResumeWayPoints[MenuIndex] } )
-- -- self.EscortMenuResumeWayPoints[MenuIndex] = self.EscortMenuResumeWayPoints[MenuIndex]:Remove()
-- -- end
-- -- end
--
-- local TaskPoints = self:RegisterRoute()
-- for WayPointID, WayPoint in pairs( TaskPoints ) do
-- local EscortVec3 = self.EscortGroup:GetVec3()
-- local Distance = ( ( WayPoint.x - EscortVec3.x )^2 +
-- ( WayPoint.y - EscortVec3.z )^2
-- ) ^ 0.5 / 1000
-- MENU_GROUP_COMMAND:New( self.EscortClient, "Waypoint " .. WayPointID .. " at " .. string.format( "%.2f", Distance ).. "km", self.EscortMenuResumeMission, ESCORT._ResumeMission, { ParamSelf = self, ParamWayPoint = WayPointID } )
-- end
-- end
--
-- return true
end
end
return false

View File

@@ -141,7 +141,7 @@ FOX = {
explosiondist = 200,
explosiondist2 = 500,
bigmissilemass = 50,
destroy = nil,
--destroy = nil,
dt50 = 5,
dt10 = 1,
dt05 = 0.5,
@@ -1060,7 +1060,7 @@ function FOX:onafterMissileLaunch(From, Event, To, missile)
-- Tracking info and init of last bomb position.
local text=string.format("FOX: Tracking missile %s(%s) - target %s - shooter %s", missile.missileType, missile.missileName, tostring(missile.targetName), missile.shooterName)
self:I(FOX.lid..text)
self:T(FOX.lid..text)
MESSAGE:New(text, 10):ToAllIf(self.Debug)
-- Loop over players.

View File

@@ -22,7 +22,7 @@
-- @module Functional.Mantis
-- @image Functional.Mantis.jpg
--
-- Last Update: Feb 2024
-- Last Update: Mar 2025
-------------------------------------------------------------------------
--- **MANTIS** class, extends Core.Base#BASE
@@ -58,6 +58,11 @@
-- @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 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.
-- @field #boolean SmokeDecoy If true, smoke short range SAM units as decoy if a plane is in firing range.
-- @field #number SmokeDecoyColor Color to use, defaults to SMOKECOLOR.White
-- @field #number checkcounter Counter for SAM Table refreshes
-- @extends Core.Base#BASE
@@ -69,7 +74,7 @@
--
-- * Moose derived Modular, Automatic and Network capable Targeting and Interception System.
-- * Controls a network of SAM sites. Uses detection to switch on the SAM site closest to the enemy.
-- * **Automatic mode** (default since 0.8) can set-up your SAM site network automatically for you
-- * **Automatic mode** (default since 0.8) will set-up your SAM site network automatically for you
-- * **Classic mode** behaves like before
-- * Leverage evasiveness from SEAD, leverage attack range setting
-- * Automatic setup of SHORAD based on groups of the class "short-range"
@@ -84,6 +89,7 @@
-- * SAM sites, e.g. each **group name** begins with "Red SAM"
-- * EWR network and AWACS, e.g. each **group name** begins with "Red EWR" and *not* e.g. "Red SAM EWR" (overlap with "Red SAM"), "Red EWR Awacs" will be found by "Red EWR"
-- * SHORAD, e.g. each **group name** begins with "Red SHORAD" and *not" e.g. just "SHORAD" because you might also have "Blue SHORAD"
-- * Point Defense, e.g. each **group name** begins with "Red AAA" and *not" e.g. just "AAA" because you might also have "Blue AAA"
--
-- It's important to get this right because of the nature of the filter-system in @{Core.Set#SET_GROUP}. Filters are "greedy", that is they
-- will match *any* string that contains the search string - hence we need to avoid that SAMs, EWR and SHORAD step on each other\'s toes.
@@ -142,6 +148,7 @@
-- **Location** is of highest importance here. Whilst AWACS in DCS has almost the "all seeing eye", EWR don't have that. Choose your location wisely, against a mountain backdrop or inside a valley even the best EWR system
-- doesn't work well. Prefer higher-up locations with a good view; use F7 in-game to check where you actually placed your EWR and have a look around. Apart from the obvious choice, do also consider other radar units
-- for this role, most have "SR" (search radar) or "STR" (search and track radar) in their names, use the encyclopedia to see what they actually do.
-- **HINT** Set at least one EWR on invisible and immortal so MANTIS doesn't stop working.
--
-- ## 1.2 SAM sites
--
@@ -187,29 +194,32 @@
-- -- 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
-- -- 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, point defense systems going live on a detected target:
--
-- -- parameters are numbers. Defaults are 1,2,2,6 respectively
-- `mybluemantis:SetMaxActiveSAMs(Short,Mid,Long,Classic)`
-- -- parameters are numbers. Defaults are 1,2,2,6,6 respectively
-- mybluemantis:SetMaxActiveSAMs(Short,Mid,Long,Classic,Point)
--
-- ### 2.1.3 SHORAD will automatically be added from SAM sites of type "short-range"
-- ### 2.1.3 SHORAD/Point defense will automatically be added from SAM sites of type "point" or if the range is less than 5km or if the type is AAA.
--
-- ### 2.1.4 Advanced features
--
-- -- switch off auto mode **before** you start MANTIS.
-- `mybluemantis.automode = false`
-- -- Option to switch off auto mode **before** you start MANTIS (not recommended)
-- mybluemantis.automode = false
--
-- -- switch off auto shorad **before** you start MANTIS.
-- `mybluemantis.autoshorad = false`
--
-- -- scale of the activation range, i.e. don't activate at the fringes of max range, defaults below.
-- -- Option to set the scale of the activation range, i.e. don't activate at the fringes of max range, defaults below.
-- -- also see engagerange below.
-- ` self.radiusscale[MANTIS.SamType.LONG] = 1.1`
-- ` self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2`
-- ` self.radiusscale[MANTIS.SamType.SHORT] = 1.3`
-- self.radiusscale[MANTIS.SamType.LONG] = 1.1
-- self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2
-- self.radiusscale[MANTIS.SamType.SHORT] = 1.3
-- self.radiusscale[MANTIS.SamType.POINT] = 1.4
--
-- ### 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]
--
@@ -233,9 +243,9 @@
--
-- 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, not recommended for manual setup]
--
-- 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 manually. 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:
--
-- local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart()
@@ -289,6 +299,7 @@ MANTIS = {
SAM_Table_Long = {},
SAM_Table_Medium = {},
SAM_Table_Short = {},
SAM_Table_PointDef = {},
lid = "",
Detection = nil,
AWACS_Detection = nil,
@@ -321,6 +332,10 @@ MANTIS = {
automode = true,
autoshorad = true,
ShoradGroupSet = nil,
checkforfriendlies = false,
SmokeDecoy = false,
SmokeDecoyColor = SMOKECOLOR.White,
checkcounter = 1,
}
--- Advanced state enumerator
@@ -337,8 +352,17 @@ MANTIS.SamType = {
SHORT = "Short",
MEDIUM = "Medium",
LONG = "Long",
POINT = "Point",
}
--- SAM Radiusscale
-- @type MANTIS.radiusscale
MANTIS.radiusscale = {}
MANTIS.radiusscale[MANTIS.SamType.LONG] = 1.1
MANTIS.radiusscale[MANTIS.SamType.MEDIUM] = 1.2
MANTIS.radiusscale[MANTIS.SamType.SHORT] = 1.75
MANTIS.radiusscale[MANTIS.SamType.POINT] = 3
--- SAM data
-- @type MANTIS.SamData
-- @field #number Range Max firing range in km
@@ -346,6 +370,7 @@ MANTIS.SamType = {
-- @field #number Height Max firing height in km
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
-- @field #string Radar Radar typename on unit level (used as key)
-- @field #string Point Point defense capable
MANTIS.SamData = {
["Hawk"] = { Range=35, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km
["NASAMS"] = { Range=14, Blindspot=0, Height=7, Type="Short", Radar="NSAMS" }, -- AIM 120B
@@ -357,16 +382,16 @@ MANTIS.SamData = {
["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-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" },
["Roland"] = { Range=5, Blindspot=0, Height=5, Type="Short", Radar="Roland" },
["Roland"] = { Range=5, Blindspot=0, Height=5, Type="Point", Radar="Roland" },
["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="Point", Radar="Strela", Point="true" },
["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" },
["SA-19"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Tunguska" },
["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-15"] = { Range=11, Blindspot=0, Height=6, Type="Point", Radar="Tor 9A331", Point="true" },
["SA-13"] = { Range=5, Blindspot=0, Height=3, Type="Point", Radar="Strela", Point="true" },
["Avenger"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="Avenger" },
["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="Point", Radar="Linebacker", Point="true" },
["Silkworm"] = { Range=90, Blindspot=1, Height=0.2, Type="Long", Radar="Silkworm" },
-- units from HDS Mod, multi launcher options is tricky
["SA-10B"] = { Range=75, Blindspot=0, Height=18, Type="Medium" , Radar="SA-10B"},
@@ -374,7 +399,6 @@ MANTIS.SamData = {
["SA-20A"] = { Range=150, Blindspot=5, Height=27, Type="Long" , Radar="S-300PMU1"},
["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"},
["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" },
["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" },
["TAMIR IDFA"] = { Range=20, Blindspot=0.6, Height=12.3, Type="Short", Radar="IRON_DOME_LN" },
["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" },
}
@@ -386,6 +410,7 @@ MANTIS.SamData = {
-- @field #number Height Max firing height in km
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
-- @field #string Radar Radar typename on unit level (used as key)
-- @field #string Point Point defense capable
MANTIS.SamDataHDS = {
-- units from HDS Mod, multi launcher options is tricky
-- group name MUST contain HDS to ID launcher type correctly!
@@ -407,20 +432,21 @@ MANTIS.SamDataHDS = {
-- @field #number Height Max firing height in km
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
-- @field #string Radar Radar typename on unit level (used as key)
-- @field #string Point Point defense capable
MANTIS.SamDataSMA = {
-- units from SMA Mod (Sweedish Military Assets)
-- https://forum.dcs.world/topic/295202-swedish-military-assets-for-dcs-by-currenthill/
-- group name MUST contain SMA to ID launcher type correctly!
["RBS98M SMA"] = { Range=20, Blindspot=0, Height=8, Type="Short", Radar="RBS-98" },
["RBS70 SMA"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="RBS-70" },
["RBS70M SMA"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="BV410_RBS70" },
["RBS90 SMA"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="RBS-90" },
["RBS90M SMA"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="BV410_RBS90" },
["RBS103A SMA"] = { Range=150, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_Rb103A" },
["RBS103B SMA"] = { Range=35, Blindspot=0, Height=36, Type="Medium", Radar="LvS-103_Lavett103_Rb103B" },
["RBS103AM SMA"] = { Range=150, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103A" },
["RBS103BM SMA"] = { Range=35, Blindspot=0, Height=36, Type="Medium", Radar="LvS-103_Lavett103_HX_Rb103B" },
["Lvkv9040M SMA"] = { Range=4, Blindspot=0, Height=2.5, Type="Short", Radar="LvKv9040" },
["RBS98M SMA"] = { Range=20, Blindspot=0.2, Height=8, Type="Short", Radar="RBS-98" },
["RBS70 SMA"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="RBS-70" },
["RBS70M SMA"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="BV410_RBS70" },
["RBS90 SMA"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="RBS-90" },
["RBS90M SMA"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="BV410_RBS90" },
["RBS103A SMA"] = { Range=160, Blindspot=1, Height=36, Type="Long", Radar="LvS-103_Lavett103_Rb103A" },
["RBS103B SMA"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_Rb103B" },
["RBS103AM SMA"] = { Range=160, Blindspot=1, Height=36, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103A" },
["RBS103BM SMA"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103B" },
["Lvkv9040M SMA"] = { Range=2, Blindspot=0.1, Height=1.2, Type="Point", Radar="LvKv9040",Point="true" },
}
--- SAM data CH
@@ -430,28 +456,54 @@ MANTIS.SamDataSMA = {
-- @field #number Height Max firing height in km
-- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range)
-- @field #string Radar Radar typename on unit level (used as key)
-- @field #string Point Point defense capable
MANTIS.SamDataCH = {
-- units from CH (Military Assets by Currenthill)
-- https://www.currenthill.com/
-- group name MUST contain CHM to ID launcher type correctly!
["2S38 CH"] = { Range=8, Blindspot=0.5, Height=6, Type="Short", Radar="2S38" },
["PantsirS1 CH"] = { Range=20, Blindspot=1.2, Height=15, Type="Short", Radar="PantsirS1" },
["PantsirS2 CH"] = { Range=30, Blindspot=1.2, Height=18, Type="Medium", Radar="PantsirS2" },
["PGL-625 CH"] = { Range=10, Blindspot=0.5, Height=5, Type="Short", Radar="PGL_625" },
["HQ-17A CH"] = { Range=20, Blindspot=1.5, Height=10, Type="Short", Radar="HQ17A" },
["M903PAC2 CH"] = { Range=160, Blindspot=3, Height=24.5, Type="Long", Radar="MIM104_M903_PAC2" },
["M903PAC3 CH"] = { Range=120, Blindspot=1, Height=40, Type="Long", Radar="MIM104_M903_PAC3" },
["TorM2 CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2" },
["TorM2K CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2K" },
["TorM2M CH"] = { Range=16, Blindspot=1, Height=10, Type="Short", Radar="TorM2M" },
["NASAMS3-AMRAAMER CH"] = { Range=50, Blindspot=2, Height=35.7, Type="Medium", Radar="CH_NASAMS3_LN_AMRAAM_ER" },
["NASAMS3-AIM9X2 CH"] = { Range=20, Blindspot=0.2, Height=18, Type="Short", Radar="CH_NASAMS3_LN_AIM9X2" },
["C-RAM CH"] = { Range=2, Blindspot=0, Height=2, Type="Short", Radar="CH_Centurion_C_RAM" },
["PGZ-09 CH"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="CH_PGZ09" },
["S350-9M100 CH"] = { Range=15, Blindspot=1.5, Height=8, Type="Short", Radar="CH_S350_50P6_9M100" },
["S350-9M96D CH"] = { Range=150, Blindspot=2.5, Height=30, Type="Long", Radar="CH_S350_50P6_9M96D" },
["LAV-AD CH"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_LAVAD" },
["HQ-22 CH"] = { Range=170, Blindspot=5, Height=27, Type="Long", Radar="CH_HQ22_LN" },
-- units from CH (Military Assets by Currenthill)
-- https://www.currenthill.com/
-- group name MUST contain CHM to ID launcher type correctly!
["2S38 CHM"] = { Range=6, Blindspot=0.1, Height=4.5, Type="Short", Radar="2S38" },
["PantsirS1 CHM"] = { Range=20, Blindspot=1.2, Height=15, Type="Short", Radar="PantsirS1" },
["PantsirS2 CHM"] = { Range=30, Blindspot=1.2, Height=18, Type="Medium", Radar="PantsirS2" },
["PGL-625 CHM"] = { Range=10, Blindspot=1, Height=5, Type="Short", Radar="PGL_625" },
["HQ-17A CHM"] = { Range=15, Blindspot=1.5, Height=10, Type="Short", Radar="HQ17A" },
["M903PAC2 CHM"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="MIM104_M903_PAC2" },
["M903PAC3 CHM"] = { Range=160, Blindspot=1, Height=40, Type="Long", Radar="MIM104_M903_PAC3" },
["TorM2 CHM"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2" },
["TorM2K CHM"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2K" },
["TorM2M CHM"] = { Range=16, Blindspot=1, Height=10, Type="Short", Radar="TorM2M" },
["NASAMS3-AMRAAMER CHM"] = { Range=50, Blindspot=2, Height=35.7, Type="Medium", Radar="CH_NASAMS3_LN_AMRAAM_ER" },
["NASAMS3-AIM9X2 CHM"] = { Range=20, Blindspot=0.2, Height=18, Type="Short", Radar="CH_NASAMS3_LN_AIM9X2" },
["C-RAM CHM"] = { Range=2, Blindspot=0, Height=2, Type="Point", Radar="CH_Centurion_C_RAM", Point="true" },
["PGZ-09 CHM"] = { Range=4, Blindspot=0.5, Height=3, Type="Point", Radar="CH_PGZ09", Point="true" },
["S350-9M100 CHM"] = { Range=15, Blindspot=1, Height=8, Type="Short", Radar="CH_S350_50P6_9M100" },
["S350-9M96D CHM"] = { Range=150, Blindspot=2.5, Height=30, Type="Long", Radar="CH_S350_50P6_9M96D" },
["LAV-AD CHM"] = { Range=8, Blindspot=0.16, Height=4.8, Type="Short", Radar="CH_LAVAD" },
["HQ-22 CHM"] = { Range=170, Blindspot=5, Height=27, Type="Long", Radar="CH_HQ22_LN" },
["PGZ-95 CHM"] = { Range=2.5, Blindspot=0.5, Height=2, Type="Point", Radar="CH_PGZ95",Point="true" },
["LD-3000 CHM"] = { Range=2.5, Blindspot=0.1, Height=3, Type="Point", Radar="CH_LD3000_stationary", Point="true" },
["LD-3000M CHM"] = { Range=2.5, Blindspot=0.1, Height=3, Type="Point", Radar="CH_LD3000", Point="true" },
["FlaRakRad CHM"] = { Range=8, Blindspot=1.5, Height=6, Type="Short", Radar="CH_FlaRakRad" },
["IRIS-T SLM CHM"] = { Range=40, Blindspot=0.5, Height=20, Type="Medium", Radar="CH_IRIST_SLM" },
["M903PAC2KAT1 CHM"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="CH_MIM104_M903_PAC2_KAT1" },
["Skynex CHM"] = { Range=3.5, Blindspot=0.1, Height=3.5, Type="Point", Radar="CH_SkynexHX", Point="true" },
["Skyshield CHM"] = { Range=3.5, Blindspot=0.1, Height=3.5, Type="Point", Radar="CH_Skyshield_Gun", Point="true" },
["WieselOzelot CHM"] = { Range=8, Blindspot=0.16, Height=4.8, Type="Short", Radar="CH_Wiesel2Ozelot" },
["BukM3-9M317M CHM"] = { Range=70, Blindspot=0.25, Height=35, Type="Medium", Radar="CH_BukM3_9A317M" },
["BukM3-9M317MA CHM"] = { Range=70, Blindspot=0.25, Height=35, Type="Medium", Radar="CH_BukM3_9A317MA" },
["SkySabre CHM"] = { Range=30, Blindspot=0.5, Height=10, Type="Medium", Radar="CH_SkySabreLN" },
["Stormer CHM"] = { Range=7.5, Blindspot=0.3, Height=7, Type="Short", Radar="CH_StormerHVM" },
["THAAD CHM"] = { Range=200, Blindspot=40, Height=150, Type="Long", Radar="CH_THAAD_M1120" },
["USInfantryFIM92K CHM"] = { Range=8, Blindspot=0.16, Height=4.8, Type="Short", Radar="CH_USInfantry_FIM92" },
["RBS98M CHM"] = { Range=20, Blindspot=0.2, Height=8, Type="Short", Radar="RBS-98" },
["RBS70 CHM"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="RBS-70" },
["RBS70M CHM"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="BV410_RBS70" },
["RBS90 CHM"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="RBS-90" },
["RBS90M CHM"] = { Range=8, Blindspot=0.25, Height=6, Type="Short", Radar="BV410_RBS90" },
["RBS103A CHM"] = { Range=160, Blindspot=1, Height=36, Type="Long", Radar="LvS-103_Lavett103_Rb103A" },
["RBS103B CHM"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_Rb103B" },
["RBS103AM CHM"] = { Range=160, Blindspot=1, Height=36, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103A" },
["RBS103BM CHM"] = { Range=120, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103B" },
["Lvkv9040M CHM"] = { Range=2, Blindspot=0.1, Height=1.2, Type="Point", Radar="LvKv9040",Point="true" },
}
-----------------------------------------------------------------------
@@ -502,7 +554,8 @@ do
-- DONE: Treat Awacs separately, since they might be >80km off site
-- DONE: Allow tables of prefixes for the setup
-- 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.EWR_Templates_Prefix = ewrprefix or "Red EWR"
self.HQ_Template_CC = hq or nil
@@ -511,6 +564,7 @@ do
self.SAM_Table_Long = {}
self.SAM_Table_Medium = {}
self.SAM_Table_Short = {}
self.SAM_Table_PointDef = {}
self.dynamic = dynamic or false
self.checkradius = 25000
self.grouping = 5000
@@ -539,10 +593,6 @@ do
self.SuppressedGroups = {}
-- 0.8 additions
self.automode = true
self.radiusscale = {}
self.radiusscale[MANTIS.SamType.LONG] = 1.1
self.radiusscale[MANTIS.SamType.MEDIUM] = 1.2
self.radiusscale[MANTIS.SamType.SHORT] = 1.3
--self.SAMCheckRanges = {}
self.usezones = false
self.AcceptZones = {}
@@ -551,6 +601,7 @@ do
self.maxlongrange = 1
self.maxmidrange = 2
self.maxshortrange = 2
self.maxpointdefrange = 6
self.maxclassic = 6
self.autoshorad = true
self.ShoradGroupSet = SET_GROUP:New() -- Core.Set#SET_GROUP
@@ -558,7 +609,10 @@ do
self.SkateZones = nil
self.SkateNumber = 3
self.shootandscoot = false
self.shootandscoot = false
self.SmokeDecoy = false
self.SmokeDecoyColor = SMOKECOLOR.White
self.UseEmOnOff = true
if EmOnOff == false then
@@ -570,6 +624,7 @@ do
else
self.advAwacs = false
end
-- Set the string id for output to DCS.log file.
self.lid=string.format("MANTIS %s | ", self.name)
@@ -629,9 +684,12 @@ do
self.HQ_CC = GROUP:FindByName(self.HQ_Template_CC)
end
-- counter for SAM table updates
self.checkcounter = 1
-- TODO Version
-- @field #string version
self.version="0.8.16"
self.version="0.9.27"
self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
--- FSM Functions ---
@@ -828,7 +886,7 @@ do
self.AcceptZones = AcceptZones or {}
self.RejectZones = RejectZones or {}
self.ConflictZones = ConflictZones or {}
if #AcceptZones > 0 or #RejectZones > 0 or #ConflictZones > 0 then
if #self.AcceptZones > 0 or #self.RejectZones > 0 or #self.ConflictZones > 0 then
self.usezones = true
end
return self
@@ -867,19 +925,31 @@ do
return self
end
--- Function to set Short Range SAMs to spit out smoke as decoy, if an enemy plane is in range.
-- @param #MANTIS self
-- @param #boolean Onoff Set to true for on and nil/false for off.
-- @param #number Color (Optional) Color to use, defaults to `SMOKECOLOR.White`
function MANTIS:SetSmokeDecoy(Onoff,Color)
self.SmokeDecoy = Onoff
self.SmokeDecoyColor = Color or SMOKECOLOR.White
return self
end
--- Function to set number of SAMs going active on a valid, detected thread
-- @param #MANTIS self
-- @param #number Short Number of short-range systems activated, defaults to 1.
-- @param #number Mid Number of mid-range systems activated, defaults to 2.
-- @param #number Long Number of long-range systems activated, defaults to 2.
-- @param #number Classic (non-automode) Number of overall systems activated, defaults to 6.
-- @param #number Point Number of point defense and AAA systems activated, defaults to 6.
-- @return #MANTIS self
function MANTIS:SetMaxActiveSAMs(Short,Mid,Long,Classic)
function MANTIS:SetMaxActiveSAMs(Short,Mid,Long,Classic,Point)
self:T(self.lid .. "SetMaxActiveSAMs")
self.maxclassic = Classic or 6
self.maxlongrange = Long or 1
self.maxmidrange = Mid or 2
self.maxshortrange = Short or 2
self.maxpointdefrange= Point or 6
return self
end
@@ -1081,6 +1151,24 @@ do
end
return self
end
--- [Internal] Check if any EWR or AWACS is still alive
-- @param #MANTIS self
-- @return #boolean outcome
function MANTIS:_CheckAnyEWRAlive()
self:T(self.lid .. "_CheckAnyEWRAlive")
local alive = false
if self.EWR_Group:CountAlive() > 0 then
alive = true
end
if not alive and self.AWACS_Prefix then
local awacs = GROUP:FindByName(self.AWACS_Prefix)
if awacs and awacs:IsAlive() then
alive = true
end
end
return alive
end
--- [Internal] Function to determine state of the advanced mode
-- @param #MANTIS self
@@ -1255,6 +1343,10 @@ do
-- DEBUG
set = self:_PreFilterHeight(height)
end
--self.friendlyset -- Core.Set#SET_GROUP
if self.checkforfriendlies == true and self.friendlyset == nil then
self.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):FilterStart()
end
for _,_coord in pairs (set) do
local coord = _coord -- get current coord to check
-- output for cross-check
@@ -1269,18 +1361,27 @@ do
zonecheck = self:_CheckCoordinateInZones(coord)
end
if self.verbose and self.debug then
local dectstring = coord:ToStringLLDMS()
local samstring = samcoordinate:ToStringLLDMS()
--local dectstring = coord:ToStringLLDMS()
local samstring = samcoordinate:ToStringMGRS({MGRS_Accuracy=0})
samstring = string.gsub(samstring,"%s","")
local inrange = "false"
if targetdistance <= rad then
inrange = "true"
end
local text = string.format("Checking SAM at %s | Targetdist %d | Rad %d | Inrange %s", samstring, targetdistance, rad, inrange)
local text = string.format("Checking SAM at %s | Tgtdist %.1fkm | Rad %.1fkm | Inrange %s", samstring, targetdistance/1000, rad/1000, inrange)
local m = MESSAGE:New(text,10,"Check"):ToAllIf(self.debug)
self:T(self.lid..text)
end
-- friendlies around?
local nofriendlies = true
if self.checkforfriendlies == true then
local closestfriend, distance = self.friendlyset:GetClosestGroup(samcoordinate)
if closestfriend and distance and distance < rad then
nofriendlies = false
end
end
-- end output to cross-check
if targetdistance <= rad and zonecheck then
if targetdistance <= rad and zonecheck == true and nofriendlies == true then
return true, targetdistance
end
end
@@ -1375,7 +1476,7 @@ do
-- @return #string type Long, medium or short range
-- @return #number blind "blind" spot
function MANTIS:_GetSAMDataFromUnits(grpname,mod,sma,chm)
self:T(self.lid.."_GetSAMRangeFromUnits")
self:T(self.lid.."_GetSAMDataFromUnits")
local found = false
local range = self.checkradius
local height = 3000
@@ -1414,6 +1515,17 @@ do
end
if found then break end
end
--- AAA or Point Defense
if not found then
local grp = GROUP:FindByName(grpname)
if (grp and grp:IsAlive() and grp:IsAAA()) or string.find(grpname,"AAA",1,true) then
range = 2000
height = 2000
blind = 50
type = MANTIS.SamType.POINT
found = true
end
end
if not found then
self:E(self.lid .. string.format("*****Could not match radar data for %s! Will default to midrange values!",grpname))
end
@@ -1428,7 +1540,7 @@ do
-- @return #string type Long, medium or short range
-- @return #number blind "blind" spot
function MANTIS:_GetSAMRange(grpname)
self:T(self.lid.."_GetSAMRange")
self:T(self.lid.."_GetSAMRange for "..tostring(grpname))
local range = self.checkradius
local height = 3000
local type = MANTIS.SamType.MEDIUM
@@ -1445,9 +1557,9 @@ do
elseif string.find(grpname,"CHM",1,true) then
CHMod = true
end
if self.automode then
--if self.automode then
for idx,entry in pairs(self.SamData) do
--self:I("ID = " .. idx)
self:T2("ID = " .. idx)
if string.find(grpname,idx,1,true) then
local _entry = entry -- #MANTIS.SamData
type = _entry.Type
@@ -1455,18 +1567,32 @@ do
range = _entry.Range * 1000 * radiusscale -- max firing range
height = _entry.Height * 1000 -- max firing height
blind = _entry.Blindspot
--self:I("Matching Groupname = " .. grpname .. " Range= " .. range)
self:T("Matching Groupname = " .. grpname .. " Range= " .. range)
found = true
break
end
end
--end
--- Secondary - AAA or Point Defense
if not found then
local grp = GROUP:FindByName(grpname)
if (grp and grp:IsAlive() and grp:IsAAA()) or string.find(grpname,"AAA",1,true) then
range = 2000
height = 2000
blind = 50
type = MANTIS.SamType.POINT
found = true
end
end
-- secondary filter if not found
if (not found and self.automode) or HDSmod or SMAMod or CHMod then
--- Tertiary filter if not found
if (not found) or HDSmod or SMAMod or CHMod then
range, height, type = self:_GetSAMDataFromUnits(grpname,HDSmod,SMAMod,CHMod)
elseif not found then
self:E(self.lid .. string.format("*****Could not match radar data for %s! Will default to midrange values!",grpname))
end
if found and string.find(grpname,"SHORAD",1,true) then
type = MANTIS.SamType.POINT -- force short on match
end
return range, height, type, blind
end
@@ -1484,6 +1610,7 @@ do
local SAM_Tbl_lg = {} -- table of long range SAM defense zones
local SAM_Tbl_md = {} -- table of mid range SAM defense zones
local SAM_Tbl_sh = {} -- table of short range SAM defense zones
local SAM_Tbl_pt = {} -- table of point defense/AAA
local SEAD_Grps = {} -- table of SAM names to make evasive
local engagerange = self.engagerange -- firing range in % of max
--cycle through groups and set alarm state etc
@@ -1502,23 +1629,27 @@ do
local grpname = group:GetName()
local grpcoord = group:GetCoordinate()
local grprange,grpheight,type,blind = self:_GetSAMRange(grpname)
table.insert( SAM_Tbl, {grpname, grpcoord, grprange, grpheight, blind})
table.insert( SAM_Tbl, {grpname, grpcoord, grprange, grpheight, blind, type})
--table.insert( SEAD_Grps, grpname )
if type == MANTIS.SamType.LONG then
table.insert( SAM_Tbl_lg, {grpname, grpcoord, grprange, grpheight, blind})
table.insert( SAM_Tbl_lg, {grpname, grpcoord, grprange, grpheight, blind, type})
table.insert( SEAD_Grps, grpname )
--self:T("SAM "..grpname.." is type LONG")
self:T("SAM "..grpname.." is type LONG")
elseif type == MANTIS.SamType.MEDIUM then
table.insert( SAM_Tbl_md, {grpname, grpcoord, grprange, grpheight, blind})
table.insert( SAM_Tbl_md, {grpname, grpcoord, grprange, grpheight, blind, type})
table.insert( SEAD_Grps, grpname )
--self:T("SAM "..grpname.." is type MEDIUM")
self:T("SAM "..grpname.." is type MEDIUM")
elseif type == MANTIS.SamType.SHORT then
table.insert( SAM_Tbl_sh, {grpname, grpcoord, grprange, grpheight, blind})
--self:T("SAM "..grpname.." is type SHORT")
table.insert( SAM_Tbl_sh, {grpname, grpcoord, grprange, grpheight, blind, type})
table.insert( SEAD_Grps, grpname )
self:T("SAM "..grpname.." is type SHORT")
elseif type == MANTIS.SamType.POINT then
table.insert( SAM_Tbl_pt, {grpname, grpcoord, grprange, grpheight, blind, type})
self:T("SAM "..grpname.." is type POINT")
self.ShoradGroupSet:Add(grpname,group)
if not self.autoshorad then
table.insert( SEAD_Grps, grpname )
end
end
end
self.SamStateTracker[grpname] = "GREEN"
end
@@ -1527,6 +1658,7 @@ do
self.SAM_Table_Long = SAM_Tbl_lg
self.SAM_Table_Medium = SAM_Tbl_md
self.SAM_Table_Short = SAM_Tbl_sh
self.SAM_Table_PointDef = SAM_Tbl_pt
-- make SAMs evasive
local mysead = SEAD:New( SEAD_Grps, self.Padding ) -- Functional.Sead#SEAD
mysead:SetEngagementRange(engagerange)
@@ -1550,7 +1682,8 @@ do
local SAM_Tbl = {} -- table of SAM defense zones
local SAM_Tbl_lg = {} -- table of long range SAM defense zones
local SAM_Tbl_md = {} -- table of mid range SAM defense zones
local SAM_Tbl_sh = {} -- table of short range SAM defense zon
local SAM_Tbl_sh = {} -- table of short range SAM defense zones
local SAM_Tbl_pt = {} -- table of point defense/AAA
local SEAD_Grps = {} -- table of SAM names to make evasive
local engagerange = self.engagerange -- firing range in % of max
--cycle through groups and set alarm state etc
@@ -1561,17 +1694,21 @@ do
local grpname = group:GetName()
local grpcoord = group:GetCoordinate()
local grprange, grpheight,type,blind = self:_GetSAMRange(grpname)
table.insert( SAM_Tbl, {grpname, grpcoord, grprange, grpheight, blind}) -- make the table lighter, as I don't really use the zone here
local radaralive = group:IsSAM()
table.insert( SAM_Tbl, {grpname, grpcoord, grprange, grpheight, blind, type}) -- make the table lighter, as I don't really use the zone here
table.insert( SEAD_Grps, grpname )
if type == MANTIS.SamType.LONG then
table.insert( SAM_Tbl_lg, {grpname, grpcoord, grprange, grpheight, blind})
--self:I({grpname,grprange, grpheight})
elseif type == MANTIS.SamType.MEDIUM then
table.insert( SAM_Tbl_md, {grpname, grpcoord, grprange, grpheight, blind})
--self:I({grpname,grprange, grpheight})
elseif type == MANTIS.SamType.SHORT then
table.insert( SAM_Tbl_sh, {grpname, grpcoord, grprange, grpheight, blind})
-- self:I({grpname,grprange, grpheight})
if type == MANTIS.SamType.LONG and radaralive then
table.insert( SAM_Tbl_lg, {grpname, grpcoord, grprange, grpheight, blind, type})
self:T({grpname,grprange, grpheight})
elseif type == MANTIS.SamType.MEDIUM and radaralive then
table.insert( SAM_Tbl_md, {grpname, grpcoord, grprange, grpheight, blind, type})
self:T({grpname,grprange, grpheight})
elseif type == MANTIS.SamType.SHORT and radaralive then
table.insert( SAM_Tbl_sh, {grpname, grpcoord, grprange, grpheight, blind, type})
self:T({grpname,grprange, grpheight})
elseif type == MANTIS.SamType.POINT or (not radaralive) then
table.insert( SAM_Tbl_pt, {grpname, grpcoord, grprange, grpheight, blind, type})
self:T({grpname,grprange, grpheight})
self.ShoradGroupSet:Add(grpname,group)
if self.autoshorad then
self.Shorad.Groupset = self.ShoradGroupSet
@@ -1583,6 +1720,7 @@ do
self.SAM_Table_Long = SAM_Tbl_lg
self.SAM_Table_Medium = SAM_Tbl_md
self.SAM_Table_Short = SAM_Tbl_sh
self.SAM_Table_PointDef = SAM_Tbl_pt
-- make SAMs evasive
if self.mysead ~= nil then
local mysead = self.mysead
@@ -1626,20 +1764,33 @@ do
-- @param #table detset Table of COORDINATES
-- @param #boolean dlink Using DLINK
-- @param #number limit of SAM sites to go active on a contact
-- @return #MANTIS self
-- @return #number instatusred
-- @return #number instatusgreen
-- @return #number activeshorads
function MANTIS:_CheckLoop(samset,detset,dlink,limit)
self:T(self.lid .. "CheckLoop " .. #detset .. " Coordinates")
local switchedon = 0
local instatusred = 0
local instatusgreen = 0
local activeshorads = 0
local SEADactive = 0
for _,_data in pairs (samset) do
local samcoordinate = _data[2]
local name = _data[1]
local radius = _data[3]
local height = _data[4]
local blind = _data[5] * 1.25 + 1
local shortsam = (_data[6] == MANTIS.SamType.SHORT) and true or false
if not shortsam then
shortsam = (_data[6] == MANTIS.SamType.POINT) and true or false
end
local samgroup = GROUP:FindByName(name)
local IsInZone, Distance = self:_CheckObjectInZone(detset, samcoordinate, radius, height, dlink)
local suppressed = self.SuppressedGroups[name] or false
local activeshorad = self.Shorad.ActiveGroups[name] or false
local activeshorad = false
if self.Shorad and self.Shorad.ActiveGroups and self.Shorad.ActiveGroups[name] then
activeshorad = true
end
if IsInZone and not suppressed and not activeshorad then --check any target in zone and not currently managed by SEAD
if samgroup:IsAlive() then
-- switch on SAM
@@ -1652,12 +1803,23 @@ do
elseif (not self.UseEmOnOff) and switchedon < limit then
samgroup:OptionAlarmStateRed()
switchedon = switchedon + 1
switch = true
switch = true
end
if self.SamStateTracker[name] ~= "RED" and switch then
self:__RedState(1,samgroup)
self.SamStateTracker[name] = "RED"
end
-- TODO doesn't work
if shortsam == true and self.SmokeDecoy == true then
self:T("Smoking")
local units = samgroup:GetUnits() or {}
local smoke = self.SmokeDecoyColor or SMOKECOLOR.White
for _,unit in pairs(units) do
if unit and unit:IsAlive() then
unit:GetCoordinate():Smoke(smoke)
end
end
end
-- link in to SHORAD if available
-- DONE: Test integration fully
if self.ShoradLink and (Distance < self.ShoradActDistance or Distance < blind ) then -- don't give SHORAD position away too early
@@ -1670,7 +1832,7 @@ do
-- debug output
if (self.debug or self.verbose) and switch then
local text = string.format("SAM %s in alarm state RED!", name)
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(self.lid..text) end
end
end --end alive
@@ -1688,13 +1850,27 @@ do
end
if self.debug or self.verbose then
local text = string.format("SAM %s in alarm state GREEN!", name)
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(self.lid..text) end
end
end --end alive
end --end check
end --for for loop
return self
end --end check
end --for loop
if self.debug or self.verbose then
for _,_status in pairs(self.SamStateTracker) do
if _status == "GREEN" then
instatusgreen=instatusgreen+1
elseif _status == "RED" then
instatusred=instatusred+1
end
end
if self.Shorad then
for _,_name in pairs(self.Shorad.ActiveGroups or {}) do
activeshorads=activeshorads+1
end
end
end
return instatusred, instatusgreen, activeshorads
end
--- [Internal] Check detection function
@@ -1707,22 +1883,38 @@ do
--get detected set
local detset = detection:GetDetectedItemCoordinates()
--self:T("Check:", {detset})
-- randomly update SAM Table
local rand = math.random(1,100)
if rand > 65 then -- 1/3 of cases
-- update SAM Table evey 3 runs
if self.checkcounter%3 == 0 then
self:_RefreshSAMTable()
end
self.checkcounter = self.checkcounter + 1
local instatusred = 0
local instatusgreen = 0
local activeshorads = 0
-- switch SAMs on/off if (n)one of the detected groups is inside their reach
if self.automode then
local samset = self.SAM_Table_Long -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
self:_CheckLoop(samset,detset,dlink,self.maxlongrange)
local instatusredl, instatusgreenl, activeshoradsl = self:_CheckLoop(samset,detset,dlink,self.maxlongrange)
local samset = self.SAM_Table_Medium -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
self:_CheckLoop(samset,detset,dlink,self.maxmidrange)
local instatusredm, instatusgreenm, activeshoradsm = self:_CheckLoop(samset,detset,dlink,self.maxmidrange)
local samset = self.SAM_Table_Short -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
self:_CheckLoop(samset,detset,dlink,self.maxshortrange)
local instatusreds, instatusgreens, activeshoradss = self:_CheckLoop(samset,detset,dlink,self.maxshortrange)
local samset = self.SAM_Table_PointDef -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
instatusred, instatusgreen, activeshorads = self:_CheckLoop(samset,detset,dlink,self.maxpointdefrange)
else
local samset = self:_GetSAMTable() -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
self:_CheckLoop(samset,detset,dlink,self.maxclassic)
instatusred, instatusgreen, activeshorads = self:_CheckLoop(samset,detset,dlink,self.maxclassic)
end
if self.debug or self.verbose then
local statusreport = REPORT:New("\nMANTIS Status "..self.name)
statusreport:Add("+-----------------------------+")
statusreport:Add(string.format("+ SAM in RED State: %2d",instatusred))
statusreport:Add(string.format("+ SAM in GREEN State: %2d",instatusgreen))
if self.Shorad then
statusreport:Add(string.format("+ SHORAD active: %2d",activeshorads))
end
statusreport:Add("+-----------------------------+")
MESSAGE:New(statusreport:Text(),10):ToAll():ToLog()
end
return self
end
@@ -1807,7 +1999,7 @@ do
end
--]]
if self.autoshorad then
self.Shorad = SHORAD:New(self.name.."-SHORAD",self.name.."-SHORAD",self.SAM_Group,self.ShoradActDistance,self.ShoradTime,self.coalition,self.UseEmOnOff)
self.Shorad = SHORAD:New(self.name.."-SHORAD","SHORAD",self.SAM_Group,self.ShoradActDistance,self.ShoradTime,self.coalition,self.UseEmOnOff)
self.Shorad:SetDefenseLimits(80,95)
self.ShoradLink = true
self.Shorad.Groupset=self.ShoradGroupSet
@@ -1832,12 +2024,34 @@ do
if not self.state2flag then
self:_Check(self.Detection,self.DLink)
end
--[[ check Awacs
if self.advAwacs and not self.state2flag then
self:_Check(self.AWACS_Detection,false)
local EWRAlive = self:_CheckAnyEWRAlive()
local function FindSAMSRTR()
for i=1,1000 do
local randomsam = self.SAM_Group:GetRandom()
if randomsam and randomsam:IsAlive() then
if randomsam:IsSAM() then return randomsam end
end
end
end
-- Switch on a random SR/TR if no EWR left over
if not EWRAlive then
local randomsam = FindSAMSRTR() -- Wrapper.Group#GROUP
if randomsam and randomsam:IsAlive() then
if self.UseEmOnOff then
randomsam:EnableEmission(true)
else
randomsam:OptionAlarmStateRed()
end
local name = randomsam:GetName()
if self.SamStateTracker[name] ~= "RED" then
self:__RedState(1,randomsam)
self.SamStateTracker[name] = "RED"
end
end
end
--]]
-- relocate HQ and EWR
if self.autorelocate then
@@ -1847,8 +2061,6 @@ do
local halfintv = math.floor(timepassed / relointerval)
--self:T({timepassed=timepassed, halfintv=halfintv})
if halfintv >= 1 then
self.TimeStamp = timer.getAbsTime()
self:_Relocate()
@@ -1977,7 +2189,7 @@ do
local Shorad = self.Shorad
local radius = self.checkradius
local ontime = self.ShoradTime
Shorad:WakeUpShorad(Name, radius, ontime)
Shorad:WakeUpShorad(Name, radius, ontime, nil, true)
self:__ShoradActivated(1,Name, radius, ontime)
end
return self

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@
--
-- ### Authors: **applevangelist**, **FlightControl**
--
-- Last Update: Dec 2023
-- Last Update: Dec 2024
--
-- ===
--
@@ -28,6 +28,16 @@
---
-- @type SEAD
-- @field #string ClassName The Class Name.
-- @field #table TargetSkill Table of target skills.
-- @field #table SEADGroupPrefixes Table of SEAD prefixes.
-- @field #table SuppressedGroups Table of currently suppressed groups.
-- @field #number EngagementRange Engagement Range.
-- @field #number Padding Padding in seconds.
-- @field #function CallBack Callback function for suppression plans.
-- @field #boolean UseCallBack Switch for callback function to be used.
-- @field #boolean debug Debug switch.
-- @field #boolen WeaponTrack Track switch, if true track weapon speed for 30 secs.
-- @extends Core.Base#BASE
--- Make SAM sites execute evasive and defensive behaviour when being fired upon.
@@ -56,10 +66,11 @@ SEAD = {
SEADGroupPrefixes = {},
SuppressedGroups = {},
EngagementRange = 75, -- default 75% engagement range Feature Request #1355
Padding = 10,
Padding = 15,
CallBack = nil,
UseCallBack = false,
debug = false,
WeaponTrack = false,
}
--- Missile enumerators
@@ -69,6 +80,7 @@ SEAD = {
["AGM_122"] = "AGM_122",
["AGM_84"] = "AGM_84",
["AGM_45"] = "AGM_45",
["AGM_65"] = "AGM_65",
["ALARM"] = "ALARM",
["LD-10"] = "LD-10",
["X_58"] = "X_58",
@@ -88,6 +100,7 @@ SEAD = {
-- km and mach
["AGM_88"] = { 150, 3},
["AGM_45"] = { 12, 2},
["AGM_65"] = { 16, 0.9},
["AGM_122"] = { 16.5, 2.3},
["AGM_84"] = { 280, 0.8},
["ALARM"] = { 45, 2},
@@ -144,7 +157,7 @@ function SEAD:New( SEADGroupPrefixes, Padding )
self:AddTransition("*", "ManageEvasion", "*")
self:AddTransition("*", "CalculateHitZone", "*")
self:I("*** SEAD - Started Version 0.4.6")
self:I("*** SEAD - Started Version 0.4.9")
return self
end
@@ -371,7 +384,7 @@ function SEAD:onafterManageEvasion(From,Event,To,_targetskill,_targetgroup,SEADP
reach = wpndata[1] * 1.1
local mach = wpndata[2]
wpnspeed = math.floor(mach * 340.29)
if Weapon then
if Weapon and Weapon:GetSpeed() > 0 then
wpnspeed = Weapon:GetSpeed()
self:T(string.format("*** SEAD - Weapon Speed from WEAPON: %f m/s",wpnspeed))
end
@@ -452,29 +465,38 @@ end
-- @return #SEAD self
function SEAD:HandleEventShot( EventData )
self:T( { EventData.id } )
local SEADPlane = EventData.IniUnit -- Wrapper.Unit#UNIT
local SEADGroup = EventData.IniGroup -- Wrapper.Group#GROUP
local SEADPlanePos = SEADPlane:GetCoordinate() -- Core.Point#COORDINATE
local SEADUnit = EventData.IniDCSUnit
local SEADUnitName = EventData.IniDCSUnitName
local SEADWeapon = EventData.Weapon -- Identify the weapon fired
local SEADWeaponName = EventData.WeaponName -- return weapon type
local WeaponWrapper = WEAPON:New(EventData.Weapon)
--local SEADWeaponSpeed = WeaponWrapper:GetSpeed() -- mps
self:T( "*** SEAD - Missile Launched = " .. SEADWeaponName)
--self:T({ SEADWeapon })
local SEADWeapon = EventData.Weapon -- Identify the weapon fired
local SEADWeaponName = EventData.WeaponName or "None" -- return weapon type
if self:_CheckHarms(SEADWeaponName) then
--UTILS.PrintTableToLog(EventData)
local SEADPlane = EventData.IniUnit -- Wrapper.Unit#UNIT
if not SEADPlane then return self end -- case IniUnit is empty
local SEADGroup = EventData.IniGroup -- Wrapper.Group#GROUP
local SEADPlanePos = SEADPlane:GetCoordinate() -- Core.Point#COORDINATE
local SEADUnit = EventData.IniDCSUnit
local SEADUnitName = EventData.IniDCSUnitName
local WeaponWrapper = WEAPON:New(EventData.Weapon) -- Wrapper.Weapon#WEAPON
self:T( "*** SEAD - Missile Launched = " .. SEADWeaponName)
self:T( '*** SEAD - Weapon Match' )
if self.WeaponTrack == true then
WeaponWrapper:SetFuncTrack(function(weapon) env.info(string.format("*** Weapon Speed: %d m/s",weapon:GetSpeed() or -1)) end)
WeaponWrapper:StartTrack(0.1)
WeaponWrapper:StopTrack(30)
end
local _targetskill = "Random"
local _targetgroupname = "none"
local _target = EventData.Weapon:getTarget() -- Identify target
if not _target or self.debug then -- AGM-88 or 154 w/o target data
self:E("***** SEAD - No target data for " .. (SEADWeaponName or "None"))
if string.find(SEADWeaponName,"AGM_88",1,true) or string.find(SEADWeaponName,"AGM_154",1,true) then
self:I("**** Tracking AGM-88/154 with no target data.")
self:T("**** Tracking AGM-88/154 with no target data.")
local pos0 = SEADPlane:GetCoordinate()
local fheight = SEADPlane:GetHeight()
self:__CalculateHitZone(20,SEADWeapon,pos0,fheight,SEADGroup,SEADWeaponName)
@@ -520,7 +542,7 @@ function SEAD:HandleEventShot( EventData )
end
if SEADGroupFound == true then -- yes we are being attacked
if string.find(SEADWeaponName,"ADM_141",1,true) then
self:__ManageEvasion(2,_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,0,WeaponWrapper)
self:__ManageEvasion(2,_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,2,WeaponWrapper)
else
self:ManageEvasion(_targetskill,_targetgroup,SEADPlanePos,SEADWeaponName,SEADGroup,0,WeaponWrapper)
end

View File

@@ -21,7 +21,7 @@
-- @image Functional.Shorad.jpg
--
-- Date: Nov 2021
-- Last Update: Nov 2023
-- Last Update: Jan 2025
-------------------------------------------------------------------------
--- **SHORAD** class, extends Core.Base#BASE
@@ -113,7 +113,7 @@ SHORAD = {
SkateNumber = 3,
SkateZones = nil,
minscootdist = 100,
minscootdist = 3000,
maxscootdist = 3000,
scootrandomcoord = false,
}
@@ -443,7 +443,9 @@ do
for _,_groups in pairs (shoradset) do
local groupname = _groups:GetName()
if string.find(groupname, tgtgrp, 1, true) then
returnname = true
if _groups:IsSAM() then
returnname = true
end
end
end
return returnname
@@ -470,6 +472,7 @@ do
-- @param #number Radius Radius of the #ZONE
-- @param #number ActiveTimer Number of seconds to stay active
-- @param #number TargetCat (optional) Category, i.e. Object.Category.UNIT or Object.Category.STATIC
-- @param #boolean ShotAt If true, function is called after a shot
-- @return #SHORAD self
-- @usage Use this function to integrate with other systems, example
--
@@ -479,7 +482,7 @@ do
-- mymantis = MANTIS:New("BlueMantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
-- mymantis:AddShorad(myshorad,720)
-- mymantis:Start()
function SHORAD:onafterWakeUpShorad(From, Event, To, TargetGroup, Radius, ActiveTimer, TargetCat)
function SHORAD:onafterWakeUpShorad(From, Event, To, TargetGroup, Radius, ActiveTimer, TargetCat, ShotAt)
self:T(self.lid .. " WakeUpShorad")
self:T({TargetGroup, Radius, ActiveTimer, TargetCat})
local targetcat = TargetCat or Object.Category.UNIT
@@ -521,7 +524,27 @@ do
-- go through set and find the one(s) to activate
local TDiff = 4
for _,_group in pairs (shoradset) do
if _group:IsAnyInZone(targetzone) then
local groupname = _group:GetName()
if groupname == TargetGroup and ShotAt==true then
-- Shot at a SHORAD group
if self.UseEmOnOff then
_group:EnableEmission(false)
end
_group:OptionAlarmStateGreen()
self.ActiveGroups[groupname] = nil
local text = string.format("Shot at SHORAD %s! Evading!", _group:GetName())
self:T(text)
local m = MESSAGE:New(text,10,"SHORAD"):ToAllIf(self.debug)
--Shoot and Scoot
if self.shootandscoot then
self:__ShootAndScoot(1,_group)
end
elseif _group:IsAnyInZone(targetzone) or groupname == TargetGroup then
-- shot at a group we protect
local text = string.format("Waking up SHORAD %s", _group:GetName())
self:T(text)
local m = MESSAGE:New(text,10,"SHORAD"):ToAllIf(self.debug)
@@ -529,7 +552,6 @@ do
_group:EnableEmission(true)
end
_group:OptionAlarmStateRed()
local groupname = _group:GetName()
if self.ActiveGroups[groupname] == nil then -- no timer yet for this group
self.ActiveGroups[groupname] = { Timing = ActiveTimer }
local endtime = timer.getTime() + (ActiveTimer * math.random(75,100) / 100 ) -- randomize wakeup a bit
@@ -607,7 +629,7 @@ do
_targetgroupname = tgtgrp:GetName() -- group name
_targetskill = tgtgrp:GetUnit(1):GetSkill()
self:T("*** Found Target = ".. _targetgroupname)
self:WakeUpShorad(_targetgroupname, self.Radius, self.ActiveTimer, Object.Category.UNIT)
self:WakeUpShorad(_targetgroupname, self.Radius, self.ActiveTimer, Object.Category.UNIT,true)
end
end
end
@@ -736,7 +758,7 @@ do
-- if being shot at, find closest SHORADs to activate
if shotatsams or shotatus then
self:T({shotatsams=shotatsams,shotatus=shotatus})
self:WakeUpShorad(targetgroupname, self.Radius, self.ActiveTimer, targetcat)
self:WakeUpShorad(targetgroupname, self.Radius, self.ActiveTimer, targetcat, true)
end
end
end

View File

@@ -15,6 +15,7 @@
--
-- @module Functional.Stratego
-- @image Functional.Stratego.png
-- Last Update May 2024
---
@@ -41,7 +42,9 @@
-- @field #boolean usebudget
-- @field #number CaptureUnits
-- @field #number CaptureThreatlevel
-- @field #table CaptureObjectCategories
-- @field #boolean ExcludeShips
-- @field Core.Zone#ZONE StrategoZone
-- @extends Core.Base#BASE
-- @extends Core.Fsm#FSM
@@ -154,6 +157,7 @@
-- @{#STRATEGO.FindRoute}(): Find a route between two nodes.
-- @{#STRATEGO.SetCaptureOptions}(): Set how many units of which minimum threat level are needed to capture one node (i.e. the underlying OpsZone).
-- @{#STRATEGO.SetDebug}(): Set debug and draw options.
-- @{#STRATEGO.SetStrategoZone}(): Set a zone to restrict STRATEGO analytics to, can be any kind of ZONE Object.
--
--
-- ## Visualisation example code for the Syria map:
@@ -177,7 +181,7 @@ STRATEGO = {
debug = false,
drawzone = false,
markzone = false,
version = "0.2.5",
version = "0.3.1",
portweight = 3,
POIweight = 1,
maxrunways = 3,
@@ -196,6 +200,7 @@ STRATEGO = {
usebudget = false,
CaptureUnits = 3,
CaptureThreatlevel = 1,
CaptureObjectCategories = {Object.Category.UNIT},
ExcludeShips = true,
}
@@ -207,9 +212,10 @@ STRATEGO = {
-- @field #number coalition
-- @field #boolean port
-- @field Core.Zone#ZONE_RADIUS zone,
-- @field Core.Point#COORDINATRE coord
-- @field Core.Point#COORDINATE coord
-- @field #string type
-- @field Ops.OpsZone#OPSZONE opszone
-- @field #number connections
---
-- @type STRATEGO.DistData
@@ -377,6 +383,15 @@ function STRATEGO:SetDebug(Debug,DrawZones,MarkZones)
return self
end
--- [USER] Restrict Stratego to analyse this zone only.
-- @param #STRATEGO self
-- @param Core.Zone#ZONE Zone The Zone to restrict Stratego to, can be any kind of ZONE Object.
-- @return #STRATEGO self
function STRATEGO:SetStrategoZone(Zone)
self.StrategoZone = Zone
return self
end
--- [USER] Set weights for nodes and routes to determine their importance.
-- @param #STRATEGO self
-- @param #number MaxRunways Set the maximum number of runways the big (equals strategic) airbases on the map have. Defaults to 3. The weight of an airbase node hence equals the number of runways.
@@ -407,11 +422,13 @@ end
-- @param #STRATEGO self
-- @param #number CaptureUnits Number of units needed, defaults to three.
-- @param #number CaptureThreatlevel Threat level needed, can be 0..10, defaults to one.
-- @param #table CaptureCategories Table of object categories which can capture a node, defaults to `{Object.Category.UNIT}`.
-- @return #STRATEGO self
function STRATEGO:SetCaptureOptions(CaptureUnits,CaptureThreatlevel)
function STRATEGO:SetCaptureOptions(CaptureUnits,CaptureThreatlevel,CaptureCategories)
self:T(self.lid.."SetCaptureOptions")
self.CaptureUnits = CaptureUnits or 3
self.CaptureThreatlevel = CaptureThreatlevel or 1
self.CaptureObjectCategories = CaptureCategories or {Object.Category.UNIT}
return self
end
@@ -425,12 +442,19 @@ function STRATEGO:AnalyseBases()
local airbasetable = self.airbasetable
local nonconnectedab = self.nonconnectedab
local easynames = self.easynames
local zone = self.StrategoZone -- Core.Zone#ZONE_POLYGON
-- find bases with >= 1 runways
self.bases:ForEach(
function(afb)
local ab = afb -- Wrapper.Airbase#AIRBASE
local abvec2 = ab:GetVec2()
if self.ExcludeShips and ab:IsShip() then return end
if zone ~= nil then
if not zone:IsVec2InZone(abvec2) then
return
end
end
local abname = ab:GetName()
local runways = ab:GetRunways()
local numrwys = #runways
@@ -467,6 +491,7 @@ function STRATEGO:AnalyseBases()
coord = coord,
type = abtype,
opszone = opszone,
connections = 0,
}
airbasetable[abname] = tbl
nonconnectedab[abname] = true
@@ -507,6 +532,7 @@ function STRATEGO:GetNewOpsZone(Zone,Coalition)
local opszone = OPSZONE:New(Zone,Coalition or 0)
opszone:SetCaptureNunits(self.CaptureUnits)
opszone:SetCaptureThreatlevel(self.CaptureThreatlevel)
opszone:SetObjectCategories(self.CaptureObjectCategories)
opszone:SetDrawZone(self.drawzone)
opszone:SetMarkZone(self.markzone)
opszone:Start()
@@ -552,10 +578,12 @@ function STRATEGO:AnalysePOIs(Set,Weight,Key)
coord = coord,
type = Key,
opszone = opszone,
connections = 0,
}
airbasetable[zone:GetName()] = tbl
nonconnectedab[zone:GetName()] = true
airbasetable[zname] = tbl
nonconnectedab[zname] = true
local name = string.gsub(zname,"[%p%s]",".")
--self:I({name=name,zone=zname})
easynames[name]=zname
end
)
@@ -566,7 +594,7 @@ end
-- @param #STRATEGO self
-- @return #STRATEGO self
function STRATEGO:GetToFrom(StartPoint,EndPoint)
self:T(self.lid.."GetToFrom")
self:T(self.lid.."GetToFrom "..tostring(StartPoint).." "..tostring(EndPoint))
local pstart = string.gsub(StartPoint,"[%p%s]",".")
local pend = string.gsub(EndPoint,"[%p%s]",".")
local fromto = pstart..";"..pend
@@ -574,11 +602,35 @@ function STRATEGO:GetToFrom(StartPoint,EndPoint)
return fromto, tofrom
end
--- [USER] Get available connecting nodes from one start node
-- @param #STRATEGO self
-- @param #string StartPoint The starting name
-- @return #boolean found
-- @return #table Nodes
function STRATEGO:GetRoutesFromNode(StartPoint)
self:T(self.lid.."GetRoutesFromNode")
local pstart = string.gsub(StartPoint,"[%p%s]",".")
local found = false
pstart=pstart..";"
local routes = {}
local listed = {}
for _,_data in pairs(self.routexists) do
if string.find(_data,pstart,1,true) and not listed[_data] then
local target = string.gsub(_data,pstart,"")
local fname = self.easynames[target]
table.insert(routes,fname)
found = true
listed[_data] = true
end
end
return found,routes
end
--- [USER] Manually add a route, for e.g. Island hopping or to connect isolated networks. Use **after** STRATEGO has been started!
-- @param #STRATEGO self
-- @param #string Startpoint Starting Point, e.g. AIRBASE.Syria.Hatay
-- @param #string Endpoint End Point, e.g. AIRBASE.Syria.H4
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Defaults to lila.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Defaults to violet.
-- @param #number Linetype (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 5.
-- @param #boolean Draw (Optional) If true, draw route on the F10 map. Defaukt false.
-- @return #STRATEGO self
@@ -606,6 +658,8 @@ function STRATEGO:AddRoutesManually(Startpoint,Endpoint,Color,Linetype,Draw)
local factor = self.airbasetable[Startpoint].baseweight*self.routefactor
self.airbasetable[Startpoint].weight = self.airbasetable[Startpoint].weight+factor
self.airbasetable[Endpoint].weight = self.airbasetable[Endpoint].weight+factor
self.airbasetable[Endpoint].connections = self.airbasetable[Endpoint].connections + 2
self.airbasetable[Startpoint].connections = self.airbasetable[Startpoint].connections+2
if self.debug or Draw then
startcoordinate:LineToAll(targetcoordinate,-1,color,1,linetype,nil,string.format("%dkm",dist))
end
@@ -624,7 +678,7 @@ function STRATEGO:AnalyseRoutes(tgtrwys,factor,color,linetype)
for _,_data in pairs(self.airbasetable) do
local fromto,tofrom = self:GetToFrom(startpoint,_data.name)
if _data.name == startpoint then
-- sam as we
-- same as we
elseif _data.baseweight == tgtrwys and not (self.routexists[fromto] or self.routexists[tofrom]) then
local tgtc = _data.coord
local dist = UTILS.Round(tgtc:Get2DDistance(startcoord),-2)/1000
@@ -646,6 +700,8 @@ function STRATEGO:AnalyseRoutes(tgtrwys,factor,color,linetype)
self.nonconnectedab[startpoint] = false
self.airbasetable[startpoint].weight = self.airbasetable[startpoint].weight+factor
self.airbasetable[_data.name].weight = self.airbasetable[_data.name].weight+factor
self.airbasetable[startpoint].connections = self.airbasetable[startpoint].connections + 1
self.airbasetable[_data.name].connections = self.airbasetable[_data.name].connections + 1
if self.debug then
startcoord:LineToAll(tgtc,-1,color,1,linetype,nil,string.format("%dkm",dist))
end
@@ -692,6 +748,8 @@ function STRATEGO:AnalyseUnconnected(Color)
end
self.airbasetable[startpoint].weight = self.airbasetable[startpoint].weight+1
self.airbasetable[closest].weight = self.airbasetable[closest].weight+1
self.airbasetable[startpoint].connections = self.airbasetable[startpoint].connections+2
self.airbasetable[closest].connections = self.airbasetable[closest].connections+2
local data = {
start = startpoint,
target = closest,
@@ -708,14 +766,50 @@ function STRATEGO:AnalyseUnconnected(Color)
return self
end
--[[
function STRATEGO:PruneDeadEnds(abtable)
local found = false
local newtable = {}
for name, _data in pairs(abtable) do
local data = _data -- #STRATEGO.Data
if data.connections > 2 then
newtable[name] = data
else
-- dead end
found = true
local neighbors, nearest, distance = self:FindNeighborNodes(name)
--self:I("Pruning "..name)
if nearest then
for _name,_ in pairs(neighbors) do
local abname = self.easynames[_name] or _name
--self:I({easyname=_name,airbasename=abname})
if abtable[abname] then
abtable[abname].connections = abtable[abname].connections -1
end
end
end
if self.debug then
data.coord:CircleToAll(5000,-1,{1,1,1},1,{1,1,1},1,3,true,"Dead End")
end
end
end
abtable = nil
return found,newtable
end
--]]
--- [USER] Get a list of the nodes with the highest weight.
-- @param #STRATEGO self
-- @param #number Coalition (Optional) Find for this coalition only. E.g. coalition.side.BLUE.
-- @return #table Table of nodes.
-- @return #number Weight The consolidated weight associated with the nodes.
-- @return #number Highest Highest weight found.
-- @return #string Name of the node with the highest weight.
function STRATEGO:GetHighestWeightNodes(Coalition)
self:T(self.lid.."GetHighestWeightNodes")
local weight = 0
local highest = 0
local highname = nil
local airbases = {}
for _name,_data in pairs(self.airbasetable) do
local okay = true
@@ -729,8 +823,12 @@ function STRATEGO:GetHighestWeightNodes(Coalition)
if not airbases[weight] then airbases[weight]={} end
table.insert(airbases[weight],_name)
end
if _data.weight > highest and okay then
highest = _data.weight
highname = _name
end
end
return airbases[weight],weight
return airbases[weight],weight,highest,highname
end
--- [USER] Get a list of the nodes a weight less than the given parameter.
@@ -759,9 +857,39 @@ function STRATEGO:GetNextHighestWeightNodes(Weight, Coalition)
return airbases[weight],weight
end
--- [USER] Set the aggregated weight of a single node found by its name manually.
-- @param #STRATEGO self
-- @param #string Name The name to look for.
-- @param #number Weight The weight to be set.
-- @return #boolean success
function STRATEGO:SetNodeWeight(Name,Weight)
self:T(self.lid.."SetNodeWeight")
if Name and Weight and self.airbasetable[Name] then
self.airbasetable[Name].weight = Weight or 0
return true
else
return false
end
end
--- [USER] Set the base weight of a single node found by its name manually.
-- @param #STRATEGO self
-- @param #string Name The name to look for.
-- @param #number Weight The weight to be set.
-- @return #boolean success
function STRATEGO:SetNodeBaseWeight(Name,Weight)
self:T(self.lid.."SetNodeBaseWeight")
if Name and Weight and self.airbasetable[Name] then
self.airbasetable[Name].baseweight = Weight or 0
return true
else
return false
end
end
--- [USER] Get the aggregated weight of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string Name The name to look for.
-- @return #number Weight The weight or 0 if not found.
function STRATEGO:GetNodeWeight(Name)
self:T(self.lid.."GetNodeWeight")
@@ -774,7 +902,7 @@ end
--- [USER] Get the base weight of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string Name The name to look for.
-- @return #number Weight The base weight or 0 if not found.
function STRATEGO:GetNodeBaseWeight(Name)
self:T(self.lid.."GetNodeBaseWeight")
@@ -787,7 +915,7 @@ end
--- [USER] Get the COALITION of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #number Coalition The coalition.
function STRATEGO:GetNodeCoalition(Name)
self:T(self.lid.."GetNodeCoalition")
@@ -800,7 +928,7 @@ end
--- [USER] Get the TYPE of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #string Type Type of the node, e.g. STRATEGO.Type.AIRBASE or nil if not found.
function STRATEGO:GetNodeType(Name)
self:T(self.lid.."GetNodeType")
@@ -813,7 +941,7 @@ end
--- [USER] Get the ZONE of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return Core.Zone#ZONE Zone The Zone of the node or nil if not found.
function STRATEGO:GetNodeZone(Name)
self:T(self.lid.."GetNodeZone")
@@ -826,7 +954,7 @@ end
--- [USER] Get the OPSZONE of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return Ops.OpsZone#OPSZONE OpsZone The OpsZone of the node or nil if not found.
function STRATEGO:GetNodeOpsZone(Name)
self:T(self.lid.."GetNodeOpsZone")
@@ -839,7 +967,7 @@ end
--- [USER] Get the COORDINATE of a node by its name.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return Core.Point#COORDINATE Coordinate The Coordinate of the node or nil if not found.
function STRATEGO:GetNodeCoordinate(Name)
self:T(self.lid.."GetNodeCoordinate")
@@ -852,7 +980,7 @@ end
--- [USER] Check if the TYPE of a node is AIRBASE.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #boolean Outcome
function STRATEGO:IsAirbase(Name)
self:T(self.lid.."IsAirbase")
@@ -865,7 +993,7 @@ end
--- [USER] Check if the TYPE of a node is PORT.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #boolean Outcome
function STRATEGO:IsPort(Name)
self:T(self.lid.."IsPort")
@@ -878,7 +1006,7 @@ end
--- [USER] Check if the TYPE of a node is POI.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #boolean Outcome
function STRATEGO:IsPOI(Name)
self:T(self.lid.."IsPOI")
@@ -891,7 +1019,7 @@ end
--- [USER] Check if the TYPE of a node is FARP.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #boolean Outcome
function STRATEGO:IsFARP(Name)
self:T(self.lid.."IsFARP")
@@ -904,7 +1032,7 @@ end
--- [USER] Check if the TYPE of a node is SHIP.
-- @param #STRATEGO self
-- @param #string Name.
-- @param #string The name to look for.
-- @return #boolean Outcome
function STRATEGO:IsShip(Name)
self:T(self.lid.."IsShip")
@@ -1087,35 +1215,67 @@ function STRATEGO:FindNeighborNodes(Name,Enemies,Friends)
self:T(self.lid.."FindNeighborNodes")
local neighbors = {}
local name = string.gsub(Name,"[%p%s]",".")
--self:I({Name=Name,name=name})
local shortestdist = 1000*1000
local nearest = nil
for _route,_data in pairs(self.disttable) do
if string.find(_route,name,1,true) then
local dist = self.disttable[_route] -- #STRATEGO.DistData
--self:I({route=_route,name=name})
local tname = string.gsub(_route,name,"")
local tname = string.gsub(tname,";","")
--self:I({tname=tname,cname=self.easynames[tname]})
local cname = self.easynames[tname] -- name of target
local encoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
if Enemies == true then
if self.airbasetable[cname].coalition == encoa then
neighbors[cname] = dist
if cname then
local encoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
if Enemies == true then
if self.airbasetable[cname].coalition == encoa then
neighbors[cname] = dist
end
elseif Friends == true then
if self.airbasetable[cname].coalition ~= encoa then
neighbors[cname] = dist
end
else
neighbors[cname] = dist
end
elseif Friends == true then
if self.airbasetable[cname].coalition ~= encoa then
neighbors[cname] = dist
if neighbors[cname] and dist.dist < shortestdist then
shortestdist = dist.dist
nearest = cname
end
else
neighbors[cname] = dist
end
if neighbors[cname] and dist.dist < shortestdist then
shortestdist = dist.dist
nearest = cname
end
end
end
return neighbors, nearest, shortestdist
end
--- [INTERNAL] Route Finding - Find the next hop towards an end node from a start node
-- @param #STRATEGO self
-- @param #string Start The name of the start node.
-- @param #string End The name of the end node.
-- @param #table InRoute Table of node names making up the route so far.
-- @return #string Name of the next closest node
function STRATEGO:_GetNextClosest(Start,End,InRoute)
local ecoord = self.airbasetable[End].coord
local nodes,nearest = self:FindNeighborNodes(Start)
--self:I(tostring(nearest))
local closest = nil
local closedist = 1000*1000
for _name,_dist in pairs(nodes) do
local kcoord = self.airbasetable[_name].coord
local nnodes = self.airbasetable[_name].connections > 2 and true or false
if _name == End then nnodes = true end
if kcoord ~= nil and ecoord ~= nil and nnodes == true and InRoute[_name] ~= true then
local dist = math.floor((kcoord:Get2DDistance(ecoord)/1000)+0.5)
if (dist < closedist ) then
closedist = dist
closest = _name
end
end
end
return closest
end
--- [USER] Find a route between two nodes.
-- @param #STRATEGO self
-- @param #string Start The name of the start node.
@@ -1124,15 +1284,19 @@ end
-- @param #boolean Draw If true, draw the route on the map.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Defaults to black.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 6.
-- @param #boolean NoOptimize If set to true, do not optimize (shorten) the resulting route if possible.
-- @return #table Route Table of #string name entries of the route
-- @return #boolean Complete If true, the route was found end-to-end.
function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType)
-- @return #boolean Reverse If true, the route was found with a reverse search, the route table will be from sorted from end point to start point.
function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType,NoOptimize)
self:T(self.lid.."FindRoute")
--self:I({Start,End,Hops})
--local bases = UTILS.DeepCopy(self.airbasetable)
local Route = {}
local Route = {}
local InRoute = {}
local hops = Hops or 4
local routecomplete = false
local reverse = false
local function Checker(neighbors)
for _name,_data in pairs(neighbors) do
@@ -1143,26 +1307,7 @@ function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType)
end
return nil
end
local function NextClosest(Start,End)
local ecoord = self.airbasetable[End].coord
local nodes = self:FindNeighborNodes(Start)
local closest = nil
local closedist = 1000*1000
for _name,_dist in pairs(nodes) do
local kcoord = self.airbasetable[_name].coord
local dist = math.floor((kcoord:Get2DDistance(ecoord)/1000)+0.5)
if dist < closedist then
closedist = dist
closest = _name
end
end
if closest then
--MESSAGE:New(string.format("Start %s | End %s | Nextclosest %s",Start,End,closest),10,"STRATEGO"):ToLog():ToAll()
return closest
end
end
local function DrawRoute(Route)
for i=1,#Route-1 do
local p1=Route[i]
@@ -1177,6 +1322,7 @@ function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType)
-- One hop
Route[#Route+1] = Start
InRoute[Start] = true
local nodes = self:FindNeighborNodes(Start)
local endpoint = Checker(nodes)
@@ -1186,9 +1332,11 @@ function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType)
else
local spoint = Start
for i=1,hops do
local Next = NextClosest(spoint,End)
if Next then
--self:I("Start="..tostring(spoint))
local Next = self:_GetNextClosest(spoint,End,InRoute)
if Next ~= nil then
Route[#Route+1] = Next
InRoute[Next] = true
local nodes = self:FindNeighborNodes(Next)
local endpoint = Checker(nodes)
if endpoint then
@@ -1198,11 +1346,59 @@ function STRATEGO:FindRoute(Start,End,Hops,Draw,Color,LineType)
else
spoint = Next
end
end
else
break
end
end
end
if (self.debug or Draw) then DrawRoute(Route) end
return Route, routecomplete
-- optimize route
local function OptimizeRoute(Route)
local foundcut = false
local largestcut = 0
local cut = {}
for i=1,#Route do
--self:I({Start=Route[i]})
local found,nodes = self:GetRoutesFromNode(Route[i])
for _,_name in pairs(nodes or {}) do
for j=i+2,#Route do
if _name == Route[j] then
--self:I({"Shortcut",Route[i],Route[j]})
if j-i > largestcut then
largestcut = j-i
cut = {i=i,j=j}
foundcut = true
end
end
end
end
end
if foundcut then
local newroute = {}
for i=1,#Route do
if i<= cut.i or i>=cut.j then
table.insert(newroute,Route[i])
end
end
return newroute
end
return Route, foundcut
end
if routecomplete == true and NoOptimize ~= true then
local foundcut = true
while foundcut ~= false do
Route, foundcut = OptimizeRoute(Route)
end
else
-- reverse search
Route, routecomplete = self:FindRoute(End,Start,Hops,Draw,Color,LineType)
reverse = true
end
if (self.debug or Draw) then DrawRoute(Route) end
return Route, routecomplete, reverse
end
--- [USER] Add budget points.
@@ -1309,6 +1505,139 @@ function STRATEGO:FindAffordableConsolidationTarget()
end
end
--- [INTERNAL] Internal helper function to check for islands, aka Floodtest
-- @param #STRATEGO self
-- @param #string next Name of the start node
-- @param #table filled #table of visited nodes
-- @param #table unfilled #table if unvisited nodes
-- @return #STRATEGO self
function STRATEGO:_FloodNext(next,filled,unfilled)
local start = self:FindNeighborNodes(next)
for _name,_ in pairs (start) do
if filled[_name] ~= true then
self:T("Flooding ".._name)
filled[_name] = true
unfilled[_name] = nil
self:_FloodNext(_name,filled,unfilled)
end
end
return self
end
--- [INTERNAL] Internal helper function to check for islands, aka Floodtest
-- @param #STRATEGO self
-- @param #string Start Name of the start node
-- @param #table ABTable (Optional) #table of node names to check.
-- @return #STRATEGO self
function STRATEGO:_FloodFill(Start,ABTable)
self:T("Start = "..tostring(Start))
if Start == nil then return end
local filled = {}
local unfilled = {}
if ABTable then
unfilled = ABTable
else
for _name,_ in pairs(self.airbasetable) do
unfilled[_name] = true
end
end
filled[Start] = true
unfilled[Start] = nil
local start = self:FindNeighborNodes(Start)
for _name,_ in pairs (start) do
if filled[_name] ~= true then
self:T("Flooding ".._name)
filled[_name] = true
unfilled[_name] = nil
self:_FloodNext(_name,filled,unfilled)
end
end
return filled, unfilled
end
--- [INTERNAL] Internal helper function to check for islands, aka Floodtest
-- @param #STRATEGO self
-- @param #boolen connect If true, connect the two resulting islands at the shortest distance if necessary
-- @param #boolen draw If true, draw outer vertices of found node networks
-- @return #boolean Connected If true, all nodes are in one network
-- @return #table Network #table of node names in the network
-- @return #table Unconnected #table of node names **not** in the network
function STRATEGO:_FloodTest(connect,draw)
local function GetElastic(bases)
local vec2table = {}
for _name,_ in pairs(bases) do
local coord = self.airbasetable[_name].coord
local vec2 = coord:GetVec2()
table.insert(vec2table,vec2)
end
local zone = ZONE_ELASTIC:New("STRATEGO-Floodtest-"..math.random(1,10000),vec2table)
return zone
end
local function DrawElastic(filled,drawit)
local zone = GetElastic(filled)
if drawit then
zone:SetColor({1,1,1},1)
zone:SetDrawCoalition(-1)
zone:Update(1,true) -- draw zone
end
return zone
end
local _,_,weight,name = self:GetHighestWeightNodes()
local filled, unfilled = self:_FloodFill(name)
local allin = true
if table.length(unfilled) > 0 then
MESSAGE:New("There is at least one node island!",15,"STRATEGO"):ToAllIf(self.debug):ToLog()
allin = false
if self.debug == true then
local zone1 = DrawElastic(filled,draw)
local zone2 = DrawElastic(unfilled,draw)
local vertices1 = zone1:GetVerticiesVec2()
local vertices2 = zone2:GetVerticiesVec2()
-- get closest vertices
local corner1 = nil
local corner2 = nil
local mindist = math.huge
local found = false
for _,_edge in pairs(vertices1) do
for _,_edge2 in pairs(vertices2) do
local dist=UTILS.VecDist2D(_edge,_edge2)
if dist < mindist then
mindist = dist
corner1 = _edge
corner2 = _edge2
found = true
end
end
end
if found then
local Corner = COORDINATE:NewFromVec2(corner1)
local Corner2 = COORDINATE:NewFromVec2(corner2)
Corner:LineToAll(Corner2,-1,{1,1,1},1,1,true,"Island2Island")
local cornername
local cornername2
for _name,_data in pairs(self.airbasetable) do
local zone = _data.zone
if zone:IsVec2InZone(corner1) then
cornername = _name
self:T("Corner1 = ".._name)
end
if zone:IsVec2InZone(corner2) then
cornername2 = _name
self:T("Corner2 = ".._name)
end
if cornername and cornername2 and connect == true then
self:AddRoutesManually(cornername,cornername2,Color,Linetype,self.debug)
end
end
end
end
end
return allin, filled, unfilled
end
---------------------------------------------------------------------------------------------------------------
--
-- End

View File

@@ -97,7 +97,7 @@
TIRESIAS = {
ClassName = "TIRESIAS",
debug = false,
version = "0.0.4",
version = "0.0.5",
Interval = 20,
GroundSet = nil,
VehicleSet = nil,
@@ -187,7 +187,7 @@ function TIRESIAS:SetAAARanges(FiringRange,SwitchAAA)
return self
end
--- [USER] Add a SET_GROUP of GROUP objects as exceptions. Can be done multiple times.
--- [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
@@ -203,7 +203,7 @@ function TIRESIAS:AddExceptionSet(Set)
}
exceptions:AddGroup(grp,true)
end
BASE:I("TIRESIAS: Added exception group: "..grp:GetName())
BASE:T("TIRESIAS: Added exception group: "..grp:GetName())
end
)
return self
@@ -288,7 +288,7 @@ function TIRESIAS:_InitGroups()
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias.invisible and grp.Tiresias.invisible == false then
if grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp.Tiresias.invisible = true
if SwitchAAA then
@@ -315,10 +315,11 @@ function TIRESIAS:_InitGroups()
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
if grp.Tiresias and grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp:SetAIOff()
grp.Tiresias.invisible = true
grp.Tiresias.AIOff = true
end
end
--BASE:I(string.format("Init/Switch off Vehicle %s (Exception %s)",grp:GetName(),tostring(grp.Tiresias.exception)))
@@ -336,7 +337,7 @@ function TIRESIAS:_InitGroups()
}
end
if grp.Tiresias and (not grp.Tiresias.exception == true) then
if grp.Tiresias and grp.Tiresias.invisible and grp.Tiresias.invisible == false then
if grp.Tiresias and grp.Tiresias.invisible == false then
grp:SetCommandInvisible(true)
grp.Tiresias.invisible = true
end
@@ -391,7 +392,9 @@ function TIRESIAS:_SwitchOnGroups(group,radius)
if ground:CountAlive() > 0 then
ground:ForEachGroupAlive(
function(grp)
if grp.Tiresias and grp.Tiresias.type and (not grp.Tiresias.exception == true ) then
local name = grp:GetName()
if grp:GetCoalition() ~= group:GetCoalition()
and 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
@@ -407,7 +410,7 @@ function TIRESIAS:_SwitchOnGroups(group,radius)
end
--BASE:I(string.format("TIRESIAS - Switch on %s %s (Exception %s)",tostring(grp.Tiresias.type),grp:GetName(),tostring(grp.Tiresias.exception)))
else
BASE:E("TIRESIAS - This group has not been initialized or is an exception!")
BASE:T("TIRESIAS - This group "..tostring(name).. " has not been initialized or is an exception!")
end
end
)

View File

@@ -6047,7 +6047,7 @@ function WAREHOUSE:_SpawnAssetAircraft(alias, asset, request, parking, uncontrol
else
if #parking<#template.units and not airstart then
if parking and #parking<#template.units and not airstart then
local text=string.format("ERROR: Not enough parking! Free parking = %d < %d aircraft to be spawned.", #parking, #template.units)
self:_DebugMessage(text)
return nil
@@ -6089,7 +6089,7 @@ function WAREHOUSE:_SpawnAssetAircraft(alias, asset, request, parking, uncontrol
terminal=parking[i].TerminalID
end
if self.Debug then
if self.Debug and terminal then
local text=string.format("Spawnplace unit %s terminal %d.", unit.name, terminal)
coord:MarkToAll(text)
env.info(text)
@@ -6732,7 +6732,7 @@ end
-- @param Wrapper.Group#GROUP deadgroup Group of unit that died.
-- @param #WAREHOUSE.Pendingitem request Request that needs to be updated.
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.
local opsgroup=_DATABASE:FindOpsGroup(deadgroup)
@@ -7946,10 +7946,12 @@ function WAREHOUSE:_FindParkingForAssets(airbase, assets)
local clients=_DATABASE.CLIENTS
for clientname, client in pairs(clients) do
local template=_DATABASE:GetGroupTemplateFromUnitName(clientname)
local units=template.units
for i,unit in pairs(units) do
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
coords[unit.name]=coord
if template then
local units=template.units
for i,unit in pairs(units) do
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
coords[unit.name]=coord
end
end
end
end
@@ -8120,9 +8122,11 @@ function WAREHOUSE:_FindParkingForAssets(airbase, assets)
-- Debug output for occupied spots.
if self.Debug then
local coord=problem.coord --Core.Point#COORDINATE
local text=string.format("Obstacle %s [type=%s] blocking spot=%d! Size=%.1f m and distance=%.1f m.", problem.name, problem.type, _termid, problem.size, problem.dist)
self:I(self.lid..text)
coord:MarkToAll(string.format(text))
if coord then
local text=string.format("Obstacle %s [type=%s] blocking spot=%d! Size=%.1f m and distance=%.1f m.", problem.name, problem.type, _termid, problem.size, problem.dist)
self:I(self.lid..text)
coord:MarkToAll(text)
end
else
self:T(self.lid..string.format("Parking spot %d is occupied or not big enough!", _termid))
end
@@ -8431,12 +8435,14 @@ function WAREHOUSE:_GetAttribute(group)
local attribute=WAREHOUSE.Attribute.OTHER_UNKNOWN --#WAREHOUSE.Attribute
if group then
local groupCat=group:GetCategory()
-----------
--- Air ---
-----------
-- Planes
local transportplane=group:HasAttribute("Transports") and group:HasAttribute("Planes")
local transportplane=group:HasAttribute("Transports") and group:HasAttribute("Planes") and groupCat==Group.Category.AIRPLANE
local awacs=group:HasAttribute("AWACS")
local fighter=group:HasAttribute("Fighters") or group:HasAttribute("Interceptors") or group:HasAttribute("Multirole fighters") or (group:HasAttribute("Bombers") and not group:HasAttribute("Strategic bombers"))
local bomber=group:HasAttribute("Strategic bombers")
@@ -8591,7 +8597,6 @@ end
-- @param #WAREHOUSE.Queueitem qitem Item of queue to be removed.
-- @param #table queue The queue from which the item should be deleted.
function WAREHOUSE:_DeleteQueueItem(qitem, queue)
self:F({qitem=qitem, queue=queue})
for i=1,#queue do
local _item=queue[i] --#WAREHOUSE.Queueitem

View File

@@ -48,7 +48,7 @@
do -- ZONE_CAPTURE_COALITION
--- @type ZONE_CAPTURE_COALITION
-- @type ZONE_CAPTURE_COALITION
-- @field #string ClassName Name of the class.
-- @field #number MarkBlue ID of blue 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.
-- For example:
--
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- -- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
-- if From ~= "Empty" then
-- -- Display a message
@@ -172,7 +172,7 @@ do -- ZONE_CAPTURE_COALITION
--
-- ## Example Event Handler.
--
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- -- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
-- if From ~= To then
-- local Coalition = self:GetCoalition()
@@ -273,7 +273,7 @@ do -- ZONE_CAPTURE_COALITION
-- Depending on the zone ownership, different messages are sent.
-- 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 )
-- if From ~= To then
-- local Coalition = self:GetCoalition()
@@ -294,7 +294,7 @@ do -- ZONE_CAPTURE_COALITION
-- 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 )`.
--
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterEmpty()
-- self:Smoke( SMOKECOLOR.Green )
-- 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.
-- 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()
-- ZoneCaptureCoalition:Smoke( SMOKECOLOR.White )
-- 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.
-- And we add some score.
--
-- --- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterCaptured()
-- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition})
@@ -641,7 +641,7 @@ do -- ZONE_CAPTURE_COALITION
--
-- @usage
-- -- 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()
-- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition})

View File

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

View File

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

View File

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

View File

@@ -10,7 +10,7 @@ _SCHEDULEDISPATCHER = SCHEDULEDISPATCHER:New() -- Core.ScheduleDispatcher#SCHEDU
_DATABASE = DATABASE:New() -- Core.Database#DATABASE
--- Settings
_SETTINGS = SETTINGS:Set()
_SETTINGS = SETTINGS:Set() -- Core.Settings#SETTINGS
_SETTINGS:SetPlayerMenuOn()
--- Register cargos.

View File

@@ -1,8 +1,6 @@
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Enums.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Utils.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Profiler.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Templates.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/STTS.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/FiFo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Socket.lua' )
@@ -34,6 +32,7 @@ __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( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Vector.lua')
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Object.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Identifiable.lua' )
@@ -49,6 +48,7 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Marker.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Weapon.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Net.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Storage.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/DynamicCargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/Cargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoUnit.lua' )
@@ -84,6 +84,7 @@ __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( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Airboss.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RecoveryTanker.lua' )
@@ -154,6 +155,14 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Route.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Account.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Assist.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/ShapeBase.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Circle.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Cube.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( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/UserSound.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/SoundOutput.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/Radio.lua' )
@@ -178,4 +187,9 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_Dispatcher
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Zone.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Dispatcher.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Navigation/Beacons.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Navigation/Point.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Navigation/Procedure.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Navigation/FlightPlan.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Globals.lua' )

View File

@@ -1,9 +1,7 @@
__Moose.Include( 'Utilities\\Enums.lua' )
__Moose.Include( 'Utilities\\Routines.lua' )
__Moose.Include( 'Utilities\\Utils.lua' )
__Moose.Include( 'Utilities\\Profiler.lua' )
__Moose.Include( 'Utilities\\Templates.lua' )
__Moose.Include( 'Utilities\\STTS.lua' )
--__Moose.Include( 'Utilities\\STTS.lua' )
__Moose.Include( 'Utilities\\FiFo.lua' )
__Moose.Include( 'Utilities\\Socket.lua' )
@@ -17,11 +15,11 @@ __Moose.Include( 'Core\\Event.lua' )
__Moose.Include( 'Core\\Settings.lua' )
__Moose.Include( 'Core\\Menu.lua' )
__Moose.Include( 'Core\\Zone.lua' )
__Moose.Include( 'Core\\Zone_Detection.lua' )
__Moose.Include( 'Core\\Velocity.lua' )
__Moose.Include( 'Core\\Database.lua' )
__Moose.Include( 'Core\\Set.lua' )
__Moose.Include( 'Core\\Point.lua' )
__Moose.Include( 'Core\\Velocity.lua' )
__Moose.Include( 'Core\\Pathline.lua' )
__Moose.Include( 'Core\\Message.lua' )
__Moose.Include( 'Core\\Fsm.lua' )
__Moose.Include( 'Core\\Spawn.lua' )
@@ -34,6 +32,7 @@ __Moose.Include( 'Core\\MarkerOps_Base.lua' )
__Moose.Include( 'Core\\TextAndSound.lua' )
__Moose.Include( 'Core\\Condition.lua' )
__Moose.Include( 'Core\\ClientMenu.lua' )
__Moose.Include( 'Core\\Vector.lua' )
__Moose.Include( 'Wrapper\\Object.lua' )
__Moose.Include( 'Wrapper\\Identifiable.lua' )
@@ -46,6 +45,10 @@ __Moose.Include( 'Wrapper\\Static.lua' )
__Moose.Include( 'Wrapper\\Airbase.lua' )
__Moose.Include( 'Wrapper\\Scenery.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\\CargoUnit.lua' )
@@ -77,6 +80,10 @@ __Moose.Include( 'Functional\\Mantis.lua' )
__Moose.Include( 'Functional\\Shorad.lua' )
__Moose.Include( 'Functional\\Autolase.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\\RecoveryTanker.lua' )
@@ -107,6 +114,9 @@ __Moose.Include( 'Ops\\Awacs.lua' )
__Moose.Include( 'Ops\\PlayerTask.lua' )
__Moose.Include( 'Ops\\Operation.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_Air.lua' )
@@ -169,4 +179,7 @@ __Moose.Include( 'Tasking\\Task_Cargo_Dispatcher.lua' )
__Moose.Include( 'Tasking\\Task_Capture_Zone.lua' )
__Moose.Include( 'Tasking\\Task_Capture_Dispatcher.lua' )
__Moose.Include( 'Navigation\\Point.lua' )
__Moose.Include( 'Navigation\\Beacons.lua' )
__Moose.Include( 'Globals.lua' )

View File

@@ -0,0 +1,139 @@
--- **NAVIGATION** - Beacons of the map/theatre.
--
-- **Main Features:**
--
-- * Beacons of the map
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Navigation%20-%20Beacons).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Navigation.Beacons
-- @image NAVIGATION_Beacons.png
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- BEACONS class.
-- @type BEACONS
--
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #table beacons Beacons.
--
-- @extends Core.Base#BASE
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The BEACONS Concept
--
-- The NAVFIX class has a great concept!
--
-- Bla, bla...
--
-- # Basic Setup
--
-- A new `BEACONS` object can be created with the @{#BEACONS.New}() function.
--
-- local beacons=BEACONS:New("G:\Games\DCS World Testing\Mods\terrains\GermanyColdWar\beacons.lua")
--
-- This is how it works.
--
-- @field #BEACONS
BEACONS = {
ClassName = "BEACONS",
verbose = 0,
beacons = {},
}
--- BEACONS class version.
-- @field #string version
BEACONS.version="0.0.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor(s)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new BECAONS class instance from a given file.
-- @param #BEACONS self
-- @param #string FileName Full path to the file containing the map beacons.
-- @return #BEACONS self
function BEACONS:NewFromFile(FileName)
-- Inherit everything from BASE class.
self=BASE:Inherit(self, BASE:New()) -- #BEACONS
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Add marker all beacons on the F10 map.
-- @param #BEACONS self
-- @return #BEACONS self
function BEACONS:MarkerShow()
return self
end
--- Remove markers of all beacons from the F10 map.
-- @param #BEACONS self
-- @return #BEACONS self
function BEACONS:MarkerRemove()
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Get text displayed in the F10 marker.
-- @param #BEACONS self
-- @return #string Marker text.
function BEACONS:_GetMarkerText(beacon)
local altmin=self.altMin and tostring(self.altMin) or ""
local altmax=self.altMax and tostring(self.altMax) or ""
local speedmin=self.speedMin and tostring(self.speedMin) or ""
local speedmax=self.speedMax and tostring(self.speedMax) or ""
local text=string.format("NAVFIX %s", self.name)
if self.isIAF then
text=text..string.format(" (IAF)")
end
if self.isIF then
text=text..string.format(" (IF)")
end
text=text..string.format("\nAltitude [ft]: %s - %s", altmin, altmax)
text=text..string.format("\nSpeed [knots]: %s - %s", speedmin, speedmax)
text=text..string.format("\nCompulsory: %s", tostring(self.isCompulsory))
text=text..string.format("\nFly Over: %s", tostring(self.isFlyover))
return text
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,481 @@
--- **NAVIGATION** - Flight Plan.
--
-- **Main Features:**
--
-- * Manage navigation aids
-- * VOR, NDB
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Ops%20-%20FlightPlan).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Navigation.FlightPlan
-- @image NAVIGATION_FlightPlan.png
--- FLIGHTPLAN class.
-- @type FLIGHTPLAN
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #table fixes Navigation fixes.
-- @field Core.Pathline#PATHLINE pathline Pathline of the plan.
-- @field Wrapper.Airbase#AIRBASE departureAirbase Departure airbase.
-- @field Wrapper.Airbase#AIRBASE destinationAirbase Destination airbase.
-- @field #number altitudeCruiseMin Minimum cruise altitude in feet MSL.
-- @field #number altitudeCruiseMax Maximum cruise altitude in feet MSL.
-- @extends Core.Pathline#PATHLINE
--- *Life is what happens to us while we are making other plans.* -- Allen Saunders
--
-- ===
--
-- # The FLIGHTPLAN Concept
--
-- This class has a great concept!
--
-- # Basic Setup
--
-- A new `FLIGHTPLAN` object can be created with the @{#FLIGHTPLAN.New}() function.
--
-- myFlightplan=FLIGHTPLAN:New("Plan A")
-- myFleet:SetPortZone(ZonePort1stFleet)
-- myFleet:Start()
--
-- A fleet needs a *port zone*, which is set via the @{#FLIGHTPLAN.SetPortZone}(`PortZone`) function. This is the zone where the naval assets are spawned and return to.
--
-- Finally, the fleet needs to be started using the @{#FLIGHTPLAN.Start}() function. If the fleet is not started, it will not process any requests.
--
-- @field #FLIGHTPLAN
FLIGHTPLAN = {
ClassName = "FLIGHTPLAN",
verbose = 0,
fixes = {}
}
--- Type of flightplan.
-- @type FLIGHTPLAN.Type
-- @field #string IFRH Instrument Flying Rules High Altitude.
-- @field #string IFRL Instrument Flying Rules Low Altitude.
-- @field #string VFR Visual Flight Rules.
FLIGHTPLAN.Type={
IFRH = "IFR High",
IFRL = "IFR Low",
VFR = "VFR",
}
--- FLIGHTPLAN class version.
-- @field #string version
FLIGHTPLAN.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: How to connect SID, STAR, ENROUTE, TRANSITION, APPROACH. Typical flightplan SID --> ENROUTE --> STAR --> APPROACH
-- TODO: Add approach.
-- DONE: How to handle the FLIGHTGROUP:_LandAtAirBase
-- TODO: Do we always need a holding pattern? https://www.faa.gov/air_traffic/publications/atpubs/aip_html/part2_enr_section_1.5.html#:~:text=If%20no%20holding%20pattern%20is,than%20that%20desired%20by%20ATC.
-- DOEN: Read from MSFS file.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new FLIGHTPLAN instance.
-- @param #FLIGHTPLAN self
-- @param #string Name Name of this flight plan.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:New(Name)
-- Inherit everything from BASE class.
self=BASE:Inherit(self, PATHLINE:New(Name)) -- #FLIGHTPLAN
-- Set alias.
self.alias=tostring(Name)
-- Set some string id for output to DCS.log file.
self.lid=string.format("FLIGHTPLAN %s | ", self.alias)
--self.pathline=PATHLINE:New(Name)
-- Debug info.
self:I(self.lid..string.format("Created FLIGHTPLAN!"))
return self
end
--- Create a new FLIGHTPLAN instance from another FLIGHTPLAN acting as blue print.
-- The newly created flight plan is deep copied from the given one.
-- @param #FLIGHTPLAN self
-- @param #FLIGHTPLAN FlightPlan Blue print of the flight plan to copy.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:NewFromFlightPlan(FlightPlan)
self=UTILS.DeepCopy(FlightPlan)
return self
end
--- Create a new FLIGHTPLAN instance from a given file.
-- Currently, the file has to be an MSFS 2020 .pln file as, *e.g.*, exported from [Navigraph](https://navigraph.com/).
--
-- **Note** that the flight plan does only cover the departure, enroute and arrival portions but **not the approach** part!
-- @param #FLIGHTPLAN self
-- @param #string FileName Full path to file.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:NewFromFile(FileName)
if UTILS.FileExists(FileName) then
self=FLIGHTPLAN._ReadFileMSFS(FileName)
else
error(string.format("ERROR: File not found! File name=%s", tostring(FileName)))
end
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Add navigation fix to the flight plan.
-- @param #FLIGHTPLAN self
-- @param Navigation.Point#NAVPOINT NavFix The nav fix.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:AddNavFix(NavFix)
table.insert(self.fixes, NavFix)
local point=self:AddPointFromVec3(NavFix.vector:GetVec3(true))
point.navpoint=NavFix
return self
end
--- Set departure airbase.
-- @param #FLIGHTPLAN self
-- @param #string AirbaseName Name of the airbase or AIRBASE object.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:SetDepartureAirbase(AirbaseName)
self.departureAirbase=AIRBASE:FindByName(AirbaseName)
return self
end
--- Set destination airbase.
-- @param #FLIGHTPLAN self
-- @param #string AirbaseName Name of the airbase or AIRBASE object.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:SetDestinationAirbase(AirbaseName)
self.destinationAirbase=AIRBASE:FindByName(AirbaseName)
return self
end
--- Set cruise altitude.
-- @param #FLIGHTPLAN self
-- @param #number AltMin Minimum altitude in feet MSL.
-- @param #number AltMax Maximum altitude in feet MSL. Default is `AltMin`.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:SetCruiseAltitude(AltMin, AltMax)
self.altitudeCruiseMin=AltMin
self.altitudeCruiseMax=AltMax or self.altitudeCruiseMin
return self
end
--- Set cruise speed.
-- @param #FLIGHTPLAN self
-- @param #number SpeedMin Minimum speed in knots.
-- @param #number SpeedMax Maximum speed in knots. Default is `SpeedMin`.
-- @return #FLIGHTPLAN self
function FLIGHTPLAN:SetCruiseSpeed(SpeedMin, SpeedMax)
self.speedCruiseMin=SpeedMin
self.speedCruiseMax=SpeedMax or self.speedCruiseMin
return self
end
--- Get the name of this flight plan.
-- @param #FLIGHTPLAN self
-- @return #string The name.
function FLIGHTPLAN:GetName()
return self.alias
end
--- Get cruise altitude. This returns a random altitude between the set min/max cruise altitudes.
-- @param #FLIGHTPLAN self
-- @return #number Cruise altitude in feet MSL.
function FLIGHTPLAN:GetCruiseAltitude()
local alt=10000
if self.altitudeCruiseMin and self.altitudeCruiseMax then
alt=math.random(self.altitudeCruiseMin, self.altitudeCruiseMax)
elseif self.altitudeCruiseMin then
alt=self.altitudeCruiseMin
elseif self.altitudeCruiseMax then
alt=self.altitudeCruiseMax
end
return alt
end
--- Get cruise speed. This returns a random speed between the set min/max cruise speeds.
-- @param #FLIGHTPLAN self
-- @return #number Cruise speed in knots.
function FLIGHTPLAN:GetCruiseSpeed()
local speed=250
if self.speedCruiseMin and self.speedCruiseMax then
speed=math.random(self.speedCruiseMin, self.speedCruiseMax)
elseif self.speedCruiseMin then
speed=self.speedCruiseMin
elseif self.altitudeCruiseMax then
speed=self.speedCruiseMax
end
return speed
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Read flight plan from a given MSFS 2020 .plt file.
-- @param #string FileName Name of the file.
-- @return #FLIGHTPLAN The flight plan.
function FLIGHTPLAN._ReadFileMSFS(FileName)
local function readfile(filename)
local lines = {}
-- Open file in read binary mode.
local file=assert(io.open(filename, "rb"), string.format("File not found! File name = %s", tostring(filename)))
for line in file:lines() do
lines[#lines+1] = line
end
-- Close file.
file:close()
-- Return data
return lines
end
--- This function returns an XML element, i.e. the string between <...> and </...>.
local function getXMLelement(line)
local element=string.match(line, ">(.+)<")
return element
end
--- This function returns Latitude and Longitude
local function getLatLong(line)
local latlong=getXMLelement(line)
-- The format is "N41° 38' 20.00",E41° 33' 19.00",+000000.00" so we still need to process that.
local lat,long=string.match(latlong, "(.+),(.+),")
return lat,long
end
-- Read data from file.
local data=readfile(FileName)
local flightplan={}
local waypoints={}
local wp=nil
local gotwaypoint=false
for i,line in pairs(data) do
--print(line)
-- Title
if string.find(line, "<Title>") then
flightplan.title=getXMLelement(line)
end
-- Departure ICAO
if string.find(line, "<DepartureID>") then
flightplan.departureICAO=getXMLelement(line)
end
-- Destination ICAO
if string.find(line, "<DestinationID>") then
flightplan.destinationICAO=getXMLelement(line)
end
-- FPType
if string.find(line, "<FPType>") then
flightplan.plantype=getXMLelement(line)
end
-- Route type
if string.find(line, "<RouteType>") then
flightplan.routetype=getXMLelement(line)
end
-- Cruise alt in feet
if string.find(line, "<CruisingAlt>") then
flightplan.altCruise=getXMLelement(line)
end
-- Departure LLA
if string.find(line, "<DepartureLLA>") then
local lat,long=getLatLong(line)
end
-- Destination LLA
if string.find(line, "<DestinationLLA>") then
local lat,long=getLatLong(line)
end
-- Departure Name
if string.find(line, "<DepartureName>") then
local DepartureName=getXMLelement(line)
end
-- DestinationName
if string.find(line, "<DestinationName>") then
local DestinationName=getXMLelement(line)
end
---
-- Waypoint stuff
---
-- New waypoint starts.
if string.find(line, "ATCWaypoint id") then
--Get string inside quotes " and ".
local wpid=string.match(line, [["(.+)"]])
-- Create a new wp table.
wp={}
-- Set waypoint name.
wp.name=wpid
end
-- Waypoint info ends.
if string.find(line, "</ATCWaypoint>") then
-- This is the end of the waypoint.
-- Add info to waypoints table.
table.insert(waypoints, wp)
-- Set waypoint to nil. We create an empty table if the next wp starts.
wp=nil
end
-- Waypoint type (Airport, Intersection, NDB, VORTAC)
if string.find(line, "<ATCWaypointType>") then
local wptype=getXMLelement(line)
wp.type=wptype
end
-- Waypoint position.
if string.find(line, "<WorldPosition>") then
wp.lat, wp.long=getLatLong(line)
end
-- Runway should exist for initial and final WP if it is an airport.
if string.find(line, "RunwayNumberFP") then
wp.runway=getXMLelement(line)
end
-- Runway designator: LEFT, RIGHT, CENTER
if string.find(line, "RunwayDesignatorFP") then
wp.runwayDesignator=getXMLelement(line)
end
-- Segment is Departure
if string.find(line, "<DepartureFP>") then
wp.segment="Departure"
end
-- Segment is Arrival
if string.find(line, "<ArrivalFP>") then
wp.segment="Arrival"
end
-- Segment is Enroute
if string.find(line, "<ATCAirway>") then
wp.segment="Enroute"
end
-- Approach type: VORDME, LOCALIZER
if string.find(line, "ApproachTypeFP") then
flightplan.approachtype=getXMLelement(line)
end
-- Approach type suffic: Z
if string.find(line, "SuffixFP") then
local SuffixFP=getXMLelement(line)
end
end
for key, value in pairs(flightplan) do
env.info(string.format("Flightplan %s=%s", key, tostring(value)))
end
env.info(string.format("Number of waypoints=%d", #waypoints))
for i,wp in pairs(waypoints) do
env.info(string.format("Waypoint name=%s type=%s segment=%s runway=%s lat=%s long=%s", wp.name, wp.type, tostring(wp.segment), tostring(wp.runway)..tostring(wp.runwayDesignator or ""), wp.lat, wp.long))
end
-- Create a new flightplan.
local fp=FLIGHTPLAN:New(flightplan.title)
-- Set cruise altitude.
fp:SetCruiseAltitude(flightplan.altCruise)
-- Set departure and destination airports.
fp:SetDepartureAirbase(flightplan.departureICAO)
fp:SetDestinationAirbase(flightplan.destinationICAO)
--TODO: Remove first and last waypoint if they are identical to the departure/destination airport!
for i,wp in pairs(waypoints) do
-- Create a navpoint.
local navpoint=NAVPOINT:NewFromLLDMS(wp.name, wp.type, wp.lat, wp.long)
navpoint:SetAltMin(flightplan.altCruise)
-- Add point to flightplan.
-- TODO: section departure, enroute, arrival.
fp:AddNavFix(navpoint)
end
return fp
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,587 @@
--- **NAVIGATION** - Navigation Airspace Points, Fixes and Aids.
--
-- **Main Features:**
--
-- * Stuff
-- * More Stuff
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Navigation%20-%20NavFix).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Navigation.Point
-- @image NAVIGATION_Point.png
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- NAVFIX class.
-- @type NAVFIX
--
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #string name Name of the point.
-- @field #string typePoint Type of the point, *e.g. "Intersection", "VOR", "Airport".
-- @field Core.Vector#VECTOR vector Position vector of the fix.
-- @field Wrapper.Marker#MARKER marker Marker on F10 map.
-- @field #number altMin Minimum altitude in meters.
-- @field #number altMax Maximum altitude in meters.
-- @field #number speedMin Minimum speed in knots.
-- @field #number speedMax Maximum speed in knots.
--
-- @field #boolean isCompulsory Is this a compulsory fix.
-- @field #boolean isFlyover Is this a flyover fix (`true`) or turning point otherwise.
-- @field #boolean isFAF Is this a final approach fix.
-- @field #boolean isIAF Is this an initial approach fix.
-- @field #boolean isIF Is this an initial fix.
-- @field #boolean isMAF Is this an initial fix.
--
-- @extends Core.Base#BASE
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The NAVFIX Concept
--
-- The NAVFIX class has a great concept!
--
-- A NAVFIX describes a geo position and can, *e.g.*, be part of a FLIGHTPLAN. It has a unique name and is of a certain type, *e.g.* "Intersection", "VOR", "Airbase" etc.
-- It can also have further properties as min/max altitudes and speeds that aircraft need to obey when they pass the point.
--
-- # Basic Setup
--
-- A new `NAVFIX` object can be created with the @{#NAVFIX.New}() function.
--
-- myNavPoint=NAVFIX:New()
-- myTemplate:SetXYZ(X, Y, Z)
--
-- This is how it works.
--
-- @field #NAVFIX
NAVFIX = {
ClassName = "NAVFIX",
verbose = 0,
}
--- Type of point.
-- @type NAVFIX.Type
-- @field #string POINT Waypoint.
-- @field #string INTERSECTION Intersection of airway.
-- @field #string AIRPORT Airport.
-- @field #string VOR Very High Frequency Omnidirectional Range Station.
-- @field #string DME Distance Measuring Equipment.
-- @field #string NDB Non-Directional Beacon.
-- @field #string VORDME Combined VHF omnidirectional range (VOR) with a distance-measuring equipment (DME).
-- @field #string LOC Localizer.
-- @field #string ILS Instrument Landing System.
-- @field #string TACAN TACtical Air Navigation System (TACAN).
NAVFIX.Type={
POINT="Point",
INTERSECTION="Intersection",
AIRPORT="Airport",
NDB="NDB",
VOR="VOR",
DME="DME",
VORDME="VOR/DME",
LOC="Localizer",
ILS="ILS",
TACAN="TACAN"
}
--- NAVFIX class version.
-- @field #string version
NAVFIX.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor(s)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new NAVFIX class instance from a given VECTOR.
-- @param #NAVFIX self
-- @param #string Name Name/ident of the point. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param Core.Vector#VECTOR Vector Position vector of the navpoint.
-- @return #NAVFIX self
function NAVFIX:NewFromVector(Name, Type, Vector)
-- Inherit everything from BASE class.
self=BASE:Inherit(self, BASE:New()) -- #NAVFIX
-- Vector of point.
self.vector=Vector
-- Name of point.
self.name=Name
-- Type of the point.
self.typePoint=Type or NAVFIX.Type.POINT
local coord=COORDINATE:NewFromVec3(self.vector)
-- Marker on F10.
self.marker=MARKER:New(coord, self:_GetMarkerText())
-- Log ID string.
self.lid=string.format("NAVFIX %s [%s] | ", tostring(self.name), tostring(self.typePoint))
-- Debug info.
self:I(self.lid..string.format("Created NAVFIX"))
return self
end
--- Create a new NAVFIX class instance from a given COORDINATE.
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param Core.Point#COORDINATE Coordinate Coordinate of the point.
-- @return #NAVFIX self
function NAVFIX:NewFromCoordinate(Name, Type, Coordinate)
-- Create a VECTOR from the coordinate.
local Vector=VECTOR:NewFromVec(Coordinate)
-- Create NAVFIX.
self=NAVFIX:NewFromVector(Name, Type, Vector)
return self
end
--- Create a new NAVFIX instance from given latitude and longitude in degrees, minutes and seconds (DMS).
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Latitude Latitude in DMS as string.
-- @param #string Longitude Longitude in DMS as string.
-- @return #NAVFIX self
function NAVFIX:NewFromLLDMS(Name, Type, Latitude, Longitude)
-- Create a VECTOR from the coordinate.
local Vector=VECTOR:NewFromLLDMS(Latitude, Longitude)
-- Create NAVFIX.
self=NAVFIX:NewFromVector(Name, Type, Vector)
return self
end
--- Create a new NAVFIX instance from given latitude and longitude in decimal degrees (DD).
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #number Latitude Latitude in DD.
-- @param #number Longitude Longitude in DD.
-- @return #NAVFIX self
function NAVFIX:NewFromLLDD(Name, Type, Latitude, Longitude)
-- Create a VECTOR from the coordinate.
local Vector=VECTOR:NewFromLLDD(Latitude, Longitude)
-- Create NAVFIX.
self=NAVFIX:NewFromVector(Name, Type, Vector)
return self
end
--- Create a new NAVFIX class instance relative to a given other NAVFIX.
-- You have to specify the distance and bearing from the new point to the given point. *E.g.*, for a distance of 5 NM and a bearing of 090° (West), the
-- new nav point is created 5 NM East of the given nav point. The reason is that this corresponts to convention used in most maps.
-- You can, however, use the `Reciprocal` switch to create the new point in the direction you specify.
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of navfix.
-- @param #NAVFIX NavFix The given/existing navigation fix relative to which the new fix is created.
-- @param #number Distance Distance from the given to the new point in nautical miles.
-- @param #number Bearing Bearing [Deg] from the new point to the given one.
-- @param #boolean Reciprocal If `true` the reciprocal `Bearing` is taken so it specifies the direction from the given point to the new one.
-- @return #NAVFIX self
function NAVFIX:NewFromNavFix(Name, Type, NavFix, Distance, Bearing, Reciprocal)
-- Convert magnetic to true bearing by adding magnetic declination, e.g. mag. bearing 10°M ==> true bearing 16°M (for 6° variation on Caucasus map)
Bearing=Bearing+UTILS.GetMagneticDeclination()
if Reciprocal then
Bearing=Bearing-180
end
-- Translate.
local Vector=NavFix.vector:Translate(UTILS.NMToMeters(Distance), Bearing, true)
self=NAVFIX:NewFromVector(Name, Type, Vector)
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set whether this is the intermediate fix (IF).
-- @param #NAVFIX self
-- @return #NAVFIX self
function NAVFIX:SetIntermediateFix(IntermediateFix)
self.isIF=IntermediateFix
return self
end
--- Set whether this is an initial approach fix (IAF).
-- The IAF is the point where the initial approach segment of an instrument approach begins.
-- It is usually a designated intersection, VHF omidirectional range (VOR) non-directional beacon (NDB)
-- or distance measuring equipment (DME) fix.
-- The IAF may be collocated with the intermediate fix (IF) of the instrument apprach an in such case they designate the
-- beginning of the intermediate segment of the approach. When the IAF and the IF are combined, there is no inital approach segment.
-- @param #NAVFIX self
-- @param #boolean IntermediateFix If `true`, this is an intermediate fix.
-- @return #NAVFIX self
function NAVFIX:SetInitialApproachFix(IntermediateFix)
self.isIAF=IntermediateFix
return self
end
--- Set whether this is the final approach fix (FAF).
-- @param #NAVFIX self
-- @param #boolean FinalApproachFix If `true`, this is a final approach fix.
-- @return #NAVFIX self
function NAVFIX:SetFinalApproachFix(FinalApproachFix)
self.isFAF=FinalApproachFix
return self
end
--- Set whether this is the final approach fix (FAF).
-- @param #NAVFIX self
-- @param #boolean FinalApproachFix If `true`, this is a final approach fix.
-- @return #NAVFIX self
function NAVFIX:SetMissedApproachFix(MissedApproachFix)
self.isMAF=MissedApproachFix
return self
end
--- Set minimum altitude.
-- @param #NAVFIX self
-- @param #number Altitude Min altitude in feet.
-- @return #NAVFIX self
function NAVFIX:SetAltMin(Altitude)
self.altMin=Altitude
return self
end
--- Set maximum altitude.
-- @param #NAVFIX self
-- @param #number Altitude Max altitude in feet.
-- @return #NAVFIX self
function NAVFIX:SetAltMax(Altitude)
self.altMax=Altitude
return self
end
--- Set mandatory altitude (min alt = max alt).
-- @param #NAVFIX self
-- @param #number Altitude Altitude in feet.
-- @return #NAVFIX self
function NAVFIX:SetAltMandatory(Altitude)
self.altMin=Altitude
self.altMax=Altitude
return self
end
--- Set minimum allowed speed at this fix.
-- @param #NAVFIX self
-- @param #number Speed Min speed in knots.
-- @return #NAVFIX self
function NAVFIX:SetSpeedMin(Speed)
self.speedMin=Speed
return self
end
--- Set maximum allowed speed at this fix.
-- @param #NAVFIX self
-- @param #number Speed Max speed in knots.
-- @return #NAVFIX self
function NAVFIX:SetSpeedMax(Speed)
self.speedMax=Speed
return self
end
--- Set mandatory speed (min speed = max speed) at this fix.
-- @param #NAVFIX self
-- @param #number Speed Mandatory speed in knots.
-- @return #NAVFIX self
function NAVFIX:SetSpeedMandatory(Speed)
self.speedMin=Speed
self.speedMax=Speed
return self
end
--- Set whether this fix is compulsory.
-- @param #NAVFIX self
-- @param #boolean Compulsory If `true`, this is a compusory fix. If `false` or nil, it is non-compulsory.
-- @return #NAVFIX self
function NAVFIX:SetCompulsory(Compulsory)
self.isCompulsory=Compulsory
return self
end
--- Set whether this is a fly-over fix fix.
-- @param #NAVFIX self
-- @param #boolean FlyOver If `true`, this is a fly over fix. If `false` or nil, it is not.
-- @return #NAVFIX self
function NAVFIX:SetFlyOver(FlyOver)
self.isFlyover=FlyOver
return self
end
--- Get the altitude in feet MSL. If min and max altitudes are set, it will return a random altitude between min and max.
-- @param #NAVFIX self
-- @return #number Altitude in feet MSL. Can be `nil`, if neither min nor max altitudes have beeen set.
function NAVFIX:GetAltitude()
local alt=nil
if self.altMin and self.altMax and self.altMin~=self.altMax then
alt=math.random(self.altMin, self.altMax)
elseif self.altMin then
alt=self.altMin
elseif self.altMax then
alt=self.altMax
end
return alt
end
--- Get the speed. If min and max speeds are set, it will return a random speed between min and max.
-- @param #NAVFIX self
-- @return #number Speed in knots. Can be `nil`, if neither min nor max speeds have beeen set.
function NAVFIX:GetSpeed()
local speed=nil
if self.speedMin and self.speedMax and self.speedMin~=self.speedMax then
speed=math.random(self.speedMin, self.speedMax)
elseif self.speedMin then
speed=self.speedMin
elseif self.speedMax then
speed=self.speedMax
end
return speed
end
--- Add marker the NAVFIX on the F10 map.
-- @param #NAVFIX self
-- @return #NAVFIX self
function NAVFIX:MarkerShow()
self.marker:ToAll()
return self
end
--- Remove marker of the NAVFIX from the F10 map.
-- @param #NAVFIX self
-- @return #NAVFIX self
function NAVFIX:MarkerRemove()
self.marker:Remove()
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Get text displayed in the F10 marker.
-- @param #NAVFIX self
-- @return #string Marker text.
function NAVFIX:_GetMarkerText()
local altmin=self.altMin and tostring(self.altMin) or ""
local altmax=self.altMax and tostring(self.altMax) or ""
local speedmin=self.speedMin and tostring(self.speedMin) or ""
local speedmax=self.speedMax and tostring(self.speedMax) or ""
local text=string.format("NAVFIX %s", self.name)
if self.isIAF then
text=text..string.format(" (IAF)")
end
if self.isIF then
text=text..string.format(" (IF)")
end
text=text..string.format("\nAltitude [ft]: %s - %s", altmin, altmax)
text=text..string.format("\nSpeed [knots]: %s - %s", speedmin, speedmax)
text=text..string.format("\nCompulsory: %s", tostring(self.isCompulsory))
text=text..string.format("\nFly Over: %s", tostring(self.isFlyover))
return text
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- NAVAID class.
-- @type NAVAID
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @extends Navigation.Point#NAVFIX
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The NAVAID Concept
--
-- A NAVAID consists of one or multiple FLOTILLAs. These flotillas "live" in a WAREHOUSE that has a phyiscal struction (STATIC or UNIT) and can be captured or destroyed.
--
-- # Basic Setup
--
-- A new `NAVAID` object can be created with the @{#NAVAID.New}(`WarehouseName`, `FleetName`) function, where `WarehouseName` is the name of the static or unit object hosting the fleet
-- and `FleetName` is the name you want to give the fleet. This must be *unique*!
--
-- myFleet=NAVAID:New("myWarehouseName", "1st Fleet")
-- myFleet:SetPortZone(ZonePort1stFleet)
-- myFleet:Start()
--
-- A fleet needs a *port zone*, which is set via the @{#NAVAID.SetPortZone}(`PortZone`) function. This is the zone where the naval assets are spawned and return to.
--
-- Finally, the fleet needs to be started using the @{#NAVAID.Start}() function. If the fleet is not started, it will not process any requests.
--
-- @field #NAVAID
NAVAID = {
ClassName = "NAVAID",
verbose = 0,
}
--- NAVAID class version.
-- @field #string version
NAVAID.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Add frequencies. Which unit MHz, kHz, Hz?
-- TODO: Add radial function
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new NAVAID class instance.
-- @param #NAVAID self
-- @param #string Name Name/ident of this navaid.
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string ZoneName Name of the zone to scan the scenery.
-- @param #string SceneryName Name of the scenery object.
-- @return #NAVAID self
function NAVAID:NewFromScenery(Name, Type, ZoneName, SceneryName)
-- Get the zone.
local zone=ZONE:FindByName(ZoneName)
-- Get coordinate.
local Coordinate=zone:GetCoordinate()
-- Inherit everything from NAVFIX class.
self=BASE:Inherit(self, NAVFIX:NewFromCoordinate(Name, Type, Coordinate)) -- #NAVAID
-- Set zone.
self.zone=ZONE:FindByName(ZoneName)
-- Try to get the scenery object. Note not all can be found unfortunately.
if SceneryName then
self.scenery=SCENERY:FindByNameInZone(SceneryName, ZoneName)
if not self.scenery then
self:E(string.format("ERROR: Could not find scenery object %s in zone %s", SceneryName, ZoneName))
end
end
-- Alias.
self.alias=string.format("%s %s %s", tostring(ZoneName), tostring(SceneryName), tostring(Type))
-- Set some string id for output to DCS.log file.
self.lid=string.format("NAVAID %s | ", self.alias)
-- Debug info.
self:I(self.lid..string.format("Created NAVAID!"))
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set frequency the beacon transmits on.
-- @param #NAVAID self
-- @param #number Frequency Frequency in Hz.
-- @return #NAVAID self
function NAVAID:SetFrequency(Frequency)
self.frequency=Frequency
return self
end
--- Set channel of, *e.g.*, TACAN beacons.
-- @param #NAVAID self
-- @param #number Channel The channel.
-- @param #string Band The band either `"X"` (default) or `"Y"`.
-- @return #NAVAID self
function NAVAID:SetChannel(Channel, Band)
self.channel=Channel
self.band=Band or "X"
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Add private CLASS functions here.
-- No private NAVAID functions yet.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,333 @@
--- **NAVIGATION** - Prodedures for Departure (*e.g.* SID), Enroute, Arrival (*e.g.* STAR) and Approach.
--
-- **Main Features:**
--
-- * Stuff
-- * More Stuff
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Navigation%20-%20Template).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Navigation.Procedure
-- @image NAVIGATION_Procedure.png
--- APPROACH class.
-- @type APPROACH
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #string apptype Approach type (ILS, VOR, LOC).
-- @field Wrapper.Airbase#AIRBASE airbase Airbase of this approach.
-- @field Wrapper.Airbase#AIRBASE.Runway runway Runway of this approach.
-- @field Navigation.Point#NAVAID navaid Primary navigation aid.
-- @field #number wpcounter Running number counting the waypoints to generate its UID.
-- @list <#APPROACH.Waypoint> path Path of approach consisting of waypoints.
-- @extends Core.Base#BASE
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The APPROACH Concept
--
-- A typical approach has (up to) four segments. It starts with the initial approach segment, followed by the intermediate approach segment, followed
-- by the final approach segment. In case something goes wrong during the final approach, the missed approach segment kicks in.
--
-- The initial approach segment starts at the initial approach fix (IAF). The segment can contain multiple other fixes, that need to be passed.
-- Note, that an approach procedure can have more than one intitial approach segment and IAF.
--
-- The intermediate approach segment starts at the intermediate fix (IF). The intermediate approach segment blends the initial approach segment into the final approach segment.
-- It is the segment in which aircraft configuration, speed, and positioning adjustments are made for entry into the final approach segment.
--
--
-- https://en.wikipedia.org/wiki/Visual_approach
-- https://en.wikipedia.org/wiki/Instrument_approach
--
-- # Basic Setup
--
-- A new `APPROACH` object can be created with the @{#APPROACH.New}() function.
--
-- myTemplate=APPROACH:New()
-- myTemplate:SetXYZ(X, Y, Z)
--
-- This is how it works.
--
-- @field #APPROACH
APPROACH = {
ClassName = "APPROACH",
verbose = 0,
wpcounter = 0,
}
--- Type of approach.
-- @type APPROACH.Type
-- @field #string VFR Visual Flight Rules.
-- @field #string VOR VOR
-- @field #string NDB NDB
APPROACH.Type={
VFR="VFR",
VOR="VOR",
ILS="ILS",
}
--- Setments of approach.
-- @type APPROACH.Segment
-- @field #string INITIAL Initial approach segment.
-- @field #string INTERMEDIATE Intermediate approach segment.
-- @field #string FINAL Final approach segment.
-- @field #string MISSED Missed approach segment.
APPROACH.Segment={
INITIAL="Initial",
INTERMEDIATE="Intermediate",
FINAL="Final",
MISSED="Missed",
}
--- Waypoint of the approach.
-- @type APPROACH.Waypoint
-- @field #number uid Unique ID of the point.
-- @field #string segment The segment this point belongs to.
-- @field Navigation.Point#NAVFIX navfix The navigation fix that determines the coordinates of this point.
--- APPROACH class version.
-- @field #string version
APPROACH.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-- Initial approach segment --> Intermediate approach segment: starts at IF --> Final approach segment
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new APPROACH class instance.
-- @param #APPROACH self
-- @param #string Type Type of approach (ILS, VOR, LOC).
-- @param Wrapper.Airbase#AIRBASE Airbase The airbase or name of the airbase.
-- @param Wrapper.Airbase#AIRBASE.Runway Runway The runway or name of the runway.
-- @return #APPROACH self
function APPROACH:New(Type, Airbase, Runway)
-- Inherit everything from BASE class.
self=BASE:Inherit(self, BASE:New()) -- #APPROACH
-- Set approach type.
-- TODO: Check if this is a valid/known approach type.
self.apptype=Type
if type(Airbase)=="string" then
self.airbase=AIRBASE:FindByName(Airbase)
else
self.airbase=Airbase
end
if type(Runway)=="string" then
self.runway=self.airbase:GetRunwayByName(Runway)
else
self.runway=Runway
end
-- Debug info.
self:I("Created new approach for airbase %s: type=%s, runway=%s", self.airbase:GetName(), self.apptype, self.runway.name)
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set the primary navigation aid used in the approach.
-- @param #APPROACH self
-- @param Navigation.Point#NAVAID NavAid The NAVAID.
-- @return #APPROACH self
function APPROACH:SetNavAid(NavAid)
self.navaid=NavAid
return self
end
--- Add a waypoint to the path of the approach.
-- @param #APPROACH self
-- @param Navigation.Point#NAVFIX NavFix The navigation fix.
-- @param #string Segment The approach segment this fix belongs to.
-- @return #APPROACH.Waypoint The waypoint data table.
function APPROACH:AddNavFix(NavFix, Segment)
self.wpcounter=self.wpcounter+1
local point={} --#APPROACH.Waypoint
point.uid=self.wpcounter
point.segment=Segment
point.navfix=NavFix
table.insert(self.path, point)
return point
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Add private functions here.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- DEPARTURE class.
-- @type DEPARTURE
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #string apptype DEPARTURE type (ILS, VOR, LOC).
-- @field Wrapper.Airbase#AIRBASE airbase Airbase of this DEPARTURE.
-- @field Wrapper.Airbase#AIRBASE.Runway runway Runway of this DEPARTURE.
-- @field Navigation.Point#NAVAID navaid Primary navigation aid.
-- @field #number wpcounter Running number counting the waypoints to generate its UID.
-- @list <#DEPARTURE.Waypoint> path Path of DEPARTURE consisting of waypoints.
-- @extends Core.Base#BASE
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The DEPARTURE Concept
--
-- Bla.
--
-- @field #DEPARTURE
DEPARTURE = {
ClassName = "DEPARTURE",
verbose = 0,
wpcounter = 0,
}
--- Type of DEPARTURE.
-- @type DEPARTURE.Type
-- @field #string VOR VOR
-- @field #string NDB NDB
DEPARTURE.Type={
VOR="VOR",
ILS="ILS",
}
--- Setments of DEPARTURE.
-- @type DEPARTURE.Segment
-- @field #string INITIAL Initial DEPARTURE segment.
-- @field #string INTERMEDIATE Intermediate DEPARTURE segment.
-- @field #string FINAL Final DEPARTURE segment.
-- @field #string MISSED Missed DEPARTURE segment.
DEPARTURE.Segment={
INITIAL="Initial",
INTERMEDIATE="Intermediate",
FINAL="Final",
MISSED="Missed",
}
--- Waypoint of the DEPARTURE.
-- @type DEPARTURE.Waypoint
-- @field #number uid Unique ID of the point.
-- @field #string segment The segment this point belongs to.
-- @field Navigation.Point#NAVFIX navfix The navigation fix that determines the coordinates of this point.
--- DEPARTURE class version.
-- @field #string version
DEPARTURE.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-- Initial DEPARTURE segment --> Intermediate DEPARTURE segment: starts at IF --> Final DEPARTURE segment
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new DEPARTURE class instance.
-- @param #DEPARTURE self
-- @param Wrapper.Airbase#AIRBASE Airbase The airbase or name of the airbase.
-- @param Wrapper.Airbase#AIRBASE.Runway Runway The runway or name of the runway.
-- @param #string Type Type of DEPARTURE (ILS, VOR, LOC).
-- @return #DEPARTURE self
function DEPARTURE:New(Airbase, Runway)
-- Inherit everything from BASE class.
self=BASE:Inherit(self, BASE:New()) -- #DEPARTURE
if type(Airbase)=="string" then
self.airbase=AIRBASE:FindByName(Airbase)
else
self.airbase=Airbase
end
if type(Runway)=="string" then
self.runway=self.airbase:GetRunwayByName(Runway)
else
self.runway=Runway
end
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set the primary navigation aid used in the DEPARTURE.
-- @param #DEPARTURE self
-- @param Navigation.Point#NAVAID NavAid The NAVAID.
-- @return #DEPARTURE self
function DEPARTURE:SetNavAid(NavAid)
self.navaid=NavAid
return self
end
--- Add a waypoint to the path of the DEPARTURE.
-- @param #DEPARTURE self
-- @param Navigation.Point#NAVFIX NavFix The navigation fix.
-- @param #string Segment The DEPARTURE segment this fix belongs to.
-- @return #DEPARTURE.Waypoint The waypoint data.
function DEPARTURE:AddWaypoint(NavFix, Segment)
self.wpcounter=self.wpcounter+1
local point={} --#DEPARTURE.Waypoint
point.uid=self.wpcounter
point.segment=Segment
point.navfix=NavFix
table.insert(self.path, point)
return point
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Add DEPARTURE private functions here.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,108 @@
--- **NAVIGATION** - Template.
--
-- **Main Features:**
--
-- * Stuff
-- * More Stuff
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Navigation%20-%20Template).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Navigation.Template
-- @image NAVIGATION_Template.png
--- TEMPLATE class.
-- @type TEMPLATE
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @extends Core.Base#BASE
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The TEMPLATE Concept
--
-- The TEMPLATE class has a great concept!
--
-- # Basic Setup
--
-- A new `TEMPLATE` object can be created with the @{#TEMPLATE.New}() function.
--
-- myTemplate=TEMPLATE:New()
-- myTemplate:SetXYZ(X, Y, Z)
--
-- This is how it works.
--
-- @field #TEMPLATE
TEMPLATE = {
ClassName = "TEMPLATE",
verbose = 0,
}
--- Type of navaid
-- @type TEMPLATE.Type
-- @field #string VOR VOR
-- @field #string NDB NDB
TEMPLATE.TYPE={
VOR="VOR",
NDB="NDB",
}
--- TEMPLATE class version.
-- @field #string version
TEMPLATE.version="0.0.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: A lot...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Create a new TEMPLATE class instance.
-- @param #TEMPLATE self
-- @return #TEMPLATE self
function TEMPLATE:New()
-- Inherit everything from SCENERY class.
self=BASE:Inherit(self, BASE:New()) -- #TEMPLATE
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Set frequency.
-- @param #TEMPLATE self
-- @param #number Frequency Frequency in Hz.
-- @return #TEMPLATE self
function TEMPLATE:SetFrequency(Frequency)
self.frequency=Frequency
return self
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Private Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

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