1645 Commits

Author SHA1 Message Date
zhexu14
e47e95f89f
Refactor use_countermeasures to faction (#3459) 2024-11-11 20:47:24 +11:00
zhexu14
fa41b00ef0
Issue 3204 (#3458)
This issue addresses Issue #3204 by allowing factions to set a different
weapon introduction date.
2024-11-09 23:43:01 +11:00
zhexu14
14ccc0753d
Release callsigns when deleting flights (#3455) 2024-11-07 21:33:43 +11:00
zhexu14
9ab5d0e892
Stub new parameters in doctrines. These new parameters are not used a… (#3454)
…t the moment but are intended for a future point release
2024-11-06 22:29:46 +11:00
zhexu14
df43d2eed6
Simplfy fast forward settings, introduce ability to skip combat instead of resolving. (#3448)
This PR simplifies fast forward settings and introduces the ability to
skip combat instead of resolving.
2024-10-15 20:10:53 +11:00
zhexu14
5d0ddea753
Issue 3154 (#3447)
This PR addresses #3154 by removing LHAs, CVNs and off map spawn control
points from the transit network.
2024-10-06 23:22:19 +00:00
zhexu14
25b93b5d6d
Use unique callsigns for each flight (#3445)
This PR partially addresses #1561 by automatically generating unique
callsigns for each flight.
2024-10-06 15:19:16 +11:00
zhexu14
0e9a8ac1a1
Reformat code with upgraded version of black (#3446) 2024-10-05 07:19:39 +10:00
Geoff Franks
ad328334db
Don't return available destinations when retreating aircraft if the runway is not operational (#3435)
Short circuits selecting control points to retreat aircraft to when the
control point being captured has a damaged runway.

Fixes #3434. 

I'm not sure how to test this locally though, so I have no idea if it
works.
2024-09-08 15:10:00 +10:00
zhexu14
529cc31a72
Remove deprecated settings (#3418)
Remove settings that have been marked as deprecated for a while.
2024-06-29 19:14:21 +10:00
zhexu14
38c3cdbf16
Update changelog and versions to reflect move to 12 (#3417)
Update changelog and versions to reflect move to 12.
Update changelog for Superbug mod update.
2024-06-29 09:57:11 +10:00
zhexu14
7543b5f79f
Bump version to 11.1.1 to include campaign updates as 11.1.0 was alre… (#3415)
…ady taken
2024-06-22 17:23:08 +10:00
Starfire13
36b687f7ef
Add NASAMs to MERAD unit list for campaign template (#3406)
Adds NASAM launcher B and C to the list of units that can be placed in a
campaign template to define a MERAD spawn location.

This is needed to maintain compatibility with the new versions of my
campaigns.
2024-06-14 21:25:34 +10:00
zhexu14
9066fafcb1
DCS 55918 (#3401)
This PR adds support for DCS 2.9.5.55918. Some limited support for the
Kiowa Warrior is also implemented.
2024-06-06 22:41:08 +10:00
zhexu14
fd8632a71d
Add radio setup for F-5E, Mi-8, Mi-24 and F-86 (#3400) 2024-06-05 20:59:02 +10:00
zhexu14
d905f0cf7f
Dcs 2.9.5 (#3393)
DCS 2.9.5 Support (including F-4)

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
Co-authored-by: Starfire13 <72491792+Starfire13@users.noreply.github.com>
2024-06-02 22:18:11 +10:00
zhexu14
13ff69c4df
Set next version as 11.1 (#3382)
This PR sets versions & changelog to a 11.1 bugfix release.
2024-04-22 22:55:39 +10:00
zhexu14
dc3d1b0b5b
Make theater refuelling flight plan on-station time configurable based on the desired mission duration (#3375)
This PR 
- Addresses #1511 by setting the tanker on-station time to the desired
mission duration + 30 minutes
- Elaborate on what the desired mission duration setting does in the
Settings UI.
2024-04-14 21:58:30 +10:00
zhexu14
f59051c9f8
Issue 2778 (#3374)
This PR addresses #2778 by:
- Updating the logic for how redeployment of front line units works to
handle "out of order" captures e.g. for control points A->B->C, where A
starts friendly and B, C starts as enemy-controlled, the player captures
C first, typically using air assault.
- Updating the cheat logic so that capturing CPs using cheats behaves
the same way as capturing CPs normally.
2024-04-13 21:55:44 +10:00
zhexu14
c8c78d0b2a
Stop naval control points from being moved onto land (#3373)
This PR fixes #3243 by checking whether the destination point is in the
sea for naval control points before permitting the movement.
2024-04-13 15:04:41 +10:00
zhexu14
9611c01b93
Add mechanism to prevent double counting of damage induced kills when… (#3371)
… DCS reports multiple hits

This PR fixes a bug introduced when tracking OCA/Aircraft kills that
results in double counting when DCS reports multiple hits, typically
when guns are used.
2024-04-10 16:28:21 +10:00
zhexu14
8aa38a83ff
Bump version to 12 (#3370)
Bump changelog, bug reports and version.py to appropriate values now
that 11 is released.
2024-04-10 12:54:26 +10:00
Chilli935
88ebb8b612
FA18EFG mod support Patch 4 (#3340)
- Corrected banner file types.
- Corrected australia_2005.yaml and usn_2005.yaml
- Added australia_2009.yaml and usn_2009.yaml
2024-03-21 21:52:34 +11:00
zhexu14
77b7f777f6
Issue 3337 (#3356)
This PR addresses #3337 by:
- Updating the UI to identify that a destroyed carrier/LHA as "Sunk"
- Fall back on targeting other groups in the NavalControlPoint (e.g.
escorts if present) if the carrier/LHA is sunk.
2024-03-15 22:33:25 +11:00
zhexu14
6550400604
Track damage (#3351)
This PR partially addresses #3313 by:
- Tracking DCS hit events and storing the unit hit point updates in
state.json
- Adding logic to kill aircraft when the hit points is reduced to 1, as
opposed to the DCS logic of hit points to 0. This behavior allows
Liberation to track deaths to parked aircraft, which are uncontrolled
and seem to have different damage logic in DCS.
- Tracking damage to TheaterGroundObjects across turns and killing the
unit when the unit's hitpoints reduces to 1 or lower.

Intention is to build on this PR by also tracking front line objects and
statics (buildings). However, larger refactoring is required and so
splitting those into a separate PR.
2024-03-09 15:07:38 +11:00
Chilli935
e1d443b697
Super Hornet mod support (#3331)
F/A-18E and F/A-18F are added to their factions, Growler is currently in
its respective factions but was released in 2009, this will be changed
if needed.
2024-01-27 23:14:57 +00:00
zhexu14
5af4e56f30
Add hit points to unit yamls.
This PR:

- Introduces a new member of UnitType, hit_points, which is an abstract
representation of the durability of a unit, and loads it in from the
YAML files in the various subclasses (Ship, Ground etc).
- Adds scripts for populating/updating the unit YAML files with hit
point data from DCS. This script also gets the data for static objects,
but I'll leave the plugging in of static object data into Liberation for
another PR.
- Updates the unit YAML files by running the above scripts.

I did toy with the idea of adding this data to the unit definitions in
pydcs via an export from DCS, but it would be a more involved change,
since the current pydcs export script runs in the Hooks Lua environment
in DCS and AFAICT the hit points (via Unit.getLife()) is run in the
mission scripting environment.
2024-01-04 00:49:33 -08:00
zhexu14
5b858886c0
Doctrine cleanup (#3318)
This PR:

- Refactors the doctrine class to have a bit more structure, in
anticipation of adding more elements to Doctrine.
- Moves previously hard coded helo-specific altitudes into the Doctrine
class, aligning a bunch of altitudes ~200ft in the process.
- Refactors ingress_altitude to combat_altitude to clarify that the
altitude is applied to multiple waypoint types, not just the ingress
altitude.
2024-01-01 13:31:26 -08:00
Dan Albert
2fb22e4e17 Bump develop to 11.0.0. 2023-12-30 16:05:45 -08:00
zhexu14
211ec86e2e
Apache speed fix (#3315)
This PR 1) introduces a cruise_speed parameter to the AircraftType class
and uses it as an override for default TOT/Ground Speed calculations and
2) sets this for the AH64.

The reason for this change is that air starts with the Apache at a speed
>130kt seems to completely break the FCR, even if you subsequently slow
down. In the development branch, Liberation sets the Apache to travel at
168kt, so any player air starting won't be able to use their FCR and it
wouldn't be readily apparent as to why.

In the longer run this parameter may also be useful for other aircraft
e.g. to override the cruise speed to the most efficient etc.
2023-12-27 14:04:16 -08:00
Dan Albert
dcf23c655d Describe non-airport "runways" better.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3290.
2023-12-21 16:46:06 -08:00
zhexu14
48ae55bdc2
Default overrides fix (#3307)
This PR makes sure that the Payload tab of the Edit Flight window shows
the correct property values (with `default_overrides` applied in the
aircraft YAML). It looks like the issue only affects an obscure
parameter on F14s (INS reference alignment stored) so may not have been
noticed until now.
2023-12-21 02:51:34 -08:00
zhexu14
4631ee0d74
Doctrine load from YAML (#3291)
This PR refactors the Doctrine class to load from YAML files in the
resources folder instead of being hardcoded as a step towards making
doctrines moddable (Issue #829).

I haven't added anything to the changelog as a couple of things should
get cleaned up first:
- As far as I can tell, the flags in the Doctrine class (cap, cas, sead
etc.) aren't used anywhere. Need to test further, and if they're truly
not used, will remove them.
- Probably need to update the Wiki
2023-12-17 18:42:31 -08:00
zhexu14
a213215c3f
Fix exception when campaign has only off map CPs.
This PR fixes an exception in custom campaigns that only contain off map
spawns.
2023-12-15 14:25:11 -08:00
Dan Albert
f7141a9882 Fix a few more Pydantic conversions.
One of the newer versions got a lot more strict. It now only expects
dicts that match the model, or objects of the model. Previously it also
accepted objects which had the same properties as the model. Convert a
few more LatLngs to LeafletPoints.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3279.
2023-12-02 12:25:01 -08:00
Dan Albert
6c4b8c81ee Update mypy.
Needed so mypy can recognize the new Python 3.12 generic syntax.
2023-12-01 16:14:54 -08:00
Dan Albert
2447cc156d Update black.
Required for the new syntax in Python 3.12.
2023-11-30 21:10:14 -08:00
Dan Albert
7bc35ef7f4 Update most Python dependencies.
A lot of the dependency versions we have pinned don't have wheels for
Python 3.12. Update almost all of them so we can upgrade Python.

The few that weren't upgraded here are black and mypy, since those will
be a bit invasive, and Pillow, which has an API change I don't want to
deal with right now (I've got a commit on another machine that has
already done the migration, so I'll do it later).
2023-11-30 20:24:28 -08:00
Dan Albert
f8a72d8f22 Bump version to 10.0.0. 2023-11-10 19:15:41 -08:00
Dan Albert
efa47e1550 Fix allocation range for Link 4.
Prior to DCS 2.9 Jester was able to use datalink frequencies outside the
range the aircraft was capable of, but this has presumably always been
broken for human RIOs.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3222.
2023-11-01 18:47:00 -07:00
Dan Albert
c010ef9994 Add support for DCS 2.9's AI unlimited fuel.
This is enabled by default because I can't think of a time where it's
ever been more fun to watch the AI run out of fuel after cycling between
afterburner and speedbrake for twenty minutes.

This is only lightly tested (I verified that the task shows up
appropriately in the ME when set, not when unset, and never for
players), since the interesting part of the implementation is up to ED.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3201.
2023-11-01 18:08:04 -07:00
zhexu14
ac2fbc2940
Support planning TARCAP at last airfield.
This PR addresses #771 by adding special handling for the scenario where
there is only one remaining enemy airfield. An example of the race track
generated using this logic is shown below.

![Screenshot 2023-10-31
230938](https://github.com/dcs-liberation/dcs_liberation/assets/64713351/3fb2027e-f496-4325-a3c5-2abe2a45b58f)

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/771.
2023-11-01 16:52:35 -07:00
Dan Albert
376c1137d7 Fix stale waypoint tasks for custom flight plans.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3189.
2023-10-21 15:35:05 -07:00
Dan Albert
884993dd46 Fix empty string CLSID issue for default loadouts.
We had two different paths for converting pydcs loadouts because pydcs's
APIs for some reason return the loadouts in different shapes which made
it difficult to share the code for converting them. Rather than fix the
bug in both places, extract the common code and adapt the result of one
API to match the other.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3171.
2023-10-20 14:47:40 -07:00
Dan Albert
c5d5ea81de Ensure speed lock for waypoint 0.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3195.
2023-10-20 14:28:19 -07:00
Dan Albert
0e01aaf9cd Filter out empty string CLSIDs.
There's more detail in the comment, but this fixes an issue where some
Mosquito loadouts could not be loaded.

Might fix https://github.com/dcs-liberation/dcs_liberation/issues/3171.
There aren't enough instructions in the bug for me to be sure, but it
sounds like a similar problem, although I came across it with bombs
rather than rockets.
2023-10-20 14:22:36 -07:00
Dan Albert
dfb74cfd48 Fix kneeboard generation following Pillow update.
We don't have tests for this, so dependabot broke it and we didn't
notice.
2023-10-19 19:47:36 -07:00
Dan Albert
256c9ce73d Add a package kneeboard page.
The package page shows each flight member in the whole package. The data
shown for now is the callsign, task, radio frequency, and laser code.
The STN for each flight will be added once that's done.

This does generate one package page per flight. That means that packages
where multiple flights have players and use the same aircraft type will
have some duplicated pages, but the alternative is that some players
would need to skip past all their flight members' pages to find their
package page instead of having it grouped with their own.
2023-10-03 21:50:29 -07:00
Dan Albert
e9133bffab Group briefing data by package.
This is just the refactor to make way for the real change: adding a
package page to the kneeboard so players can get package-level
information like other radio, laser, and STNs.
2023-10-03 21:50:29 -07:00
zhexu14
f9916e47d8 address issue 3175 by introducing special divide by zero handling 2023-10-01 23:08:05 -07:00