927 Commits

Author SHA1 Message Date
Dan Albert
2295f4edfe Bump campaign version to 8.0 for latest DCS.
Building IDs changed again. Ack the change in my two campaigns which
don't use these target types.

(cherry picked from commit edbd3de4a4f8d62adeb98880f97e012d2bab75a8)
2021-08-08 12:52:04 -07:00
Dan Albert
1991c4d48f Add decorator for tracking save compat.
Used to decorate functions or methods that have save compat code for a
given major version.

```
@has_save_compat_for(5)
def foo() -> None:
    ...
```

This function will raise an error at startup if it is decorated as
having save compat for a version other than the current major version of
the game. A new major version is the definition of a save compat break,
so keeping around the old compat code serves no purpose other than
hiding initialization bugs. The compat code and the decorator should be
removed in the branch raising the error.

(cherry picked from commit cd558daf5a601f64e98ad4ae2e7f6351be702632)
2021-08-08 12:52:04 -07:00
Dan Albert
81c2bd6c76 Correct int/float confusion in Point APIs.
The heading and distance calculations always return floats.

(cherry picked from commit 6ce02282e74fd3455c3a63880330c05b63a35bff)
2021-08-08 12:52:04 -07:00
Dan Albert
93c6cb34fb 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-08-08 12:52:04 -07:00
Dan Albert
be13d8c0a6 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-08-08 12:52:04 -07:00
Dan Albert
c0f6974d07 Fix some typing in preparation for pydcs types.
Not complete, but progress.

(cherry picked from commit 53f6a0b32b922110ccc163e3221a0f6cfd445ef9)
2021-08-08 12:52:04 -07:00
Dan Albert
4e9d661c0c Flesh out typing information, enforce.
(cherry picked from commit fb9a0fe833198d41a911f22d5efc4e3c4829c316)
2021-08-08 12:52:04 -07:00
Dan Albert
7cfd6b7151 Disallow partially specified generics.
(cherry picked from commit 69c3d41a8ad967db27e99235c2f7b9196d29e6b9)
2021-08-08 12:52:04 -07:00
Dan Albert
65dfa8e209 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-08-08 12:52:04 -07:00
Dan Albert
fa5cbac2fc Add documentation for turn processing.
(cherry picked from commit 7983cd8d623d5733d50dc85ea55824a1dfc952df)
2021-08-08 12:52:04 -07:00
RndName
638903ddf7 correct display of turn statistics 2021-08-08 12:52:04 -07:00
RndName
40092bf87f replan opfor mission on sell or buy of tgos
(cherry picked from commit 7229b886e0eaad14d6c59fda47399d0d65b10e70)
2021-08-08 12:52:04 -07:00
RndName
4b1d629e9b remove completely destroyed units from the convoy
(cherry picked from commit 8ba27cdaeae84914aced36851d78f070b1ee1f63)
2021-08-08 12:52:04 -07:00
bgreman
4b526e2b90 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-08-08 12:52:04 -07:00
Dan Albert
229290dc3d Bump version to 4.1.0. 2021-08-08 12:52:04 -07:00
RndName
72fe24c656 fixed lua data generation
(cherry picked from commit 357361de3deabc8894c46207e784c8ba6c47e482)
2021-08-08 12:52:04 -07:00
RndName
201fe121ff 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-08-08 12:52:04 -07:00
Dan Albert
c3f99161ca Remove debug cruft.
We don't need to print the description of every unit on startup.

(cherry picked from commit 2ef2eafdd3d90b330825e206b4638c50c1b29b2c)
2021-08-08 12:52:04 -07:00
bgreman
fb85fca565 Addresses #478 to clean up the angle summing functionality. (#1386)
(cherry picked from commit 9bd6f9ef47475e936d2abe052bb56fd30d0d2fbb)
2021-08-08 12:52:04 -07:00
Mustang-25
3171fd0ef7 Update TGP Restriction Dates
TGP dates to more accurately reflect IRL IOC dates.

(cherry picked from commit 151f8bf329a6c9e6dc89d3a7b05263ba4d6ccc80)
2021-08-08 12:52:04 -07:00
Chris Seagraves
a58d3febcb Notes to kneeboard (#1375)
Adds global-level kneeboard notes.  Explicit save compatability with 4.0.0

(cherry picked from commit e94d48c265024b511190fb4d0db7c9bb5144c9c5)
2021-08-08 12:52:04 -07:00
Chris Seagraves
32dc3c3170 asset reference links 😎 (#1363)
Adds urls to unit info pages that don't have data.

(cherry picked from commit 5f5b5f69e31c0abb358f64431c686356a051543a)
2021-08-08 12:52:04 -07:00
Simon Clark
3badda600d Fix begin campaign button on reload. 2021-08-08 12:52:04 -07:00
Dan Albert
3b55dfad40 Revert accidental change to default pilot limit.
(cherry picked from commit 7eb4df770e42a44759c7f58bdfa2ae77914206ce)
2021-06-26 12:06:26 -07:00
Dan Albert
8dd29d2319 Disband unfilled incompletable transfers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1317

(cherry picked from commit 4cfed08247e6bd7d57c9836d0de01e4da25d44e7)
2021-06-26 10:55:19 -07:00
Khopa
b402dad801 Mod support : Updated frenchpach to version 4.6 (Added new units VBCI and AMX-13 support) + some frenchpack units yaml tweaks 2021-06-26 19:23:27 +02:00
Dan Albert
723588666f Fix save path cleanup.
(cherry picked from commit 959a13a514801de0198043ec5e4a3208bbdee0cb)
2021-06-25 23:21:49 -07:00
Dan Albert
3c135720a0 Fix lint.
(cherry picked from commit 91655a3d5acacd4d3750fd60a7caebd272a8981c)
2021-06-25 19:34:10 -07:00
Dan Albert
d7db290892 Move the default save game directory.
The top level DCS directory gets messy fast if we fill it with save
games.

(cherry picked from commit 7774a9b2ab3d76d10525f628e7a2041a7a0f75bb)
2021-06-25 17:48:45 -07:00
bgreman
fb5a6d3243 Fix #1329 player loses frontline progress when skipping turn 0 (#1330)
(cherry picked from commit b43e5bac0b43778e50b89e683dcb4294084b1fbb)
2021-06-24 02:06:26 -04:00
Dan Albert
113c00ac05 Retry reading state.json on failure.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1313

(cherry picked from commit ddaef1fb644944ecf4430f8cbeef967383e57ce5)
2021-06-23 20:18:36 -07: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
bgreman
8dc35bec5a Fix empty convoys (#1327)
* Hopefully getting rid of empty convoys for good

* changing Dict to dict for type checks

(cherry picked from commit 3274f3ec35263f461238dc53cc60e4b54aae682a)
2021-06-23 19:51:37 -04:00
bgreman
3f4f27612b Fixes #1310 (#1325)
* Fixes #1310 by only refunding GUs if no faction CP has an attached factory.  Previously it would refund all units at the CP, including aircraft.

Also changes the CP CAPTURE cheat to work at any CP regardless of adjacency to frontline or BLUEFOR/OPFOR state.

* Fixing typing issues, changint all Dict[] types to dict[]

* Updating changelog

(cherry picked from commit c3b8c48ca25df1cd5f77a353775410450952e2a6)
2021-06-23 17:19:58 -04:00
Dan Albert
53c7912592 Copy initialization fix to AircraftType.
(cherry picked from commit 610a27c0e4914437c14b3d091d4e619d1b6eda48)
2021-06-23 12:50:55 -07:00
Dan Albert
2bb1c0b3f2 Fixed missed initialization of unit data on load.
We'd only load unit data if a name lookup was done and missed it on a
type lookup. Ideally we wouldn't need to do a type lookup here until the
ground unit templates are reworked we still do.

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

(cherry picked from commit d3d655da0716f37dcfd8bbcc9f901417dcb540e6)
2021-06-22 23:42:25 -07:00
Dan Albert
cf3d13f9d3 Bump campaign version to account for DCS changes.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1308

(cherry picked from commit ca93f2baffec585aff4dbe3ebd0c0a755bbc803a)
2021-06-22 23:04:41 -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
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
c2f112e3a6 Refactor the mod select changes, re-add accidentally deleted factions. 2021-06-21 01:14:07 +01: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
dc85644d71 Exclude weapon names and weights from comparisons.
Only the class ID matters, and the names sometimes change with new pydcs
updates.
2021-06-20 15:11:35 -07:00
Mike
bb2bf78e8a
Fix current_airlift_capacity always returning 0.
Squadron.aircraft is of type AircraftType, while TRANSPORT_CAPABLE is
a list of pydcs DcsUnitTypes. As a result, the intersection was always
empty causing the function to always return 0.
2021-06-20 13:56:00 -07:00
SnappyComebacks
5b31026e1c
Fix UI to obey max group sizes.
This also adds max group sizes for aircraft that need it but don't
according to DCS. Only the first tanker or AEW&C unit in a group can be
contacted by radio.
2021-06-20 13:32:00 -07:00
Khopa
28820f2e64 Squadrons : Allow unicode characters in squadrons names 2021-06-20 17:43:07 +02:00
Dan Albert
1e2522375b Increase squadron size and replenishment rate.
Given the current lack of control over the number of squadrons this
needs be be raised to make it have less of an impact.
2021-06-19 23:24:23 -07: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
Dan Albert
5f8b838652 Add new campaign minor version for Cyprus. 2021-06-19 11:18:31 -07:00
jsjlewis96
6cd711a1e2 Added option to disable AI pilot levelling 2021-06-19 03:03:50 -07:00