1691 Commits
v1.1.1 ... dev

Author SHA1 Message Date
Taco
9520b76246 Updated soundhandler with mirror performance for Red and Blue Clients… (#575) 2025-11-09 22:21:04 -05:00
Starfire13
67183c31da Improve B-52 mission types and update B-52 and B-1 loadouts (#615) 2025-11-09 21:50:01 -05:00
Druss99
54759f1f94 Fixed bugs wrt planning escort flights (#612) 2025-11-09 21:49:39 -05:00
Starfire13
0fcf308079 Add Mi-17 variant to Mi-8MT configuration (#614) 2025-11-08 18:09:44 -05:00
Drexyl
1ad27e27ea Update Splash Damage Plugin to 3.4.2 (#601)
Co-authored-by: Druss99 <42724070+Druss99@users.noreply.github.com>
2025-11-08 14:35:17 +00:00
Starfire13
eae5e1af30 Starfire campaign updates (#613) 2025-11-08 08:40:40 -05:00
Starfire13
b268d09432 Swap intra-flight and inter-flight radio indices (#608) 2025-11-07 08:33:25 -05:00
Drexyl
220b83a22d Add additional supported Carrier/LHA for Airboss (#603) 2025-11-07 08:32:07 -05:00
Starfire13
83530af35d 10.8 Update for Noisy Cricket, Aegean Aegis, and Vegas Nerve (#607) 2025-11-06 15:18:57 -05:00
Starfire13
00475d767b Update Final Countdown II and Operation Velvet Thunder to 10.8 (#606) 2025-11-06 09:43:14 -05:00
Starfire13
1a8faff717 Update Tornado loadouts (#610) 2025-11-06 09:39:36 -05:00
Druss99
68e0d43a1d fix frontline generation (#609) 2025-11-05 17:52:38 -05:00
Starfire13
0510af8b6b Added missing High Digit SAMs mod version (#605) 2025-11-02 14:59:32 -05:00
Raffson
c54ac4e21a Save compat fix w.r.t. renamed airport in AFG 2025-10-28 21:05:56 +01:00
Raffson
bbc41f4c1a Pydcs update for airfields (Normandy/Lappi/AFG) 2025-10-27 21:10:59 +01:00
Raffson
8bc8eb0e28 Update beacons 2025-10-27 20:50:24 +01:00
Starfire13
86f647cc6d Starfire campaign updates #1 (#604) 2025-10-26 23:16:40 +00:00
Raffson
2f16916ac4 Rename & Extend WW2-Essex layout to support ARA-VDM + CVA-31 2025-10-26 18:21:38 +01:00
Druss99
06044dd4c3 fix frontline debriefing (#602) 2025-10-23 07:15:37 -04:00
Eclipse/Druss99
c46cce01b6 fix ownfor being set to UN Peacekeepers regardless of campaign 2025-10-21 14:20:20 -04:00
Eclipse/Druss99
d78e570d9d fix a bug with untasked aircraft still spawning 2025-10-20 15:14:43 -04:00
Eclipse/Druss99
f4a1908088 fix a bug with pretense generation wrt neutral bases 2025-10-20 15:14:43 -04:00
Druss99
23341e69fa update changelog (#596) 2025-10-19 22:09:48 -04:00
Druss99
11fc28ad3a fix bugs wrt divert airfields for opfor (#595) 2025-10-19 21:40:40 -04:00
Druss99
9b96b7be26 fix runtime error where dictionary size changes (#594) 2025-10-19 20:10:19 -04:00
Raffson
f7ee923cbf Bump campaign version to 10.8 for neutral base support 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
3d788e3ae8 fix numerous UI elements using is_ownfor 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
624f2a00fd show PRESENT status for neutral TGOs 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
6c3cbbf0de avoid spawning neutral tgos with units 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
96d0b2b7d9 fix save compat 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
855d269420 refactor trigger zone generation 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
c0748e2a3e add support for neutral FOBs 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
9f10ecc884 fix save compat 2025-10-19 19:34:38 +02:00
Eclipse/Druss99
31c80dfd02 refactor of previous commits
refactor to enum

typing and many other fixes

fix tests

attempt to fix some typescript

more typescript fixes

more typescript test fixes

revert all API changes

update to pydcs

mypy fixes

Use properties to check if player is blue/red/neutral

update requirements.txt

black -_-

bump pydcs and fix mypy

add opponent property

bump pydcs
2025-10-19 19:34:38 +02:00
Drexyl
362ce66f80 Airboss Moose Module 1.0 (#592)
* Initial Commit

* Rescue Helo Options

* Main modifications to Airboss/Moose Dev Branch

* Restore plugin.json

* Airboss Moose Module 1.0

* Fix plugins.json

---------

Co-authored-by: Druss99 <42724070+Druss99@users.noreply.github.com>
2025-10-18 14:08:48 +00:00
Drexyl
96ee73dd50 Fix for Offensive Jamming when object has been destroyed (#591)
* Fix Offensive Jamming when object has been destroyed
2025-10-18 09:42:02 -04:00
Eclipse/Druss99
f82fc3a930 use aircraft display names instead of variant ids in faction editor 2025-10-12 19:53:01 +02:00
Eclipse/Druss99
cf575fba2a fix a bug with parking allocation 2025-10-12 19:42:52 +02:00
Eclipse/Druss99
96f940bc59 fix bugs with mixed parking 2025-10-12 19:01:07 +02:00
Drexyl
98c71c255b Fix to exclude Moose plugins from Pretense injection (#585) 2025-10-07 18:58:19 -04:00
Drexyl
0e5567ceee Update EW Script with fixes/enhancements (#584) 2025-10-07 08:13:44 -04:00
Druss99
2832ece316 add channels for MiG-29 Fulcrum (#582) 2025-10-05 14:27:06 -04:00
Druss99
5cfd6c86f3 add radios for MiG-29 Fulcrum (#581) 2025-10-04 13:48:11 -04:00
Druss99
27ef269435 add support for more units (#580) 2025-09-22 18:27:34 -04:00
Druss99
8b46ef5e35 add support for MiG-29A Fulcrum (#579) 2025-09-20 18:41:23 -04:00
Eclipse/Druss99
e243d074ff su30 mod update 2025-09-20 19:36:41 +02:00
Eclipse/Druss99
cc39e6579b bump pydcs 2025-09-20 19:36:41 +02:00
Druss99
d7eaf1330f remove antiship from tu-160 (#577) 2025-09-20 13:05:02 -04:00
Druss99
c44ea0025d Fix plugins.json & moose plugins (#574) 2025-09-08 00:35:54 +02:00
Taco
1216c90891 Add Moose's Soundhandler Plugin (#558)
* Soundhandler: Adds sounds for weapons fired at or by blue units as well as destruction sounds for enemy jets and ground units.  By default plays only to the groups involved.

* Added Specific Options and removed 0.1 from mnemonic

* Update was incomplete before, use this one

* Linked in UI choices and consolidated logging functions

* Remove soundhandler duplicate

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-09-07 17:25:14 +00:00
Drexyl
ea80ddc321 Update CJS Super Hornet Mod to 2.4.4 (#572)
* Update CJS Super Hornet Mod to 2.4.4

* Update UI for CJS Super Hornet Mod to 2.4.4

* Update default loadouts for CJS Super Hornet Mod to 2.4.4

* Update changelog.md for CJS Super Hornet Mod to 2.4.4

* Update Growler loadout for missing external fuel tank
2025-09-07 19:24:07 +02:00
Druss99
121ca20edb Fix naval squadron retreat bug (#567) 2025-09-07 17:37:07 +02:00
Starfire13
e4586add72 Add factories to Northern Guardian (#571) 2025-09-07 17:29:45 +02:00
Xisco Lladó
32b2e40b37 Update convoys spawns & CTLD landing zones for Syrian Shield (#570)
* updated convoys spawns and CTLD landing zones

* removed red helipads on palmyra zone

---------

Co-authored-by: Xisco <x.llado@hotelinking.com>
2025-09-07 17:29:00 +02:00
Taco
e8190748eb New Moose-based Autolase alternative with UI options (#565) 2025-08-27 19:24:00 +02:00
Drexyl
d2aa615133 Update EW Script and refine logic (#555) 2025-08-27 19:20:27 +02:00
Starfire13
756602e682 Update Su-24 loadouts (#566) 2025-08-27 19:18:39 +02:00
Taco
204950e487 MarkerOps Plugin (#560)
* MarkerOps

* Change MarkerOps to MooseMarkerOps in all places

* Prettify name in UI

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-08-23 16:37:34 +02:00
Druss99
6290607eb6 Expend all ARMs for SEAD (#562) 2025-08-13 12:32:36 +02:00
Druss99
afad73ac27 Fix bugs while loading air wing configs (#552)
* fix bugs with air wing config loading

* add aircraft type to airwing config for better loading
2025-08-10 21:14:38 +02:00
Eclipse/Druss99
52fbc75e1c update changelog 2025-08-10 19:40:06 +02:00
Xisco Lladó
5c5af40bd5 Update Operation syrian shield (#554)
* New campaign Operation_syrian_shield

* removed author on player factions. Credited to 'Fuzzle'

* changed recommended factions to the easy way

* Update operation_syrian_shield.yaml

removed mission time, and squadrons start full

* Update operation_syrian_shield.yaml

better campaign description

* added better squadron descriptions

* updated campaign description

---------

Co-authored-by: Xisco <x.llado@hotelinking.com>
2025-08-10 16:19:50 +02:00
ingax01
d1f66ed040 Remove unused SU-30 payload files (#551) 2025-08-04 00:08:28 +02:00
Druss99
6467193c88 Save-compat fix for su-30 update (#553) 2025-08-04 00:07:38 +02:00
Drexyl
b2670ba30b Add Military Aircraft Mod 1.7.2 (#547) 2025-08-03 02:02:14 +02:00
Raffson
dcf4da57b3 Update starlette + fastapi 2025-08-02 19:27:30 +02:00
Raffson
6f825db086 Update h11 2025-08-02 19:27:15 +02:00
Raffson
afa9122885 Bump electron to 28.3.2 2025-08-02 19:09:31 +02:00
Raffson
df8e09a1ad Update npm packages 2025-08-02 19:00:36 +02:00
Druss99
5d038e8247 Add support for Control Point Influence Zones (#540) 2025-08-02 18:47:55 +02:00
Xisco Lladó
ce70952ee0 New campaign Operation_syrian_shield (#544)
* New campaign Operation_syrian_shield

* removed author on player factions. Credited to 'Fuzzle'

* changed recommended factions to the easy way

* Update operation_syrian_shield.yaml

removed mission time, and squadrons start full

* Update operation_syrian_shield.yaml

better campaign description

* added better squadron descriptions

---------

Co-authored-by: Xisco <x.llado@hotelinking.com>
2025-08-02 18:30:15 +02:00
Drexyl
1d16aba678 Add Moose as base plugin (#522) 2025-08-02 18:28:36 +02:00
Revinl
f3156ab51a Northern Guardian campaign for the Germany map by Revinl (#545) 2025-08-02 16:27:52 +00:00
ingax01
ed9fa37341 Updated SU-30 weapon definitions to version v2.8.03 Beta + CWS 3.70 (#546) 2025-08-02 18:20:01 +02:00
Starfire13
12aa1ee287 Add sniper pod to Viper loadout (#549) 2025-08-02 18:15:07 +02:00
Druss99
7e755f1eb1 bump pydcs (#548) 2025-07-28 22:18:29 +02:00
Starfire13
3da1689767 Fixed typos in Tetrarch description (#542) 2025-07-21 16:53:02 +02:00
Raffson
0671e45dde Restore squadrons for Essex-transformed carriers 2025-07-20 12:36:48 +02:00
Drexyl
c15b4ac83f Essex as AircraftCarrier hack (#541) 2025-07-19 18:21:33 +00:00
Starfire13
f1eb514295 Crossing the Rubicon improved performance (#539) 2025-07-14 12:38:57 +02:00
Raffson
df8f1c4291 Fix some auto-rotate issues in exercise quasar 2025-07-13 19:19:09 +02:00
Raffson
c32525b542 Formatting -_- 2025-07-13 19:05:10 +02:00
Raffson
db14b691cc Make F4U-1D Carrier/LHA capable 2025-07-13 18:55:09 +02:00
Raffson
052a04ca05 Properly support Essex carrier 2025-07-13 18:41:20 +02:00
Raffson
ad100a1a17 Overrride WFMR-window's reject to properly reset game-state 2025-07-13 13:46:57 +02:00
Drexyl
4412a0fa91 Add Tornado F3 ADV (1.0) mod support 2025-07-13 13:35:53 +02:00
Starfire13
23a7add2f1 Add missing Apache and FC Tiger II to Blufor Late Cold War faction (#538) 2025-07-13 13:34:21 +02:00
Starfire13
040362b333 Add Viet Cong 1965 faction (#537) 2025-07-13 13:32:59 +02:00
Starfire13
4155afc69a Set performance to 3/3 for Crossing The Rubicon (#536)
Setting this to 3/3 for now as folks are having performance issues
2025-07-13 13:32:05 +02:00
Starfire13
cf84c03d8f Implements campaign inversion for 13 of Starfire's campaigns (#535) 2025-07-13 13:31:32 +02:00
Starfire13
336384cd74 Implement campaign inversion for Crossing the Rubicon (#534) 2025-07-13 13:30:27 +02:00
Druss99
da7d3a3f1a Fix S-3B unable to do OCA/Aircraft (#533) 2025-07-08 22:25:40 +00:00
Starfire13
1231cb145d Add Germany Cold War campaign (#530) 2025-07-09 00:16:50 +02:00
Drexyl
47488a0bdd F4U-1D Banner Image (#529) 2025-07-08 07:55:58 +02:00
Starfire13
015859e91e F4U-1D loadouts (#528) 2025-07-08 00:39:34 +02:00
Raffson
9c0d114085 Save compat fix for Sinai's renamed Palmahim to Palmachim 2025-07-06 22:40:23 +02:00
Raffson
f907356f93 Pydcs update for new Sinai airports + save-compat fix 2025-07-06 22:37:07 +02:00
Raffson
fcb610423b Update beacon-data 2025-07-06 22:12:32 +02:00
Raffson
3086f64e98 F4U-1D support except banner & payloads 2025-07-06 22:09:50 +02:00
Raffson
5592a834c9 Downgrade h11 to 0.14 2025-07-06 21:59:09 +02:00
Raffson
1e48affc1c Add Japanese WW2 ground units 2025-07-06 21:59:09 +02:00
Raffson
f27b6e28e0 Add support Essex 2025-07-06 21:58:59 +02:00
Raffson
d0ff271a79 Update pydcs for 2.9.17.12034 2025-07-06 19:31:05 +02:00
Cedric Menard
9a00a60cd4 Initial support for Germany Cold War (#518)
* Initial support of Germany Cold War terrain

* Updated with latest beacon import

* Updated changelog and ran black

* Fixed the GermanyCW landmap and naming scheme

* Temporarily changed the requirements for pydcs to my branch (will switch back when merged)

* Updated landmap for germanycw with even fewer exclusions

* Removed unnecessary changes

* Updated requirements to lastest pydcs

* Fixed naming issues for Germany

* Update pydcs to latest commit for GCW support

* Add landmap to game.theater.__init__

* Update requirements.txt

* Resolve PyCharm type-waring

* Updated pydcs and exclusion of germany

* Updated land and sea shapefiles for Germany Cold War with new map limits

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-07-06 19:30:00 +02:00
MrPozor
5254ef3442 Fix #304: Waypoint numbers should start at 0 on map (#526) 2025-06-11 19:50:30 +02:00
MrPozor
fe8efbe905 Revert "Waypoint numbers should start at 0 on map. (#524)" (#525) 2025-06-10 21:28:14 +02:00
MrPozor
48040d7306 Waypoint numbers should start at 0 on map. (#524) 2025-06-09 22:58:15 +02:00
Raffson
f3ed25b5b2 Make EPLRS configurable
Resolves #517
2025-06-07 22:04:56 +02:00
Raffson
2d15db1932 Update h11 to 0.16.0 2025-06-07 19:40:19 +02:00
Raffson
1fa1f830d4 Update bug-report templates for v1.4.1 2025-06-07 19:33:05 +02:00
Raffson
0c0291fc5e Changelog for v1.4.1 2025-06-07 19:32:29 +02:00
Raffson
24c6b62ad4 Fix missing check in handle_ew_jamming w.r.t. plugin option 2025-06-07 19:23:36 +02:00
Starfire13
8c9343e0db Campaign inversion fix for Operation Vectron's Claw (#520) 2025-06-07 16:04:56 +02:00
Starfire13
a33da01af6 Blufor Late Cold War & Russia 1980 faction update (#521) 2025-06-07 16:03:40 +02:00
Starfire13
ce8ccb0227 Update README.md with correct link to preview builds page on the wiki (#519) 2025-05-30 13:10:07 +02:00
Drexyl
68a9dbd141 Update Grinnelli Designs F-22A Mod to 2.0.0 (May 2025) (#515) 2025-05-28 00:54:14 +02:00
Drexyl
4c3f0a82d9 Add EA-6B Prowler to ALQ-99 Jammer Pod (#516) 2025-05-28 00:48:55 +02:00
Starfire13
dc85287cd8 Add locales to Ukraine factions (#513)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-24 15:48:38 +00:00
szcz13
65f4a2cf86 Added new and updated weapons CLSIDs and payloads for MiG-31BM mod (#514) 2025-05-24 17:38:16 +02:00
Druss99
02de6d325a Add invisible FOBs (#504)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-18 17:50:47 +02:00
Druss99
7b16967641 Prevent saving packages with Escorts only (#509)
Fixes a bug that would later pop up when trying to calculate start-times...
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-17 15:58:35 +00:00
Starfire13
0e7ea0050f Add OCA-Aircraft to B-21's tasks (#510)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-17 15:57:12 +00:00
Starfire13
ec0e64eaf4 Add Growler + Raptor squadrons to some campaigns (#505) 2025-05-17 17:55:41 +02:00
szcz13
b12169f180 Update for MiG-31BM v2.6 (#512)
* Add files via upload

* Add files via upload

* Update start_generator.py

* Update faction.py

* Update QNewGameWizard.py

* Update QGeneratorSettings.py

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update MiG-31BM.lua

* Added SEAD Escort to MiG-31BM.yaml

* mig31bm.py fixed weapon injection

* Update mig31bm.py

formatted black

* Update faction.py

reformatted black

* Update start_generator.py

reformatted black

* Update __init__.py

* Update QGeneratorSettings.py

reformatted black

* added support for MiG-31BM mod

* Commit changes which can't seem to be discarded...

* Remove (presumably) accidentally copied file

* Remove unused imports

* Updated MiG-31BM mod version in QGeneratorSettings.py

* Added new Kh-31P missile to MiG-31BM mod

* Added new Kh-31P missile to MiG-31BM mod

* Updated MiG-31BM mod payloads for a new Kh-31P.lua

* Remove double entry

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-17 15:55:05 +00:00
Raffson
3a5d0e831c Formatting -_- 2025-05-10 16:40:57 +02:00
Raffson
903a6c4d5f Update changelog 2025-05-07 20:12:03 +02:00
Raffson
e36f07a3ff Preference option to set up preferences on every start (#503) 2025-05-07 20:02:21 +02:00
Raffson
2d65a038ee Remove print statements 2025-05-06 17:24:29 +02:00
Raffson
09617adc56 Passive defense for non-air-to-air flights in package with jammer 2025-05-01 19:57:01 +02:00
Raffson
01832b6594 Add MPS-410 to weapons data 2025-05-01 19:41:02 +02:00
Raffson
30ad71f93b Refactor & improve EW-jamming setup in mission-generator 2025-05-01 17:22:46 +02:00
Raffson
4f8ce77e50 Add "has_built_in_ecm" field to AircraftType
To be used with EW-jamming script...
2025-05-01 17:21:52 +02:00
Raffson
464ece60da Save-compat fix w.r.t. renamed airfield 2025-04-21 21:24:32 +02:00
Raffson
cafaea897d Pydcs update for new Lappi airfields 2025-04-21 21:21:36 +02:00
Raffson
58820dd6c6 Update Lappi beacons 2025-04-21 21:18:29 +02:00
Starfire13
8e845e6a27 Add Tornado IDS to Blufor Late Cold War faction (#502)
Add missing Tornado IDS
2025-04-21 18:04:13 +02:00
Raffson
e1b55816e3 Update actions/checkout to v4 2025-04-20 23:21:00 +02:00
Raffson
e95661c6a2 Update actions/setup-node to v4 2025-04-20 23:17:23 +02:00
Raffson
c96e0d8f28 Update actions/setup-python to v5? 2025-04-20 23:14:52 +02:00
Raffson
dfb65facb5 Another attempt at fixing the pipeline -_- 2025-04-20 23:01:22 +02:00
Raffson
8c6ca4de5f Pin python version for black in lint.yml 2025-04-20 22:58:19 +02:00
Raffson
1c3dee2098 Pydcs data update 2025-04-19 17:49:21 +02:00
Raffson
170e432008 Preparations for v1.5.0 2025-04-14 21:34:17 +02:00
Raffson
c8e3274c4e Update upload/download-artifact to v4 in release pipeline 2025-04-14 21:31:04 +02:00
Raffson
94105158de Remove note wr.t. datalink 2025-04-14 21:15:37 +02:00
Raffson
410821d63e Fix switched up radios for M-2000C 2025-04-14 14:11:10 +02:00
Raffson
2140ed9b67 Fix loadout issues w.r.t. Growler 2025-04-13 18:00:43 +02:00
Starfire13
cd77e3ee11 Squadron update for Clash of the Titans (#501) 2025-04-13 15:11:22 +02:00
Raffson
780078fec4 Fix issues w.r.t. custom forced-options config 2025-04-13 15:06:31 +02:00
Raffson
f8b4c7bcf5 Ability to configure forced-options via a file
https://github.com/dcs-retribution/dcs-retribution/issues/490
2025-04-12 18:31:01 +02:00
Raffson
de1f8a7abc Attempt to fix SplashDamage error w.r.t. line 604
Guard against event.target:getPosition() potentially being nil
2025-04-12 17:24:23 +02:00
Raffson
1db84307fe Add missing datalink properties for Superhornet mod 2025-04-06 15:38:30 +02:00
Raffson
ace9f6bbc5 Fix bug in Refueling wpt's predicate 2025-04-06 15:26:46 +02:00
Raffson
8cd2b55e04 Pydcs datalink fix w.r.t. Superhornet mod 2025-04-06 15:08:42 +02:00
Raffson
c404ea83fc Follow-up w.r.t. MiG-31BM by Szcs 2025-04-06 15:02:42 +02:00
Drexyl
a544b96f2c Super Hornet 2.4.2 Fixes 2025-04-05 22:28:41 +02:00
szcz13
ffaf905bf6 MiG-31BM by szcz mod support (#496)
* Add files via upload

* Add files via upload

* Update start_generator.py

* Update faction.py

* Update QNewGameWizard.py

* Update QGeneratorSettings.py

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update MiG-31BM.lua

* Added SEAD Escort to MiG-31BM.yaml

* mig31bm.py fixed weapon injection

* Update mig31bm.py

formatted black

* Update faction.py

reformatted black

* Update start_generator.py

reformatted black

* Update __init__.py

* Update QGeneratorSettings.py

reformatted black

* added support for MiG-31BM mod

* Commit changes which can't seem to be discarded...

* Remove (presumably) accidentally copied file

* Remove unused imports

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-04-05 20:19:22 +00:00
Raffson
1520c8c3a3 Attempt to improve SEAD with ARM 2025-03-30 21:48:09 +02:00
Raffson
fc1a768e4c Update/Add F/A-18C's SEAD loadouts 2025-03-30 21:41:08 +02:00
Raffson
89f159edcb Fix FF-bug when interrupt is set to "At takeoff time" 2025-03-30 18:23:37 +02:00
MetalStormGhost
b671d520c9 Cold War assets mod v1.2 support (#482)
* Implemented support for the Cold War assets mod (ex Tu-16) v1.0 by tripod3

* Rename     resources/ui/units/aircrafts/banners/Tu-16.jpg (from resources/ui/units/aircrafts/banners/Tu_16.jpg)
Rename     resources/ui/units/aircrafts/banners/Tu-4K.jpg (from resources/ui/units/aircrafts/banners/Tu_4K.jpg)
Rename     resources/ui/units/aircrafts/icons/Tu-16_24.jpg (from resources/ui/units/aircrafts/icons/Tu_16_24.jpg)
Rename     resources/ui/units/aircrafts/icons/Tu-4K_24.jpg (from resources/ui/units/aircrafts/icons/Tu_4K_24.jpg)

Also added coldwarassets handling in ModSettings() call.

* Added a DEAD loadout for the Tu-22KD.

* Updated Cold War assets mod by tripod3 support to v1.2

* Modified   pydcs_extensions/coldwarassets/coldwarassets.py
Modified   resources/units/aircraft/B_47.yaml

* Modified   qt_ui/windows/newgame/WizardPages/QGeneratorSettings.py

* Added      resources/units/aircraft/Yak_28.yaml

* Added banners, icons, loadouts and unit yamls by Biggus for new Cold War Assets added in mod version 1.2.

* Removed the Tu-128 Fiddler from soviet_union_1965.json because the Tu-128M variant is a 1979 modernization.

* Remove CAS & Armed Recon from Yak-28

* Fix typo

* Add BAI & DEAD to Tu-4K

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-03-29 20:09:58 +00:00
Drexyl
889b7299d3 Add Cowboy's E-7A Wedgetail AI Mod (#495) 2025-03-26 20:40:07 +01:00
Drexyl
631321950e Update Super Hornet 2.4.2 Payloads (#494) 2025-03-25 18:48:32 +01:00
Drexyl
af4bba7396 EW Script 2.0 - Enable for AI (#491)
* EW Script 2.0 - Enable for AI

* Refactor

* Remove unnecessary code + refactor

* Fix test -_-

* Cleanup

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
Co-authored-by: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2025-03-23 20:32:51 +01:00
Raffson
c3fea788f3 Improve AntiShip tasking 2025-03-23 20:27:11 +01:00
Raffson
ee8552a4c6 Update most Python packages 2025-03-23 16:08:48 +01:00
Raffson
2cb1695fb1 Shorten line for black -_- 2025-03-23 14:57:44 +01:00
Starfire13
07aea3985a Clash of the Titans - new AFG East + West campaign (#493) 2025-03-23 12:31:50 +01:00
Raffson
0e0f1ef315 Fix plugin-option exception on new-game
https://discord.com/channels/1015931619187621999/1352641851374571582
2025-03-22 22:46:33 +01:00
Raffson
3610062976 Update beacons for Afghanistan 2025-03-22 21:48:27 +01:00
Raffson
e7c3e41396 Pydcs update (data export + airports Afghanistan) 2025-03-22 21:47:32 +01:00
Raffson
019141f25b Update npm packages 2025-03-22 17:30:41 +01:00
Drexyl
0a930fa2ce Update F/A-18E/F/G Super Hornet Mod to 2.4.0 (#484)
* Update F/A-18E/F/G Super Hornet Mod to 2.4.0

* Update F/A-18E/F/G Super Hornet Mod to 2.4.0

* ECM Pods for E/A-18G Growler to allow EW Jammer 2.0 Plugin

* Update weapons classes for custom weapons

* Adjust default loadouts

* Update for Super Hornet 2.4.2

* Change Settings page to reflect 2.4.2

* Remove redeclared weapons

* Add Recovery-tasking to tankers

* Rewire new tankers to old tanker modsetting

* Small bugfix w.r.t. CLI-tool

* Save-compat fix: remap old Superbug_AITanker to FA_18ET

* Add empty line at EOF

* Revert "Add empty line at EOF"

This reverts commit 4a7f616e47.

* Restore checkbox for AI Tankers

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-03-22 16:15:33 +00:00
Raffson
398bb0775d Run black after update 2025-03-22 17:10:01 +01:00
Raffson
71504afd01 Update black 2025-03-22 16:06:54 +01:00
Raffson
5744b12699 Update Jinja2 to patch vulnerability 2025-03-22 16:05:04 +01:00
Starfire13
f03f0bf103 Fix incorrect aircraft type in Anvil of War (#488) 2025-03-02 19:52:08 +01:00
Raffson
aaa47191af Pydcs update for the proper fix wrt liveries... 2025-02-16 18:37:53 +01:00
Raffson
083475b40c Revert "Update pydcs for livery-scanner fix"
This reverts commit 2660affa63.
2025-02-16 17:43:32 +01:00
Raffson
2660affa63 Update pydcs for livery-scanner fix 2025-02-16 15:44:37 +01:00
Starfire13
cb988f854d Add new Caucasus campaign - Slava Ukraini (#485) 2025-02-16 00:18:28 +01:00
Druss99
d4371ccbf6 CurrentHill Ukraine Assets Pack (#481) 2025-02-16 00:17:43 +01:00
MetalStormGhost
308805e09b Mirage III mod version 2.5.7.01 support (#351)
* Implemented support for the Mirage III mod version 2.5.7.01.

* Switched the Mirage III CAS loadouts for bombs.

* Updated changelog.

* Modified   resources/factions/argentina_1982.json
2025-02-15 18:52:52 +01:00
Starfire13
34e7093198 Fix Able Archer strike targets broken by map update (#486) 2025-02-15 18:46:16 +01:00
Starfire13
459940308e Add Mi-26 to Redfor factions (#483) 2025-02-08 21:40:41 +01:00
Eclipse/Druss99
5fc5e27ee0 remove unnecessary aircraft icon mapping 2025-02-05 23:37:07 +01:00
Eclipse/Druss99
394a9d05b2 fix missile sites not being removed when mod is disabled 2025-02-05 23:37:07 +01:00
Eclipse/Druss99
1e74f8f124 fix error if missions directory does not exist 2025-02-05 23:37:07 +01:00
Druss99
4ef2f6c22a Allow refueling & escort on friendly FOBs, Airfields & Carriers (#477) 2025-02-04 22:36:41 +01:00
Raffson
5270ad42db Update upload-artifact to v4 2025-01-30 21:58:48 +01:00
Starfire13
7e297135be Update campaign & add new faction (USA 2020) (#476)
* Add files via upload

* Add files via upload
2025-01-30 21:32:42 +01:00
Eclipse/Druss99
60bfde3b61 update changelog and fix typing 2025-01-28 19:09:02 +01:00
Eclipse/Druss99
5fc967cfd2 Missile sites now fire at random times 2025-01-28 19:09:02 +01:00
Druss99
e41c923ad4 Adjust FF to check for flights (#473) 2025-01-28 19:05:11 +01:00
Druss99
1bb0db920b More generic layout for CH anti ship sites, nerf + add new sites for China (#472) 2025-01-28 19:03:17 +01:00
Starfire13
eeaae101d2 Remove SEAD and SEAD Escort from Gripen (#475) 2025-01-28 18:58:32 +01:00
Druss99
a1df78c099 fix save compat for changed mod unit names (#471) 2025-01-28 18:56:05 +01:00
Starfire13
0be821b972 Update S-350.yaml to LORAD (#470) 2025-01-28 18:54:42 +01:00
Starfire13
10b3dbf7f8 Update S-350_Site.yaml to LORAD (#469) 2025-01-28 18:53:57 +01:00
Starfire13
e48bf4a435 Update Blufor/Redfor Current + update Starfire’s campaigns (#468)
* Add files via upload

* Add files via upload
2025-01-27 20:33:00 +01:00
Druss99
3c955036d2 Fix blufor current (#467) 2025-01-26 22:39:45 +01:00
Raffson
2570293416 Fix incorrect stop trigger trigger for BARCAP 2025-01-26 18:57:59 +01:00
Raffson
f31098419e Fix bad unit yaml 2025-01-26 16:03:09 +01:00
Druss99
1d4b0608de Update swedish military assets pack (#464)
* Update swedish military assets pack

* re add old variant names for save compat

* Update faction.py

fixed presets

* fix double variant name
2025-01-26 14:54:58 +00:00
Druss99
431ec1c382 Correctly remove CH presets for russia (#466) 2025-01-26 15:40:18 +01:00
Starfire13
7c8a0fc032 Update Graveyard of Empires + Red Sea Rising (#463)
Use Blufor Current to support CH USA Asset Pack
2025-01-26 15:37:34 +01:00
Starfire13
da96904016 Anvil of War + Add CH USA Asset Pack to Blufor Current (#462)
* Add files via upload

* Add files via upload
2025-01-26 15:33:39 +01:00
Druss99
a76fe34f3f CurrentHill USA military assets pack (#461)
* usa military assets pack

* minor fixes to have missiles

* tweak nasams 3

* fix preset groups bug

* adjust b-21 name

* Update faction.py

bugfixes will go in a different branch
2025-01-26 15:32:12 +01:00
Druss99
05e80fa144 Adjust S-350 site for balance (#465) 2025-01-26 15:29:25 +01:00
Raffson
5db63a2ebf Fix mission-scheduler bugs wrt BARCAP
- BARCAPs over regular CPs are no longer planned at the same time
- Carriers were planning 1 BARCAP too much if a second wave would be introduced, i.e. (BARCAP-duration / mission-duration) < 1
2025-01-25 19:13:55 +01:00
Druss99
0613c8f423 Minor Asset pack fixes (#460) 2025-01-20 20:38:26 +01:00
Raffson
db73a3aa27 Align pilots in create-flight dialog 2025-01-19 20:53:50 +01:00
Raffson
431492fa77 Introduce support for "rebel-zones" 2025-01-19 19:06:19 +01:00
dependabot[bot]
942faeeaa3 Bump virtualenv from 20.26.2 to 20.26.6 (#459)
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.26.2 to 20.26.6.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/20.26.2...20.26.6)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-19 13:57:01 +00:00
Starfire13
0b40777d68 New Kola campaign - The Anvil of War (#458) 2025-01-19 13:47:45 +01:00
Starfire13
bb3c657158 Add in F-22A mod version number (#454) 2025-01-17 08:06:32 +01:00
Starfire13
83aac3df44 Add Blufor Current faction (#453) 2025-01-17 08:05:10 +01:00
Starfire13
72910b3353 Update Velvet Thunder with Vietnam War Vessels (#452) 2025-01-15 06:27:47 +01:00
Starfire13
587741383c Update Tu-160 mission types (#451) 2025-01-12 20:39:59 +01:00
Raffson
6965133a33 Filter "self" when ground units retreat from CP
Fixes an infinite loop in case a connection to the same CP is made in the template miz file of the campaign. It's basically wrong input, but suppose we'd have a use-case for it in the future, it would still make sense to have ground units retreat to a CP that's different from their origin...
2025-01-12 16:04:52 +01:00
Starfire13
ed4961cdbc New Redfor factions with CurrentHill mods + update Graveyard of Empires (#449)
* Add files via upload

* Add files via upload

* Update and rename redfor_modern.json to redfor_current.json
2025-01-09 20:58:12 +01:00
Druss99
f07cc83c5b CurrentHill Russian Military Assets Pack (#448) 2025-01-07 20:54:50 +01:00
Raffson
a10b94dcee Update fastapi, starlette & Jinja2 2025-01-05 20:43:03 +01:00
Raffson
f112f227cc Update armed forces when preset-group is added 2025-01-05 14:48:28 +01:00
Raffson
807bb16ddf Save-compat improvements 2025-01-05 14:48:28 +01:00
Astro
4c9dba2fe5 Vietnam War Vessels Mod v0.9.0 integration (#435)
* vietnamwarvessels first batch

* Ship YAMLs

* aircraft yamls initial version, need more work

* initial helicopter yamls

* update aircraft yamls

* Added DDs Fletcher and Sullivans

* ship icons

* aircraft banners and icons

* no huts

* update py files to VWV v0.9.0

* update aircraft yamls, add vigilante

* added 2 ships for VWV v0.9.0

* mig-21mf yaml

* icons and banners additional units v0.9.0

* added VWV units to USA_1970 and Vietnam_1970 JSONs

* Revert "added VWV units to USA_1970 and Vietnam_1970 JSONs"

This reverts commit ed0b28dc36.

* A-1H yaml update

* mig-17 yaml update

* update helicopter yamls

* extension init

* weapon injections

* icon filenames _24 added

* removed tasks 0 from yamls

* hh2d yaml fix

* added VWV v0.9.0 to factions USA and Vietnam

* added max_range to aircraft yamls

* housekeeping

* Flyable to False - not available in mod version

* minor edits

* ignore test campaign

* deleted tasks

* weapon luas blue air

* added task numbers from task.py

* weapon luas red air

* task id numbers in comment

* switched weapon lua from aim-9J to aim-9D

* removed test campaigns

* update payload luas with payload names from flighttype.py

* Changed AIM-9D to 9B, 9D does not work

* removed air assault task for HH-2D

* Cva_31 added to runway_is_operational()

* CVA-31 added to naval_units in faction jsons

* add strike and cas tasks to ra-5c

* correct typo

* Added Armed Recon as task and payload to most a/c

* ignore pre-commit-config.yaml

* pre-commit-config

* black reformat controlpoint.py

* Added tasks to Vigilante (next to Recon) containing attack subtasks, which allow it to be scheduled for missions

* added ships to UNITS_WITH_RADAR

* remove pre-commit-config from gitignore

* added red aircraft to nva_1970 faction

* fixed black's complaint (two empty lines, should be one)
2025-01-05 13:50:01 +01:00
Druss99
e93ebbe78c add chinese asset pack to radar db (#445) 2025-01-04 17:52:35 +00:00
Astro
3e1f0bc694 Skynet additional settings (#443) 2025-01-04 17:24:51 +01:00
Starfire13
4e6b4a9b5d Add Redfor (China) 2020 faction + update campaigns (#444)
Red Sea Rising & Exercise Vegas Nerve updated with new faction
2025-01-04 03:12:54 +01:00
Astro
ec81e6c659 Campaign Into the Hornet's Nest (#442) 2025-01-03 18:21:11 +00:00
Druss99
bc157630e9 China military assets support (#440) 2025-01-03 19:19:10 +01:00
Starfire13
918789cee4 Fix Wadiya 2010 formatting (#441)
Fixed formatting
2025-01-02 16:50:55 +01:00
Eclipse/Druss99
dec57fccf9 add vertical takeoff and landing option 2025-01-02 03:24:01 +01:00
Druss99
dd408f392b Fix airwing config not properly saving or loading (#437)
* fix airwing config not properly saving or loading

* add helper message to save function

* bugfixes

* remove unnecessary import used during testing

* yet another forgotten import

* change raise error to log warning
2025-01-01 15:56:08 +01:00
Raffson
164873d3b1 Fix planning error in CAP-builder if no enemy airfields left 2024-12-31 20:11:18 +01:00
Raffson
7ea144e7c7 Fix save-compatibility issue 2024-12-31 19:36:13 +01:00
Druss99
0d04e0c72e Faction editor update (#434)
Resolves #166 

* init faction editor

* update persistency

* minor fixes

* typing smh

* small fixes

* forgot the changelog -_-
2024-12-31 00:24:12 +01:00
Raffson
f36526b5de Fix mismatch between terrain names
Pydcs & Retribution don't always match up...
2024-12-28 20:46:41 +01:00
Starfire13
56e0c901c5 Operation Desert Aladeen (#433) 2024-12-28 17:56:58 +01:00
Raffson
592b1a7833 Don't allow carrier's path over land in UI 2024-12-28 01:06:08 +01:00
Raffson
cf38113cde Only remove landmap before saving and immediately restore 2024-12-28 00:32:32 +01:00
Raffson
10e7ee7902 Add first Iraq campaign by Starfire
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-12-27 23:32:22 +01:00
Raffson
f2eec530db Load landmap data on the fly
Avoids saving unnecessary data to the save-file
2024-12-27 23:32:21 +01:00
Raffson
9c50c062e9 Support for Iraq 2024-12-27 23:30:57 +01:00
Raffson
a173fa7e5b Update Kola beacons 2024-12-26 17:27:09 +01:00
Raffson
63785174db pydcs update wrt Iraq temperatures 2024-12-26 16:45:58 +01:00
Raffson
ffe0ede285 Fix error while loading/setting campaign settings 2024-12-26 16:23:04 +01:00
Raffson
d1b484f560 Support for auto-fog
implemented as a setting...
2024-12-26 02:51:58 +01:00
Raffson
3ef6ae20c7 Support for Bandit's cloud presets mod (v15) 2024-12-26 01:35:30 +01:00
Raffson
f3b1964e06 pydcs fix 2024-12-26 00:21:56 +01:00
Raffson
a9e784c0e3 Regroup settings per page in code 2024-12-25 23:40:06 +01:00
Raffson
3012fb8661 More pydcs updates 2024-12-25 23:03:38 +01:00
Raffson
1c5445c254 Add types in method's signature + formatting 2024-12-25 00:25:34 +01:00
Raffson
db3670b759 Fix NGW bug wrt missing plugin-options in campaign settings 2024-12-24 18:14:24 +01:00
Raffson
ea09b6be32 Have BARCAP/TARCAP engage anti-ship/cruise missiles 2024-12-24 06:43:52 +01:00
Raffson
881228d273 Potentially useful method for Doctrine class... 2024-12-24 06:35:10 +01:00
Raffson
c75bf23701 Small cleanup 2024-12-24 06:35:10 +01:00
Raffson
020281bf80 Fine-tuning recovery tankers 2024-12-24 06:35:09 +01:00
Raffson
ef77637c9a Refactor patrol_duration for refueling flight-plans 2024-12-24 06:34:46 +01:00
Raffson
15e6f81bb5 Reference primary flight's RTB time for Escort's split wpt 2024-12-24 06:34:46 +01:00
Raffson
8b03bc496d Move tanker patrol duration setting to doctrine page 2024-12-24 06:34:46 +01:00
Raffson
add81472c6 Schedule 2 simultaneous BARCAPs over carriers 2024-12-24 06:34:45 +01:00
Raffson
0e1f2e4185 Configurable BARCAP patrol duration in settings 2024-12-24 06:34:13 +01:00
Raffson
1a628888f7 AEWC optimizations
- setting for on-station time
- always include CVN carriers as targets
- autoplanner adjustment for continuous coverage
2024-12-24 06:34:12 +01:00
Raffson
2c2573240a Lower unusually high anti-ship task-priority for S-3B 2024-12-24 06:15:59 +01:00
Raffson
75c29dd907 Always plan & plan more BARCAP for carriers 2024-12-24 06:15:59 +01:00
Raffson
f1dc431d2f Fix scheduling issue for recovery tankers 2024-12-24 06:15:59 +01:00
Raffson
db9cf441fb Avoid autoplanner planning AirAssault against carriers 2024-12-24 06:15:58 +01:00
Raffson
a06e9d0ec7 Plan more ANTI-SHIP against ship-groups with air-defences 2024-12-24 06:15:58 +01:00
Druss99
dd7e4c908e Recovery tanker support (#429)
* fix conflict

* squash bugs and reuse patrol layout

* fix tanker tacan and formatting

* fix unlimited fuel option

* update pretense for tanker changes

* reuse refueling flight plan and bugfix for sunken carrier

changelog

* remove unitmap dependency

* formatting and more unit map removal

* more formatting

* typing and black

* keep tanker out of clouds

* fix if there are no clouds

* better cloud handling

* groundwork for recovery task

* remove changes to game/commander

* Finishing up recovery tankers

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-12-23 04:39:10 +00:00
Raffson
a4671571bc Fix stupid mistake w.r.t. SC deck-crew sync -_- 2024-12-22 03:19:13 +01:00
Raffson
5470cb416c Sync SC deck-crew option to miz' options 2024-12-21 19:07:05 +01:00
Druss99
6d0dbd4d1c Bugfix if settings directory doesn't exist (#432)
* bugfix if settings directory doesnt exist

* Create directories in persistency

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-12-21 16:44:31 +00:00
Druss99
266e69a6ce Default settings support (#428) 2024-12-18 13:47:05 +01:00
Raffson
8f384b35dc Fix bug in waypoint tab
Seems like I gave some inaccurate feedback -_-
2024-12-18 00:47:56 +01:00
Raffson
e02698d8a8 Autoplan Air-to-Air Escorts for AWACS & Tankers 2024-12-18 00:47:56 +01:00
Raffson
d2fa027cdd Fix outdated settings in campaign definitions 2024-12-17 14:44:28 +01:00
Starfire13
4c7aa8ddde Red Sea Rising update (#431) 2024-12-17 14:25:40 +01:00
Druss99
9d6f1552c8 Loadout selector bugfix (#430)
fix loadout selector being disabled if awacs or refueling is selected and then changed to something else
2024-12-17 14:23:30 +01:00
Raffson
06d3805946 Enable Supercarrier's LSO & Airboss stations 2024-12-16 19:59:59 +01:00
Raffson
caf624832f Small refactor 2024-12-16 19:59:49 +01:00
Raffson
cc90627ee5 Support for supercarrier deck-crew 2024-12-16 19:59:49 +01:00
Eclipse/Druss99
aae4c905b9 Better handling of flights with no loadouts ex. Tankers 2024-12-16 03:11:21 +01:00
Raffson
64d60e5ccf Datalink support + pydcs update
Support for 2.9.10.4160, though without Iraq, but finally there's some basic support for datalink...
2024-12-16 03:08:40 +01:00
Druss99
0eb06f9af5 Add TOT generation for all waypoints (#425) 2024-12-15 00:51:49 +01:00
Raffson
80b3af18df Follow-up on loadout-selector in create-flight dialog 2024-12-14 23:54:02 +01:00
Druss99
3d778a1ce0 Add ability to select loadout on flight creation (#426)
* Add ability to select loadout on flight creation

* Add pylon info on hover and add default loadout autoselect

* move loadout selector to method

* Cleanup loadout delegate
2024-12-14 23:38:41 +01:00
Druss99
09d7a4babf Bugfix for UnitPaloads directory not found (#424)
* Bugfix for mission editor directory not found

* cleanup code
2024-12-09 21:45:51 +00:00
Raffson
94a14f40cb Fix bug w.r.t. enable/disable JTAC for OWNFOR 2024-12-08 17:32:25 +01:00
Starfire13
6d9478e0d4 Fix Harrier loadout conflict (#423)
GBU & Sidearm were causing conflicts
2024-12-08 16:51:33 +01:00
Starfire13
1c36d9ec75 Fix F-4E loadout w.r.t. GBU-8 (#422) 2024-12-07 21:43:06 +01:00
Raffson
772a15bab5 Enable/Disable JTAC for OWNFOR faction 2024-12-01 00:36:09 +01:00
Raffson
98f0c93012 Avoid recreating flight-plan when syncing package wpts 2024-11-24 17:44:01 +01:00
Starfire13
5e2f86de96 Add JTAC to Blufor Late Cold War (#418) 2024-11-21 21:26:02 +01:00
Raffson
94baaecf8c Fix TOT not changing after abort 2024-11-16 19:31:36 +01:00
Dan Albert
057f3fe53b Don't allow changing TOT for started packages. 2024-11-16 19:28:23 +01:00
Dan Albert
ce4c73098d Add locking to some UI actions.
This is by no means complete. The bugs that this solves were already in
6.x, but we'd hidden the speed controls for the sim in that release, and
have always said that anything done after pressing "go" the first time
is undefined behavior. This is the first step on making those mid-sim
actions behave correctly.

UI actions such as creating a new package need to be executed between
ticks of the sim. We can either do this synchronously by blocking the UI
until the tick is done executing, acquiring a lock on the sim, executing
the action, then releasing the lock; or asynchronously by queueing
events and letting the sim execute them when it completes the current
tick (or instantly if the sim is paused).

Anything that comes from the new UI (currently just the map) must be
asynchronous because it goes through the REST API, but for the old UI
it's simpler (and because the lock will only be acquired as quickly as
the user can act, shouldn't slow anything down) to do this
synchronously, since it's difficult to use coroutines in Qt.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2024-11-16 19:09:42 +01:00
Starfire13
eb06a9a9e8 Update F-4E loadouts (#416) 2024-11-16 13:07:22 +01:00
Starfire13
a6b1805290 Update for Able Archer 83 (#417) 2024-11-16 13:03:47 +01:00
Raffson
08e55d9e43 Avoid autoplanning ArmedRecon against naval CPs 2024-11-15 18:53:43 +01:00
Starfire13
27c8f01853 Update Operation Peace Spring with new scenery targets (#415) 2024-11-14 18:59:18 +01:00
Raffson
84c4b992e0 Improve AGL to AMSL transition for naval waypoints
Some maps have inaccurate bounds for sea-zones, thus waypoints that end up being too close to the shore may keep using AGL which could still lead to trouble. Adding a condition to check whether a point is "not on land" will likely fix this issue for maps that have gaps between sea-zones and inclusion-zones around the shoreline...
2024-11-09 14:49:38 +01:00
Raffson
b5225f03a1 Fix #414
Since there's little difference between the two generators for `generate_plugin_data`, we'll have the pretense lua-generator call its super...
2024-11-08 21:02:08 +01:00
Chris Ella
add26ab18e fix: wrong runway repair message for player/enemy
fix #412
2024-11-05 12:41:04 +01:00
Raffson
aef931fc3a Update pydcs for fix w.r.t. AFAK exception 2024-11-03 14:25:48 +01:00
Cedric Menard
2091fdbb27 Add Mbot's Call Artillery Script plugin (#410)
* Add Mbot's Call Artillery Script plugin

* Applied PR comments

* Fix for wrong indentation, remove unused client skill check, added changelog item
2024-11-03 13:02:36 +00:00
Raffson
e959933861 Save-compat fix for Syria 2024-11-01 03:47:01 +01:00
Raffson
eaa73c84ae Set preferred red-alert state for frontline units 2024-10-31 14:01:48 +01:00
Raffson
3147ae6e5c Save-compat fix for South Atlantic 2024-10-31 00:55:58 +01:00
Raffson
7b9bdf84dc Update beacons 2024-10-31 00:45:48 +01:00
Raffson
9e370e1d8d Update pydcs 2024-10-31 00:44:16 +01:00
Raffson
e85d1e8ca2 AGL to AMSL option for naval waypoints
Introduce an option to switch waypoints to AMSL when waypoint is above water. DCS references the bottom of the sea when using AGL, which causes issues for helicopters when they try to fly at altitudes that are lower that the sea bottom, giving them a tendency to fly into the water...
2024-10-30 01:11:53 +01:00
Starfire13
696e2dbbe8 Fix very outdated links (#409) 2024-10-29 22:14:42 +01:00
Raffson
6a5097659b Sync package wpts when primary flight's wpts change
Also recreates all other flight-plans in the package to ensure JOIN, INGRESS & SPLIT are updated
2024-10-28 23:47:26 +01:00
Raffson
b124c6cc61 Fix nav_to for AirAssault
Depending on whether it's a Hercules with paratroopers or a helicopter, ingress' position is going to be different
2024-10-28 20:23:22 +01:00
Raffson
4de7b1c923 Force utf8 encoding in TXT-briefing
Fix #408
2024-10-28 12:50:01 +01:00
Raffson
4711473b64 Fix one-off in FlightWaypointList's indexes
Fixes #304
2024-10-12 18:33:10 +02:00
Raffson
6ae32b13b8 Format missed files with black 2024-10-12 17:50:54 +02:00
Raffson
5c56e7f64e Update npm packages 2024-10-12 17:33:01 +02:00
Raffson
5fdf38c663 Format with updated black 2024-10-12 17:33:01 +02:00
Raffson
11a9d67b91 Update black 2024-10-12 17:33:01 +02:00
dependabot[bot]
216d9bc048 Bump webpack from 5.91.0 to 5.95.0 in /client (#407)
Bumps [webpack](https://github.com/webpack/webpack) from 5.91.0 to 5.95.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.91.0...v5.95.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 15:25:14 +00:00
dependabot[bot]
3bb6c43aca Bump micromatch from 4.0.5 to 4.0.8 in /client (#404)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 17:23:29 +02:00
dependabot[bot]
af9416e225 Bump body-parser and express in /client (#403)
Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.1)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 15:19:19 +00:00
dependabot[bot]
73feccde9d Bump rollup from 2.79.1 to 2.79.2 in /client (#402)
Bumps [rollup](https://github.com/rollup/rollup) from 2.79.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v2.79.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 15:18:52 +00:00
Raffson
ff2ec07d83 Move constants from laypout.py to theathergroup.py
Should fix the "FIXED_POS_ARG not defined" error
2024-10-12 16:35:04 +02:00
Raffson
4aacc68f4a Include layouts & groups from Saved Games folder
Partial #244
2024-10-06 22:33:01 +02:00
Raffson
69c6f8f2f2 Update beacons 2024-10-06 22:27:51 +02:00
Raffson
4c3b16e1da Support for fixed position & heading in layouts 2024-10-06 22:27:51 +02:00
Raffson
2b780e3d69 Adjustable OPFOR headings when OPFOR ATO is selected 2024-10-06 22:27:50 +02:00
Raffson
a68bcb9ea1 Add class to Patriot AMG 2024-10-06 22:27:50 +02:00
Raffson
0770fafbcb Save-compat fix for Syria airport rename
Amman is now Marka...
2024-10-06 12:41:51 +02:00
M Chimiste
169ef26329 Set Pretense Player Flight Waypoints to CPs (#385) 2024-10-06 01:12:02 +02:00
Raffson
168ba7bd1e Pydcs update 2024-10-06 00:18:08 +02:00
Raffson
59f98a4c16 Make combat landing configurable 2024-10-05 23:04:06 +02:00
Raffson
9bd6c6c404 Overload takeoff_time for PatrollingFlightPlan
Fixes bug where TARCAP get screwed TOTs due to a SEAD Sweep flight in a CAS package
2024-10-05 22:40:07 +02:00
Starfire13
96e8208e3c Fix typo + improve arty spotter script description (#400) 2024-09-22 23:35:48 +02:00
Raffson
44658f8eec Skip EscortType for SEAD Sweep planned during CAS
Seems like the EscortType would cause the flight to be pruned if no IADS threats surround the CAS zone, but we'd like to plan it regardless to tackle air defenses along the front-line
2024-09-22 22:47:26 +02:00
Raffson
dae57abeff Fix 'getName' error in base script
Turns out weapons also generate a dead event, but presumably some of them don't have a 'getName' method...
2024-09-22 22:38:14 +02:00
Raffson
87ca233f20 Only pass air-defenses to IpSolver when creating package waypoints
Aims to solve an issue where waypoints would completely disregard air defenses and overfly them due to interference from airbase threat ranges...
2024-09-21 22:57:08 +02:00
Raffson
126d70792f Another attempt to improve DEAD autoplanner 2024-09-21 22:57:07 +02:00
Raffson
9d2345ea3a Fix weird spacing in Campaign Management settings 2024-09-21 20:12:41 +02:00
Raffson
7a84181bbc Add UI-zone for SEAD Sweep 2024-09-21 19:30:21 +02:00
Raffson
a7d091c142 Fine-tune attempt wrt DEAD autoplanning
A small note, this also affects the aggressiveness wrt SHORAD & AAA
2024-09-15 22:08:58 +02:00
Raffson
be554c54b3 Plan IADS degradation as last
The previous steps identify IADS locations, so moving this "up the list" has detrimental effects...
2024-09-15 22:05:43 +02:00
Raffson
49211dae4f Autoplanner support for ArmedRecon 2024-09-15 22:05:42 +02:00
Raffson
73d2f8fda1 Change ArmedRecon's task-priority when determining primary task 2024-09-15 22:05:42 +02:00
Raffson
2cba1f4124 Account for aircaft's task-priorities in AirWing.best_squadrons_for 2024-09-15 22:05:42 +02:00
Raffson
f5bb653ad8 Rework (OPFOR) autoplanner aggressiveness setting
Also introduces a setting for OWNFOR
2024-09-15 22:05:42 +02:00
Raffson
d35962b784 AirAssault autoplanner support for non-frontline CPs
Aims to solve the issue where AirAssault won't plan against CPs that don't have an active frontline, including isolated CPs.
2024-09-15 22:05:41 +02:00
Raffson
f63939ce3c Include isolated points in objectivefinder 2024-09-15 22:05:41 +02:00
Raffson
8f8ee8c48e Update upload-artifact to v3 2024-09-15 02:38:16 +02:00
Raffson
7e8cbe0de2 Fix incorrect strike target location for TheaterUnit 2024-09-14 16:37:10 +02:00
Starfire13
8a47dce4b5 Update max frontline units description (#399) 2024-09-09 21:10:02 +02:00
Raffson
242d1a14a7 Limit/Suppress AI radio callouts for player flights 2024-09-07 21:04:49 +02:00
Starfire13
1f21ed0c1d Add new Sinai campaign - Red Sea Rising (#397) 2024-08-31 19:56:24 +02:00
Raffson
d44218ba55 Invalidate squadron livery if not found or incompatible 2024-08-25 15:53:35 +02:00
Raffson
aa26a2fa79 Avoid restoring old AircraftType data
This solves the bug where the default_livery would get overwritten with whatever value was already present from data that's loaded from the last campaign, which was usually set to None...
Possibly this also solves the bug where Armed Recon is suddenly not available anymore, because most likely the tasking was being overwritten as well...
2024-08-25 15:20:16 +02:00
Starfire13
ced69c98fc Change country to CJTF-Red for Redfor factions (#396)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-08-25 10:59:53 +00:00
Starfire13
4082cad3cf Add livery for 18th ARS (KC-135 squadron) (#395)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-08-25 10:58:55 +00:00
Raffson
fd42b03d78 Log error if beacon data can't be found
This would prevent mission generation otherwise...
2024-08-24 20:22:14 +02:00
Raffson
98360c8388 Remove obsolete beacons file 2024-08-24 18:28:44 +02:00
Starfire13
daee4d96d7 Add default liveries to some aircraft with no preset squadrons (#393)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-08-24 16:28:32 +00:00
Starfire13
3e488a738e Update Able Archer 83 and Exercise Bright Star (#394) 2024-08-24 18:25:49 +02:00
Starfire13
26bd7629f0 Disable Hercules autoplanner tasks that AI can't perform (#392)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-08-24 16:23:30 +00:00
Raffson
9b857d7b0e Cope with mismatch in folder-/file-name for Sinai wrt beacons 2024-08-23 19:09:29 +02:00
Raffson
1388985048 pydcs beacon fix 2024-08-18 22:11:19 +02:00
Raffson
ac6c8c3e14 Add more bombers & AEW&Cs to Redfor factions
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-08-18 21:51:40 +02:00
Raffson
171f0722dc Fix bug in default squadron assigner/loader
The root cause of the issue are lines like "if aircraft in faction.all_aircrafts" that weren't working as intended, i.e. the condition would always fail. By implementing the __eq__ method we fix this issue, effectively making the default squadron assigner make use of squadrons instead of simply skipping them.
2024-08-18 18:19:58 +02:00
Starfire13
3a1d90ce6a Add MiG-21 to Blufor Modern (#391) 2024-08-17 11:49:10 +02:00
Starfire13
818803254b Add CH-47F to campaigns and fix static armour group spawn points (#389) 2024-08-17 07:15:25 +02:00
dependabot[bot]
a9a4a1fed4 Bump axios from 1.6.8 to 1.7.4 in /client (#388)
Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.8...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-16 11:04:16 +00:00
Raffson
ea9c459942 Disable Nevatim/Ramon airbase hack for inoperable slots 2024-08-16 12:57:25 +02:00
Raffson
16162f2698 Fix whitespace in factions 2024-08-16 12:56:41 +02:00
Raffson
a8c9a81ccb Update factions with CH-47F
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-08-16 12:56:41 +02:00
Raffson
9cf52ab11d Add Starfire's banner & payloads for the CH-47F
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-08-16 02:41:22 +02:00
Raffson
86a93efc71 Support for CH-47F except banner & payloads 2024-08-16 02:41:21 +02:00
Raffson
c262bb3681 Reload terrain and airports in migrator 2024-08-16 00:34:41 +02:00
Raffson
86e4f45152 Update beacons 2024-08-15 23:49:00 +02:00
Raffson
bc3ec4ffb9 Save-compat fix for Bas_100 being renamed to Vuojarvi 2024-08-15 23:48:29 +02:00
Raffson
5a25b97a9e Update pydcs for 2.9.7.59074 2024-08-15 23:48:29 +02:00
tmz
9e2c5c06b9 Deleted __str__ from StartType to limit impact of change. 2024-08-15 22:27:14 +02:00
tmz
5b4ed979b1 Modified Planned Flights in airfield command to show startup type 2024-08-05 12:41:43 +02:00
Raffson
d29f5a26a1 Revert unnecessary change causing exceptions 2024-08-04 22:44:28 +02:00
Raffson
97c65cfefa Fix date lagging behind 1 turn 2024-08-04 13:14:40 +02:00
Raffson
9dd25e933e RoundRobinize random livery selection from livery_set 2024-08-04 12:28:05 +02:00
Raffson
8796d629e8 Fix probable bug in procurement 2024-08-04 02:37:43 +02:00
Raffson
9dba85e95b Update map upon abort 2024-08-04 01:31:51 +02:00
Raffson
583c87b2e3 Emit game_loaded after restore pre-pretense backup 2024-08-04 01:19:07 +02:00
Raffson
4405764006 Generate warehouses for pretense missions 2024-08-03 22:22:21 +02:00
Raffson
ba25f6a8df Fix missing VSN F4 liveries 2024-08-03 21:28:25 +02:00
Raffson
d2547def51 Fix bug introduced in improvements to livery-selector
This will fix the bug I missed where the squadron needs to be using the livery-set before it could take effect for flight-members.
2024-08-03 20:47:34 +02:00
Raffson
532515fad7 Better save-compat w.r.t. changes in AC's yaml 2024-08-03 20:46:06 +02:00
Raffson
f79e96a474 Further improvements to livery-selector
Unlocking the full potential, i.e. allowing users to switch back & forth between livery-sets, livery-overrides and normal liveries, including support for overriding flight/flight-member specific liveries.
2024-08-03 19:42:45 +02:00
tmz
5aca992140 The Long Road to H3 : added Strike Targets in Damascus, Damascus airfield, modified OWNFOR configuration. 2024-08-03 19:42:45 +02:00
tmz
b1efaf6448 Squadron Livery Selector : Allow to show all liveries even if squadron is using livery set in the selector when in the Flight Payload Tab. 2024-08-03 19:42:45 +02:00
Raffson
ecb81ec32d Merge pull request #204 from MetalStormGhost/pretense-generator
Pretense generator + additional options
2024-07-28 19:43:08 +02:00
Raffson
242ef30469 Formatting -_- 2024-07-28 19:09:59 +02:00
Raffson
3d1a5bea67 Adjust pre-pretense backup strategy 2024-07-28 19:05:37 +02:00
Raffson
dcc424d7e1 Update gitignore 2024-07-28 18:27:27 +02:00
Raffson
f12a1350ce Fix exceptions thrown for Armed Recon 2024-07-28 18:06:55 +02:00
Raffson
d2c45c97fe Refactor invisible FARP remover 2024-07-28 17:55:51 +02:00
Raffson
3bdda3b852 Readd removed newline 2024-07-28 17:14:08 +02:00
Raffson
d604905f52 Streamlining after merge 2024-07-28 17:13:26 +02:00
Raffson
5bb70626d2 Revert unnecessary change 2024-07-28 17:08:01 +02:00
Raffson
8eb30445c2 Restore hidden_on_mfd functionality 2024-07-28 16:59:21 +02:00
Raffson
1b757ec544 Fixing warehouse stuff 2024-07-28 16:53:09 +02:00
Raffson
65e529aa55 Merge branch 'dev' into pr/204 2024-07-28 15:57:38 +02:00
tmz42
e0d4a031bb Correct details for option in settings.py (#380)
Corrected details for player startup time setting
2024-07-28 14:53:54 +02:00
Raffson
ef0e6bb4f5 Account for default livery in QSuadronLiverySelector 2024-07-28 11:21:33 +02:00
ColonelAkirNakesh
8011d711af Update bluefor_modern.json (#379) 2024-07-27 23:12:44 +02:00
Raffson
3b360cfcf5 Pull up AEWC & Refueling mission types to NavalControlPoint 2024-07-27 22:58:43 +02:00
Raffson
e5b06e6ba4 Fix liveries overrides preventing assignment of preset squadrons 2024-07-27 22:52:08 +02:00
Raffson
8bc902fe64 Fix too many ground spawns being popped 2024-07-27 20:52:13 +02:00
Raffson
0ecbd81a20 Revert yet another bogus change 2024-07-27 20:16:00 +02:00
tmz42
dd6267c5ed Simplified Scenic Merge for performance, added Strike targets (#374) 2024-07-27 18:31:43 +02:00
tmz42
ecf11363f2 Player sixpack setting (#378) 2024-07-27 18:30:40 +02:00
tmz42
9e9ea09f70 Player Startup Time customization (#377) 2024-07-27 18:08:40 +02:00
ColonelAkirNakesh
cc6fbc0379 Adds description for MaxxPro_MRAP.yaml (#376) 2024-07-27 18:03:50 +02:00
ColonelAkirNakesh
5ad4dc51fa Fixes description for M1A2C_SEP_V3.yaml (#375) 2024-07-27 18:02:57 +02:00
MetalStormGhost
140410f1ed OH-6 Cayuse mod v1.2 support (#346)
Resolves #313

* Initial commit of OH-6 Modpack v1.2 + Vietnam Asset Pack v1 support.

* Added OH-6 Mod loadouts by @Starfire13

* Modified   pydcs_extensions/oh6_vietnamassetpack/oh6_vietnamassetpack.py
Added      resources/units/ground_units/vap_m35_truck.yaml
Added      resources/units/ground_units/vap_mule.yaml
Added      resources/units/ground_units/vap_mutt.yaml
Added      resources/units/ground_units/vap_mutt_gun.yaml
Added      resources/units/ground_units/vap_type63_mlrs.yaml
Added      resources/units/ground_units/vap_vc_bicycle_ak.yaml
Added      resources/units/ground_units/vap_vc_zis.yaml

* Modified   changelog.md
Modified   resources/factions/USA 1970 Vietnam War.json
Modified   resources/factions/USA 1971 Vietnam War.json
Modified   resources/units/ground_units/vap_mule.yaml
Added      resources/units/aircraft/OH-6A.yaml

* Added the OH-6 to factions and implemented the mod selection in the new game wizard. Added an icon an a banner.

* Modified   resources/units/aircraft/OH-6A.yaml

* Added icons for the Vietnam Asset Pack ground units. Also added an icon for the PT-76 since it was missing. Added a Viet Cong 1970s faction.

* Added      resources/units/ships/vap_us_seafloat.yaml

* Adjust tasking for OH-6A

OH-6A is only capable of Transport & Reconnaissance, but we can ignore this if the lead slot is a client. AI however will most likely not support this, but we can add Transport & Air Assault instead...

* Fix bug in configure task + client override fallback

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-22 20:53:14 +02:00
Raffson
b2ae10ce6f Remove fuel restriction for FOB/FARPs
Probably why we end up with 3/4 of a tank on roadbases -_-
2024-07-21 22:48:26 +02:00
Raffson
a658e41c54 Use EngageTargetsInZone for SEAD Sweep instead
Seems to perform better, AI wonders less off to places it shouldn't...
2024-07-21 22:42:33 +02:00
Raffson
2b65d2f800 Always use altitude in GroundSpeed.for_flight 2024-07-21 22:42:33 +02:00
Raffson
7ea1569f22 Switch AGM-114K's to L's for Apache Escorts
AI doesn't seem to do well with the K variants when flying Escort, not sure about CAS though...
2024-07-21 22:42:32 +02:00
Raffson
8d11feae4a Add AirAssault to PAC & Armed Recon as support in PAC 2024-07-21 22:42:32 +02:00
Raffson
1c9b4b2317 Remove STRIKE as mission type from FOBs 2024-07-21 22:42:32 +02:00
Raffson
9cca4e8244 Revert helicopter escort aggressiveness hack
AI got a little better, at least that's what tests in AFG showed. The main issue is that helicopters tended to attack static objects, which we obviously don't want...
2024-07-21 22:42:31 +02:00
Raffson
e280763a39 Fix wrong parameter for OrbitAction
pydcs expects kph -_-
2024-07-21 22:42:31 +02:00
Raffson
b7ad1048bd Perturb join waypoint for helicopters 2024-07-21 22:42:30 +02:00
Raffson
98b49d5fca Revert removed speed_between_waypoints overload 2024-07-21 22:42:30 +02:00
Raffson
4423391287 Adjust preferred patrol speeds 2024-07-21 21:38:23 +02:00
Raffson
ad87182cf9 Reflect changes in aircraft's yaml through migrator 2024-07-21 21:38:23 +02:00
Raffson
510e23ebba Define cruise/combat altitudes for A-10 2024-07-21 21:38:22 +02:00
tmz42
5bb5294826 Minor campaign updates (#373)
* Simplified Retake the Falklands
Optimized The Long Road to H3 for performance

* Small alterations to The Long Road to H3 - changed options and reverted some units
2024-07-21 12:33:28 +02:00
MetalStormGhost
3de59064de Ukrainian, Russian and US assets in Frenchpack
Added unit yamls for M551 Sheridan, T-62 and T-64BV from Frenchpack mod.
2024-07-21 12:32:21 +02:00
Raffson
da64cdbab7 Remove ROE from SEAD Sweep to avoid engaging statics 2024-07-21 12:06:03 +02:00
Raffson
e9d0273056 Attempt at fixing too slow helicopter speeds 2024-07-21 02:22:14 +02:00
Raffson
f405ffdfe2 Initial support for Armed Recon flight plan 2024-07-21 02:22:14 +02:00
MetalStormGhost
8dcf25d9ee Updated MIST to 4.5.126 2024-07-20 19:21:56 +03:00
MetalStormGhost
e88a4e1c51 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-07-20 19:21:06 +03:00
Raffson
c24fba0ba4 Fix OCA-Aircraft bug in mission generator 2024-07-20 15:35:23 +02:00
Raffson
44daa002ab Fix bug in pydcs 2024-07-20 14:17:55 +02:00
Raffson
7d898f8b48 Account for free heli slots & ground spawns for airfields 2024-07-20 02:53:12 +02:00
Raffson
6194ec7301 Move import outside of TYPE_CHECKING 2024-07-20 02:53:05 +02:00
Raffson
6702a91802 Show airfields in AWCD regardless of runway state 2024-07-20 02:53:04 +02:00
Raffson
dc2d541b50 Formatting -_- 2024-07-20 01:26:20 +02:00
Raffson
141fc642d5 Fix Anti-Ship being planned against original location 2024-07-20 01:26:10 +02:00
Raffson
0d56c271df Serialize warehouses & support for dynamic slots/cargo 2024-07-20 01:04:24 +02:00
Raffson
75dd67a145 Update pydcs
- coldAttStart support
- support for dynamic slots/cargo
2024-07-20 00:17:16 +02:00
Raffson
eb841f1bf4 Update MiG-21bis radios 2024-07-19 16:32:28 +02:00
Raffson
9b54414525 Update MIST to 4.5.126 2024-07-18 18:56:59 +02:00
Raffson
319b2f768a Forgot to remove copy during renaming 2024-07-18 13:05:16 +02:00
ColonelAkirNakesh
1752465c9b Add MRAP & new Abrams to USA 2005 (#367)
* Update usa_2005.json

Adjust spacing in some flyable aircraft (tabs vs spaces),
Adds MRAP and new Abrams model
Removes Hornet livery enforcement

* Update usa_2005.json

Adds MRAP, new Abrams, restores liveries

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-18 12:37:56 +02:00
Starfire13
b0d10f07de Add new Afghanistan campaign - Graveyard of Empires (#370) 2024-07-18 12:20:58 +02:00
Starfire13
ed7a358699 Add new Afghanistan campaign - Operation Shattered Dagger (#371) 2024-07-18 12:20:07 +02:00
MetalStormGhost
4c05837b61 Changed the naming of afghanistan_full.yaml campaign based on feedback from the Discord server. 2024-07-17 19:51:03 +03:00
MetalStormGhost
16239d4089 Added Afghanistan - Pretense Full campaign by @ColonelAkirNakesh 2024-07-17 19:48:51 +03:00
MetalStormGhost
69b828ddf4 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-07-17 19:40:57 +03:00
MetalStormGhost
93da86eed3 Escaped the colon character in the description of the persian_gulf_full.yaml and added default settings to it. Changed the naming of the campaigns based on feedback from the Discord server. 2024-07-17 19:40:29 +03:00
ColonelAkirNakesh
655ed23d79 Add files via upload
Full campaigns for Marianas, Nevada, and Persian Gulf.
2024-07-17 18:45:00 +03:00
ColonelAkirNakesh
209f2c7b67 Update bluefor_modern.json (#368) 2024-07-16 22:31:42 +02:00
ColonelAkirNakesh
9b48acfe28 Create M1A2C_SEP_V3.yaml (#365) 2024-07-16 20:29:00 +00:00
ColonelAkirNakesh
ecc7b603b9 Create MaxxPro_MRAP.yaml (#366) 2024-07-16 20:28:45 +00:00
Starfire13
0f0dc97376 Loadouts for new FC2024 aircraft (#364)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-16 20:28:17 +00:00
Raffson
b2c66c10dc Add icon for AFG 2024-07-16 22:10:06 +02:00
Raffson
f9e7772e09 Fine-tune TGO-purchasability logic 2024-07-16 21:46:22 +02:00
Raffson
2c270306a1 Pydcs fix for AFG 2024-07-16 20:59:39 +02:00
Raffson
08ecbb14f1 Add Starfire's Second Afghan War
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-07-16 20:55:04 +02:00
Raffson
d9788148c2 Formatting 2024-07-16 20:51:52 +02:00
Raffson
8918d4e64f Preliminary support for Afghanistan 2024-07-16 00:19:58 +02:00
Raffson
4b51c23c43 Add QGIS shapefiles for AFG 2024-07-16 00:19:58 +02:00
Raffson
6cfe948ef2 Add new FC aircraft 2024-07-16 00:19:57 +02:00
Raffson
068165c588 Add radio for F-5E-3 2024-07-16 00:19:57 +02:00
Raffson
b09d095723 Add radio for F-86 2024-07-16 00:19:57 +02:00
MetalStormGhost
19f6bafff1 Cold War assets mod v1.0 support (#343)
Implemented support for the Cold War assets mod (ex Tu-16) v1.0 by tripod3
2024-07-14 16:41:19 +03:00
Raffson
6238830a20 Add beacons for Afghanistan 2024-07-14 02:03:58 +02:00
Raffson
eb6701ab89 Update beacons 2024-07-14 02:03:49 +02:00
Raffson
ff311bd6fe Adjust weapon references for pydcs extensions 2024-07-14 02:03:06 +02:00
Raffson
597da1c84d Update pydcs
- Export for 2.9.6.57650
- Adds pydcs support for Afghanistan
2024-07-14 01:15:19 +02:00
Raffson
206f0c5196 Remove redundant debugMsg for missing weapon 2024-07-14 01:02:14 +02:00
Raffson
739405d716 Add work-around for SplashDamage errors 2024-07-14 01:01:44 +02:00
Chilli
3626cdc086 Updated CJS Super hornet mod support from version 2.2.5 to version 2.3.2 (#312)
* updated pydcs file to mod version 2.2.5

* Created Australia 2009

Australia has both the two seater version of the super hornet and the growler in it's arsenal, I've set the year to 2009 because the growler went into service in 2009.

* Created usn_2009 and edited usn_2005

As previously mentioned, the growler did not enter service until 2009. So it has been removed from usn_2005 and usn_2009 has been created.

* Update EA-18G.yaml

The EA-18G is barely/not capable of strike, A/A or anti-ship missions as it does not have the armament needed.

* Update fa18efg.py

reverted changes where WeaponsF18EFG. was replaced with Weapons.

* Update fa18efg.py

Only weapons added by the mod now referred to from the WeaponsFA18EFG class

* Update fa18efg.py

All of the weapons added by the mod now referred to from the WeaponsFA18EFG class

* Update fa18efg.py

Reverted AIM-120B being replaced by AIM-120D

* Update fa18efg.py

Updated fa18efg pydcs export to mod version 2.3.2

* Update QGeneratorSettings.py

Changed mod version in QGeneratorSettings.py from 2.2.5 to 2.3.2

* Update fa18efg.py

Changed AIM_120D back to AIM_120B

* Update fa18efg.py

Changed "Rdr" to "Radar" under AIM_120B

* Update fa18efg.py

* Update fa18efg.py

* Update usn_2009.json
2024-07-14 00:59:52 +02:00
MetalStormGhost
8e8bc3f907 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-07-09 19:09:58 +03:00
Turbolious
eb5cceff16 Sk 60 mod support (#360) 2024-07-07 12:47:07 -05:00
Raffson
eb5062579f Fix lint-error 2024-07-07 18:44:45 +02:00
Raffson
9a0ddd683c Update version for Su30 in GeneratorSettings page 2024-07-07 18:43:26 +02:00
Raffson
02568eaeee Update factions w.r.t. Su-30 mod update 2024-07-07 18:38:48 +02:00
Raffson
7e6810a299 Update Su30 payloads 2024-07-07 18:38:47 +02:00
Raffson
2f33277a49 Update Su-30 mod 2024-07-07 18:38:47 +02:00
Raffson
c7644ba9e5 Fix UI bug in debriefing window 2024-07-07 15:36:14 +02:00
Raffson
d57521c03d Fix UI bug wrt selected flight-plans 2024-07-07 15:36:13 +02:00
Raffson
db12ac4f54 Rename custom payloads for Su-15
BARCAP on its own didn't actually assign the payload, it should either be CAP, CAP HEAVY, Retribution BARCAP or Liberation BARCAP
2024-07-07 15:24:08 +02:00
dependabot[bot]
3cda9fb36b Bump certifi from 2024.6.2 to 2024.7.4 (#363)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.6.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.06.02...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-07 12:21:01 +00:00
ColonelAkirNakesh
b8b39bf2fe Add requirements to nva_1970.json (#362)
A note that this faction requires WW2 Assets Pack because of ze Schnellboot
2024-07-07 11:44:43 +02:00
Starfire13
65a62b3951 Afghanistan insurgent faction & Toyota Technicals class fix (#359)
* Add files via upload

* Add files via upload
2024-07-07 11:41:27 +02:00
MetalStormGhost
ec7982f181 Replaced OCA/Runway and OCA/Aircraft mission with Strike missions in the Pretense generator, in order to allow for Pretense campaigns where one (or both) side only has one airbase with a runway. 2024-07-05 12:51:22 +03:00
MetalStormGhost
81ad559ca1 Pretense generator now handles Severomorsk-1 and Severomorsk-3 correctly. 2024-07-05 12:51:22 +03:00
MetalStormGhost
081c981c86 The squadrons are now re-shuffled between different mission types in generate_pretense_aircraft. 2024-07-05 12:51:21 +03:00
MetalStormGhost
e704d2aa53 Large ground spawn support in PretenseMissionGenerator. 2024-07-05 12:29:19 +03:00
MetalStormGhost
59fa77e10b Large ground spawn support in PretenseAircraftGenerator. 2024-07-05 12:23:42 +03:00
MetalStormGhost
2b62f5919f Large ground spawn support in PretenseFlightGroupSpawner. 2024-07-05 12:14:47 +03:00
MetalStormGhost
0b8aa9b96e Merge branch 'pretense-generator' of https://github.com/MetalStormGhost/dcs-retribution into pretense-generator 2024-07-05 12:07:06 +03:00
MetalStormGhost
1a6d73f055 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-07-05 12:06:53 +03:00
Raffson
9f5db20195 Fix cloud-base selector initialization bug 2024-07-02 18:42:43 +02:00
Raffson
24fc438fda Fix save-compat issue 2024-07-02 18:42:43 +02:00
Raffson
02161c02cf Fix another weather selector bug -_- 2024-07-02 18:42:43 +02:00
MetalStormGhost
07cc85f6fa Large aircraft ground spawns (#237)
* Large aircraft ground spawns

Added the ability to add separate ground spawns for C-130 and other large aircraft to campaigns. Implemented on @holyorangejuice 's request.

Large aircraft ground spawns are added to the campaign by placing a C-130 on the ramp, just like an A-10 or AJS37 previously. Note: use the stock DCS C-130, so the campaign miz can be safely opened without the C-130 mod (or any other mod) installed. Not the C-130J player-flyable transport, not the KC-130J tanker included in the UH-60L mod etc.

Large planes (wingspan more than 40 meters, such as the C-130):
- First try spawning on large ground spawns
- Then try the regular airfield ramp spawns

Below 40 meter wingspan aircraft:
- First try spawning on regular or roadbase ground spawns
- Then try the regular airfield ramp spawns
- Then, if both of the above fail, use the large ground spawns

* Specify explicit black version 23.9.1 to fix lint error.

* Update lint.yml

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-01 20:26:50 +00:00
Turbolious
d84a0ebc78 Support for Carsten's Arty Spotter script (#357)
* Added Cartsens Arty Script

* Added Options to Arty script

Added all options and for configuration.

* Carstens Arty Spotter with options

* Finishing touch

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-01 19:43:17 +00:00
Raffson
d0a1a01b12 Add last guard for weather selector, I hope... 2024-07-01 21:39:12 +02:00
Raffson
1df042fcc6 Fix possible None-exceptions in weather selector 2024-07-01 18:56:10 +02:00
Raffson
e9a14f066a Update changelog for Su-15 mod
Co-Authored-By: MetalStormGhost <89945461+MetalStormGhost@users.noreply.github.com>
2024-06-30 22:07:59 +02:00
MetalStormGhost
4762b490c0 Su-15 Flagon mod v1.0 support (#345)
* Su-15 Flagon mod v1.0 support

Implemented support for Su-15 Flagon mod version 1.0 by Marco1985_IT.

* Replaced the external fuel tanks with gunpods in Su-15 loadouts and added gunfighter: true
2024-06-30 22:05:45 +02:00
Raffson
3bda2929aa Fix issues in F106 that broke Su30 2024-06-30 21:52:39 +02:00
Raffson
4ca0137a24 Keep CAS & OCA/AC below cloud base if BKN/OVC
Partial #285
2024-06-30 19:35:33 +02:00
Raffson
824312e19d Allow changing time, date & weather
Resolves #103
2024-06-30 19:35:33 +02:00
dependabot[bot]
06960db5e5 Bump ejs from 3.1.9 to 3.1.10 in /client
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-30 19:35:28 +02:00
dependabot[bot]
eceec83a01 Bump braces from 3.0.2 to 3.0.3 in /client
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-30 19:35:20 +02:00
Turbolious
a9f968f7cc A6 Task change
Removed Escort task as its not capable
2024-06-30 19:27:35 +02:00
Turbolious
7d1e3c94f5 F-104S Task Changes
Aligned A2A and A2G tasks as each version is not capable of doing the other as Ai and will fly around without weapons while doing the opposite type task.
2024-06-30 19:24:57 +02:00
Raffson
6dc5296130 Disband squadrons sinking with ship + Sink/Resurrect cheat 2024-06-30 02:09:08 +02:00
Raffson
22f7767b99 Add AGM-62 Walleye I weapons data 2024-06-29 23:56:53 +02:00
Raffson
c27f3e67c0 Add AGM-12 weapons data 2024-06-29 23:55:10 +02:00
Raffson
9a6d912a30 Update weapons data 2024-06-29 23:36:54 +02:00
Starfire13
6e3f66437e Remove PDU from Kiowa (#347) 2024-06-25 00:15:24 +02:00
MetalStormGhost
b27141cb1e Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-06-22 09:57:18 +03:00
Raffson
af83088dfd Lock numpy to v1.26.4 2024-06-17 19:58:59 +02:00
Raffson
e6683c0237 Update most dependencies 2024-06-17 19:58:40 +02:00
Raffson
e5f7b577ca Revert "Add pybind11 to requirements.txt"
This reverts commit b45821de52.
2024-06-17 19:22:51 +02:00
Raffson
08de46a3b6 Restore missing weapon-injections
Restores functionality that was lost in 0ec375a
2024-06-17 19:19:56 +02:00
Raffson
9c820f12cf Assign SEAD-Sweep task priorities if missing
Restores behavior that got lost in 0ec375a
2024-06-17 19:19:10 +02:00
Raffson
b45821de52 Add pybind11 to requirements.txt 2024-06-17 19:04:44 +02:00
Starfire13
192fb2087f Update Peace Spring & Grabthar's Hammer (#344) 2024-06-16 21:03:09 +02:00
Raffson
c22f7cbff3 Overhaul redeployment of units after base-capture(s) 2024-06-15 23:40:16 +02:00
Raffson
38e62e7636 Fix Kiowa squadrons 2024-06-15 19:54:24 +02:00
Starfire13
78fdc1bcfc Fix for Operation Gazelle (#342) 2024-06-15 19:53:58 +02:00
MetalStormGhost
7f7821f878 Stop the execution of the pretense_extra_zone_connections in case no more connected points can be found in the campaign. Should fix an error which prevents campaign generation. 2024-06-11 19:35:45 +03:00
MetalStormGhost
cc7ff3f1c2 Added "LARC-V" as a separate variant in LARC-V.yaml 2024-06-10 18:27:27 +03:00
MetalStormGhost
00356ea3ec EA-6B Prowler mod version 2.9.4.102 support (#337) 2024-06-09 20:02:04 +02:00
MetalStormGhost
7eb2c59b86 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-06-09 20:25:55 +03:00
Starfire13
3c0f0b28ea Updates for all of my campaigns (#341) 2024-06-09 10:57:48 +02:00
Starfire13
8a57e8e5f3 Factions update for Kiowa (#340) 2024-06-09 10:53:45 +02:00
Starfire13
e6fc0a9758 Fix Roughnecks squadron file (#339) 2024-06-09 10:53:05 +02:00
Raffson
31630b4d42 Allow squadron switch in flight's edit-dialog 2024-06-09 00:52:09 +02:00
Raffson
b2315efb6c Deepcopy of waypoints for cloned flights 2024-06-08 21:51:09 +02:00
Raffson
9a55b4de1c Fix wrong/non-existing country names in squadrons 2024-06-08 19:03:39 +02:00
Raffson
d190d23655 Avoid scrubbing flights if escorts are unplannable 2024-06-08 18:55:28 +02:00
Raffson
f8e5a2e38d Drop country guard in AC combobox 2024-06-08 18:15:53 +02:00
Raffson
ec4f19e930 Add support for flyable OH-58D
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
Co-Authored-By: zhexu14 <64713351+zhexu14@users.noreply.github.com>
2024-06-08 18:13:05 +02:00
Raffson
7f74203013 Pydcs Update for Kiowa
Co-Authored-By: M Chimiste <37678080+M-Chimiste@users.noreply.github.com>
2024-06-08 16:09:44 +02:00
MetalStormGhost
dc52457d80 Off-map spawns are now ignored in on_pilot_selected(). 2024-06-08 14:01:17 +02:00
tmz
a9950d4b80 The Long Road to H3 - Perf to 2 instead of 3 2024-06-08 13:43:17 +02:00
tmz
6577d6a417 Aleppo zone tweaks for The Long Road to H3 2024-06-08 13:43:17 +02:00
tmz
c6bd1e0cc3 Added Golden Warriors 2024-06-08 13:43:17 +02:00
tmz
dd1f080f97 Allied Sword update to support F-4E out of the box 2024-06-08 13:43:17 +02:00
Starfire13
68bdb86c71 Add NASAMs to MERAD unit list for campaign template (#334) 2024-06-08 10:37:24 +02:00
Starfire13
5cd0859004 Add SA-6 to Russia 2010 (#333) 2024-06-06 08:22:14 +02:00
ColonelAkirNakesh
1d02917c52 Update russia_2010.json (#332) 2024-06-04 08:26:01 +02:00
ColonelAkirNakesh
6a3a33170a Update russia_1990.json (#331) 2024-06-04 08:25:31 +02:00
ColonelAkirNakesh
50e3f89199 Create Yak-52.yaml (#330) 2024-06-04 08:24:36 +02:00
Starfire13
4c8d99e40a Change Black Sea performance to 3/3 (#329) 2024-06-04 00:35:21 +02:00
ColonelAkirNakesh
163841f8b0 Create FuSe-65.yaml (#327) 2024-06-04 00:12:22 +02:00
ColonelAkirNakesh
bf3d34ff5d Update germany_1944.json (#328) 2024-06-04 00:11:17 +02:00
Raffson
b501009285 Skip completed flights during mission generation 2024-06-01 21:17:06 +02:00
Raffson
c399002d1d Cleanup missed print statement 2024-06-01 21:17:06 +02:00
Raffson
8c9f62a2fb Add extra condition to preferred client start-type 2024-06-01 21:17:05 +02:00
Raffson
f88c103db5 Send events for AirLifts cancelled through PTD 2024-06-01 20:31:17 +02:00
Raffson
bb42a1f63a Fix cancel button in PendingTransfersDialog 2024-06-01 20:13:14 +02:00
tmz
58b4e5284e Add new Syria campaign 2024-06-01 19:42:27 +02:00
tmz
8e5b6b1e0c Introduce F-4E to allied Sword 2024-06-01 19:42:27 +02:00
tmz
030762a1dd Update Splash Damage 2024-06-01 19:42:27 +02:00
MetalStormGhost
8df77dec2a Fixed a bug where Pretense campaign generation would hang if the campaign had off-map spawns. 2024-06-01 16:59:30 +03:00
MetalStormGhost
28efecc03a Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-06-01 16:49:58 +03:00
MetalStormGhost
25e2da2b91 Pretense should always use Client slots. 2024-06-01 16:45:15 +03:00
Chris Tartamella
46f9cb62c1 Add new mission modification as run by WRL. (#325) 2024-05-30 08:22:23 +02:00
MetalStormGhost
b801136145 Updated pretenseluagenerator.py for the latest pydcs. 2024-05-28 18:59:09 +03:00
MetalStormGhost
0fd0e2c3c2 Added function return type annotation to pretense_trimmed_cp_name() 2024-05-28 18:40:25 +03:00
MetalStormGhost
bfe008775d Implemented PretenseNameGenerator.pretense_trimmed_cp_name to remove Scandic characters from Pretense zone names. 2024-05-28 18:40:25 +03:00
Raffson
7802ab992e Follow-up on F-4E-45MC
- missing radio config
- missing stored heading alignment
2024-05-27 23:53:10 +02:00
tmz42
a1fa58326c Splashdamage data update (#322)
* Splash Damage for missing Heatblur F-4E weapons (AGM-12, AGM-62 I and
GBU-8)

* Fixed Walleye I damage

* Set Bullpup C to correct value

* Modified warhead masses according to online sources and Janes Air Launched Weapons

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-05-27 21:26:36 +00:00
Starfire13
db93e56d6d Update F-4E-45MC loadouts (#323) 2024-05-27 12:46:42 +02:00
MetalStormGhost
9775d3b97c Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-26 22:06:19 +03:00
Raffson
3d6da6ae3d Deselect flights on ATO change 2024-05-25 23:42:59 +02:00
Raffson
8562c48753 Account for 'is_ownfor' in package dialog 2024-05-25 23:42:58 +02:00
Raffson
12d0632415 Add new warheads to splash damage 2024-05-25 23:42:58 +02:00
Raffson
0ab07c3878 Offset by 1 for UI 2024-05-25 23:42:58 +02:00
Raffson
b3f9cdfa74 Fix SunTime exceptions if sun doesn't rise of set 2024-05-25 23:42:57 +02:00
Raffson
0f53d00d25 F-106 fix 2024-05-25 19:40:08 +02:00
Raffson
16b6c00c0d Remove vertical scrollbar if there's no need in AWCD 2024-05-25 14:04:28 +02:00
Raffson
8482829f94 Fix bug in ATO panel where buttons remain disabled 2024-05-25 13:57:49 +02:00
Starfire13
881e9a4301 Adding Heatblur F-4E to Starfire’s campaigns (#320)
* Add files via upload

* Add files via upload
2024-05-25 12:34:13 +02:00
Starfire13
4bc7b41828 Fix liveries in squadron files for F-4E-45MC (#321) 2024-05-25 12:32:46 +02:00
Raffson
ee1a0cc9f1 Fix save compat issue 2024-05-25 02:32:50 +02:00
Raffson
13509bbda5 Babysteps towards fully editable faction 2024-05-25 02:18:43 +02:00
Raffson
692ceefadb Support for F-4E-45MC Phantom II
Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-05-25 02:10:04 +02:00
Raffson
c09a5b68d5 Pydcs update for Phantom II
Save compat changes included
2024-05-24 21:30:48 +02:00
M Chimiste
c947ac0ef1 Support for VSN F-106 Delta Dart (#319)
* Add Delta Dart

* Added Banners and Icons

* Add loadouts

* Update f106.py

* Update f106.py

* Update VSN_F106A.yaml

* Update VSN_F106B.yaml

* Added the F-106 Delta Dart to factions. Also, replaced the banner with one by datoneslav, used with permission. Includes the official VSN logo (also used with permission). Also tweaked the backgrounds of the icons to blue to match the other aircraft.

* Added changelog entry.

* Add files via upload

---------

Co-authored-by: MetalStormGhost <ghosti@smytky.org>
2024-05-21 23:03:53 +02:00
Starfire13
3b65a0ab88 Able Archer update (#318) 2024-05-21 20:02:41 +02:00
Raffson
b07aae3d6e Allow [start, end] times for Night to traverse midnight
Daytime mapping entries like [23, 2] were causing trouble, for which the following fix was implemented...
2024-05-20 17:11:27 +02:00
Starfire13
562be59765 UI consistency fixes (#306)
* Update settings.py

Replace blue/red with ownfor/opfor
Also replaced all the NMI with NM. NMI is used by IEEE. NM is used by the military.
Also added in two missing periods.

* Update QSettingsWindow.py

Changed Red ATO to OPFOR ATO

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-05-20 15:06:18 +00:00
Starfire13
179936146f Fixes for Able Archer 83 (#317) 2024-05-20 16:09:43 +02:00
M Chimiste
6108727841 Add first testing version of operation frostbite (#316) 2024-05-19 22:55:38 +02:00
MetalStormGhost
c4d2f0e833 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-19 19:04:37 +03:00
tmz42
2cc8e90e2f Allied Sword + faction files updates (#315) 2024-05-19 12:30:21 +02:00
Raffson
75ddfb9e17 Update changelog 2024-05-19 12:12:39 +02:00
Raffson
3a46bdcd1e Fix wrong init value for GameModel.is_ownfor 2024-05-19 12:05:13 +02:00
Starfire13
2ad3bff988 Add Able Archer 83 campaign for Kola map (#314) 2024-05-19 10:22:42 +02:00
Raffson
88b3264fe3 Fix TypeScript issues preventing build 2024-05-18 21:54:43 +02:00
Raffson
cbd90a5e36 Sync MapZones when changing campaigns 2024-05-18 21:13:32 +02:00
Raffson
0f9781ff30 Retain current zoom when switching campaigns 2024-05-18 20:24:55 +02:00
Raffson
0f612ac9d9 Final preparations for Lappi 2024-05-18 20:15:43 +02:00
Raffson
2b7113ec2a Add ArcGIS data for Lappi 2024-05-18 19:16:44 +02:00
M Chimiste
a8bf817b5a Diet Kola - Adding Beacons and Info.yaml (#311)
* Create kola.json

* Create info.yaml
2024-05-12 14:04:15 +02:00
Raffson
9d9295ed2d Pydcs Update (Kola + data export 2.9.4.53990) 2024-05-12 13:55:15 +02:00
Raffson
f203a5cf7a Babysteps towards full OPFOR control 2024-05-11 23:23:10 +02:00
Raffson
b61f625828 Fix bug in earlier bugfix -_- 2024-05-11 19:00:56 +02:00
Raffson
779f66670f Expose OPFOR squadrons
This allows for customizing OPFOR liveries, checking whether pilots are assigned, number of pilots available, and more stuff to get information & debug in an easier way...
2024-05-11 18:08:12 +02:00
Starfire13
86ef189da4 Campaign updates for Bright Star and Noisy Cricket (#310) 2024-05-11 18:07:40 +02:00
Raffson
d3e1a1df92 Fix bug w.r.t. OffMapSpawn CPs starting cold 2024-05-11 17:26:36 +02:00
MetalStormGhost
150a4dde49 Added missing call squadron: Optional[Squadron] = None to help avoid reference before assignment error. 2024-05-10 12:46:27 +03:00
MetalStormGhost
48861c53da Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-09 21:16:32 +03:00
MetalStormGhost
85f4f66f21 pretenseaircraftgenerator.py now obeys the new setting Default start type for Player flights. 2024-05-09 20:57:29 +03:00
MetalStormGhost
a27663e4b6 Default start type for player flights (#303)
* Implemented a new option in settings: Default start type for Player flights.

* Updated changelog.

* Removed unnecessary country parameter.

* Restore missing parameter

* on_pilot_changed should emit pilots_changed in its finally block, otherwise the start-type isn't updated if you have a single client pilot which you switch to a non-client pilot.

Also implemented other changes suggested by @Raffson, such as a more streamlined start_type QComboBox handling and moving the pilots_changed Signal to FlightRosterEditor.

* Decouple Signal from QFlighStartType

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-05-09 10:19:30 +00:00
MetalStormGhost
4c455426e9 Added an icon for the Kola / Lapland terrain. (#308) 2024-05-08 21:54:20 +02:00
MetalStormGhost
04e60fb08d Ramon Airbase hack (#309) 2024-05-08 21:52:12 +02:00
MetalStormGhost
16377fe563 Added Iron Dome & David's Sling sites to Pretense generator. 2024-05-07 15:20:55 +03:00
MetalStormGhost
3bf77042fd Added HQ7 (Crotale) sites to Pretense generator. 2024-05-07 15:20:20 +03:00
Starfire13
0ab7dd2f15 Sort mod list by alphabetical order (#302) 2024-05-05 22:02:46 +02:00
Starfire13
61bfebb6fa Updated UH-60L loadouts(#301) 2024-05-05 21:56:49 +02:00
Starfire13
ea6591463f Updated factions for Able Archer 83 with some missing units (#300)
* Add files via upload

* Update blufor_late_coldwar.json

* Update russia_1980.json

* Update russia_1980.json

* Update russia_1980.json

* Update russia_1980.json
2024-05-05 21:55:38 +02:00
MetalStormGhost
e34a8c7875 Renamed CTLD plugin settings to Retribution
Renamed CTLD plugin settings to Retribution, as well as some other miscellaneous files too.
2024-05-05 11:04:56 +02:00
MetalStormGhost
557b441d13 Replaced expend=AI.Task.WeaponExpend.ONE with expend=AI.Task.WeaponExpend.QUARTER on CAS and BAI flights. Added HQ7 (Crotale) sites to Pretense generator. Also, added logistics units to most SAM sites to ensure that launchers have access to missile/ammunition resupply. 2024-05-04 09:27:36 +03:00
MetalStormGhost
c11575fcff Added missing custom_waypoints parameter in PretenseCargoFlightPlan. 2024-05-04 09:27:17 +03:00
MetalStormGhost
cbd230862f Air-start supersonic AI aircraft if the campaign is being flown in a WWII terrain. This will improve these terrains' use in cold war campaigns.
Air-start AI fixed wing (non-VTOL) aircraft if the campaign is being flown in the South Atlantic terrain and the airfield is one of the Harrier-only ones in East Falklands. This will help avoid AI aircraft from smashing into the end of the runway and exploding.
2024-05-04 09:26:02 +03:00
MetalStormGhost
e69708ada9 Removed Retribution convoys from Pretense campaigns. Removed deep copies of both coalitions when saving the pre-Pretense generation backup. 2024-05-04 09:24:56 +03:00
MetalStormGhost
c795ed01a0 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-03 11:19:48 +03:00
Raffson
79d79645b0 Make sure escort task is added if flight has passed IP 2024-05-01 17:06:25 +02:00
Raffson
4b75913420 Insert orientation waypoint at/after IP
As a result of using fast-forward, AI flights are already oriented towards SPLIT, which slows things down during mission start. The escorts tend to go all over the place because of this...
2024-05-01 17:06:25 +02:00
Starfire13
4ef95a1939 Add MiG-21 to Blufor Late Cold War for Finland (#299)
* Add files via upload

* Fixed formatting
2024-05-01 13:33:24 +00:00
Starfire13
51a82f431d Update Operation Velvet Thunder (#298) 2024-05-01 14:14:39 +02:00
Starfire13
5891fb7441 Add C-130J to USA 1970 (#297) 2024-05-01 14:14:05 +02:00
Raffson
0ffe2f11bc Add guard before custom kneeboard injection 2024-05-01 14:12:23 +02:00
MetalStormGhost
40a01218dd Implemented saving of a Pretense pre-generation backup save before generating a Pretense campaign. 2024-05-01 11:01:59 +03:00
Raffson
e81d4068be Pydcs update for custom kneeboard injection 2024-04-28 21:26:24 +02:00
Raffson
4043e2452f Custom kneeboard injection
Drop custom kneeboards in SavedGames/DCS/Retribution/Kneeboards as you would normally do, i.e. using the necessary folders if kneeboards are aircraft-specific
2024-04-28 21:21:01 +02:00
Raffson
71965e7183 Fix exception after suntime update 2024-04-28 21:21:00 +02:00
Raffson
9fc34a56a3 Update most dependencies 2024-04-28 21:21:00 +02:00
Raffson
19523e35cf Fine-tune Strike-ingress waypoint tasks 2024-04-28 21:20:59 +02:00
Starfire13
015aa98f4c Add factions for Able Archer 83 (#296)
Campaign is yet to be added, merging these factions in preparation of the actual campaign...
2024-04-28 15:57:09 +02:00
Starfire13
c34ff3eea0 Update Operation Grabthar's Hammer (#295) 2024-04-28 15:48:05 +02:00
Starfire13
2ce776ff55 Update Operation Peace Spring (#294) 2024-04-28 15:47:24 +02:00
Starfire13
55bb54b1c2 Update Exercise Bright Star (#293) 2024-04-28 15:45:46 +02:00
Starfire13
4f7169da2a Update Operation Velvet Thunder (#292) 2024-04-28 15:44:11 +02:00
Starfire13
d005e03218 Add C-130J squadron to Operation Noisy Cricket for paradrops (#291) 2024-04-28 15:43:01 +02:00
Starfire13
b1cc2cace1 Add Operation Gazelle campaign scenario (#290) 2024-04-28 11:25:36 +02:00
dependabot[bot]
e9f39fec2c Bump express from 4.19.1 to 4.19.2 in /client (#289)
Bumps [express](https://github.com/expressjs/express) from 4.19.1 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.1...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-27 20:18:08 +00:00
Starfire13
f587132da3 Update for F-15E Suite 4+ loadout (#288) 2024-04-25 07:55:40 +02:00
Raffson
79515c6dfd Pydcs update for livery scanner fix 2024-04-21 14:52:50 +02:00
Starfire13
8b4a93ad6b Add MiG-15 to Egypt 1973 (#287) 2024-04-20 17:57:48 +02:00
Starfire13
ae719e520f Add Egypt 1973 faction (#284)
Egyptian faction for Yom Kippur War
2024-04-16 20:42:29 +02:00
Starfire13
215f15fb48 Add C-130J to Israel 1973 (#283) 2024-04-15 08:09:37 +02:00
Raffson
09ddc3c3c6 Fix flight-plans no longer being highlighted
Bug introduced as part of the upgrade to Python 3.11?
2024-04-14 14:15:02 +02:00
Raffson
f76fe6eeec Downgrade PySide to 6.4.2 2024-04-14 01:38:26 +02:00
Raffson
243eed27bb Update changlog w.r.t. NGW errors 2024-04-13 22:20:55 +02:00
Starfire13
31a9391fd0 Add missing C-130 to Israel 1973 faction (#282) 2024-04-13 21:32:15 +02:00
Raffson
377d0a2fad mypy fix 2024-04-13 19:52:38 +02:00
Raffson
3cf4729f64 Use "pydcs @" instead of "-e" in requirements.txt 2024-04-13 19:47:34 +02:00
Raffson
f1eb8f9a87 Revert "Pin python to 3.11.5"
This reverts commit 6bcd8a6910.
2024-04-13 18:06:47 +02:00
Raffson
6bcd8a6910 Pin python to 3.11.5 2024-04-13 18:01:37 +02:00
Raffson
07eeb3c627 Update pydantic 2024-04-13 16:15:49 +02:00
Raffson
a7e4cad3b7 mypy update + fix 2024-04-13 16:15:33 +02:00
Raffson
50808c3c06 Slightly downgrade PySide6 to nice-playing version with mypy 2024-04-13 16:12:53 +02:00
Raffson
e86e49cb6f Update PySide6 2024-04-13 15:18:27 +02:00
Raffson
61fe67660f Upgrade to Python 3.11
Partially fixes the bug where no error is shown in case of campaign errors when clicking Finish in the NGW
2024-04-13 15:18:02 +02:00
Raffson
327c934ed3 Properly determine Carrier/LHA TGO in apply_carrier_config
The first ground object of a naval control-point isn't always the CV or LHA, but can also be a different TGO if 1 or more TGOs are linked to the naval control point.
2024-04-07 17:15:41 +02:00
Raffson
d2fd7bbb4e Configurable carriers 2024-04-07 00:12:08 +02:00
Raffson
e416e07366 Log error if exception occurs during MissionScripting replacement 2024-04-06 22:01:15 +02:00
MetalStormGhost
0a7b885626 Now will not call CarrierMap:new() when game.settings.pretense_controllable_carrier is disabled. 2024-04-06 20:27:39 +03:00
Raffson
c5897950b6 Skip dead connections in IADS network
The "no skynet usable units" exception would get triggered when an IADS-node would form its connections. If one of those connections contained an IADS unit that was dead, the exception would get triggered since we weren't skipping "dead connections".
2024-04-06 17:39:27 +02:00
MetalStormGhost
64b1410de8 Implemented support for player controllable carriers in Pretense campaigns. This functionality can be enabled or disabled in settings, because the controllable carriers in Pretense do not build and deploy AI missions autonomously, so the old functionality is retained.
Added new options in settings:
- Carriers steam into wind
- Navmesh to use for Pretense carrier zones
- Remove ground spawn statics, including invisible FARPs, at airbases.
- Percentage of randomly selected aircraft types (only for generated squadrons)
intended to allow the user to increase aircraft variety.

Will now store the ICLS channel and Link4 frequency in missiondata.py CarrierInfo.

Implemented artillery groups as Pretense garrisons. Artillery groups are spawned by the Artillery Bunker. Will now also ensure that the logistics units spawned as part of Pretense garrisons are actually capable of ammo resupply.

Fixed the Pretense generator generating a bit too many missions per squadron. Ground spawns: Also hot start aircraft which require ground crew support (ground air or chock removal) which might not be available at roadbases. Also, pretensetgogenerator.py will now correctly handle air defence units in ground_unit_of_class(). Added Roland groups in the Pretense generator.
2024-04-06 15:46:11 +03:00
MetalStormGhost
55b173ec10 Merge branch 'pretense-generator' of https://github.com/MetalStormGhost/dcs-retribution into pretense-generator 2024-04-06 13:58:06 +03:00
tmz42
d4234dd7b3 Allied Sword updates (#279)
allowed IADS, added new Orchard at Kharab Ishk, added some strike targets
2024-04-02 00:04:15 +02:00
Raffson
d051774464 Allow naval adjustments on turn 0 2024-04-01 22:08:00 +02:00
Chilli
a9a56bfcc4 CJS super hornet mod update (#277) 2024-04-01 21:39:46 +02:00
Raffson
185911942a Fine-tune Herc's AirAssault 2024-04-01 19:14:42 +02:00
Raffson
dd2fb432f2 Use initial point for Herc AirAssault ingress 2024-04-01 16:03:40 +02:00
Raffson
bd7f7615b0 Skip discord notification in forks 2024-03-28 15:08:12 +01:00
Raffson
4bbe28838d Add livery_set to migrator 2024-03-24 13:29:05 +01:00
tmz42
60fafd262d Small update for Scenic Route I + Tomcat Livery Sets (#276) 2024-03-24 11:27:45 +01:00
Raffson
52b25821af Introduce livery-sets on squadron level
Randomly chooses one of the liveries defined if present in the squadron's yaml, overrides entry for "livery" or whatever is chosen in the UI except liveries on flight-member level
2024-03-23 21:29:01 +01:00
Raffson
6ee74cf079 Support for inline factions in campaign's yaml 2024-03-22 22:50:55 +01:00
Raffson
6b1b612c4b Update react packages 2024-03-22 21:54:27 +01:00
Raffson
a56aa7a766 Support yaml factions 2024-03-22 21:13:45 +01:00
Raffson
ab32c44b9d Ability to configure liveries on flight/flight-member level 2024-03-22 20:41:28 +01:00
Raffson
a7d65866e8 Fix A-10A payload bug leading to uneditable flight 2024-03-22 19:40:48 +01:00
Raffson
36ef246fcd Update changelog 2024-03-17 01:26:12 +01:00
Raffson
cbaf509375 Avoid crash with incompatible save on startup 2024-03-17 01:25:52 +01:00
Raffson
c4bc515e19 Update bug-report templates 2024-03-17 00:58:09 +01:00
Raffson
ae2f1dddf4 Fix save-compat issue 2024-03-17 00:57:34 +01:00
Raffson
0784efc1c7 Update bug-report templates for v1.3.0 2024-03-16 19:25:12 +01:00
Raffson
7306427487 Preparations for v1.4.0 2024-03-16 19:23:39 +01:00
MetalStormGhost
e9832b5d82 Super Étendard mod support v2.5.5 (#273)
* Implemented support for the VSN Super Étendard v2.5.5

* Updated changelog and renamed the banner.

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-03-16 14:55:50 +00:00
Starfire13
147136c41a Add PMC Russian Hard faction (#272) 2024-03-16 15:49:04 +01:00
MetalStormGhost
6204dd4e72 F9F Panther mod support (version v2.8.7.101) (#226)
* Added F9F Panther mod support (version v2.8.7.101). Still missing loadouts and icon+banner.

* Added missing import in pydcs_extensions/__init__.py

* Added a banner and icon for the F9F Panther, credit for the banner to Jim over at the Century Series Discord. VSN Century Series logo used with permission. Also added loadouts for the F9F Panther and fixed the mod settings for it.
2024-03-16 15:47:04 +01:00
Raffson
19daa1737e Drop single bombs on statics again 2024-03-10 22:55:00 +01:00
Raffson
0b40f872bf And now formatting -_- 2024-03-10 15:51:14 +01:00
Raffson
733e31c35a Fix mypy issue -_- 2024-03-10 15:49:27 +01:00
Raffson
fc9a1ad145 Use original trigger zone type for scenery targets 2024-03-10 14:52:28 +01:00
Raffson
94801f859a Formatting 2024-03-10 01:23:48 +01:00
Raffson
3cd1b2f80a Fine-tune target waypoints for Strike Eagle 2024-03-10 00:51:09 +01:00
Raffson
a9287809a3 Fix "White Flag #" strike target name 2024-03-09 23:25:50 +01:00
Raffson
ced97dff1e Transition to AGL below 5000ft 2024-03-09 22:33:02 +01:00
Raffson
c418d70d96 Lower minimum cruise & combat altitudes in doctrines 2024-03-09 22:33:02 +01:00
Raffson
1085cbbd9d Update Liberation's Patreon link 2024-03-09 22:33:02 +01:00
Raffson
c39d58f60b Add options: max mission distance for planes & helicopters 2024-03-09 22:33:01 +01:00
Raffson
f6985d9f70 Bring flight-plan to front if selected 2024-03-09 22:31:48 +01:00
Raffson
eb6afbdf02 Ignore range when manually using auto-create 2024-03-09 22:31:47 +01:00
Raffson
15218d0241 caniuse-lite update 2024-03-09 21:58:06 +01:00
Dan Albert
005bbcb812 Send flight plan paths to the back of the map.
This fixes the unusual case where the `interactive: false` property had
no effect, which would make it impossible to plan missions against UI
elements that were overflown by many flights (such as the front line).

As an added bonus, it looks a bit nicer.

This impacts the test in an odd way, but the cure for that is probably
rewriting the test to not use a mock now that we've figured out how to
do that.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3295.
2024-03-09 21:58:06 +01:00
Starfire13
dc3e7e790b Campaign updates for chopper escort autoplan support (#271) 2024-03-09 21:57:45 +01:00
Raffson
9303e1cb9e Configurable cruise & combat altitude + randomized offsets (phase 1) 2024-03-04 00:01:29 +01:00
Raffson
7158a5e60d Don't degrade flight-plan when adding waypoints 2024-03-03 13:43:33 +01:00
Raffson
bcf8ee9d42 Fine-tune release of parking slots 2024-03-03 12:51:27 +01:00
Starfire13
7a3ca43514 Update Grabthar's Hammer miz (#270) 2024-03-03 11:43:45 +01:00
Starfire13
707c0793a3 Update Grabthars_hammer.yaml to fix Hokum III name (#269) 2024-03-03 11:42:15 +01:00
Raffson
0591f74a11 Fine-tune DEAD ingress wpt-tasks 2024-03-03 02:23:42 +01:00
Raffson
d484e133ce Revert "Force SEAD into threat-range"
This reverts commit 61b2d7c68e.
2024-03-03 01:39:27 +01:00
Raffson
d2004e5b11 Clear parking slots when save is loaded 2024-03-03 00:27:20 +01:00
Raffson
2fdc9bbb2d Free parking slots when passing turn 2024-03-03 00:01:27 +01:00
Raffson
61b2d7c68e Force SEAD into threat-range 2024-03-02 23:17:46 +01:00
Raffson
aab8454fe6 Change formations at HOLD & SPLIT 2024-03-02 23:17:45 +01:00
Raffson
9f204d0334 Fix UI bug wrt cheat-options 2024-03-02 17:36:36 +01:00
Raffson
b4ba200f95 Buy/Replace TGOs for free at turn 0 2024-03-01 23:46:56 +01:00
Raffson
32f8d8d0b7 New cheat option: manage REDFOR's TGOs 2024-03-01 23:06:46 +01:00
Raffson
9f7c9eec14 Send new-flight events when cloning
Fix #268
2024-03-01 22:33:23 +01:00
Raffson
697aef2aef Import beacons 2024-03-01 22:11:41 +01:00
Raffson
95580a6cef Compatibility fix for lua5.4 2024-03-01 22:11:14 +01:00
Raffson
9e1a642eb2 Add option to force air-starts at Nevatim 2024-02-25 16:15:09 +01:00
Starfire13
93c5cb767e Exercise Bright Star - avoid Nevatim due to DCS bug (#267)
https://forum.dcs.world/topic/335545-29-nevatim-ramp-starts-still-bugged/
2024-02-25 14:04:03 +01:00
Starfire13
0f23a526eb Add CH-47 and UH-60 to Bluefor Modern (#266) 2024-02-25 14:01:02 +01:00
dependabot[bot]
7fb19649e1 Bump follow-redirects from 1.15.2 to 1.15.5 in /client (#265)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.5.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.5)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-25 14:40:19 +02:00
MetalStormGhost
ff096b7d8d Will now generate multiple missions per squadron in Pretense campaigns to ensure most mission types are available. 2024-02-25 12:40:50 +02:00
MetalStormGhost
a49a1e9461 Updated pretense_compiled.lua to version 1.7.2:
Pretense v1.7.2 - 23 Feb 2024
Fixed occasional script error when saving zone groups
2024-02-25 12:40:50 +02:00
MetalStormGhost
e816e6990a Updated pretense_compiled.lua to version 1.6.5:
Pretense v1.6.5 - 04 Feb 2024
Fixed error on restoring strike targets
Block slots from within the mission, removing the need for slotblock.lua
2024-02-25 12:40:49 +02:00
MetalStormGhost
e549a923d5 Updated the Pretense script to version 1.4.5 2024-02-25 12:40:49 +02:00
MetalStormGhost
2edc0a7305 Ground unit presets are now generated from the coalition/faction definitions. 2024-02-25 12:40:49 +02:00
MetalStormGhost
200812a39b Other coalition TGO spawns are now generated with the correct faction. 2024-02-25 12:40:48 +02:00
MetalStormGhost
a4d8c14579 Added Iron Dome, David's Slinh, NASAMS-B and Rapier sites to Pretense. Fixed the timestamp in the save file name. 2024-02-25 12:40:48 +02:00
MetalStormGhost
969f0e26c7 Pretense zone radius (radii) for FOBs with FARPs will now be dynamically adjusted. Increased the size of Pretense zones at Damascus, Khalkhalah and Krasnodar-Pashkovsky (which are quite spread out) so the zone would encompass the entire airfield. 2024-02-25 12:40:48 +02:00
MetalStormGhost
49ba40aaf3 Now randomly shuffles the Pretense squadrons when generating a Pretense campaign. 2024-02-25 12:40:48 +02:00
MetalStormGhost
5cfeee7b2a Helicopter escort squadrons no longer cause an error on Pretense campaign generation. 2024-02-25 12:40:47 +02:00
MetalStormGhost
100eafcffd Separated init_header.lua into init_body_1.lua and init_header.lua. Deleted the ground unit groups since they will eventually be generated dynamically. 2024-02-25 12:40:47 +02:00
MetalStormGhost
c0a887b258 Copied init_header.lua to init_body_1.lua 2024-02-25 12:40:47 +02:00
MetalStormGhost
cafc6b5d30 Rename resources/plugins/pretense/init_body_2.lua (from resources/plugins/pretense/init_body_1.lua) 2024-02-25 12:40:47 +02:00
MetalStormGhost
3ab0f2a554 Rename resources/plugins/pretense/init_body_3.lua (from resources/plugins/pretense/init_body_2.lua) 2024-02-25 12:40:46 +02:00
MetalStormGhost
3d8956434c Will now append the date and time in the Pretense savefile, mitigating risks of missions script errors when trying to load a savefile from a previously generated mission. 2024-02-25 12:40:46 +02:00
MetalStormGhost
3d435c7821 Removed a non-functional option from the settings. 2024-02-25 12:40:46 +02:00
MetalStormGhost
76bab86e67 Updated the Pretense script to version 1.3.8 - 3 Dec 2023 and MIST to version 4.5.122. 2024-02-25 12:40:45 +02:00
MetalStormGhost
00760b831e Will now correctly generate Pretense campaigns with CJTF factions. 2024-02-25 12:40:45 +02:00
MetalStormGhost
f4e8e30cb1 Implemented new options in settings:
- Pretense: Extra friendly zone connections - Add connections from each zone to this many closest friendly zones, which don't have an existing supply route defined in the campaign.
- Number of cargo planes per side
- Number of AI SEAD flights per control point / zone
- Number of AI CAS flights per control point / zone
- Number of AI BAI flights per control point / zone
- Number of AI Strike flights per control point / zone
- Number of AI BARCAP flights per control point / zone
- Number of AI aircraft per flight
- Number of player flights per aircraft type at each base
- Number of AI cargo planes per side

Implemented CAS helo mission handling for Pretense. Implemented separate pretense_air_groups container for storing/referencing Flight objects. Tweaked the supply costs of SAM sites and Command centers. Will no longer generate player air starts at roadbases either. Restored the missing DEAD flights to Pretense. Removed spawning of frontline units and moved the JTAC spawning to pretensemissiongenerator.py
2024-02-25 12:40:44 +02:00
MetalStormGhost
e15aca8c54 Updated pretense_compiled.lua to version 1.3.6.
Implemented Pretense settings in pretense_compiled.lua
Added new function moveOffRoadToPointAndAssault() to enable assault groups to drive off-road and thus avoid some of the bridges where they might get stuck.
2024-02-25 12:40:44 +02:00
MetalStormGhost
93ab146cf5 Restored Retribution scripts and triggers to Pretense campaigns. Pretense progress can now be translated back to Retribution. Moved the trigger clearing from pretenseluagenerator.py to pretensemissiongenerator.py
keepActive is now only enabled for airbases and carriers/LHAs, for performance reasons.
2024-02-25 12:40:44 +02:00
MetalStormGhost
72d1c105a7 Implemented a Pretense settings page. 2024-02-25 12:40:43 +02:00
MetalStormGhost
5b60d64437 Reduced the number of cargo planes to 2 per side. 2024-02-25 12:40:43 +02:00
MetalStormGhost
2808d0f72c Fixed the bug of not generating opposing force ground unit groups at Pretense zones. Added the country name to ground vehicle group names to avoid duplicates. 2024-02-25 12:40:43 +02:00
MetalStormGhost
64e425012c Implemented generating runway zones at airports in Pretense. 2024-02-25 12:40:42 +02:00
MetalStormGhost
85db8c908e Restored compatibility of the Pretense generator after the timedelta -> datetime change and other changes caused by the Liberation merge/sync. 2024-02-25 12:40:42 +02:00
MetalStormGhost
b6449a7056 In the event of too many channel users, fail gracefully by reusing a random channel instead of always the previous one. 2024-02-25 12:40:42 +02:00
MetalStormGhost
91a9a9b88f Moved SAM site presets from presets.defenses.sam to presets.defenses.red/blue 2024-02-25 12:40:42 +02:00
Raffson
b36215b808 Fix errors due to LaserCodeRegistry move 2024-02-25 12:40:41 +02:00
MetalStormGhost
ced7aa4d72 Implemented generating amphibious units for Pretense unit groups. Amphibious units are selected out of a pre-defined list. Units which the faction has access to are preferred, but certain default unit types are selected as a fall-back to ensure that all the generated units can swim. 2024-02-25 12:40:41 +02:00
MetalStormGhost
08930f4a9a Added new icons and a separate button which will point to the Pretense/Foothold Discord. 2024-02-25 12:39:48 +02:00
MetalStormGhost
921b1ee9fd Fixed a bug in SHORAD and SAM generation. 2024-02-25 12:39:47 +02:00
MetalStormGhost
713cd98d10 Implemented SAM sites as products of a Command Center at a control point / zone, if the Retribution campaign has the corresponding SAM site there. The SAM site presets are still static, I might make them dynamic in the future. 2024-02-25 12:39:47 +02:00
MetalStormGhost
cf9cc9ba33 Fixed a bug in generate_pretense_zone_connection(). 2024-02-25 12:39:47 +02:00
MetalStormGhost
39c80cb974 Implemented a list of units which will be removed from Pretense ground assault groups due to pathfinding problems. The units will just remain still instead of advancing. Also added one tank to each group and increased the maximum size of the groups to 5. Removed artillery units from the groups, similarly due to pathfinding problems. 2024-02-25 12:39:47 +02:00
MetalStormGhost
cf9538f7df Implemented spawning of ship statics/units at naval control points instead of land structures or SHORAD sites. 2024-02-25 12:39:46 +02:00
MetalStormGhost
3d15505347 Implemented a static method for creating the Pretense zone connections and to avoid duplicate connections. 2024-02-25 12:39:46 +02:00
MetalStormGhost
11a0713e50 Pretense SEAD missions will now also target AAA. Also incorporates the fix to fullBuild():
Dzsekeb — 03/09/2023 11:50
add the highlighted line to the fullbuild function
https://discord.com/channels/959044877470027848/1031459721313517578/1147815809075392604
2024-02-25 12:39:46 +02:00
MetalStormGhost
dd0217a220 Pretense SEAD flights will use the SEAD Sweep loadout, when available. 2024-02-25 12:39:45 +02:00
MetalStormGhost
d870099f41 Replaced the air defence Command Center with a bunker for SHORADs. Will use the Command Center in the future for medium/long range SAMs. 2024-02-25 12:39:45 +02:00
MetalStormGhost
c6a8673b5e Added missing generation of AI BAI flights. Player flight groups are now generated as single-ship groups to support the Pretense missions for all players. Moved repetitive code in PretenseFlightGroupSpawner to insert_into_pretense() method. Disabled spawning of air assault statics by PretenseFlightGroupConfigurator since they are unnecessary in Pretense. 2024-02-25 12:39:45 +02:00
MetalStormGhost
cc3bef7937 Copied flightgroupconfigurator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:44 +02:00
MetalStormGhost
0bdb989a2c Aircraft squadrons are now products of the Hangar, instead of the air defence Command Center. 2024-02-25 12:39:44 +02:00
MetalStormGhost
765c85b639 Now generates one transport helicopter squadron for each control point which can operate one. Also implemented generating several Pretense cargo plane squadrons, defined by PRETENSE_AI_CARGO_PLANES_PER_SIDE. Cleaned up PretenseMissionGenerator.generate_air_units() a bit. 2024-02-25 12:39:44 +02:00
Raffson
7b9ddb1ece Formatting 2024-02-25 12:39:44 +02:00
MetalStormGhost
5fa7757ae1 Fixed not all generated flights getting inserted into Pretense data structures. 2024-02-25 12:39:43 +02:00
MetalStormGhost
064d17aab0 Improved the typing of game.pretense_air 2024-02-25 12:39:43 +02:00
MetalStormGhost
47ee0e5340 Added naval units (supply/cargo/landing ships) to Pretense scripts. 2024-02-25 12:39:43 +02:00
MetalStormGhost
6fd60d150e Raise NoParkingSlotError instead of RuntimeError when running out of ground spawns. 2024-02-25 12:39:43 +02:00
MetalStormGhost
946d578ffb Implemented generating player slots in the Pretense campaign. 2024-02-25 12:39:42 +02:00
MetalStormGhost
95bac8ec17 Run aircraft_generator.generate_packages() only once per ATO, instead of multiple times. Fixed the duplicated flights issue. 2024-02-25 12:39:42 +02:00
MetalStormGhost
91cfff58d9 Changed tanker_tacan from "N/A" to 0.0 when the tanker is not compatible with TACAN, in order to avoid mission script errors. 2024-02-25 12:39:42 +02:00
MetalStormGhost
585b3e74a0 Implemented a separate generate_packages() method in PretenseAircraftGenerator to prevent generating the same ATO multiple times over. 2024-02-25 12:39:41 +02:00
Raffson
4ff31ea86d Blast through errors 2024-02-25 12:39:41 +02:00
Raffson
231a8609a1 imports 2024-02-25 12:39:41 +02:00
MetalStormGhost
a6104968e8 Don't spawn flights for the other squadron in generate_pretense_aircraft(). 2024-02-25 12:39:40 +02:00
MetalStormGhost
77060031da Cleaned up some code. 2024-02-25 12:39:40 +02:00
MetalStormGhost
51a4b6603d Now generates air units for both sides at airfields. 2024-02-25 12:39:40 +02:00
MetalStormGhost
4e4eeff9ec Split the Pretense zone definition generation into separate methods: generate_pretense_zone_land() for land control points and generate_pretense_zone_sea() for carriers/LHAs. 2024-02-25 12:39:39 +02:00
MetalStormGhost
4b092e0763 Fixed FlightType.AEWC and FlightType.REFUELING handling in generate_pretense_aircraft(). 2024-02-25 12:39:39 +02:00
MetalStormGhost
aa641e1ff6 Added configuration constants for flights generated for Pretense. Fixed a bug which caused only one squadron per CP to be generated. Will now not generate Pretense cargo flights from Retribution off-map spawns, but instead will generate own air spawn points for them. Added a helper function initialize_pretense_data_structures(). 2024-02-25 12:39:39 +02:00
MetalStormGhost
d0ff363bb5 Now splits the generated Pretense group role properly in create_vehicle_group(). 2024-02-25 12:39:39 +02:00
MetalStormGhost
a97b3fee99 Will now dynamically generate offmapZones for supply cargo aircraft. 2024-02-25 12:39:38 +02:00
MetalStormGhost
51462673a2 Cleaned up pretense/pretenseaircraftgenerator.py
Moved a lot of logic into proper methods and added comments for all of those methods.
2024-02-25 12:39:38 +02:00
MetalStormGhost
3c139d8038 Fixed conflicting types for cp in generate_mid_mission(). 2024-02-25 12:39:38 +02:00
MetalStormGhost
b99a719d1c Converted closest_friendly_control_points_to from returning a tuple of the two closest control points to returning a list of all in sorted order. 2024-02-25 12:39:38 +02:00
MetalStormGhost
992beb5f45 Fixed a type assignment in pretensecargo.py 2024-02-25 12:39:37 +02:00
MetalStormGhost
ae13a422c3 Calling the constructor of MissionGenerator in PretenseMissionGenerator in unnecessary, so leaving it out. 2024-02-25 12:39:37 +02:00
MetalStormGhost
0b8fa9099c Disabled the base Retribution plugin in pretenseluagenerator.py and disabled adding zones for OffMapSpawns. 2024-02-25 12:39:37 +02:00
MetalStormGhost
13e7e976c3 Now connects more isolated zones in Pretense. 2024-02-25 12:39:36 +02:00
MetalStormGhost
529841bfe4 Add CJTF factions to the coalitions in Pretense, if they're not being used in the Retribution campaign. 2024-02-25 12:39:36 +02:00
MetalStormGhost
c0e26b3b7f Fixed Pretense ground unit group id/name handling. 2024-02-25 12:39:36 +02:00
MetalStormGhost
a869c2a758 Also connect carrier and LHA control points to adjacent friendly points in Pretense. Enlarged the carrier trigger zones. 2024-02-25 12:39:35 +02:00
MetalStormGhost
60fde46249 Split the init_body.lua script in two parts to facilitate dynamic JTAC spawning. 2024-02-25 12:39:35 +02:00
MetalStormGhost
27b1c92815 PretenseFlightGroupSpawner method for spawning mid-mission flights and setting the appropriate Pretense names to them. 2024-02-25 12:39:35 +02:00
MetalStormGhost
d965f90bb4 Implemented spawning of Pretense cargo aircraft. To support that, implemented a separate flight plan called PretenseCargoFlightPlan. Also, will now automatically generate transport squadrons for factions which don't have pre-defined squadrons for it, but have access to transport aircraft. 2024-02-25 12:39:34 +02:00
MetalStormGhost
4ad87aef3e Add CJTF factions to the coalitions in Pretense, if they're not being used in the campaign. 2024-02-25 12:39:34 +02:00
MetalStormGhost
daa3259e59 Implemented dynamic outputting of JTAC units to the Pretense init script. 2024-02-25 12:39:34 +02:00
MetalStormGhost
545210b35d Split the init_body.lua script in two parts. 2024-02-25 12:39:33 +02:00
MetalStormGhost
1dd9089477 First version of the generated Pretense campaign running in-game. 2024-02-25 12:39:33 +02:00
MetalStormGhost
0faa27dca5 Now clears Retribution triggers when generating a Pretense campaign. 2024-02-25 12:39:33 +02:00
MetalStormGhost
1db232417f Fixed missing return statement with isinstance(cp, OffMapSpawn). 2024-02-25 12:39:33 +02:00
MetalStormGhost
8253d41d37 Implemented adding ground unit groups to pretense data containers. 2024-02-25 12:39:32 +02:00
MetalStormGhost
d8b0283efe Deleted pretense/pretenseflightgroupconfigurator.py since it looks like it's not needed (at least for the time being). 2024-02-25 12:39:32 +02:00
MetalStormGhost
8dfb05b0d1 Tanker and AWACS frequency, TACAN and variant handling. 2024-02-25 12:39:32 +02:00
MetalStormGhost
aad48c0b78 Dynamically generate Pretense air groups (pretense/pretenseluagenerator.py) 2024-02-25 12:39:32 +02:00
MetalStormGhost
ecf659097a Copied flightgroupconfigurator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:31 +02:00
MetalStormGhost
15fafc20df Removed the reference to (nonexistent) NewPretenseWizard. 2024-02-25 12:39:31 +02:00
MetalStormGhost
7d0234820c First version of PretenseLuaGenerator, inherited from LuaGenerator 2024-02-25 12:39:30 +02:00
MetalStormGhost
9f271cdb91 ntentionally don't spawn anything at OffMapSpawns in Pretense 2024-02-25 12:39:30 +02:00
MetalStormGhost
7b2424c746 Added newlines to Pretense init scripts. 2024-02-25 12:39:30 +02:00
MetalStormGhost
5c9a5a5e35 Split init.lua code into three pieces. 2024-02-25 12:39:29 +02:00
MetalStormGhost
b6f0ec4da0 Copied init.lua into init_header.lua, init_body.lua and init_footer.lua
The init.lua script will be generated by
 1. injecting the header, then
 2. generating the ZoneCommand zones, then
 3. generating ConnectionManager connections, then
 4. injecting init_body.lua, then
 5. generating sypply injection and finally by
 6. injecting init_footer.lua
2024-02-25 12:39:29 +02:00
MetalStormGhost
c95e746687 Lua scripts from Pretense Caucasus 1.3.5, credit: Dzsekeb, original author of DCS Pretense.
Used with permission.
2024-02-25 12:39:29 +02:00
MetalStormGhost
d58f06be6d Copied luagenerator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:28 +02:00
MetalStormGhost
f752d422df Added Pretense icon, credit: Dzsekeb, original author of DCS Pretense.
Used with permission.
2024-02-25 12:39:28 +02:00
MetalStormGhost
1322c3ca54 Cleaned up some of my recent Pretense code. 2024-02-25 12:39:28 +02:00
MetalStormGhost
dc02c6f857 Will now generate ground units for the Pretense campaign. 2024-02-25 12:39:27 +02:00
MetalStormGhost
3d781d89de Copied tgogenerator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:27 +02:00
MetalStormGhost
9b54730191 Implemented generating trigger zones for supply routes, theater ground objects and helicopter supply points. Implemented name generator for Pretense air units. 2024-02-25 12:39:27 +02:00
MetalStormGhost
af4cf03335 Copied flightgroupspawner.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:27 +02:00
MetalStormGhost
31fb340ac8 Will now generate control point trigger zones and AI aircraft for the Pretense campaign. 2024-02-25 12:39:26 +02:00
MetalStormGhost
975471e942 Copied three files as templates/inheritance for generating Pretense campaigns from Retribution campaigns:
- missiongenerator.py
 - aircraftgenerator.py
 - triggergenerator.py
2024-02-25 12:39:26 +02:00
Starfire13
65b2db0ece Add files via upload (#264) 2024-02-25 11:26:26 +01:00
Raffson
4416463ec8 Formatting 2024-02-25 01:09:01 +01:00
Raffson
c887a35d0b Move options to doctrine page 2024-02-25 01:05:50 +01:00
Raffson
9cb7617352 Optionally jettison empty fuel tanks for AI 2024-02-25 00:57:15 +01:00
Raffson
e36e213b76 Selectable aircraft type in AutoCreateDialog
Resolves #165
2024-02-25 00:38:17 +01:00
Raffson
b737f4e00c Guard against nil values 2024-02-24 22:05:13 +01:00
Raffson
d3d4acd806 Indicate performance impact for DCS Dismounts 2024-02-24 14:30:21 +01:00
Raffson
0d1c292b23 Add note to changelog 2024-02-24 14:21:27 +01:00
Raffson
7e620acb4f Update changelog 2024-02-23 23:43:27 +01:00
Raffson
aadff131a3 Pydcs update 2024-02-23 23:43:27 +01:00
Raffson
68a09ea81b Fix horrible bug 2024-02-23 23:43:27 +01:00
Starfire13
f1920d3bad Add FCR to new loadout slot for Apache Blk II (#263) 2024-02-23 23:43:03 +01:00
holyorangejuice
e7796be586 WRL Campaign and Faction Update
Overhauls to 1.2 on missions. Removed small error in faction.
2024-02-20 18:10:32 +01:00
Raffson
37fc571fa1 Pydcs fix
Resolve #261
2024-02-19 21:16:42 +01:00
Raffson
a7ee431768 Bump fastapi + starlette 2024-02-19 19:53:48 +01:00
tmz42
f7b34d2d79 Update Retake the Falklands - Add F-14A, add strike targets. 2024-02-19 19:31:32 +01:00
Raffson
e5c44a1f16 Fix save-compat issue 2024-02-19 19:18:21 +01:00
Raffson
e4b67ffb8a ROE optimisations 2024-02-19 19:18:21 +01:00
Starfire13
f54993f579 Update Exercise Bright Star OPFOR faction and squadron distribution (#259) 2024-02-19 07:55:53 +01:00
Raffson
b9230b6fb6 Improve travel-speeds for helicopters 2024-02-18 23:31:53 +01:00
Raffson
dbd9776aff Fix friendly AI shooting at fires at front-line 2024-02-18 23:29:10 +01:00
Raffson
e7e43a95fb Initialize Join wpt in migrator 2024-02-18 23:29:10 +01:00
Raffson
96b1f7cc3a Pydcs updates 2024-02-18 15:56:06 +01:00
Raffson
e5d199f20b Use ingress/arrival for helicopter join/split wpts 2024-02-18 15:56:05 +01:00
Raffson
fc467b62e0 Add comment 2024-02-18 13:23:19 +01:00
Starfire13
84b61b271b Updates for all of Starfire's campaigns (#258) 2024-02-18 13:22:21 +01:00
Starfire13
6571db3001 Add Egypt faction for Exercise Bright Star + Combined USA faction for Final Countdown II (#257) 2024-02-18 13:16:44 +01:00
Starfire13
3d98aaaae0 Add files via upload (#256) 2024-02-18 11:35:56 +01:00
Starfire13
581df54fe2 Add files via upload (#255) 2024-02-18 11:35:27 +01:00
Starfire13
e362b15c02 Add files via upload (#254) 2024-02-18 11:35:02 +01:00
Starfire13
738b0dffc5 Add DEAD mission type to Blackshark and Blackshark III choppers and update loadouts (#253) 2024-02-18 10:31:22 +01:00
Starfire13
56899985cd Add DEAD mission type to Apache and update loadouts (#252) 2024-02-18 10:26:52 +01:00
Raffson
781d611f17 Fix ground-seeking AirLift 2024-02-18 01:10:30 +01:00
Raffson
d901df4fa0 Remove more dead code 2024-02-18 01:10:29 +01:00
Raffson
40a733e147 Fix win/loss not triggering when carriers are present 2024-02-18 01:10:29 +01:00
Raffson
6e4d1e9e5c Remove duplicate code...
Like... how did I miss this -_-
2024-02-17 17:41:56 +01:00
Raffson
47531cd9fa Avoid heli AirAssault seeking ground after ingress 2024-02-17 01:03:05 +01:00
Raffson
1395dcea71 Tweaks to Airlift transfer 2024-02-16 22:55:43 +01:00
Raffson
fd6d81e3ad Update MIST to 4.5.122 2024-02-16 22:07:50 +01:00
Raffson
4ba5fa4766 Addition to existing changelog entry 2024-02-16 21:15:01 +01:00
Raffson
ca0a100d9a Send events when closing AWCD mid-campaign
Should fix the issue where the map isn't properly updating after making changes to the AWCD
2024-02-16 21:12:12 +01:00
Raffson
08c007b7bf Callsign not used when flight starts mid-mission 2024-02-16 20:47:31 +01:00
Raffson
e0aeabb63a Use CTLD zones for drop-off 2024-02-16 18:54:49 +01:00
Raffson
d9479be12e Max out airbase_threat_range in scenic_merge 2024-02-12 00:06:58 +01:00
Raffson
3f5b93a5c1 Introduce AttackShips compound task 2024-02-12 00:04:13 +01:00
Raffson
05163d41a0 Adjust comment 2024-02-12 00:03:48 +01:00
Raffson
5dfba64ac3 Don't break out of procurement loop 2024-02-12 00:03:27 +01:00
Raffson
76a077d38f Fix wrong names of CTLD-zones at Wadi al Jandali 2024-02-11 17:24:55 +01:00
Raffson
caad080b01 Update changelog 2024-02-11 17:17:30 +01:00
Raffson
35f6cd8f17 Plan Anti-Ship against all ship-groups of TGO 2024-02-11 16:56:10 +01:00
Raffson
89aa0985bc Multi-task fallback during configuration 2024-02-11 14:54:56 +01:00
Starfire13
747ccae023 S3B tasks update (#249)
* Add files via upload

* Add files via upload

* Adjust Strike & Remove OCA/Runway

Strike ->10xMk82 for better effect
OCA/Runway removed because S-3B doesn't support Runway Attack. As long as we don't implement some system to use the carpet bombing task as an alternative (note that this would need markers for representing the ends of runways), Ground Attack is no good to us...

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-02-11 13:54:03 +00:00
Starfire13
06242a433c Update B-52 loadout after ED's recent rework of the aircraft (#250)
* Add files via upload

* Use Mk82s exclusively in OCA/Runway payload

Combining different types of dumb bombs isn't quite supported by the AI (yet)

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-02-11 12:12:41 +00:00
Raffson
14a0310d25 Prioritize degrading IADS 2024-02-10 20:42:01 +01:00
Raffson
80bf5149fc Correct name of referenced weight factor 2024-02-10 18:39:43 +01:00
Raffson
80d1ae0950 Adding spaces 2024-02-10 18:39:43 +01:00
Raffson
cb68ff0df3 Configurable back-end port 2024-02-10 18:39:42 +01:00
Raffson
63d05ea696 Preference option to prioritize custom Liberation payloads 2024-02-09 23:52:27 +01:00
Raffson
7c05e94619 Remove unused code 2024-02-09 20:13:12 +01:00
Raffson
f4987e05e4 Rollback PySide6 update
White squares reported by @Starfire13
2024-02-09 19:51:32 +01:00
Raffson
4c13704630 Fix error on shutdown
Mentioned by NoGoodNews as well as Starfire, once you open the logs an error would present itself as follows:
RuntimeError: The SignalInstance object was already deleted
2024-02-09 19:20:29 +01:00
MetalStormGhost
a24925bc45 Updated pretense_compiled.lua to version 1.6.5:
Pretense v1.6.5 - 04 Feb 2024
Fixed error on restoring strike targets
Block slots from within the mission, removing the need for slotblock.lua
2024-02-06 11:02:15 +02:00
MetalStormGhost
3d8eed7334 Updated the Pretense script to version 1.4.5 2024-02-06 11:02:15 +02:00
MetalStormGhost
6e7844982d Ground unit presets are now generated from the coalition/faction definitions. 2024-02-06 11:02:14 +02:00
MetalStormGhost
1835743af0 Other coalition TGO spawns are now generated with the correct faction. 2024-02-06 10:59:25 +02:00
MetalStormGhost
3831f4f309 Added Iron Dome, David's Slinh, NASAMS-B and Rapier sites to Pretense. Fixed the timestamp in the save file name. 2024-02-06 10:59:25 +02:00
MetalStormGhost
226efe1151 Pretense zone radius (radii) for FOBs with FARPs will now be dynamically adjusted. Increased the size of Pretense zones at Damascus, Khalkhalah and Krasnodar-Pashkovsky (which are quite spread out) so the zone would encompass the entire airfield. 2024-02-06 10:59:24 +02:00
MetalStormGhost
db620a9056 Now randomly shuffles the Pretense squadrons when generating a Pretense campaign. 2024-02-06 10:59:24 +02:00
MetalStormGhost
2011a5f555 Helicopter escort squadrons no longer cause an error on Pretense campaign generation. 2024-02-06 10:59:24 +02:00
MetalStormGhost
6c9115f517 Separated init_header.lua into init_body_1.lua and init_header.lua. Deleted the ground unit groups since they will eventually be generated dynamically. 2024-02-06 10:59:24 +02:00
MetalStormGhost
17b9d9c3d5 Copied init_header.lua to init_body_1.lua 2024-02-06 10:59:23 +02:00
MetalStormGhost
2b63f45392 Rename resources/plugins/pretense/init_body_2.lua (from resources/plugins/pretense/init_body_1.lua) 2024-02-06 10:59:23 +02:00
MetalStormGhost
c830a6e7c0 Rename resources/plugins/pretense/init_body_3.lua (from resources/plugins/pretense/init_body_2.lua) 2024-02-06 10:59:23 +02:00
MetalStormGhost
59f6a3dcba Will now append the date and time in the Pretense savefile, mitigating risks of missions script errors when trying to load a savefile from a previously generated mission. 2024-02-06 10:59:22 +02:00
MetalStormGhost
09362cade4 Removed a non-functional option from the settings. 2024-02-06 10:59:22 +02:00
MetalStormGhost
85cec06098 Updated the Pretense script to version 1.3.8 - 3 Dec 2023 and MIST to version 4.5.122. 2024-02-06 10:59:21 +02:00
MetalStormGhost
4c201f25ba Will now correctly generate Pretense campaigns with CJTF factions. 2024-02-06 10:59:21 +02:00
MetalStormGhost
de0802a3c2 Implemented new options in settings:
- Pretense: Extra friendly zone connections - Add connections from each zone to this many closest friendly zones, which don't have an existing supply route defined in the campaign.
- Number of cargo planes per side
- Number of AI SEAD flights per control point / zone
- Number of AI CAS flights per control point / zone
- Number of AI BAI flights per control point / zone
- Number of AI Strike flights per control point / zone
- Number of AI BARCAP flights per control point / zone
- Number of AI aircraft per flight
- Number of player flights per aircraft type at each base
- Number of AI cargo planes per side

Implemented CAS helo mission handling for Pretense. Implemented separate pretense_air_groups container for storing/referencing Flight objects. Tweaked the supply costs of SAM sites and Command centers. Will no longer generate player air starts at roadbases either. Restored the missing DEAD flights to Pretense. Removed spawning of frontline units and moved the JTAC spawning to pretensemissiongenerator.py
2024-02-06 10:59:21 +02:00
MetalStormGhost
7908858433 Updated pretense_compiled.lua to version 1.3.6.
Implemented Pretense settings in pretense_compiled.lua
Added new function moveOffRoadToPointAndAssault() to enable assault groups to drive off-road and thus avoid some of the bridges where they might get stuck.
2024-02-06 10:59:20 +02:00
MetalStormGhost
595c468ab2 Restored Retribution scripts and triggers to Pretense campaigns. Pretense progress can now be translated back to Retribution. Moved the trigger clearing from pretenseluagenerator.py to pretensemissiongenerator.py
keepActive is now only enabled for airbases and carriers/LHAs, for performance reasons.
2024-02-06 10:59:20 +02:00
MetalStormGhost
87975b9aad Implemented a Pretense settings page. 2024-02-06 10:59:19 +02:00
MetalStormGhost
b508ef9aec Reduced the number of cargo planes to 2 per side. 2024-02-06 10:58:45 +02:00
MetalStormGhost
18a421f78e Fixed the bug of not generating opposing force ground unit groups at Pretense zones. Added the country name to ground vehicle group names to avoid duplicates. 2024-02-06 10:58:44 +02:00
MetalStormGhost
2b5c415159 Implemented generating runway zones at airports in Pretense. 2024-02-06 10:58:44 +02:00
MetalStormGhost
a3575995bd Restored compatibility of the Pretense generator after the timedelta -> datetime change and other changes caused by the Liberation merge/sync. 2024-02-06 10:58:44 +02:00
MetalStormGhost
04c32073aa In the event of too many channel users, fail gracefully by reusing a random channel instead of always the previous one. 2024-02-06 10:58:44 +02:00
MetalStormGhost
4f742b51f7 Moved SAM site presets from presets.defenses.sam to presets.defenses.red/blue 2024-02-06 10:58:43 +02:00
Raffson
e7b84e18d1 Fix errors due to LaserCodeRegistry move 2024-02-06 10:58:43 +02:00
MetalStormGhost
6c2e14c6d9 Implemented generating amphibious units for Pretense unit groups. Amphibious units are selected out of a pre-defined list. Units which the faction has access to are preferred, but certain default unit types are selected as a fall-back to ensure that all the generated units can swim. 2024-02-06 10:58:43 +02:00
MetalStormGhost
dc504005a1 Added new icons and a separate button which will point to the Pretense/Foothold Discord. 2024-02-06 10:58:42 +02:00
MetalStormGhost
359a579e65 Fixed a bug in SHORAD and SAM generation. 2024-02-06 10:58:42 +02:00
MetalStormGhost
473e70c44b Implemented SAM sites as products of a Command Center at a control point / zone, if the Retribution campaign has the corresponding SAM site there. The SAM site presets are still static, I might make them dynamic in the future. 2024-02-06 10:58:41 +02:00
MetalStormGhost
9be06d9601 Fixed a bug in generate_pretense_zone_connection(). 2024-02-06 10:58:41 +02:00
MetalStormGhost
9edb4ecc45 Implemented a list of units which will be removed from Pretense ground assault groups due to pathfinding problems. The units will just remain still instead of advancing. Also added one tank to each group and increased the maximum size of the groups to 5. Removed artillery units from the groups, similarly due to pathfinding problems. 2024-02-06 10:58:41 +02:00
MetalStormGhost
ffac036266 Implemented spawning of ship statics/units at naval control points instead of land structures or SHORAD sites. 2024-02-06 10:58:40 +02:00
MetalStormGhost
687ae88685 Implemented a static method for creating the Pretense zone connections and to avoid duplicate connections. 2024-02-06 10:58:40 +02:00
MetalStormGhost
4d8031ef96 Pretense SEAD missions will now also target AAA. Also incorporates the fix to fullBuild():
Dzsekeb — 03/09/2023 11:50
add the highlighted line to the fullbuild function
https://discord.com/channels/959044877470027848/1031459721313517578/1147815809075392604
2024-02-06 10:58:40 +02:00
MetalStormGhost
a60d1dce19 Pretense SEAD flights will use the SEAD Sweep loadout, when available. 2024-02-06 10:58:39 +02:00
MetalStormGhost
d1b8e20fde Replaced the air defence Command Center with a bunker for SHORADs. Will use the Command Center in the future for medium/long range SAMs. 2024-02-06 10:58:39 +02:00
MetalStormGhost
9d9740cdb3 Added missing generation of AI BAI flights. Player flight groups are now generated as single-ship groups to support the Pretense missions for all players. Moved repetitive code in PretenseFlightGroupSpawner to insert_into_pretense() method. Disabled spawning of air assault statics by PretenseFlightGroupConfigurator since they are unnecessary in Pretense. 2024-02-06 10:58:39 +02:00
MetalStormGhost
bd4e2d7189 Copied flightgroupconfigurator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-06 10:58:38 +02:00
MetalStormGhost
8f883d51d7 Aircraft squadrons are now products of the Hangar, instead of the air defence Command Center. 2024-02-06 10:58:38 +02:00
MetalStormGhost
fbbc2536a1 Now generates one transport helicopter squadron for each control point which can operate one. Also implemented generating several Pretense cargo plane squadrons, defined by PRETENSE_AI_CARGO_PLANES_PER_SIDE. Cleaned up PretenseMissionGenerator.generate_air_units() a bit. 2024-02-06 10:58:38 +02:00
Raffson
6f4a12658d Formatting 2024-02-06 10:58:38 +02:00
MetalStormGhost
1bcecd5b3a Fixed not all generated flights getting inserted into Pretense data structures. 2024-02-06 10:58:37 +02:00
MetalStormGhost
7653866ddb Improved the typing of game.pretense_air 2024-02-06 10:58:37 +02:00
MetalStormGhost
ecaa68f32a Added naval units (supply/cargo/landing ships) to Pretense scripts. 2024-02-06 10:58:37 +02:00
MetalStormGhost
bd0deed16a Raise NoParkingSlotError instead of RuntimeError when running out of ground spawns. 2024-02-06 10:58:36 +02:00
MetalStormGhost
d890ef0808 Implemented generating player slots in the Pretense campaign. 2024-02-06 10:58:36 +02:00
MetalStormGhost
8520764308 Run aircraft_generator.generate_packages() only once per ATO, instead of multiple times. Fixed the duplicated flights issue. 2024-02-06 10:58:36 +02:00
MetalStormGhost
1e3f6baceb Changed tanker_tacan from "N/A" to 0.0 when the tanker is not compatible with TACAN, in order to avoid mission script errors. 2024-02-06 10:58:36 +02:00
MetalStormGhost
00bcd547d3 Implemented a separate generate_packages() method in PretenseAircraftGenerator to prevent generating the same ATO multiple times over. 2024-02-06 10:58:35 +02:00
Raffson
a30fb0f368 Blast through errors 2024-02-06 10:58:35 +02:00
Raffson
087a38d105 imports 2024-02-06 10:58:35 +02:00
MetalStormGhost
bc92a2ade3 Don't spawn flights for the other squadron in generate_pretense_aircraft(). 2024-02-06 10:58:34 +02:00
MetalStormGhost
bc27dc4621 Cleaned up some code. 2024-02-06 10:58:34 +02:00
MetalStormGhost
94c1455249 Now generates air units for both sides at airfields. 2024-02-06 10:58:34 +02:00
MetalStormGhost
4be122e11a Split the Pretense zone definition generation into separate methods: generate_pretense_zone_land() for land control points and generate_pretense_zone_sea() for carriers/LHAs. 2024-02-06 10:58:34 +02:00
MetalStormGhost
f7c6f14220 Fixed FlightType.AEWC and FlightType.REFUELING handling in generate_pretense_aircraft(). 2024-02-06 10:58:33 +02:00
MetalStormGhost
c7ec3283bd Added configuration constants for flights generated for Pretense. Fixed a bug which caused only one squadron per CP to be generated. Will now not generate Pretense cargo flights from Retribution off-map spawns, but instead will generate own air spawn points for them. Added a helper function initialize_pretense_data_structures(). 2024-02-06 10:58:33 +02:00
MetalStormGhost
1d6c8a2453 Now splits the generated Pretense group role properly in create_vehicle_group(). 2024-02-06 10:58:33 +02:00
MetalStormGhost
730b982247 Will now dynamically generate offmapZones for supply cargo aircraft. 2024-02-06 10:58:33 +02:00
MetalStormGhost
8aea905640 Cleaned up pretense/pretenseaircraftgenerator.py
Moved a lot of logic into proper methods and added comments for all of those methods.
2024-02-06 10:58:32 +02:00
MetalStormGhost
3809e28a6a Fixed conflicting types for cp in generate_mid_mission(). 2024-02-06 10:58:32 +02:00
MetalStormGhost
19984636e3 Converted closest_friendly_control_points_to from returning a tuple of the two closest control points to returning a list of all in sorted order. 2024-02-06 10:58:32 +02:00
MetalStormGhost
f4c5c96fba Fixed a type assignment in pretensecargo.py 2024-02-06 10:58:31 +02:00
MetalStormGhost
2e889325e1 Calling the constructor of MissionGenerator in PretenseMissionGenerator in unnecessary, so leaving it out. 2024-02-06 10:58:31 +02:00
MetalStormGhost
a787cd4f70 Disabled the base Retribution plugin in pretenseluagenerator.py and disabled adding zones for OffMapSpawns. 2024-02-06 10:58:31 +02:00
MetalStormGhost
a975e2c2dc Now connects more isolated zones in Pretense. 2024-02-06 10:58:30 +02:00
MetalStormGhost
ddc5709a17 Add CJTF factions to the coalitions in Pretense, if they're not being used in the Retribution campaign. 2024-02-06 10:58:30 +02:00
MetalStormGhost
34fae51189 Fixed Pretense ground unit group id/name handling. 2024-02-06 10:58:30 +02:00
MetalStormGhost
5621649f10 Also connect carrier and LHA control points to adjacent friendly points in Pretense. Enlarged the carrier trigger zones. 2024-02-06 10:58:29 +02:00
MetalStormGhost
f4a239aaad Split the init_body.lua script in two parts to facilitate dynamic JTAC spawning. 2024-02-06 10:58:29 +02:00
MetalStormGhost
46e7f89da9 PretenseFlightGroupSpawner method for spawning mid-mission flights and setting the appropriate Pretense names to them. 2024-02-06 10:58:29 +02:00
MetalStormGhost
b73a18b7b9 Implemented spawning of Pretense cargo aircraft. To support that, implemented a separate flight plan called PretenseCargoFlightPlan. Also, will now automatically generate transport squadrons for factions which don't have pre-defined squadrons for it, but have access to transport aircraft. 2024-02-06 10:58:29 +02:00
MetalStormGhost
4a859e00ae Add CJTF factions to the coalitions in Pretense, if they're not being used in the campaign. 2024-02-06 10:58:28 +02:00
MetalStormGhost
acf035697f Implemented dynamic outputting of JTAC units to the Pretense init script. 2024-02-06 10:58:28 +02:00
MetalStormGhost
04993ddf1b Split the init_body.lua script in two parts. 2024-02-06 10:58:28 +02:00
MetalStormGhost
93265040f6 First version of the generated Pretense campaign running in-game. 2024-02-06 10:58:27 +02:00
MetalStormGhost
d517b1cdeb Now clears Retribution triggers when generating a Pretense campaign. 2024-02-06 10:58:27 +02:00
MetalStormGhost
5687c15c21 Fixed missing return statement with isinstance(cp, OffMapSpawn). 2024-02-06 10:58:27 +02:00
MetalStormGhost
c4effe88ee Implemented adding ground unit groups to pretense data containers. 2024-02-06 10:58:26 +02:00
MetalStormGhost
ab76d18621 Deleted pretense/pretenseflightgroupconfigurator.py since it looks like it's not needed (at least for the time being). 2024-02-06 10:58:26 +02:00
MetalStormGhost
f7e618bd0f Tanker and AWACS frequency, TACAN and variant handling. 2024-02-06 10:58:26 +02:00
MetalStormGhost
73f7d94bda Dynamically generate Pretense air groups (pretense/pretenseluagenerator.py) 2024-02-06 10:58:26 +02:00
MetalStormGhost
33a2c27f5e Copied flightgroupconfigurator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-06 10:58:25 +02:00
MetalStormGhost
17533399b3 Removed the reference to (nonexistent) NewPretenseWizard. 2024-02-06 10:58:25 +02:00
MetalStormGhost
cc713f089a First version of PretenseLuaGenerator, inherited from LuaGenerator 2024-02-06 10:58:25 +02:00
MetalStormGhost
84c20e8d81 ntentionally don't spawn anything at OffMapSpawns in Pretense 2024-02-06 10:58:24 +02:00
MetalStormGhost
c126d1dff7 Added newlines to Pretense init scripts. 2024-02-06 10:58:24 +02:00
MetalStormGhost
f500ec916e Split init.lua code into three pieces. 2024-02-06 10:58:24 +02:00
MetalStormGhost
842c2f8aaf Copied init.lua into init_header.lua, init_body.lua and init_footer.lua
The init.lua script will be generated by
 1. injecting the header, then
 2. generating the ZoneCommand zones, then
 3. generating ConnectionManager connections, then
 4. injecting init_body.lua, then
 5. generating sypply injection and finally by
 6. injecting init_footer.lua
2024-02-06 10:58:22 +02:00
MetalStormGhost
db993697f0 Lua scripts from Pretense Caucasus 1.3.5, credit: Dzsekeb, original author of DCS Pretense.
Used with permission.
2024-02-06 10:58:22 +02:00
MetalStormGhost
c8f78c1bf4 Copied luagenerator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-06 10:58:22 +02:00
MetalStormGhost
9135a91bb9 Added Pretense icon, credit: Dzsekeb, original author of DCS Pretense.
Used with permission.
2024-02-06 10:58:22 +02:00
MetalStormGhost
94d755e9a0 Cleaned up some of my recent Pretense code. 2024-02-06 10:58:21 +02:00
MetalStormGhost
d09cb70948 Will now generate ground units for the Pretense campaign. 2024-02-06 10:58:21 +02:00
MetalStormGhost
86e32b1990 Copied tgogenerator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-06 10:58:21 +02:00
MetalStormGhost
676e4dcebf Implemented generating trigger zones for supply routes, theater ground objects and helicopter supply points. Implemented name generator for Pretense air units. 2024-02-06 10:58:20 +02:00
MetalStormGhost
d6ab4e9891 Copied flightgroupspawner.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-06 10:58:20 +02:00
MetalStormGhost
db95fc17dc Will now generate control point trigger zones and AI aircraft for the Pretense campaign. 2024-02-06 10:58:20 +02:00
MetalStormGhost
8402e5d9bb Copied three files as templates/inheritance for generating Pretense campaigns from Retribution campaigns:
- missiongenerator.py
 - aircraftgenerator.py
 - triggergenerator.py
2024-02-06 10:58:19 +02:00
Raffson
3e373b706f pydcs update
Solving a bug where a mission can't be deserialized with Link4
2024-02-04 23:38:24 +01:00
Raffson
5aefa4ae55 Fix keyboard modifiers + off-by-one bug 2024-02-04 23:25:14 +01:00
Raffson
7f92db75df Upgrade dependencies 2024-02-04 23:25:14 +01:00
Raffson
7a94db5404 Remove redundant code 2024-02-04 20:35:36 +01:00
tmz42
a30bfd2a45 tmz campaign updates (#239) 2024-02-04 14:57:50 +01:00
MetalStormGhost
33cfcd211a Removed IDF Mods Project Iron Dome mod artillery assets, since they are not included in the IDF Assets Pack mod which is currently supported in Retribution. 2024-02-01 23:29:18 +01:00
Raffson
0edcd31367 Fix desync wrt off-map flights 2024-01-28 19:20:34 +01:00
MetalStormGhost
ca98183e94 IDF Assets Pack support v1.1 (#233)
* Updated Irondome support to IDF Assets Pack V1.1, which includes the David's Sling.

* Added an Israel 2017 faction with the David's Sling.

* IDF Assets Pack air defence presets and assets are now correctly removed from the faction when the mod is disabled.

* Removed the Iron Dome mod rocket launchers:
- "9M22U - 122mm Grad"
- "9M27F - 229mm Uragan"
- "9M55F - 300mm Smerch"

These were added to the Iron Dome Mod V1.2 in order for the radar to recognize them and be able to intercept them (these are limitations of DCS), so new rockets were added. However, they don't exist in the IDF Assets Pack.

* IronDome to IDF-Assets migration

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-01-28 17:35:24 +00:00
Raffson
8ff6e5688a Pin black in workflow
New version of 'black' will most likely cause a lot of merge conflicts, thus let's pin the version for now until the Pretense generator is merged...
2024-01-28 17:39:47 +01:00
Raffson
dad5e7c146 Fix TOT-offset issues 2024-01-28 17:39:46 +01:00
Raffson
8d56e2d3bb Reinitialize flights upon abort 2024-01-28 14:44:17 +01:00
Raffson
a2494e467e Deepcopy TOT for cloned package 2024-01-28 00:06:34 +01:00
Raffson
8ae63796cf Increase buffer around landing-zone
This aims to specifically tackle the issue where AI helicopters tend to crash into the depot of the pickup-zone
Resolves #138
2024-01-21 22:36:00 +01:00
Raffson
6a002a7d43 Finish up kneeboard improvements
Resolve #106
2024-01-21 20:37:47 +01:00
Raffson
0b060d3110 De-spawn AI flights on RTB if start-type was set to In-Flight
Resolve #73
2024-01-21 18:40:33 +01:00
Raffson
bc26eb3f5e Fix naval aircraft not always returning to carrier 2024-01-21 13:36:38 +01:00
Raffson
d6026681ee Formatting 2024-01-20 22:29:56 +01:00
Raffson
9ab8e15dd1 Avoid incompatible mix of SR/TR/LN units
The call to 'add_or_update_force_group' would end up merging the force-groups, which in turn could cause SAM sites to have an SA-2 SR & TR with SA-6 launchers...
2024-01-20 22:28:32 +01:00
Raffson
febc901518 Refactor 2024-01-20 17:25:40 +01:00
Raffson
26066ef8f4 Adjust parameters for delaying ground-forces 2024-01-20 17:21:46 +01:00
Raffson
f548b27ac5 More accurate switch-wpt index for escort split-trigger 2024-01-20 16:56:49 +01:00
Raffson
181f8583d5 Despawn aircraft returning to off-map CPs 2024-01-20 16:56:48 +01:00
Raffson
e6e557c18a Fix some edge-cases wrt SetUnlimitedFuel 2024-01-20 16:56:35 +01:00
Raffson
a6a872eebb Formatting 2024-01-20 16:56:30 +01:00
tmz42
d07cb46741 Waypoint changes (F15E Strike Targets and Tomcat IP) (#236)
* Change indentation of register_special_waypoints (put out of loop)

* Added Strike Targets as F-15E Mission Target points (Set/Mission 1)

* Set up check for ASM : only if non-human flight lead. Add targets to the kneeboard.

* Generate multiple sets (i-e M2.1) for situations where the number of points is more than 8.

Added check condition to kneeboard (otherwise, may result in multiple writes).

* Change name of register_special_waypoints to register_special_strike_points

Add register_special_ingress_points method for special IPs and add to the appropriate classes

* Add changelog entry for Tomcat's IP wpt

* Avoid depending on client slots for special wpts injection

---------

Co-authored-by: tmz42 <thomas.monnzie@gmail.com>
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-01-20 15:54:37 +00:00
tmz42
df3bd146da Add SA-10 Flat Lid-B TR to radar_db.py (#235) 2024-01-11 18:35:56 +01:00
Raffson
93ec459460 Fix bug introduced by AI unlimited fuel option
Since the unlimited fuel option would add the option before the threat-reaction option, this result into a false assertion when using EWJ
2024-01-07 15:04:50 +01:00
Raffson
6e96b4fbb0 Fix AWCD bugs mentioned by Drexyl 2024-01-06 21:06:27 +01:00
tmz42
79b1d949ce AI unlimited fuel initial implementation (#227)
* Unlimited fuel for AI flights. For player flights, included at startup, for AI flights with join/split, applied at join/split.

* Unlimited fuel for AI flights. For player flights, included at startup, for AI flights with join/split, applied at join/split.

* Corrected default value of ai_unlimited_fuel to False in configure_behavior

* ai_unlimited_fuel : set argument based on setting and simplify activation section

* AI Unlimited Fuel : enable at start, disable at racetrack start/join, enable at racetrack end/split

* Correct typing : bool to Optional[bool]

---------

Co-authored-by: tmz42 <thomas.monnzie@gmail.com>
2024-01-06 21:04:57 +01:00
MetalStormGhost
5ca12373d8 Improvements to disabled aircraft mod handling in Faction (#234) 2023-12-30 18:13:38 +01:00
MetalStormGhost
7e0125725c Swedish Military Assets Pack air defence presets are now correctly removed from the faction when the mod is disabled. 2023-12-30 10:51:38 +01:00
dependabot[bot]
5eb25e02a4 Bump @babel/traverse and @trivago/prettier-plugin-sort-imports (#231)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) to 7.23.2 and updates ancestor dependencies [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) and [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports). These dependencies need to be updated together.


Updates `@babel/traverse` from 7.20.13 to 7.23.2
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

Updates `@babel/traverse` from 7.17.3 to 7.23.2
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

Updates `@trivago/prettier-plugin-sort-imports` from 3.4.0 to 4.3.0
- [Release notes](https://github.com/trivago/prettier-plugin-sort-imports/releases)
- [Changelog](https://github.com/trivago/prettier-plugin-sort-imports/blob/main/CHANGELOG.md)
- [Commits](https://github.com/trivago/prettier-plugin-sort-imports/compare/v3.4.0...v4.3.0)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
- dependency-name: "@babel/traverse"
  dependency-type: indirect
- dependency-name: "@trivago/prettier-plugin-sort-imports"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 17:00:45 +00:00
dependabot[bot]
435bac3847 Bump @adobe/css-tools from 4.3.1 to 4.3.2 in /client (#230)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 16:59:25 +00:00
dependabot[bot]
6e879b297e Bump axios from 1.3.2 to 1.6.0 in /client (#229)
Bumps [axios](https://github.com/axios/axios) from 1.3.2 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.3.2...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 16:59:10 +00:00
dependabot[bot]
bf4f882214 Bump pyinstaller from 5.13.0 to 5.13.1 (#228)
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.13.0 to 5.13.1.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.13.0...v5.13.1)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-29 16:57:06 +00:00
Raffson
d0dec86a6d Add Load/Save for AirWingConfig #167 2023-12-29 17:50:05 +01:00
Raffson
96c7e20488 Remove line causing exception
Presumably the signature changed when migrating to PySide6
2023-12-29 17:40:43 +01:00
Raffson
35408f7a53 Re-initialize turn after AWCD changes if turn > 0 2023-12-29 17:38:24 +01:00
Raffson
62df761d9c Rename faction.aircrafts -> faction.all_aircraft 2023-12-29 15:20:00 +01:00
Raffson
9ff9fa5b69 Add AWCD mid-game cheat 2023-12-29 13:16:30 +01:00
Raffson
d6f586bbe3 Pydcs update 2023-12-29 13:16:30 +01:00
ingax01
e63520265c added missing weapon classes after SU-30 2.7.3b update (#225) 2023-12-29 11:55:00 +01:00
MetalStormGhost
4d4f4d1930 F-4B/C mod support v2.8.7.204 (#217)
* Rename     pydcs_extensions/f4/__init__.py (from pydcs_extensions/f4b/__init__.py)
Rename     pydcs_extensions/f4/f4b.py (from pydcs_extensions/f4b/f4b.py)

* Rename     pydcs_extensions/f4/f4.py (from pydcs_extensions/f4/f4b.py)

* Support for the updated F-4B/C mod

Updated the F4.py pydcs extension to match the updated F-4B/C mod and
reworked the standard payloads to add "clean" to new F-4B pylons 11 and
12.

This includes a workaround to allow Liberation to use the new VSN F-4B
weapons with combined 2x Aim-9js on pylons 3 and 9 underslung with bombs
on ters on new pylons 11 and 12. In mission editor the combined weapons
are selected in pylons 3 and 9 and their under-slung counterparts are
forced onto 11 and 12 using "required" arguments in the mod's lua. All
other pylon 3 and 9 weapons use "required clean" arguments. Liberation
doesn't have a way to force these linkages onto pylons 11 and 12 and
without them, even without clean, no weapons will load on 3 and 9 or 11
and 12.

The workaround for normal weapons on the F-4B is to set the standard
load-outs to "clean" on pylons 11 and 12. This allows all normal weapons
to work on pylons 3 and 9 so long as pylons 11 and 12 are left as Clean.
It also allows Clean into the Liberation dropdown so it can be selected
later if necessary.

The workaround for the 4 new weapons that combines pylons 3 with 11 and
9 with 12 is that the user has to use the matching pair on each set of
pylons. For example - if F4B_LAU105_AIM9J_2_BRU42A_MK82_3 is selected
for pylon 3, BRU 42A MK823 LAU105 AIM9J2 must be selected for pylon 11.
Failure to do this correctly doesn't crash liberation or DCS, the result
will just be either no weapons at all on either pylon or the underslung
weapons on 11 and 12 floating without a pylon attaching it to the plane.

When updating f4.py in the future, note that running the pydcs database
export doesn't pull any data for Pylons 11 and 12. Those matching
weapons / classes have to be manually defined in those pylons for the
F-4B. This is noted in f4.py.

* F-4 mod support update to 2.8.7.201

* Updated QGeneratorSettings.py and the changelog.

* Updated F-4B and F-4C loadouts.

* Added the Phantom to some additional factions.

* Changelog updated: Updated support for F-4B/C Phantom mod to 2.8.7.204

The pydcs export for the latest patch was identical, which means it's also supported.

* Migrator change for renamed F-4B/C folder

---------

Co-authored-by: Nosajthedevil <78634843+Nosajthedevil@users.noreply.github.com>
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-12-28 12:50:24 +01:00
Raffson
387f72ace2 Adjust clusterWeaps table to match clusterDamage table
Should fix script errors reported by users
2023-12-17 18:37:21 +01:00
Raffson
93abee2e35 Fix AttributeError when enabling cheats in campaign setup 2023-12-17 18:37:20 +01:00
Raffson
94580bad88 Add SHORAD as SAM & AAA as EWR 2023-12-17 18:37:20 +01:00
Raffson
b35e0c26d6 Fix wrong name 2023-12-17 17:37:15 +01:00
Raffson
7d95e3e2fe Add new units to skynet script 2023-12-17 17:37:14 +01:00
Raffson
9c40506728 Add units to mobile-SAM plugin-options 2023-12-17 17:36:57 +01:00
MetalStormGhost
60859d39c1 Fixed the Channel landmap. 2023-12-01 21:14:36 +01:00
MetalStormGhost
8740df65c4 F/A-18E/F Super Hornet AI Tanker mod support (#220)
* Added F/A-18E/F Super Hornet AI Tanker mod support (Chiller Juice Studios SuperBug Tanker AI version 1.1).

* Updated F/A-18E/F Super Hornet AI Tanker mod support (Chiller Juice Studios SuperBug Tanker AI) to version 1.2.

* F/A-18E/F Super Hornet AI Tanker (version 1.2) support merged to Retribution.

* Updated the pydcs extension to version 1.4.
2023-11-26 20:16:11 +01:00
tmz42
26b15c66b8 Small campaign alterations - Retake The Falklands and Scenic Merge 2023-11-26 20:13:02 +01:00
tmz42
04ac3d51b3 Added US Navy Squadrons Bulls and Swordsmen (#221)
Co-authored-by: tmz42 <thomas.monnzie@gmail.com>
2023-11-25 13:18:54 +02:00
Raffson
1c609e1b70 Formatting 2023-11-19 18:13:46 +01:00
Raffson
5de863fbb8 Update F-15ESE payloads 2023-11-19 16:19:17 +01:00
Raffson
11d8f139f8 Fix mypy complaining, again... 2023-11-19 15:32:11 +01:00
Raffson
65947129f0 Correct FAC callsign for JTAC 2023-11-19 13:37:27 +01:00
Raffson
d85d73a6d0 pydcs mypy fix 2023-11-19 01:42:36 +01:00
Raffson
28e3c3d817 mypy fix 2023-11-19 01:38:04 +01:00
Raffson
9907432a0a Add sunrise-sunset times on kneeboard 2023-11-18 23:46:38 +01:00
Raffson
ade81f4548 Ability to set callsigns 2023-11-18 23:06:56 +01:00
Raffson
aaf23d52bc pydcs follow-up for callsigns 2023-11-18 22:52:18 +01:00
Raffson
b5dd2767a7 pydcs update 2023-11-18 21:55:50 +01:00
Raffson
5043a1b8ac Fix wrong check 2023-11-18 20:32:06 +01:00
Raffson
cade8f4a19 Add lost weapons back to explTable 2023-11-13 18:11:32 +01:00
Raffson
82e2f1c2b5 Make text selectable in Settings window 2023-11-12 15:28:14 +01:00
Raffson
6cfa52740e Add laser guided rockets to Splash Damage 2023-11-12 12:59:33 +01:00
MetalStormGhost
26f83cf269 Splash Damage with Clusters and Ship Radar effects (#206)
* Splash Damage with Clusters and Ship Radar effects
Based on the Splash Damage 2.0 by wheelyjoe, FrozenDroid and spencershepard/GRIMM (21 December 2021 version)

New features:
 -damage boost for parked aircraft since they are hard to kill (DCS: Retribution OCA/Aircraft mission improvement)
 -cluster weapons support
 -helicopter gunship autocannon fragmentation effect support
 -napalm will now spawn fire on impact
 -ship radars might turn off when hit with anti-radiation missiles
 -BDA messages for splash damage

New features can be tweaked, turned on or off in the Retribution settings and/or in the script options.

* Updated changelog.md

* Added missing changelog entry from 29 May 2022 to Weapons_Damage_Updated.lua

* Integrate splashdamageclusters into original

* Fix 'nil' exceptions

* Remove Ghosti's original implementation

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-11-12 11:36:17 +00:00
tmz42
4cbadb1d81 Tripoint : from Incirlik is actually from Incirlik now 2023-11-11 12:41:58 +01:00
tmz42
f950230fb5 Deleted B-1Bs from RTF, added Satnav to faction file 2023-11-11 12:41:58 +01:00
MetalStormGhost
6384f2feb2 Updated QGeneratorSettings.py 2023-11-06 20:30:10 +01:00
MetalStormGhost
f648add735 Update A-4E-C mod support to version 2.2.0.
Updated Community A-4E-C mod version pydcs extension to 2.2.0 release.
2023-11-06 20:30:10 +01:00
tmz42
470cdd64d4 Added requested changes to the PR 2023-11-06 19:48:58 +01:00
tmz42
17ee2385f3 Retake the Falklands v1 : addec campaigns + factions 2023-11-06 19:48:58 +01:00
tmz42
25ee1dfc45 Tripoint Hostility update : added carrier spawn + flights from Turkey actually start from Incirlik 2023-11-06 19:48:58 +01:00
Thomas MONZIE
859af22d2c Faction correction - Removed SA10 Mobile + Castle Class 2023-10-25 17:37:29 +02:00
Thomas MONZIE
da1a820d45 Allied Sword - Minor error correction 2023-10-25 17:37:29 +02:00
Raffson
bc861380f0 Allow hiding IADS TGOs on MFD 2023-10-22 00:23:00 +02:00
Raffson
e3dcf8e547 Add new units 2023-10-21 21:27:42 +02:00
Raffson
9805c482c2 Pydcs update for unlimited fuel option 2023-10-21 21:27:42 +02:00
Raffson
7d314f8ee4 Lock waypoint speed if ETA is 0 & avoid negative ETAs 2023-10-21 21:27:41 +02:00
zhexu14
10aee31c7d address issue 3175 by introducing special divide by zero handling 2023-10-21 21:27:41 +02:00
Starfire13
6f1ee9561b Final Countdown 2 update for campaign inversion
Fixes incorrect airfield assignment when campaign is inverted
2023-10-21 21:27:41 +02:00
Raffson
8f531d247d Update pydcs for 2.9 support 2023-10-21 21:27:40 +02:00
Thomas MONZIE
f5bee7cc5d Sync Strike Eagle Squadrons from Liberation 2023-10-16 22:06:44 +02:00
Raffson
d8ce0a6c24 Revert "Fix mypy complaint"
This reverts commit b0047784dc.
2023-10-15 20:56:30 +02:00
Raffson
be634ab961 Revert "Update to Python3.11"
This reverts commit d6ba45a42b.
2023-10-15 20:53:03 +02:00
Raffson
b0047784dc Fix mypy complaint 2023-10-15 20:03:17 +02:00
Raffson
d6ba45a42b Update to Python3.11 2023-10-15 19:53:24 +02:00
Raffson
291822b5c8 PySide6 downgrade to 6.4.3
6.5.x seems to have some issues with QWebEngineView
2023-10-15 19:52:57 +02:00
Raffson
d3a56fa893 Remove unnecessary attribute 2023-10-15 17:32:32 +02:00
Raffson
7d347eee94 Fix traveltime & offsets 2023-10-15 13:32:11 +02:00
Raffson
bcdf2ad887 Fix wrong logic wrt hold WPT & air-assault 2023-10-15 12:57:28 +02:00
Raffson
22900407dd Format time for WPTs on map 2023-10-15 12:55:55 +02:00
Raffson
84c9098dba Add missing colon in departure time 2023-10-15 12:27:42 +02:00
Raffson
63e2c30e44 Fix SEAD Sweep not available at campaign start 2023-10-15 12:23:18 +02:00
Raffson
02ae5d9ad7 Remove faulty beacon in migrator 2023-10-14 20:11:08 +02:00
Raffson
91fb0cea58 pydcs update 2023-10-14 19:27:24 +02:00
Raffson
3c921198af PySide6 steamlining 2023-10-14 18:42:48 +02:00
Raffson
7a3c9a707f Fix external views not allowing F5 view 2023-10-14 16:02:39 +02:00
Raffson
3b319ca481 Update contributors list 2023-10-14 15:52:04 +02:00
Raffson
7adbe71475 Fix payload saver 2023-10-14 15:40:29 +02:00
Raffson
06f51573e1 Fix kneeboard notes bug 2023-10-14 15:17:52 +02:00
tmz42
b2c38f454f Correct Squadron sizes for Fuzzle's campaigns + new campaign 'Scenic Merge' (#212)
* Corrected Squadron sizes for Fuzzle's campaigns + Scenic Merge

* Scenic Merge - Set performance to an accurate 3

---------

Co-authored-by: Thomas MONZIE <thomas.monnzie@gmail.com>
Co-authored-by: tmz42 <tmz42@users.noreply.github.com>
2023-10-12 18:05:58 +00:00
Raffson
c9ed0352b7 Fix kneeboard bug preventing mission generation 2023-10-08 14:23:12 +02:00
Raffson
b8ef4fc726 Pipeline? 2023-10-08 01:43:25 +02:00
Raffson
394627e8d5 Pipeline! 2023-10-08 01:40:03 +02:00
Raffson
f513e27dc6 Pipeline 2023-10-08 01:34:54 +02:00
dependabot[bot]
fe6ff6a1ae Bump electron from 21.4.1 to 22.3.25 in /client
Bumps [electron](https://github.com/electron/electron) from 21.4.1 to 22.3.25.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v21.4.1...v22.3.25)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 01:14:45 +02:00
Raffson
88a5179653 Streamlining 2023-10-08 01:12:45 +02:00
Raffson
a357097c49 Update dependencies 2023-10-08 00:53:52 +02:00
Raffson
c4be00d11b Migrate to PySide6 2023-10-08 00:53:51 +02:00
Raffson
93b83f2bc8 Streamlining 2023-10-08 00:37:39 +02:00
Dan Albert
a2e98f485c Remove bingo estimates from FlightPlan.
This doesn't need to be a part of FlightPlan, and it's easier to test if
it isn't. Move it out and add the tests.

It's pretty misleading to allow this in the core of the flight plan code
anything. This is an extremely unreliable estimate for most aircraft so
it should be more clearly just for briefing purposes.
2023-10-07 23:08:25 +02:00
Raffson
e04f23bf15 Streamlining 2023-10-07 22:46:16 +02:00
Dan Albert
f11689f4cb Allow flights to self-initialize.
This makes it possible to add new packages to a running sim.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:43:28 +02:00
Raffson
ea726bbf06 Streamlining 2023-10-07 21:43:27 +02:00
Dan Albert
59673e7911 Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:09:25 +02:00
Starfire13
625c4f2dfb New version of Exercise Bright Star with carrier 2023-10-07 20:55:09 +02:00
Dan Albert
6a47e84699 Increase max distance for waypoint solver.
1000km isn't large enough in the case where there's an off-map spawn
that's a long way from the target, but still in range for aircraft like
the B-1. Double it, which for now is enough to fix the one pathological
case we know.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3156.
2023-10-07 20:55:09 +02:00
Dan Albert
14d3e743d4 Remove useless TravelTime class.
This is only called for real in one spot. The other callers should have
been deferring to the one real caller.
2023-10-07 20:55:08 +02:00
Dan Albert
dcaee350cf Remove dead code. 2023-10-07 19:11:40 +02:00
Dan Albert
d205e66fe4 Don't flag negative starts for active flights.
If the flight has already passed its start up time, this isn't a
negative start.
2023-10-07 19:01:11 +02:00
Raffson
62a40db9ea Streamlining 2023-10-07 18:53:42 +02:00
Dan Albert
75498fe061 Differentiate total time and travel time.
There's an ugly special case in flight simulation to handle hold points
because we don't differentiate between the total time between two
waypoints (which can include delays from actions like holding) and
travel time. Split those up and remove the special case.
2023-10-07 18:42:59 +02:00
Dan Albert
5ca344e87b Show the real front line bounds on the map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1067.
2023-10-07 18:35:17 +02:00
Raffson
03d8448def Streamlining 2023-10-07 18:13:55 +02:00
Dan Albert
a2630fc75f Add a real CAS ingress point.
Putting the ingress point directly on one end of the FLOT means that AI
flights won't start searching and engaging targets until they reach that
point. If the front line has advanced toward the flight's departure
airfield, it might overfly targets on its way to the IP.

Instead, place an IP for CAS the same way we place any other IP. The AI
will fly to that and start searching from there.

This also:

* Removes the midpoint waypoint, since it didn't serve any real purpose
* Names the FLOT boundary waypoints for what they actually are

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2231.
2023-10-07 18:00:07 +02:00
Raffson
c50dcaaafb Streamlining 2023-10-07 18:00:07 +02:00
Dan Albert
3499ba5ffa Mark the AI-only F-15E more clearly. 2023-10-07 17:24:40 +02:00
Dan Albert
f5f11ff3ac Add display name property for unit types.
Unlike the variant ID, this can be changed without breaking save compat.
2023-10-07 17:24:17 +02:00
Dan Albert
0ec375ad89 Fix unit variants to actually allow variance.
This was always the intent, but apparently it wasn't implemented
correctly. All properties of the unit type can now be overridden per
variant.
2023-10-07 17:23:34 +02:00
Raffson
ee3bdf9fd7 Streamlining 2023-10-07 17:14:01 +02:00
Dan Albert
1760532168 Rename UnitType.name what it is: the variant ID.
This property affects safe compat because the ID is what gets preserved
in the save, but it's unfortunately also used as the display name, which
means changing the display name breaks save compat. It also prevents us
from changing display names without breaking faction definitions.

This is the first step in fixing that. The next is adding a separate
display_name property that can be updated without breaking either of
those.
2023-10-07 17:08:33 +02:00
Dan Albert
97ee6ba19f Force dumping debug info on recreate.
We need a way to debug successful solvers that's still targeting to a
specific flight. This will do for now.
2023-10-07 17:07:57 +02:00
Dan Albert
d96f7a267c Add test cases found by fuzzer. 2023-10-07 17:07:33 +02:00
Dan Albert
98f92f9ab2 Add fuzz testing for waypoint solvers.
This fuzz test generates random inputs for waypoint solvers to check if
they can find a solution. If they can't, the debug info for the solver
is dumped to the testcases directory. Another test loads those test
cases, creates a solver from them, and checks that a solution is found.
Obviously it won't be immediately, but it's a starting point for fixing
the bug and serves as a regression test afterward.
2023-10-07 17:07:33 +02:00
Dan Albert
8b04dd878d Migrate IP placement to WaypointSolver. 2023-10-07 17:07:32 +02:00
Dan Albert
643dafd2c8 Build common interface for waypoint geometry constraints.
This is a replacement for the existing "zone geometry" classes that are
currently used for choosing locations for IP, hold, and join points.
The older approach required the author to define the methods for
choosing locations at a rather low level using shapely APIs to merge or
mask geometries. Debug UIs had to be defined manually which was a great
deal of work. Worse, those debug UIs were only useable for *successful*
waypoint placement. If there was a bug in the solver (which was pretty
much unavoidable during development or tuning), it wasn't possible to
use the debug UI.

This new system adds a (very simple) geometric constraint solver to
allow the author to describe the requirements for a waypoint at a high
level. Each waypoint type will define a waypoint solver that defines one
or more waypoint strategies which will be tried in order. For example,
the IP solver might have the following strategies:

1. Safe IP
2. Threat tolerant IP
3. Unsafe IP
4. Safe backtracking IP
5. Unsafe backtracking IP

We prefer those in the order defined, but the preferred strategies won't
always have a valid solution. When that happens, the next one is tried.

The strategies define the constraints for the waypoint location. For
example, the safe IP strategy could be defined as (in pseudo code):

* At least 5 NM away from the departure airfield
* Not farther from the departure airfield than the target is
* Within 10 NM and 45 NM of the target (doctrine dependent)
* Safe
* Within the permissible region, select the point nearest the departure
  airfield

When a solver fails to find a solution using any strategy, debug
information is automatically written in a GeoJSON format which can be
viewed on geojson.io.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3085.
2023-10-07 17:07:21 +02:00
Dan Albert
bf879a6141 Add __str__ for Distance. 2023-10-07 15:55:05 +02:00
Dan Albert
fa1caa86d6 Add name to Doctrine. 2023-10-07 15:55:04 +02:00
Dan Albert
181ac27299 Note the ARA Veinticinco de Mayo in the changelog. 2023-10-07 15:52:15 +02:00
Nosajthedevil
313d8f5065 Add support for ARA Veinticinco de Mayo.
Includes an Argentina 1982 faction for testing purposes, although it's
sparse because of a lack of assets in DCS.

Note that the carrier is mispelled as the Vienticinco in the game.

Includes prerequisite pydcs update.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3123.

yaml to json
2023-10-07 15:52:14 +02:00
Dan Albert
ee1fa78ecd Add __str__ for Heading. 2023-10-07 15:49:21 +02:00
Raffson
60172d0e52 Streamlining 2023-10-07 15:23:29 +02:00
Starfire13
e514cb1397 Add Operation Noisy Cricket campaign. 2023-10-07 14:51:52 +02:00
Starfire13
c640a53190 Add BLU-107 to OCA/Runway loadout
I had originally opted for iron bombs for anti-runway as the AI sometimes miss with the Durandals because they release them from too high an altitude. But after using them for a while, I am finding they appear to do no worse than with iron bombs. So, might as well let them use the dedicated anti-runway weapon.
2023-10-07 14:51:52 +02:00
Dan Albert
6ef3bd5095 Stop gap fix for AI speed to nav points.
This isn't a great fix for the reason I mention in the comment, but it's
quick and actually is accurate since it looks like we don't actually
handle formation speeds correctly in most cases...

This is probably as "fixed" as this is going to get for now since most
of the flight planning code is in the process of being rewritten.

https://github.com/dcs-liberation/dcs_liberation/issues/3113
2023-10-07 14:43:19 +02:00
Dan Albert
47add7848f Always re-enable loadout UI for member 0. 2023-10-07 14:42:51 +02:00
Dan Albert
0b7acbc94e Fix synchronization of loadouts on change.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3111.
2023-10-07 14:42:51 +02:00
Raffson
04974c3c0b Add Mirage F1 to Iran 2015
yaml to json
2023-10-07 14:37:15 +02:00
Dan Albert
014ae5faf5 Configure target points for F-15E S4+.
We don't need explicit configuration of initial points. The plane
automatically configures any steerpoint immediately before a target
point as an initial point.

Target offset points and aim points have not been implemented because I
can't find any information the describes their intent.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3088.
2023-10-07 14:34:30 +02:00
Dan Albert
e25aac774f Handle TOT offsets for patrolling flight plans.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-10-07 14:33:04 +02:00
Dan Albert
c11b4149a0 Fix negative starts when changing TOT offsets. 2023-10-07 14:31:08 +02:00
Dan Albert
091d523516 Fix altering negative TOT offsets.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-10-07 14:31:04 +02:00
Dan Albert
2ab456b9c1 Add laser code support for the viper. 2023-10-07 14:14:34 +02:00
Dan Albert
bb36944a8a Remove unused config data from laser code yamls. 2023-10-07 14:13:53 +02:00
Dan Albert
62e43f1169 Clarify that the assigned code is for the TGP. 2023-10-07 14:13:52 +02:00
Dan Albert
dc22e0a577 Hide properties that have better controls.
The weapon laser codes can be set more easily from the weapon laser code
combo box. Setting the properties explicitly here will just cause
conflicts and annoying UI bugs. Hide those properties from the UI.
2023-10-07 14:13:52 +02:00
Dan Albert
51f578b9e3 Add UI for selecting weapon laser codes.
This makes it possible to have the right laser code set for hot start
aircraft that (typically) do not allow changing laser codes when the
engine is on.
2023-10-07 14:13:51 +02:00
Dan Albert
2a8f34ea25 Do not draw empty property rows. 2023-10-07 14:13:51 +02:00
Dan Albert
26a71f4f0e Add laser code property info for the Strike Eagle. 2023-10-07 14:11:09 +02:00
Dan Albert
a366aebbb2 Add laser code config parsing and prop generation. 2023-10-07 14:11:09 +02:00
Raffson
1ce8d9c2b7 Cleanup after cherry-pick 2023-10-07 14:08:53 +02:00
Dan Albert
17e539e524 Add UI for acquiring/releasing TGP laser codes. 2023-10-07 14:06:13 +02:00
Dan Albert
177f357492 Pre-allocate laser codes for FLOTs and flights. 2023-10-07 14:06:12 +02:00
Dan Albert
723e191f10 Create a checked, releasable type for laser codes.
The release behavior isn't used yet, but I'm working on pre-allocating
laser codes for front lines and flights to make it easier for players to
pick the laser codes for their weapons.
2023-10-07 14:03:36 +02:00
Raffson
cb6bffe3ec Split procurement settings for blue & red
Resolves #208
2023-10-07 13:53:29 +02:00
MetalStormGhost
1ebc289fb7 Added support for ground power truck types in farp_truck_types_for_country(). Aircraft which require ground power to start, when ground power trucks have been disabled for performance reasons, will now be warm started automatically. 2023-10-06 07:58:06 +02:00
MetalStormGhost
d271428f9d Implemented ground power trucks for ground spawns. Added settings to turn them off or on. 2023-10-06 07:58:06 +02:00
MetalStormGhost
54777a9045 Helicopter waypoint altitude configurable (#207)
* Helicopter waypoint altitude configurable

Added a new option in Settings: Helicopter waypoint altitude (feet AGL).
It sets the waypoint altitude for helicopters in feet AGL. In campaigns in more mountainous areas, you might want to increase this setting to avoid the AI flying into the terrain.

* black?

* Distinguish cruise/combat altitudes for helicopters

Also includes a refactor for WaypointBuilder so it doesn't need a coalition. It can already reference the coalition from the flight.

* Update changelog.md

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-10-02 18:54:21 +02:00
Raffson
226a171550 Fix missing argument exception 2023-10-02 17:50:55 +02:00
Raffson
227134d9c1 Fix default cargo_ship name 2023-10-02 17:42:14 +02:00
Raffson
b3f5afe36b Fix 'game not defined' exception 2023-10-01 22:37:17 +02:00
Raffson
2c6c2e5fbd Update Skynet with baleBaron's 'ActMobile' version
Resolve #205

TODO: have all SHORADs use the 'ActMobile' functionality
2023-10-01 22:01:52 +02:00
Raffson
d4eefd0b55 Streamlining 2023-10-01 21:56:30 +02:00
Dan Albert
110866cd34 Add missing LANTIRN clsid. 2023-10-01 20:11:37 +02:00
Dan Albert
279572ae09 Add tests for LaserCodeRegistry, clean up.
* Store a deque rather than an iterator so it can be pickled
* Remove mangling from staticmethod (and rename now that it's no longer
  a generator)
* Rename "get" to "alloc" to make the mutation clear
* Move to its own package (the changes I'm working on make this no
  longer mission generator specific)
* Remove useless exception class. It's never caught so the unique type
  isn't needed
2023-10-01 20:11:37 +02:00
Dan Albert
485229b92f Allow per pilot loadouts and properties.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3092.
2023-10-01 20:10:16 +02:00
Raffson
8e670e1a3c Formatting 2023-10-01 19:32:20 +02:00
Dan Albert
bce6a170b8 Improve UI for flight properties.
Use the new data from pydcs to improve the properties UI:

* Use human readable names
* Use appropriate control types
* Limit min and max values as appropriate for each property
* Show labels

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3090.
2023-10-01 19:28:52 +02:00
zhexu14
a0fdfa11e2 Fix anti-runway task generation for LGBs. 2023-10-01 19:26:24 +02:00
Dan Albert
7303c8fa20 Add cheats for destroying and repairing runways. 2023-10-01 19:26:23 +02:00
Dan Albert
855fa1347b Fix canceling transfers when the airbase is full.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2955.
2023-10-01 19:26:23 +02:00
Raffson
5758436dbf Move WW2 factions to WW2 transports.
Only for those that require the WW2 asset pack. There don't appear to be any free WW2 transports.

Co-Authored-By: Dan Albert <danalbert@google.com>
2023-10-01 19:26:22 +02:00
Dan Albert
a343bdef23 Allow factions to specify their cargo ship type.
https://github.com/dcs-liberation/dcs_liberation/issues/3039
2023-10-01 19:26:22 +02:00
zhexu14
d3b0ae30eb Allow more helicopters to operate from LHAs and CVs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3072.
2023-10-01 19:26:22 +02:00
Dan Albert
2c7e877086 Always initialize IADS coalition lua tables.
These are read unconditionally, but were only initialized when the
coalition had nodes. When a coalition had no nodes, this caused a nil
access. It's unclear if that had any symptoms, but I expect at the very
least it would break the remainder of the script (so a non-functioning
blue IADS if the red IADS had no nodes).

There's a very small chance this is the culprit behind
https://github.com/dcs-liberation/dcs_liberation/issues/3073.
2023-10-01 19:26:21 +02:00
Dan Albert
12cdb8646c Improve IP selection near threat zone centers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2754.
2023-10-01 19:26:21 +02:00
Dan Albert
f89ac52bf3 Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
2023-10-01 19:26:20 +02:00
Raffson
5e858731d2 Change task for 'Freya' preset group to AAA 2023-10-01 17:59:28 +02:00
Raffson
30f6c14030 Fix bug in migrator 2023-10-01 17:21:57 +02:00
Raffson
78e07fec83 Add comment 2023-10-01 13:02:40 +02:00
Raffson
1cf871c150 Add radio config for Hercules 2023-10-01 12:56:13 +02:00
Raffson
8e821c50e5 Interpret integer radio_preset keys as radio_id
Allows for configuration of radios 3, 4, 5,...
2023-09-30 20:19:09 +02:00
Raffson
3024bd6479 Fix Hercules AirAssault exception 2023-09-30 19:37:16 +02:00
Raffson
105d1abba8 Try determining intra-flight modulation in squadron config 2023-09-30 18:34:55 +02:00
Raffson
3b7077e593 Use all modeled radio-bands in freq-selector 2023-09-30 17:46:28 +02:00
Raffson
d581af3b8a Remove flights with package not in ATO in migrator 2023-09-24 22:14:26 +02:00
Raffson
e8929467e0 Consolidate capture radius 2023-09-23 19:38:48 +02:00
Raffson
234dc52c7e Make AirAssault auto-plannable 2023-09-23 19:38:29 +02:00
Raffson
ea74471307 Avoid refuel waypoint if air wing can't plan refuel flight 2023-09-23 17:25:12 +02:00
Raffson
b870198281 Add Starfire's Final Countdown II campaign 2023-09-23 17:11:44 +02:00
Raffson
389037e6bf Don't scrub missions with unplannable escort types
The check for whether or not the escort is actually needed happens later, and thus the mission can still be scrubbed if it's too dangerous. However, missions should not be scrubbed when a particular escort type is unplannable, yet not needed. Only if the primary flight type is not plannable should the mission immediately be scrubbed
2023-09-23 16:51:26 +02:00
Raffson
167d048232 Fix bug in reserve freqs & tacan 2023-09-17 14:25:46 +02:00
Raffson
59871ac36c Only assign TACAN to compatible tankers 2023-09-17 14:25:46 +02:00
Raffson
bd3205a442 Update red squadrons for TbilisiGap 2023-09-17 13:02:32 +02:00
Raffson
00a2d77543 Update tasking for MiG-29G 2023-09-17 13:02:32 +02:00
Raffson
1b000e83df Fix "no-purchase" bug at turn 0 2023-09-17 13:02:32 +02:00
Raffson
3787ec3039 Add radio config for UH-60L 2023-09-17 11:45:01 +02:00
Raffson
e341599a11 Account for parking-slot size during retreat
Fix #129
2023-09-09 13:20:56 +02:00
Raffson
e50d49d7ba Ability to disable cargo-ships
Fix #76
2023-09-09 12:09:57 +02:00
Raffson
0cb3702eb9 Fix exception after new payload file was saved
When a new payload file would be saved, the subsequent flight would always throw an exception (until Retribution would be restarted) because the payload_cache wasn't updated until now.
2023-09-09 12:03:47 +02:00
Raffson
09749bc088 Use squadron radio_preset freq as flight freq if present 2023-09-08 20:38:17 +02:00
Raffson
0b152c201d Fix rounding errors for squadron's radio presets 2023-09-08 19:22:01 +02:00
Raffson
fe470ad9c6 Migrator fix 2023-09-08 17:17:14 +02:00
Raffson
d22bfd0804 Fix 'IndexError' exception 2023-09-08 17:17:14 +02:00
dependabot[bot]
1ba3f2fbb4 Bump @adobe/css-tools from 4.1.0 to 4.3.1 in /client (#202) 2023-09-04 00:54:44 +02:00
dependabot[bot]
688b7f4469 Bump certifi from 2023.5.7 to 2023.7.22 (#201) 2023-09-04 00:53:43 +02:00
Raffson
a8a37fa3e7 Add GroupTask to TGO for map filtering
Resolves #21
2023-09-03 23:41:15 +02:00
Raffson
b7bc9efb52 Remove unused variable 2023-09-03 19:00:44 +02:00
Raffson
74cd3a2627 Remove debugging code 2023-09-03 17:37:41 +02:00
Raffson
e4cb0f7c28 Release parking slots when capture occurs 2023-09-02 22:37:29 +02:00
Raffson
66d741d0b3 Allow user to add navigation waypoints where possible 2023-08-27 21:11:10 +02:00
Raffson
819bd92d9a Re-add removed FF-interrupt choice causing error
Opening the options will trigger an exception which sort of breaks save-compatibility
2023-08-27 19:10:39 +02:00
M Chimiste
16b7ff2bb4 Create payloads folder in ME folder if needed (#200)
Added a check for the existence of a payloads folder.  Also made the _save_payloads lookup and path generation the same as _backup_payloads method to have consistency.
2023-08-27 19:10:00 +02:00
Raffson
19b9b8b0ea Update changelog.md 2023-08-26 20:45:11 +02:00
Raffson
f5cb293e44 Allow editing pretty_name for waypoints 2023-08-26 19:19:54 +02:00
Raffson
f22ad17651 Remove incompatible Escort task from L-39ZA 2023-08-26 11:13:40 +02:00
Raffson
9b9905c5a3 Tweaking helicopter stuff 2023-08-19 21:10:26 +02:00
Raffson
8a6b7b172c Fix #199
Adjust 'should_halt_sim' conditions for taxi & takeoff flight-states, fixing an infinite loop that would occur if the FF-interrupt setting would not match with the start-type of the flight
2023-08-19 15:14:23 +02:00
Raffson
4901443b7a Avoid zero-division exception 2023-08-16 19:08:04 +02:00
Raffson
789806637c Improve escort logic for helicopters
Babysteps #88
2023-08-15 21:50:20 +02:00
Raffson
270301958a Fix helicopters oscillating due to over-speeding 2023-08-14 20:25:35 +02:00
Raffson
1157d264ee Migrator update for SEAD-Sweep 2023-08-14 20:25:35 +02:00
Raffson
87399c9ada Update transit-network costs
Fix #169
2023-08-13 19:19:01 +02:00
Raffson
cc4db1deff Update changelog 2023-08-13 18:34:25 +02:00
Raffson
77b88de40e Migrator adjustment for 'radio_presets' 2023-08-13 18:31:57 +02:00
Raffson
7baba78bca Allow radio-presets to be defined in squadron files 2023-08-13 13:16:43 +02:00
Raffson
95f169bb58 Add HF-FM band to ARC-222 2023-08-13 13:16:42 +02:00
MetalStormGhost
7a9a8e1b4b Auto-ato AWACS & Tankers settings (#198)
* Auto-ato AWACS & Tankers settings

Split off the **Automatic AWACS package planning** and **Automatic Theater tanker package planning** settings from **Automatic package planning behavior** so players can choose to have AWACS and theater tankers auto-planned, while managing everything else themselves.

* Drop logic to child-classes

* Enable AWACS auto-planning by default

* Switch order of preconditions

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-08-12 19:09:19 +00:00
Raffson
046dccc4d5 Update contributors list 2023-08-12 19:25:36 +02:00
Raffson
15b0c26c5d Update version info for Su-57 mod 2023-08-12 19:15:14 +02:00
Raffson
7200c687af Update version info for Su-30 mod 2023-08-12 19:11:28 +02:00
MetalStormGhost
9b11eaa9bc Invasion of the Canary Islands campaign by NoGoodNews (#197)
* Invasion of the Canary Islands campaign version 2 by NoGoodNews

* Fine-tune description for Canary Islands campaign

* Bump Canary Islands version to 10.7

* OCD trippin'

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-08-12 18:45:20 +02:00
ingax01
d6504c3a09 updated SU-57 wepons (#196) 2023-08-11 07:40:04 +02:00
ingax01
15cb1839b0 updated the weapon classes (#194) 2023-08-10 07:13:39 +02:00
MetalStormGhost
633615c90d 1968 Yankee Station campaign version 2 by NoGoodNews
Changes to the original "1968 Yankee Station" are:  More FOBs with proper CTLD areas, denser (much denser) AAA and SAM coverage and better convoy roads. Also includes updated factions. All credit for this submission belongs to NoGoodNews.
2023-08-09 07:02:26 +02:00
MetalStormGhost
115bd8b22a Convert OPFOR untasked flights into Client slots
Added a new option in settings: Convert untasked OPFOR aircraft into client slots. This option will essentially convert the campaign into a sort of team vs. team engagement. There is still no way to plan the OPFOR missions, and there are no guarantees that there even will be any untasked aircraft available for players.

Split the Disable idle aircraft at airfields setting into Disable untasked BLUFOR aircraft at airfields and Disable untasked OPFOR aircraft at airfields.
2023-08-06 12:43:34 +02:00
MetalStormGhost
c51fa5c1df CAS engagement range
New option in Settings: CAS engagement range (nmi)
2023-08-02 19:22:15 +02:00
MetalStormGhost
a5104dd9ec USS Samuel Chase class fix
Corrected the class of the WWII asset pack ship USS Samuel Chase from Logistics (ground unit class) to LandingShip, in order to prevent it being spawned as part of AAA sites.
2023-08-02 19:18:31 +02:00
holyorangejuice
901c867d7f Battle4Georgia Update v1.2 (#189)
* WRL Faction Updates

Added aircraft to be more all inclusive.

* WRL Battle4Gerogia Overhaul

v1.2 changes to miz file and enemy units. Complete overhaul. Tested in WRL events.
2023-08-01 07:44:38 +02:00
holyorangejuice
5c06700873 WRL Faction Updates
Added aircraft to be more all inclusive.
2023-07-26 17:45:17 +02:00
Raffson
0bc645edeb Have DEAD flights fire all their HARMs first 2023-07-23 00:06:35 +02:00
Raffson
1e5cb94feb Fix mypy complaints 2023-07-23 00:06:35 +02:00
Raffson
53122ff149 Allow user-made custom injected weapons setup 2023-07-22 23:41:42 +02:00
Raffson
da75f41b01 Refactor payloads folder logic 2023-07-22 23:26:32 +02:00
Raffson
63e65744f1 Formatting -_- 2023-07-22 21:34:52 +02:00
Raffson
b8cce988f8 Fix wrong serialization when saving payload in new file 2023-07-22 21:33:45 +02:00
Raffson
85bbda4234 Notify user when save/backup was successful 2023-07-22 20:35:26 +02:00
Raffson
3f96334065 Correct changelog 2023-07-22 20:01:01 +02:00
Raffson
79ce31c920 Replace AIM-120Bs with C's for F-15E & F/A-18C 2023-07-22 20:01:00 +02:00
Raffson
0e5df2fd21 Get rid of all pydcs' PayloadDirectories usages 2023-07-22 20:01:00 +02:00
Turbolious
57319bd78b Update VSN_F100 payloads (#186)
Add loadout to conform to Retribution norms and add all missing loadouts.
All loadouts have been tested and work properly.
2023-07-22 19:20:19 +02:00
Turbolious
5bfab913fb Update F-4E.lua (#185)
Added missing CAS loadout
2023-07-22 00:04:16 +02:00
Raffson
0027c64e57 Add & Select newly saved payload to selector 2023-07-22 00:03:22 +02:00
Raffson
bc38563618 Update changelog 2023-07-21 23:35:47 +02:00
Raffson
493e69eb40 Use base_path instead 2023-07-21 22:51:13 +02:00
Raffson
15be9e3ce1 Fine-tune "save payload" logic 2023-07-21 22:21:45 +02:00
Raffson
64f6a10ced Attempt to fix index-out-of-range
Injecting pylons in the F-100 seems to go out of bounds here
2023-07-21 22:21:44 +02:00
Raffson
2cfd56c8da Add ability to save/backup payloads
Resolve #164
2023-07-21 21:47:25 +02:00
Raffson
60d11ffe2a Add comment wrt AGM-154B 2023-07-21 15:20:42 +02:00
Raffson
01f2d37fb8 Correct 2xAGM-154B's weapon data
Removing non-existing CLSID
2023-07-21 15:15:33 +02:00
Raffson
8e6464eb90 Add 2xAGM-154B 2023-07-21 15:15:04 +02:00
Raffson
2e6b98e9de Revert default payloads back to AGM-154A 2023-07-21 15:06:38 +02:00
Raffson
d095732a4e Bump version 2023-07-21 13:29:48 +02:00
Raffson
b83f3c41d7 Update changelog 2023-07-21 00:48:48 +02:00
Raffson
e497c7dc6c Another attempt to replace AGM-154A with AGM-154B 2023-07-21 00:46:13 +02:00
Raffson
1a52154b5a Custom weapons injection logic + A-4E AIM-9J injection 2023-07-21 00:03:38 +02:00
Raffson
6072b0181d Remove } from AGM-45B.yaml 2023-07-20 21:29:14 +02:00
Raffson
e3f9f611eb Tweak aircraft tasks & priorities 2023-07-20 20:50:51 +02:00
Turbolious
34f7b2c53d Missile fallback updates + add VSN F-4E payload (#179)
* Update AIM-7F.yaml

Fallback update for to the E2

* Update AIM-7F.yaml

* Aim-9 corrections

Year and fallback corrections
2023-07-20 19:20:41 +02:00
Turbolious
8472897e5f Update AIM-7 Aspide by VSN.yaml
Updated Fallback to AIM-7E-2
2023-07-20 19:17:45 +02:00
holyorangejuice
7c5f92b3c5 WRL Campaign Update (#184)
Minor changes to Damascus campaign. Redid the SAMs and yaml for it.
2023-07-20 19:16:24 +02:00
Turbolious
5d89ba769d Update AGM-45B.yaml
Found a missing CLSID for the AGM-45B
2023-07-20 08:13:00 +02:00
Turbolious
bdcbf81443 Remove double ‘year’ in AGM-45 (#181) 2023-07-20 08:11:52 +02:00
Turbolious
e5afa27b4a Update Aim-7F Fallback To Aim-7E-2 (#178) 2023-07-19 22:51:18 +02:00
Turbolious
51646639ff F-104 missing weapons
added the 2x Aim-9p/L variants and the Aspide MRAAM
2023-07-19 07:41:48 +02:00
Turbolious
428833ce38 Update AIM-9J-2X.yaml
Corrected capital letter error
2023-07-19 07:34:11 +02:00
Turbolious
4cb4058ded A2A weapons cleanup and additions. F-105D Payloads
Corrected Introduction years, added models, corrected CLSID issues and corrected fallback issues.

Added corrected and expanded F-105D customized Payloads.
2023-07-18 19:44:59 +02:00
Turbolious
20d35762a6 Update MiG-25RBT.lua + Add custom Alt History Factions (#174)
* Update MiG-25RBT.lua

Corrected naming conventions and capitalization.

* 1971 Alt History USA vs USSR Factions

My alt history factions for USA and USSR fighting in the Vietnam war

* Update VSN_F100.yaml

Remove SEAD Escort as it would require changes on client side
2023-07-18 00:11:10 +02:00
Turbolious
c0e8e240a1 F-100 Weapons and Roles update (#173)
Updated the VSN F-100 Payloads and added SEAD and SEAD Escort roles
2023-07-17 23:53:26 +02:00
Turbolious
850cb415c7 Update AGM-122A.yaml 2023-07-17 20:33:50 +02:00
Turbolious
3e42484be3 F104 Aim-9L 2x, AGM-122 Added
Added missing weapon class under the Aim-9L.
Added missing weapon AGM-122A SideARM
2023-07-17 20:33:50 +02:00
Raffson
adaf049eb9 Define fallback for AGM-88C 2023-07-16 23:01:29 +02:00
Raffson
bed1417c54 Add VSN F105 AIM-9P/L CLSIDs to weapons data 2023-07-16 23:01:05 +02:00
Raffson
98a10b59b9 Add SEAD payload to A-6A 2023-07-16 22:40:54 +02:00
Raffson
f5174281c7 Correct A-4's BARCAP payload 2023-07-16 22:11:13 +02:00
Raffson
7ec4073ee2 Update changelog 2023-07-16 21:59:14 +02:00
Raffson
80f81e3775 Remove OCA/Runway task from F-5E
Apparently the F-5E isn't capable of runway attack...
2023-07-16 21:38:28 +02:00
Raffson
d8c34a7057 Add payloads for MiG-25RBT
Co-Authored-By: Turbolious <39207917+Turbolious@users.noreply.github.com>
2023-07-16 21:23:57 +02:00
Raffson
595a5ac111 Fix flights not removed from map if auto-create cancelled 2023-07-16 21:19:04 +02:00
Raffson
024407e1e2 Initial POC for #165 2023-07-16 19:51:35 +02:00
Raffson
9d63bcbf69 Improve STRIKE where possible
- Plan number of aircraft more accurately
- Fine-tuning ingress waypoint tasks
- Add lineup waypoint for STRIKE flights, 10NM in front of ingress on the same heading as the target
2023-07-16 18:22:29 +02:00
Raffson
092ef88cab Revert "Use AGM-154B instead of AGM-154A"
This reverts commit 16b3d76684.

Unfortunately I forgot this still requires local changes to take effect...
2023-07-16 18:22:29 +02:00
Raffson
16b3d76684 Use AGM-154B instead of AGM-154A 2023-07-15 20:23:28 +02:00
dependabot[bot]
43b6cb8bb1 Bump tough-cookie from 4.1.2 to 4.1.3 in /client
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-15 18:05:42 +02:00
Raffson
009debd4e8 Follow-up on dependency updates 2023-07-15 17:55:55 +02:00
Raffson
6c87421c26 Cache liveries at startup 2023-07-15 17:46:31 +02:00
Raffson
21eff6cb87 Update changelog 2023-07-15 16:57:35 +02:00
Raffson
00bcec498c Update dependencies 2023-07-15 16:50:14 +02:00
Raffson
baac660f1d Update faction selection page when inverting map
Reported by Kerbo on discord
2023-07-15 16:32:13 +02:00
Raffson
63898ead87 Use group-attack for Anti-ship ingress 2023-07-15 13:44:58 +02:00
Christian Merrill
18f95acf87 Update Operation-Desert-Sabre.miz
Moved a problematic ammo depot
2023-07-12 07:16:07 +02:00
Raffson
cb136b8d9d Increase default number of pilots per squadron to 16
Resolves #162
2023-07-10 23:12:30 +02:00
Raffson
4ecc44da17 Preparations for v1.3.0 2023-07-10 23:12:30 +02:00
Raffson
8c8fc7cc26 Changelog updates for v1.2.1 hotfix 2023-07-10 22:26:30 +02:00
Raffson
17211e1597 Include SEAD Sweep in common escorts 2023-07-10 22:26:30 +02:00
Raffson
f76c8a80b5 Restore correct amount of pylons for F16 after ejecting sufa mod 2023-07-10 22:02:12 +02:00
Raffson
7a6ca986db Don't use Python-4 in pydcs_extension
The Python-4 overwrites the AIM-9X, causing issues...
2023-07-10 22:01:50 +02:00
Raffson
8f35546d84 Fine-tuning some typing issues 2023-07-09 22:59:23 +02:00
Raffson
96828ef3db Fix last quirks wrt list->set refactor 2023-07-09 22:27:34 +02:00
Raffson
9dd76bdd37 Ignore tying issues in migrator 2023-07-09 21:39:43 +02:00
Raffson
2b5f6f7998 Migration changes for using sets instead of lists 2023-07-09 21:35:37 +02:00
Raffson
d6e7451f8a Add F-15I support
Co-Authored-By: M Chimiste <37678080+M-Chimiste@users.noreply.github.com>
2023-07-09 19:32:15 +02:00
Raffson
06d98db55b Replace lists with sets 2023-07-09 19:32:00 +02:00
Raffson
533057a0cc Introduce pylon ejector for Sufa mod
Will prevent the user having to restart Retribution
2023-07-09 18:21:28 +02:00
Raffson
e86fc60b41 Spawn idle aircraft at helipads
Applicable for helicopters at airbases & both helicopters and LHA-capable aircraft at FOBs
2023-07-09 15:14:46 +02:00
Raffson
737df98988 Provide better feedback when declaring max-size without a value 2023-07-08 20:35:21 +02:00
Raffson
6734b80684 Follow-up on package refueler
Fixing some bugs that were caused by missing 'mission data' for package-refueling tankers
2023-07-07 21:56:29 +02:00
Raffson
af3a80a294 Bump pydcs 2023-07-07 20:46:30 +02:00
MetalStormGhost
8face817e2 Corrected the name of SEAD Sweep engagement range
Corrected the name of SEAD Sweep engagement range (nmi) setting from incorrect SEAD Sweep threat buffer distance (nmi).
2023-07-06 17:06:58 +02:00
Raffson
da10cc091c Tweak 'release untasked aircraft' in migrator 2023-07-05 23:34:31 +02:00
Raffson
2ec187bc9c Fixing OCA-bug against FOBs
OCA Aircraft should be properly allowed against FOBs given Ghosti's roadbases
2023-07-05 23:29:48 +02:00
Raffson
785ac6eacc Remove double call to "return_pilots_and_aircraft"
This is already done in 'package.remove_flight(flight)'
2023-07-05 22:30:47 +02:00
MetalStormGhost
be31a97c71 Added new option in settings: SEAD Sweep engagement range (nmi).
Renamed SEAD Sweep threat buffer distance (nmi) to SEAD Escort/Sweep threat buffer distance (nmi) since it also applies to SEAD Escort flights.
2023-07-04 23:19:47 +02:00
MetalStormGhost
aecb171b8f SEAD Sweep threat buffer distance
Added a new option in settings: SEAD Sweep threat buffer distance (nmi).
2023-07-04 23:19:47 +02:00
MetalStormGhost
aafc832e24 Settings option: Generate SCENERY REMOVE OBJECTS ZONE triggers at roadbase
Implemented an option in settings to disable or enable the SCENERY REMOVE OBJECTS ZONE triggers generated at roadbases (at the first waypoint).
2023-07-03 21:09:25 +02:00
Raffson
6c210c9d15 Fine-tuning stuff for 'SEAD Sweep' 2023-07-03 00:38:50 +02:00
MetalStormGhost
031feeed6f F-16A hotifx (#158)
* F-16A hotifx

Added SEAD capability to F-16A MLU and SEAD Escort & SEAD to F-16A. Fixed F-16A MLU icon and banner. Added new F-16A and F-16A MLU loadouts.

* Updated changelog.
2023-07-02 21:13:00 +00:00
Raffson
6ced738256 Reset auto-assignable mission types if liberation save 2023-07-02 21:14:20 +02:00
Raffson
db038ecdea Add SEAD Sweep flight plan
Reintroduce legacy SEAD Escort flight plan, but under a separate type because it didn't really escort the primary flight...
2023-07-02 16:53:55 +02:00
Raffson
e2d9a794b8 Invert factions when "Invert Map" is set in NGW 2023-07-02 13:56:11 +02:00
Raffson
ae17f195fe Fine-tune inversion rules for Operation Desert Sabre 2023-07-02 13:29:29 +02:00
Raffson
46f98a0684 Update Exercise Quasar
Fine-tuned inversion process + add note in description
2023-07-02 13:21:28 +02:00
Raffson
9c6b070dbd Force 'Nothing' task for ferry flights
pydcs doesn't export this task, although every aircraft is capable of doing 'Nothing' 😂
2023-07-02 12:52:19 +02:00
Raffson
569efdbb12 Remove DEAD from Tu-160 & Tu-95MS
You can still create a package against an air defense site using STRIKE...
2023-07-02 12:43:00 +02:00
Raffson
9086262f2b Update changelog 2023-07-02 12:30:34 +02:00
MetalStormGhost
861ed584df Restored TheaterGroundObject handling in antishipingress.py
Restores handling of TheaterGroundObject targets in antishipingress.py
This is needed when anti-ship missions are planned against other ship groups than NavalControlPoints (carrier groups or LHA strike groups).
2023-07-02 12:12:57 +02:00
Raffson
a5083e3e1f Add CHN in country_dict for migration 2023-07-02 00:47:57 +02:00
MetalStormGhost
6e37cadb84 Settings doctrine page + streamlining (#156)
* Added a separate Doctrine page in settings with the following new options:
- Minimum number of aircraft for autoplanner to plan OCA packages against
- Airbase threat range (nmi)
- TARCAP threat buffer distance (nmi)
- AEW&C threat buffer distance (nmi)
- Theater tanker threat buffer distance (nmi)

Implemented handling for the OPFOR autoplanner aggressiveness in objectivefinder.py vulnerable_control_points().

* * Added three new options in Settings:
- Autoplanner plans refueling flights for Strike packages
- Autoplanner plans refueling flights for OCA packages
- Autoplanner plans refueling flights for DEAD packages

Fixed a bug in faction.py where F-16Ds were not correctly removed from the faction when the F-16I/F-16D mod was not selected.

* Renamed Maximum frontline length -> Maximum frontline width.
2023-07-01 23:54:27 +02:00
Raffson
4b4ec8d9ad Add livery selector in SquadronDialog 2023-07-01 23:42:13 +02:00
holyorangejuice
ef0bc31b8c WRL Faction Updates (#155)
* WRL Faction Updates

I've updated all factions to have the same exact air assets to streamline the ability to use my factions anywhere. The difference in my factions is the units used in frontlines, SAMs, and so on. I still have to use custom factions to ensure my missions are played as I designed them. People can customize them from there. The new WRL mixed faction is going to be used in all wargame scenarios and some Sinai map stuff I've been looking at making.
2023-07-01 19:11:59 +00:00
Raffson
f6f1d69048 Fix mypy's complaints 2023-07-01 17:20:02 +02:00
Raffson
3b745c43eb Save-compat changes to allow loading Liberation saves
May be incomplete, some discrepancies in naming may still exist, but at least Kerbo's campaign can be loaded.
2023-07-01 17:08:12 +02:00
Dan Albert
aaaa9847b1 Add channel naming for the warthogs.
The manual for the legacy warthog usually calls these VHF 1/2 and UHF,
or VHF AM/FM and UHF. The AM/FM nomenclature is what I usually hear
people call them and it's clearer, so go with that.

For the A-10C II, that manual hasn't been updated for the AN/ARC-210
yet, so I'm not really sure what that ought to be called. The UFC calls
it COM 1 though, so I went with that. The alternative would be something
like VHF/UHF for the 210 and UHF for the 164, but I don't know if that's
actually better. Could be completely explicit and call them by their
full names, but that's probably less clear to people that aren't
fiddling with the radio implementation constantly (and even I confuse
the 164 and the 186 all the damn time).
2023-07-01 16:05:40 +02:00
Raffson
9e42f7f255 Execute EWRJ triggers after EWRJ script has initialized 2023-07-01 15:27:11 +02:00
holyorangejuice
03a3fd37ef Campaign Release / Updates
All campaigns have F15e added to the roster plus some other minor roster changes. Battle4SyriaNorth released.
2023-06-29 22:11:53 +02:00
MetalStormGhost
e5bb341f5b A-6A Intruder with Adecarcer's hardpoint options from A-7E mod (#153)
* A-6A Intruder with Adecarcer's hardpoint options from A-7E mod

Enabled Adecarcer's modified hardpoint options for the A-6A Intruder mod, now also including weapons from the A-7E Corsair II mod. Please note that the A-7E mod will need to be installed if one wants to use those weapons.

* Moved the import "from pydcs_extensions import WeaponsA7E" to within the VSN_A6A pylon objects to help solve the "cannot import from partially initialized module" error.

* Import pydcs_extensions.a7e before pydcs_extensions.a6a to help solve the "cannot import from partially initialized module" error.

* Added inject_weapons(WeaponsA7E) in a6a.py
2023-06-25 18:21:15 +02:00
Raffson
57a0231699 Move LuaGenerator back to its original location
I can't even remember why I moved this line, but that's the one that broke CTLD...
2023-06-25 17:07:55 +02:00
Raffson
bf5807d9c1 Fix parking space info in AWCD 2023-06-25 15:38:22 +02:00
Raffson
5368c06650 Only use 'Player' skill as flight-lead 2023-06-25 13:43:59 +02:00
Raffson
ab66846967 Add CTLD zones to Exercise Quasar 2023-06-25 13:36:25 +02:00
Raffson
a2b7477404 Update CTLD to latest version 2023-06-25 13:01:22 +02:00
Raffson
3bc4203954 Pydcs fix for FARPs 2023-06-25 03:23:50 +02:00
Raffson
51fc0215d6 Link landing wpt to pad in flightgroupspawner
Fixes a bug where helipads would try to pop from an empty list
2023-06-25 03:21:58 +02:00
Raffson
768f2dbc57 Update control_points earlier in migrator 2023-06-25 01:17:05 +02:00
Raffson
928a679e7d Cleanup import 2023-06-25 01:17:04 +02:00
Raffson
430fcfee20 Fix 'ParkingType is not defined' exception
Would occur when starting at full strength
2023-06-25 01:17:04 +02:00
Dan Albert
50975d5eb6 Razbam F-15E banner and icon.
Just reusing the old one.

https://github.com/dcs-liberation/dcs_liberation/issues/3028
2023-06-23 22:08:39 +02:00
Dan Albert
918716044c Add radio config for the new F-15E.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3028.
2023-06-23 22:08:38 +02:00
Dan Albert
c7a214201c Add YAML file for Razbam Strike Eagle.
The old DCS AI F-15E is sticking around because the two have very
different weapon sets for now, so it's probably better to use the AI-
only one for squadrons that don't expect players.

I've avoided renaming the old one (we probably should name it "... (AI)"
for clarity) because the rename will break save compat. I have added a
_new_ name that new campaigns can use though.

https://github.com/dcs-liberation/dcs_liberation/issues/3028
2023-06-23 22:08:38 +02:00
Starfire13
cd563d837b Add loadouts for Razbam F-15E Strike Eagle. 2023-06-23 22:08:38 +02:00
Raffson
32df683720 Bump pydcs for Strike Eagle 2023-06-23 22:08:35 +02:00
M Chimiste
e15002dff5 Added F-15E support to factions and campaign YAMLs (#152)
* Added F-15E support to factions and campaign YAMLs

* Update Caucasus_Multi_Full.yaml

* Update Caucasus_Multi_Russia.yaml

* Update Operation-Desert-Sabre.yaml

* Update black_sea.yaml
2023-06-23 19:51:01 +00:00
MetalStormGhost
fb2598a671 Github URL update
Updated the URLs to point correctly to Retribution code, Retribution wiki or Liberation code, as appropriate.
2023-06-21 10:28:26 +02:00
MetalStormGhost
208c517882 Roadbase support in the Migrator, OffMapSpawn
Added support in migrator.py to add the new ground spawn, helipad and roadbase attributes to control points. This time around, also supporting OffMapSpawns and other types of control point besides just Airfield & Fob.
2023-06-20 07:48:32 +02:00
MetalStormGhost
f970801243 Roadbase support in the Migrator
Added support in migrator.py to add the new ground spawn, helipad and roadbase attributes to control points.
2023-06-19 22:05:32 +02:00
MetalStormGhost
e273e93012 Roadbase and ground spawn support (#132)
* Roadbase and ground spawn support

Implemented support for roadbases and ground spawn slots at airfields and FOBs. The ground spawn slots can be inserted in campaigns by placing either an A-10A or an AJS37 at a runway or ramp. This will cause an invisible FARP, an ammo dump and a fuel dump to be placed (behind the slot in case of A-10A, to the side in case of AJS37) in the generated campaigns. The ground spawn slot can be used by human controlled aircraft in generated missions. Also allowed the use of the four-slot FARP and the single helipad in campaigns, in addition to the invisible FARP. The first waypoint of the placed aircraft will be the center of a Remove Statics trigger zone (which might or might not work in multiplayer due to a DCS limitation).

Also implemented three new options in settings:
 - AI fixed-wing aircraft can use roadbases / bases with only ground spawns
   - This setting will allow the AI to use the roadbases for flights and transfers. AI flights will air-start from these bases, since the AI in DCS is not currently able to take off from ground spawns.
 - Spawn trucks at ground spawns in airbases instead of FARP statics
 - Spawn trucks at ground spawns in roadbases instead of FARP statics
   - These settings will replace the FARP statics with refueler and ammo trucks at roadbases. Enabling them might have a negative performance impact.

* Modified calculate_parking_slots() so it now takes into account also helicopter slots on FARPs and also ground start slots (but only if the aircraft is flyable or the "AI fixed-wing aircraft can use roadbases / bases with only ground spawns" option is enabled in settings).

* Improved the way parking slots are communicated on the basemenu window.

* Refactored helipad and ground spawn appends to static methods _add_helipad and _add_ground_spawn in mizcampaignloader.py
Added missing changelog entries.
Fixed tgogenerator.py imports.
Cleaned up ParkingType() construction.

* Added test_control_point_parking for testing that the correct number of parking slots are returned for control point in test_controlpoint.py

* Added test_parking_type_from_squadron to test the correct ParkingType object is returned for a squadron of Viggens in test_controlpoint.py

* Added test_parking_type_from_aircraft to test the correct ParkingType object is returned for Viggen aircraft type in test_controlpoint.py

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-06-19 00:02:08 +03:00
Raffson
5a71806651 Add Sinai campaign: Exercise Quasar
Modified Starfire's 'Exercise Bright Star' campaign
2023-06-18 19:10:38 +02:00
Raffson
430d33c144 Add Mi-8 to Egypt's faction 2023-06-18 16:44:19 +02:00
Raffson
fa63beeb52 Add Gepard & Vulcan to Bluefor Modern 2023-06-18 12:37:40 +02:00
Raffson
e952e0b536 Pydcs fix for ACLS
Fix #147
2023-06-17 22:31:08 +02:00
Raffson
19a6eaeaa3 Yesterday's fix was bogus... 2023-06-17 21:50:00 +02:00
Raffson
5818367f2e Fine-tune SEAD search point 2023-06-17 21:28:33 +02:00
Raffson
d3069bdaad Bold font for waypoint table in kneeboard 2023-06-17 21:28:02 +02:00
Raffson
471654aa5e Forgot to make humvees CJFT blue for convoy spawns -_- 2023-06-17 14:40:34 +02:00
Raffson
56e712f948 Make 'exercise bright star' compatible 2023-06-17 14:31:57 +02:00
Raffson
74bc3b004b Rename beacons file 2023-06-17 14:30:54 +02:00
Dan Albert
6f1333d26a Test NavMeshLayer. 2023-06-17 13:57:08 +02:00
Dan Albert
42a0545630 Test FrontLinesLayer. 2023-06-17 13:57:07 +02:00
Starfire13
1c5f872b3c Add Sinai campaign: Exercise Bright Star. 2023-06-17 13:57:07 +02:00
Dan Albert
e4e7155f02 Partial tests for FrontLine.
We need to mock the backend to usefully test the contextmenu handler.
I'd like to finish all the low hanging fruit before going for that.
2023-06-17 13:56:55 +02:00
Raffson
c924130356 Apply mod-settings to faction before generating game 2023-06-17 04:40:10 +02:00
Raffson
095947333f Remove remnant from testing 2023-06-17 04:40:10 +02:00
Raffson
6356d0b3f5 Update changelog 2023-06-17 04:40:09 +02:00
Raffson
df5b5839e2 Overhauling convoy routes & spawns 2023-06-17 04:40:09 +02:00
M Chimiste
3abb9375fb Create Campaign Operation Desert Sabre (#146)
The very first Sinai campaign by Mr. Chimiste!
2023-06-16 23:41:52 +02:00
zhexu14
322b8245f7 Make waypoint altitudes editable. 2023-06-16 22:42:59 +02:00
Dan Albert
2286d155c4 Test FlightPlansLayer. 2023-06-16 22:42:58 +02:00
Dan Albert
7c1b642aa8 Test CullingExclusionZones. 2023-06-16 22:42:57 +02:00
Dan Albert
198f93fe4a Test ControlPointsLayer. 2023-06-16 22:42:56 +02:00
Dan Albert
ea25e2ceb8 Add tests for CombatLayer. 2023-06-16 22:42:56 +02:00
Dan Albert
453343849f Test Combat. 2023-06-16 22:42:55 +02:00
Dan Albert
cee9122680 Add tests for AirDefenseRangeLayer. 2023-06-16 22:42:55 +02:00
Raffson
ce3e358f8c Fix map objects not being registered when killed 2023-06-16 22:42:55 +02:00
Raffson
018a4b4718 Remove forgotten print-statement 2023-06-16 22:42:54 +02:00
Raffson
e677a1e910 Add EWR Jammer plugin 2023-06-16 22:42:53 +02:00
Raffson
b2fbcdd86a Add DCS Dismounts plugin 2023-06-16 11:32:26 +02:00
Nosajthedevil
1474dfd200 Update OV10A Weapons files 2023-06-15 15:27:53 +02:00
Nosajthedevil
3edb1b6c10 Added and updated weapons files.
Added or updated weapons files including 

The various Hellfire II iterations - this covers fallbacks to rockets
for all 3 Apache variants, the Supercobra, and the Kiowa.
This also adds the 184 Long and 131 pods. 
Lastly, this adds date and fallback information to the shrikes in
advance of the AGM-45B being added to the A-4E mod.
2023-06-15 15:25:44 +02:00
Raffson
0de4b01917 Forgot to run local checks -_- 2023-06-15 04:26:25 +02:00
Raffson
04876c8c66 Downgrade starlette back to 0.27 2023-06-15 04:22:16 +02:00
Raffson
8c29071d04 Fix AI RTB immediately with forced air-start 2023-06-15 03:49:32 +02:00
Raffson
91ee04bf2a Fix save-compat issues 2023-06-15 03:11:12 +02:00
Raffson
666f2908b7 Update dependencies 2023-06-15 01:54:47 +02:00
Raffson
45b8757593 Support for convoy "spawn-route" in campaign design
Resolves #91

'Assault On Damascus' was revamped using this new technique
2023-06-15 01:47:08 +02:00
Raffson
057ea58d8e Modifiers for ground unit transfer window 2023-06-14 03:44:03 +02:00
Raffson
ad227965ea Replace SEAD-Escort with SEAD for Naval TGOs
SEAD Escort is available by default
2023-06-13 17:46:16 +02:00
Raffson
2048910c78 Fine-tune Sinai landmap 2023-06-13 17:13:17 +02:00
Raffson
245bab57c2 Avoid moving empty squadrons if aircraft-type can't fit any slot 2023-06-13 13:30:32 +02:00
Raffson
ef63fe5b5c Renaming what's left in banners 2023-06-12 21:20:01 +02:00
Raffson
e2a14f861e No need for version bump 2023-06-12 20:59:15 +02:00
Dan Albert
2468b1c6d4 Fix Scenic Inland yaml, fixing NGW. 2023-06-12 20:59:15 +02:00
Dan Albert
b62b646e3b Make patch coverage task informational.
Not reasonable to require all PRs to avoid regressing coverage yet...
2023-06-12 20:59:15 +02:00
Dan Albert
5ab97561cc Update Fuzzle's campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2970.
2023-06-12 20:59:15 +02:00
Dan Albert
b45139bf02 Stop preloading images that are rarely used.
The aircraft banners are only used for the unit info window, and that's
not a normal part of gameplay. We spend a bit over 1.5 seconds
preloading this data at startup (about 25% of the non-game load startup
time). This data is only expensive to load in aggregate, and we never
need all of it. The unit info window is not noticeably slowed by this,
but startup is noticeably faster without it.
2023-06-12 20:59:14 +02:00
Dan Albert
88db6eb5f0 Remove pointless suffixes on banner files.
I think someone just copied this pattern from the icons where the suffix
represented the icon size. These are definitely not 24px banners, and
some of the suffixes are even wrong (_25).
2023-06-12 20:59:14 +02:00
Dan Albert
3b40aef70c Add tests for AircraftLayer. 2023-06-12 20:59:12 +02:00
Dan Albert
389d230ea3 Fix Python coverage reporting.
Apparently the fact that I want the coverage report to be XML isn't
enough of a hint that I want coverage.
2023-06-12 20:59:09 +02:00
MetalStormGhost
765e6f8dbf A-6A Intruder with Adecarcer's hardpoint options
Enabled Adecarcer's modified hardpoint options for the A-6A Intruder mod. This will, for instance, fix the MER bomb racks which have the "missing texture" material in the stock version of the mod. It will also allow mounting some weapons which are more appropriate for the A-6E variant of the aircraft. While not historically and technically accurate, this will allow employing the aircraft in a role which is closer to the EA-6B or A-6E, should the user wish to do so. The EA-6B mod is AI-only, so this will grant a player-flyable option. The use of custom loadouts is recommended.
2023-06-12 20:51:09 +02:00
MetalStormGhost
0e307683b6 Replaced the A-7E Corsair II OCA/Runway loadout AGM-122 Sidearm ARM with an AIM-9 Sidewinder. 2023-06-12 16:45:14 +02:00
Pande4360
5065f4e505 Removed SEAD Escort from fighters. 2023-06-12 05:12:36 +02:00
Raffson
a31017e05a Add AFAC as fallback for CAS/BAI 2023-06-12 01:20:58 +02:00
Raffson
59f04238cb Update gazelle's payloads
Last update introduced some changes to pylons and such..
2023-06-12 01:20:13 +02:00
M Chimiste
c4c23a6692 Create egypt_2010s.json (#137)
First Draft of modernish Egyptian faction
2023-06-11 23:50:17 +02:00
Pande4360
e4fbaf8480 Sw patch (#140)
* Fixed some tasks

* Fixed some tasks

* slimmed down faction

* slimmed down faction

* Fixed Tasks

* test size fix

* -test size fix
+tasks

* tasks

* Loadout: added BAI and strike
2023-06-11 23:49:17 +02:00
holyorangejuice
143cb61734 WRL Missions Brought to 10.7 Standards
I have spent hours making the WRL missions up to 10.7 standards. CTLD zones added to the miz files. Squadron limits added to the yamls. Most importantly the descriptions are all up to date and similar. Might be some minor touch ups from here on out but that majority of it is ready to go. I also deleted up the coast, retiring that legacy campaign which was my first release. Originally designed for liberation.
2023-06-11 23:46:55 +02:00
Raffson
d3e727f205 Fix UI not updating properly after loading settings 2023-06-11 21:29:24 +02:00
Raffson
7e9380162c Don't remove transfers but disable if insufficient room 2023-06-11 21:29:23 +02:00
holyorangejuice
e9760e4a7d WRL File Name Updates (#136)
* WRL Campaign Update Kutaisi2Vaziani

WRL Campaign Update Kutaisi2Vaziani

* WRL File Name Changes

I'm planning some full updates to the campaigns. I wanted an easier file structure to manage. File name changes only, tested prior to commit.
2023-06-11 18:48:01 +02:00
holyorangejuice
0d070d7652 New WRL Campaign
New WRL campaign added, also name fix for Caucasus - 1968 Yankee Station. I was annoyed by the naming convention not matching the rest.
2023-06-11 03:24:03 +02:00
Raffson
57c2850c87 Finish Sinai support
Resolves #134
2023-06-11 03:22:09 +02:00
Raffson
ce9c3074ff Add arcgis data for Sinai 2023-06-11 03:21:31 +02:00
Raffson
4cfc11bc79 Another pydcs bump/fix 2023-06-10 13:17:53 +02:00
Raffson
27fcef7517 Pydcs fix 2023-06-10 02:51:00 +02:00
Raffson
e980e7a5f8 More preparations for Sinai 2023-06-10 02:29:28 +02:00
Raffson
3b5af93e2d Add beacons for Sinai 2023-06-10 02:03:41 +02:00
Raffson
a3d43e1815 Weapon updates for mods 2023-06-10 01:03:29 +02:00
Raffson
f9af1ed184 Missing dependency for import_beacons.py 2023-06-10 00:43:16 +02:00
Raffson
abe6691206 Pydcs update
Support for 2.8.6 + Sinai
2023-06-10 00:30:50 +02:00
Raffson
9c1be534c7 Fix bugs reported in Discord
- Fixes ferry flights causing errors when "Nothing" is not available
- Logs a warning when a frontline stance is suddenly no longer available and uses defense stance as fallback which used to be the default. An investigation is still required to determine the cause of this...
2023-06-09 19:28:18 +02:00
Raffson
055519411b Apparently stances use the connected CP's ID -_- 2023-06-05 21:09:38 +02:00
Raffson
9b26c2ddca Use frontline stance for group sizes 2023-06-04 21:45:38 +02:00
MetalStormGhost
aad908a716 Now applies the ratio between ground unit limit and the total number of ground units to each unit type when planning the ground war. This will help with monocultures of certain unit types when the control point has more units than can be spawned in one mission. 2023-06-04 21:45:38 +02:00
Raffson
c69f536639 Improve accuracy w.r.t. parking space info 2023-06-04 21:45:37 +02:00
Raffson
fbdc3e896e Tweak parking info in air wing config dialog
Update changelog.md
2023-06-04 19:12:06 +02:00
MetalStormGhost
f7f7925260 Banners for Swedish Military Assets Pack v1.10
Added banners for Swedish Military Assets Pack v1.10 and flipped the pre-existing icons horizontally to match the rest of the ground vehicle icons. Source images for the banners made by Currenthill, used here with his explicit permission.
2023-06-04 14:29:05 +02:00
Dan Albert
a97fd69828 Show parking capacities in air wing config.
This does show the theoretical parking use of full squadrons even when
the new rules are not enabled. Since limits can be enabled manually
later in the game, it's still useful information, even if it's a bit
misleading.

https://github.com/dcs-liberation/dcs_liberation/issues/2910
2023-06-04 14:15:58 +02:00
Dan Albert
8a57104b0f Configure squadron sizes for Abu Dhabi. 2023-06-04 13:34:57 +02:00
Dan Albert
d88b5da382 Fix Black Sea LHA parking limits.
Everything else was within the limits, but I had forgotten to check the
LHAs.
2023-06-04 13:34:57 +02:00
Starfire13
c69b797ff3 Add Final Countdown II campaign.
Designed for Normandy 2.0
2023-06-04 13:30:15 +02:00
Raffson
e3c9806afb Update china_2010.json
Adding submarine and replace T-55 with Type 59

Co-Authored-By: ColonelAkirNakesh <93631947+ColonelAkirNakesh@users.noreply.github.com>
2023-06-04 13:28:57 +02:00
Raffson
fa27ad96c7 Updating Russian factions 2010 & 2020
Adding ships...
2023-06-04 13:27:32 +02:00
Raffson
9d60418aef Add 'FH M2A1 105mm' howitzer to allies_1944
Co-Authored-By: ColonelAkirNakesh <93631947+ColonelAkirNakesh@users.noreply.github.com>
2023-06-04 13:24:00 +02:00
Raffson
bf277c6c06 Enforces Topgun: Maverick Rogue Nation livery for Iranian Tomcat
Co-Authored-By: ColonelAkirNakesh <93631947+ColonelAkirNakesh@users.noreply.github.com>
2023-06-04 13:21:51 +02:00
ColonelAkirNakesh
b398b72f94 Create TYPE-59.yaml 2023-06-04 13:17:17 +02:00
ColonelAkirNakesh
f2bdc3e0ee Create Horch_901_typ_40_kfz_21.yaml 2023-06-04 13:16:51 +02:00
ColonelAkirNakesh
813d68bf31 Create Pak40.yaml 2023-06-04 13:16:51 +02:00
ColonelAkirNakesh
883d08209d Create Wespe124.yaml 2023-06-04 13:16:51 +02:00
ColonelAkirNakesh
2aeee4ced6 Create LeFH_18-40-105.yaml 2023-06-04 13:16:50 +02:00
ColonelAkirNakesh
1b39d21750 Create M2A1-105.yaml 2023-06-04 13:16:15 +02:00
ColonelAkirNakesh
6d7d7a4439 Create BDK-775.yaml 2023-06-04 13:11:39 +02:00
ColonelAkirNakesh
6452f879bf Create santafe.yaml 2023-06-04 13:11:11 +02:00
ColonelAkirNakesh
0d8064c582 Create leander-gun-condell.yaml 2023-06-04 13:10:46 +02:00
ColonelAkirNakesh
83e63487e5 Create leander-gun-lynch.yaml 2023-06-04 13:10:28 +02:00
Dan Albert
4f00ec9546 Add missing note about 7.0.0 -> 7.1.0 save compat. 2023-06-04 13:05:19 +02:00
Dan Albert
402e4a54d5 Update beacon data.
Did this for Normandy 2... but unsurprisingly there aren't a whole lot
of beacons in a WW2 map.
2023-06-04 13:04:31 +02:00
Raffson
d8e4fa6f80 Update pydcs 4 Normandy 2.0 2023-06-04 13:03:36 +02:00
Dan Albert
be9f83e221 Update Normandy landmap for Normandy 2.
https://github.com/dcs-liberation/dcs_liberation/issues/2804
2023-06-04 13:01:10 +02:00
Dan Albert
cc0d1d5ab6 Add Normandy 2 landmap inputs.
https://github.com/dcs-liberation/dcs_liberation/issues/2804
2023-06-04 13:01:09 +02:00
Dan Albert
df922e9ca7 Force polygons into validity during GIS import.
Not sure why, but some polygons become invalid (which usually means a
self-intersecting "polygon", such as two triangles that meet at a point)
during this transformation. Shapely includes a tool to reshape polygons
into validity, so use that.
2023-06-04 13:01:09 +02:00
Dan Albert
5600257442 Add performance option to prevent missile tasks.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2508.
2023-06-04 12:57:16 +02:00
Raffson
e9a3bd0640 Replace more Patriot STRs with real EWRs.
Not all of these nations actually field this radar (according to
Wikipedia), but at least it's a real EWR, and it's the only blue one
we've got.
2023-06-04 12:56:11 +02:00
Dan Albert
6cb67edfcb Add changelog note for BAI fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2922.
2023-06-04 12:51:36 +02:00
zhexu14
7e53c36d2c Add ability to convert landmap to/from miz.
This PR adds utility functions that import/export landmap files to .miz
polygons. In addition to the unit test, this PR has been tested by
writing the Caucuses & Syria landmaps to a .miz file, loading the
generated .miz file back in and checking that the loaded landmap object
is identical to the original files.
2023-06-04 12:51:36 +02:00
zhexu14
a54f836cde issue 2922: make BAI plannable against missile and costal sites 2023-06-04 12:48:34 +02:00
zhexu14
aa64f28a4b make BAI plannable against vehicles only 2023-06-04 12:48:33 +02:00
Raffson
2251018de2 Revert attempt at improving convoy spawning
Unfortunately this quick fix didn't do the trick, we'll probably have to stick with #91
2023-06-04 12:39:58 +02:00
Raffson
c559d6e2be Follow-up on flight TOT offset 2023-06-04 01:50:46 +02:00
Dan Albert
529eea0c01 Fix formatting of takeoff time. 2023-06-04 00:38:47 +02:00
Dan Albert
0acf970443 Add UI for TOT offset adjustment.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2912.
2023-06-04 00:36:51 +02:00
Dan Albert
7a57bd3ee0 Save the TOT offset in the flight plan.
Prep work for exposing this to the UI.
2023-06-04 00:31:38 +02:00
Raffson
5d127744ff Updating loadouts 2023-06-03 21:01:07 +02:00
Raffson
6e15599691 Update changelog 2023-06-03 19:38:03 +02:00
Raffson
e018ef7f11 Formatting + typing 2023-06-03 19:27:50 +02:00
Raffson
b318bc4941 Tweak ingress waypoint tasks for OCA-Runway, STRIKE & FighterSweep 2023-06-03 19:04:38 +02:00
Raffson
962c64d065 Refine DCS tasks for different mission types 2023-06-03 19:04:37 +02:00
Raffson
bbf8e69659 Split Anti-Ship from BAI 2023-06-03 19:04:37 +02:00
Raffson
2ed85792b9 Split full-strength start from squadron aircraft limits 2023-06-03 16:04:27 +02:00
Raffson
db7bcaa45c Properly indicate save-incompatibility issues to users 2023-06-03 16:04:27 +02:00
holyorangejuice
2225d6ef8e WRL Mission Updates
Yamls are updated for units and description. Damascus Miz updated so I could name the SAM sites for the yaml definitions.
2023-06-03 14:11:59 +02:00
Raffson
703da303ee Migrator fix for 'Hipico' 2023-05-30 21:36:50 +02:00
MetalStormGhost
54a471fe82 Improved convoy form-up behaviour
Adds one waypoint with PointAction.Cone and then orders convoys on road. This is done to make convoys start to move immediately, instead of waiting (potentially) a long time for them to form up and actually start moving.

Credit to Farrago for suggesting this.
2023-05-30 21:12:05 +02:00
Raffson
f8f37e8986 Adjust Tornado's task priorities 2023-05-29 16:21:36 +02:00
Raffson
027dd88feb Replaces Patriot STR with AN/FPS-117 EWR, adds USS Harry Truman
Co-Authored-By: ColonelAkirNakesh <93631947+ColonelAkirNakesh@users.noreply.github.com>
2023-05-29 12:40:05 +02:00
Raffson
118005528c Remove duplicate changelog entry 2023-05-29 12:33:59 +02:00
Dan Albert
bcd81bae7c Make the flight details menu modal.
Prevents players from accidentally deleting flights they're currently
viewing, which would cause an error.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2911.
2023-05-29 12:24:28 +02:00
Dan Albert
fa70ba5d29 Fix line endings.
These get broken whenever someone uses the GitHub file upload editor,
since that doesn't understand .gitattributes.
2023-05-29 12:24:28 +02:00
Starfire13
0c93d281bd Update Golan Heights and Caen to Evreux campaigns.
I had asked Khopa for permission to edit two of his campaigns to fix
some issues. Only the YAMLs have been edited, .miz files did not need
changes. I have tested both YAMLs to make sure campaigns will generate.
Also tested generating turn 1 .miz and ran it in DCS.

Golan Heights:
1. Removed the 2 problematic squadrons from Marj Ruhayyil that were
causing aircraft losses due to larger aircraft sizes not fitting at that
airfield (which is intended for helicopters).
2. Implemented squadron limits.

Caen to Evreux:
1. Re-arranged squadrons for better force distribution and revised
primary and secondary mission types for better default play experience.
2. Implemented squadron limits.
2023-05-29 12:24:27 +02:00
Starfire13
3e7968adce Update Apache loadouts.
BAI loadout updated to use the new radar guided hellfires. Aux tanks
removed in favour of extra cannon ammo.
2023-05-29 12:23:36 +02:00
MetalStormGhost
e5a4e54544 Updated changelog. 2023-05-29 12:20:04 +02:00
MetalStormGhost
1540b2cf31 Use SEAD task for stock Tornado SEAD/DEAD
The stock Tornado is capable of the SEAD task in DCS, but not the CAS task, so use SEAD for Tornadoes when flying SEAD or DEAD missions. Also, feel free to add to the list if other airframes should use SEAD as well for cosmetic reasons (would show SEAD task in the mission editor and F10 map in-game).
2023-05-29 12:20:04 +02:00
Raffson
198ff7d8a3 Allow deletion of certain types of waypoints
Resolves #60
NAV/REFUEL/DIVERT waypoints should have no effect on the timings.
2023-05-29 00:11:27 +02:00
SnappyComebacks
8363a7e8fa Set units on the frontline to Hidden On MFD. (#2669)
All groups (friendly and enemy) that are part of the front line are set
to `Hidden On MFD`. This is a group level filter, and can not be applied
on a per unit basis.
2023-05-28 21:20:12 +02:00
Raffson
33ee4b1d1a Tweaking F-18s task-priorities 2023-05-28 21:11:14 +02:00
Raffson
7582040d41 Allow harriers to operate from FOBs/FARPs
Resolve #109
2023-05-28 21:05:17 +02:00
Raffson
b8cb1a6273 Fix corruptions due to overpopulation 2023-05-28 15:17:40 +02:00
Raffson
b958e9b095 Avoid overpopulating bases
With the new aircraft limitations for squadrons, airfields/fobs/farps could get overpopulated at campaign start. This would cause all sorts of gnarly things like squadrons ending up with a negative amount of "owned aircraft".
2023-05-28 14:28:41 +02:00
Raffson
35607515f6 Fix potential bug when switching campaigns
Without calling __setstate__ the duration options are not properly transformed to timedelta objects
2023-05-28 13:33:49 +02:00
Raffson
28deb36f2c Fix exception when changing campaigns
Calling setCurrentText with an Enum will obviously cause issues...
2023-05-28 12:51:51 +02:00
Raffson
7e6a6cc61a Pydcs fix for invalid pylons 2023-05-28 00:33:41 +02:00
Raffson
78990b8953 Use actual procurement ratio for turn 0 2023-05-28 00:23:53 +02:00
Raffson
4898cdb614 Reuse the settings screen in NewGameWizard
Resolves #123
2023-05-27 21:50:08 +02:00
Raffson
0923add514 Break QNewGameWizard up into pieces 2023-05-27 16:44:01 +02:00
Raffson
d5e019b078 Fix the fix -_- 2023-05-21 21:16:19 +02:00
Raffson
b81030849d Yet another pydcs fix wrt livery scanner -_- 2023-05-21 20:29:34 +02:00
Raffson
0cbf859c94 Fix mistake from yesterday -_- 2023-05-21 20:13:49 +02:00
Raffson
e224990c85 Pydcs fix error when callsigns run out 2023-05-21 17:15:29 +02:00
Raffson
ca78baa008 Fix AWCD choosing wrong liveries for preset squadrons 2023-05-21 14:14:19 +02:00
Raffson
72eb6622ac Cleanup country_shortname, use country.shortname instead 2023-05-21 14:13:33 +02:00
Raffson
f9e15951f2 Support for Iron Dome v1.2 by IDF Mods Project
Resolves #124
2023-05-20 23:48:53 +02:00
Raffson
a46e32cdf1 Add Spanish Naval Assets pack v3.2.0 by desdemicabina
Resolves #119
2023-05-20 20:17:54 +02:00
Raffson
2b89307897 Remove VINSON picture 2023-05-20 20:16:39 +02:00
Raffson
ffcdecad30 Add HMS Invincible picture for CP window 2023-05-20 18:27:17 +02:00
Raffson
167a870f6a Add some missing ship yaml files 2023-05-20 18:00:22 +02:00
Raffson
95083929ce Another pydcs livery-scanner fix
The code to gracefully handle bad zip-files also went lost during the the updates from upstream -_-
2023-05-20 15:59:35 +02:00
Raffson
50378e624a Update README.md 2023-05-20 15:46:22 +02:00
Raffson
93b3157c35 Add 'Fog' class to CustomUnpickler
This class also got refactored and moved into its own package, hence we need to add it to the custom unpickler
2023-05-20 01:41:37 +02:00
Raffson
5eee136189 Fix final country-refactor related issues? 2023-05-20 01:41:37 +02:00
Raffson
1a5e31c01a Migrate squadron countries 2023-05-20 01:41:37 +02:00
Raffson
1b8df76682 Fix indentation error 2023-05-19 22:45:58 +02:00
Raffson
70fb387268 Bump starlette + fastapi 2023-05-19 22:45:57 +02:00
Raffson
27686f6d78 Update contributors 2023-05-19 22:20:40 +02:00
Dan Albert
e7f20e7d10 Fuzzle campaign updates.
https://github.com/dcs-liberation/dcs_liberation/issues/2889
2023-05-19 20:54:09 +02:00
Dan Albert
dbc6a25791 Update contributors list.
<3
2023-05-19 20:52:05 +02:00
Dan Albert
d7d803d4f9 Fix campaign line endings. 2023-05-19 20:51:35 +02:00
Raffson
461c239cc8 Use regex-extractor again to process livery-description files 2023-05-19 20:24:36 +02:00
Raffson
05fb5872d0 Gracefully handling parse-errors in pdycs' livery scanner 2023-05-19 17:46:36 +02:00
Raffson
f72f3316f4 Fix bug in migrator 2023-05-18 23:05:57 +02:00
Raffson
5909ce372b Remove debugging try-except 2023-05-18 22:36:17 +02:00
Raffson
386844378e More save-compatibility changes 2023-05-18 22:33:11 +02:00
Raffson
a9e48770b7 Read A7 mod setting from campaign 2023-05-18 19:08:28 +02:00
Raffson
99b56f1ab7 Update campaign version 2023-05-18 18:51:35 +02:00
Raffson
8cc7f66169 Update mods wrt updated weapons 2023-05-18 18:46:07 +02:00
Raffson
733645e370 Bump pydcs 2023-05-18 18:11:14 +02:00
Raffson
a20fc50aed Add pytest-cov to requirements.txt 2023-05-18 16:54:28 +02:00
Raffson
978e3e4de2 Formatting + type annotations 2023-05-18 16:29:20 +02:00
Raffson
da109146c9 Fixing issues after using actual Country in Faction 2023-05-18 16:24:49 +02:00
Raffson
cca45d3729 Fix save-compat issues 2023-05-18 14:37:34 +02:00
Raffson
b14059e134 Fixing tests + mypy issues 2023-05-18 14:12:41 +02:00
Starfire13
cb6a7d4a92 Update Starfire's campaign updates for 10.7. 2023-05-18 14:03:20 +02:00
Dan Albert
51d823a0b2 Add changelog note for pydcs livery scanner crash fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2747.
2023-05-18 14:02:39 +02:00
Dan Albert
5cfc9aa518 Add changelog note for TALD overfly fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2781
2023-05-18 14:02:39 +02:00
Dan Albert
0dea18f582 Add changelog note for "recreate as" fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2779
2023-05-18 14:02:39 +02:00
Dan Albert
53df67e641 Add changelog note for fixed recovery tanker tasks.
https://github.com/dcs-liberation/dcs_liberation/issues/2771
2023-05-18 14:02:39 +02:00
Dan Albert
2448ffe337 Add changelog note for improved dead event handling.
https://github.com/dcs-liberation/dcs_liberation/issues/2765
2023-05-18 14:02:38 +02:00
Dan Albert
9ace5bab94 Add changelog note for air wing reset fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2751
2023-05-18 14:02:38 +02:00
Dan Albert
ccf2d11034 Add changelog note for BAI planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2618
2023-05-18 14:02:25 +02:00
Dan Albert
190b6c6e7a Add changelog note for built-in TGP fix. 2023-05-18 14:02:25 +02:00
Dan Albert
573ccb0bc6 Add changelog note for AEW&C planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2048
2023-05-18 14:02:25 +02:00
Dan Albert
910fd27c14 Add changelog note for TALD fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2780.
2023-05-18 14:02:06 +02:00
Dan Albert
5f65298728 Finish wiring up SAM orientation control.
The UI works beautifully, but that's not worth much if it doesn't
actually change the data...

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2479.
2023-05-18 14:02:05 +02:00
Raffson
4ca150198e Delete germany_1944_free.yaml 2023-05-18 14:01:12 +02:00
Raffson
71f6186a88 Reuse Ghosti's NightMission conditions 2023-05-18 13:40:29 +02:00
zhexu14
e3fce5fddc add unit tests for mission_types function in controlpoint objects (#2870)
This PR adds unit tests that can be planned against control points.
2023-05-18 13:33:49 +02:00
zhexu14
958252515e Update ADM141 data to include clsids for hornet 2023-05-18 13:33:48 +02:00
Dan Albert
0e139b8640 Make wind speed moddable.
These should probably be overridable per theater and per season, but
even with that we'll want some defaults.

https://github.com/dcs-liberation/dcs_liberation/issues/2862
2023-05-18 13:33:39 +02:00
Dan Albert
8ed843a9cf Move and split up weather.py.
This is getting out of hand, and I'm about to make it worse.
2023-05-18 13:31:26 +02:00
Dan Albert
080d346517 Rework wind speed Weibull inputs, tune.
The previous method of using a uniform scalar of the MSL wind speed for
higher altitudes didn't offer enough control. In particular, the shape
needs to be quite different to skew low, mid, high.

This patch reworks that system so the parameters of each distribution
are configured per-altitude level. To keep some continuity between
altitudes (on a windy day, all levels should have higher wind speeds on
average), the wind speed of the lower altitude will be added to the
scale value of the higher altitude.

Since it wasn't practical to approximate the previous behavior with the
new system, this also handles the tuning of each. The low altitude
speeds remain mostly unchanged (typically around 5 knots expect for
thunderstorms), but the average speeds for other altitudes went up to
more closely match the previous intent but without the massive
overshoot. At 2000m wind speeds are typically in the 20-25 knot range
now, and 8000m 30-50 knots.

https://www.quora.com/What-is-the-average-wind-speed-at-different-altitudes
has some of the source data, and Quora is the most authoritative source
there is. It claims that cruise altitude winds can get "as high as 150
knots", but doesn't claim anything about the average. I had a
surprisingly difficult time finding good data for cruise altitude air
speeds for non-jet stream paths (though many of our maps are in jet
streams), so I just eyeballed it from
https://turbli.com/wind-during-flights/.

https://github.com/dcs-liberation/dcs_liberation/issues/2861

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2863.
2023-05-18 13:29:02 +02:00
Dan Albert
73e0cbe182 Use weibull distribution for wind generation.
Wind speeds should not be uniformly distributed. This switches to a
Weibull distribution which allegedly (see the bug) is good enough.
Experimentally that seems true as well, though I know nothing about how
wind works irl. This at least looks like it'll generate reasonable
variation in missions while keeping the 1st through 3rd quartile
behaviors from getting out of hand.

I'm very uncertain about the scaling factor aspect of this. Naively the
wind speeds at different altitudes ought to be somewhat correlated, but
I'm not sure how much, and whether this kind of scaling is at all the
right way to do it. As before, meh, close enough?

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2861.
2023-05-18 13:29:02 +02:00
Raffson
b750099b16 Add missing tasks in aircraft yamls 2023-05-18 13:14:22 +02:00
Raffson
f00a3fb1d2 pydcs update: refactored livery-scanner 2023-05-16 21:45:27 +02:00
Raffson
1b1090d78f Fix exception wrt typing 2023-05-16 21:45:26 +02:00
Raffson
34645560bf Migration changes 2023-05-16 21:45:26 +02:00
Raffson
785beffee0 Cleanup after cherry-picking... 2023-05-14 21:37:24 +02:00
Dan Albert
f9e9c2793a Allow manual SAM orientation.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2479.
2023-05-14 21:08:29 +02:00
Dan Albert
83916b9fb0 Wrap settings titles. 2023-05-14 21:08:09 +02:00
zhexu14
ac5c13663b add tests for mission_types for various theather ground objects 2023-05-14 21:08:09 +02:00
ColonelAkirNakesh
e92d6d0c1c Makes guard tower (house2arm) a AAA unit 2023-05-14 21:08:09 +02:00
Dan Albert
b44249317a Remove old aircraft selection mode.
New mode seems to be working well.
2023-05-14 21:04:43 +02:00
Starfire13
e8e0452f32 Update B-52H.yaml
Added antiship mission type to B52
2023-05-14 21:04:09 +02:00
Dan Albert
0608089eb0 Use the actual Country type instead of the name.
We want other pieces of country information (in particular the short
names). This cleans up a lot of code anyway.

As an added bonus, this now catches squadrons that used invalid names
which would previously be passed through to pydcs and... then I don't
know what would happen.
2023-05-14 21:04:09 +02:00
Dan Albert
b3e21498fd Fix broken squadron.
It's "The Netherlands", not "Netherlands".
2023-05-14 20:57:43 +02:00
ColonelAkirNakesh
9c407a6204 Germany 1944 free unit list fixes.
1. Removes Flak18 as these currently require Kdo.G.40. (part of the WW2
Asset Pack) to fire at player. ED-supplied single missions are having
Flak18s w/out WW2 Asset Pack firing at a point in the air.

2. Adds Opel Blitz to frontline for more variety, balance, and some
little bit of historical accuracy. My understanding is late war was more
truck strafing than HVARing Panzers.

3. Adds guard tower to AAA units to have a functioning AAA since Flak18s
don't work.
2023-05-14 20:57:43 +02:00
Dan Albert
9ec879cea0 Move code docs to a readthedocs project.
Ported the existing docs, but the real goal is getting the docs for
campaign version moved here, as well as the manual. RTD will have an
"edit on github" button that'll keep this accessible to players, but
it'll be much easier to keep docs up to date while developing features
if it's part of the code base.
2023-05-14 20:57:29 +02:00
Dan Albert
5c07a2556e Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea,
but the old mode will probably go away.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
2023-05-14 20:56:58 +02:00
Dan Albert
f719e1cfe7 Add an option to prefer primary tasked aircraft.
We're still using mostly the same aircraft selection as we have before
we added squadrons: the closest aircraft is the best choice.

This adds an option to obey the primary task set by the campaign
designer (can be overridden by players), even if the squadron is farther
away than one that is capable of it as a secondary task.

I don't expect this option to live very long. I'm making it optional for
now to give people a chance to test it, but it'll either replace the old
selection strategy or will be removed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1892.
2023-05-14 20:33:55 +02:00
Dan Albert
e95a6bf759 Support replacing squadrons in-place. 2023-05-14 17:37:53 +02:00
Raffson
7bbf5d59e4 Update package-lock.json 2023-05-14 17:31:18 +02:00
zhexu14
790d08fa13 enable AEWC missions on FOBs 2023-05-14 17:30:20 +02:00
Dan Albert
0a4706e6f4 Make patch check informational as well. 2023-05-14 17:28:54 +02:00
Dan Albert
af833f6682 Expand python coverage, use coveragerc. 2023-05-14 17:28:54 +02:00
Dan Albert
6de4df23b2 Make coverage checks informational.
PRs shouldn't be failing because coverage dropped. Not until our tests
aren't terrible, anyway.
2023-05-14 17:28:47 +02:00
Dan Albert
2c9dcd430f Add a test for the Aircraft component.
Leaflet (or maybe react-leaflet?) isn't very testable, so we can really
only test that mocks were called with the right props for the leaflet
components we expect, but that's still better than nothing.
2023-05-14 17:28:46 +02:00
Dan Albert
71c2eb3567 Test typescript and collect coverage.
We don't actually have any tests yet :(
2023-05-14 17:28:46 +02:00
Dan Albert
c02351fde3 Don't fail PRs that regress coverage.
Most of our code is barely testable and our coverage isn't anything to
brag about.
2023-05-14 17:27:39 +02:00
Dan Albert
968a360fde Gather and upload coverage of python tests. 2023-05-14 17:27:38 +02:00
Dan Albert
03c48376c4 Disallow squadrons from disabling mission types.
After this change, players will always have the final say in what
missions a squadron can be assigned to. Squadrons are not able to
influence the default auto-assignable missions either because that
property is always overridden by the campaign's air wing configuration
(the primary and secondary task properties). The `mission-types` field
of the squadron definition has been removed since it is no longer
capable of influencing anything. I haven't bothered cleaning up the now
useless data in all the existing squadrons though.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2785.
2023-05-14 17:18:55 +02:00
Raffson
5e2625ad21 Propagate changes from Liberation 2023-05-14 17:09:41 +02:00
Raffson
711d102425 Only use bold font on kneeboard
Should fix an issue where letters seem transparent in VR
2023-05-14 16:54:48 +02:00
Raffson
55f1f5c548 Init files for pydcs_extensions 2023-05-14 16:54:48 +02:00
Raffson
b8e2ae9bb7 Fix copy-paste error 2023-05-14 16:07:11 +02:00
Raffson
6ed5283454 Tweaking tasks in aircraft yamls 2023-05-14 16:06:57 +02:00
Raffson
231a857813 Fix mypy errors 2023-05-14 15:16:21 +02:00
Raffson
40f4b1c926 Update dependecies 2023-05-14 15:16:00 +02:00
Raffson
3ce0473c86 Cleanup 2023-05-14 15:13:44 +02:00
Dan Albert
0b6575ca97 Use task priorities from aircraft yamls.
Preferred aircraft per task are now determined by a ranking of weights
stored in the aircraft yaml files. To aid in visualizing the priorities
across aircraft, Liberation can be run with the argument
dump-task-priorities to dump a yaml file in Saved
Games/DCS/Liberation/Debug/priorities.yaml, which will show each task
along with priority sorted aircraft and their weights.

The current weights in the data were exported from the existing lists,
where each position from the bottom of the list was worth 10 (to allow
some games for less shuffling later).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2809.
2023-05-14 14:50:30 +02:00
Dan Albert
9ebbe11d83 Add debug command to dump aircraft priorities.
https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-05-14 14:30:19 +02:00
Dan Albert
016a9b5762 Load task priorities from YAML.
Not used yet.

https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-05-14 14:19:47 +02:00
Dan Albert
ddd6063f25 Export current task priorities to aircraft yamls.
Nothing fancy. Rank in reversed (so earliest items in the original list
have the highest index) list * 10 (to leave gaps for balancing).

https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-05-14 14:14:59 +02:00
Dan Albert
81554c510e Fix merged classvars in UnitType descendants.
```
>>> class Foo:
...     bar = 0
...     @classmethod
...     def set_bar(cls, v):
...             cls.bar = v
...
>>> class Bar(Foo):
...     ...
...
>>> Bar.set_bar(1)
>>> Bar.bar
1
>>> Foo.bar
0
>>> class Foo:
...     bar = {}
...     @classmethod
...     def add(cls, k, v):
...             cls.bar[k] = v
...
>>> class Bar(Foo):
...     pass
...
>>> Bar.add(0, 1)
>>> Bar.bar
{0: 1}
>>> Foo.bar
{0: 1}
```

The collections are copied by reference into the descendants, whereas
_loaded is copied by value, so that one can stay. Before this patch,
every subtype was loading because _loaded was set per subclass, but they
were all registering with a common collection defined by UnitType rather
than their own class.
2023-05-14 14:08:37 +02:00
Pande4360
1d1df15d5d SW2.6 Fixed Faction 2023-05-12 07:58:57 +02:00
Pande4360
8e12f4e790 SW2.6 Fixed loadouts x/y wing 2023-05-12 07:58:57 +02:00
Pande4360
179850cdb6 Support for SW v2.6 mod (#120)
* Removed AI varients

* Removed AI varients Logo/Banners

* Removed AI varients Logo/Banners

* Removed AI varients ai flgith planner

* Removed AI varients SWPack Fix

* Removed AI varients SWPack - SWWeapon fix
2023-05-11 21:48:19 +02:00
holyorangejuice
bf14c8e32d WRL Campaign Update Kutaisi2Vaziani (#118) 2023-05-08 00:21:40 +02:00
zhexu14
f965c9ffa7 Handle edge case where aircraft have built in TPGs 2023-05-07 21:43:41 +02:00
zhexu14
0ff60283c2 Add GBU-27 yaml 2023-05-07 21:41:18 +02:00
Dan Albert
06094c54b3 Format aircraft yamls. 2023-05-07 21:33:46 +02:00
zhexu14
065f90ea98 Reset flight's flight plan builder when changing task type.
The mechanism for how this bug arises is that the *WaypointGenerator*
uses the *FlightWaypoint.waypoint_type* to decide whether to generate
the waypoint in the .miz file using a *DeadIngressBuilder* or a
*SeadIngressBuilder*. This *waypoint_type* is set by
*ato.flightplans.<sead|dead>.Builder*, which is set when *ato.flight* is
initialised in the *Flight._flight_plan_builder* member variable based
on *Flight.flight_type*. When *Flight.flight_type* is updated when the
flight is changed from SEAD->DEAD, *Flight._flight_plan_builder* is not
updated in the development build, resulting in it continuing to generate
SEAD waypoints.

This PR adds *set_flight_type()* which sets the *flight_type* property
and updates *Flight._flight_plan_builder* and uses this function when
converting flight types. Ideally, *flight_type* should be made private
and only accessed through getter/setter functions that encapsulate this
behavior, but that would mess up any existing liberation save files.

This PR was tested by:
1. Opening the save file from Issue 2779 in the development build
2. Clicking "Take Off" and confirming that the Weapon Release Type is
"Guided" at the Ingress Waypoint as described in the issue.
3. Opening the save file from Issue 2779 in this PR
4. Converting the SEAD2DEAD flight from DEAD back to SEAD, and then from
SEAD to DEAD
5. Clicking "Take Off" and confirming in the mission editor that the
SEAD2DEAD flight has Weapon Release Type set to "Auto" at the Ingress
Waypoint.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2779.
2023-05-07 21:19:53 +02:00
zhexu14
c44fe4c89e Track S_EVENT_KILL and S_EVENT_UNIT_LOST as well.
Catch a few more death signals. Still not perfect but a bit better.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2765.
2023-05-07 21:19:53 +02:00
Nosajthedevil
1964f30bfc Added many premade squadrons.
Added a number of squadrons - US Vietnam War era squadrons for the
OV-10A and F-4B/C, US squadrons for the A-10A, iran squadrons for the
F-4E, and russian, iranian, vietnamese, syrian, and north korean
squadrons for the Mig-21.
2023-05-07 21:19:52 +02:00
Dan Albert
07bd76cd61 Fix typo in Germany 1944.
Oops.
2023-05-07 21:04:15 +02:00
Dan Albert
32b0a3bb12 Replace a bunch of escape sequences.
Unify on using the real letter instead of an escape sequence for better
searchability/readability. There should be no functional change here (if
any, they should be bug fixes).

https://github.com/dcs-liberation/dcs_liberation/issues/2786
2023-05-07 21:04:14 +02:00
Dan Albert
4b8bfae7c9 Fix bad character escape in Caen to Evreux.
The escape sequence looks to be valid according to the spec (although it
would need to be double quoted, but that doesn't fix it), but Python's
parser doesn't appear to handle that. Just use ü.

https://github.com/dcs-liberation/dcs_liberation/issues/2786
2023-05-07 19:31:20 +02:00
Dan Albert
0697a0dd5b Fix file encoding for some loads.
We've actually been pretty good at getting this right in most of the
code base, but we've missed it in a few places. Python defaults to the
encoding of the current locale unless otherwise specified, and for a US
English Windows install that's cp1252, not UTF-8. I'm not brave enough
to change the locale at startup because I don't know how that might
affect CJK encoding users (or for that matter, non-Latin derived
alphabet UTF-8 variants).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2786.
2023-05-07 19:31:20 +02:00
Dan Albert
4cf7864916 Improve logging in defaultsquadronassigner.py.
https://github.com/dcs-liberation/dcs_liberation/issues/2786
2023-05-07 19:30:44 +02:00
Starfire13
52fb153790 Fixes F-14B squadrons that don't have SEAD as available mission type (#2777)
Fixes the YAMLs for 3 F-14B squadrons that didn't have SEAD as an
available mission type. F-14s use SEAD for TALD deployment. The other
F-14B squadrons and all the F-14A squadrons are fine. I also removed
"Bases:" from one of the squadrons as the other squadron yamls don't
have it and it's unecessary (F-14Bs can already be based at airfields
and carriers.
2023-05-07 19:30:41 +02:00
Raffson
49d965ae7b Revisit/Update custom payloads 2023-05-07 18:51:51 +02:00
Raffson
55b76de3f4 Formatting -_- 2023-05-06 18:13:36 +02:00
Raffson
29f3de3587 Fixing some issues with mod weapons 2023-05-06 17:19:56 +02:00
Raffson
df4a071a0f Adjust Strike formation before and after bombing task 2023-05-06 17:08:48 +02:00
Raffson
cb4cf4c3ac Bumb pydcs 2023-05-06 17:03:12 +02:00
Raffson
cd579528b5 Update changelog.md 2023-05-06 16:58:04 +02:00
Pande4360
b36e7ea750 Support for SW mod v2.55 (#116) 2023-05-04 21:45:26 +02:00
Raffson
2ce63abf04 Use Courier font for kneeboard 2023-05-01 18:15:58 +02:00
Raffson
199467f31b Export txt version of kneeboard pages 2023-05-01 18:12:17 +02:00
Raffson
b4b19d3ad5 Avoid claiming unused aircraft
Probably the final Fix #97
Unused aircraft (assigned upon takeoff) would get claimed but since it's not possible to delete those flights after aborting, these flights wouldn't get released anymore. This should fix that issue, including a migrator change to correct the number of claimed aircraft per squadron.
2023-05-01 18:12:17 +02:00
Raffson
31cfc333c7 Fine-tuning kneeboard
Partial fix #106
2023-05-01 18:12:16 +02:00
Raffson
d18b89484a Update changelog.md 2023-04-23 21:27:21 +02:00
Raffson
6be517ad3e Add A-7E Corsair II mod
Banner, icon, payloads & export by Adecarcer

Create A-7E.lua

Co-Authored-By: Antonio <54774215+Adecarcer@users.noreply.github.com>
2023-04-23 18:50:04 +02:00
Antonio
81e6e682bb New Squadrons for Vietnam Era
Adding several different squadrons (A-4, A-6, F-4B/C, Broncos, etc...) for "Yankee Station" campaign.  All Vietnam era related.
All of them with corresponding liveries that can be easily found on DCS User Files download pages
2023-04-23 18:19:06 +02:00
Raffson
907acefbc8 Update F-4E payloads (#112) 2023-04-23 17:39:57 +02:00
Raffson
449a5bf0fc Update SplashDamage2 script 2023-04-22 17:53:03 +02:00
Raffson
350caefbf8 Tweak F-14A-135-GR & F/A-18C payloads 2023-04-15 20:55:12 +02:00
Raffson
fad48ebaed Improve AI SEAD capabilities 2023-04-15 20:44:57 +02:00
Raffson
bf23ee4e8f Fix migrator issue in _update_packagewaypoints 2023-04-15 20:38:51 +02:00
Raffson
6517dc0de8 Set ECM as first task for SEAD ingress 2023-04-14 22:46:11 +02:00
Raffson
96cb39c334 Pydcs bump
Streamlining parking slot assignments
2023-04-14 22:46:10 +02:00
Raffson
845888bc75 Set ECM option as first task for DEAD-ingress 2023-04-14 22:46:10 +02:00
Raffson
1582b3ee43 Move F-16A_MLU to DEAD capable instead
For some reason an old loadout suggested it could carry HARMs...
2023-04-14 22:46:10 +02:00
Raffson
c0406e7c3c Refactor ingress altitude 2023-04-14 22:46:09 +02:00
Raffson
2746636119 Force usage of Decoys before ARMs 2023-04-11 20:09:58 +02:00
Raffson
c4338c1a6f Update changelog.md 2023-04-11 19:46:18 +02:00
Raffson
e10112be3b Expose Splash Damage's "game_messages" option 2023-04-11 19:46:04 +02:00
Raffson
5b7ff8bdd6 Add fuel quantity selector to EditFlight's payload tab
Resolves #99
2023-04-10 17:11:30 +02:00
Raffson
efd2c40cfc Avoid generating/planning flights without an operational runway 2023-04-10 14:38:06 +02:00
Raffson
7eb652b970 Require all bases to be captured to win/lose 2023-04-10 14:10:46 +02:00
Raffson
8973100f95 Fix bug preventing mission generation 2023-04-10 00:02:14 +02:00
Raffson
13c1f429b1 Update changelog.md
Resolves #110
2023-04-09 22:06:23 +02:00
Raffson
3f509a876e #110 Ability to load/save settings
Also includes support for remaining enum/timedelta settings through the yaml file.
- timedelta's in minutes
- enum's should be written out: enumType.enumValue
2023-04-09 22:03:08 +02:00
Raffson
5916ed43d2 Allow definition of settings in campaign's yaml file
Resolves #92
2023-04-08 19:51:38 +02:00
holyorangejuice
5c4ab2578d WRL Faction & Campaign Update (#108) 2023-04-07 19:11:24 +02:00
Raffson
8692c3970d Rename SA-2 with AAA to Sa-2 with ZSU-23/57 + changelog 2023-04-02 22:52:39 +02:00
Raffson
8a95be7473 Fix mypy complaining about something that was already covered -_- 2023-04-02 22:39:34 +02:00
Raffson
5db53aa0b1 Inject ground units to TgoConfig preset group if fill and has no unit 2023-04-02 22:39:33 +02:00
Raffson
7a0ccd0076 Update JAS-39 2023-04-02 22:39:33 +02:00
Raffson
a04196b5be Update Sufa to v3.6 2023-04-01 23:27:43 +02:00
Raffson
ce7bd9def7 Fix edge-case bug in layout's group size 2023-04-01 17:44:50 +02:00
Raffson
d7fda2d598 Add SA-2 with AAA preset group 2023-04-01 17:44:49 +02:00
Raffson
19c60876d1 Placeholder v1.2.0 and add v's 2023-04-01 17:44:49 +02:00
Raffson
67e609f800 Changelog 1.1.1 2023-04-01 17:44:48 +02:00
Raffson
7c3d2367f2 Fix incorrect plugin (option) values 2023-04-01 17:44:48 +02:00
Raffson
83eea8974b Fix procurement bug when coalition has no squadrons
If a user removes all squadrons manually, the faction may still contain aircraft but no budget for aircraft should be allocated at all. In such a case, all money should go to ground units...
2023-03-25 14:58:36 +01:00
Raffson
a1fc92bd00 Initial changes for v1.2 2023-03-18 23:02:11 +01:00
2619 changed files with 303433 additions and 43721 deletions

8
.coveragerc Normal file
View File

@@ -0,0 +1,8 @@
[report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
[run]
branch = True
source = game,pydcs_extensions,qt_ui,resources/tools

View File

@@ -31,9 +31,8 @@ body:
If the bug was found in a test/development build, select "Test build" or "Development build"
and provide a link to the applicable build in the field below.
options:
- 1.0.0
- v1.4.1
- Test build
- Development build
- type: input
attributes:
label: Test/Development build

View File

@@ -39,9 +39,8 @@ body:
If the bug was found in a test/development build, select "Test build" or "Development build"
and provide a link to the applicable build in the field below.
options:
- 1.0.0
- 1.4.1
- Test build
- Development build
- type: input
attributes:
label: Test/Development build

View File

@@ -1,5 +1,5 @@
name: Build Liberation package
description: Assembles the full Liberation application.
name: Build Retribution package
description: Assembles the full Retribution application.
runs:
using: composite
steps:

View File

@@ -1,10 +1,10 @@
name: Liberation JS set-up
description: Sets up the Liberation Javascript environment.
name: Retribution JS set-up
description: Sets up the Retribution Javascript environment.
runs:
using: composite
steps:
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "16"
cache: npm

View File

@@ -1,12 +1,12 @@
name: Liberation Python set-up
description: Sets up the Liberation Python environment.
name: Retribution Python set-up
description: Sets up the Retribution Python environment.
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
cache: pip
- name: Install environment
@@ -19,5 +19,3 @@ runs:
run: |
./venv/scripts/activate
python -m pip install -r requirements.txt
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force

View File

@@ -12,7 +12,7 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
@@ -35,7 +35,7 @@ jobs:
Compress-Archive -Path .\dist\dcs-retribution\ -DestinationPath
dist\dcs-retribution.zip
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dcs-retribution
path: dist/dcs-retribution.zip
@@ -49,7 +49,7 @@ jobs:
include_image: true
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub Build Notifier
if: startsWith(github.ref_name, 'test')
if: github.repository == 'dcs-retribution/dcs-retribution' && startsWith(github.ref_name, 'test')
- name: Send status to Discord
uses: stegzilla/discord-notify@v2
@@ -60,4 +60,4 @@ jobs:
include_image: true
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub Build Notifier
if: github.ref_name == 'dev'
if: github.repository == 'dcs-retribution/dcs-retribution' && github.ref_name == 'dev'

View File

@@ -7,8 +7,8 @@ jobs:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: psf/black@stable
with:
src: "."
@@ -18,7 +18,7 @@ jobs:
name: Type checking
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

View File

@@ -14,7 +14,7 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
@@ -33,7 +33,7 @@ jobs:
with:
release: true
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dcs-retribution
path: dist/
@@ -42,7 +42,7 @@ jobs:
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dcs-retribution

View File

@@ -5,7 +5,7 @@ jobs:
name: Python tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
@@ -15,4 +15,24 @@ jobs:
- name: run tests
run: |
./venv/scripts/activate
pytest tests
pytest --cov --cov-report=xml tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
ts-tests:
name: Typescript tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JS environment
uses: ./.github/actions/setup-liberation-js
- name: run tests
run: |
cd client
npm test -- --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

5
.gitignore vendored
View File

@@ -1,11 +1,15 @@
*.pyc
__pycache__
build/**
# Sphinx
docs/_build
resources/payloads/*.lua
venv
.DS_Store
.vscode/settings.json
dist/**
/.coverage
/coverage.xml
# User-specific stuff
.idea/
.env
@@ -18,5 +22,6 @@ env/
/logs/
/resources/logging.yaml
/resources/plugins/pretense/pretense_output.lua
*.psd

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.8.0
hooks:
- id: black
language_version: python3

13
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,13 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
sphinx:
configuration: docs/conf.py
python:
install:
- requirements: docs/requirements.txt

View File

@@ -11,7 +11,7 @@ Note that you may need to remove the filter for open bugs if it's something we'v
## Making content for Liberation
You can create new campaigns : See [campaign creation wiki](https://github.com/dcs-liberation/dcs_liberation/wiki/Custom-Campaigns).
You can create new campaigns : See [campaign creation wiki](https://github.com/dcs-retribution/dcs-retribution/wiki/Custom-Campaigns).
You can also improve existing campaigns.
You can then submit new campaigns on the "campaigns" channel on Discord, or by making a pull request if you are comfortable with git.

View File

@@ -2,7 +2,7 @@
(Github Readme Banner and Splash screen Artwork by Andriy Dankovych, CC BY-SA 4.0)
[![Patreon](https://img.shields.io/badge/patreon-become%20a%20patron-orange?logo=patreon)](https://patreon.com/khopa)
[![Patreon](https://img.shields.io/badge/patreon-become%20a%20patron-orange?logo=patreon)](https://patreon.com/dcsliberation)
[![Download](https://img.shields.io/github/downloads/dcs-retribution/dcs-retribution/total?label=Download)](https://github.com/dcs-retribution/dcs-retribution/releases)
@@ -12,28 +12,29 @@
[![GitHub issues](https://img.shields.io/github/issues/dcs-retribution/dcs-retribution)](https://github.com/dcs-retribution/dcs-retribution/issues)
![GitHub stars](https://img.shields.io/github/stars/dcs-retribution/dcs-retribution?style=social)
## About DCS Retribution
DCS Retribution was forked from [DCS Liberation](https://github.com/dcs-retribution/dcs-retribution),
## About DCS Retribution
(Last update: 2023-05-20)
DCS Retribution was forked from [DCS Liberation](https://github.com/dcs-liberation/dcs_liberation),
which is a [DCS World](https://www.digitalcombatsimulator.com/en/products/world/) turn based single-player or co-op dynamic campaign.
It is an external program that generates full and complex DCS missions and manage a persistent combat environment.
![Screenshot](https://user-images.githubusercontent.com/315852/120939254-0b4a9f80-c6cc-11eb-82f5-ce3f8d714bfe.png)
DCS Retribution will rely heavily on Liberation in the near future,
and possibly in a more distant future as well since Retribution will attempt
to stay backwards compatible for as long as possible. Therefore,
DCS Retribution is still relying on Liberation for certain updates,
and will possibly stay that way in a more distant future. Therefore,
the patreon link will keep pointing to [Khopa's](https://github.com/Khopa) account until further notice.
However, we are no longer backwards compatible with Liberation, and will no longer attempt to do so.
Currently, Retribution supports the following new features:
* A livery selector in the air wing configuration dialog
* Support for campaigns with quad-point triggers
* Support for the F-15D 'Baz' mod
* Support for the Su-30 mod
* Elementary end-game mechanics
* Variation in flight-size for BAI/ANTISHIP/DEAD/STRIKE main flight (randomize 2/3/4-ships)
* More performance options
* Various bug-fixes (including a fix for the zombie carrier)
* And more... (See [changelog](https://github.com/dcs-retribution/dcs-retribution/blob/main/changelog.md))
Instead, we are focussing on keeping our campaigns forward compatible so that you as a user
can continue on whatever campaign you had going on.
Please keep in mind that once you save a campaign that was started
in a previous (save-compatibility breaking) build, your save file
will have been migrated and thus no longer compatible with the previous build.
Therefore, we recommend backing up your saves and perhaps organizing them by version/build number.
For a more complete overview of our features, check the
[changelog](https://github.com/dcs-retribution/dcs-retribution/blob/main/changelog.md).
## Downloads
@@ -43,11 +44,16 @@ To download preview builds of the next version of DCS Retribution, see https://g
## DCS bugs
These DCS bugs prevent us from improving AI behavior. Please upvote them! (But please
_don't_ spam them with comments):
~~These DCS bugs prevent us from improving AI behavior. Please upvote them! (But please
_don't_ spam them with comments):~~
* [A2A and SEAD escorts don't escort](https://forums.eagle.ru/topic/251798-options-for-alternate-ai-escort-behavior/?tab=comments#comment-4668033)
* [DEAD can't use mixed loadouts effectively](https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/)
* ~~[A2A and SEAD escorts don't escort](https://forums.eagle.ru/topic/251798-options-for-alternate-ai-escort-behavior/?tab=comments#comment-4668033)~~
* ~~[DEAD can't use mixed loadouts effectively](https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/)~~
While DCS bugs are still a thing, we don't quite agree with the ones stated above.
We believe to have addressed these, although some quirks still exist.
For example, SEAD Escorts tend to be a little picky with what they engage,
especially with older SAM systems.
## Bugs and feature requests
@@ -62,7 +68,7 @@ Our plans for future releases can be found on our
[Projects page](https://github.com/dcs-retribution/dcs-retribution/projects).
Each planned release has a Project, and the page for that project has columns for to do,
in progress, and done. Items in the Done column are in the
[preview build](https://github.com/dcs-retribution/dcs-retribution/wiki/Betas)
[preview build](https://github.com/dcs-retribution/dcs-retribution/wiki/Preview-builds)
for that release. Items in the To do column are planned to be added to that release.
## Resources
@@ -70,7 +76,7 @@ for that release. Items in the To do column are planned to be added to that rele
Tutorials, contributors and developer's guides are available in the project's
[Wiki](https://github.com/dcs-retribution/dcs-retribution/wiki/)
(These need to be written again, meanwhile you can refer to
(Some historical information is also availabe on
[Liberation's Wiki](https://github.com/dcs-liberation/dcs_liberation/wiki/))
## Special Thanks
@@ -84,5 +90,7 @@ Excellent lua scripts DCS Liberation/Retribution uses as plugins:
* For the JTAC feature, DCS Retribution embeds Ciribob's JTAC Autolase [script](https://github.com/ciribob/DCS-JTACAutoLaze).
* Walder's [Skynet-IADS](https://github.com/walder/Skynet-IADS) is used for Integrated Air Defense System.
* Carstens Arty Spotter https://www.digitalcombatsimulator.com/en/files/3339128/ is an amazing force multiplyer to drop the hammer on enemies.
* MBot's [Call Artillery Script](https://forum.dcs.world/topic/310506-call-artillery-script/) uses in-map artillery and forward observers to enable artillery fire missions.
Please also show some support to these projects !

View File

@@ -1,4 +1,276 @@
# Retribution 1.1.0
# Retribution v1.5.0
## Features/Improvements
* **[Campaigns]** Ability to define invisible FOBs
* **[Campaigns]** Ability to define influence zones for Control Points
* **[Plugins]** Improvements to AI support for EW Script 2.0
* **[Plugins]** Add moose as a base plugin
* **[Config]** New preference setting to trigger the first-start window on every start (could help in scenarios multiple Retribution instances need to run concurrently)
* **[Modding]** Update Grinelli Designs F-22A Mod to 2.0.0 (May 2025)
* **[Campaign Design]** Added support for Germany Cold War terrain by Ugra Media
* **[Options]** New option to control EPLRS-task injection in mission generator
* **[Modding]** Add Tornado F3 ADV (v1.0, requires FC3 fix)
* **[Modding]** Add Military Aircraft Mod 1.7.2 (See VSN Discord)
* **[Payload Editor]** Add Sniper POD
* **[Modding]** Update SU-30 mod to v2.8.04 Beta + CWS 3.72
* **[Plugins]** EW Script - DEAD added to applicable flight types.
* **[Plugins]** EW Script - Offensive Jamming restricted to aircraft with ALQ99/249 pods, or "has_built_in_jamming: true" in aircarft yaml (AI and Player)
* **[Modding]** Update to CJS Super Hornet Mod v2.4.4
* **[Engine]** Support for DCS 2.9.20.15010, including MiG-29A Fulcrum support.
* **[Campaigns]** Ability to define neutral FOBs and Airfields
* **[Modding]** Add Airboss Moose Module
* **[AirWing]** Use aircraft display names for easier differentiation between modules
## Fixes
* **[Flight Plans]** Fixed bugs wrt planning escort flights
* **[Flight Plans]** Added AntiShipStrike as a fallback task for OCA/Aircraft to fix a bug where the S-3B could not do OCA/Aircraft
* **[Squadrons]** Fixed a bug where loading an air wing config would not properly load all squadrons
* **[Flight Plans]** Fixed a bug where SEAD flights would fire one ARM and RTB
* **[Plugins]** EW Script - Fix radar detection routine.
* **[Campaign]** Fixed a bug where sinking a destroyer in a carrier group would cause squadrons to be removed from the carrier
* **[Engine]** Fixed a bug with transfers to Helipads
* **[Engine]** Fixed a bug with parking allocation
* **[Flight Plans]** Fixed a bug where divert airfield was broken for opfor
* **[Engine]** Fixed a bug with state.json loading wrt transfers
* **[Engine]** Fixed a bug wrt pretense generation and moose script conflicts
* **[Engine]** Fixed a bug where frontline debriefing was not properly calculated
* **[Mission Generation]** Fixed an issue where blue and red units spawned next to each other on frontlines
# Retribution v1.4.1 (hotfix)
## Fixes
* **[Plugins]** Avoid injecting jamming-tasks for player-controller aircraft when EW-Jamming plugin is disabled
# Retribution v1.4.0
## Features/Improvements
* **[Payload Editor]** Ability to configure liveries on flight/flight-member level
* **[Factions]** Support for definitions in yml/yaml format
* **[Campaigns/Factions]** Support for inline recommended faction in campaign's yaml file
* **[Squadrons]** Ability to define a livery-set for each squadron from which Retribution will randomly choose during mission generation
* **[Modding]** Updated support for F/A-18E/F/G mod version 2.2.5
* **[Modding]** Added VSN F-106 Delta Dart mod support (v2.9.4.101)
* **[Modding]** Added OH-6 Cayuse (v1.2) mod support, including the Vietnam Asset Pack v1.0
* **[Modding]** Added VSN EA-6B Prowler mod support (v2.9.4.102)
* **[Modding]** Added tripod3 Cold War assets mod support (v1.2)
* **[Modding]** Added VSN Mirage III mod support (2.5.7.01)
* **[Campaign Setup]** Allow adjustments to naval TGOs (except carriers) on turn 0
* **[Campaign Design]** Ability to configure specific carrier names & types in campaign's yaml file
* **[Mission Generation]** Ability to inject custom kneeboards
* **[Options]** Extend option (so it can be disabled when fixed in DCS) to force air-starts (except for the slots that work) at Ramon Airbase, similar to the Nevatim fix in Retribution 1.3.0
* **[Options]** New option in Settings: Default start type for Player flights.
* **[AirWing]** Expose OPFOR Squadrons, giving the ability to change liveries, auto-assignable mission types & an easy way to retrieve debug information.
* **[ATO]** Allow planning as OPFOR
* **[Campaign Design]** Support for latest maps (Kola, Afghanistan, Iraq)
* **[UI]** Zoom level retained when switching campaigns
* **[UX]** Allow changing squadrons in flight's edit dialog
* **[Cheats]** Sink/Resurrect carriers instead of showing an error during cheat-capture (use AWCD-cheat to add squadrons upon resurrection)
* **[UI/UX]** Allow changing conditions such as Time, Date & Weather
* **[Modding]** Added support for Su-15 Flagon mod (v1.0)
* **[Plugins]** Support for Carsten's Arty Spotter script
* **[Plugins]** Support for MBot's Call Artillery script (using on-map artillery)
* **[Modding]** Added support for SK-60 mod (v1.2.1)
* **[Mission Generation]** Introducing the Armed Recon flight plan, i.e. CAS against any Theater Ground Object
* **[Doctrine]** Ability to customize the startup time allocated to the player
* **[Mission Generation]** Ability to choose whether player flights can spawn on the sixpack or not
* **[Options]** New options in Mission Generator section: Limit AI radio callouts & Suppress AI radio callouts.
* **[Options]** New option to use the combat landing flag in the landing waypoint task for helicopters.
* **[UI/UX]** Sync package waypoints when primary flight's waypoints are updated and recreate other flights within the package to ensure JOIN, INGRESS & SPLIT are synced
* **[UI/UX]** Allow changing loadout on flight creation
* **[UI]** Display TOT for all waypoints in the flight plan
* **[UI]** Edit basic datalink properties for applicable aircraft
* **[Mission Generation]** Automatic datalink network setup for applicable aircraft (_should_ in theory avoid the need to re-save the mission)
* **[Options]** New option to force-enable deck-crew for super-carriers on dedicated server.
* **[Mission Generation]** Enable Supercarrier's LSO & Airboss stations
* **[UX]** Default settings are now loaded from Default.zip
* **[Autoplanner]** Plan Air-to-Air Escorts for AWACS & Tankers
* **[Package Planning]** Ability to plan recovery tanker flights
* **[Modding]** Support for Bandit's cloud presets mod (v15)
* **[UX]** Reduce size of save-file by loading landmap data on the fly, which also implies no new campaign needs to be started to benefit from an updated landmap
* **[New Game Wizard]** Ability to save an edited faction during new game creation
* **[Options]** New option to make AI helicopters prefer vertical takeoff and landing
* **[Campaign Design/Mission Generation]** Introduction of "rebel zones" which randomly spawn units according to the campaign's definitions.
* **[Mission Generation]** Missile sites now fire at random times instead of all at the beginning of the mission
* **[Modding]** Support for CurrentHill's Chinese Asset Pack (v1.1.4)
* **[Modding]** Updated support for CurrentHill's Swedish Asset Pack (v1.1.0)
* **[Modding]** Support for CurrentHill's Russian Asset Pack (v1.2.0)
* **[Modding]** Support for CurrentHill's USA Asset Pack (v1.1.5)
* **[Modding]** Update CJS Super Hornet to 2.4.2
* **[Modding]** Support for Cowboy's E-7A Wedgetail mod (Supports EW Script Offensive Jamming)
* **[Modding]** Support for szcz's MiG-31BM (v2.0)
* **[Plugins]** Added initial AI support for EW Script 2.0
* **[Options]** Ability to configure certain forced-options via a file (WIP: https://github.com/dcs-retribution/dcs-retribution/issues/490).
## Fixes
* **[UI/UX]** A-10A flights can be edited again
* **[Mission Generation]** IADS bug sometimes triggering "no skynet usable units" error during mission generation
* **[New Game Wizard]** Campaign errors show a dialog again and avoid CTDs
* **[UI]** Landmap wasn't updating when switching to a different theater
* **[Mission Results Processor]** Squadrons of a sunken carrier are now disbanded
* **[Mission Generation]** Introduced option to switch alt-type to AMSL during mission generation to avoid helicopters wanting to submerge over certain parts of the sea.
# Retribution v1.3.1
#### Note: Re-save your missions in DCS' Mission Editor to avoid possible crashes due to datalink (usually the case when F-16C blk50s are used) when hosting missions on a dedicated server.
## Fixes
* **[UX]** Fix save-compatibility issue
* **[UX]** Avoid crash on startup due to incompatible save
# Retribution v1.3.0
#### Note: Re-save your missions in DCS' Mission Editor to avoid possible crashes due to datalink (usually the case when F-16C blk50s are used) when hosting missions on a dedicated server.
## Features/Improvements
* **[Engine]** Support for DCS v2.9.3.51704
* **[Package Planning]** Option to "Auto-Create" package
* **[Modding]** Custom weapons injection system (definition in aircraft's yaml file)
* **[Payload Editor]** Ability to save/back-up payloads
* **[Options]** New option in Settings: CAS engagement range (nmi)
* **[Options]** New option in Settings: Convert untasked OPFOR aircraft into client slots
* **[Options]** Split the **Disable idle aircraft at airfields** setting into **Disable untasked BLUFOR aircraft at airfields** and **Disable untasked OPFOR aircraft at airfields**
* **[Options]** Split off the **Automatic AWACS package planning** and **Automatic Theater tanker package planning** settings from **Automatic package planning behavior** so players can choose to have AWACS and theater tankers auto-planned, while managing everything else themselves
* **[Modding]** Updated support for Su-30 mod to V2.7.3 Beta
* **[Modding]** Updated support for Su-57 mod to build-04
* **[Modding]** Updated support for F-4B/C Phantom mod to 2.8.7.204
* **[Modding]** Updated Community A-4E-C mod version support to 2.2.0 release.
* **[Modding]** Added F/A-18E/F Super Hornet AI Tanker mod support (Chiller Juice Studios SuperBug Tanker AI version 1.4)
* **[Modding]** Added VSN Super Étendard mod support (v2.5.5)
* **[Modding]** Added F9F Panther mod support (version v2.8.7.101)
* **[Modding]** Updated Irondome support to IDF Assets Pack V1.1, adding support for the David's Sling
* **[Radios]** Added HF-FM band for AN/ARC-222
* **[Radios]** Ability to define preset channels for radios on squadron level (for human pilots only)
* **[Mission Planning]** Avoid helicopters being assigned as escort to planes and vice-versa
* **[Mission Planning]** Allow attack helicopters to escort other helicopters
* **[UI]** Allow changing waypoint names in FlightEdit's waypoints tab
* **[Waypoints]** Allow user to add navigation waypoints where possible without degrading to a custom flight-plan
* **[Campaign Management]** Improve squadron retreat logic to account for parking-slot sizes
* **[Autoplanner]** Support for auto-planning Air Assaults
* **[UI]** Improved frequency selector to support all modeled bands for every aircraft's intra-flight radio
* **[Options]** New options in Settings: Helicopter waypoint altitude (feet AGL) for combat & cruise waypoints
* **[Options]** New options in Settings: Spawn ground power trucks at ground starts in airbases/roadbases
* **[Options]** Option for hiding TGOs (with IADS roles) on MFD
* **[Plugins]** Splash Damage 2.1 with Clusters and Ship Radar effects.
* **[COMMs]** Aircraft-specific callsigns will now also be used.
* **[COMMs]** Ability to set a specific callsign to a flight.
* **[Mission Generator]** Channel terrain fix on exclusion zones, sea zones and inclusion zones
* **[Options]** Cheat-option for accessing Air Wing Config Dialog after campaign start (re-initializes turn if applied, thus plan your mission ___after___ making changes)
* **[Options]** Option to enable unlimited fuel for AI (player and non-player flights)
* **[Mission Generator]** F-15E Strike targets are automatically added as Mission Set 1
* **[Mission Generator]** Set F-14's IP waypoint according to the flight-plan's ingress point
* **[Mission Generator]** Automatically de-spawn aircraft when arrival/divert is an off-map spawn
* **[Options]** Option to de-spawn AI flights in the air if their start-type was manually set to In-Flight
* **[Campaign Design]** Ability to add separate ground spawns for C-130 and other large aircraft to campaigns.
* **[Config]** Preference setting to use custom Liberation payloads instead of prioritizing Retribution's default
* **[Config]** Preference setting to configure the server-port on which Retribution's back-end will run
* **[Options]** Made AI jettisoning empty fuel tanks optional (disabled by default)
* **[Options]** Add option (so it can be disabled when fixed in DCS) to force air-starts (except for the slots that work) at Nevatim due to https://forum.dcs.world/topic/335545-29-nevatim-ramp-starts-still-bugged/
* **[Cheat]** Add cheat option to manually manage REDFOR's TGOs
* **[UX]** Buy/Replace TGOs for free before the campaign has started
* **[Data]** Ability to define "cruise" & "combat" altitudes for airplanes
* **[Options]** Option to randomize altitudes for flights with airplanes
* **[Options]** Options to configure/override maximum mission distance for airplanes & helicopters
## Fixes
* **[Mission Generation]** Anti-ship strikes should use "group attack" in their attack-task
* **[New Game Wizard]** Faction selection overview doesn't update when inverting map
* **[New Game Wizard]** Aircraft mods are now handled better when they are disabled
* **[Payloads]** Added/Updated (missing) payloads
* **[Aircraft Tasking]** Revised aircraft tasking, filtering out incompatible tasks for several aircraft
* **[Data]** Corrected the class of the USS Samuel Chase from Logistics to LandingShip, in order to prevent it being spawned as part of AAA sites.
* **[Mission Generation]** Helicopters oscillating due to over-speeding
* **[Mission Generation]** Fix infinite loop when using "Fast-Forward to first contact"
* **[Capture Logic]** Release all parking slots when an airbase is captured
* **[Modding]** Swedish Military Assets Pack air defence presets are now correctly removed from the faction when the mod is disabled.
* **[Mission Generation]** Naval aircraft not always returning to carrier
* **[Mission Generation]** AI AirLift aircraft crashing into terrain due to insufficient waypoints
* **[Mission Generation]** Fix friendly AI shooting at fires on the front-line
# Retribution v1.2.1 (hotfix)
## Fixes
* **[Flight Plans]** SEAD Sweep not being auto-planned
* **[Modding]** Python-4 no longer overwrites AIM-9X
* **[Modding]** Restore original amount of pylons to F-16C when "ejecting" sufa mod
# Retribution v1.2.0
## Features/Improvements
* **[Preset Groups]** Add SA-2 with ZSU-23/57
* **[Campaign Design]** Ability to define almost all possible settings in the campaign's yaml file.
* **[Campaign Design]** Ability to add roadbases and/or ground spawns to campaigns.
* **[Campaign Design]** Ability to define SCENERY REMOVE OBJECTS ZONE triggers with the roadbase objects in campaign miz. This might not work reliably in multiplayer due to DCS issues. FARPs can be used to remove scenery objects in multiplayer.
* **[Options]** Implemented an option in settings to disable the above SCENERY REMOVE OBJECTS ZONE triggers.
* **[Campaign Management]** Improved squadron retreat logic at longer ranges.
* **[Options]** Ability to load & save your settings.
* **[Options]** Added a separate Doctrine page in settings with the following new options:
* Minimum number of aircraft for autoplanner to plan OCA packages against
* Airbase threat range (nmi)
* SEAD Sweep threat buffer distance (nmi)
* SEAD Escort/Sweep threat buffer distance (nmi)
* TARCAP threat buffer distance (nmi)
* AEW&C threat buffer distance (nmi)
* Theater tanker threat buffer distance (nmi)
* **[Options]** Improved the option to configure OPFOR autoplanner aggressiveness. The AI might now take even more risks and plan missions against defended targets.
* **[Options]** Added three new options in Settings:
* Autoplanner plans refueling flights for Strike packages
* Autoplanner plans refueling flights for OCA packages
* Autoplanner plans refueling flights for DEAD packages
* **[UI]** Added fuel selector in flight's edit window.
* **[Plugins]** Expose Splash Damage's "game_messages" option and set its default to false.
* **[Mission Generation]** Improved AI SEAD capabilities, allowing for mixed loadouts using Decoys, ARMs & ASMs.
* **[Modding]** Support for A-7E Corsair II (presumed latest available version)
* **[Squadrons]** Added many new squadron's by Adecarcer
* **[Plugins]** Updated 'expl_table' in Splash Damage script.
* **[Mission Generation]** Also save kneeboards in txt-format, found under "kneeboards" within Retribution's installation folder after pressing take-off.
* **[Modding]** Support for SW mod v2.55
* **[Modding]** Support for Spanish & Australian Naval Assets v3.2.0 by desdemicabina
* **[Modding]** Support for Iron Dome v1.2 by IDF Mods Project
* **[New Game Wizard]** Re-organized generator options & show the regular settings menu instead of the limited "Difficulty & Automation" page.
* **[Campaign Management]** Ability to operate harriers from FOBs/FARPs for <ins>__human pilots only__</ins>. Please note that the autoplanner won't generate flights for harriers at FOBs/FARPs, which means you need to plan your missions manually.
* **[Mission Planning]** Allow NAV/REFUEL/DIVERT waypoints to be deleted without degrading to a custom flight-plan, also warning the user before actually degrading the flight-plan.
* **[Campaign Generation]** Split "full-strength start" from "squadron aircraft limits" option.
* **[Mission Generation]** General improvement w.r.t. DCS tasking, including a check for incompatible tasking.
* **[Mission Generation]** OCA-Runway flights will remain at altitude when using guided bombs.
* **[UX]** Added error message to indicate save-compatibility issues + fix to avoid total crash upon loading of last save.
* **[UI]** Improved parking space information in air wing configuration dialog.
* **[Squadrons]** Warning messages when opening up a squadron through the air wing dialog, indicating squadrons that potentially won't fit w.r.t. parking space.
* **[Squadrons Transfers]** Determine number of available parking slots more accurately w.r.t. squadron transfers, taking aircraft dimensions into account which should prevent forced air-starts.
* **[UX]** Allow usage of CTRL/SHIFT modifiers in ground unit transfer window.
* **[Campaign Design]** Ability to define "spawn-routes" for convoys, allowing them to start from the road without having to edit the mission
* **[Plugins]** Added "DCS Dismount" plugin.
* **[Plugins]** Added "EWR Jammer" plugin (only for humans, may change in the future).
* **[Campaign]** New campaign (Operation Desert Sabre) by Chimiste
* **[Plugins]** Updated CTLD to latest released version
* **[Options]** Renamed Maximum frontline length -> Maximum frontline width.
* **[Squadrons]** Add livery selector in Squadron Dialog, allowing you to change the livery during the campaign.
* **[New Game Wizard]** Automatically invert factions when 'Invert Map' is selected.
* **[Flight Plans]** Added "SEAD Sweep" flight plan, which basically reintroduces the legacy "SEAD Escort" flight plan where the flight will engage whatever it can find without actually escorting the primary flight.
* **[Flight Plans]** Added SEAD capability to F-16A MLU and SEAD Escort & SEAD to F-16A.
* **[Mission Generation]** Spawn unused helicopters or LHA-capable aircraft at helipads at FOBs
* **[Modding]** Support for F-15I Ra'am v1.0 by IDF Mods Project
## Fixes
* **[New Game Wizard]** Settings would not persist when going back to a previous page (obsolete due to overhaul).
* **[Mission Generation]** Unused aircraft are no longer claimed, fixing a bug where these aircraft would no longer be available after aborting the mission.
* **[Mission Generation]** Fixed (potential) bug in helipad assignments at FOBs/FARPs.
* **[Mission Generation]** Fix AI immediately returning to base when forced to air-start due to insufficient parking space.
* **[Modding]** Fixed a bug where F-16Ds were not correctly removed from the faction when the F-16I/F-16D mod was not selected
* **[UI]** Fixed F-16A MLU icon and banner.
# Retribution v1.1.1 (hotfix)
## Features/Improvements
* **[Modding]** Support for IDF Mod Project F-16I Sufa & F-16D v3.6 mod
* **[Modding]** Support for JAS-39 Gripen v1.8.5-beta mod
## Fixes
* **[Plugins]** Fix bug where changes to plugin options doesn't do anything.
* **[Campaign Management]** Fix bug in procurement when no squadrons are present.
* **[Layouts]** Fix edge-case bug layout's group size.
* **[Campaign Design]** Preset groups assigned to specific TGOs not working as intended.
# Retribution v1.1.0
## Features/Improvements
* **[Mission Generation]** Given a CAS flight was planned, delay ground force attack until first CAS flight is on station
@@ -32,6 +304,7 @@
* **[Campaign Management]** New options to allow more control of randomized flight sizes (applicable for BARCAP/CAS/OCA/ANTI-SHIP).
* **[Plugins]** Updated Splash Damage script to v2.0 by RotorOps.
* **[Mission Generation]** Improvements to DEAD & STRIKE flights, allowing AI to handle a larger variety of weapons.
* **[Campaign]** New campaign (1968 Yankee Station) by Adecarcer
## Fixes
* **[UI]** Removed deprecated options
@@ -44,12 +317,11 @@
* **[Modding]** Fixed conflicts caused by HDS units
* **[UX]** Gracefully handle corrupted preferences file.
* **[Mission Generation]** Aircraft not using decoys during SEAD.
* **[Campaign]** New campaign (1968 Yankee Station) by Adecarcer
# Retribution 1.0.1 (hotfix)
# Retribution v1.0.1 (hotfix)
* **[Mission Generation]** Fix serialization issue when STRIKE flight has no escorts
# Retribution 1.0.0
# Retribution v1.0.0
## Features/Improvements
* **[Engine]** Support for DCS v2.8.1.34437.
@@ -88,7 +360,92 @@ BAI/ANTISHIP/DEAD/STRIKE/BARCAP/CAS/OCA/AIR-ASSAULT (main) missions
* **[Mission Generation]** Kneeboard STRIKE coordinates would sometimes get clipped when not fitting.
* **[UI]** Fix exception when trying to add a waypoints to a flightplan.
# Liberation:
## Features/Improvements
* **[Data]** Added support for the ARA Veinticinco de Mayo.
* **[Data]** Changed display name of the AI-only F-15E Strike Eagle for clarity.
* **[Flight Planning]** Improved IP selection for targets that are near the center of a threat zone.
* **[Flight Planning]** Moved CAS ingress point off the front line so that the AI begins their target search earlier.
* **[Flight Planning]** Loadouts and aircraft properties can now be set per-flight member. Warning: AI flights should not use mixed loadouts.
* **[Flight Planning]** Laser codes that are pre-assigned to weapons at mission start can now be chosen from a list in the loadout UI. This does not affect the aircraft's TGP, just the weapons. Currently only implemented for the F-15E S4+ and F-16C.
* **[Mission Generation]** Configured target and initial points for F-15E S4+.
* **[Modding]** Factions can now specify the ship type to be used for cargo shipping. The Handy Wind will be used by default, but WW2 factions can pick something more appropriate.
* **[Modding]** Unit variants can now set a display name separate from their ID.
* **[UI]** An error will be displayed when invalid fast-forward options are selected rather than beginning a never ending simulation.
* **[UI]** Added cheats for instantly repairing and destroying runways.
* **[UI]** Improved usability of the flight properties UI. It now shows human-readable names and uses more appropriate UI elements.
* **[UI]** The map now shows the real front line bounds.
## Fixes
* **[Campaign]** Fixed error when canceling squadron transfer if the current location would be exactly full.
* **[Data]** Fixed the class of the Samuel Chase so it can't be picked for a AAA or SHORAD site.
* **[Data]** Allow CH-47D, CH-53E and UH-60A to operate from carriers and LHAs.
* **[Data]** Added the F-15E's LANTIRN to the list of known targeting pods. Player F-15E flight with TGPs will now be assigned laser codes.
* **[Flight Planning]** Patrolling flight plans (CAS, CAP, refueling, etc) now handle TOT offsets.
* **[Mission Generation]** Restored previous AI behavior for anti-ship missions. A DCS update caused only a single aircraft in a flight to attack. The full flight will now attack like they used to.
* **[Mission Generation]** Fix generation of OCA Runway missions to allow LGBs to be used.
* **[Mission Generation]** Fixed AI flights flying far too slowly toward NAV points.
* **[Mission Generation]** Fixed "division by zero" error on mission generation when a flight has an "In-Flight" start type and starts on top of a mission waypoint.
* **[Modding]** Unit variants can now actually override base unit type properties.
* **[Plugins]** Fixed Lua errors in Skynet plugin that would occur whenever one coalition had no IADS nodes.
* **[UI]** Fixed deleting waypoints in custom flight plans deleting the wrong waypoint.
* **[UI]** Fixed flight properties UI to support F-15E S4+ laser codes.
* **[UI]** Fixed UI bug where altering an "ahead of package" TOT offset would change the offset back to a "behind pacakge" offset.
* **[UI]** Fixed bug where changing TOT offsets could result in flight startup times that are in the past.
* **[UI]** Flight plan paths are now drawn behind all other map elements, fixing rare cases where they could prevent other UI elements from being clickable.
# 8.1.0
Saves from 8.0.0 are compatible with 8.1.0
## Features/Improvements
* **[Engine]** Support for DCS 2.8.6.41363, including F-15E support.
* **[UI]** Flight loadout/properties tab is now scrollable.
## Fixes
* **[Campaign]** Fixed liveries for premade squadrons all being off-by-one.
* **[UI]** Fixed numbering of waypoints in the map and flight dialog (first waypoint is now 0 rather than 1).
# 8.0.0
Saves from 7.x are not compatible with 8.0.
## Features/Improvements
* **[Engine]** Support for DCS 2.8.6.41066, including the new Sinai map.
* **[UI]** Limited size of overfull airbase display and added scrollbar.
* **[UI]** Waypoint altitudes can be edited in Waypoints tab of Edit Flight window.
* **[UI]** Moved air wing and transfer menus to the toolbar to improve UI fit on low resolution displays.
* **[UI]** Added basic game over dialog.
## Fixes
* **[Campaign]** Fix bug introduced in 7.0 where map strike target deaths are no longer tracked.
* **[Mission Generation]** Fix crash during mission generation caused by out of date DCS data for the Gazelle.
* **[Mission Generation]** Fix crash during mission generation when DCS beacon data is inconsistent.
# 7.1.0
Saves from 7.0.0 are compatible with 7.1.0
## Features/Improvements
* **[Factions]** Replaced Patriot STRs "EWRs" with AN/FPS-117 for blue factions 1980 or newer.
* **[Mission Generation]** Added option to prevent scud and V2 sites from firing at the start of the mission.
* **[Mission Planning]** Per-flight TOT offsets can now be set in the flight details UI. This allows individual flights to be scheduled ahead of or behind the rest of the package.
* **[UI]** Waypoint altitudes can be edited in Waypoints tab of Edit Flight window.
* **[UI]** Parking capacity of each squadron's base is now shown during air wing configuration to avoid overcrowding bases when beginning the game with full squadrons.
## Fixes
* **[Mission Planning]** BAI is once again plannable against missile sites and coastal defense batteries.
* **[UI]** Fixed formatting of departure time in flight details dialog.
# 7.0.0
Saves from 6.x are not compatible with 7.0.
@@ -97,15 +454,47 @@ Saves from 6.x are not compatible with 7.0.
* **[Engine]** Support for DCS 2.8.3.37556.
* **[Engine]** Saved games are now a zip file of save assets for easier bug reporting. The new extension is .liberation.zip. Drag and drop that file into bug reports.
* **[Campaign]** Added options to limit squadron sizes and to begin all squadrons at maximum strength. Maximum squadron size is defined during air wing configuration with default values provided by the campaign.
* **[Campaign]** Added handling for more DCS death events. This probably does not catch any deaths that weren't previously tracked, but it should record them sooner, which will improve results for game crashes or other early exits.
* **[Campaign AI]** The campaign AI now prefers fulfilling missions with squadrons which have a matching primary task. Previously distance from target held a stronger influence than task preference. Primary tasks for squadrons are set by campaign designers but are user-configurable.
* **[Flight Planning]** Package TOT and composition can be modified after advancing time in Liberation.
* **[Mission Generation]** Units on the front line are now hidden on MFDs.
* **[Mission Generation]** Preset radio channels will now be configured for both A-10C modules.
* **[Mission Generation]** Both A-10C modules now use separate radios for inter- and intra-flight comms (similar to other modern aircraft).
* **[Mission Generation]** The A-10C II now uses separate radios for inter- and intra-flight comms (similar to other modern aircraft).
* **[Mission Generation]** Wind speeds no longer follow a uniform distribution. Median wind speeds are now much lower and the standard deviation has been reduced considerably at altitude but increased somewhat at MSL.
* **[Mission Generation]** Improved task generation for SEAD flights carrying TALDs.
* **[Mission Generation]** Added task timeout for SEAD flights with TALDs to prevent AI from overflying the target.
* **[Modding]** Updated Community A-4E-C mod version support to 2.1.0 release.
* **[Modding]** Add support for VSN F-4B and F-4C mod.
* **[Modding]** Aircraft task capabilities and preferred aircraft for each task are now moddable in the aircraft unit yaml files. Each aircraft has a weight per task. Higher weights are given higher preference.
* **[Modding]** The `mission_types` field in squadron files has been removed. Squadron task capability is now determined by airframe, and the auto-assignable list has always been overridden by the campaign settings.
* **[Modding]** Wind speed generation inputs are now moddable. See https://dcs-liberation.rtfd.io/en/latest/modding/weather.html.
* **[New Game Wizard]** Choices for some options will be remembered for the next new game. Not all settings will be preserved, as many are campaign dependent.
* **[New Game Wizard]** Lua plugins can now be set while creating a new game.
* **[New Game Wizard]** Squadrons can be directly replaced with a preset during air wing configuration rather than needing to remove and create a new squadron.
* **[New Game Wizard]** Squadron liveries can now be selected during air wing configuration.
* **[Squadrons]** Squadron-specific mission capability lists no longer restrict players from assigning missions outside the squadron's preferences.
* **[New Game Wizard]** Squadrons can be directly replaced with a preset during air wing configuration rather than needing to remove and create a new squadron.
* **[UI]** The orientation of objects like SAMs, EWRs, garrisons, and ships can now be manually adjusted.
## Fixes
* **[Campaign]** Fixed a longstanding bug where oversized airlifts could corrupt a save with empty convoys.
* **[Campaign]** Aircraft with built-in TGPs but without an external pod will no longer degrade automatic loadouts to iron bombs.
* **[Engine]** Fixed crash in startup caused by a corrupted Liberation preferences file.
* **[Flight Planning]** AEW&C missions are now plannable over FOBs and LHAs.
* **[Flight Planning]** BAI is no longer plannable against buildings.
* **[Modding]** Fixed an issue where Falklands campaigns created or edited with new versions of DCS could not be loaded.
* **[Modding]** Fixed decoding of campaign yaml files to use UTF-8 rather than the system locale's default. It's now possible to use "Bf 109 K-4 Kurfürst" as a preferred aircraft type.
* **[Mission Generation]** Planes will no longer spawn in helipads that are not also designated for fixed wing parking.
* **[Mission Generation]** Potentially an issue where ground war planning game state could become corrupted, preventing mission generation.
* **[Mission Generation]** Refueling tasks will now only be created for flights that have a tanker in their package.
* **[Mission Generation]** Fixed missing Tanker task on recovery tanker missions.
* **[UI]** Fixed error when resetting air wing configuration during game setup.
* **[UI]** Fixed flight plan recreation when changing mission type with "Recreate as" flight options.
* **[UI]** Fixed failure to launch UI when Liberation persistent preferences file was corrupt.
# 6.1.1
## Fixes

29437
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,26 +6,26 @@
"license": "LGPL-3.0-or-later",
"homepage": ".",
"dependencies": {
"@reduxjs/toolkit": "^1.8.5",
"@testing-library/jest-dom": "^5.16.5",
"@reduxjs/toolkit": "^1.9.7",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/react-redux": "^7.1.24",
"axios": "^1.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.26",
"@types/react": "^18.2.69",
"@types/react-dom": "^18.2.22",
"@types/react-redux": "^7.1.33",
"axios": "^1.7.4",
"electron-window-state": "^5.0.3",
"esri-leaflet": "^3.0.8",
"leaflet": "^1.9.2",
"esri-leaflet": "^3.0.12",
"leaflet": "^1.9.4",
"leaflet-ruler": "^1.0.0",
"milsymbol": "^2.0.0",
"milsymbol": "^2.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-esri-leaflet": "^2.0.1",
"react-leaflet": "^4.1.0",
"react-redux": "^8.0.4",
"react-leaflet": "^4.2.1",
"react-redux": "^8.1.3",
"redux-logger": "^3.0.6",
"typescript": "~4.8.4"
},
@@ -61,19 +61,27 @@
]
},
"devDependencies": {
"@rtk-query/codegen-openapi": "^1.0.0",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@types/leaflet": "^1.8.0",
"@types/redux-logger": "^3.0.9",
"@types/websocket": "^1.0.5",
"electron": "^21.1.0",
"@rtk-query/codegen-openapi": "^1.2.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/leaflet": "^1.9.8",
"@types/redux-logger": "^3.0.13",
"@types/websocket": "^1.0.10",
"electron": "^28.3.2",
"electron-is-dev": "^2.0.0",
"generate-license-file": "^2.0.0",
"got": "^11.8.5",
"identity-obj-proxy": "^3.0.0",
"license-checker": "^25.0.1",
"nth-check": "^2.0.1",
"nth-check": "^2.1.1",
"react-scripts": "5.0.1",
"ts-node": "^10.9.1",
"wait-on": "^6.0.1"
"ts-node": "^10.9.2",
"wait-on": "^7.2.0"
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!(@?react-leaflet|axios)/)"
],
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
}
}
}

View File

@@ -1,11 +1,11 @@
import App from "./App";
import { store } from "./app/store";
import { setupStore } from "./app/store";
import { render } from "@testing-library/react";
import { Provider } from "react-redux";
test("app renders", () => {
render(
<Provider store={store}>
<Provider store={setupStore()}>
<App />
</Provider>
);

View File

@@ -50,14 +50,6 @@ const injectedRtkApi = api.injectEndpoints({
url: `/debug/waypoint-geometries/hold/${queryArg.flightId}`,
}),
}),
getDebugIpZones: build.query<
GetDebugIpZonesApiResponse,
GetDebugIpZonesApiArg
>({
query: (queryArg) => ({
url: `/debug/waypoint-geometries/ip/${queryArg.flightId}`,
}),
}),
getDebugJoinZones: build.query<
GetDebugJoinZonesApiResponse,
GetDebugJoinZonesApiArg
@@ -245,11 +237,6 @@ export type GetDebugHoldZonesApiResponse =
export type GetDebugHoldZonesApiArg = {
flightId: string;
};
export type GetDebugIpZonesApiResponse =
/** status 200 Successful Response */ IpZones;
export type GetDebugIpZonesApiArg = {
flightId: string;
};
export type GetDebugJoinZonesApiResponse =
/** status 200 Successful Response */ JoinZones;
export type GetDebugJoinZonesApiArg = {
@@ -379,12 +366,6 @@ export type HoldZones = {
permissibleZones: LatLng[][][];
preferredLines: LatLng[][];
};
export type IpZones = {
homeBubble: LatLng[][];
ipBubble: LatLng[][];
permissibleZone: LatLng[][];
safeZones: LatLng[][][];
};
export type JoinZones = {
homeBubble: LatLng[][];
targetBubble: LatLng[][];
@@ -426,6 +407,7 @@ export type Tgo = {
detection_ranges: number[];
dead: boolean;
sidc: string;
task?: string[];
};
export type SupplyRoute = {
id: string;
@@ -484,6 +466,7 @@ export type Game = {
navmeshes: NavMeshes;
map_center?: LatLng;
unculled_zones: UnculledZone[];
map_zones: MapZones;
};
export type MapZones = {
inclusion: LatLng[][][];
@@ -497,7 +480,6 @@ export const {
useSetControlPointDestinationMutation,
useClearControlPointDestinationMutation,
useGetDebugHoldZonesQuery,
useGetDebugIpZonesQuery,
useGetDebugJoinZonesQuery,
useListFlightsQuery,
useGetFlightByIdQuery,

View File

@@ -30,11 +30,6 @@ export const liberationApi = _liberationApi.enhanceEndpoints({
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
getDebugIpZones: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
getDebugJoinZones: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },

View File

@@ -0,0 +1,34 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { createSlice } from "@reduxjs/toolkit";
import { MapZones } from "./_liberationApi";
interface MapZonesState {
mapZones: MapZones;
}
const initialState: MapZonesState = {
mapZones: { inclusion: [], exclusion: [], sea: [] },
};
const mapZonesSlice = createSlice({
name: "map",
initialState: initialState,
reducers: {},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
if (action.payload != null) {
state.mapZones.exclusion = action.payload.map_zones.exclusion;
state.mapZones.inclusion = action.payload.map_zones.inclusion;
state.mapZones.sea = action.payload.map_zones.sea;
}
});
builder.addCase(gameUnloaded, (state) => {
state.mapZones = initialState.mapZones;
});
},
});
export const selectMapZones = (state: RootState) => state.mapZones;
export default mapZonesSlice.reducer;

View File

@@ -3,36 +3,50 @@ import combatReducer from "../api/combatSlice";
import controlPointsReducer from "../api/controlPointsSlice";
import flightsReducer from "../api/flightsSlice";
import frontLinesReducer from "../api/frontLinesSlice";
import iadsNetworkReducer from "../api/iadsNetworkSlice";
import mapReducer from "../api/mapSlice";
import navMeshReducer from "../api/navMeshSlice";
import supplyRoutesReducer from "../api/supplyRoutesSlice";
import tgosReducer from "../api/tgosSlice";
import iadsNetworkReducer from "../api/iadsNetworkSlice";
import threatZonesReducer from "../api/threatZonesSlice";
import unculledZonesReducer from "../api/unculledZonesSlice";
import { Action, ThunkAction, configureStore } from "@reduxjs/toolkit";
import unculledZonesReducer from "../api/unculledZonesSlice";
import mapZonesReducer from "../api/mapZonesSlice";
import {
Action,
PreloadedState,
ThunkAction,
combineReducers,
configureStore,
} from "@reduxjs/toolkit";
export const store = configureStore({
reducer: {
combat: combatReducer,
controlPoints: controlPointsReducer,
flights: flightsReducer,
frontLines: frontLinesReducer,
map: mapReducer,
navmeshes: navMeshReducer,
supplyRoutes: supplyRoutesReducer,
iadsNetwork: iadsNetworkReducer,
tgos: tgosReducer,
threatZones: threatZonesReducer,
[baseApi.reducerPath]: baseApi.reducer,
unculledZones: unculledZonesReducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(baseApi.middleware),
const rootReducer = combineReducers({
combat: combatReducer,
controlPoints: controlPointsReducer,
flights: flightsReducer,
frontLines: frontLinesReducer,
map: mapReducer,
navmeshes: navMeshReducer,
supplyRoutes: supplyRoutesReducer,
iadsNetwork: iadsNetworkReducer,
tgos: tgosReducer,
threatZones: threatZonesReducer,
[baseApi.reducerPath]: baseApi.reducer,
unculledZones: unculledZonesReducer,
mapZones: mapZonesReducer,
});
export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;
export function setupStore(preloadedState?: PreloadedState<RootState>) {
return configureStore({
reducer: rootReducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(baseApi.middleware),
preloadedState: preloadedState,
});
}
export type AppStore = ReturnType<typeof setupStore>;
export type AppDispatch = AppStore["dispatch"];
export type RootState = ReturnType<typeof rootReducer>;
export type AppThunk<ReturnType = void> = ThunkAction<
ReturnType,
RootState,

View File

@@ -0,0 +1,53 @@
import Aircraft from "./Aircraft";
import { render } from "@testing-library/react";
import { Icon } from "leaflet";
const mockMarker = jest.fn();
jest.mock("react-leaflet", () => ({
Marker: (props: any) => {
mockMarker(props);
},
}));
test("grounded aircraft do not render", async () => {
const { container } = render(
<Aircraft
flight={{
id: "",
blue: true,
position: undefined,
sidc: "",
waypoints: [],
}}
/>
);
expect(container).toBeEmptyDOMElement();
});
test("in-flight aircraft render", async () => {
render(
<Aircraft
flight={{
id: "",
blue: true,
position: {
lat: 10,
lng: 20,
},
sidc: "foobar",
waypoints: [],
}}
/>
);
expect(mockMarker).toHaveBeenCalledWith(
expect.objectContaining({
position: {
lat: 10,
lng: 20,
},
icon: expect.any(Icon),
})
);
});

View File

@@ -1,10 +1,10 @@
import { Flight } from "../../api/liberationApi";
import { Icon, Point } from "leaflet";
import { Symbol } from "milsymbol";
import ms from "milsymbol";
import { Marker } from "react-leaflet";
function iconForFlight(flight: Flight) {
const symbol = new Symbol(flight.sidc, {
const symbol = new ms.Symbol(flight.sidc, {
size: 20,
});

View File

@@ -0,0 +1,53 @@
import { renderWithProviders } from "../../testutils";
import AircraftLayer from "./AircraftLayer";
import { PropsWithChildren } from "react";
const mockLayerGroup = jest.fn();
const mockMarker = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Marker: (props: any) => {
mockMarker(props);
},
}));
test("layer is empty by default", async () => {
renderWithProviders(<AircraftLayer />);
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockMarker).not.toHaveBeenCalled();
});
test("layer has aircraft if non-empty", async () => {
renderWithProviders(<AircraftLayer />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
position: {
lat: 0,
lng: 0,
},
},
bar: {
id: "bar",
blue: false,
sidc: "",
position: {
lat: 0,
lng: 0,
},
},
},
selected: null,
},
},
});
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockMarker).toHaveBeenCalledTimes(2);
});

View File

@@ -0,0 +1,149 @@
import { renderWithProviders } from "../../testutils";
import AirDefenseRangeLayer, { colorFor } from "./AirDefenseRangeLayer";
import { PropsWithChildren } from "react";
const mockLayerGroup = jest.fn();
const mockCircle = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Circle: (props: any) => {
mockCircle(props);
},
}));
describe("colorFor", () => {
it("has a unique color for each configuration", () => {
const params = [
[false, false],
[false, true],
[true, false],
[true, true],
];
var colors = new Set<string>();
for (const [blue, detection] of params) {
colors.add(colorFor(blue, detection));
}
expect(colors.size).toEqual(4);
});
});
describe("AirDefenseRangeLayer", () => {
it("draws nothing when there are no TGOs", () => {
renderWithProviders(<AirDefenseRangeLayer blue={true} />);
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockCircle).not.toHaveBeenCalled();
});
it("does not draw wrong range types", () => {
renderWithProviders(<AirDefenseRangeLayer blue={true} />, {
preloadedState: {
tgos: {
tgos: {
foo: {
id: "foo",
name: "Foo",
control_point_name: "Bar",
category: "AA",
blue: false,
position: {
lat: 0,
lng: 0,
},
units: [],
threat_ranges: [],
detection_ranges: [20],
dead: false,
sidc: "",
task: [],
},
},
},
},
});
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockCircle).not.toHaveBeenCalled();
});
it("draws threat ranges", () => {
renderWithProviders(<AirDefenseRangeLayer blue={true} />, {
preloadedState: {
tgos: {
tgos: {
foo: {
id: "foo",
name: "Foo",
control_point_name: "Bar",
category: "AA",
blue: true,
position: {
lat: 10,
lng: 20,
},
units: [],
threat_ranges: [10],
detection_ranges: [20],
dead: false,
sidc: "",
task: [],
},
},
},
},
});
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockCircle).toHaveBeenCalledWith(
expect.objectContaining({
center: {
lat: 10,
lng: 20,
},
radius: 10,
color: colorFor(true, false),
interactive: false,
})
);
});
it("draws detection ranges", () => {
renderWithProviders(<AirDefenseRangeLayer blue={true} detection />, {
preloadedState: {
tgos: {
tgos: {
foo: {
id: "foo",
name: "Foo",
control_point_name: "Bar",
category: "AA",
blue: true,
position: {
lat: 10,
lng: 20,
},
units: [],
threat_ranges: [10],
detection_ranges: [20],
dead: false,
sidc: "",
task: [],
},
},
},
},
});
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockCircle).toHaveBeenCalledWith(
expect.objectContaining({
center: {
lat: 10,
lng: 20,
},
radius: 20,
color: colorFor(true, true),
interactive: false,
})
);
});
});

View File

@@ -9,7 +9,7 @@ interface TgoRangeCirclesProps {
detection?: boolean;
}
function colorFor(blue: boolean, detection: boolean) {
export function colorFor(blue: boolean, detection: boolean) {
if (blue) {
return detection ? "#bb89ff" : "#0084ff";
}

View File

@@ -0,0 +1,132 @@
import { renderWithProviders } from "../../testutils";
import Combat from "./Combat";
import { LatLng } from "leaflet";
const mockPolyline = jest.fn();
const mockPolygon = jest.fn();
jest.mock("react-leaflet", () => ({
Polyline: (props: any) => {
mockPolyline(props);
},
Polygon: (props: any) => {
mockPolygon(props);
},
}));
describe("Combat", () => {
describe("footprint", () => {
it("is not interactive", () => {
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: null,
target_positions: null,
footprint: [[new LatLng(0, 0), new LatLng(0, 1), new LatLng(1, 0)]],
}}
/>
);
expect(mockPolygon).toBeCalledWith(
expect.objectContaining({ interactive: false })
);
});
// Fails because we don't handle multi-poly combat footprints correctly.
it.skip("renders single polygons", () => {
const boundary = [new LatLng(0, 0), new LatLng(0, 1), new LatLng(1, 0)];
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: null,
target_positions: null,
footprint: [boundary],
}}
/>
);
expect(mockPolygon).toBeCalledWith(
expect.objectContaining({ positions: boundary })
);
});
// Fails because we don't handle multi-poly combat footprints correctly.
it.skip("renders multiple polygons", () => {
const boundary = [new LatLng(0, 0), new LatLng(0, 1), new LatLng(1, 0)];
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: null,
target_positions: null,
footprint: [boundary, boundary],
}}
/>
);
expect(mockPolygon).toBeCalledTimes(2);
});
});
describe("lines", () => {
it("is not interactive", () => {
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: [new LatLng(1, 0)],
footprint: null,
}}
/>
);
expect(mockPolyline).toBeCalledWith(
expect.objectContaining({ interactive: false })
);
});
it("renders single line", () => {
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: [new LatLng(0, 1)],
footprint: null,
}}
/>
);
expect(mockPolyline).toBeCalledWith(
expect.objectContaining({
positions: [new LatLng(0, 0), new LatLng(0, 1)],
})
);
});
it("renders multiple lines", () => {
renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: [new LatLng(0, 1), new LatLng(1, 0)],
footprint: null,
}}
/>
);
expect(mockPolyline).toBeCalledTimes(2);
});
});
it("renders nothing if no footprint or targets", () => {
const { container } = renderWithProviders(
<Combat
combat={{
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: null,
footprint: null,
}}
/>
);
expect(container).toBeEmptyDOMElement();
});
});

View File

@@ -0,0 +1,48 @@
import { renderWithProviders } from "../../testutils";
import CombatLayer from "./CombatLayer";
import { LatLng } from "leaflet";
import { PropsWithChildren } from "react";
const mockPolyline = jest.fn();
const mockLayerGroup = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Polyline: (props: any) => {
mockPolyline(props);
},
}));
describe("CombatLayer", () => {
it("renders each combat", () => {
renderWithProviders(<CombatLayer />, {
preloadedState: {
combat: {
combat: {
foo: {
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: [new LatLng(0, 1)],
footprint: null,
},
bar: {
id: "foo",
flight_position: new LatLng(0, 0),
target_positions: [new LatLng(0, 1)],
footprint: null,
},
},
},
},
});
expect(mockPolyline).toBeCalledTimes(2);
});
it("renders LayerGroup but no contents if no combat", () => {
renderWithProviders(<CombatLayer />);
expect(mockLayerGroup).toBeCalledTimes(1);
expect(mockPolyline).not.toHaveBeenCalled();
});
});

View File

@@ -1,9 +1,9 @@
import { ControlPoint } from "../../api/_liberationApi";
import { Icon, Point } from "leaflet";
import { Symbol } from "milsymbol";
import ms from "milsymbol";
export const iconForControlPoint = (cp: ControlPoint) => {
const symbol = new Symbol(cp.sidc, {
const symbol = new ms.Symbol(cp.sidc, {
size: 24,
colorMode: "Dark",
});

View File

@@ -0,0 +1,52 @@
import { renderWithProviders } from "../../testutils";
import ControlPointsLayer from "./ControlPointsLayer";
import { LatLng } from "leaflet";
import { PropsWithChildren } from "react";
const mockMarker = jest.fn();
const mockLayerGroup = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Marker: (props: any) => {
mockMarker(props);
},
}));
describe("ControlPointsLayer", () => {
it("renders each control point", () => {
renderWithProviders(<ControlPointsLayer />, {
preloadedState: {
controlPoints: {
controlPoints: {
foo: {
id: "foo",
name: "Foo",
blue: true,
position: new LatLng(0, 0),
mobile: false,
sidc: "",
},
bar: {
id: "bar",
name: "Bar",
blue: false,
position: new LatLng(1, 0),
mobile: false,
sidc: "",
},
},
},
},
});
expect(mockMarker).toBeCalledTimes(2);
});
it("renders LayerGroup but no contents if no combat", () => {
renderWithProviders(<ControlPointsLayer />);
expect(mockLayerGroup).toBeCalledTimes(1);
expect(mockMarker).not.toHaveBeenCalled();
});
});

View File

@@ -0,0 +1,78 @@
import { renderWithProviders } from "../../testutils";
import CullingExclusionZones from "./CullingExclusionZones";
import { PropsWithChildren } from "react";
const mockCircle = jest.fn();
const mockLayerGroup = jest.fn();
const mockLayerControlOverlay = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
LayersControl: {
Overlay: (props: PropsWithChildren<any>) => {
mockLayerControlOverlay(props);
return <>{props.children}</>;
},
},
Circle: (props: any) => {
mockCircle(props);
},
}));
describe("CullingExclusionZones", () => {
it("is empty there are no exclusion zones", () => {
renderWithProviders(<CullingExclusionZones />);
expect(mockCircle).not.toHaveBeenCalled();
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockLayerControlOverlay).toHaveBeenCalledTimes(1);
});
describe("zone circles", () => {
it("are drawn in the correct locations", () => {
renderWithProviders(<CullingExclusionZones />, {
preloadedState: {
unculledZones: {
zones: [
{
position: {
lat: 0,
lng: 0,
},
radius: 10,
},
{
position: {
lat: 1,
lng: 1,
},
radius: 2,
},
],
},
},
});
expect(mockCircle).toHaveBeenCalledTimes(2);
expect(mockCircle).toHaveBeenCalledWith(
expect.objectContaining({
center: {
lat: 0,
lng: 0,
},
radius: 10,
})
);
expect(mockCircle).toHaveBeenCalledWith(
expect.objectContaining({
center: {
lat: 1,
lng: 1,
},
radius: 2,
})
);
});
it("are not interactive", () => {});
});
});

View File

@@ -30,18 +30,10 @@ const CullingExclusionCircles = (props: CullingExclusionCirclesProps) => {
export default function CullingExclusionZones() {
const data = useAppSelector(selectUnculledZones).zones;
var cez = <></>;
if (!data) {
console.log("Empty response when loading culling exclusion zones");
} else {
cez = (
<CullingExclusionCircles zones={data}></CullingExclusionCircles>
);
}
return (
<LayersControl.Overlay name="Culling exclusion zones">
{cez}
<CullingExclusionCircles zones={data}></CullingExclusionCircles>
</LayersControl.Overlay>
);
}

View File

@@ -1,7 +1,8 @@
import { Flight } from "../../api/liberationApi";
import { useGetCommitBoundaryForFlightQuery } from "../../api/liberationApi";
import WaypointMarker from "../waypointmarker";
import { ReactElement } from "react";
import { Polyline as LPolyline } from "leaflet";
import { ReactElement, useEffect, useRef } from "react";
import { Polyline } from "react-leaflet";
const BLUE_PATH = "#0084ff";
@@ -27,16 +28,44 @@ const pathColor = (props: FlightPlanProps) => {
function FlightPlanPath(props: FlightPlanProps) {
const color = pathColor(props);
const waypoints = props.flight.waypoints;
const polylineRef = useRef<LPolyline | null>(null);
// Flight paths should be drawn under everything else. There seems to be an
// issue where `interactive: false` doesn't do as its told (there's nuance,
// see the bug for details). It looks better if we draw the other elements on
// top of the flight plans anyway, so just push the flight plan to the back.
//
// https://github.com/dcs-liberation/dcs_liberation/issues/3295
//
// It's not possible to z-index a polyline (and leaflet says it never will be,
// because this is a limitation of SVG, not leaflet:
// https://github.com/Leaflet/Leaflet/issues/185), so we need to use
// bringToBack() to push the flight paths to the back of the drawing once
// they've been added to the map. They'll still draw on top of the map, but
// behind everything than was added before them. Anything added after always
// goes on top.
useEffect(() => {
if (props.selected) {
polylineRef.current?.bringToFront();
}
else {
polylineRef.current?.bringToBack();
}
});
if (waypoints == null) {
return <></>;
}
const points = waypoints
.filter((waypoint) => waypoint.include_in_path)
.map((waypoint) => waypoint.position);
return (
<Polyline
positions={points}
pathOptions={{ color: color, interactive: false }}
ref={polylineRef}
/>
);
}

View File

@@ -0,0 +1,409 @@
import { renderWithProviders } from "../../testutils";
import FlightPlansLayer from "./FlightPlansLayer";
import { PropsWithChildren } from "react";
const mockPolyline = jest.fn();
const mockLayerGroup = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Polyline: (props: any) => {
mockPolyline(props);
},
}));
// The waypoints in test data below should all use `should_make: false`. Markers
// need useMap() to check the zoom level to decide if they should be drawn or
// not, and we don't have good options here for mocking that behavior.
describe("FlightPlansLayer", () => {
describe("unselected flights", () => {
it("are drawn", () => {
renderWithProviders(<FlightPlansLayer blue={true} />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
bar: {
id: "bar",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: null,
},
},
});
// For some reason passing ref to PolyLine causes it and its group to be
// redrawn, so these numbers don't match what you'd expect from the test.
// It probably needs to be rewritten without mocks.
expect(mockPolyline).toHaveBeenCalledTimes(3);
expect(mockLayerGroup).toBeCalledTimes(2);
});
it("are not drawn if wrong coalition", () => {
renderWithProviders(<FlightPlansLayer blue={true} />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
bar: {
id: "bar",
blue: false,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: null,
},
},
});
expect(mockPolyline).toHaveBeenCalledTimes(1);
expect(mockLayerGroup).toBeCalledTimes(1);
});
it("are not drawn when only selected flights are to be drawn", () => {
renderWithProviders(<FlightPlansLayer selectedOnly />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: null,
},
},
});
expect(mockPolyline).not.toHaveBeenCalled();
expect(mockLayerGroup).toBeCalledTimes(1);
});
});
describe("selected flights", () => {
it("are drawn", () => {
renderWithProviders(<FlightPlansLayer blue={true} />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
bar: {
id: "bar",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: "foo",
},
},
});
expect(mockPolyline).toHaveBeenCalledTimes(2);
expect(mockLayerGroup).toBeCalledTimes(1);
});
it("are not drawn twice", () => {
renderWithProviders(<FlightPlansLayer blue={true} />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: true,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: "foo",
},
},
});
expect(mockPolyline).toHaveBeenCalledTimes(1);
expect(mockLayerGroup).toBeCalledTimes(1);
});
it("are not drawn if red", () => {
renderWithProviders(<FlightPlansLayer selectedOnly />, {
preloadedState: {
flights: {
flights: {
foo: {
id: "foo",
blue: false,
sidc: "",
waypoints: [
{
name: "",
position: {
lat: 0,
lng: 0,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
{
name: "",
position: {
lat: 1,
lng: 1,
},
altitude_ft: 0,
altitude_reference: "MSL",
is_movable: true,
should_mark: false,
include_in_path: true,
timing: "",
},
],
},
},
selected: "foo",
},
},
});
expect(mockPolyline).toHaveBeenCalled();
expect(mockLayerGroup).toBeCalledTimes(1);
});
});
it("are not drawn if there are no flights", () => {
renderWithProviders(<FlightPlansLayer blue={true} />);
expect(mockPolyline).not.toHaveBeenCalled();
expect(mockLayerGroup).toBeCalledTimes(1);
});
});

View File

@@ -5,7 +5,7 @@ import FlightPlan from "../flightplan";
import { LayerGroup } from "react-leaflet";
interface FlightPlansLayerProps {
blue: boolean;
blue?: boolean;
selectedOnly?: true;
}
@@ -15,11 +15,6 @@ function SelectedFlightPlan(props: FlightPlansLayerProps) {
return <></>;
}
if (!props.blue) {
// We don't currently support playing as red, so nothing to draw.
return <></>;
}
return (
<FlightPlan
key={flight.id}

View File

@@ -0,0 +1,32 @@
import { renderWithProviders } from "../../testutils";
import FrontLine from "./FrontLine";
import { PolylineProps } from "react-leaflet";
const mockPolyline = jest.fn();
jest.mock("react-leaflet", () => ({
Polyline: (props: PolylineProps) => {
mockPolyline(props);
},
}));
describe("FrontLine", () => {
it("is drawn in the correct location", () => {
const extents = [
{ lat: 0, lng: 0 },
{ lat: 1, lng: 0 },
];
renderWithProviders(
<FrontLine
front={{
id: "",
extents: extents,
}}
/>
);
expect(mockPolyline).toHaveBeenCalledWith(
expect.objectContaining({
positions: extents,
})
);
});
});

View File

@@ -0,0 +1,56 @@
import { renderWithProviders } from "../../testutils";
import FrontLinesLayer from "./FrontLinesLayer";
import { PropsWithChildren } from "react";
const mockPolyline = jest.fn();
const mockLayerGroup = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Polyline: (props: any) => {
mockPolyline(props);
},
}));
// The waypoints in test data below should all use `should_make: false`. Markers
// need useMap() to check the zoom level to decide if they should be drawn or
// not, and we don't have good options here for mocking that behavior.
describe("FrontLinesLayer", () => {
it("draws nothing when there are no front lines", () => {
renderWithProviders(<FrontLinesLayer />);
expect(mockPolyline).not.toHaveBeenCalled();
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
});
it("draws front lines", () => {
const extents = [
{ lat: 0, lng: 0 },
{ lat: 1, lng: 1 },
];
renderWithProviders(<FrontLinesLayer />, {
preloadedState: {
frontLines: {
fronts: {
foo: {
id: "foo",
extents: extents,
},
bar: {
id: "bar",
extents: extents,
},
},
},
},
});
expect(mockPolyline).toHaveBeenCalledTimes(2);
expect(mockPolyline).toHaveBeenCalledWith(
expect.objectContaining({
positions: extents,
})
);
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
});
});

View File

@@ -3,7 +3,7 @@ import { useAppSelector } from "../../app/hooks";
import FrontLine from "../frontline";
import { LayerGroup } from "react-leaflet";
export default function SupplyRoutesLayer() {
export default function FrontLinesLayer() {
const fronts = useAppSelector(selectFrontLines).fronts;
return (
<LayerGroup>

View File

@@ -25,10 +25,10 @@ export default function LiberationMap() {
const map = useRef<Map>(null);
const mapCenter = useAppSelector(selectMapCenter);
useEffect(() => {
map.current?.setView(mapCenter, 8, { animate: true, duration: 1 });
map.current?.setView(mapCenter, map.current?.getZoom() ?? 8, { animate: true, duration: 1 });
});
return (
<MapContainer zoom={8} zoomControl={false} ref={map}>
<MapContainer zoom={map.current?.getZoom() ?? 8} zoomControl={false} ref={map}>
<ScaleControl />
<LeafletRuler />
<LayersControl collapsed={false}>
@@ -53,6 +53,18 @@ export default function LiberationMap() {
<LayersControl.Overlay name="Air defenses" checked>
<TgosLayer categories={["aa"]} />
</LayersControl.Overlay>
<LayersControl.Overlay name="LORAD" >
<TgosLayer categories={["aa"]} task={"LORAD"} />
</LayersControl.Overlay>
<LayersControl.Overlay name="MERAD" >
<TgosLayer categories={["aa"]} task={"MERAD"} />
</LayersControl.Overlay>
<LayersControl.Overlay name="SHORAD" >
<TgosLayer categories={["aa"]} task={"SHORAD"} />
</LayersControl.Overlay>
<LayersControl.Overlay name="AAA" >
<TgosLayer categories={["aa"]} task={"AAA"} />
</LayersControl.Overlay>
<LayersControl.Overlay name="Factories" checked>
<TgosLayer categories={["factory"]} />
</LayersControl.Overlay>
@@ -86,8 +98,8 @@ export default function LiberationMap() {
<LayersControl.Overlay name="Allied IADS Network">
<Iadsnetworklayer blue={true} />
</LayersControl.Overlay>
<LayersControl.Overlay name="Selected blue flight plan">
<FlightPlansLayer blue={true} selectedOnly />
<LayersControl.Overlay name="Selected flight plan">
<FlightPlansLayer selectedOnly />
</LayersControl.Overlay>
<LayersControl.Overlay name="All blue flight plans" checked>
<FlightPlansLayer blue={true} />

View File

@@ -0,0 +1,125 @@
import { renderWithProviders } from "../../testutils";
import NavMeshLayer from "./NavMeshLayer";
import { PropsWithChildren } from "react";
const mockPolygon = jest.fn();
const mockLayerGroup = jest.fn();
jest.mock("react-leaflet", () => ({
LayerGroup: (props: PropsWithChildren<any>) => {
mockLayerGroup(props);
return <>{props.children}</>;
},
Polygon: (props: any) => {
mockPolygon(props);
},
}));
// The waypoints in test data below should all use `should_make: false`. Markers
// need useMap() to check the zoom level to decide if they should be drawn or
// not, and we don't have good options here for mocking that behavior.
describe("NavMeshLayer", () => {
it("draws blue meshes", () => {
const poly1 = [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: 1 },
{ lat: 1, lng: 0 },
],
];
const poly2 = [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: -1 },
{ lat: 1, lng: 0 },
],
];
renderWithProviders(<NavMeshLayer blue={true} />, {
preloadedState: {
navmeshes: {
blue: [
{
poly: poly1,
threatened: false,
},
{
poly: poly2,
threatened: true,
},
],
red: [
{
poly: [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: 2 },
{ lat: 1, lng: 0 },
],
],
threatened: false,
},
],
},
},
});
expect(mockPolygon).toHaveBeenCalledTimes(2);
expect(mockPolygon).toHaveBeenCalledWith(
expect.objectContaining({
fillColor: "#00ff00",
positions: poly1,
interactive: false,
})
);
expect(mockPolygon).toHaveBeenCalledWith(
expect.objectContaining({
fillColor: "#ff0000",
positions: poly2,
interactive: false,
})
);
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
});
it("draws red navmesh", () => {
renderWithProviders(<NavMeshLayer blue={false} />, {
preloadedState: {
navmeshes: {
blue: [
{
poly: [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: 1 },
{ lat: 1, lng: 0 },
],
],
threatened: false,
},
{
poly: [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: -1 },
{ lat: 1, lng: 0 },
],
],
threatened: true,
},
],
red: [
{
poly: [
[
{ lat: -1, lng: 0 },
{ lat: 0, lng: 2 },
{ lat: 1, lng: 0 },
],
],
threatened: false,
},
],
},
},
});
expect(mockPolygon).toHaveBeenCalledTimes(1);
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
});
});

View File

@@ -1,6 +1,7 @@
import { useGetTerrainZonesQuery } from "../../api/liberationApi";
import { useAppSelector } from "../../app/hooks";
import { LatLngLiteral } from "leaflet";
import { LayerGroup, LayersControl, Polygon } from "react-leaflet";
import { selectMapZones } from "../../api/mapZonesSlice";
interface TerrainZoneLayerProps {
zones: LatLngLiteral[][][];
@@ -28,33 +29,28 @@ function TerrainZoneLayer(props: TerrainZoneLayerProps) {
}
export default function TerrainZonesLayers() {
const { data, error, isLoading } = useGetTerrainZonesQuery();
const zones = useAppSelector(selectMapZones).mapZones;
var exclusion = <></>;
var inclusion = <></>;
var sea = <></>;
if (error) {
console.error("Error while loading terrain zones", error);
} else if (isLoading) {
} else if (!data) {
console.log("Empty response when loading terrain zones");
} else {
if (zones) {
exclusion = (
<TerrainZoneLayer
zones={data.exclusion}
zones={zones.exclusion}
color="#969696"
fillColor="#303030"
/>
);
inclusion = (
<TerrainZoneLayer
zones={data.inclusion}
zones={zones.inclusion}
color="#969696"
fillColor="#4b4b4b"
/>
);
sea = (
<TerrainZoneLayer zones={data.sea} color="#344455" fillColor="#344455" />
<TerrainZoneLayer zones={zones.sea} color="#344455" fillColor="#344455" />
);
}
return (

View File

@@ -5,11 +5,11 @@ import {
import { Tgo as TgoModel } from "../../api/liberationApi";
import SplitLines from "../splitlines/SplitLines";
import { Icon, Point } from "leaflet";
import { Symbol as MilSymbol } from "milsymbol";
import ms from "milsymbol";
import { Marker, Tooltip } from "react-leaflet";
function iconForTgo(cp: TgoModel) {
const symbol = new MilSymbol(cp.sidc, {
const symbol = new ms.Symbol(cp.sidc, {
size: 24,
});

View File

@@ -6,14 +6,21 @@ import { LayerGroup } from "react-leaflet";
interface TgosLayerProps {
categories?: string[];
exclude?: true;
task?: string;
}
export default function TgosLayer(props: TgosLayerProps) {
const allTgos = Object.values(useAppSelector(selectTgos).tgos);
const categoryFilter = props.categories ?? [];
const taskFilter = props.task ?? "";
const tgos = allTgos.filter(
(tgo) => categoryFilter.includes(tgo.category) === !(props.exclude ?? false)
);
(tgo) => {
if (taskFilter && tgo.task){
return taskFilter === tgo.task[0]
}
return categoryFilter.includes(tgo.category) === !(props.exclude ?? false)
}
);
return (
<LayerGroup>
{tgos.map((tgo) => {

View File

@@ -1,73 +0,0 @@
import { useGetDebugIpZonesQuery } from "../../api/liberationApi";
import { LayerGroup, Polygon } from "react-leaflet";
interface IpZonesProps {
flightId: string;
}
function IpZones(props: IpZonesProps) {
const { data, error, isLoading } = useGetDebugIpZonesQuery({
flightId: props.flightId,
});
if (isLoading) {
return <></>;
}
if (error) {
console.error("Error while loading waypoint IP zone info", error);
return <></>;
}
if (!data) {
console.log("Waypoint IP zone returned empty response");
return <></>;
}
return (
<>
<Polygon
positions={data.homeBubble}
color="#ffff00"
fillOpacity={0.1}
interactive={false}
/>
<Polygon
positions={data.ipBubble}
color="#bb89ff"
fillOpacity={0.1}
interactive={false}
/>
<Polygon
positions={data.permissibleZone}
color="#ffffff"
fillOpacity={0.1}
interactive={false}
/>
{data.safeZones.map((zone, idx) => {
return (
<Polygon
key={idx}
positions={zone}
color="#80BA80"
fillOpacity={0.1}
interactive={false}
/>
);
})}
</>
);
}
interface IpZonesLayerProps {
flightId: string | null;
}
export function IpZonesLayer(props: IpZonesLayerProps) {
return (
<LayerGroup>
{props.flightId ? <IpZones flightId={props.flightId} /> : <></>}
</LayerGroup>
);
}

View File

@@ -1,7 +1,6 @@
import { selectSelectedFlightId } from "../../api/flightsSlice";
import { useAppSelector } from "../../app/hooks";
import { HoldZonesLayer } from "./HoldZones";
import { IpZonesLayer } from "./IpZones";
import { JoinZonesLayer } from "./JoinZones";
import { LayersControl } from "react-leaflet";
@@ -16,9 +15,6 @@ export function WaypointDebugZonesControls() {
return (
<>
<LayersControl.Overlay name="IP zones">
<IpZonesLayer flightId={selectedFlightId} />
</LayersControl.Overlay>
<LayersControl.Overlay name="Join zones">
<JoinZonesLayer flightId={selectedFlightId} />
</LayersControl.Overlay>

View File

@@ -60,7 +60,7 @@ const WaypointMarker = (props: WaypointMarkerProps) => {
useEffect(() => {
const waypoint = props.waypoint;
marker.current?.setTooltipContent(
`${props.number} ${waypoint.name}<br />` +
`${props.number-1} ${waypoint.name}<br />` +
`${waypoint.altitude_ft.toFixed()} ft ${waypoint.altitude_reference}<br />` +
waypoint.timing
);

View File

@@ -1,5 +1,5 @@
import App from "./App";
import { store } from "./app/store";
import { setupStore } from "./app/store";
import { SocketProvider } from "./components/socketprovider/socketprovider";
import "./index.css";
import * as serviceWorker from "./serviceWorker";
@@ -12,7 +12,7 @@ const root = ReactDOM.createRoot(
);
root.render(
<React.StrictMode>
<Provider store={store}>
<Provider store={setupStore()}>
<SocketProvider>
<App />
</SocketProvider>

View File

@@ -0,0 +1,30 @@
// https://redux.js.org/usage/writing-tests
import { setupStore } from "../app/store";
import type { AppStore, RootState } from "../app/store";
import type { PreloadedState } from "@reduxjs/toolkit";
import { render } from "@testing-library/react";
import type { RenderOptions } from "@testing-library/react";
import React, { PropsWithChildren } from "react";
import { Provider } from "react-redux";
// This type interface extends the default options for render from RTL, as well
// as allows the user to specify other things such as initialState, store.
interface ExtendedRenderOptions extends Omit<RenderOptions, "queries"> {
preloadedState?: PreloadedState<RootState>;
store?: AppStore;
}
export function renderWithProviders(
ui: React.ReactElement,
{
preloadedState = {},
// Automatically create a store instance if no store was passed in
store = setupStore(preloadedState),
...renderOptions
}: ExtendedRenderOptions = {}
) {
function Wrapper({ children }: PropsWithChildren<{}>): JSX.Element {
return <Provider store={store}>{children}</Provider>;
}
return { store, ...render(ui, { wrapper: Wrapper, ...renderOptions }) };
}

8
codecov.yaml Normal file
View File

@@ -0,0 +1,8 @@
coverage:
status:
patch:
default:
informational: true
project:
default:
informational: true

20
docs/Makefile Normal file
View File

@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

34
docs/conf.py Normal file
View File

@@ -0,0 +1,34 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "DCS Retribution"
copyright = "2025, DCS Retribution Team"
author = "DCS Retribution Team"
release = "1.5.0"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"myst_parser",
"sphinx_rtd_theme",
"sphinx.ext.autosectionlabel",
"sphinx.ext.todo",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
todo_include_todos = True

View File

@@ -0,0 +1,8 @@
Design docs
===========
.. toctree::
:maxdepth: 2
:caption: Contents:
turnless.md

8
docs/dev/index.rst Normal file
View File

@@ -0,0 +1,8 @@
Developer documentation
=======================
.. toctree::
:maxdepth: 2
:caption: Contents:
design/index.rst

6
docs/game/index.rst Normal file
View File

@@ -0,0 +1,6 @@
Manual
======
.. toctree::
:maxdepth: 2
:caption: Contents:

16
docs/index.rst Normal file
View File

@@ -0,0 +1,16 @@
DCS Liberation
==============
.. toctree::
:maxdepth: 2
:caption: Contents:
game/index.rst
modding/index.rst
dev/index.rst
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

35
docs/make.bat Normal file
View File

@@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

10
docs/modding/index.rst Normal file
View File

@@ -0,0 +1,10 @@
Modding guide
=============
.. toctree::
:maxdepth: 2
:caption: Contents:
fuel-consumption-measurement.md
layouts.rst
weather.rst

397
docs/modding/layouts.rst Normal file
View File

@@ -0,0 +1,397 @@
The Layout System
=================
.. note::
The documentation of the layout system is still WIP and not
complete as the development of this feature involves a major refactoring
of the base code. Therefore this documentation is currently used for
development purpose primarily. The documentation will be updated soon.
Any help in updating this wiki page is appreciated!
The Layout System is a new way of defining how ground objects like SAM
Sites or other Vehicle / Ship Groups will be generated (which type of
units, how many units, alignment and orientation). It is a complete
rework of the previous generator-based logic which was written in python
code. The new system allows to define layouts with easy to write yaml
code and the use of the DCS Mission Editor for easier placement of the
units. The layout system also introduced a new logical grouping of Units
and layouts for them, the Armed Forces, which will allow major
improvements to the Ground Warfare in upcoming features.
**Armed Forces**
The Armed Forces is a new system introduced with the layout system which will
allow to identitfy and group possible units from the faction together with
available layouts for these groups. It is comparable to the AirWing and Squadron
implementation but just for Ground and Naval Forces. All possible Force Groups
(grouping of 1 or more units and and the available layouts for them) will be
generated during campaign initialization and will be used later by many
different systems. A Force Group can also include static objects which was not
possible before the introduction of the layout system. It is also possible to
define presets of these Force Groups within the faction file which is handy for
more complex groups like a SA-10 Battery or similar. Example: `SA-10.yaml`_.
which includes all the units like SR, TR, LN and has the layout of a
`S-300_Site.yaml`_.
.. _SA-10.yaml: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/groups/SA-10.yaml
.. _S-300_Site.yaml: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/layouts/anti_air/S-300_Site.yaml
**The Layout System**
In the previous system the generator which created the ground object was written
in python which made modifications and reusability very complicated. To allow
easier handling of the layouts and decoupling of alignment of units and the
actual unit type (for example Ural-375) the layout system was introduced.
Previously we had a generator for every different SAM Site, now we can just
reuse the alignemnt (e.g. 6 Launchers in a circle alignment) for multiple SAM
Systems and introduce more variety.
This new System allows Users and Designers to easily create or modify
layouts as the new alginment and orientation of units is defined with
the DCS Mission editor. An additional .yaml file allows the
configuration of the layout with settings like allow unit types or
random amounts of units. In total the new system reduces the complexity
and allows to precisely align / orient units as needed and create
realistic looking ground units.
As the whole ground unit generation and handling was reworked it is now
also possible to add static units to a ground object, so even
Fortifcation or similar can be added to templates in the future.
General Concept
~~~~~~~~~~~~~~~
.. figure:: images/layouts.png
:alt: Overview
Overview
All possible Force Groups will be generated during campaign
initialization by checking all possible units for the specific faction
and all available layouts. The code will automatically match general
layouts with available units. It is also possible to define preset
groups within the faction files which group many units and the prefered
layouts for the group. This is especially handy for unique layouts which
are not defined as ``global``. For example complex sam sites like the
S-300 or Patriot which have very specific alignment of the different
units.
Layouts will be matched to units based on the special definition given
in the corresponding yaml file. For example a layout which is defined as
global and allows the unit_class SHORAD will automatically be used for
all available SHORAD units which are defined in the faction file.
.. todo:: Describe the optional flag.
All these generated ForceGroups will be managed by the ArmedForces class
of the specific coalition. This class will be used by other parts of the
system like the start_generator or the BuyMenu. The ArmedForces class
will then generate the TheaterGroundObject which will be used by
liberation.
Example for a customized Ground Object Buy Menu which makes use of
Templates and UnitGroups:
.. figure:: images/ground_object_buy_menu.png
:alt: Ground object buy menu
Ground object buy menu
How to modify or add layouts
----------------------------
.. warning::
Whenever changes were made to layouts they have to be re-imported into
Liberation. See :ref:`Import Layouts into Liberation`.
A layout consists of two special files:
- layout.miz which defines the actual positioning and alignment of the
groups / units
- layout.yaml which defines the necessary information like amount of
units, possible types or classes.
To add a new template a new yaml has to be created as every yaml can
only define exact one template. Best practice is to copy paste an
existing template which is similar to the one to be created as starting
point. The next step is to create a new .miz file and align Units and
statics to the wishes. Even if existing ones can be reused, best
practice is to always create a fresh one to prevent side effects. The
most important part is to use a new Group for every different Unit Type.
It is not possible to mix Unit Types in one group within a template. For
example it is not possible to have a logistic truck and a AAA in the
same group. The miz file will only be used to get the exact position and
orientation of the units, therefore it is irrelevant which type of unit
will be used. The unit type will be later defined inside the yaml file.
For the next step all Group names have to be added to the yaml file.
Take care to that these names match exactly! Assign the unit_types or
unit_classes properties to math the needs.
The Layout miz
~~~~~~~~~~~~~~
The miz file is used to define the positioning and orientation of the
different units for the template. The actual unit which is used is
irrelevant. It is important to use a unique and meaningful name for the
groups as this will be used in the yaml file as well. The information
which will be extracted from the miz file are just the coordinates and
heading of the units.
*Important*: Every different unit type has to be in a separate Group for
the template to work. You can not add units of different types to the
same group. They can get merged back together during generation by
setting the group property. In the example below both groups
``AAA Site 0`` and ``AAA Site 1`` have the group = 1 which means that
they will be in the same dcs group during generation.
*Important*: Liberation expects every template to be designed with an
orientation of heading 0 (North) in mind. The complete GroundObject will
during the campaign generation process be rotated to match the
orientation defined by the campaign designer. If the layout was not
created with an orientation of heading 0 the later generated
GroundObject will likely be misaligned and not work properly.
.. todo::
max amount of possible units is defined from the miz. Example if later the
group should have 6 units than there have to be 6 defined in the miz.
.. figure:: images/layout_miz_example.png
:alt: Example template mission
Example template mission
The Layout configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. todo:: Description about the layout yaml file.
Possible Information:
.. list-table::
:header-rows: 1
* - Property
- Type
- Required
- Description
- Example
* - name
- ``str``
- Yes
- A name to identify the template
- .. code:: yaml
name: Armor Group
* - tasks
- list of ``GroupTask``
- Yes
- A list of tasks which the template can fulfill
- .. code:: yaml
tasks:
- AAA
- SHORAD
* - generic
- ``bool``, default false
- No
- True if this template will be used to create general ``UnitGroups``
-
* - description
- ``str``
- No
- Short description of the template
-
* - groups
- List of ``Groups``
- Yes
- See below for definition of a group
-
* - layout_file
- ``str``
- No
- The .miz file which has the groups/units of the layout included. Only
needed if the file has a different name than the yaml file
- .. code:: yaml
layout_file: resources/layouts/naval/legacy_naval_templates.miz
.. todo:: Group and SubGroup
A group has 1..N sub groups. The name of the Group will be used later
within the DCS group name.
All SubGroups will be merged into one DCS Group
Every unit type has to be defined as a sub group as following:
.. list-table::
:header-rows: 1
* - Property
- Type
- Required
- Description
* - name
- ``str``
- Yes
- The group name used in the .miz. Must match exactly!
* - optional
- ``bool``, default: false
- No
- Defines wether the layout can be used without this group if the faction
has no access to the unit type or the user wants to disable this group
* - fill
- ``bool``, default: false
- No
- If the group is optional the layout is used from a PresetGroup this
property tells the system if it should use any possible faction
accessible unit to fill up this slot if no capable one was defined in
the preset yaml.
* - unit_count
- list of ``int``
- No
- Amount of units to be generated for this group. Can be fixed or a range
where it will be picked randomly
* - unit_types
- list of DCS unit type IDs
- No
- Specific unit_types for ground units. Complete list from `vehicles.py`_.
This list is extended by all supported mods!
* - unit_classes
- list of unit classes
- No
- Unit classes of supported units. Defined by ``UnitClass`` in
`game/data/units.py`_.
* - statics
- list of static types
- No
- Specific unit_types of statics. Complete list from `statics.py`_
.. _vehicles.py: https://github.com/pydcs/dcs/blob/master/dcs/vehicles.py
.. _game/data/units.py: https://github.com/dcs-liberation/dcs_liberation/blob/develop/game/data/units.py
.. _statics.py: https://github.com/pydcs/dcs/blob/master/dcs/statics.py
Complete example of a generic template for an Aircraft Carrier group:
.. code:: yaml
name: Carrier Group
generic: true
tasks:
- AircraftCarrier
groups:
- Carrier: # Group Name of the DCS Group
- name: Carrier Group 0 # Sub Group used in the layout.miz
unit_count:
- 1
unit_classes:
- AircraftCarrier
- Escort: # Group name of the 2nd Group
- name: Carrier Group 1
unit_count:
- 4
unit_classes:
- Destroyer
layout_file: resources/layouts/naval/legacy_naval_templates.miz
Import Layouts into Liberation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For performance improvements all layouts are serialized to a so called
pickle file inside the save folder defined in the liberation
preferences. Every time changes are made to the layouts this file has to
be recreated. It can be recreated by either deleting the layouts.p file
manually or using the special option in the Liberation Toolbar
(Developer Tools -> Import Layouts). It will also be recreated after
each Liberation update as it will check the Version Number and recreate
it when changes are recognized.
Migration from Generators
-------------------------
The previous generators were migrated using a script which build a group using
the generator. All of these groups were save into one .miz file
`original_generator_layouts.miz`_. This miz file can be used to verify the
templates and to generalize similar templates to decouple the layout from the
actual units. As this is a time-consuming and sphisticated task this will be
done over time. With the first step the technical requirements will be fulfilled
so that the generalization can happen afterwards the technical pr gets merged.
.. _original_generator_layouts.miz: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/layouts/original_generator_layouts.miz
Updates for Factions
~~~~~~~~~~~~~~~~~~~~
With the rework there were also some changes to the faction file
definitions. Older faction files can not be loaded anymore and have to
be adopted to the new changes. During migration all default factions
were automatically updated, so they will work out of the box.
You can find more detailed information about how to customize the
faction file in `Custom factions`_.
What was changed:
* Removed the ``ewrs`` list. All EWRs are now defined in the list
``air_defense_units``.
* Added the ``air_defense_units`` list. All units with the Role AntiAir can be
defined here as `GroundUnitType`_. All possible units are defined in
`resources/units/ground_units`_.
* Added ``preset_groups``. This list allows to define Preset Groups (described
above) like SAM Systems consisting of Launcher, SR, TR and so on instead of
adding them each to “air_defense_units”. The presets are defined in
`resources/groups`_
* Migrated ``air_defenses`` to air_defense_units and preset_sets.
* ``Missiles`` are migrated to GroundUnitTypes instead of Generator names (see
air_defense_units for how to use)
* Removed ``cruisers``, ``destroyers`` and ``naval_generators``. Migrated them
to naval_units and preset_groups
* Added ``naval_units`` with the correct ship name found in
`resources/units/ships`_.
* ``aircraft_carrier`` and ``helicopter_carrier`` were moved to ``naval_units``
as well.
.. _Custom factions: https://github.com/dcs-liberation/dcs_liberation/wiki/Custom-Factions
.. _GroundUnitType: https://github.com/dcs-liberation/dcs_liberation/blob/develop/game/dcs/groundunittype.py
.. _resources/units/ground_units: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/units/ground_units
.. _resources/units/ships: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/units/ships
.. _resources/groups: https://github.com/dcs-liberation/dcs_liberation/blob/develop/resources/groups
Preset Groups
-------------
Instead of adding the exact name of the previous generator to add
complex groups like SAM sites or similar to the faction it is now
possible to add preset groups to the faction file. As described earlier
such a preset group (Force Group) can be defined very easy with a yaml
file. This file allows to define the name, tasking, units, statics and
the prefered layouts. The first task defines the primary role of the
ForceGroup which gets generated from the preset.
Example:
.. code:: yaml
name: SA-10/S-300PS # The name of the group
tasks: # Define at least 1 task
- LORAD # The task(s) the Group can fulfill
units: # Define at least 1 unit
- SAM SA-10 S-300 "Grumble" Clam Shell SR
- SAM SA-10 S-300 "Grumble" Big Bird SR
- SAM SA-10 S-300 "Grumble" C2
- SAM SA-10 S-300 "Grumble" Flap Lid TR
- SAM SA-10 S-300 "Grumble" TEL D
- SAM SA-10 S-300 "Grumble" TEL C
statics: # Optional
- # Add some statics here
layouts: # Define at least one layout
- S-300 Site # prefered layouts for these groups
Resources:
* A list of all available preset groups can be found here: `resources/groups`_
* All possible tasks can be found in the `game/data/groups.py`_
* Units are defined with the variant name found in `resources/units`_
.. _game/data/groups.py: https://github.com/dcs-liberation/dcs_liberation/blob/develop/game/data/groups.py
.. _resources/units: https://github.com/dcs-liberation/dcs_liberation/tree/develop/resources/units

76
docs/modding/weather.rst Normal file
View File

@@ -0,0 +1,76 @@
#######
Weather
#######
Weather conditions in DCS Liberation are randomly generated at the start of each
turn. Some of the inputs to that generator (more to come) can be controlled via
the config files in ``resources/weather``.
**********
Archetypes
**********
A weather archetype defines the the conditions for a style of weather, such as
"clear", or "raining". There are currently four archetypes:
1. clear
2. cloudy
3. raining
4. thunderstorm
The odds of each archetype appearing in each season are defined in the theater
yaml files (``resources/theaters/*/info.yaml``).
.. literalinclude:: ../../resources/weather/archetypes/clear.yaml
:language: yaml
:linenos:
:caption: resources/weather/archetypes/clear.yaml
Wind speeds
===========
DCS missions define wind with a speed and heading at each of three altitudes:
1. MSL
2. 2000 meters
3. 8000 meters
Blending between each altitude band is done in a manner defined by DCS.
Liberation randomly generates a direction for the wind at MSL, and each other
altitude band will have wind within +/- 90 degrees of that heading.
Wind speeds can be modded by altering the ``speed`` dict in the archetype yaml.
The only random distribution currently supported is the Weibull distribution, so
all archetypes currently use:
.. code:: yaml
speed:
weibull:
...
The Weibull distribution has two parameters: a shape and a scale.
The scale is simplest to understand. 63.2% of all outcomes of the distribution
are below the scale parameter.
The shape controls where the peak of the distribution is. See the examples in
the links below for illustrations and guidelines, but generally speaking low
values (between 1 and 2.6) will cause low speeds to be more common, medium
values (around 3) will be fairly evenly distributed around the median, and high
values (greater than 3.7) will cause high speeds to be more common. As wind
speeds tend to be higher at higher altitudes and fairly slow close to the
ground, you typically want a low value for MSL, a medium value for 2000m, and a
high value for 8000m.
For examples, see https://statisticsbyjim.com/probability/weibull-distribution/.
To experiment with different inputs, use Wolfram Alpha, e.g.
https://www.wolframalpha.com/input?i=weibull+distribution+1.5+5.
When generating wind speeds, each subsequent altitude band will have the lower
band's speed added to its scale parameter. That is, for the example above, the
actual scale parameter of ``at_2000m`` will be ``20 + wind speed at MSL``, and
the scale parameter of ``at_8000m`` will be ``20 + wind speed at 2000m``. This
is to ensure that a generally windy day (high wind speed at MSL) will create
similarly high winds at higher altitudes and vice versa.

2
docs/requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
myst-parser
sphinx_rtd_theme

View File

@@ -40,7 +40,7 @@ class ArmedForces:
# all layouts which are usable by the given faction.
for layout in LAYOUTS.layouts:
if layout.generic and layout.usable_by_faction(faction):
# Creates a faction compatible GorceGroup
# Creates a faction compatible ForceGroup
self.add_or_update_force_group(ForceGroup.for_layout(layout, faction))
# Add all preset groups afterwards to prevent them being merged with generics

View File

@@ -9,20 +9,30 @@ from typing import Any, ClassVar, Iterator, Optional, TYPE_CHECKING, Type
import yaml
from dcs.unittype import ShipType, StaticType, UnitType as DcsUnitType, VehicleType
from game import persistency
from game.data.groups import GroupTask
from game.dcs.groundunittype import GroundUnitType
from game.dcs.helpers import static_type_from_name
from game.dcs.shipunittype import ShipUnitType
from game.dcs.unittype import UnitType
from game.layout import LAYOUTS
from game.layout.layout import TgoLayout, TgoLayoutUnitGroup
from game.layout.layout import (
TgoLayout,
TgoLayoutUnitGroup,
)
from game.point_with_heading import PointWithHeading
from game.theater.theatergroundobject import (
IadsGroundObject,
IadsBuildingGroundObject,
NavalGroundObject,
)
from game.theater.theatergroup import IadsGroundGroup, IadsRole, TheaterGroup
from game.theater.theatergroup import (
IadsGroundGroup,
IadsRole,
TheaterGroup,
FIXED_POS_ARG,
FIXED_HDG_ARG,
)
from game.utils import escape_string_for_lua
if TYPE_CHECKING:
@@ -191,11 +201,12 @@ class ForceGroup:
location: PresetLocation,
control_point: ControlPoint,
game: Game,
task: Optional[GroupTask],
) -> TheaterGroundObject:
"""Create a random TheaterGroundObject from the available templates"""
layout = random.choice(self.layouts)
return self.create_ground_object_for_layout(
layout, name, location, control_point, game
layout, name, location, control_point, game, task
)
def create_ground_object_for_layout(
@@ -205,9 +216,10 @@ class ForceGroup:
location: PresetLocation,
control_point: ControlPoint,
game: Game,
task: Optional[GroupTask],
) -> TheaterGroundObject:
"""Create a TheaterGroundObject for the given template"""
go = layout.create_ground_object(name, location, control_point)
go = layout.create_ground_object(name, location, control_point, task)
# Generate all groups using the randomization if it defined
for tgo_group in layout.groups:
for unit_group in tgo_group.unit_groups:
@@ -246,8 +258,15 @@ class ForceGroup:
if unit_count == 0:
# No units to be created so dont create a theater group for them
return
# If the control point is neutral, don't create any units at all
if ground_object.control_point.captured.is_neutral:
return
# Generate Units
units = unit_group.generate_units(ground_object, unit_type, unit_count)
fixed_pos = FIXED_POS_ARG in unit_group.name
fixed_hdg = FIXED_HDG_ARG in unit_group.name
units = unit_group.generate_units(
ground_object, unit_type, unit_count, fixed_pos, fixed_hdg
)
# Get or create the TheaterGroup
ground_group = ground_object.group_by_name(group_name)
if ground_group is not None:
@@ -287,7 +306,7 @@ class ForceGroup:
unit.id = game.next_unit_id()
# Add unit name escaped so that we do not have scripting issues later
unit.name = escape_string_for_lua(
unit.unit_type.name if unit.unit_type else unit.type.name
unit.unit_type.variant_id if unit.unit_type else unit.type.name
)
unit.position = PointWithHeading.from_point(
ground_object.position + unit.position,
@@ -302,11 +321,22 @@ class ForceGroup:
# Reverse the heading of the unit
unit.position.heading = unit.position.heading.opposite
# Rotate unit around the center to align the orientation of the group
unit.position.rotate(ground_object.position, rotation)
unit.rotate_position_clockwise(ground_object.position, rotation)
@classmethod
def _load_all(cls) -> None:
for file in Path("resources/groups").glob("*.yaml"):
locations = [
Path("resources/groups"),
persistency.groups_dir(),
]
for path in locations:
cls._process_path(path)
cls._loaded = True
@classmethod
def _process_path(cls, path: Path) -> None:
for file in path.glob("*.yaml"):
if not file.is_file():
raise RuntimeError(f"{file.name} is not a valid ForceGroup")
@@ -354,5 +384,3 @@ class ForceGroup:
)
cls._by_name[force_group.name] = force_group
cls._loaded = True

View File

@@ -1,4 +1,4 @@
from .flight import Flight
from .flighttype import FlightType
from .flight import Flight
from .flightwaypoint import FlightWaypoint
from .package import Package

View File

@@ -1,774 +0,0 @@
import logging
from collections.abc import Sequence
from typing import Type
from dcs.helicopters import (
AH_1W,
AH_64A,
AH_64D,
AH_64D_BLK_II,
CH_47D,
CH_53E,
Ka_50,
Ka_50_3,
Mi_24P,
Mi_24V,
Mi_26,
Mi_28N,
Mi_8MT,
OH_58D,
SA342L,
SA342M,
SH_60B,
UH_1H,
UH_60A,
)
from dcs.planes import (
AJS37,
AV8BNA,
A_10A,
A_10C,
A_10C_2,
A_20G,
A_50,
An_26B,
B_17G,
B_1B,
B_52H,
Bf_109K_4,
C_101CC,
C_130,
C_17A,
C_47,
E_2C,
E_3A,
FA_18C_hornet,
FW_190A8,
FW_190D9,
F_117A,
F_14A,
F_14A_135_GR,
F_14B,
F_15C,
F_15E,
F_16A,
F_16A_MLU,
F_16C_50,
F_4E,
F_5E_3,
F_86F_Sabre,
H_6J,
IL_76MD,
IL_78M,
I_16,
JF_17,
J_11A,
Ju_88A4,
KC130,
KC135MPRS,
KC_135,
KJ_2000,
L_39ZA,
MQ_9_Reaper,
M_2000C,
MiG_15bis,
MiG_19P,
MiG_21Bis,
MiG_23MLD,
MiG_25PD,
MiG_27K,
MiG_29A,
MiG_29G,
MiG_29S,
MiG_31,
Mirage_2000_5,
Mirage_F1B,
Mirage_F1BE,
Mirage_F1CE,
Mirage_F1EE,
Mirage_F1EQ,
Mirage_F1M_CE,
Mirage_F1M_EE,
Mirage_F1C_200,
Mirage_F1CT,
MosquitoFBMkVI,
P_47D_30,
P_47D_30bl1,
P_47D_40,
P_51D,
P_51D_30_NA,
RQ_1A_Predator,
S_3B,
S_3B_Tanker,
SpitfireLFMkIX,
SpitfireLFMkIXCW,
Su_17M4,
Su_24M,
Su_25,
Su_25T,
Su_25TM,
Su_27,
Su_30,
Su_33,
Su_34,
Tornado_GR4,
Tornado_IDS,
Tu_142,
Tu_160,
Tu_22M3,
Tu_95MS,
WingLoong_I,
Yak_40,
MB_339A,
)
from dcs.unittype import FlyingType
from game.dcs.aircrafttype import AircraftType
from pydcs_extensions.a4ec.a4ec import A_4E_C
from pydcs_extensions.a6a.a6a import VSN_A6A
from pydcs_extensions.f100.f100 import VSN_F100
from pydcs_extensions.f104.f104 import VSN_F104C, VSN_F104G, VSN_F104S, VSN_F104S_AG
from pydcs_extensions.f105.f105 import VSN_F105D, VSN_F105G
from pydcs_extensions.f15d.f15d import F_15D
from pydcs_extensions.f16i_idf.f16i_idf import (
F_16D_50,
F_16D_52,
F_16D_50_NS,
F_16D_52_NS,
F_16D_Barak_30,
F_16D_Barak_40,
F_16I,
)
from pydcs_extensions.f22a.f22a import F_22A
from pydcs_extensions.f4b.f4b import VSN_F4B, VSN_F4C
from pydcs_extensions.f84g.f84g import VSN_F84G
from pydcs_extensions.fa18efg.fa18efg import FA_18E, FA_18F, EA_18G
from pydcs_extensions.hercules.hercules import Hercules
from pydcs_extensions.jas39.jas39 import JAS39Gripen, JAS39Gripen_AG
from pydcs_extensions.su30.su30 import Su_30MKA, Su_30MKI, Su_30MKM, Su_30SM
from pydcs_extensions.su57.su57 import Su_57
from pydcs_extensions.ov10a.ov10a import Bronco_OV_10A
from pydcs_extensions.uh60l.uh60l import KC130J, UH_60L
from .flighttype import FlightType
# All aircraft lists are in priority order. Aircraft higher in the list will be
# preferred over those lower in the list.
# TODO: These lists really ought to be era (faction) dependent.
# Factions which have F-5s, F-86s, and A-4s will should prefer F-5s for CAP, but
# factions that also have F-4s should not.
# Used for CAP, Escort, and intercept if there is not a specialised aircraft available
ESCORT_CAPABLE = [
Su_57,
F_22A,
F_15C,
F_15D,
F_14B,
F_14A_135_GR,
F_14A,
Su_33,
J_11A,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
Su_27,
MiG_29S,
F_16C_50,
F_16I,
F_16D_Barak_40,
F_16D_Barak_30,
F_16D_50,
F_16D_50_NS,
F_16D_52,
F_16D_52_NS,
FA_18E,
FA_18F,
FA_18C_hornet,
JF_17,
JAS39Gripen,
F_16A_MLU,
F_16A,
F_4E,
VSN_F4C,
VSN_F4B,
MiG_31,
MiG_25PD,
MiG_29G,
MiG_29A,
MiG_23MLD,
MiG_21Bis,
Mirage_2000_5,
Mirage_F1B,
Mirage_F1BE,
Mirage_F1CE,
Mirage_F1EE,
Mirage_F1EQ,
Mirage_F1M_CE,
Mirage_F1M_EE,
Mirage_F1C_200,
Mirage_F1CT,
F_15E,
M_2000C,
F_5E_3,
VSN_F104S,
VSN_F104G,
VSN_F104C,
MiG_19P,
VSN_F100,
A_4E_C,
F_86F_Sabre,
MiG_15bis,
C_101CC,
VSN_F84G,
P_51D_30_NA,
P_51D,
SpitfireLFMkIXCW,
SpitfireLFMkIX,
MosquitoFBMkVI,
Bf_109K_4,
FW_190D9,
FW_190A8,
P_47D_30,
P_47D_30bl1,
P_47D_40,
I_16,
]
# Types to be skipped for escorts
CAP_CAPABLE = ESCORT_CAPABLE + [
L_39ZA,
]
# Used for CAS (Close air support) and BAI (Battlefield Interdiction)
CAS_CAPABLE = [
A_10C_2,
A_10C,
Hercules,
Su_34,
Su_25TM,
Su_25T,
Su_25,
F_15D,
F_15E,
F_16C_50,
F_16I,
F_16D_Barak_40,
F_16D_Barak_30,
F_16D_50,
F_16D_50_NS,
F_16D_52,
F_16D_52_NS,
FA_18E,
FA_18F,
FA_18C_hornet,
Tornado_GR4,
Tornado_IDS,
JAS39Gripen_AG,
JF_17,
AV8BNA,
A_10A,
F_16A_MLU,
F_16A,
B_1B,
A_4E_C,
F_14B,
F_14A_135_GR,
AJS37,
Su_24M,
Su_17M4,
Su_33,
F_4E,
S_3B,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
MiG_29S,
MiG_27K,
MiG_29A,
MiG_21Bis,
AH_64D_BLK_II,
AH_64D,
AH_64A,
AH_1W,
OH_58D,
SA342M,
SA342L,
Ka_50,
Ka_50_3,
Mi_28N,
Mi_24P,
Mi_24V,
Mi_8MT,
H_6J,
MiG_19P,
MiG_15bis,
M_2000C,
Mirage_F1B,
Mirage_F1BE,
Mirage_F1CE,
Mirage_F1EE,
Mirage_F1EQ,
Mirage_F1M_CE,
Mirage_F1M_EE,
Mirage_F1CT,
F_5E_3,
F_86F_Sabre,
C_101CC,
L_39ZA,
MB_339A,
Bronco_OV_10A,
UH_1H,
A_20G,
Ju_88A4,
P_47D_40,
P_47D_30bl1,
P_47D_30,
P_51D_30_NA,
P_51D,
SpitfireLFMkIXCW,
SpitfireLFMkIX,
MosquitoFBMkVI,
I_16,
Bf_109K_4,
FW_190D9,
FW_190A8,
WingLoong_I,
MQ_9_Reaper,
RQ_1A_Predator,
VSN_A6A,
VSN_F4C,
VSN_F4B,
VSN_F100,
VSN_F105G,
VSN_F105D,
VSN_F104S_AG,
VSN_F104G,
VSN_F104C,
VSN_F84G,
]
# Aircraft used for SEAD and SEAD Escort tasks. Must be capable of the CAS DCS task.
SEAD_ESCORT_CAPABLE = [
JF_17,
F_16C_50,
F_16I,
F_16D_Barak_40,
F_16D_Barak_30,
F_16D_50,
F_16D_50_NS,
F_16D_52,
F_16D_52_NS,
EA_18G,
FA_18E,
FA_18F,
FA_18C_hornet,
Tornado_IDS,
Su_25T,
Su_25TM,
F_4E,
A_4E_C,
JAS39Gripen_AG,
AV8BNA,
Su_24M,
Su_17M4,
Su_34,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
MiG_27K,
Tornado_GR4,
VSN_F105G,
VSN_F100,
]
SEAD_CAPABLE = SEAD_ESCORT_CAPABLE + [
F_16A_MLU,
F_14B,
F_14A_135_GR,
]
# Aircraft used for DEAD tasks. Must be capable of the CAS DCS task.
DEAD_CAPABLE = SEAD_CAPABLE + [
AJS37,
F_16A,
F_15E,
JAS39Gripen_AG,
B_1B,
B_52H,
Tu_160,
Tu_95MS,
H_6J,
A_20G,
Ju_88A4,
P_47D_40,
P_47D_30bl1,
P_47D_30,
P_51D_30_NA,
P_51D,
Bronco_OV_10A,
SpitfireLFMkIXCW,
SpitfireLFMkIX,
MosquitoFBMkVI,
Bf_109K_4,
FW_190D9,
FW_190A8,
VSN_A6A,
VSN_F105D,
VSN_F104S_AG,
VSN_F104G,
VSN_F104C,
VSN_F100,
VSN_F84G,
]
# Aircraft used for Strike mission
STRIKE_CAPABLE = [
F_117A,
B_1B,
B_52H,
Tu_160,
Tu_95MS,
Tu_22M3,
H_6J,
F_15D,
F_15E,
AJS37,
Tornado_GR4,
F_16C_50,
F_16I,
F_16D_Barak_40,
F_16D_Barak_30,
F_16D_50,
F_16D_50_NS,
F_16D_52,
F_16D_52_NS,
FA_18E,
FA_18F,
FA_18C_hornet,
AV8BNA,
JF_17,
F_16A_MLU,
F_16A,
F_14B,
F_14A_135_GR,
JAS39Gripen_AG,
Tornado_IDS,
Su_17M4,
Su_24M,
Su_25TM,
Su_25T,
Su_25,
Su_34,
Su_33,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
Su_27,
MiG_29S,
MiG_29G,
MiG_29A,
F_4E,
A_10C_2,
A_10C,
VSN_F4C,
VSN_F4B,
S_3B,
A_4E_C,
Bronco_OV_10A,
M_2000C,
Mirage_F1B,
Mirage_F1BE,
Mirage_F1CE,
Mirage_F1EE,
Mirage_F1EQ,
Mirage_F1M_CE,
Mirage_F1M_EE,
Mirage_F1CT,
MiG_27K,
MiG_21Bis,
MiG_15bis,
F_5E_3,
F_86F_Sabre,
C_101CC,
L_39ZA,
MB_339A,
B_17G,
A_20G,
Ju_88A4,
P_47D_40,
P_47D_30bl1,
P_47D_30,
P_51D_30_NA,
P_51D,
SpitfireLFMkIXCW,
SpitfireLFMkIX,
MosquitoFBMkVI,
Bf_109K_4,
FW_190D9,
FW_190A8,
VSN_A6A,
VSN_F100,
VSN_F104S_AG,
VSN_F104G,
VSN_F104C,
VSN_F105G,
VSN_F105D,
VSN_F84G,
]
ANTISHIP_CAPABLE = [
AJS37,
Tu_142,
Tu_22M3,
H_6J,
FA_18E,
FA_18F,
FA_18C_hornet,
JAS39Gripen_AG,
F_16A_MLU,
F_16A,
Su_24M,
Su_17M4,
JF_17,
Su_34,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
Tornado_IDS,
Tornado_GR4,
AV8BNA,
S_3B,
A_20G,
Ju_88A4,
MosquitoFBMkVI,
C_101CC,
SH_60B,
]
# This list does not "inherit" from the strike list because some strike aircraft can
# only carry guided weapons, and the AI cannot do runway attack with dguided weapons.
# https://github.com/dcs-liberation/dcs_liberation/issues/1703
RUNWAY_ATTACK_CAPABLE = [
JF_17,
Tornado_IDS,
M_2000C,
Mirage_F1B,
Mirage_F1BE,
Mirage_F1CE,
Mirage_F1EE,
Mirage_F1EQ,
Mirage_F1M_CE,
Mirage_F1M_EE,
Mirage_F1CT,
H_6J,
B_1B,
B_52H,
Tu_22M3,
H_6J,
F_15E,
AJS37,
F_16C_50,
F_16I,
F_16D_Barak_40,
F_16D_Barak_30,
F_16D_50,
F_16D_50_NS,
F_16D_52,
F_16D_52_NS,
FA_18E,
FA_18F,
FA_18C_hornet,
AV8BNA,
JF_17,
F_16A_MLU,
F_16A,
F_14B,
F_14A_135_GR,
JAS39Gripen_AG,
Tornado_IDS,
Su_17M4,
Su_24M,
Su_25TM,
Su_25T,
Su_25,
Su_34,
Su_33,
Su_30,
Su_30MKA,
Su_30MKI,
Su_30MKM,
Su_30SM,
Su_27,
MiG_29S,
MiG_29G,
MiG_29A,
F_4E,
A_10C_2,
A_10C,
VSN_F4C,
VSN_F4B,
S_3B,
A_4E_C,
Bronco_OV_10A,
M_2000C,
MiG_27K,
MiG_21Bis,
MiG_15bis,
F_5E_3,
F_86F_Sabre,
C_101CC,
L_39ZA,
MB_339A,
B_17G,
A_20G,
Ju_88A4,
P_47D_40,
P_47D_30bl1,
P_47D_30,
P_51D_30_NA,
P_51D,
SpitfireLFMkIXCW,
SpitfireLFMkIX,
MosquitoFBMkVI,
Bf_109K_4,
FW_190D9,
FW_190A8,
VSN_A6A,
VSN_F105G,
VSN_F105D,
VSN_F104S_AG,
VSN_F104G,
VSN_F104C,
VSN_F100,
]
# For any aircraft that isn't necessarily directly involved in strike
# missions in a direct combat sense, but can transport objects and infantry.
TRANSPORT_CAPABLE = [
C_17A,
Hercules,
C_130,
C_47,
IL_76MD,
An_26B,
Yak_40,
CH_53E,
CH_47D,
UH_60L,
SH_60B,
UH_60A,
UH_1H,
Mi_8MT,
Mi_8MT,
Mi_26,
]
AIR_ASSAULT_CAPABLE = [
CH_53E,
CH_47D,
UH_60L,
SH_60B,
UH_60A,
UH_1H,
Mi_8MT,
Mi_26,
Mi_24P,
Mi_24V,
Hercules,
]
DRONES = [MQ_9_Reaper, RQ_1A_Predator, WingLoong_I]
AEWC_CAPABLE = [
E_3A,
E_2C,
A_50,
KJ_2000,
]
# Priority is given to the tankers that can carry the most fuel.
REFUELING_CAPABALE = [
KC_135,
KC135MPRS,
IL_78M,
KC130J,
KC130,
S_3B_Tanker,
]
def dcs_types_for_task(task: FlightType) -> Sequence[Type[FlyingType]]:
cap_missions = (
FlightType.BARCAP,
FlightType.INTERCEPTION,
FlightType.SWEEP,
FlightType.TARCAP,
)
if task in cap_missions:
return CAP_CAPABLE
elif task == FlightType.ANTISHIP:
return ANTISHIP_CAPABLE
elif task == FlightType.BAI:
return CAS_CAPABLE
elif task == FlightType.CAS:
return CAS_CAPABLE
elif task == FlightType.SEAD:
return SEAD_CAPABLE
elif task == FlightType.SEAD_ESCORT:
return SEAD_ESCORT_CAPABLE
elif task == FlightType.DEAD:
return DEAD_CAPABLE
elif task == FlightType.OCA_AIRCRAFT:
return CAS_CAPABLE
elif task == FlightType.OCA_RUNWAY:
return RUNWAY_ATTACK_CAPABLE
elif task == FlightType.STRIKE:
return STRIKE_CAPABLE
elif task == FlightType.ESCORT:
return ESCORT_CAPABLE
elif task == FlightType.AEWC:
return AEWC_CAPABLE
elif task == FlightType.REFUELING:
return REFUELING_CAPABALE
elif task == FlightType.TRANSPORT:
return TRANSPORT_CAPABLE
elif task == FlightType.AIR_ASSAULT:
return AIR_ASSAULT_CAPABLE
else:
logging.error(f"Unplannable flight type: {task}")
return []
def aircraft_for_task(task: FlightType) -> list[AircraftType]:
dcs_types = dcs_types_for_task(task)
types: list[AircraftType] = []
for dcs_type in dcs_types:
types.extend(AircraftType.for_dcs_type(dcs_type))
return types
def tasks_for_aircraft(aircraft: AircraftType) -> list[FlightType]:
tasks: list[FlightType] = []
for task in FlightType:
if task is FlightType.FERRY:
# Not a plannable task, so skip it.
continue
if aircraft in aircraft_for_task(task):
tasks.append(task)
return tasks

View File

@@ -1,6 +1,7 @@
from dataclasses import dataclass, field
from typing import List
from game.ato import FlightType
from game.ato.package import Package
@@ -11,6 +12,16 @@ class AirTaskingOrder:
#: The set of all planned packages in the ATO.
packages: List[Package] = field(default_factory=list)
@property
def has_awacs_package(self) -> bool:
return any(
[
p
for p in self.packages
if any([f for f in p.flights if f.flight_type is FlightType.AEWC])
]
)
def add_package(self, package: Package) -> None:
"""Adds a package to the ATO."""
self.packages.append(package)

View File

@@ -1,4 +1,5 @@
"""Objective adjacency lists."""
from __future__ import annotations
from typing import Dict, Iterator, List, Optional, TYPE_CHECKING

View File

@@ -1,17 +1,24 @@
from __future__ import annotations
import random
import uuid
from collections.abc import Iterator
from datetime import datetime, timedelta
from typing import Any, List, Optional, TYPE_CHECKING
from dcs import Point
from dcs.planes import C_101CC, C_101EB, Su_33, FA_18C_hornet
from game.dcs.aircrafttype import AircraftType
from game.theater import ControlPoint, MissionTarget
from pydcs_extensions.hercules.hercules import Hercules
from .flightmembers import FlightMembers
from .flightroster import FlightRoster
from .flightstate import FlightState, Navigating, Uninitialized
from .flightstate.killed import Killed
from .loadouts import Loadout, Weapon
from .flighttype import FlightType
from .loadouts import Weapon
from ..radio.CallsignContainer import CallsignContainer
from ..radio.RadioFrequencyContainer import RadioFrequencyContainer
from ..radio.TacanContainer import TacanContainer
from ..radio.radios import RadioFrequency
@@ -23,16 +30,16 @@ from ..sidc import (
Status,
SymbolSet,
)
from game.dcs.aircrafttype import AircraftType
if TYPE_CHECKING:
from game.sim.gameupdateevents import GameUpdateEvents
from game.sim.simulationresults import SimulationResults
from game.squadrons import Squadron, Pilot
from game.theater import ControlPoint
from game.theater.player import Player
from game.transfers import TransferOrder
from game.data.weapons import WeaponType
from .flightmember import FlightMember
from .flightplans.flightplan import FlightPlan
from .flighttype import FlightType
from .flightwaypoint import FlightWaypoint
from .package import Package
from .starttype import StartType
@@ -40,11 +47,12 @@ if TYPE_CHECKING:
F18_TGP_PYLON: int = 4
class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
class Flight(
SidcDescribable, RadioFrequencyContainer, TacanContainer, CallsignContainer
):
def __init__(
self,
package: Package,
country: str,
squadron: Squadron,
count: int,
flight_type: FlightType,
@@ -55,30 +63,34 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
roster: Optional[FlightRoster] = None,
frequency: Optional[RadioFrequency] = None,
channel: Optional[TacanChannel] = None,
callsign: Optional[str] = None,
callsign_tcn: Optional[str] = None,
claim_inv: bool = True,
) -> None:
self.id = uuid.uuid4()
self.package = package
self.country = country
self.coalition = squadron.coalition
self.squadron = squadron
self.squadron.claim_inventory(count)
if roster is None:
self.roster = FlightRoster(self.squadron, initial_size=count)
else:
self.roster = roster
self.divert = divert
self.flight_type = flight_type
self.loadout = Loadout.default_for(self)
if claim_inv:
self.squadron.claim_inventory(count)
if roster is None:
self.roster = FlightMembers(self, initial_size=count)
else:
self.roster = FlightMembers.from_roster(self, roster)
self.divert = divert
self.start_type = start_type
self.use_custom_loadout = False
self.custom_name = custom_name
self.group_id: int = 0
self.frequency = frequency
if self.unit_type.dcs_unit_type.tacan:
self.tacan = channel
self.tcn_name = callsign
self.tcn_name = callsign_tcn
self.initialize_fuel()
self.use_same_loadout_for_all_members = True
self.use_same_livery_for_all_members = True
# Only used by transport missions.
self.cargo = cargo
@@ -105,11 +117,35 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
is_f18 = self.squadron.aircraft.dcs_unit_type.id == FA_18C_hornet.id
on_land = not self.squadron.location.is_fleet
if on_land and is_f18 and self.coalition.game.settings.atflir_autoswap:
self.loadout.pylons[F18_TGP_PYLON] = Weapon.with_clsid(
str(
FA_18C_hornet.Pylon4.AN_AAQ_28_LITENING___Targeting_Pod_[1]["clsid"]
for fm in self.roster.members:
fm.loadout.pylons[F18_TGP_PYLON] = Weapon.with_clsid(
str(
FA_18C_hornet.Pylon4.AN_AAQ_28_LITENING___Targeting_Pod[1][
"clsid"
]
)
)
)
# altitude offset for planes
offset_factor = self.coalition.game.settings.max_plane_altitude_offset
offset_factor = random.randint(0, offset_factor)
self.plane_altitude_offset = 1000 * offset_factor * random.choice([-1, 1])
@property
def available_callsigns(self) -> List[str]:
callsigns = set()
dcs_unit = self.squadron.aircraft.dcs_unit_type
category = dcs_unit.category
category = "Air" if category == "Interceptor" else category
for name in self.squadron.coalition.faction.country.callsign[category]:
callsigns.add(name)
if hasattr(dcs_unit, "callnames"):
country_name = self.squadron.coalition.faction.country.name
for c in dcs_unit.callnames:
if "Combined Joint Task Forces" in country_name or c == country_name:
for name in dcs_unit.callnames[c]:
callsigns.add(name)
return sorted(callsigns)
@property
def flight_plan(self) -> FlightPlan[Any]:
@@ -132,10 +168,14 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
def __setstate__(self, state: dict[str, Any]) -> None:
state["state"] = Uninitialized(self, state["squadron"].settings)
if "use_same_loadout_for_all_members" not in state:
state["use_same_loadout_for_all_members"] = True
self.__dict__.update(state)
if isinstance(self.roster, FlightRoster):
self.roster = FlightMembers.from_roster(self, self.roster)
@property
def blue(self) -> bool:
def blue(self) -> Player:
return self.squadron.player
@property
@@ -170,22 +210,29 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
def unit_type(self) -> AircraftType:
return self.squadron.aircraft
@property
def is_lha(self) -> bool:
return self.unit_type.lha_capable
@property
def is_helo(self) -> bool:
return self.unit_type.dcs_unit_type.helicopter
return self.unit_type.helicopter
@property
def is_hercules(self) -> bool:
return self.unit_type == AircraftType.named("C-130J-30 Super Hercules")
@property
def from_cp(self) -> ControlPoint:
return self.departure
@property
def points(self) -> List[FlightWaypoint]:
return self.flight_plan.waypoints[1:]
@property
def custom_targets(self) -> List[MissionTarget]:
return [
MissionTarget(wpt.name, wpt.position)
for wpt in self.flight_plan.layout.custom_waypoints
]
def position(self) -> Point:
return self.state.estimate_position()
@@ -200,29 +247,46 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
def missing_pilots(self) -> int:
return self.roster.missing_pilots
def iter_members(self) -> Iterator[FlightMember]:
yield from self.roster.members
def set_flight_type(self, var: FlightType) -> None:
self.flight_type = var
# Update _flight_plan_builder so that the builder class remains relevant
# to the flight type
from .flightplans.flightplanbuildertypes import FlightPlanBuilderTypes
self._flight_plan_builder = FlightPlanBuilderTypes.for_flight(self)(self)
def return_pilots_and_aircraft(self) -> None:
self.roster.clear()
self.squadron.claim_inventory(-self.count)
def max_takeoff_fuel(self) -> Optional[float]:
# Special case so Su 33 and C101 can take off
def initialize_fuel(self) -> None:
unit_type = self.unit_type.dcs_unit_type
self.fuel = unit_type.fuel_max
# Special cases where we want less fuel for takeoff
if unit_type == Su_33:
if self.flight_type.is_air_to_air:
return Su_33.fuel_max / 2.2
self.fuel = Su_33.fuel_max / 2.2
else:
return Su_33.fuel_max * 0.8
self.fuel = Su_33.fuel_max * 0.8
elif unit_type in {C_101EB, C_101CC}:
return unit_type.fuel_max * 0.5
self.fuel = unit_type.fuel_max * 0.5
elif unit_type == Hercules:
return unit_type.fuel_max * 0.75
return None
self.fuel = unit_type.fuel_max * 0.75
def any_member_has_weapon_of_type(self, weapon_type: WeaponType) -> bool:
return any(
m.loadout.has_weapon_of_type(weapon_type) for m in self.iter_members()
)
def __repr__(self) -> str:
return self.__str__()
def __str__(self) -> str:
string = f"[{self.flight_type}] {self.count} x {self.unit_type}"
string = f"[{self.flight_type}] {self.count} x {self.unit_type} - {self.start_type.value}"
if self.custom_name:
return f"{self.custom_name} - {string}"
return string
@@ -277,18 +341,17 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
Killed(self.state.estimate_position(), self, self.squadron.settings)
)
events.update_flight(self)
for pilot in self.roster.pilots:
for pilot in self.roster.iter_pilots():
if pilot is not None:
results.kill_pilot(self, pilot)
def recreate_flight_plan(self) -> None:
self._flight_plan_builder.regenerate()
def recreate_flight_plan(self, dump_debug_info: bool = False) -> None:
self._flight_plan_builder.regenerate(dump_debug_info)
@staticmethod
def clone_flight(flight: Flight) -> Flight:
return Flight(
flight.package,
flight.country,
flight.squadron,
flight.count,
flight.flight_type,

49
game/ato/flightmember.py Normal file
View File

@@ -0,0 +1,49 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from game.ato.loadouts import Loadout
from game.lasercodes import LaserCode
if TYPE_CHECKING:
from game.squadrons import Pilot
class FlightMember:
def __init__(self, pilot: Pilot | None, loadout: Loadout) -> None:
self.pilot = pilot
self.loadout = loadout
self.use_custom_loadout = False
self.tgp_laser_code: LaserCode | None = None
self.weapon_laser_code: LaserCode | None = None
self.properties: dict[str, bool | float | int | str] = {}
self.livery: Optional[str] = None
self.use_livery_set: bool = True
def __setstate__(self, state: dict[str, Any]) -> None:
new_state = FlightMember(state["pilot"], state["loadout"])
new_state.__dict__.update(state)
self.__dict__.update(new_state.__dict__)
def assign_tgp_laser_code(self, code: LaserCode) -> None:
if self.tgp_laser_code is not None:
raise RuntimeError(
f"{self.pilot} already has already been assigned laser code "
f"{self.tgp_laser_code}"
)
self.tgp_laser_code = code
def release_tgp_laser_code(self) -> None:
if self.tgp_laser_code is None:
raise RuntimeError(f"{self.pilot} has no assigned laser code")
if self.weapon_laser_code == self.tgp_laser_code:
self.weapon_laser_code = None
self.tgp_laser_code.release()
self.tgp_laser_code = None
@property
def is_player(self) -> bool:
if self.pilot is None:
return False
return self.pilot.player

107
game/ato/flightmembers.py Normal file
View File

@@ -0,0 +1,107 @@
from __future__ import annotations
from collections.abc import Iterator
from typing import Optional, TYPE_CHECKING
from .flightmember import FlightMember
from .flightroster import FlightRoster
from .iflightroster import IFlightRoster
from .loadouts import Loadout
from ..data.weapons import Weapon
if TYPE_CHECKING:
from game.squadrons import Pilot, Squadron
from .flight import Flight
class FlightMembers(IFlightRoster):
def __init__(self, flight: Flight, initial_size: int = 0) -> None:
self.flight = flight
self.members: list[FlightMember] = []
self.resize(initial_size)
@property
def squadron(self) -> Squadron:
return self.flight.squadron
@staticmethod
def from_roster(flight: Flight, roster: FlightRoster) -> FlightMembers:
members = FlightMembers(flight)
loadout = Loadout.default_for(flight)
if flight.squadron.aircraft.variant_id == "F-15I Ra'am":
loadout.pylons[16] = Weapon.with_clsid("{IDF_MODS_PROJECT_F-15I_Raam_Dome}")
members.members = [FlightMember(p, loadout) for p in roster.pilots]
return members
def iter_pilots(self) -> Iterator[Pilot | None]:
yield from (m.pilot for m in self.members)
def pilot_at(self, idx: int) -> Pilot | None:
return self.members[idx].pilot
@property
def max_size(self) -> int:
return len(self.members)
@property
def player_count(self) -> int:
return len([m for m in self.members if m.is_player])
@property
def missing_pilots(self) -> int:
return len([m for m in self.members if m.pilot is None])
def resize(self, new_size: int) -> None:
if self.max_size > new_size:
for member in self.members[new_size:]:
if (pilot := member.pilot) is not None:
self.flight.squadron.return_pilot(pilot)
if (code := member.tgp_laser_code) is not None:
code.release()
self.members = self.members[:new_size]
return
if self.max_size:
loadout = self.members[0].loadout.clone()
else:
loadout = Loadout.default_for(self.flight)
if self.flight.squadron.aircraft.variant_id == "F-15I Ra'am":
loadout.pylons[16] = Weapon.with_clsid("{IDF_MODS_PROJECT_F-15I_Raam_Dome}")
for _ in range(new_size - self.max_size):
member = FlightMember(self.flight.squadron.claim_available_pilot(), loadout)
member.use_custom_loadout = loadout.is_custom
self.members.append(member)
def set_pilot(self, index: int, pilot: Optional[Pilot]) -> None:
if pilot is not None:
self.flight.squadron.claim_pilot(pilot)
if (current_pilot := self.pilot_at(index)) is not None:
self.flight.squadron.return_pilot(current_pilot)
self.members[index].pilot = pilot
def clear(self) -> None:
self.flight.squadron.return_pilots(
[p for p in self.iter_pilots() if p is not None]
)
for member in self.members:
if (code := member.tgp_laser_code) is not None:
code.release()
def use_same_loadout_for_all_members(self) -> None:
if not self.members:
return
loadout = self.members[0].loadout
for member in self.members[1:]:
# Do not clone the loadout, we want any changes in the UI to be mirrored
# across all flight members.
member.loadout = loadout
def use_same_livery_for_all_members(self) -> None:
if not self.members:
return
livery = self.members[0].livery
for member in self.members[1:]:
member.livery = livery
def use_distinct_loadouts_for_each_member(self) -> None:
for member in self.members:
member.loadout = member.loadout.clone()

View File

@@ -6,13 +6,13 @@ from typing import Type
from game.ato.flightplans.ibuilder import IBuilder
from game.ato.flightplans.patrolling import PatrollingFlightPlan, PatrollingLayout
from game.ato.flightplans.waypointbuilder import WaypointBuilder
from game.utils import Distance, Heading, Speed, feet, knots, meters, nautical_miles
from game.utils import Distance, Heading, Speed, knots, meters, nautical_miles
class AewcFlightPlan(PatrollingFlightPlan[PatrollingLayout]):
@property
def patrol_duration(self) -> timedelta:
return timedelta(hours=4)
return self.flight.coalition.game.settings.desired_awacs_mission_duration
@property
def patrol_speed(self) -> Speed:
@@ -48,7 +48,9 @@ class Builder(IBuilder[AewcFlightPlan, PatrollingLayout]):
orbit_heading = heading_to_threat_boundary
# Station 80nm outside the threat zone.
threat_buffer = nautical_miles(80)
threat_buffer = nautical_miles(
self.coalition.game.settings.aewc_threat_buffer_min_distance
)
if self.threat_zones.threatened(location.position):
orbit_distance = distance_to_threat + threat_buffer
else:
@@ -66,12 +68,9 @@ class Builder(IBuilder[AewcFlightPlan, PatrollingLayout]):
orbit_heading.left.degrees, racetrack_half_distance
)
builder = WaypointBuilder(self.flight, self.coalition)
builder = WaypointBuilder(self.flight)
if self.flight.unit_type.patrol_altitude is not None:
altitude = self.flight.unit_type.patrol_altitude
else:
altitude = feet(25000)
altitude = builder.get_patrol_altitude
racetrack = builder.race_track(racetrack_start, racetrack_end, altitude)
@@ -88,7 +87,8 @@ class Builder(IBuilder[AewcFlightPlan, PatrollingLayout]):
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> AewcFlightPlan:
def build(self, dump_debug_info: bool = False) -> AewcFlightPlan:
return AewcFlightPlan(self.flight, self.layout())

View File

@@ -1,15 +1,19 @@
from __future__ import annotations
import random
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime
from typing import Iterator, TYPE_CHECKING, Type
from ._common_ctld import generate_random_ctld_point
from game.ato.flightplans.standard import StandardFlightPlan, StandardLayout
from game.theater.controlpoint import ControlPointType
from game.theater.missiontarget import MissionTarget
from game.utils import Distance, feet, meters
from .ibuilder import IBuilder
from ._common_ctld import generate_random_ctld_point
from .formationattack import (
FormationAttackLayout,
FormationAttackBuilder,
FormationAttackFlightPlan,
)
from .planningerror import PlanningError
from .uizonedisplay import UiZone, UiZoneDisplay
from .waypointbuilder import WaypointBuilder
@@ -21,52 +25,57 @@ if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
class AirAssaultLayout(StandardLayout):
@dataclass
class AirAssaultLayout(FormationAttackLayout):
# The pickup point is optional because we don't always need to load the cargo. When
# departing from a carrier, LHA, or off-map spawn, the cargo is pre-loaded.
pickup: FlightWaypoint | None
nav_to_ingress: list[FlightWaypoint]
ingress: FlightWaypoint
drop_off: FlightWaypoint | None
pickup: FlightWaypoint | None = None
drop_off: FlightWaypoint | None = None
# This is an implementation detail used by CTLD. The aircraft will not go to this
# waypoint. It is used by CTLD as the destination for unloaded troops.
target: FlightWaypoint
nav_to_home: list[FlightWaypoint]
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
if self.pickup is not None:
yield self.pickup
yield from self.nav_to_ingress
yield from self.nav_to
yield self.join
yield self.ingress
if self.drop_off is not None:
yield self.drop_off
yield self.target
yield from self.nav_to_home
yield self.targets[0]
yield from self.nav_from
yield self.arrival
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
class AirAssaultFlightPlan(StandardFlightPlan[AirAssaultLayout], UiZoneDisplay):
class AirAssaultFlightPlan(FormationAttackFlightPlan, UiZoneDisplay):
@staticmethod
def builder_type() -> Type[Builder]:
return Builder
@property
def is_airassault(self) -> bool:
return True
@property
def tot_waypoint(self) -> FlightWaypoint:
if self.flight.is_helo and self.layout.drop_off is not None:
return self.layout.drop_off
return self.layout.target
return self.layout.targets[0]
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
if waypoint == self.tot_waypoint:
return self.tot
return None
@property
def ingress_time(self) -> datetime:
tot = self.tot
travel_time = self.travel_time_between_waypoints(
self.layout.ingress, self.tot_waypoint
)
return tot - travel_time
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
return None
@property
@@ -74,17 +83,17 @@ class AirAssaultFlightPlan(StandardFlightPlan[AirAssaultLayout], UiZoneDisplay):
return meters(2500)
@property
def mission_departure_time(self) -> timedelta:
def mission_departure_time(self) -> datetime:
return self.package.time_over_target
def ui_zone(self) -> UiZone:
return UiZone(
[self.layout.target.position],
[self.layout.targets[0].position],
self.ctld_target_zone_radius,
)
class Builder(IBuilder[AirAssaultFlightPlan, AirAssaultLayout]):
class Builder(FormationAttackBuilder[AirAssaultFlightPlan, AirAssaultLayout]):
def layout(self) -> AirAssaultLayout:
if not self.flight.is_helo and not self.flight.is_hercules:
raise PlanningError(
@@ -92,10 +101,10 @@ class Builder(IBuilder[AirAssaultFlightPlan, AirAssaultLayout]):
)
assert self.package.waypoints is not None
altitude = feet(1500) if self.flight.is_helo else self.doctrine.ingress_altitude
altitude_is_agl = self.flight.is_helo
builder = WaypointBuilder(self.flight)
builder = WaypointBuilder(self.flight, self.coalition)
altitude = builder.get_cruise_altitude
altitude_is_agl = self.flight.is_helo
if self.flight.is_hercules or self.flight.departure.cptype in [
ControlPointType.AIRCRAFT_CARRIER_GROUP,
@@ -113,37 +122,54 @@ class Builder(IBuilder[AirAssaultFlightPlan, AirAssaultLayout]):
self._generate_ctld_pickup(),
)
)
pickup.alt = altitude
pickup_position = pickup.position
ingress = (
builder.ingress(
FlightWaypointType.INGRESS_AIR_ASSAULT,
self.package.waypoints.ingress,
self.package.target,
)
if not self.flight.is_hercules
else builder.ingress(
FlightWaypointType.INGRESS_AIR_ASSAULT,
self.package.waypoints.initial,
self.package.target,
)
)
assault_area = builder.assault_area(self.package.target)
heading = self.package.target.position.heading_between_point(pickup_position)
if self.flight.is_hercules:
assault_area.only_for_player = False
assault_area.alt = feet(1000)
# TODO: define CTLD dropoff zones in campaign miz?
drop_off_zone = MissionTarget(
"Dropoff zone",
self.package.target.position.point_from_heading(heading, 1200),
)
tgt = self.package.target
if isinstance(tgt, CTLD) and tgt.ctld_zones:
top3 = sorted(
tgt.ctld_zones, key=lambda x: ingress.position.distance_to_point(x[0])
)[:3]
pos, dist = random.choice(top3)
drop_pos = pos.random_point_within(dist)
else:
heading = tgt.position.heading_between_point(ingress.position)
drop_pos = tgt.position.point_from_heading(heading, 1200)
drop_off_zone = MissionTarget("Dropoff zone", drop_pos)
dz = builder.dropoff_zone(drop_off_zone) if self.flight.is_helo else None
return AirAssaultLayout(
departure=builder.takeoff(self.flight.departure),
pickup=pickup,
nav_to_ingress=builder.nav_path(
nav_to=builder.nav_path(
pickup_position,
self.package.waypoints.ingress,
ingress.position,
altitude,
altitude_is_agl,
),
ingress=builder.ingress(
FlightWaypointType.INGRESS_AIR_ASSAULT,
self.package.waypoints.ingress,
self.package.target,
),
ingress=ingress,
drop_off=dz,
target=assault_area,
nav_to_home=builder.nav_path(
targets=[assault_area],
nav_from=builder.nav_path(
drop_off_zone.position,
self.flight.arrival.position,
altitude,
@@ -152,9 +178,14 @@ class Builder(IBuilder[AirAssaultFlightPlan, AirAssaultLayout]):
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
hold=None,
join=builder.join(self.package.waypoints.ingress),
split=builder.split(self.flight.arrival.position),
refuel=None,
custom_waypoints=list(),
)
def build(self) -> AirAssaultFlightPlan:
def build(self, dump_debug_info: bool = False) -> AirAssaultFlightPlan:
return AirAssaultFlightPlan(self.flight, self.layout())
def _generate_ctld_pickup(self) -> Point:

View File

@@ -1,17 +1,20 @@
from __future__ import annotations
import random
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime
from typing import Optional
from typing import TYPE_CHECKING, Type
from ._common_ctld import generate_random_ctld_point
from game.theater.missiontarget import MissionTarget
from game.utils import feet
from game.utils import Distance
from ._common_ctld import generate_random_ctld_point
from .ibuilder import IBuilder
from .planningerror import PlanningError
from .standard import StandardFlightPlan, StandardLayout
from .waypointbuilder import WaypointBuilder
from ..flightwaypointtype import FlightWaypointType
from ...theater.interfaces.CTLD import CTLD
if TYPE_CHECKING:
@@ -19,16 +22,19 @@ if TYPE_CHECKING:
from dcs import Point
@dataclass(frozen=True)
@dataclass
class AirliftLayout(StandardLayout):
nav_to_pickup: list[FlightWaypoint]
pickup_ascent: FlightWaypoint | None
pickup_descent: FlightWaypoint | None
# There will not be a pickup waypoint when the pickup airfield is the departure
# airfield for cargo planes, as the cargo is pre-loaded. Helicopters will still pick
# up the cargo near the airfield.
pickup: FlightWaypoint | None
# pickup_zone will be used for player flights to create the CTLD stuff
ctld_pickup_zone: FlightWaypoint | None
drop_off_ascent: FlightWaypoint | None
nav_to_drop_off: list[FlightWaypoint]
drop_off_descent: FlightWaypoint | None
# There will not be a drop-off waypoint when the drop-off airfield and the arrival
# airfield is the same for a cargo plane, as planes will land to unload and we don't
# want a double landing. Helicopters will still drop their cargo near the airfield
@@ -36,25 +42,57 @@ class AirliftLayout(StandardLayout):
drop_off: FlightWaypoint | None
# drop_off_zone will be used for player flights to create the CTLD stuff
ctld_drop_off_zone: FlightWaypoint | None
nav_to_home: list[FlightWaypoint]
return_ascent: FlightWaypoint
return_descent: FlightWaypoint
def add_waypoint(
self, wpt: FlightWaypoint, next_wpt: Optional[FlightWaypoint]
) -> bool:
new_wpt = self.get_midpoint(wpt, next_wpt)
if wpt.waypoint_type in [
FlightWaypointType.PICKUP_ZONE,
FlightWaypointType.CARGO_STOP,
]:
self.nav_to_drop_off.insert(0, new_wpt)
return True
return super().add_waypoint(wpt, next_wpt)
def delete_waypoint(self, waypoint: FlightWaypoint) -> bool:
if waypoint in self.nav_to_drop_off:
self.nav_to_drop_off.remove(waypoint)
return True
elif super().delete_waypoint(waypoint):
return True
return False
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
yield from self.nav_to_pickup
if self.pickup_ascent is not None:
yield self.pickup_ascent
yield from self.nav_to
if self.pickup_descent is not None:
yield self.pickup_descent
if self.pickup is not None:
yield self.pickup
if self.ctld_pickup_zone is not None:
yield self.ctld_pickup_zone
if self.drop_off_ascent is not None:
yield self.drop_off_ascent
yield from self.nav_to_drop_off
if self.drop_off_descent is not None:
yield self.drop_off_descent
if self.drop_off is not None:
yield self.drop_off
yield self.return_ascent
if self.ctld_drop_off_zone is not None:
yield self.ctld_drop_off_zone
yield from self.nav_to_home
yield from self.nav_from
yield self.return_descent
yield self.arrival
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
class AirliftFlightPlan(StandardFlightPlan[AirliftLayout]):
@@ -70,16 +108,20 @@ class AirliftFlightPlan(StandardFlightPlan[AirliftLayout]):
# drop-off waypoint.
return self.layout.drop_off or self.layout.arrival
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
# TOT planning isn't really useful for transports. They're behind the front
# lines so no need to wait for escorts or for other missions to complete.
return None
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
return None
@property
def mission_departure_time(self) -> timedelta:
def mission_begin_on_station_time(self) -> datetime | None:
return None
@property
def mission_departure_time(self) -> datetime:
return self.package.time_over_target
@@ -91,20 +133,52 @@ class Builder(IBuilder[AirliftFlightPlan, AirliftLayout]):
"Cannot plan transport mission for flight with no cargo."
)
altitude = feet(1500)
altitude_is_agl = True
builder = WaypointBuilder(self.flight)
builder = WaypointBuilder(self.flight, self.coalition)
altitude = builder.get_cruise_altitude
altitude_is_agl = self.flight.is_helo
pickup_ascent = None
pickup_descent = None
pickup = None
drop_off_ascent = None
drop_off_descent = None
drop_off = None
pickup_zone = None
drop_off_zone = None
if cargo.origin != self.flight.departure:
pickup = builder.cargo_stop(cargo.origin)
pickup_ascent = self._create_ascent_or_descent(
builder,
self.flight.departure.position,
cargo.origin.position,
altitude,
altitude_is_agl,
)
pickup_descent = self._create_ascent_or_descent(
builder,
cargo.origin.position,
self.flight.departure.position,
altitude,
altitude_is_agl,
)
if cargo.next_stop != self.flight.arrival:
drop_off = builder.cargo_stop(cargo.next_stop)
drop_off_ascent = self._create_ascent_or_descent(
builder,
cargo.origin.position,
cargo.next_stop.position,
altitude,
altitude_is_agl,
)
drop_off_descent = self._create_ascent_or_descent(
builder,
cargo.next_stop.position,
cargo.origin.position,
altitude,
altitude_is_agl,
)
if self.flight.is_helo:
# Create CTLD Zones for Helo flights
@@ -125,31 +199,61 @@ class Builder(IBuilder[AirliftFlightPlan, AirliftLayout]):
altitude_is_agl,
)
return_ascent = self._create_ascent_or_descent(
builder,
(
cargo.next_stop.position
if cargo.next_stop != self.flight.arrival
else cargo.origin.position
),
self.flight.arrival.position,
altitude,
altitude_is_agl,
)
return_descent = self._create_ascent_or_descent(
builder,
self.flight.arrival.position,
(
cargo.next_stop.position
if cargo.next_stop != self.flight.arrival
else cargo.origin.position
),
altitude,
altitude_is_agl,
)
return AirliftLayout(
departure=builder.takeoff(self.flight.departure),
nav_to_pickup=nav_to_pickup,
pickup_ascent=pickup_ascent,
nav_to=nav_to_pickup,
pickup_descent=pickup_descent,
pickup=pickup,
ctld_pickup_zone=pickup_zone,
drop_off_ascent=drop_off_ascent,
nav_to_drop_off=builder.nav_path(
cargo.origin.position,
cargo.next_stop.position,
altitude,
altitude_is_agl,
),
drop_off_descent=drop_off_descent,
drop_off=drop_off,
ctld_drop_off_zone=drop_off_zone,
nav_to_home=builder.nav_path(
return_ascent=return_ascent,
nav_from=builder.nav_path(
cargo.origin.position,
self.flight.arrival.position,
altitude,
altitude_is_agl,
),
return_descent=return_descent,
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> AirliftFlightPlan:
def build(self, dump_debug_info: bool = False) -> AirliftFlightPlan:
return AirliftFlightPlan(self.flight, self.layout())
def _generate_ctld_pickup(self) -> Point:
@@ -163,3 +267,18 @@ class Builder(IBuilder[AirliftFlightPlan, AirliftLayout]):
if cargo and cargo.transport and isinstance(cargo.transport.destination, CTLD):
return generate_random_ctld_point(cargo.transport.destination)
raise RuntimeError("Could not generate CTLD dropoff")
@staticmethod
def _create_ascent_or_descent(
builder: WaypointBuilder,
start: Point,
end: Point,
alt: Distance,
agl: bool,
) -> FlightWaypoint:
distance = start.distance_to_point(end)
rdistance = 1000 if agl else min(distance / 10, 20000)
heading = round(start.heading_between_point(end))
rheading = random.randint(heading - 30, heading + 30) % 360
pos = start.point_from_heading(float(rheading), rdistance)
return builder.nav(pos, alt, agl)

View File

@@ -35,11 +35,11 @@ class Builder(FormationAttackBuilder[AntiShipFlightPlan, FormationAttackLayout])
else:
raise InvalidObjectiveLocation(self.flight.flight_type, location)
return self._build(FlightWaypointType.INGRESS_BAI, targets)
return self._build(FlightWaypointType.INGRESS_ANTI_SHIP, targets)
@staticmethod
def anti_ship_targets_for_tgo(tgo: NavalGroundObject) -> list[StrikeTarget]:
return [StrikeTarget(f"{g.group_name} at {tgo.name}", g) for g in tgo.groups]
def build(self) -> AntiShipFlightPlan:
def build(self, dump_debug_info: bool = False) -> AntiShipFlightPlan:
return AntiShipFlightPlan(self.flight, self.layout())

View File

@@ -0,0 +1,34 @@
from __future__ import annotations
from typing import Type
from .formationattack import (
FormationAttackBuilder,
FormationAttackFlightPlan,
FormationAttackLayout,
)
from .uizonedisplay import UiZone, UiZoneDisplay
from ..flightwaypointtype import FlightWaypointType
from ...utils import nautical_miles
class ArmedReconFlightPlan(FormationAttackFlightPlan, UiZoneDisplay):
@staticmethod
def builder_type() -> Type[Builder]:
return Builder
def ui_zone(self) -> UiZone:
return UiZone(
[self.tot_waypoint.position],
nautical_miles(
self.flight.coalition.game.settings.armed_recon_engagement_range_distance
),
)
class Builder(FormationAttackBuilder[ArmedReconFlightPlan, FormationAttackLayout]):
def layout(self) -> FormationAttackLayout:
return self._build(FlightWaypointType.INGRESS_ARMED_RECON)
def build(self, dump_debug_info: bool = False) -> ArmedReconFlightPlan:
return ArmedReconFlightPlan(self.flight, self.layout())

View File

@@ -39,5 +39,5 @@ class Builder(FormationAttackBuilder[BaiFlightPlan, FormationAttackLayout]):
return self._build(FlightWaypointType.INGRESS_BAI, targets)
def build(self) -> BaiFlightPlan:
def build(self, dump_debug_info: bool = False) -> BaiFlightPlan:
return BaiFlightPlan(self.flight, self.layout())

View File

@@ -1,11 +1,10 @@
from __future__ import annotations
import random
from datetime import timedelta
from typing import Type
from game.theater import FrontLine
from game.utils import Distance, Speed, feet
from game.utils import Distance, Speed
from .capbuilder import CapBuilder
from .invalidobjectivelocation import InvalidObjectiveLocation
from .patrolling import PatrollingFlightPlan, PatrollingLayout
@@ -19,7 +18,7 @@ class BarCapFlightPlan(PatrollingFlightPlan[PatrollingLayout]):
@property
def patrol_duration(self) -> timedelta:
return self.flight.coalition.doctrine.cap_duration
return self.flight.coalition.game.settings.desired_barcap_mission_duration
@property
def patrol_speed(self) -> Speed:
@@ -41,14 +40,9 @@ class Builder(CapBuilder[BarCapFlightPlan, PatrollingLayout]):
start_pos, end_pos = self.cap_racetrack_for_objective(location, barcap=True)
preferred_alt = self.flight.unit_type.preferred_patrol_altitude
randomized_alt = preferred_alt + feet(random.randint(-2, 1) * 1000)
patrol_alt = max(
self.doctrine.min_patrol_altitude,
min(self.doctrine.max_patrol_altitude, randomized_alt),
)
builder = WaypointBuilder(self.flight)
patrol_alt = builder.get_patrol_altitude
builder = WaypointBuilder(self.flight, self.coalition)
start, end = builder.race_track(start_pos, end_pos, patrol_alt)
return PatrollingLayout(
@@ -64,7 +58,8 @@ class Builder(CapBuilder[BarCapFlightPlan, PatrollingLayout]):
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> BarCapFlightPlan:
def build(self, dump_debug_info: bool = False) -> BarCapFlightPlan:
return BarCapFlightPlan(self.flight, self.layout())

View File

@@ -35,7 +35,12 @@ class CapBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
closest_airfield = airfield
break
else:
raise PlanningError("Could not find any enemy airfields")
for airfield in closest_cache.closest_airfields:
if airfield.captured != self.is_player:
closest_airfield = airfield
break
else:
raise PlanningError("Could not find any enemy airfields")
heading = Heading.from_degrees(
location.position.heading_between_point(closest_airfield.position)
@@ -60,7 +65,9 @@ class CapBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
# distance from the nearest enemy airbase, but since they are by
# definition in enemy territory they can't avoid the threat zone
# without being useless.
min_distance_from_enemy = nautical_miles(20)
min_distance_from_enemy = nautical_miles(
self.coalition.game.settings.tarcap_threat_buffer_min_distance
)
distance_to_airfield = meters(
closest_airfield.position.distance_to_point(
self.package.target.position

View File

@@ -6,33 +6,38 @@ from datetime import timedelta
from typing import TYPE_CHECKING, Type
from game.theater import FrontLine
from game.utils import Distance, Speed, kph, meters
from game.utils import Distance, Speed, kph, dcs_to_shapely_point
from game.utils import nautical_miles
from .ibuilder import IBuilder
from .invalidobjectivelocation import InvalidObjectiveLocation
from .patrolling import PatrollingFlightPlan, PatrollingLayout
from .uizonedisplay import UiZone, UiZoneDisplay
from .waypointbuilder import WaypointBuilder
from ..flightwaypointtype import FlightWaypointType
from ...flightplan.ipsolver import IpSolver
from ...persistency import waypoint_debug_directory
if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
@dataclass
class CasLayout(PatrollingLayout):
target: FlightWaypoint
ingress: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
yield from self.nav_to
if self.ingress:
yield self.ingress
yield self.patrol_start
yield self.target
yield self.patrol_end
yield from self.nav_from
yield self.arrival
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
class CasFlightPlan(PatrollingFlightPlan[CasLayout], UiZoneDisplay):
@@ -53,12 +58,13 @@ class CasFlightPlan(PatrollingFlightPlan[CasLayout], UiZoneDisplay):
@property
def engagement_distance(self) -> Distance:
max_length = self.flight.coalition.game.settings.max_frontline_length * 1000
return meters(max_length) / 2
return nautical_miles(
self.flight.coalition.game.settings.cas_engagement_range_distance
)
@property
def combat_speed_waypoints(self) -> set[FlightWaypoint]:
return {self.layout.patrol_start, self.layout.target, self.layout.patrol_end}
return {self.layout.ingress, self.layout.patrol_start, self.layout.patrol_end}
def request_escort_at(self) -> FlightWaypoint | None:
return self.layout.patrol_start
@@ -67,14 +73,17 @@ class CasFlightPlan(PatrollingFlightPlan[CasLayout], UiZoneDisplay):
return self.layout.patrol_end
def ui_zone(self) -> UiZone:
midpoint = (
self.layout.patrol_start.position + self.layout.patrol_end.position
) / 2
return UiZone(
[self.layout.target.position],
[midpoint],
self.engagement_distance,
)
class Builder(IBuilder[CasFlightPlan, CasLayout]):
def layout(self) -> CasLayout:
def layout(self, dump_debug_info: bool) -> CasLayout:
location = self.package.target
if not isinstance(location, FrontLine):
@@ -84,49 +93,75 @@ class Builder(IBuilder[CasFlightPlan, CasLayout]):
FrontLineConflictDescription,
)
bounds = FrontLineConflictDescription.frontline_bounds(
location, self.theater, self.coalition.game.settings
)
ingress = bounds.left_position
center = bounds.center
egress = bounds.right_position
bounds = FrontLineConflictDescription.frontline_bounds(location, self.theater)
patrol_start = bounds.left_position
patrol_end = bounds.right_position
ingress_distance = ingress.distance_to_point(self.flight.departure.position)
egress_distance = egress.distance_to_point(self.flight.departure.position)
if egress_distance < ingress_distance:
ingress, egress = egress, ingress
start_distance = patrol_start.distance_to_point(self.flight.departure.position)
end_distance = patrol_end.distance_to_point(self.flight.departure.position)
if end_distance < start_distance:
patrol_start, patrol_end = patrol_end, patrol_start
builder = WaypointBuilder(self.flight, self.coalition)
builder = WaypointBuilder(self.flight)
is_helo = self.flight.unit_type.dcs_unit_type.helicopter
ingress_egress_altitude = (
self.doctrine.ingress_altitude if not is_helo else meters(50)
ingress_egress_altitude = builder.get_combat_altitude
use_agl_patrol_altitude = is_helo
ip_solver = IpSolver(
dcs_to_shapely_point(self.flight.departure.position),
dcs_to_shapely_point(patrol_start),
self.doctrine,
self.threat_zones.all,
)
use_agl_ingress_egress = is_helo
ip_solver.set_debug_properties(
waypoint_debug_directory() / "IP", self.theater.terrain
)
ingress_point_shapely = ip_solver.solve()
if dump_debug_info:
ip_solver.dump_debug_info()
ingress_point = patrol_start.new_in_same_map(
ingress_point_shapely.x, ingress_point_shapely.y
)
patrol_start_waypoint = builder.cas(patrol_start, ingress_egress_altitude)
patrol_start_waypoint.name = "FLOT START"
patrol_start_waypoint.pretty_name = "FLOT start"
patrol_start_waypoint.description = "FLOT boundary"
patrol_end_waypoint = builder.cas(patrol_end, ingress_egress_altitude)
patrol_end_waypoint.name = "FLOT END"
patrol_end_waypoint.pretty_name = "FLOT end"
patrol_end_waypoint.description = "FLOT boundary"
ingress = builder.ingress(
FlightWaypointType.INGRESS_CAS, ingress_point, location
)
ingress.description = f"Ingress to provide CAS at {location}"
return CasLayout(
departure=builder.takeoff(self.flight.departure),
nav_to=builder.nav_path(
self.flight.departure.position,
ingress,
ingress_point,
ingress_egress_altitude,
use_agl_ingress_egress,
use_agl_patrol_altitude,
),
nav_from=builder.nav_path(
egress,
patrol_end,
self.flight.arrival.position,
ingress_egress_altitude,
use_agl_ingress_egress,
use_agl_patrol_altitude,
),
patrol_start=builder.ingress(
FlightWaypointType.INGRESS_CAS, ingress, location
),
target=builder.cas(center),
patrol_end=builder.egress(egress, location),
ingress=ingress,
patrol_start=patrol_start_waypoint,
patrol_end=patrol_end_waypoint,
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> CasFlightPlan:
return CasFlightPlan(self.flight, self.layout())
def build(self, dump_debug_info: bool = False) -> CasFlightPlan:
return CasFlightPlan(self.flight, self.layout(dump_debug_info))

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime
from typing import TYPE_CHECKING, Type
from .flightplan import FlightPlan, Layout
@@ -15,10 +15,8 @@ if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
@dataclass
class CustomLayout(Layout):
custom_waypoints: list[FlightWaypoint]
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
yield from self.custom_waypoints
@@ -29,6 +27,10 @@ class CustomFlightPlan(FlightPlan[CustomLayout]):
def builder_type() -> Type[Builder]:
return Builder
@property
def is_custom(self) -> bool:
return True
@property
def tot_waypoint(self) -> FlightWaypoint:
target_types = (
@@ -42,18 +44,32 @@ class CustomFlightPlan(FlightPlan[CustomLayout]):
return waypoint
return self.layout.departure
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.tot_waypoint:
return self.package.time_over_target
return self.tot
return None
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
return None
@property
def mission_departure_time(self) -> timedelta:
def mission_begin_on_station_time(self) -> datetime | None:
return None
@property
def mission_departure_time(self) -> datetime:
return self.package.time_over_target
@property
def landing_time(self) -> datetime:
arrival = (
self.layout.custom_waypoints[-1]
if self.layout.custom_waypoints
else self.layout.departure
)
return_time = self.total_time_between_waypoints(self.tot_waypoint, arrival)
return self.mission_departure_time + return_time
class Builder(IBuilder[CustomFlightPlan, CustomLayout]):
def __init__(
@@ -65,8 +81,8 @@ class Builder(IBuilder[CustomFlightPlan, CustomLayout]):
self.waypoints = waypoints
def layout(self) -> CustomLayout:
builder = WaypointBuilder(self.flight, self.coalition)
builder = WaypointBuilder(self.flight)
return CustomLayout(builder.takeoff(self.flight.departure), self.waypoints)
def build(self) -> CustomFlightPlan:
def build(self, dump_debug_info: bool = False) -> CustomFlightPlan:
return CustomFlightPlan(self.flight, self.layout())

View File

@@ -37,5 +37,5 @@ class Builder(FormationAttackBuilder[DeadFlightPlan, FormationAttackLayout]):
return self._build(FlightWaypointType.INGRESS_DEAD)
def build(self) -> DeadFlightPlan:
def build(self, dump_debug_info: bool = False) -> DeadFlightPlan:
return DeadFlightPlan(self.flight, self.layout())

View File

@@ -1,13 +1,19 @@
from __future__ import annotations
from datetime import datetime
from typing import Type
from .airassault import AirAssaultLayout
from .airlift import AirliftLayout
from .formationattack import (
FormationAttackBuilder,
FormationAttackFlightPlan,
FormationAttackLayout,
)
from .waypointbuilder import WaypointBuilder
from .. import FlightType
from ..packagewaypoints import PackageWaypoints
from ...utils import feet
class EscortFlightPlan(FormationAttackFlightPlan):
@@ -15,46 +21,109 @@ class EscortFlightPlan(FormationAttackFlightPlan):
def builder_type() -> Type[Builder]:
return Builder
@property
def split_time(self) -> datetime:
# Avoid infinite recursion when this escort flight is itself the primary flight
# This can happen when only escort flights remain in a package
if (
self.package.primary_flight
and self.package.primary_flight != self.flight
and self.package.primary_flight.flight_plan
):
return self.package.primary_flight.flight_plan.mission_departure_time
else:
return super().split_time
class Builder(FormationAttackBuilder[EscortFlightPlan, FormationAttackLayout]):
def layout(self) -> FormationAttackLayout:
assert self.package.waypoints is not None
non_formation_escort = False
if self.package.waypoints is None:
self.package.waypoints = PackageWaypoints.create(
self.package, self.coalition, dump_debug_info=False
)
if self.package.primary_flight:
departure = self.package.primary_flight.flight_plan.layout.departure
self.package.waypoints.join = departure.position.lerp(
self.package.target.position, 0.2
)
non_formation_escort = True
builder = WaypointBuilder(self.flight, self.coalition)
builder = WaypointBuilder(self.flight)
ingress, target = builder.escort(
self.package.waypoints.ingress, self.package.target
)
if non_formation_escort:
target.position = self.package.waypoints.join
ingress.only_for_player = True
target.only_for_player = True
hold = builder.hold(self._hold_point())
join = builder.join(self.package.waypoints.join)
split = builder.split(self.package.waypoints.split)
refuel = builder.refuel(self.package.waypoints.refuel)
hold = None
if not (self.flight.is_helo or non_formation_escort):
hold = builder.hold(self._hold_point())
join_pos = (
WaypointBuilder.perturb(self.package.waypoints.ingress, feet(500))
if self.flight.is_helo
else self.package.waypoints.join
)
join = builder.join(join_pos)
split = builder.split(self._get_split())
is_helo = builder.flight.is_helo
initial = builder.escort_hold(
self.package.waypoints.initial, self.doctrine.ingress_altitude
target.position if is_helo else self.package.waypoints.initial,
)
pf = self.package.primary_flight
if pf and pf.flight_type in [FlightType.AIR_ASSAULT, FlightType.TRANSPORT]:
layout = pf.flight_plan.layout
assert isinstance(layout, AirAssaultLayout) or isinstance(
layout, AirliftLayout
)
if isinstance(layout, AirliftLayout):
ascent = layout.pickup_ascent or layout.drop_off_ascent
assert ascent is not None
join = builder.join(ascent.position)
if layout.pickup and layout.drop_off_ascent:
join = builder.join(layout.drop_off_ascent.position)
split = builder.split(layout.arrival.position)
if layout.drop_off:
initial = builder.escort_hold(
layout.drop_off.position,
)
refuel = self._build_refuel(builder)
departure = builder.takeoff(self.flight.departure)
nav_to = builder.nav_path(
hold.position if hold else departure.position,
join.position,
builder.get_cruise_altitude,
)
nav_from = builder.nav_path(
refuel.position if refuel else split.position,
self.flight.arrival.position,
builder.get_cruise_altitude,
)
return FormationAttackLayout(
departure=builder.takeoff(self.flight.departure),
departure=departure,
hold=hold,
nav_to=builder.nav_path(
hold.position, join.position, self.doctrine.ingress_altitude
),
nav_to=nav_to,
join=join,
ingress=ingress,
initial=initial,
targets=[target],
split=split,
refuel=refuel,
nav_from=builder.nav_path(
refuel.position,
self.flight.arrival.position,
self.doctrine.ingress_altitude,
),
nav_from=nav_from,
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> EscortFlightPlan:
def build(self, dump_debug_info: bool = False) -> EscortFlightPlan:
return EscortFlightPlan(self.flight, self.layout())

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime
from typing import TYPE_CHECKING, Type
from game.utils import feet
@@ -15,17 +15,16 @@ if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
@dataclass
class FerryLayout(StandardLayout):
nav_to_destination: list[FlightWaypoint]
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
yield from self.nav_to_destination
yield from self.nav_to
yield self.arrival
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
class FerryFlightPlan(StandardFlightPlan[FerryLayout]):
@@ -37,16 +36,20 @@ class FerryFlightPlan(StandardFlightPlan[FerryLayout]):
def tot_waypoint(self) -> FlightWaypoint:
return self.layout.arrival
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
# TOT planning isn't really useful for ferries. They're behind the front
# lines so no need to wait for escorts or for other missions to complete.
return None
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
return None
@property
def mission_departure_time(self) -> timedelta:
def mission_begin_on_station_time(self) -> datetime | None:
return None
@property
def mission_departure_time(self) -> datetime:
return self.package.time_over_target
@@ -58,17 +61,17 @@ class Builder(IBuilder[FerryFlightPlan, FerryLayout]):
f"{self.flight.departure}"
)
altitude_is_agl = self.flight.unit_type.dcs_unit_type.helicopter
builder = WaypointBuilder(self.flight)
altitude_is_agl = self.flight.is_helo
altitude = (
feet(1500)
feet(self.coalition.game.settings.heli_cruise_alt_agl)
if altitude_is_agl
else self.flight.unit_type.preferred_patrol_altitude
else builder.get_patrol_altitude
)
builder = WaypointBuilder(self.flight, self.coalition)
return FerryLayout(
departure=builder.takeoff(self.flight.departure),
nav_to_destination=builder.nav_path(
nav_to=builder.nav_path(
self.flight.departure.position,
self.flight.arrival.position,
altitude,
@@ -77,7 +80,9 @@ class Builder(IBuilder[FerryFlightPlan, FerryLayout]):
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
nav_from=[],
custom_waypoints=list(),
)
def build(self) -> FerryFlightPlan:
def build(self, dump_debug_info: bool = False) -> FerryFlightPlan:
return FerryFlightPlan(self.flight, self.layout())

View File

@@ -5,14 +5,14 @@ MissionPlanner. Those only plan basic information like the objective, aircraft
type, and the size of the flight. The FlightPlanBuilder is responsible for
generating the waypoints for the mission.
"""
from __future__ import annotations
import math
from abc import ABC
from abc import ABC, abstractmethod
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from functools import cached_property
from datetime import datetime, timedelta
from typing import Any, Generic, TYPE_CHECKING, TypeGuard, TypeVar
from game.typeguard import self_type_guard
@@ -20,10 +20,9 @@ from game.utils import Distance, Speed, meters
from .planningerror import PlanningError
from ..flightwaypointtype import FlightWaypointType
from ..starttype import StartType
from ..traveltime import GroundSpeed, TravelTime
from ..traveltime import GroundSpeed
if TYPE_CHECKING:
from game.dcs.aircrafttype import FuelConsumption
from game.theater import ControlPoint
from ..flight import Flight
from ..flightwaypoint import FlightWaypoint
@@ -32,24 +31,20 @@ if TYPE_CHECKING:
from .loiter import LoiterFlightPlan
from .patrolling import PatrollingFlightPlan
INGRESS_TYPES = {
FlightWaypointType.INGRESS_CAS,
FlightWaypointType.INGRESS_ESCORT,
FlightWaypointType.INGRESS_SEAD,
FlightWaypointType.INGRESS_STRIKE,
FlightWaypointType.INGRESS_DEAD,
}
@dataclass(frozen=True)
@dataclass
class Layout(ABC):
departure: FlightWaypoint
custom_waypoints: list[FlightWaypoint]
@property
def waypoints(self) -> list[FlightWaypoint]:
"""A list of all waypoints in the flight plan, in order."""
return list(self.iter_waypoints())
def delete_waypoint(self, waypoint: FlightWaypoint) -> bool:
return False
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
"""Iterates over all waypoints in the flight plan, in order."""
raise NotImplementedError
@@ -62,6 +57,12 @@ class FlightPlan(ABC, Generic[LayoutT]):
def __init__(self, flight: Flight, layout: LayoutT) -> None:
self.flight = flight
self.layout = layout
self.tot_offset = self.default_tot_offset()
def __setstate__(self, state: dict[str, Any]) -> None:
if "tot_offset" not in state:
state["tot_offset"] = self.default_tot_offset()
self.__dict__.update(state)
@property
def package(self) -> Package:
@@ -72,15 +73,6 @@ class FlightPlan(ABC, Generic[LayoutT]):
"""A list of all waypoints in the flight plan, in order."""
return list(self.iter_waypoints())
def get_index_of_wpt_by_type(self, wpt_type: FlightWaypointType) -> int:
index = 0
for wpt in self.waypoints:
if wpt and not wpt.only_for_player:
index += 1
if wpt.waypoint_type == wpt_type:
return index
return -1
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
"""Iterates over all waypoints in the flight plan, in order."""
yield from self.layout.iter_waypoints()
@@ -158,42 +150,9 @@ class FlightPlan(ABC, Generic[LayoutT]):
raise NotImplementedError
@property
def tot(self) -> timedelta:
def tot(self) -> datetime:
return self.package.time_over_target + self.tot_offset
@cached_property
def bingo_fuel(self) -> int:
"""Bingo fuel value for the FlightPlan"""
if (fuel := self.flight.unit_type.fuel_consumption) is not None:
return self._bingo_estimate(fuel)
return self._legacy_bingo_estimate()
def _bingo_estimate(self, fuel: FuelConsumption) -> int:
distance_to_arrival = self.max_distance_from(self.flight.arrival)
fuel_consumed = fuel.cruise * distance_to_arrival.nautical_miles
bingo = fuel_consumed + fuel.min_safe
return math.ceil(bingo / 100) * 100
def _legacy_bingo_estimate(self) -> int:
distance_to_arrival = self.max_distance_from(self.flight.arrival)
bingo = 1000.0 # Minimum Emergency Fuel
bingo += 500 # Visual Traffic
bingo += 15 * distance_to_arrival.nautical_miles
# TODO: Per aircraft tweaks.
if self.flight.divert is not None:
max_divert_distance = self.max_distance_from(self.flight.divert)
bingo += 10 * max_divert_distance.nautical_miles
return round(bingo / 100) * 100
@cached_property
def joker_fuel(self) -> int:
"""Joker fuel value for the FlightPlan"""
return self.bingo_fuel + 1000
def max_distance_from(self, cp: ControlPoint) -> Distance:
"""Returns the farthest waypoint of the flight plan from a ControlPoint.
:arg cp The ControlPoint to measure distance from.
@@ -204,8 +163,7 @@ class FlightPlan(ABC, Generic[LayoutT]):
[meters(cp.position.distance_to_point(w.position)) for w in self.waypoints]
)
@property
def tot_offset(self) -> timedelta:
def default_tot_offset(self) -> timedelta:
"""This flight's offset from the package's TOT.
Positive values represent later TOTs. An offset of -2 minutes is used
@@ -223,20 +181,37 @@ class FlightPlan(ABC, Generic[LayoutT]):
)
for previous_waypoint, waypoint in self.edges(until=destination):
total += self.travel_time_between_waypoints(previous_waypoint, waypoint)
return total
total += self.total_time_between_waypoints(previous_waypoint, waypoint)
# Trim microseconds. Our simulation tick rate is 1 second, so anything that
# takes 100.1 or 100.9 seconds will take 100 seconds. DCS doesn't handle
# sub-second resolution for tasks anyway, nor are they interesting from a
# mission planning perspective, so there's little value to keeping them in the
# model.
return timedelta(seconds=math.floor(total.total_seconds()))
def total_time_between_waypoints(
self, a: FlightWaypoint, b: FlightWaypoint
) -> timedelta:
"""Returns the total time spent between a and b.
The total time between waypoints differs from the travel time in that it may
include additional time for actions such as loitering.
"""
return self.travel_time_between_waypoints(a, b)
def travel_time_between_waypoints(
self, a: FlightWaypoint, b: FlightWaypoint
) -> timedelta:
return TravelTime.between_points(
a.position, b.position, self.speed_between_waypoints(a, b)
)
error_factor = 1.05
speed = self.speed_between_waypoints(a, b)
distance = meters(a.position.distance_to_point(b.position))
return timedelta(hours=distance.nautical_miles / speed.knots * error_factor)
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
raise NotImplementedError
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
raise NotImplementedError
def request_escort_at(self) -> FlightWaypoint | None:
@@ -259,39 +234,31 @@ class FlightPlan(ABC, Generic[LayoutT]):
if waypoint == end:
return
def takeoff_time(self) -> timedelta:
def takeoff_time(self) -> datetime:
return self.tot - self._travel_time_to_waypoint(self.tot_waypoint)
def startup_time(self) -> timedelta:
start_time = (
self.takeoff_time() - self.estimate_startup() - self.estimate_ground_ops()
def minimum_duration_from_start_to_tot(self) -> timedelta:
return (
self._travel_time_to_waypoint(self.tot_waypoint)
+ self.estimate_startup()
+ self.estimate_ground_ops()
+ self.estimate_takeoff_time()
)
# In case FP math has given us some barely below zero time, round to
# zero.
if math.isclose(start_time.total_seconds(), 0):
start_time = timedelta()
# Trim microseconds. DCS doesn't handle sub-second resolution for tasks,
# and they're not interesting from a mission planning perspective so we
# don't want them in the UI.
#
# Round down so *barely* above zero start times are just zero.
start_time = timedelta(seconds=math.floor(start_time.total_seconds()))
# Feature request #1309: Carrier planes should start at +1s
# This is a workaround to a DCS problem: some AI planes spawn on
# the 'sixpack' when start_time is zero and cause a deadlock.
# Workaround: force the start_time to 1 second for these planes.
if self.flight.from_cp.is_fleet and start_time.total_seconds() == 0:
start_time = timedelta(seconds=1)
return start_time
def startup_time(self) -> datetime:
return (
self.takeoff_time()
- self.estimate_startup()
- self.estimate_ground_ops()
- self.estimate_takeoff_time()
)
def estimate_startup(self) -> timedelta:
if self.flight.start_type is StartType.COLD:
if self.flight.client_count:
return timedelta(minutes=10)
return timedelta(
minutes=self.flight.coalition.game.settings.player_startup_time
)
else:
# The AI doesn't seem to have a real startup procedure.
return timedelta(minutes=2)
@@ -300,16 +267,39 @@ class FlightPlan(ABC, Generic[LayoutT]):
def estimate_ground_ops(self) -> timedelta:
if self.flight.start_type in {StartType.RUNWAY, StartType.IN_FLIGHT}:
return timedelta()
if self.flight.from_cp.is_fleet:
if self.flight.departure.is_fleet or self.flight.departure.is_fob:
return timedelta(minutes=2)
else:
return timedelta(minutes=8)
def estimate_takeoff_time(self) -> timedelta:
if self.flight.departure.is_offmap:
return timedelta()
return timedelta(seconds=30)
@property
def mission_departure_time(self) -> timedelta:
def is_airassault(self) -> bool:
return False
@property
@abstractmethod
def mission_begin_on_station_time(self) -> datetime | None:
"""The time that the mission is first on-station."""
...
@property
def is_custom(self) -> bool:
return False
@property
def mission_departure_time(self) -> datetime:
"""The time that the mission is complete and the flight RTBs."""
raise NotImplementedError
@property
def landing_time(self) -> datetime:
raise NotImplementedError
@self_type_guard
def is_loiter(self, flight_plan: FlightPlan[Any]) -> TypeGuard[LoiterFlightPlan]:
return False

View File

@@ -3,10 +3,12 @@ from __future__ import annotations
from typing import Any, TYPE_CHECKING, Type
from game.ato import FlightType
from game.theater.controlpoint import NavalControlPoint
from .aewc import AewcFlightPlan
from .airassault import AirAssaultFlightPlan
from .airlift import AirliftFlightPlan
from .antiship import AntiShipFlightPlan
from .armedrecon import ArmedReconFlightPlan
from .bai import BaiFlightPlan
from .barcap import BarCapFlightPlan
from .cas import CasFlightPlan
@@ -18,7 +20,10 @@ from .ocaaircraft import OcaAircraftFlightPlan
from .ocarunway import OcaRunwayFlightPlan
from .packagerefueling import PackageRefuelingFlightPlan
from .planningerror import PlanningError
from .pretensecargo import PretenseCargoFlightPlan
from .sead import SeadFlightPlan
from .seadsweep import SeadSweepFlightPlan
from .shiprecoverytanker import RecoveryTankerFlightPlan
from .strike import StrikeFlightPlan
from .sweep import SweepFlightPlan
from .tarcap import TarCapFlightPlan
@@ -51,6 +56,7 @@ class FlightPlanBuilderTypes:
FlightType.OCA_RUNWAY: OcaRunwayFlightPlan.builder_type(),
FlightType.SEAD: SeadFlightPlan.builder_type(),
FlightType.SEAD_ESCORT: EscortFlightPlan.builder_type(),
FlightType.SEAD_SWEEP: SeadSweepFlightPlan.builder_type(),
FlightType.STRIKE: StrikeFlightPlan.builder_type(),
FlightType.SWEEP: SweepFlightPlan.builder_type(),
FlightType.TARCAP: TarCapFlightPlan.builder_type(),
@@ -58,6 +64,9 @@ class FlightPlanBuilderTypes:
FlightType.TRANSPORT: AirliftFlightPlan.builder_type(),
FlightType.FERRY: FerryFlightPlan.builder_type(),
FlightType.AIR_ASSAULT: AirAssaultFlightPlan.builder_type(),
FlightType.PRETENSE_CARGO: PretenseCargoFlightPlan.builder_type(),
FlightType.ARMED_RECON: ArmedReconFlightPlan.builder_type(),
FlightType.RECOVERY: RecoveryTankerFlightPlan.builder_type(),
}
try:
return builder_dict[flight.flight_type]

View File

@@ -2,34 +2,38 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime, timedelta
from functools import cached_property
from typing import Any, TYPE_CHECKING, TypeGuard
from typing import Any, TYPE_CHECKING, TypeGuard, Optional
from game.typeguard import self_type_guard
from game.utils import Speed
from .flightplan import FlightPlan
from .loiter import LoiterFlightPlan, LoiterLayout
from ..traveltime import GroundSpeed, TravelTime
if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
@dataclass
class FormationLayout(LoiterLayout, ABC):
nav_to: list[FlightWaypoint]
join: FlightWaypoint
split: FlightWaypoint
refuel: FlightWaypoint
nav_from: list[FlightWaypoint]
refuel: Optional[FlightWaypoint]
def delete_waypoint(self, waypoint: FlightWaypoint) -> bool:
if waypoint == self.refuel:
self.refuel = None
return True
elif super().delete_waypoint(waypoint):
return True
return False
class FormationFlightPlan(LoiterFlightPlan, ABC):
@property
@abstractmethod
def package_speed_waypoints(self) -> set[FlightWaypoint]:
...
def package_speed_waypoints(self) -> set[FlightWaypoint]: ...
@property
def combat_speed_waypoints(self) -> set[FlightWaypoint]:
@@ -59,11 +63,10 @@ class FormationFlightPlan(LoiterFlightPlan, ABC):
return min(speeds)
def speed_between_waypoints(self, a: FlightWaypoint, b: FlightWaypoint) -> Speed:
if b in self.package_speed_waypoints:
# Should be impossible, as any package with at least one
# FormationFlightPlan flight needs a formation speed.
assert self.package.formation_speed is not None
return self.package.formation_speed
if (
speed := self.package.formation_speed(self.flight.is_helo)
) and b in self.package_speed_waypoints:
return speed
return super().speed_between_waypoints(a, b)
@property
@@ -73,15 +76,13 @@ class FormationFlightPlan(LoiterFlightPlan, ABC):
@property
@abstractmethod
def join_time(self) -> timedelta:
...
def join_time(self) -> datetime: ...
@property
@abstractmethod
def split_time(self) -> timedelta:
...
def split_time(self) -> datetime: ...
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.layout.join:
return self.join_time
elif waypoint == self.layout.split:
@@ -89,15 +90,23 @@ class FormationFlightPlan(LoiterFlightPlan, ABC):
return None
@property
def push_time(self) -> timedelta:
return self.join_time - TravelTime.between_points(
self.layout.hold.position,
self.layout.join.position,
GroundSpeed.for_flight(self.flight, self.layout.hold.alt),
def push_time(self) -> datetime:
hold2join_time = (
self.travel_time_between_waypoints(
self.layout.hold,
self.layout.join,
)
if self.layout.hold
else timedelta(0)
)
return self.join_time - hold2join_time
@property
def mission_departure_time(self) -> timedelta:
def mission_begin_on_station_time(self) -> datetime | None:
return None
@property
def mission_departure_time(self) -> datetime:
return self.split_time
@self_type_guard

View File

@@ -3,14 +3,15 @@ from __future__ import annotations
from abc import ABC
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from typing import TYPE_CHECKING, TypeVar, Optional
from datetime import datetime, timedelta
from typing import Optional
from typing import TYPE_CHECKING, TypeVar
from dcs import Point
from game.flightplan import HoldZoneGeometry
from game.theater import MissionTarget
from game.utils import Speed, meters, Distance
from game.utils import nautical_miles, Speed, feet
from .flightplan import FlightPlan
from .formation import FormationFlightPlan, FormationLayout
from .ibuilder import IBuilder
@@ -25,10 +26,6 @@ if TYPE_CHECKING:
class FormationAttackFlightPlan(FormationFlightPlan, ABC):
@property
def lead_time(self) -> timedelta:
return timedelta()
@property
def package_speed_waypoints(self) -> set[FlightWaypoint]:
return {
@@ -42,28 +39,22 @@ class FormationAttackFlightPlan(FormationFlightPlan, ABC):
if b.waypoint_type == FlightWaypointType.TARGET_GROUP_LOC:
# Should be impossible, as any package with at least one
# FormationFlightPlan flight needs a formation speed.
assert self.package.formation_speed is not None
return self.package.formation_speed
speed = self.package.formation_speed(self.flight.is_helo)
assert speed is not None
return speed
return super().speed_between_waypoints(a, b)
@property
def tot_waypoint(self) -> FlightWaypoint:
return self.layout.targets[0]
@property
def tot_offset(self) -> timedelta:
try:
return -self.lead_time
except AttributeError:
return timedelta()
@property
def target_area_waypoint(self) -> FlightWaypoint:
return FlightWaypoint(
"TARGET AREA",
FlightWaypointType.TARGET_GROUP_LOC,
self.package.target.position,
meters(0),
feet(0),
"RADIO",
)
@@ -91,18 +82,18 @@ class FormationAttackFlightPlan(FormationFlightPlan, ABC):
return total
@property
def join_time(self) -> timedelta:
travel_time = self.travel_time_between_waypoints(
def join_time(self) -> datetime:
travel_time = self.total_time_between_waypoints(
self.layout.join, self.layout.ingress
)
return self.ingress_time - travel_time
@property
def split_time(self) -> timedelta:
travel_time_ingress = self.travel_time_between_waypoints(
def split_time(self) -> datetime:
travel_time_ingress = self.total_time_between_waypoints(
self.layout.ingress, self.target_area_waypoint
)
travel_time_egress = self.travel_time_between_waypoints(
travel_time_egress = self.total_time_between_waypoints(
self.target_area_waypoint, self.layout.split
)
minutes_at_target = 0.75 * len(self.layout.targets)
@@ -115,32 +106,46 @@ class FormationAttackFlightPlan(FormationFlightPlan, ABC):
)
@property
def ingress_time(self) -> timedelta:
def ingress_time(self) -> datetime:
tot = self.tot
travel_time = self.travel_time_between_waypoints(
travel_time = self.total_time_between_waypoints(
self.layout.ingress, self.target_area_waypoint
)
return tot - travel_time
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
@property
def initial_time(self) -> datetime:
tot = self.tot
travel_time = self.travel_time_between_waypoints(
self.layout.initial, self.target_area_waypoint
)
return tot - travel_time
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.layout.ingress:
return self.ingress_time
elif waypoint == self.layout.initial:
return self.initial_time
elif waypoint in self.layout.targets:
return self.tot
return super().tot_for_waypoint(waypoint)
@dataclass(frozen=True)
@dataclass
class FormationAttackLayout(FormationLayout):
ingress: FlightWaypoint
targets: list[FlightWaypoint]
initial: Optional[FlightWaypoint] = None
lineup: Optional[FlightWaypoint] = None
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
yield self.hold
if self.hold:
yield self.hold
yield from self.nav_to
yield self.join
if self.lineup:
yield self.lineup
yield self.ingress
if self.initial is not None:
yield self.initial
@@ -153,6 +158,7 @@ class FormationAttackLayout(FormationLayout):
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
FlightPlanT = TypeVar("FlightPlanT", bound=FlightPlan[FormationAttackLayout])
@@ -166,7 +172,7 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
targets: list[StrikeTarget] | None = None,
) -> FormationAttackLayout:
assert self.package.waypoints is not None
builder = WaypointBuilder(self.flight, self.coalition, targets)
builder = WaypointBuilder(self.flight, targets)
target_waypoints: list[FlightWaypoint] = []
if targets is not None:
@@ -181,36 +187,84 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
)
)
hold = builder.hold(self._hold_point())
join = builder.join(self.package.waypoints.join)
split = builder.split(self.package.waypoints.split)
refuel = builder.refuel(self.package.waypoints.refuel)
hold = None
if not self.flight.is_helo:
hold = builder.hold(self._hold_point())
join_pos = self.package.waypoints.join
if self.flight.is_helo:
join_pos = self.package.waypoints.ingress
join_pos = WaypointBuilder.perturb(join_pos, feet(500))
join = builder.join(join_pos)
split = builder.split(self._get_split())
refuel = self._build_refuel(builder)
ingress = builder.ingress(
ingress_type, self.package.waypoints.ingress, self.package.target
)
initial = None
if ingress_type == FlightWaypointType.INGRESS_SEAD:
initial = builder.sead_search(self.package.target)
elif ingress_type == FlightWaypointType.INGRESS_SEAD_SWEEP:
initial = builder.sead_sweep(self.package.target)
lineup = None
if self.flight.flight_type == FlightType.STRIKE:
hdg = self.package.target.position.heading_between_point(ingress.position)
pos = ingress.position.point_from_heading(hdg, nautical_miles(10).meters)
lineup = builder.nav(pos, builder.get_combat_altitude)
is_helo = self.flight.is_helo
ingress_egress_altitude = builder.get_combat_altitude
use_agl_ingress_egress = is_helo
return FormationAttackLayout(
departure=builder.takeoff(self.flight.departure),
hold=hold,
nav_to=builder.nav_path(
hold.position, join.position, self.doctrine.ingress_altitude
hold.position if hold else self.flight.departure.position,
join.position if join else ingress.position,
ingress_egress_altitude,
use_agl_ingress_egress,
),
join=join,
lineup=lineup,
ingress=ingress,
initial=initial,
targets=target_waypoints,
split=split,
refuel=refuel,
nav_from=builder.nav_path(
refuel.position,
refuel.position if refuel else split.position,
self.flight.arrival.position,
self.doctrine.ingress_altitude,
ingress_egress_altitude,
use_agl_ingress_egress,
),
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def _build_refuel(self, builder: WaypointBuilder) -> Optional[FlightWaypoint]:
refuel: Optional[FlightWaypoint] = None
can_plan = self.flight.coalition.air_wing.can_auto_plan(FlightType.REFUELING)
if not self.flight.is_helo and can_plan and self.package.waypoints:
refuel = builder.refuel(self.package.waypoints.refuel)
return refuel
@property
def primary_flight_is_air_assault(self) -> bool:
if self.flight is self.package.primary_flight:
# Can't call self.package.primary_flight.flight_plan here
# because the flight-plan wasn't created yet.
# Calling the fligh_plan property would result in infinite recursion
return self.flight.flight_type == FlightType.AIR_ASSAULT
else:
assert self.package.primary_flight is not None
fp = self.package.primary_flight.flight_plan
return fp.is_airassault
@staticmethod
def target_waypoint(
flight: Flight, builder: WaypointBuilder, target: StrikeTarget
@@ -219,7 +273,7 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
return builder.bai_group(target)
elif flight.flight_type == FlightType.DEAD:
return builder.dead_point(target)
elif flight.flight_type == FlightType.SEAD:
elif flight.flight_type in {FlightType.SEAD, FlightType.SEAD_SWEEP}:
return builder.sead_point(target)
else:
return builder.strike_point(target)
@@ -234,6 +288,8 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
return builder.sead_area(location)
elif flight.flight_type == FlightType.OCA_AIRCRAFT:
return builder.oca_strike_area(location)
elif flight.flight_type == FlightType.ARMED_RECON:
return builder.armed_recon_area(location)
else:
return builder.strike_area(location)
@@ -246,3 +302,13 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
return HoldZoneGeometry(
target, origin, ip, join, self.coalition, self.theater
).find_best_hold_point()
def _get_split(self) -> Point:
assert self.package.waypoints is not None
assert self.package.primary_flight is not None
split_pos = (
self.package.primary_flight.arrival.position
if self.package.primary_flight.is_helo
else self.package.waypoints.split
)
return split_pos

View File

@@ -11,7 +11,7 @@ from ..packagewaypoints import PackageWaypoints
if TYPE_CHECKING:
from game.coalition import Coalition
from game.data.doctrine import Doctrine
from game.theater import ConflictTheater
from game.theater import ConflictTheater, Player
from game.threatzones import ThreatZones
from ..flight import Flight
from ..package import Package
@@ -25,6 +25,7 @@ class IBuilder(ABC, Generic[FlightPlanT, LayoutT]):
def __init__(self, flight: Flight) -> None:
self.flight = flight
self._flight_plan: FlightPlanT | None = None
self.settings = self.flight.coalition.game.settings
def get_or_build(self) -> FlightPlanT:
if self._flight_plan is None:
@@ -32,21 +33,26 @@ class IBuilder(ABC, Generic[FlightPlanT, LayoutT]):
assert self._flight_plan is not None
return self._flight_plan
def regenerate(self) -> None:
def regenerate(self, dump_debug_info: bool = False) -> None:
try:
self._generate_package_waypoints_if_needed()
self._flight_plan = self.build()
self._generate_package_waypoints_if_needed(dump_debug_info)
self._flight_plan = self.build(dump_debug_info)
except NavMeshError as ex:
color = "blue" if self.flight.squadron.player else "red"
color = "blue" if self.flight.squadron.player.is_blue else "red"
raise PlanningError(
f"Could not plan {color} {self.flight.flight_type.value} from "
f"{self.flight.departure} to {self.package.target}"
) from ex
def _generate_package_waypoints_if_needed(self) -> None:
if self.package.waypoints is None:
def _generate_package_waypoints_if_needed(self, dump_debug_info: bool) -> None:
# Package waypoints are only valid for offensive missions. Skip this if the
# target is friendly.
if self.package.target.is_friendly(self.is_player):
return
if self.package.waypoints is None or dump_debug_info:
self.package.waypoints = PackageWaypoints.create(
self.package, self.coalition
self.package, self.coalition, dump_debug_info
)
@property
@@ -54,12 +60,7 @@ class IBuilder(ABC, Generic[FlightPlanT, LayoutT]):
return self.flight.departure.theater
@abstractmethod
def layout(self) -> LayoutT:
...
@abstractmethod
def build(self) -> FlightPlanT:
...
def build(self, dump_debug_info: bool = False) -> FlightPlanT: ...
@property
def package(self) -> Package:
@@ -70,7 +71,7 @@ class IBuilder(ABC, Generic[FlightPlanT, LayoutT]):
return self.flight.coalition
@property
def is_player(self) -> bool:
def is_player(self) -> Player:
return self.coalition.player
@property

View File

@@ -2,8 +2,9 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime, timedelta
from typing import Any, TYPE_CHECKING, TypeGuard
from typing import Optional
from game.typeguard import self_type_guard
from .flightplan import FlightPlan
@@ -13,9 +14,9 @@ if TYPE_CHECKING:
from ..flightwaypoint import FlightWaypoint
@dataclass(frozen=True)
@dataclass
class LoiterLayout(StandardLayout, ABC):
hold: FlightWaypoint
hold: Optional[FlightWaypoint]
class LoiterFlightPlan(StandardFlightPlan[Any], ABC):
@@ -25,18 +26,17 @@ class LoiterFlightPlan(StandardFlightPlan[Any], ABC):
@property
@abstractmethod
def push_time(self) -> timedelta:
...
def push_time(self) -> datetime: ...
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.layout.hold:
return self.push_time
return None
def travel_time_between_waypoints(
def total_time_between_waypoints(
self, a: FlightWaypoint, b: FlightWaypoint
) -> timedelta:
travel_time = super().travel_time_between_waypoints(a, b)
travel_time = super().total_time_between_waypoints(a, b)
if a != self.layout.hold:
return travel_time
return travel_time + self.hold_duration

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import logging
from typing import Type
from game.theater import Airfield
from game.theater import Airfield, Fob
from .formationattack import (
FormationAttackBuilder,
FormationAttackFlightPlan,
@@ -23,7 +23,7 @@ class Builder(FormationAttackBuilder[OcaAircraftFlightPlan, FormationAttackLayou
def layout(self) -> FormationAttackLayout:
location = self.package.target
if not isinstance(location, Airfield):
if not isinstance(location, Airfield) and not isinstance(location, Fob):
logging.exception(
f"Invalid Objective Location for OCA/Aircraft flight "
f"{self.flight=} at {location=}."
@@ -32,5 +32,5 @@ class Builder(FormationAttackBuilder[OcaAircraftFlightPlan, FormationAttackLayou
return self._build(FlightWaypointType.INGRESS_OCA_AIRCRAFT)
def build(self) -> OcaAircraftFlightPlan:
def build(self, dump_debug_info: bool = False) -> OcaAircraftFlightPlan:
return OcaAircraftFlightPlan(self.flight, self.layout())

View File

@@ -32,5 +32,5 @@ class Builder(FormationAttackBuilder[OcaRunwayFlightPlan, FormationAttackLayout]
return self._build(FlightWaypointType.INGRESS_OCA_RUNWAY)
def build(self) -> OcaRunwayFlightPlan:
def build(self, dump_debug_info: bool = False) -> OcaRunwayFlightPlan:
return OcaRunwayFlightPlan(self.flight, self.layout())

View File

@@ -1,11 +1,11 @@
from __future__ import annotations
from datetime import timedelta
from datetime import datetime, timedelta
from typing import Type
from dcs import Point
from game.utils import Distance, Heading, feet, meters
from game.utils import Distance, Heading, meters
from .ibuilder import IBuilder
from .patrolling import PatrollingLayout
from .refuelingflightplan import RefuelingFlightPlan
@@ -39,7 +39,7 @@ class PackageRefuelingFlightPlan(RefuelingFlightPlan):
)
@property
def patrol_start_time(self) -> timedelta:
def patrol_start_time(self) -> datetime:
altitude = self.flight.unit_type.patrol_altitude
if altitude is None:
@@ -59,10 +59,10 @@ class PackageRefuelingFlightPlan(RefuelingFlightPlan):
"REFUEL", FlightWaypointType.REFUEL, refuel, altitude
)
delay_target_to_split: timedelta = self.travel_time_between_waypoints(
delay_target_to_split: timedelta = self.total_time_between_waypoints(
self.target_area_waypoint(), split_waypoint
)
delay_split_to_refuel: timedelta = self.travel_time_between_waypoints(
delay_split_to_refuel: timedelta = self.total_time_between_waypoints(
split_waypoint, refuel_waypoint
)
@@ -96,13 +96,9 @@ class Builder(IBuilder[PackageRefuelingFlightPlan, PatrollingLayout]):
home_heading.degrees, racetrack_half_distance
)
builder = WaypointBuilder(self.flight, self.coalition)
builder = WaypointBuilder(self.flight)
tanker_type = self.flight.unit_type
if tanker_type.patrol_altitude is not None:
altitude = tanker_type.patrol_altitude
else:
altitude = feet(21000)
altitude = builder.get_patrol_altitude
racetrack = builder.race_track(racetrack_start, racetrack_end, altitude)
@@ -119,7 +115,8 @@ class Builder(IBuilder[PackageRefuelingFlightPlan, PatrollingLayout]):
arrival=builder.land(self.flight.arrival),
divert=builder.divert(self.flight.divert),
bullseye=builder.bullseye(),
custom_waypoints=list(),
)
def build(self) -> PackageRefuelingFlightPlan:
def build(self, dump_debug_info: bool = False) -> PackageRefuelingFlightPlan:
return PackageRefuelingFlightPlan(self.flight, self.layout())

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from collections.abc import Iterator
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime, timedelta
from typing import Any, TYPE_CHECKING, TypeGuard, TypeVar
from game.ato.flightplans.standard import StandardFlightPlan, StandardLayout
@@ -16,12 +16,10 @@ if TYPE_CHECKING:
from .flightplan import FlightPlan
@dataclass(frozen=True)
@dataclass
class PatrollingLayout(StandardLayout):
nav_to: list[FlightWaypoint]
patrol_start: FlightWaypoint
patrol_end: FlightWaypoint
nav_from: list[FlightWaypoint]
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.departure
@@ -33,6 +31,7 @@ class PatrollingLayout(StandardLayout):
if self.divert is not None:
yield self.divert
yield self.bullseye
yield from self.custom_waypoints
LayoutT = TypeVar("LayoutT", bound=PatrollingLayout)
@@ -61,26 +60,29 @@ class PatrollingFlightPlan(StandardFlightPlan[LayoutT], UiZoneDisplay, ABC):
"""
@property
def patrol_start_time(self) -> timedelta:
return self.package.time_over_target
def patrol_start_time(self) -> datetime:
return self.tot
@property
def patrol_end_time(self) -> timedelta:
def patrol_end_time(self) -> datetime:
# TODO: This is currently wrong for CAS.
# CAS missions end when they're winchester or bingo. We need to
# configure push tasks for the escorts rather than relying on timing.
return self.patrol_start_time + self.patrol_duration
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def tot_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.layout.patrol_start:
return self.patrol_start_time
return None
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None:
def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> datetime | None:
if waypoint == self.layout.patrol_end:
return self.patrol_end_time
return None
def takeoff_time(self) -> datetime:
return self.patrol_start_time - self._travel_time_to_waypoint(self.tot_waypoint)
@property
def package_speed_waypoints(self) -> set[FlightWaypoint]:
return {self.layout.patrol_start, self.layout.patrol_end}
@@ -90,7 +92,11 @@ class PatrollingFlightPlan(StandardFlightPlan[LayoutT], UiZoneDisplay, ABC):
return self.layout.patrol_start
@property
def mission_departure_time(self) -> timedelta:
def mission_begin_on_station_time(self) -> datetime | None:
return self.patrol_start_time
@property
def mission_departure_time(self) -> datetime:
return self.patrol_end_time
@self_type_guard

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