897 Commits

Author SHA1 Message Date
RndName
f0476fcbb3
Fix AAA Flak generator using wrong index
- Fixes #1519 as the Opel Blitz unit generator was using the index without incrementing it
2021-08-08 13:20:26 +02:00
Magnus Wolffelt
03471c6c13
Fix patrol_speed save compat for 4.1 (#1507)
* Fix patrol_speed save compat for 4.1

* Fix and simplify 4.1 compat fix
2021-08-05 12:19:59 +02:00
Kangwook Lee
8282a95569 Wrap lines for NotesPage
(cherry picked from commit 8608b73009bbb752c9d7e9b7cf8977bdd4591d37)
2021-08-04 23:28:07 -07:00
Dan Albert
283fc26385 Stop cluttering the kneeboard with empty notes.
(cherry picked from commit d11174da21fccbf348b42212f911300fa7d09d49)
2021-08-04 23:28:07 -07:00
Kangwook Lee
5729cc5f42 Fix text foreground color for dark kneeboard
(cherry picked from commit 77e62d5a544a59646be4ac4d3394605fbfc75752)
2021-08-04 23:13:18 -07:00
Magnus Wolffelt
570108e2a7 Use more sensible patrol speeds for CAP, and fix is_helo (#1492)
* Use more sensible patrol speeds for CAP, and fix is_helo
2021-08-03 12:48:37 +02:00
Magnus Wolffelt
3dc71a558d Estimate preferred patrol altitude based on max speed
(cherry picked from commit a3e3e9046f4c629114e8f46e5ef6b6718c6852c2)
2021-08-01 15:32:03 -07:00
Mustang-25
28fbd448b0 Rebalanced Aircraft Planning Hierarchies
CAP List:
[+] Mig-21 #1372
[+] Su-34
[moved up] F-15C above the F-14 (probably contentious to some but IMO the AI never capitalizes on the AIM-54 range and the Eagle AI seems to do better in general)
[moved up] JF-17
[moved up] Gripen
[moved down] Su-33
[moved down] Su-27
[moved down] MiG-31
[moved down] MiG-25
[moved down] MiG-29G
[moved down] MiG-29A

* Downgraded MiGs and Sukhois that do not have Fox-3s due to this disadvantage. From personal experience, the 31s and 25s also won't use the longer range of their Fox-1s to warrant for a higher spot on the list.

CAS/BAI List:
[+] Su-33 #1367
[-] Su-24MR (dedicated recce platform, no AG munitions)
[moved up] Su-34
[moved down] Mig-19P
[moved down] UH-1

Strike List:
[-] Su-24MR (dedicated recce platform, no AG munitions)
[moved up] JF-17
[moved up] Harrier

Runway Attack List:
[+] Mirage 2000C

(cherry picked from commit 0d6f420f97ed40b6c85e81aa57fc46ee63e0067d)
2021-07-31 14:57:56 -07:00
Khopa
5febba9640 Added Tin Shield EWR support
(cherry picked from commit 32f05dccd928ab7b5ea7c17b30f4997c5b92c358)
2021-07-31 14:27:22 -07:00
Khopa
7dea51321f Added NASAMS support
(cherry picked from commit 4aac2d2b7bf7089b61740f089c7063cf77dec233)
2021-07-31 14:27:17 -07:00
Dan Albert
08919d4b8e Work around pydcs bug.
https://github.com/pydcs/dcs/issues/175 causes setting the AI comm
frequency to raise an exception for aircraft without preset channel
support.

(cherry picked from commit 5d8f6552439100d99b340a91de43f4e053d8c0f9)
2021-07-31 14:24:47 -07:00
bgreman
0332c32bb3 Updates gripen support fixes legacy DEAD loadouts 2021-07-31 12:15:54 -04:00
Dan Albert
a22f1d8e63 Correct int/float confusion in Point APIs.
The heading and distance calculations always return floats.

(cherry picked from commit 6ce02282e74fd3455c3a63880330c05b63a35bff)
2021-07-11 14:34:43 -07:00
Dan Albert
5860518f92 Use Pillow types from typeshed.
(cherry picked from commit a19a0b678974632549b418764c86b4714354cee1)
2021-07-11 13:54:19 -07:00
Dan Albert
68473ae63a Update to latest pydcs.
This includes the basics that we need to get type checking for pydcs
calls.

Type checking has been disabled in a few monkey-patching cases. Patches
ought to be sent upstream (or in the case of dead unit tracking,
replaced with a better model).

(cherry picked from commit 9de08dc83ff1ed30b15f5c7acc21da316fce9b6b)
2021-07-11 13:38:54 -07:00
Dan Albert
1ea13954ec More adaptation for pydcs updates.
This is as much as we can do until pydcs actually adds the py.typed
file. Once that's added there are a few ugly monkey patching corners
that will just need `# type: ignore` for now, but we can't pre-add those
since we have mypy warning us about superfluous ignore comments.

(cherry picked from commit 96c7b87ac7ef9382ffad9c3b5846fd8c0df8b0a2)
2021-07-11 13:38:50 -07:00
Brock Greman
53a1c938c3 Fixing broken group generation.
(cherry picked from commit 469dd49defabf7f7c607f6dc5f9c6a82beb04c29)
2021-07-11 13:38:41 -07:00
Dan Albert
229a2cd7a4 Fix some typing in preparation for pydcs types.
Not complete, but progress.

(cherry picked from commit 53f6a0b32b922110ccc163e3221a0f6cfd445ef9)
2021-07-11 13:38:40 -07:00
Dan Albert
19980e5d6b Flesh out typing information, enforce.
(cherry picked from commit fb9a0fe833198d41a911f22d5efc4e3c4829c316)
2021-07-07 17:42:21 -07:00
Dan Albert
85be9df481 Disallow partially specified generics.
(cherry picked from commit 69c3d41a8ad967db27e99235c2f7b9196d29e6b9)
2021-07-07 16:07:58 -07:00
Dan Albert
9bc8b51794 Type check the contents of untyped functions.
By default mypy doesn't type check the code within an untyped function.
This enables that and fixes typing errors to accomodate it.

This did uncover a very old bug:
https://github.com/dcs-liberation/dcs_liberation/issues/1417

(cherry picked from commit fc32b983413dd741a23d33db6da89ddcba7bed64)
2021-07-07 16:07:57 -07:00
Dan Albert
e9bc3f3e69 Fix unreachable code issues, enable checking.
The loadout case actually could (and previously did) hide bugs from the
type checker, since mypy was smart enough to see that we were removing
None from the input it assumed that the member was non-optional, but
later modifications could cause null values, and since those came from
the UI mypy couldn't reason about this. This meant that mypy assumed the
type could not be optional and wouldn't check that case.

(cherry picked from commit 299ed88f09d506df1a10e5454b237263e5cbeeab)
2021-07-07 16:07:56 -07:00
bgreman
8fae7decca Adds Marianas Islands support (#1406)
* Implements #1399

* Reverting accidental change in generate_landmap.py

* Changelog update

* Import beacon data for Marianas.

Co-authored-by: Dan Albert <dan@gingerhq.net>
(cherry picked from commit aa328d3ef715bd86180b29d8784ae9040d51aec6)
2021-07-03 14:52:21 -04:00
Dan Albert
3415525e2c Fixup None loadouts for aircraft with no loadouts.
Aircraft that have no loadouts at all (such as the IL-78M) will have no
loadouts and thus no values in the dropdown menu. If the player toggles
the custom layout box we reset the flight's loadout to the selected
loadout, and with no loadouts in the combo box that is None, and
`Flight.loadout` isn't supposed to be optional.

Check for that case in the loadout selector and replace with an empty
loadout if that happens.

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

(cherry picked from commit 727facfb90dac06c3eb74b90e0296a097fae79a3)
2021-07-02 17:33:40 -07:00
Dan Albert
355ea9f9be Fix the legacy tanker.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1379

(cherry picked from commit 4add8534735c75865955ec7a00a45c43bcf78cde)
2021-07-02 17:18:31 -07:00
RndName
eff674c441 remove prices from sam generators
The prices are only estimations due to randomization. the real price will be only known when the generator was used and the final units are known

(cherry picked from commit b2db27f9aa06ddbeb6c9e87686abb04cd2f2bb16)
2021-07-02 16:46:29 -07:00
RndName
9858e3e257 correct prices for ewr and sams
prices will now be calculated for the whole group by the generator by
looking up the price using the  GroundUnitType wrapper

fixes #1163

(cherry picked from commit 96be6c0efe4b6b0f3af38bf5c43a9818e1eed4e6)
2021-07-02 16:46:28 -07:00
Mustang-25
3dbfa8ca60 Corrected Silkworm launcher name
(cherry picked from commit bab8384803eb0bcf16f1a3e599c6555a060ac304)
2021-07-02 16:28:34 -07:00
Florian
779dc8ad70 Remove the randomness from SAM group size.
(cherry picked from commit 3f65928e9d1012cff95029ce03bec08db682ea92)
2021-07-02 01:38:37 -07:00
RndName
e0a4ceef67 reworked the skynet group name generation
- added information about the role of the aa site
- moved handling of ground name from tgo to the sam generator to make the tgo cleaner
- adjusted the skynet-config lua to the changes

(cherry picked from commit de443fa3f0ac7ab2d450ec097cf7ac94f17f3506)
2021-07-02 01:25:17 -07:00
Chris Seagraves
f588c445ae Notes to kneeboard (#1375)
Adds global-level kneeboard notes.  Explicit save compatability with 4.0.0

(cherry picked from commit e94d48c265024b511190fb4d0db7c9bb5144c9c5)
2021-06-30 18:08:44 -04:00
Dan Albert
b7626c10da Fix targeting of carrier groups with TGOs.
The assumption that the first group is the carrier group is wrong.

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

(cherry picked from commit 80cf8f484df3e2ff5a28bfe681ea68c6d9abfd95)
2021-06-25 16:47:39 -07:00
docofmur
666b389821 Fixes #1337 by making ground location search look in both directions (#1338)
(cherry picked from commit a31432ad9ed89bc9fc2c2f67431b4106aec35b19)
2021-06-24 13:25:41 -04:00
Dan Albert
b03d1599e1 Add a feature flag for pilot limits.
This doesn't currently interact very well with the auto purchase since
the procurer might by aircraft that don't have pilots available. That
should be fixed, but for the short term we should just default to not
enabling this new feature.

(cherry picked from commit 3ddfc47d3a0cbf9688c0fecbdbdf70bab6adeb9e)
2021-06-23 18:47:47 -07:00
Mike Jones
52aff8bc30 Use pydcs has_tacan attribute to check if tankers support TACAN.
(cherry picked from commit bd1618e41d43761b4ef55bb98cfd2a254dfc5d46)
2021-06-22 14:35:47 -07:00
Mike Jones
5c81ac06ac Add gunfighter flag to aircraft data files.
(cherry picked from commit 08b7aff0d89f187609f938d807ce8996b75a176d)
2021-06-22 14:35:46 -07:00
Mike Jones
8364148305 Add patrol configuration to unit data files.
This allows altitude/speed of AEW&C and tankers to be configured.

(cherry picked from commit a75688f89cd19e6ad6bd4bcf202fb53ac2a5fdc3)
2021-06-22 14:35:45 -07:00
Mike Jones
2bcff5a5c2 Fix unit type comparisons.
When comparing UnitType against a pydcs type, use .dcs_unit_type.

(cherry picked from commit 30763b5401228d87207993ca38bc20064581f262)
2021-06-22 14:35:43 -07:00
Dan Albert
0d99fc3d36 Don't order transports for incapable factions.
If these orders can't be fulfilled for the faction it will prevent the
faction from ordering any non-reserve aircraft since transports are
given priority after reserve missions, and they'll never be fulfillable.
As such, no non-reserve aircraft will ever be purchased for factions
without transport aircraft.

Factions without transport aircraft are screwed in other ways, but this
will fix their air planning for campaigns that aren't dependent on
airlift.

(cherry picked from commit e96210f48cd88fcdd9e33e077430653b56fd0941)
2021-06-20 23:44:16 -07:00
Simon Clark
ef3f7125b3 Make mod selection nicer and deprecate MB-339.
Mod selection is now done via checkbox in the new game wizard.

The MB-339 is being turned into a paid module, and the free mod no longer works, so it's been removed.
2021-06-21 00:03:22 +01:00
Dan Albert
4558088412 Revert "Don't propose missions the air wing can't plan."
This is redundant because plan_mission already checks this.

This reverts commit 3338df9836878714f8b72aeb176bed16a33eb65b.

(cherry picked from commit d0745001094d01e1bb49cb7cb6ecdf11eac7e9f8)
2021-06-20 15:59:09 -07:00
Dan Albert
b1a63db1fc Correct some ILS/VOR frequencies in Syria.
`MHz(110, 30)` is 110.03 MHz, not 110.30 MHz.
2021-06-19 15:07:45 -07:00
Dan Albert
3338df9836 Don't propose missions the air wing can't plan.
We were doignt his for escorts, but now that we quit planning as soon as
we find an unplannable mission (to save money for higher priority
missions), if we hit an early unplannable mission like BARCAP no other
missions wil be planned.

Maybe fixes https://github.com/dcs-liberation/dcs_liberation/issues/1228
2021-06-19 11:47:43 -07:00
SnappyComebacks
dc4794b246
Add kneeboard data for new Syria Cyprus airfields. (#1277)
* Add kneeboard data for new Syria Cyprus airfields.
2021-06-19 12:29:21 -06:00
Dan Albert
b130c9882a Remove max distance for AEW&C auto planning.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1259
2021-06-19 11:27:52 -07:00
jsjlewis96
6cd711a1e2 Added option to disable AI pilot levelling 2021-06-19 03:03:50 -07:00
Dan Albert
1ec72d3e94 Fix mission generation when infantry is disabled.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1256
2021-06-18 16:52:03 -07:00
Dan Albert
5c3bb75786 Fix EPLRS for aircraft.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1237
2021-06-18 16:48:59 -07:00
UKayeF
6d2310f59d add Mi-24P as CAS capable aircraft - unsure which other tasks it could be useful for? 2021-06-19 00:54:20 +02:00
C. Perreau
cea970f065
Merge pull request #1248 from jsjlewis96/dot-neutral
#987 Neutral dot labels in options
2021-06-18 18:13:09 +02:00