672 Commits

Author SHA1 Message Date
Khopa
f11918fc41 Fixed F-22A invalid radio frequency issues for player flights (F-22 mod only allow 100-156Mhz frequency range)
Added F-22A icon and banner.
2021-02-27 00:10:06 +01:00
Khopa
523ef08697 Ran black reformater on 2.4x branch 2021-02-22 20:55:51 +01:00
Dan Albert
5c47a8f7e1 Fix flyover waypoint generation.
Fixes https://github.com/Khopa/dcs_liberation/issues/820
2021-01-31 13:56:48 -08:00
Dan Albert
7e415b3fd7 Fix carrier packages at beginning of campaign.
Fixes https://github.com/Khopa/dcs_liberation/issues/819
2021-01-31 13:21:34 -08:00
Simon Clark
7624f09f98 A-20G is good at anti-ship. 2021-01-31 17:09:19 +00:00
Simon Clark
228d62dd32 Duplicates. 2021-01-31 12:15:51 +00:00
Simon Clark
51f8a60096 Add strategic bombers to DEAD/Strike lists. 2021-01-31 12:15:17 +00:00
Simon Clark
83f1a95966 Tweak the offset heading to 2 degrees, one degree doesn't always seem to be enough. 2021-01-31 10:54:29 +00:00
Dan Albert
34d4ecd4e6 Add an option for default start type.
Changing this completely breaks OCA/Aircraft missions, but if the player
doesn't care about those this can reduce airfield congestion. The UI
warns about this.

This also makes the AI start type selectable in the flight UI.

Fixes https://github.com/Khopa/dcs_liberation/issues/387
Fixes https://github.com/Khopa/dcs_liberation/issues/729
2021-01-30 15:04:23 -08:00
Dan Albert
5047b535c4 Make ASAP a checkbox and maintain ASAP on changes.
Fixes https://github.com/Khopa/dcs_liberation/issues/642
2021-01-30 13:33:39 -08:00
Simon Clark
1c86585f03 Make certain stances use slightly offset headings.
There's a DCS bug where vehicles sometimes don't move if they don't have to change heading. This is a bit of a hacky workaround for that.

Should fix #797.
2021-01-30 13:35:22 +00:00
Khopa
225325cc29 High Digit SAM mod support added with an example factions (Russia 2010 High Digit SAM) 2021-01-30 01:28:47 +01:00
Dan Albert
8dac4eca55 Don't plan strikes against non-strike targets.
FOB strucutres can't be repaired and the player can't target them.

SAMs are targeted by DEAD already, so considering them for strike double
plans the mission.

Fixes https://github.com/Khopa/dcs_liberation/issues/686
2021-01-23 14:29:10 -08:00
Simon Clark
444605920f Adds F-14 to the DEAD list (TALD pods are cool) 2021-01-22 15:41:42 +00:00
Simon Clark
995a89d370 Add initial version of the unit info window.
DCS features a massive range of aircraft and land vehicles, and not all of them make their role(s) clear just from the name alone. What this commit does is add an "information" button (and resultant window) to the recruitment section. This should allow new players to understand what each unit is/does.

Current state - every aircraft has a country of origin and an introduction date for that variant. Some also have a small placeholder description, taken from ED's store page for that aircraft. There is also a placeholder picture (taken from a rejected image from my own personal photography) that will, in time, show a banner image of each unit.

Todo - add appropriate screenshots for each aircraft's banner, replace the placeholder text for each aircraft (this will take a while...) and add more data points for each unit type, such as a unit role (i.e. "air-superiority fighter", "multirole fighter", etc) or perhaps a list of weapons carried. I also haven't made a start on the huge number of ground units yet.
2021-01-18 19:27:54 +00:00
Simon Clark
24a212a987 Make the C-130 work. For real this time.
Also separate out SEAD and DEAD taskings. Some aircraft can DEAD but not SEAD.

Also make the recruitment menu use the pretty names in the alphabetical sort func.
2021-01-17 21:41:02 +00:00
Simon Clark
a4db443f93 Add the Hercules to strike tasks.
It's not strike capable per se, but can transport objects for a strike.
2021-01-17 14:56:36 +00:00
Dan Albert
f8276f7e59 Don't defend against air threats from FOBs.
FOBs (and broken runways) do not need to be considered as sources of air
threats.

Fixes https://github.com/Khopa/dcs_liberation/issues/778
2021-01-17 01:17:33 -08:00
Dan Albert
5da4cace94 Don't plan BARCAPs so aggressively.
Limit the commit range of a BARCAP to halfway to the closest enemy
airbase so that they don't become offensive missions.

This has the side effect of largely reducing long retreats to hold
points from front line airfields, since the package can get much closer
without being at risk of engagement by an enemy BARCAP.

Fixes https://github.com/Khopa/dcs_liberation/issues/742.
2021-01-16 15:26:25 -08:00
Simon Clark
727ec6bc28 Filter mission types by aircraft.
First stab at implementing #392.
You can now only select aircraft types that can do the selected task.
2021-01-12 18:58:29 +00:00
Simon Clark
0094628f6b Add the S-3B Viking into the game.
It's a carrier-based strike/anti-ship platform. What's not to love?

Completes #759.
2021-01-12 14:57:29 +00:00
Simon Clark
abbb046566 Add the SH-60B Seahawk into the game.
It was requested in #759, and also carries the Penguin AShM, which could be fun.
2021-01-12 12:27:31 +00:00
Dan Albert
3298a5c6ad Improve front line flight plans.
Fixes https://github.com/Khopa/dcs_liberation/issues/462
2021-01-10 15:03:42 -08:00
Simon Clark
6f5bb6ffa2 Fix HQ7 generation error. 2021-01-10 11:46:58 +00:00
root0fall
7d0b738918 fix 588 - long waypoint descriptor in kneeboard generation 2021-01-09 23:35:47 -08:00
Simon Clark
fdb4a7b055 Try to prevent objectives getting the same name.
Fixes Khopa/dcs_liberation#745
2021-01-07 17:22:43 +00:00
Simon Clark
fac770424c Remove Pyotr Velikiy from the generator for now.
It's just too strong to be killed by a reasonable number of Harpoons. DCS needs a fixed ship damage model first.

Contributes-to: Khopa/dcs_liberation#567
2021-01-06 20:39:50 +00:00
Simon Clark
c740c8304b
Adds prettier user-facing aircraft names. (#726)
This makes the names of the aircraft displayed to the player in the UI more verbose and readable.

It allows allows specific countries to display an aircraft's name differently. An example of this would be the JF-17 Thunder, which is known in China as the FC-1 Fierce Dragon - this now displays correctly in the Liberation UI.
2021-01-05 13:21:38 -08:00
Khopa
cf583bcd55 Merge branch 'master' into develop
# Conflicts:
#	changelog.md
#	game/db.py
#	game/game.py
#	game/income.py
#	game/theater/theatergroundobject.py
#	game/version.py
#	qt_ui/windows/finances/QFinancesMenu.py
2021-01-05 19:50:29 +01:00
Dan Albert
e174c1b147 Fix bug in weapon downgrading.
We want the *first* valid replacement, not the last one :)

https://github.com/Khopa/dcs_liberation/issues/490
2021-01-05 00:26:19 -08:00
Dan Albert
34945e7eba Add date-based loadout restriction.
Follow up work:

* Data entry. I plan to do the air-to-air missiles in the near term. I
  covered some variants of the AIM-120, AIM-7, and AIM-9 here, but there
  are variants of those weapons for each mounting rack that need to be
  done still, as well as all the non-US weapons.
* Arbitrary start dates.

https://github.com/Khopa/dcs_liberation/issues/490
2021-01-04 15:13:40 -08:00
Dan Albert
507b217065 Clean up custom loadout interface.
Wraps the pydcs data in a real type so we don't need to spread the
reflection all over.
2021-01-04 15:13:40 -08:00
Dan Albert
b5278550e7 Retreat air units from captured bases.
If there are not airbases withing ferry range with available parking for
the aircraft then the aircraft will be captured and sold. Otherwise the
aircraft will retreat to the closest available airbase.

Fixes https://github.com/Khopa/dcs_liberation/issues/693
2021-01-01 15:19:16 -08:00
Dan Albert
802eff1faa Fix some airfield data in Persian Gulf.
Not sure if this changed or has just always been wrong.
2021-01-01 13:22:33 -08:00
Khopa
e3bd958069 Fixed possible AttributeError when generating missile site fire tasks 2020-12-31 13:28:21 +01:00
walterroach
daba4ef09e Fix aircraft group IDs not being reproducible. 2020-12-28 14:04:19 -06:00
walterroach
c697a34239 Correctly reset ANIMALS 2020-12-28 11:31:04 -06:00
walterroach
09b7cb3d85 Change naming to static class
This ensures all generators are using the same ID set.
2020-12-28 11:22:28 -06:00
walterroach
d7e48662e0 Add custom flight names
Mildly breaks save compat with 2.3; All existing flight dialogs will be
broken, passing the turn or recreating all the flights in the UI will
allow you to continue
2020-12-28 10:52:25 -06:00
walterroach
9fd5c6f230 Add package info to aircraft names
Makes it easier to identify aircraft for client flights
2020-12-28 09:51:37 -06:00
walterroach
aa7825d4aa Reproducible unit naming
Splits infantry and other unit IDs.

Resets IDs to start from zero at each press of "Takeoff"

Direct access to the the `Game` class IDs is done on the `Operation` class to
preserve save compat
2020-12-28 09:27:33 -06:00
Dan Albert
ec787b913c Use exact name matching when picking targets.
Inexact name matching targets the first group that partially matches the
given group name. aa|71 will match aa|7.

The inexact match that was here was only needed for an early attempt to
use skynet where group names were not used consistently. That's no
longer a problem so we don't need this workaround.

Fixes https://github.com/Khopa/dcs_liberation/issues/676

(cherry picked from commit 89f313295e6be36ad0fd6db08907006c25a7d187)
2020-12-27 13:50:55 -08:00
Dan Albert
89f313295e Use exact name matching when picking targets.
Inexact name matching targets the first group that partially matches the
given group name. aa|71 will match aa|7.

The inexact match that was here was only needed for an early attempt to
use skynet where group names were not used consistently. That's no
longer a problem so we don't need this workaround.

Fixes https://github.com/Khopa/dcs_liberation/issues/676
2020-12-27 13:45:53 -08:00
Dan Albert
3a9f585b6b Plan multiple CAP rounds per turn.
On station time for CAP is only 30 minutes, so plan three cycles to give
~90 minutes of CAP coverage.

Default starting budget has increased significantly to account for the
greatly increased aircraft needs on turn 1.

Fixes https://github.com/Khopa/dcs_liberation/issues/673
2020-12-26 17:26:07 -08:00
Dan Albert
a43b100781 Purchase reserves for CAP/CAS.
Next turn's defenses should be planned in preference to expanding
offensive capabilities.

Fixes https://github.com/Khopa/dcs_liberation/issues/511
2020-12-25 19:15:31 -08:00
Dan Albert
b5f8e6925b Rank aircraft purchase preferences.
Rather than randomly selecting compatible aircraft for missions, perfer
the *best* aircraft for the job. This removes the "preferred" lists in
favor of sorting the capable lists in priority order. To maintain some
amount of variety the procurer has a 50/50 chance of buying when it
finds a match.

Fixes https://github.com/Khopa/dcs_liberation/issues/510
2020-12-25 18:22:50 -08:00
Dan Albert
29a0644719 Never generate empty ship groups.
Fixes https://github.com/Khopa/dcs_liberation/issues/391

(cherry picked from commit c833078e71c29475d213cc5081e8d5f43446dbaa)
2020-12-25 01:35:24 -08:00
Dan Albert
c833078e71 Never generate empty ship groups.
Fixes https://github.com/Khopa/dcs_liberation/issues/391
2020-12-25 01:32:54 -08:00
Dan Albert
85619b156d Support groups for SAM templates.
It's only possible to control emissions for the group as a whole, so
Skynet needs PDs to be in separate groups from the main part of the SAM
for PD to operate correctly.

https://github.com/Khopa/dcs_liberation/issues/429
https://github.com/Khopa/dcs_liberation/issues/470
2020-12-24 16:09:42 -08:00
Dan Albert
10debbc286 Constrain front lines better.
Holes in the inclusion zone are defined by exclusion zones, not by holes
in the inclusion zone. Add a cached property for the inclusion zone that
is not also sea or exclusion zone and use that boundary instead.
2020-12-24 13:50:29 -08:00