Compare commits

...

3637 Commits

Author SHA1 Message Date
dependabot[bot]
a29fd7a14c Bump axios from 1.1.2 to 1.6.0 in /client
Bumps [axios](https://github.com/axios/axios) from 1.1.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.1.2...v1.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 19:03:42 -08:00
Dan Albert
f2a879fc6f Add Linebacker to bluefor modern. 2023-11-10 15:07:49 -08:00
Dan Albert
fdea746323 Add C-RAM LPWS.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3233.
2023-11-10 15:07:49 -08:00
Starfire13
7f8c2f073c Updates and fixes to Operation Grabthar's Hammer 2023-11-10 12:43:53 -08:00
dependabot[bot]
7db4d438ce Bump @babel/traverse and @trivago/prettier-plugin-sort-imports
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.19.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 `@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.3.0 to 4.2.1
- [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.3.0...v4.2.1)

---
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>
2023-11-01 19:12:10 -07: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
Dan Albert
82a200c53a Update pydcs.
The new version has support for the unlimited fuel option for AI
flights.
2023-11-01 18:08:04 -07:00
Starfire13
c2c0119132 Add naval vessels to Egypt faction 2023-11-01 17:03:21 -07:00
Starfire13
8dca91f533 Starfire's campaign updates 2023-11-01 16:59:34 -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
MetalStormGhost
da22b8ba43 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-01 16:47:31 -07:00
Starfire13
7bcd669e6e Updated YAMLs for some of Starfire's campaigns
Updates for:
Final Countdown 2
Operation Vectron's Claw
Exercise Bright Star
Operation Grabthar's Hammer
2023-10-24 21:53:42 -07:00
Starfire13
66f175fd65 Add F-4E to Egypt 2000 faction
Add F-4E Phantom II to Egypt 2000 faction as they were in active service
until 2014.
2023-10-24 21:45:12 -07:00
Starfire13
2af5d8ae01 Update S-3 DEAD task priority.
Bumping from 100 to 200 so it's preferred over WW2 aircraft but less
preferred than B-52.
2023-10-23 20:36:45 -07:00
Starfire13
30a4110c57 B1 loadout updates.
Updates B1 loadout, replacing iron bombs with JDAMs. Also switches DEAD
loadout to JSOW-C.
2023-10-23 20:36:08 -07:00
Starfire13
61f6184f9b Update B52 loadout.
Updates anti-ship loadout as harpoons are now mounted on wing pylons on
the new model rather than in the bomb bay
2023-10-23 20:35:38 -07:00
Dan Albert
b42a8c78d1 Fix task priority script for display name split.
`name` was split into an ID and a display name a while back, but this
was never updated to account for that.
2023-10-23 17:26:25 -07:00
Starfire13
bf8a07fe15 S3 Viking loadout and mission type update
Updates the S3 Viking so they can now do DEAD (since the new model can carry SLAMs). Also updates the loadouts for all the other mission types as they are outdated (2000 pounders for anti-runway, 500 pounders for strike, Mavericks for BAI/CAS, etc).
2023-10-23 17:19:14 -07:00
Starfire13
6122c8c42d Add DEAD task capability to the S-3. 2023-10-23 17:19:14 -07:00
Thomas MONZIE
dce4206130 Tripoint update : carrier + compatibility 2023-10-22 13:02:45 -07:00
Thomas MONZIE
eada2ba9ae Bump campaign version number up to 11 2023-10-22 13:02:45 -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
f9e7370b35 Update pydcs for 2.9.0.46801 Open Beta.
F-22 mod data is out of date. Removed the broken bits, but someone
should probably update that mod.
2023-10-19 19:48:27 -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
zhexu14
32b3793082 Fix issues with waypoint editing.
fix a number of regressions in the flight waypoint list by changing the
indexing and finding a work-around to blocking of signals

This PR addresses some (but not all) recently reported issues with the
waypoints screen reported in Issue #3188 . This PR was tested by:

- Changing the waypoint altitude and confirming it shows up correctly
when reloading the waypoint list window and on the map
- Adding a waypoint and confirming that it shows up immediately and
persists on reload
- Deleting a waypoint (except the first waypoint) and confirming that it
is removed immediately and persists on reload,

Known issues: first waypoint (typically hold) cannot be deleted -- still
looking into this one.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3188.
2023-10-10 18:05:57 -07:00
dependabot[bot]
990f1c37b8 Bump electron from 21.1.0 to 22.3.25 in /client
Bumps [electron](https://github.com/electron/electron) from 21.1.0 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.1.0...v22.3.25)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 20:12:14 -07:00
dependabot[bot]
4d7e1e1946 Bump pillow from 9.3.0 to 10.0.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.3.0 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.3.0...10.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 20:11:55 -07:00
Dan Albert
ca268a2252 Add changelog note for finance menu UI fix. 2023-10-03 22:05:37 -07:00
zhexu14
2686a1ea77 Fix odd whitespace in finance menu.
Moves the stretch to the bottom of the page to avoid awkward whitespace
in the middle. Presumably the totals used to be at the bottom (since
that's a normal place for a total), but it was moved to the top,
probably since that was the most interesting data and we didn't want to
scroll though all the details to find that one point.

This also removes the unused code path where the total would be shown at
the bottom.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1288.
2023-10-03 21:55:59 -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
tmz42
b1b88c4335 Updates for tmz's campaigns.
Updated Fuzzle's campaigns for new squadron rules compatibility.
2023-10-01 23:16:41 +00:00
zhexu14
20574e3fbb address issue 3162 by applying threshold to CVN position check 2023-10-01 16:10:10 -07:00
Starfire13
1ed37ff75e Final Countdown 2 update for campaign inversion
Fixes incorrect airfield assignment when campaign is inverted
2023-10-01 16:09:35 -07:00
Dan Albert
69ec9adec7 Remove code for old squadron rules. 2023-10-01 12:21:37 -07:00
Dan Albert
63584321c6 Bump campaign version for squadron sizes.
The old mode where squadrons started empty and had no size limit is
going away.

I bumped the campaign versions for the ones that claimed support and
tested a handful. All of Fuzzle's campaigns actually had the wrong
version in the yaml. They claim support for this but none that I tested
actually fit within the limits (despite having sizes defined). Either it
was supposed to be 10.7, or maybe the airports lost some parking.
2023-10-01 12:21:37 -07:00
Dan Albert
2344fc0b5c Add campaign support for ferry-only bases.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3170.
2023-09-21 21:34:31 -07:00
Dan Albert
e43874e553 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-09-20 22:02:01 -07:00
Dan Albert
3862ec1b2e Convert escort request to a waypoint property.
Another step in reducing the rigidity of FlightPlan and making it
testable.

There is one intentional behavior change here: escort flights no longer
request escorts. That actually has a very minimal effect because these
properties are only used for two things: determining if a package needs
escorts or not, and determining when the TARCAP should show up and
leave. Since escorts won't have been in the package when the first part
happens anyway, that has no effect. The only change is that TARCAP won't
show up earlier or stay later just because of a TOT offset for an escort
flight.
2023-09-11 22:25:58 -07:00
Dan Albert
502d37058c Remove dead code. 2023-09-11 20:51:16 -07:00
Dan Albert
b7723843c6 Migrate sweep ingress's tasks to waypoint actions. 2023-08-29 21:57:17 -07:00
Dan Albert
c00f853f34 Roll-over excess time from tasks. 2023-08-29 21:57:17 -07:00
dependabot[bot]
8c6b360e65 Bump @adobe/css-tools from 4.0.1 to 4.3.1 in /client
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.0.1 to 4.3.1.
- [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>
2023-08-29 21:43:02 -07:00
Dan Albert
cb9063b5be 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-08-23 20:14:16 -07:00
Dan Albert
99eed33241 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-08-22 20:31:20 -07:00
Dan Albert
1902618f45 Remove dead code. 2023-08-21 22:42:00 -07:00
Starfire13
782389bd89 Update up_the_coast enemy faction
Switch default enemy faction to Russia 1975 from the now-removed Russia 1975 (Mi-24).
2023-08-19 19:14:50 -07:00
Starfire13
5025fe9e34 Update russia_1975.yaml
Adds Mi-24P flyable Hind
2023-08-19 11:31:07 -07:00
Starfire13
27689b675e Delete russia_1975 (Mi-24P).yaml
Rather than having a separate faction file that is identical to the Russia 1975 faction file but includes the Hind, might as well just add the Hind to the standard Russia 1975 faction.
2023-08-19 11:31:07 -07:00
Starfire13
6791af16d1 Delete final_countdown_2.yaml
No longer needed as this custom faction is already included in the campaign yaml
2023-08-19 11:31:07 -07:00
Starfire13
53580b2088 Update Sweden 1970
Change the Mirage 2000 (a stand in for the Draken) to the Mirage F1 as that is a closer match in terms of capabilities and era.
2023-08-19 11:31:07 -07:00
Starfire13
42bffa06ae Delete russia_1970_limited_air.yaml 2023-08-19 11:31:07 -07:00
Starfire13
626e73d641 Delete normandy_small.miz 2023-08-18 16:26:25 -07:00
Starfire13
667d6e3b8a Delete normandy_full.miz 2023-08-18 16:26:25 -07:00
Dan Albert
eebb172333 Remove flight-size-specific formations.
No reason to do this, and it's making the task rework annoying.
2023-08-17 20:27:34 -07:00
Dan Albert
5f3e342a0e Use SEAD for SEAD.
The F-14 was fixed to allow this in the latest patch.
2023-08-16 19:42:11 -07:00
Dan Albert
d3b4d45bd6 Update pydcs. 2023-08-16 16:50:49 -07:00
Starfire13
a5a3b09379 New version of Exercise Bright Star with carrier 2023-08-15 16:51:28 -07:00
Dan Albert
87441b8939 Formalize waypoint actions.
Create a WaypointAction class that defines the actions taken at a
waypoint. These will often map one-to-one with DCS waypoint actions but
can also be higher level and generate multiple actions. Once everything
has migrated all waypoint-type-specific behaviors of
PydcsWaypointBuilder will be gone, and it'll be easier to keep the sim
behaviors in sync with the mission generator behaviors.

For now only hold has been migrated. This is actually probably the most
complicated action we have (starting with this may have been a mistake,
but it did find all the rough edges quickly) since it affects waypoint
timings and flight position during simulation. That part isn't handled
as neatly as I'd like because the FlightState still has to special case
LOITER points to avoid simulating the wrong waypoint position. At some
point we should probably start tracking real positions in FlightState,
and when we do that will be solved.
2023-08-13 12:43:59 -07:00
Dan Albert
2f385086fd 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-08-13 12:39:56 -07:00
Dan Albert
aaf66107ad Improve type inference in loiter flight plans. 2023-08-13 12:28:43 -07:00
Dan Albert
59756ce14c 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-08-13 11:36:05 -07:00
Dan Albert
bf1e559a41 Remove dead code. 2023-08-13 11:36:05 -07:00
Dan Albert
5f4a75601b Show the real front line bounds on the map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1067.
2023-08-10 21:01:44 -07:00
Dan Albert
c4358daccc Revert "Remove dead code."
Not used by python, but is used by jinja templates.

This reverts commit 1f3eee90f1.
2023-08-10 00:53:29 -07:00
Dan Albert
723b96cd51 Fix faction templates for unit type prop changes. 2023-08-10 00:52:45 -07:00
Dan Albert
3f0b565b82 Drop save compat hacks.
The CAS flight plan tweaks break save compat in a way that's not as easy
to fix. Accept it and drop the existing hacks since they won't be useful
any more.
2023-08-10 00:47:13 -07:00
Dan Albert
cb3bf56d84 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-08-10 00:47:13 -07:00
Dan Albert
9460586cfe Mark the AI-only F-15E more clearly. 2023-08-09 22:50:05 -07:00
Dan Albert
3c2ace09f3 Add display name property for unit types.
Unlike the variant ID, this can be changed without breaking save compat.
2023-08-09 22:50:05 -07:00
Dan Albert
58d8203c83 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-08-09 22:50:05 -07:00
Dan Albert
1f3eee90f1 Remove dead code. 2023-08-09 22:27:21 -07:00
Dan Albert
0be6952a93 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-08-09 21:53:25 -07:00
Dan Albert
09f1af37fd 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-08-08 21:46:52 -07:00
Dan Albert
257f2072e8 Add test cases found by fuzzer. 2023-08-08 21:46:52 -07:00
Dan Albert
1708baf772 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-08-08 21:46:52 -07:00
Dan Albert
6b6c4f4112 Migrate IP placement to WaypointSolver. 2023-08-08 21:46:52 -07:00
Dan Albert
5cb4c363e3 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-08-08 21:46:52 -07:00
Dan Albert
13ccf3f536 Add __str__ for Distance. 2023-08-08 01:56:18 -07:00
Dan Albert
42fa5dce94 Add name to Doctrine. 2023-08-08 01:56:06 -07:00
Starfire13
d1baf33d86 Add F-15E Suite 4+ to Allied Sword faction.
Fuzzle's Allied Sword campaign has a custom faction in the campaign
yaml, and it wasn't updated when Razbam's Mudhen was released. I've
added it in.
2023-08-07 21:02:28 -07:00
Dan Albert
a0ab46af8f Note the ARA Veinticinco de Mayo in the changelog. 2023-08-01 18:33:00 -07:00
Nosajthedevil
58ede1b888 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.
2023-08-02 01:26:08 +00:00
Dan Albert
e72b1b3ae7 Update pyinstaller and hooks.
3149c93016
is needed to fix the pyinstaller package for shapely 2.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3127.
2023-08-01 18:15:08 -07:00
Dan Albert
2c51e126b7 Fix shapely error during mission generation.
It seems shapely doesn't allow `unary_union` on collections any more.
2023-07-31 17:32:46 -07:00
Dan Albert
4f04a2d142 This brace belonged to the now deleted "settings". 2023-07-30 14:34:58 -07:00
Dan Albert
899620c242 Add TODO note to joinzonegeometry. 2023-07-29 21:56:56 -07:00
Dan Albert
431165ab83 Add __str__ for Heading. 2023-07-29 21:56:43 -07:00
Dan Albert
703bb98b62 Update Shapely.
I need the new to_geojson API.
2023-07-29 21:45:20 -07:00
Starfire13
6610162c44 Add Operation Noisy Cricket campaign. 2023-07-29 19:43:35 -07:00
Starfire13
09f0b0b315 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-07-29 17:35:51 -07:00
Dan Albert
d81ed26fa6 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-07-29 10:31:05 -07:00
Dan Albert
159120b487 Always re-enable loadout UI for member 0. 2023-07-27 22:28:29 -07:00
Dan Albert
160d464f9a Fix synchronization of loadouts on change.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3111.
2023-07-27 22:25:51 -07:00
dependabot[bot]
b893378abe Bump certifi from 2022.12.7 to 2023.7.22
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2023.07.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-27 21:36:24 -07:00
Starfire13
f9f2c79aeb Add Mirage F1 to Iran 2015 2023-07-23 20:10:47 -07:00
Dan Albert
c7a991687c 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-07-23 14:51:56 -07:00
Dan Albert
d2152a259c Handle TOT offsets for patrolling flight plans.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-07-23 11:51:07 -07:00
Dan Albert
5fd29d8c9d Fix negative starts when changing TOT offsets. 2023-07-23 11:51:07 -07:00
Dan Albert
d74ba4a6c9 Fix altering negative TOT offsets.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-07-23 11:51:07 -07:00
Dan Albert
e1dba91b25 Add laser code support for the viper. 2023-07-22 18:34:14 -07:00
Dan Albert
ca5ec65ed1 Remove unused config data from laser code yamls. 2023-07-22 18:23:07 -07:00
Dan Albert
374dd6da9a Clarify that the assigned code is for the TGP. 2023-07-22 18:21:46 -07:00
Dan Albert
e8df6a3d54 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-07-22 18:14:26 -07:00
Dan Albert
e901d1f538 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-07-22 18:14:26 -07:00
Dan Albert
efc2915628 Do not draw empty property rows. 2023-07-22 18:14:26 -07:00
Dan Albert
6c5b35d704 Add laser code property info for the Strike Eagle. 2023-07-22 18:14:26 -07:00
Dan Albert
01e4ebc706 Add laser code config parsing and prop generation. 2023-07-22 18:14:26 -07:00
zhexu14
b10395715d In NewUnitTransferDialog, only list reachable control points.
This PR addresses #3066 by restricting the list of control points in the
new unit transfer dialog to control points reachable from the origin.
This change centralizes the logic for reachable nodes to the
TransitNetworkBuilder class.

This PR was tested by:

1. Loading save from #3066 
2. Using cheat menu to destroy runway at Wadi al Jandali
3. Purchasing units at any of the other control points
4. Pass the turn to allow the purchase to complete
5. Initiating a unit transfer from the other control point and
confirming that Wadi al Jandali does not show up in the list

Steps 2-4 are needed as no ground units show up at Melez when loading
the save directly from the latest dev build.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3066.
2023-07-22 17:58:38 -07:00
Dan Albert
ad8f3d61ea Add UI for acquiring/releasing TGP laser codes. 2023-07-22 17:57:02 -07:00
Dan Albert
85e11711b6 Pre-allocate laser codes for FLOTs and flights. 2023-07-22 17:57:02 -07:00
Dan Albert
31289adb50 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-07-22 17:57:02 -07:00
Dan Albert
d3269bca93 Fix crash when changing squadrons in new flight. 2023-07-22 17:36:56 -07:00
Dan Albert
e35e49e05e Add missing LANTIRN clsid. 2023-07-22 14:28:43 -07:00
Dan Albert
91b56b1573 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-07-22 13:44:17 -07:00
zhexu14
6475c6d1ac Fix default faction selection when changing campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1491.
2023-07-22 12:35:44 -07:00
Dan Albert
48fff39409 Allow per pilot loadouts and properties.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3092.
2023-07-20 23:41:21 -07:00
Dan Albert
2d8cc12a37 Update pydcs.
Needed for the fix for all aircraft of the same type sharing whatever
properties were last set.
2023-07-20 23:41:21 -07:00
Dan Albert
f7d5db7f1e 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-07-19 22:24:44 -07:00
dependabot[bot]
0a82c2b3d1 Bump word-wrap from 1.2.3 to 1.2.4 in /client
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 09:17:50 -07:00
zhexu14
a5eeb83783 Fix anti-runway task generation for LGBs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/894.
2023-07-17 17:07:01 -07:00
Dan Albert
1f73e02d15 Add cheats for destroying and repairing runways. 2023-07-13 22:08:13 -07:00
Dan Albert
aced4d3ef5 Fix canceling transfers when the airbase is full.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2955.
2023-07-13 21:25:45 -07:00
Dan Albert
5b935db923 Add warnings for invalid fast-forward settings.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2739.
2023-07-13 21:03:08 -07:00
Dan Albert
2a29dd4886 Fix off-by-one error in waypoint deletion.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3067.
2023-07-13 20:52:39 -07:00
zhexu14
fa5cabace3 Allow more helicopters to operate from LHAs and CVs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3072.
2023-07-13 20:16:27 -07:00
Dan Albert
8c6d854732 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-07-12 19:55:27 -07:00
Dan Albert
9a59db1ed8 Generate anti-ship missions with group attack.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3068.
2023-07-12 10:33:32 -07:00
Dan Albert
82daa631bf Request DCS log file for mission issues.
Not that anyone reads this.
2023-07-12 01:12:47 -07:00
Dan Albert
19976989ca Improve IP selection near threat zone centers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2754.
2023-07-11 22:16:18 -07:00
Dan Albert
adabb617f3 Update bug templates for 8.1.0. 2023-07-10 09:52:03 -07:00
dependabot[bot]
dc6a18ccb0 Bump tough-cookie from 4.0.0 to 4.1.3 in /client
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 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.0.0...v4.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-09 11:02:17 -07:00
Dan Albert
b549af9cb7 Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
2023-07-05 22:45:06 -07:00
Dan Albert
de8d42e3e5 Test (most of) the rest of WaypointMarker.
There isn't any UI observable behavior of the dragend of the waypoint,
but we can test that the backend was called. The only uncovered parts of
that component are now error paths, but the error handling in that
component is to just ignore errors, so there's also nothing to test
there.
2023-06-28 22:44:02 -07:00
Dan Albert
02c9fe93c5 Fix waypoint drag and drop.
The fix for https://github.com/dcs-liberation/dcs_liberation/issues/3037
wasn't complete. It seems this `- 1` was here to work around the UI
wrongly having two takeoff points... Now that we fixed that, this also
needs to go.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3059.
2023-06-27 23:42:14 -07:00
Dan Albert
374759df0f Test most of WaypointMarker.
Unlike the other map tests which heavily rely on mocks, this one uses
React refs to inspect the constructed leaflet objects. The DOM itself
doesn't appear to contain anything worth testing against (react-leaflet
rendering doesn't work like typical React rendering).

This required some infrastructure changes:

1. Forwarded ref from WaypointMarker to Marker so the test can observe
   it. Added a mergeRefs helper (and its own tests) to make that easier.
2. Switched from identity-obj-proxy to jest-transform-stub, because the
   former doesn't produce a useable image for imports, and we need
   usable images for leaflet to be able to render.

This doesn't yet test drag and drop behavior since that requires mocking
the backend, and this commit is already complicated enough. That'll be
next.
2023-06-27 22:41:33 -07:00
Dan Albert
82c234b09e Make save game requirement even more obvious. 2023-06-27 18:12:58 -07:00
Starfire13
427df21da5 Add F-15E Suite 4+ squadrons. 2023-06-27 18:04:31 -07:00
Starfire13
13a6400286 Add LST to final_countdown_2.yaml 2023-06-27 17:55:21 -07:00
Dan Albert
f1e9abd157 Test SupplyRoute. 2023-06-27 00:28:07 -07:00
Dan Albert
eeacc79cb6 Add test for SplitLines. 2023-06-26 23:53:38 -07:00
Dan Albert
054b422cad 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.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3039.
2023-06-26 23:04:35 -07:00
Dan Albert
d54d906593 Make loadout/properties tab scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3044.
2023-06-26 22:51:35 -07:00
Dan Albert
bb36b8cad3 Allow factions to specify their cargo ship type.
https://github.com/dcs-liberation/dcs_liberation/issues/3039
2023-06-26 22:16:47 -07:00
Dan Albert
c482b497db Add unit data for the Handy Wind. 2023-06-26 22:16:47 -07:00
Dan Albert
27a60fd91e Prevent Samuel Chase from being in AAA/SHORAD.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2938.
2023-06-26 21:56:57 -07:00
Dan Albert
cc2dfa5d35 Fix off-by-one error in livery selector. 2023-06-26 19:36:44 -07:00
Dan Albert
f7b0dfc3a5 Fix UI waypoint numbering.
The flight plan used to not include a waypoint for departure, so a few
places would create one for the sake of the UI, or were built to assume
there was a missing waypoint that was okay to ignore. At some point we
added them to the flight plan, but never updated the UI, so the waypoint
list in the flight dialog started counting from 1 instead of 0, and the
openapi endpoint wrongly reported two departure waypoints to the front-
end.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3037.
2023-06-26 18:50:06 -07:00
Dan Albert
4e90c724bf Undo addition of "(AI)" F-15E variant.
This interacts badly with the built-in squadrons:
https://github.com/dcs-liberation/dcs_liberation/issues/3033. Better to
split the display name and "ID" (which is effectively how the key here
is treated), but that's a more invasive change than I'd like to tackle
in this release.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3033.
2023-06-26 17:54:34 -07:00
Starfire13
fc90b6f2df Update Starfire's campaigns.
* Added Razbam Strike Eagle options.
2023-06-26 17:54:22 -07:00
Starfire13
266c453c99 Fix F-15E Suite 4+ loadouts for the DCS AI.
DCS AI cannot yet use LGBs.

A2G loadouts for anti-unit have been switched to CBU-97s, which appear
to be the most effective weapon type.
A2G loadouts against static targets (OCA/aircraft, OCA/runway, strike)
have been change to Mk82s and Mk84s.
2023-06-25 23:05:15 -07:00
Dan Albert
658a86dff5 Add radio config for the new F-15E.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3028.
2023-06-22 20:53:06 -07:00
Dan Albert
d31644c46a Razbam F-15E banner and icon.
Just reusing the old one.

https://github.com/dcs-liberation/dcs_liberation/issues/3028
2023-06-22 20:45:47 -07:00
Dan Albert
f27c9f5a3d Add Razbam F-15E to factions with the old F-15E.
https://github.com/dcs-liberation/dcs_liberation/issues/3028
2023-06-22 20:45:47 -07:00
Dan Albert
f805febd43 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-22 20:45:47 -07:00
Dan Albert
dca02fea31 Update pydcs (Strike Eagle).
https://github.com/dcs-liberation/dcs_liberation/issues/3028
2023-06-22 20:45:47 -07:00
Starfire13
f97cd5d28f Add loadouts for Razbam F-15E Strike Eagle. 2023-06-22 17:47:05 -07:00
Dan Albert
acd40fd9ea Update bug templates for 8.0.0. 2023-06-21 17:19:17 -07:00
Dan Albert
dc0e41c8c1 Dump develop version to 9.0.0. 2023-06-20 18:47:07 -07:00
Dan Albert
59c10f5d71 Remove save compat hacks for saves from 7.
Save compat was broken by pydcs anyway, so these now do nothing but hide
initialization bugs.
2023-06-20 18:47:07 -07:00
Dan Albert
001e7dfed9 Ignore inconsistent DCS beacon information.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3021.
2023-06-20 18:28:17 -07:00
Dan Albert
cf985d3d37 Test NavMeshLayer. 2023-06-16 22:18:46 -07:00
Dan Albert
1044a1f45f Test FrontLinesLayer. 2023-06-16 22:05:12 -07:00
Starfire13
9fe31859d3 Add Sinai campaign: Exercise Bright Star. 2023-06-16 21:49:13 -07:00
Dan Albert
09417322e7 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-16 21:39:50 -07:00
Dan Albert
136a9b5f02 Test FlightPlansLayer. 2023-06-16 11:18:16 -07:00
Dan Albert
02f22d4930 Test CullingExclusionZones. 2023-06-16 10:35:31 -07:00
Dan Albert
ca133b9fd1 Add a coverage badge to the readme. 2023-06-15 23:54:19 -07:00
Dan Albert
b1af6dfbe1 Test ControlPointsLayer. 2023-06-15 22:50:39 -07:00
Dan Albert
647d1f57f9 Add tests for CombatLayer. 2023-06-15 22:50:39 -07:00
zhexu14
b250fe2f1e Make waypoint altitudes editable. 2023-06-15 22:41:49 -07:00
Starfire13
3be57bf6bb Add S-300 SAM to Egypt 2000 (#3004)
Adds S-300 as an alternative to Egypt's S-300VM for those who are not
using the High Digits SAM mod.
2023-06-15 22:39:50 -07:00
Dan Albert
3c8d0b023e Test Combat. 2023-06-15 22:24:37 -07:00
Dan Albert
adceb3a224 Add tests for AirDefenseRangeLayer. 2023-06-15 21:58:05 -07:00
zhexu14
ab02cd34c5 bump pyinstaller version
This PR bumps pyinstaller version to fix issues with build.
2023-06-15 12:57:32 -07:00
zhexu14
c74b603d81 restore killed_ground_units as it is relied on to track scenery kills
This PR fixes a regression introduced in
https://github.com/dcs-liberation/dcs_liberation/pull/2792 where
refactoring meant that scenery deaths were not tracked correctly.

This PR has been tested by striking a scenery target and confirming that
it appears in state.json and is updated in Liberation. I've also
confirmed that ground units are tracked.
2023-06-15 03:07:54 +00:00
Nosajthedevil
5815401e73 Update OV10A Weapons files 2023-06-14 20:01:16 -07:00
Starfire13
f463fe50f2 Add Chengdu J-7B to Egypt_2000 2023-06-14 20:00:47 -07:00
Starfire13
f60bf62897 Add missing units to Bluefor Modern 2023-06-14 20:00:32 -07:00
Dan Albert
9d43eb8f03 Handle game over.
The contents are completely uninteresting, but at least it's visible.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/978.
2023-06-12 23:43:26 -07:00
Dan Albert
8f0ca08b89 Move turn passing to post-debrief.
If we're going to show a game over dialog, we need to do so before
moving to the next turn, but we will still want to show the debriefing
window. Move those steps to happen after the debrief window.

https://github.com/dcs-liberation/dcs_liberation/issues/978
2023-06-12 23:43:26 -07:00
Dan Albert
0534f66b30 Allow NGW to be called from anywhere.
Any real end game dialog needs a "new game" button. If only the main
window can usefully call the NGW we'd have to plumb that object through
and call into it from that dialog, which is gross. Just make it easier
to call the wizard.

https://github.com/dcs-liberation/dcs_liberation/issues/978
2023-06-12 22:39:17 -07:00
Nosajthedevil
1162e0aa29 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-13 01:04:14 +00:00
Dan Albert
36c4bb88be Sinai support.
The rest of the work is done, so bump the campaign version and update
the changelog.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2979.
2023-06-12 17:56:38 -07:00
Dan Albert
dc6624a159 Fix Sinai timezone offset.
https://github.com/dcs-liberation/dcs_liberation/issues/2979
2023-06-12 17:56:38 -07:00
Nosajthedevil
8b55331326 Fix F-16A icons, loadouts, and tasking.
Updates the filename of the F-16A banner so that liberation can read
it.

Updates the F-16A.yaml resource file to add BAI / CAS / antiship
mission types - since the 15A is capable of these.

Updated the F-16A payload provide more capability - primarily adding
jamming pods to the centerline, moving the fuel tanks from the
centerline to the inner wings, replacing the AIS_ASQ_T50 on the
wingtips with 120Bs, and changing the CAP loadout to have 120Bs on
pylons 8 and 3 so they fall back to sparrows on historical campaigns.
2023-06-12 17:54:47 -07:00
Starfire13
33ca77e3d1 Add Egyptian faction.
I figured it's a good time to add an Egyptian faction since we now have
the Sinai map.
2023-06-12 17:52:19 -07:00
Dan Albert
b92b01b245 Add Sinai landmap.
https://github.com/dcs-liberation/dcs_liberation/issues/2979
2023-06-12 17:44:57 -07:00
Dan Albert
b18b371904 Basic Sinai support.
Not ready (most importantly no landmap).

https://github.com/dcs-liberation/dcs_liberation/issues/2979
2023-06-11 23:54:41 -07:00
Dan Albert
9c7e16d121 Beacons for Sinai.
https://github.com/dcs-liberation/dcs_liberation/issues/2979
2023-06-11 23:54:41 -07:00
Dan Albert
87e869d963 Fix Scenic Inland yaml, fixing NGW. 2023-06-11 23:48:56 -07:00
Dan Albert
4a059a4f8b Update pydcs.
Includes Sinai terrain export.

https://github.com/dcs-liberation/dcs_liberation/issues/2979
2023-06-11 23:44:37 -07:00
Dan Albert
674254e55b Note button relocation in the changelog. 2023-06-11 21:31:46 -07:00
Dan Albert
9fd0e06c05 Make patch coverage task informational.
Not reasonable to require all PRs to avoid regressing coverage yet...
2023-06-11 21:23:31 -07:00
Dan Albert
ecaf84ea55 Update Fuzzle's campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2970.
2023-06-11 21:07:46 -07:00
Dan Albert
e4028cb013 Update pydcs.
Includes the updates needed to fix the Gazelle, and a terrain export for
Normandy for the new airfields added in the latest update.

No Sinai support yet.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2984.
2023-06-11 20:48:40 -07:00
Dan Albert
c45ac50370 Make overfull airbase display scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2974.
2023-06-08 04:59:34 +00:00
Dan Albert
6640609caf Move misc buttons to the toolbar.
The top panel is a bit overfull on some displays whenever the weather
description is verbose.
2023-06-08 04:50:31 +00:00
Dan Albert
e44b6b416b 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-07 05:01:06 +00:00
Dan Albert
8a861d3da5 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-07 05:01:06 +00:00
Dan Albert
380d6551be Add tests for AircraftLayer. 2023-06-06 07:08:57 +00:00
Dan Albert
4cb035b955 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-06 03:12:49 +00:00
Dan Albert
e50be9bbde Update bug templates for 7.1.0 release. 2023-06-03 22:27:14 +00:00
Dan Albert
ec49a10135 Configure squadron sizes for Abu Dhabi. 2023-06-03 22:01:15 +00:00
Dan Albert
23e3630169 Fix Black Sea LHA parking limits.
Everything else was within the limits, but I had forgotten to check the
LHAs.
2023-06-03 21:56:53 +00:00
Dan Albert
e20ab5fbc0 Ack campaign versions for new squadron limits.
I haven't tested all of them, but I know these are compatible, so
advertise them as such.
2023-06-03 21:53:49 +00:00
Dan Albert
4fd2bb131b Warn for new squadron rules with old campaigns.
It's not feasible to actually check the parking limits because we can't
identify parking limits for carriers until the theater is populated.
Doing so is expensive (and depends on other NGW inputs). Instead,
compare against the version of the campaign and guess.

A new (minor) campaign version has been introduced which makes this
required to improve the UI hint. Campaigns that are compatible with the
new rules should update their version to advertise support.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2909.
2023-06-03 21:32:42 +00:00
Dan Albert
42a7102948 Disallow air wing generation with overfull bases.
This also changes the window close button of the air wing configuration
dialog to cancel rather than revert and continue, because otherwise
there's no way for the user to back out of the dialog without fixing all
the overfull bases first.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2910.
2023-06-03 20:55:23 +00:00
Dan Albert
d271ff17c2 Show overfull airbase details in air wing config.
https://github.com/dcs-liberation/dcs_liberation/issues/2910
2023-06-03 20:47:56 +00:00
Dan Albert
cb61dfccc4 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-03 19:31:35 +00:00
Dan Albert
56f93c76eb Add new-game option to show air wing config.
Working on this UI was a huge pain because it required manually creating
a game before the UI could be used.
2023-06-03 19:11:29 +00:00
Dan Albert
36cb3a386c Move CLI game generation after UI init. 2023-06-03 19:11:29 +00:00
Dan Albert
c25e830e6c Factor out game creation parameters in main.
Want to move this deeper into the launch process so that it can use the
UI, but don't want to pass the loosely typed argparse namespace any
more than we have to.
2023-06-03 19:11:29 +00:00
Dan Albert
5d08990cd0 Fix line endings. 2023-06-01 22:49:27 -07:00
Starfire13
2a45cd8899 Add Final Countdown II campaign.
Designed for Normandy 2.0
2023-06-01 22:34:42 -07:00
ColonelAkirNakesh
90b880ec3c Updates china_2010.yaml
Replaces T-55 with Type 59 MBT, adds Type 093 attack sub from China Assets pack
2023-06-01 22:33:11 -07:00
ColonelAkirNakesh
5f0c570d65 Update russia_2010.yaml
Adds Ropucha landing ship, Improved Kilo sub
2023-06-01 22:32:40 -07:00
ColonelAkirNakesh
ce102fcc50 Update allies_1944.yaml
Adds 105mm field howitzer to allies
2023-06-01 22:32:23 -07:00
ColonelAkirNakesh
30c792c15a Enforces Topgun: Maverick Rogue Nation livery for Iranian Tomcat 2023-06-01 22:32:09 -07:00
ColonelAkirNakesh
2f45b856d6 Adds support for Chinese sub Type_093.yaml 2023-06-01 22:31:52 -07:00
ColonelAkirNakesh
31d2b756ab Create TYPE-59.yaml 2023-06-01 22:31:30 -07:00
ColonelAkirNakesh
b5cf889c09 Create Horch_901_typ_40_kfz_21.yaml 2023-06-01 22:31:20 -07:00
ColonelAkirNakesh
19958f91ca Create Pak40.yaml 2023-06-01 22:31:08 -07:00
ColonelAkirNakesh
c775a898a4 Create Wespe124.yaml 2023-06-01 22:30:55 -07:00
ColonelAkirNakesh
535244f6f3 Create LeFH_18-40-105.yaml 2023-06-01 22:30:42 -07:00
ColonelAkirNakesh
9d1d3bdcfa Create Higgins_boat.yaml 2023-06-01 22:29:45 -07:00
ColonelAkirNakesh
36eef2b1b9 Create M2A1-105.yaml 2023-06-01 22:29:27 -07:00
ColonelAkirNakesh
7788425c5c Create IMPROVED_KILO.yaml 2023-06-01 22:28:57 -07:00
ColonelAkirNakesh
ee0c21b3e5 Create BDK-775.yaml 2023-06-01 22:28:43 -07:00
ColonelAkirNakesh
54cd619f75 Create santafe.yaml 2023-06-01 22:28:27 -07:00
ColonelAkirNakesh
051940e23c Create leander-gun-condell.yaml 2023-06-01 22:28:13 -07:00
ColonelAkirNakesh
4fbd7defa3 Create leander-gun-lynch.yaml 2023-06-01 22:27:59 -07:00
Dan Albert
90bda9383d Add missing note about 7.0.0 -> 7.1.0 save compat. 2023-05-31 00:17:02 -07:00
Dan Albert
7798e2970c Minor campaign version bump for Normandy 2.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2804.
2023-05-30 23:49:42 -07:00
Dan Albert
410c25b331 Update beacon data.
Did this for Normandy 2... but unsurprisingly there aren't a whole lot
of beacons in a WW2 map.
2023-05-30 23:49:42 -07:00
Dan Albert
cff74525d6 Update pydcs.
Normandy 2 support.

https://github.com/dcs-liberation/dcs_liberation/issues/2804
2023-05-30 23:49:42 -07:00
Dan Albert
8b7f107044 Update Normandy landmap for Normandy 2.
https://github.com/dcs-liberation/dcs_liberation/issues/2804
2023-05-30 23:24:58 -07:00
Dan Albert
c365a0d739 Add Normandy 2 landmap inputs.
https://github.com/dcs-liberation/dcs_liberation/issues/2804
2023-05-30 23:24:58 -07:00
Dan Albert
1f4fd0fd04 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-05-30 23:24:58 -07:00
Dan Albert
4bb60cb500 Tolerate empty settings files. 2023-05-30 23:24:58 -07:00
Dan Albert
fe96a415be Add settings for battlefield commander slots.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2235.
2023-05-30 22:06:47 -07:00
Dan Albert
6699289bf7 Add performance option to prevent missile tasks.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2508.
2023-05-30 21:47:16 -07:00
Dan Albert
a85d3243fb Add changelog note for BAI fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2922.
2023-05-30 21:12:45 -07:00
Dan Albert
7f2607cf08 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-05-30 21:05:15 -07:00
zhexu14
e50ee976ed 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-05-30 21:01:05 -07:00
ColonelAkirNakesh
29ffb526f2 Replaces Patriot STR with AN/FPS-117 EWR, adds USS Harry Truman 2023-05-30 20:41:00 -07:00
zhexu14
e024013093 issue 2922: make BAI plannable against missile and costal sites 2023-05-30 20:39:39 -07:00
Dan Albert
257dabe4fa Fix formatting of takeoff time. 2023-05-25 22:35:50 -07:00
Dan Albert
406fb61fa4 Add UI for TOT offset adjustment.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2912.
2023-05-25 22:35:50 -07:00
Dan Albert
49dfa95c61 Save the TOT offset in the flight plan.
Prep work for exposing this to the UI.
2023-05-25 22:35:50 -07:00
Dan Albert
c80e5b259f Allow save compat to exist for two versions.
We want to clean up eventually, but allowing it to exist in both develop
and the release branch makes cherry picks easier.
2023-05-25 22:35:50 -07:00
Dan Albert
64e2213f28 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-25 21:10:21 -07:00
Dan Albert
ced93afd49 Update bug templates now that 7.0.0 is out. 2023-05-25 21:10:21 -07:00
Dan Albert
f719a5ec34 Update bug templates now that 7.0.0 is out. 2023-05-23 01:38:16 -07:00
Dan Albert
6f4ac1dc39 Fix line endings.
These get broken whenever someone uses the GitHub file upload editor,
since that doesn't understand .gitattributes.
2023-05-23 00:37:28 -07:00
Starfire13
f831c8efdd 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-23 00:23:41 -07:00
Starfire13
e3c6b03603 Update Apache loadouts.
BAI loadout updated to use the new radar guided hellfires. Aux tanks
removed in favour of extra cannon ammo.
2023-05-20 09:21:16 +00:00
Dan Albert
7a2e8279cd Fix syntax error in bluefor_modern.yaml. 2023-05-19 17:51:22 -07:00
Dan Albert
24e72475b4 Checkpoint game before sim, auto-revert on abort.
An alternative to
https://github.com/dcs-liberation/dcs_liberation/pull/2891 that I ended
up liking much better (I had assumed some part of the UI would fail or
at least look terrible with this approach, but it seems to work quite
well).

On by default now since it's far less frightening than the previous
thing.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2735.
2023-05-19 17:44:18 -07:00
Starfire13
f10350dac4 Update scenic_inland.yaml
A formatting fix for scenic route 2 that was preventing new campaign start. Fixing at Fuzzle's request as he doesn't have the time for it right now.
2023-05-19 17:36:29 -07:00
Dan Albert
f068976749 Fuzzle campaign updates.
https://github.com/dcs-liberation/dcs_liberation/issues/2889
2023-05-19 01:17:51 -07:00
Dan Albert
4b4c45e90f Attempt to reset the simulation on abort.
This is optional because I really don't know if I trust it. I don't see
much wrong with it (aside from the warning about not using it with auto-
resolve, because it won't restore lost aircraft), but it's really not
something I'd built for since it's not going to be possible as the RTS
features grow.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2735.
2023-05-19 01:05:25 -07:00
Dan Albert
527eac1f4a Fix docs version.
This ought to be auto-imported but that requires liberation being
importable here and that's proving non-trivial.
2023-05-18 23:17:08 -07:00
Dan Albert
92c3087187 Advance develop to 8.0.0-preview. 2023-05-18 22:44:39 -07:00
Dan Albert
8dc3fca290 Update contributors list.
<3
2023-05-18 22:24:00 -07:00
dependabot[bot]
0d18b57074 Bump starlette from 0.26.1 to 0.27.0
Includes dependent update to fastapi.

Bumps [starlette](https://github.com/encode/starlette) from 0.26.1 to 0.27.0.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.26.1...0.27.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 22:23:08 -07:00
Dan Albert
b745e7c8ec Rehiding speed controls for 7.
7 is shipping sooner than expected, so re-hide these since it's not
ready yet.

https://github.com/dcs-liberation/dcs_liberation/issues/2746
2023-05-18 22:02:37 -07:00
Dan Albert
800ca598ef Add missing changlog note for C-47.
https://github.com/dcs-liberation/dcs_liberation/pull/2812
2023-05-18 21:38:08 -07:00
Dan Albert
212813e31d Update pydcs.
Support for DCS 2.8.5.40170, including laser hellfire, pylon 5 for the
apache, and a more tolerant livery scanner (not all liveries will be
discovered, but Liberation at least won't crash).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2880.
2023-05-18 21:30:18 -07:00
Dan Albert
571fe21d57 Fix campaign line endings. 2023-05-18 21:16:29 -07:00
Starfire13
cd952312b7 Update Starfire's campaign updates for 10.7. 2023-05-17 19:03:48 -07:00
Dan Albert
23982fdac6 Add changelog note for pydcs livery scanner crash fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2747.
2023-05-16 21:28:29 -07:00
Dan Albert
8724b458a8 Add changelog note for TALD overfly fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2781
2023-05-16 20:56:33 -07:00
Dan Albert
ef64899701 Add changelog note for "recreate as" fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2779
2023-05-16 20:56:33 -07:00
Dan Albert
51e4dc5c22 Add changelog note for fixed recovery tanker tasks.
https://github.com/dcs-liberation/dcs_liberation/issues/2771
2023-05-16 20:56:33 -07:00
Dan Albert
ac5edeb936 Add changelog note for improved dead event handling.
https://github.com/dcs-liberation/dcs_liberation/issues/2765
2023-05-16 20:56:33 -07:00
Dan Albert
f7364d04ed Add changelog note for air wing reset fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2751
2023-05-16 20:56:33 -07:00
Dan Albert
483bf73213 Add changelog note for BAI planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2618
2023-05-16 20:56:33 -07:00
Dan Albert
0b87f90d4f Add changelog note for built-in TGP fix. 2023-05-16 20:56:33 -07:00
Dan Albert
202fe1109b Add changelog note for AEW&C planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2048
2023-05-16 20:56:33 -07:00
Dan Albert
5a8863b07e Add changelog note for TALD fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2780.
2023-05-16 20:56:33 -07:00
Dan Albert
889e1f5da2 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-16 18:28:18 -07:00
ColonelAkirNakesh
418d78f99b Adds J-11 flyable, Jeff and BS3 liveries
Adds J-11 to CJTF Blue. Enforces fictional USAF Aggressor livery for J-11, fictional US livery for Jeff, non-Russian 'neutral black' livery for BS3.
2023-05-16 18:10:53 -07:00
ColonelAkirNakesh
a4b5bc198c Restores Flak 18 to free German faction 2023-05-16 18:09:37 -07:00
zhexu14
fcb2f21d36 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-16 18:09:03 -07:00
zhexu14
15abf3d6fe Update ADM141 data to include clsids for hornet 2023-05-16 18:06:50 -07:00
Dan Albert
a8b7aca4fb 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-16 00:52:51 -07:00
Dan Albert
799dbfa99c Move and split up weather.py.
This is getting out of hand, and I'm about to make it worse.
2023-05-16 00:52:51 -07:00
Dan Albert
eb31a0f038 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-15 22:44:17 -07:00
Dan Albert
78e2da9196 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-15 21:37:43 -07:00
Dan Albert
ca96a232f0 Revert "Use the actual Country type instead of the name."
This reverts commit bd2ec12e0f.

Country is both the data (name, ID, etc) and the container for groups
added to the miz, so it can't be used across multiple mission
generations. See https://github.com/pydcs/dcs/issues/314 for potential
follow up work that would let us do this.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2864.
2023-05-15 18:23:48 -07:00
Dan Albert
03671bbfb0 Allow manual SAM orientation.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2479.
2023-05-13 17:20:03 -07:00
Dan Albert
97c4168d13 Wrap settings titles. 2023-05-13 16:59:49 -07:00
Dan Albert
e0edfa68b1 Make settings scrollable. 2023-05-13 16:59:49 -07:00
Dan Albert
97c238a4bb Warn players that take off disallows new flights. 2023-05-13 16:47:56 -07:00
Dan Albert
a6c5b03212 Do not create refueling tasks without tankers.
If the package does not have a tanker, the refueling task will cause AI
flights to go to an arbitrary tanker, which may cause them to fly
through enemy territory or even go farther than their arrival airbase.

It's also not remotely possible for every AI flight in the game to
refuel in most missions. There's typically one tanker and dozens of
aircraft that would previously attempt to refuel.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2716.
2023-05-13 16:23:31 -07:00
zhexu14
5b148a74aa add tests for mission_types for various theather ground objects 2023-05-13 12:56:38 -07:00
ColonelAkirNakesh
33242048e7 Makes guard tower (house2arm) a AAA unit 2023-05-13 12:50:49 -07:00
Dan Albert
4f7932ad8a Remove old aircraft selection mode.
New mode seems to be working well.
2023-05-13 12:47:51 -07:00
Dan Albert
8158cc7112 Add livery selection dropdown to air wing config.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1861.
2023-05-13 12:33:02 -07:00
Dan Albert
50d7a3e46f Update pydcs.
More livery APIs...
2023-05-13 12:24:24 -07:00
Starfire13
b6b9a22668 Update B-52H.yaml
Added antiship mission type to B52
2023-05-12 22:21:36 -07:00
Dan Albert
bd2ec12e0f 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-12 22:18:40 -07:00
Dan Albert
752a90cddb Fix broken squadron.
It's "The Netherlands", not "Netherlands".
2023-05-12 22:18:40 -07:00
Dan Albert
004594639e Update pydcs.
Includes the rewritten livery scanning code. It might need some more
tweaks to be fast enough, but it at least now doesn't spam the log for
machines that don't have DCS (or Liberation) installed, and it's not
slow until something tries to use it, so until we add the UI we won't
have to pay for it during startup.
2023-05-12 18:10:11 -07:00
ColonelAkirNakesh
6943adf6df 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-12 18:05:12 -07:00
Dan Albert
5ad57d2878 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-10 23:14:04 -07:00
Dan Albert
acb2d01d92 Update pydcs.
No new data (I think), but includes a bunch of fixes for the lua parser
and rewrites some suspicious looking (but probably safe) code in the
livery scanner.

Also changes this dependency to non-editable by default. Pip chose this
automatically for me at some point, but the rules for whether or not a
py.typed file will actually be detected for an editable install are
complicated and sometimes this won't work, leading too a lot of mypy
errors. There's no need for this to be editable anyway.
2023-05-10 23:03:14 -07:00
Dan Albert
15fa73a514 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-05 18:16:42 -07:00
Dan Albert
7f94b34277 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-04 23:08:11 -07:00
Dan Albert
4d2ed64a70 Fix the command line campaign generator. 2023-05-04 23:05:21 -07:00
Dan Albert
e444761059 Support replacing squadrons in-place. 2023-05-04 20:44:27 -07:00
zhexu14
c9e4b5eba4 enable AEWC missions on FOBs 2023-05-04 20:35:51 -07:00
Dan Albert
c14c7cc73d Make patch check informational as well. 2023-05-04 18:41:27 -07:00
Dan Albert
5e459c2390 Expand python coverage, use coveragerc. 2023-05-04 10:07:34 -07:00
Dan Albert
4ee6de2c84 Make coverage checks informational.
PRs shouldn't be failing because coverage dropped. Not until our tests
aren't terrible, anyway.
2023-05-04 10:07:34 -07:00
Dan Albert
a7d2eca209 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-04 01:18:45 -07:00
Dan Albert
57a4a7c282 Test typescript and collect coverage.
We don't actually have any tests yet :(
2023-05-03 23:18:15 -07:00
Dan Albert
b4c5236d8b 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-03 23:18:15 -07:00
Dan Albert
de2a779715 Gather and upload coverage of python tests. 2023-05-03 21:54:52 -07:00
zhexu14
352c2ddc56 make BAI plannable against vehicles only 2023-05-03 10:12:15 -07:00
Dan Albert
76e6aff9d7 Ignore parse errors of preferences file.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2613.
2023-05-02 00:39:18 -07:00
Dan Albert
b4c02767ac Update pydcs.
Includes the fix to prevent the livery scanner from crashing on import
when the Liberation preferences file cannot be parsed.

https://github.com/dcs-liberation/dcs_liberation/issues/2613
2023-05-02 00:39:18 -07:00
zhexu14
aa2a888ed0 Handle edge case where aircraft have built in TPGs 2023-05-02 00:34:18 -07:00
zhexu14
b50d82feff Add GBU-27 yaml 2023-05-02 00:34:18 -07:00
Dan Albert
cce9592ac8 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-04-26 23:26:23 -07:00
Dan Albert
b69def652e Add debug command to dump aircraft priorities.
https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-04-26 23:26:23 -07:00
Dan Albert
6df83485e1 Load task priorities from YAML.
Not used yet.

https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-04-26 23:26:23 -07:00
Dan Albert
e297fcbff8 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-04-26 23:26:23 -07:00
Dan Albert
2f2ebff674 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-04-26 23:09:57 -07:00
Dan Albert
06b74c4ca6 Update mypy, fastapi, pydantic.
mypy update is needed for typing.Self support. It caught an existing bug
(missing @property on override), and fixed a bug so we can drop an
ignore.

Upgrading mypy requires upgrading pydantic to get the newest pydantic
mypy plugin, and since that's what's driving fastapi it's probably smart
to upgrade those together.
2023-04-26 23:00:23 -07:00
Dan Albert
7ddfc5e5ad Fix pydcs extension packages.
pydcs_extensions.__init__ wasn't actually doing anything because without
an __init__.py each of these "packages" was empty. This has been working
by accident because of ai_flight_planner_db.py.
2023-04-26 22:08:56 -07:00
zhexu14
f86709ebd0 Prevent decoy flights from overflying the target.
Force decoy flights to the next waypoints 120 seconds after the IP.
The duration is just an approximation, but it seems to work.

See discussion in https://github.com/dcs-liberation/dcs_liberation/pull/2810
for more details.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2781.
2023-04-26 19:30:34 -07:00
Dan Albert
7266de42f5 Format aircraft yamls. 2023-04-26 19:12:13 -07:00
Dan Albert
47831d43b5 Remember mod choices in the NGW. 2023-04-26 00:36:34 -07:00
Dan Albert
cf47dd82d7 Remember player preferences for plugins. 2023-04-26 00:24:46 -07:00
Dan Albert
081c97583b Add a plugins page to the NGW. 2023-04-26 00:07:36 -07:00
Dan Albert
77f1706cbb Extract plugins from settings.
There isn't really any need for these two types to interact. The lua
plugin manager effectively fully owned its properties, it just delegated
all reads and writes to the settings object.

Instead, break the plugin settings out into the plugin manager and
preserve the manager in the Game. This will make it possible to expose
plugin options in the NGW without breaking the game on cancel.
2023-04-25 23:28:01 -07:00
Dan Albert
664efa3ace Document Lua plugin APIs.
Trying to fix the singleton-ness in the plugin manager because it
prevents injecting settings until the game is fully committed (new game
wizard completed). Added the docs describing what I think I've been able
to discover.
2023-04-25 21:32:36 -07:00
Pekka Kiviniemi
b6059f692e Create unit tests for pilot class.
DCS Liberation does not have much unit tests. Pilot class is not very
exiting but it was a good place to start.
2023-04-26 03:03:25 +00:00
zhexu14
4bf8f25d31 Add decoy weapon type and configure AI tasks.
See https://github.com/dcs-liberation/dcs_liberation/pull/2810
for more discussion.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2780.
2023-04-25 20:02:30 -07:00
Dan Albert
e2c6d6788c Persist some campaign creation options.
We should also persist mod options, but those will go in a separate file
because they aren't a part of Settings.

Plugins need some work before that can be saved here. They're not
configurable in the NGW currently, so that needs to be fixed first. It
also appears that it may not be safe to inject the settings object with
plugin options until the game is created, but that needs more
investigation (see the comment in Settings.save_player_settings).

Another obvious candidate would be the desired player mission duration,
but we need to implement custom serialization for that first.
2023-04-24 22:49:30 -07:00
Nosajthedevil
1c20bc3966 Add DCS AI C-47 support 2023-04-24 22:49:09 -07:00
zhexu14
c31d76ec83 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-04-22 10:54:42 -07:00
zhexu14
ada8f9f8ee Fix error when resetting air wing configuration.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2751.
2023-04-22 10:51:26 -07:00
zhexu14
1b72598803 Add missing argument when fixing TOTs.
Part of https://github.com/dcs-liberation/dcs_liberation/issues/2746.
2023-04-22 10:50:20 -07:00
zhexu14
4bc8bf52e7 Also use Tanker task for recovery tankers.
DCS apparently needs both to function.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2771.
2023-04-20 17:59:14 -07:00
zhexu14
0d257a2c3b 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-04-19 06:16:41 +00:00
Nosajthedevil
0ba602d3aa 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-04-18 23:07:29 -07:00
dependabot[bot]
38d18ba767 Bump webpack from 5.69.1 to 5.76.1 in /client
Bumps [webpack](https://github.com/webpack/webpack) from 5.69.1 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.69.1...v5.76.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 11:36:12 -07:00
Dan Albert
94b8aa7213 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-04-18 11:35:41 -07:00
Dan Albert
1ac36d03da Allow in-line definitions of campaign factions.
A lot of campaigns want to define custom factions. This allows them to
do so without us having to fill the built-in factions list with a bunch
of campaign-specific factions. It also makes custom campaigns more
portable as they don't need to also distribute the custom faction files.
2023-04-17 23:52:25 -07:00
Dan Albert
dca256364a Convert existing factions to YAML. 2023-04-17 22:40:02 -07:00
Dan Albert
652e7d8d7b Allow factions to use YAML.
Comments! No more failures because you accidentally used a trailing
comma!

JSON still supported since it's basically free, but we should probably
remove that in 8 just so the docs can be less confusing for users who
will be confused if only one format is documented (and we definitely
won't maintain duplicate docs).
2023-04-17 22:40:02 -07:00
Dan Albert
42e9a6294b Remove eager loading of factions.
Eager loading meant that users would need to restart Liberation to pick
up changes to faction files. That's annoying for modders, slows down
start up, and uselessly sits in RAM when it's not needed after game
creation.

Also removes the __getitem__ and __iter__ methods in favor of named
methods, since the dunder methods are more or less impenetrable for IDEs
and grep.
2023-04-17 22:40:02 -07:00
Dan Albert
f3d2952579 Fix typo in Germany 1944.
Oops.
2023-04-17 19:31:03 -07:00
Dan Albert
ee1d4cd3e4 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-04-17 18:10:25 -07:00
Dan Albert
4e067eaaa8 Remove GroundPlanners from the save state.
These are only used during mission generation. Remove them from the save
state to reduce compatibility requirements. We also have at least one
report of this data being corrupted... somehow. I don't know how that
could have happened, but if there's no data to corrupt in the first
place that's not a problem. If the corruption _does_ recur, it'll be
much easier to repro if it corrupts during mission generation rather
than during turn initialization.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2729.
2023-04-15 14:27:20 -07:00
dependabot[bot]
4a0975b21b Update Starlette and FastAPI. 2023-04-15 13:50:34 -07:00
Dan Albert
dd9ad2f0be Update pydcs for the plane helipad spawning fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2782.
2023-04-15 13:47:24 -07:00
Dan Albert
d1fe267072 Fix unit details screen for Qt6.
The `setMargin` shorthand was apparently to simple, so Qt6 removed it in
favor of `setContentMargins`, which does the same thing?

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2784.
2023-04-15 13:41:09 -07:00
Dan Albert
28ba100864 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-04-15 13:27:08 -07:00
Dan Albert
99ea06c0d5 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-04-15 13:27:08 -07:00
Dan Albert
fa070b2126 Improve logging in defaultsquadronassigner.py.
https://github.com/dcs-liberation/dcs_liberation/issues/2786
2023-04-15 13:27:08 -07:00
Dan Albert
5405632434 Improve comments in defaultsquadronassigner.py. 2023-04-15 12:33:52 -07:00
Dan Albert
ca2cec5d7d Organize imports in defaultsquadronassigner.py. 2023-04-15 12:33:52 -07:00
Starfire13
8150176fc6 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-04-09 19:18:06 -07:00
Dan Albert
5c72e0754a Fix iteration error when splitting transfers.
If one type of unit is zeroed but there are still other units to check
in the dict, the dict will have changed size during iteration. Iterate
on a copy of the dict instead.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2773.
2023-03-31 16:09:33 -07:00
Dan Albert
af2e195f90 Update pydcs to fix Falklands airport data.
The Falklands data in pydcs was missing an (unfinished, unusable)
airport, and that was breaking miz loading of campaigns that were edited
or created with a version of DCS to include these airports which have
incomplete data.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2732.
2023-03-30 17:26:05 -07:00
Nosajthedevil
8523c11357 Support for the updated F-4B/C mod (#2769)
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.
2023-03-24 18:41:03 -07:00
Dan Albert
b860d72c2d Prevent transfer splitting from leaving empty units.
If the transport were able to move exactly the quantity of units of the
given type remaining in the transfer without moving the whole order, the
transfer order would be left with instructions to transfer zero of that
unit. That's an invariant violation, and was resulting in _later_
transfers attempting to create a convoy with zero units, which pydcs
rightly rejects.

For example: if 2 Abrams and 2 Paladins are ordered to transfer from a
disconnected FOB to a distant location that is connected by road, and
only two cargo slots are available, that transfer could be split into:

```
{
    Abrams: 2
}
```

and

```
{
    Abrams: 0,
    Paladin: 2
}
```

Depending on the route, those airlifted units might end up still needing
road transit (we prefer short airlifts rather than direct routes because
it gives the player more opportunities to intercept enemy convoys). The
current turn would airlift the Abrams-only group and the Paladin group
would wait. On the next turn the Abrams would travel by road and the
Paladins would be airlifted. On the _third_ turn, the Paladins (and zero
Abrams) would generate an invalid convoy.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2761.
2023-03-18 14:03:41 -07:00
Dan Albert
bcb7d059c0 Tolerate saving when temp is on another FS.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2748.
2023-03-14 16:21:24 -07:00
Dan Albert
bc0dacf974 Fix saving of saves from other machines.
Need to reset the persisted save paths on load, since the file that was
loaded may have been moved since it was saved and the original location
may no longer be accessible.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2756.
2023-03-13 19:41:28 -07:00
Dan Albert
2d9b0177ec 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-03-13 18:48:20 -07:00
Dan Albert
2fed84c676 Fix radio data for the A-10Cs.
My earlier tests were not accurate enough. It turns out that yes, DCS
does still do some channel clobbering with these, so fix the radio
selection to account for that.

I also fumbled some copy paste between the A-10Cs so the A-10C II
channel assignment ended up in the wrong section doing nothing...
2023-03-13 18:48:20 -07:00
Dan Albert
a73c06223d Update radio configuration for the A-10s.
The latest DCS update both added support for preset radios (two both
A-10C modules!), and re-ordered the legacy A-10C's radios so we can use
the VHF radio for intra-flight.

After this patch, the legacy A-10C will use VHF for intra-flight, the
new module will use one AN/ARC-210 for intra-flight and the other for
inter-flight comms, and both modules will have preset channels assigned.
2023-03-11 15:30:36 -08:00
Dan Albert
e129c02109 Update pydcs.
Includes the new A-10C radios. Will follow up to make Liberation
actually use them.

This manually removes some weapons from mod files that were removed from
DCS. Those mods may need re-exporting, and may also need updating by
their authors, but for now this should keep them functioning.
2023-03-11 15:30:36 -08:00
Dan Albert
67dae80b76 Rework the speed controls for 1080p friendliness.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2396.
2023-02-19 12:35:21 -08:00
Nosajthedevil
088b69a6ef Russian Weapon Fixes
R-24R weapons file correction to R-3R fallback name - now matches name used in R-3R file.

Remove KH-28 weapons file due to removal from DCS.

Update KH-25MP weapons file to  fallback to KH-29L instead of Kh-28. Kh-28 previously fell back to Kh-29L.
2023-02-11 16:43:12 -08:00
Nosajthedevil
db64f37a95 Update AIM-9Juli.yaml 2023-02-11 16:42:55 -08:00
Nosajthedevil
af6c42f49b Update AIM-9Juli-2X.yaml 2023-02-11 16:42:55 -08:00
Nosajthedevil
4503170075 Added US Weapons Files
Adds US Weapons files with fallbacks in order of capability.

Aim-7P added by ED for several US fighters. Falls back to 7MH, and Aim-120B fallback adjusted from MH to P.

Aim-9J and Aim-9Juli added by ED for the Mirage F-1, also used by F-4 mod and will likely be added to the F-4E whenever it ships. Aim-9J placed between  9P and 9B, Aim-9 Juli placed between 9L and 9P5.

2x9j and 2x9Juli added by VSN for F-4 mod. Placed between 2x versions of same missiles as above.

Aim-7E now falls back to 2xAim9x instead of single Aim9x so that it runs through the entire loop of Aim-9s.
2023-02-11 16:42:55 -08:00
dependabot[bot]
c07f343d0e Bump @sideway/formula from 3.0.0 to 3.0.1 in /client
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 20:06:27 -08:00
Dan Albert
725f6c55a5 Enable sim speed controls by default.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:51:47 -08:00
Dan Albert
364742a98b Do not allow adding flights after package start.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:47:53 -08:00
Dan Albert
7b35a749e2 Prevent past startup when adding new flights.
When a new flight is added to a package, if the TOT is early enough the
new flight might have a startup time in the past. Clamp the TOT when
adding new flights to the package to avoid this.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:47:53 -08:00
Dan Albert
23ac510d26 Don't allow changing TOT for started packages.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:33:08 -08:00
Dan Albert
ba10298dbc Allow adjusting TOTs after sim start.
This makes the start time in WaitingForStart dynamic, which is more
expensive but probably still cheap enough.

It also checks that the new TOT will not result in a start time in the
past when the player changes the TOT.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:33:08 -08:00
Dan Albert
c6a8aeac1d Update bug templates for 6.1.1. 2023-02-05 15:18:09 -08:00
Raffson
b41ef0ab13 Fix heli spawn/landing at FOB/FARP
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2719.

(cherry picked from commit 34de855b8f889b72406c101d0cea385988e24bf9)
2023-02-05 14:09:01 -08:00
Dan Albert
c33a0d5deb Don't generate runway data for heliports.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2710.
2023-02-05 13:19:18 -08:00
Nosajthedevil
70b9d4c174 Add VSN F-4 Mod Support
Added VSN F-4 Mod support
2023-02-02 17:15:21 -08:00
dependabot[bot]
1462bedd97 Bump http-cache-semantics from 4.1.0 to 4.1.1 in /client
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 17:08:17 -08:00
Dan Albert
937bacacb7 Pin version of black used in GHA.
Black rolls out style changes every year, and using "stable" means that
the check run on PRs might start formatting differently than we do
locally, or require a reformat of the codebase to make a PR submittable.

Pin to the version that we've been using. We should update to 23 at some
point, but we want to do that deliberately.
2023-02-02 16:35:51 -08:00
Dan Albert
e8824e5d03 Fix line endings. 2023-01-31 18:44:33 -08:00
Dan Albert
e030cfebb8 Update pydcs.
Export from DCS 2.8.2.35632.
2023-01-28 14:03:38 -08:00
Dan Albert
eea98b01f6 Fix invalid tanker planning.
All three refueling missions share a common task type and differentiate
their behavior based on the type and allegiance of the package target.
This means that if the theater commander identifies a carrier as the
best location for a theater refueling task, a recovery tanker will be
planned by mistake.

If this happens on a sunken carrier, mission generation will fail
because a recovery tanker cannot be generated for a sunken carrier.

Fix the crash and the misplanned theater tanker by preventing the
commander from choosing fleet control points as refueling targets.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2693.
2023-01-28 12:57:03 -08:00
Dan Albert
f8c1d291ed Update the versions listed in the bug template. 2023-01-28 11:46:37 -08:00
Dan Albert
0df268f331 Fix unit ID of the KS-19.
It seems like this unit has never worked because of the unit ID
mismatch.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2701.
2023-01-28 11:44:31 -08:00
Dan Albert
be2ad226f4 Export game.persistence.mission_path_for.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2699.
2023-01-27 16:52:45 -08:00
dependabot[bot]
a4df23361e Bump future from 0.18.2 to 0.18.3
Bumps [future](https://github.com/PythonCharmers/python-future) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/PythonCharmers/python-future/releases)
- [Changelog](https://github.com/PythonCharmers/python-future/blob/master/docs/changelog.rst)
- [Commits](https://github.com/PythonCharmers/python-future/compare/v0.18.2...v0.18.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 17:26:34 -08:00
Dan Albert
0f34946127 Restructure save games into a zipped bundle.
This is the first step toward bundling all assets related to a save game
into a single item. That makes it easier to avoid clobbering "temporary"
assets from other games like the state.json, but also makes it easier
for players to file bug reports, since there's only a single asset to
upload.

This is only the first step because so far it only includes the various
save files: start of turn, end of last turn before results processing,
and "latest" (the game saved explicitly by the player).
2023-01-16 13:59:16 -08:00
MetalStormGhost
575470ae1b Updated Community A-4E-C mod version support to 2.1.0 release. 2023-01-09 23:28:22 -08:00
dependabot[bot]
31c59e7380 Bump json5 from 1.0.1 to 1.0.2 in /client
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-07 21:25:21 -08:00
Dan Albert
4b542b70ae Fix post-results "last turn" save. 2023-01-04 15:15:56 -08:00
Dan Albert
9cb641bddf 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-01-04 12:58:36 -08:00
Dan Albert
7a8b3591cd 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
2023-01-04 12:58:36 -08:00
Dan Albert
fd2ba6b2b2 Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-01-04 12:58:36 -08:00
Dan Albert
ac6cc39616 Fix AdjustToContents use for Qt6.
This is no longer a property exposed directly on QComboBox.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2684.
2023-01-04 12:30:43 -08:00
Dan Albert
0be9e1985a Upgrade to Python 3.11.
Supposedly much faster. Probably other cool stuff.
2022-12-29 17:47:49 -08:00
Dan Albert
a1af4e563a Python 3.11 compatibility.
https://docs.python.org/3/library/asyncio-task.html#asyncio.wait says:

> Changed in version 3.11: Passing coroutine objects to wait() directly
> is forbidden.
2022-12-29 17:47:49 -08:00
Dan Albert
7167e84a8f Add back asgiref.
uvicorn now needs this for type information. Not sure why this works
with Python 3.10.
2022-12-29 17:47:49 -08:00
Dan Albert
7eeb84de47 Upgrade lots of dependencies.
Cleared the requirements.txt and rebuilt from scratch. The only thing
left un-upgraded is mypy, which I'll deal with separately because it
catches new issues.
2022-12-29 17:09:42 -08:00
Dan Albert
45aabf369b Upgrade Shapely. 2022-12-29 16:48:42 -08:00
Dan Albert
e396a21791 Update pyproj. 2022-12-29 16:47:29 -08:00
Dan Albert
c6635a4885 Update FastAPI and friends. 2022-12-29 16:43:43 -08:00
Dan Albert
306971230b Update to PySide6.
It sounds like PySide2 will not be moving to Python 3.11, so we're stuck
on 3.10 without this. Upgrading to a newer Qt also fixes some high DPI
bugs (the file browser dialog for save/load is no longer tiny on 4k).

https://github.com/pyinstaller/pyinstaller/issues/5414 previously
blocked this, but the bug appears to be fixed now.
2022-12-29 16:26:50 -08:00
Dan Albert
e0c13846a7 Upgrade pyinstaller.
Should include https://github.com/pyinstaller/pyinstaller/issues/5414.
2022-12-29 15:39:50 -08:00
Dan Albert
4aa42e6573 Remove isinstance use in flight support data.
mypy struggles to prove this cast correct when there are two or'd
isinstance checks where both types coincidentally have properties of the
same name (but no defined protocol making that explicit). I'm not really
sure why mypy is happy with this in its current state, but it isn't
after a change I'm making.

All our isinstance use is a bit of an anti-pattern anyway, so extract a
method that exposes the data we care about.

The start/end times for tankers aren't actually used, so this could be
simplified even more, but that data _should_ be used.
2022-12-28 14:02:31 -08:00
Dan Albert
24a04fb8c6 Workaround pycharm debugger issue when used.
Works around
https://youtrack.jetbrains.com/issue/PY-53232/Debugger-doesnt-work-when-pyproj-is-imported
whenever the pycharm debugger is detected.
2022-12-28 14:00:45 -08:00
SnappyComebacks
321de8d4ec 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.
2022-12-28 14:19:33 -07:00
Dan Albert
5db82f733f Revert "Fix for orbit's broken stop condition"
ED fixed the bug.

This reverts commit 73ee2ba4c0.
2022-12-28 12:28:39 -08:00
Dan Albert
d65fbf299c Note that we don't support stable DCS. 2022-12-21 18:06:52 -08:00
Dan Albert
7c2bb3bd85 Remove note about DCS bug.
This was fixed in
https://www.digitalcombatsimulator.com/en/news/changelog/openbeta/2.8.1.34437/

> Fixed: Stop Condition "Time More" is broken.
2022-12-21 13:29:23 -08:00
RndName
f9903f1e19 Only check for ground units in capture trigger zone
requires pydcs update: https://github.com/pydcs/dcs/pull/279
2022-12-21 13:04:09 -08:00
RndName
4a4935f165 Change iads command unit type 2022-12-21 13:04:09 -08:00
RndName
09f92cc5e4 Only add skynet iads command unit when advanced iads is in use 2022-12-21 13:04:09 -08:00
Dan Albert
887e5997c2 Update pydcs.
Includes UnitType parameter of AllOfCoalition in/out zone condition.
2022-12-21 12:56:17 -08:00
Dan Albert
f88a50dd07 Update changelog for Blackshark 3.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2657.
2022-12-21 12:29:45 -08:00
Dan Albert
3f12a5ae3d Add icons and banners for BS3.
https://github.com/dcs-liberation/dcs_liberation/issues/2657
2022-12-21 12:29:45 -08:00
Dan Albert
f2946817bf Add BS3 loadouts.
https://github.com/dcs-liberation/dcs_liberation/issues/2657
2022-12-21 12:29:45 -08:00
Dan Albert
935a9b0631 Add BS3 to factions that have BS2.
https://github.com/dcs-liberation/dcs_liberation/issues/2657
2022-12-21 12:29:45 -08:00
Dan Albert
c0dc411102 Add blackshark 3 yaml.
There are no significant notable changes from Blackshark 2, so this is
the same YAML.

https://github.com/dcs-liberation/dcs_liberation/issues/2657
2022-12-21 12:29:45 -08:00
Dan Albert
55037626a4 Add Blackshark 3 to the mission planning DB.
https://github.com/dcs-liberation/dcs_liberation/issues/2657
2022-12-21 12:29:45 -08:00
Dan Albert
fc3e72bacf Fix type-only import that needs to be real.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2660.
2022-12-21 12:26:41 -08:00
SnappyComebacks
0fd0f0e7c0 Recovery tanker follow up (#2659)
Fix timing issues for RecoveryTankerFlightPlan.

AEWC and Refueling can be planned on LHA.
2022-12-20 21:47:50 -07:00
Dan Albert
22503d4e95 Save the last turn for bug reports.
We often get save games uploaded with bug reports that are already in a
broken state with nothing we can do about it. This saves that turn to
`last_turn.liberation` so users are less likely to have clobbered the
useful data before filing the report.
2022-12-20 13:46:21 -08:00
Dan Albert
de9236e93a Fix the channel's landmap.
Caused by a bad rename when I did the migration. The landmap in 6.0.0
was actually a GIF...

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2612.
2022-12-20 12:59:38 -08:00
Dan Albert
66523301aa Update changelog for pydcs update. 2022-12-20 12:31:22 -08:00
SnappyComebacks
9a81121ac1 Recovery Tanker for carriers. (#2649)
Implement recovery tankers for carriers.

UnitMap gets a little more data to store.  Recovery tankers depend on the unit map.
2022-12-19 21:08:19 -07:00
SnappyComebacks
a245ba80c3 Update F-15E loadouts. 2022-12-14 21:45:49 -07:00
Dan Albert
9a1860fc5e Add new British navy units to the UK faction.
I haven't removed the old US navy stuff from this faction, since all the
new UK ships are frigates, and removing the US stuff would deprive the
faction of cruisers and destroyers, which might break generation (I'm
not familiar enough with the new system to say for sure).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2571.
2022-12-13 00:05:44 -08:00
Dan Albert
f3f5ab70ea Add HMS Invincible as a valid runway. 2022-12-13 00:05:44 -08:00
Dan Albert
6ce7638fdc Fix changelog formatting. 2022-12-12 23:35:37 -08:00
ColonelAkirNakesh
7f916d55e7 Add HMS Invincible. 2022-12-12 23:19:29 -08:00
Dan Albert
43ea019091 Add missing changelog note. 2022-12-12 19:32:29 -08:00
Dan Albert
6025cad716 Fix livery for VF-33 F-14A squadron.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2610.
2022-12-12 19:11:46 -08:00
Dan Albert
9365aea724 Fix encoding issues with the Peru faction.
Not really sure what's going on here, but presumably it's UTF-16 and
UTF-8 fighting.
2022-12-12 18:53:18 -08:00
Dan Albert
28859a8a9c Add changelog notes that were missed in PRs. 2022-12-12 18:52:28 -08:00
DillieKoe
304fd7ea80 Add Peru faction.
A new Peru faction with a mirage squadon
2022-12-12 18:39:21 -08:00
ColonelAkirNakesh
5e345263a7 Override liveries for Russian aircraft in bluefor faction. 2022-12-12 18:21:12 -08:00
dependabot[bot]
445ee25bbf Bump certifi from 2022.6.15 to 2022.12.7
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.6.15 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.06.15...2022.12.07)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 23:21:18 -08:00
Dan Albert
20937815f8 Fix CAS not having landing waypoints.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2611.
2022-12-03 16:30:51 -08:00
RndName
3863b8ef40 Fix manual debrief submit not ending mission 2022-11-30 13:20:31 +01:00
Dan Albert
d91ccaa70f Changelog section for 6.1. 2022-11-27 21:15:22 -08:00
ColonelAkirNakesh
7673ca5481 Add support for Leander class HMS Andromeda.
https://github.com/dcs-liberation/dcs_liberation/issues/2571
2022-11-27 14:22:41 -08:00
ColonelAkirNakesh
774a37a7d2 Add support for Leander class HMS Ariadne.
https://github.com/dcs-liberation/dcs_liberation/issues/2571
2022-11-27 14:11:19 -08:00
ColonelAkirNakesh
905094f63f Add support for Castle Class.
https://github.com/dcs-liberation/dcs_liberation/issues/2571
2022-11-27 14:10:52 -08:00
ColonelAkirNakesh
fd5b7ba49d Add support for Leander class HMS Achilles.
https://github.com/dcs-liberation/dcs_liberation/issues/2571
2022-11-27 14:00:36 -08:00
SnappyComebacks
1b828b95b3 Add F-15E to DEAD_CAPABLE in AI flight planner. 2022-11-26 09:47:08 -07:00
Dan Albert
54546aaefb Expand gitattributes to cover common files.
Specifically adding this so that yaml changes stop being uploaded as
CRLF, but the rest is likely useful too.
2022-11-25 15:36:04 -08:00
Dan Albert
ded5fc8b1d Update bug templates to 6.0.0.
We're not fixing 5.x bugs any more.
2022-11-25 15:26:20 -08:00
Dan Albert
68fc4f6950 Remove incompatible campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2558.
2022-11-25 15:17:30 -08:00
Starfire13
5d07238ab8 Updates Khopa's Normandy and Channel campaign to 10.0
Note that Operation Dynamo only requires a yaml file update. The .miz file is fine and is not included here.
2022-11-25 15:08:25 -08:00
Dan Albert
5e7e5e2636 Unfilter the custom waypoint targets.
There doesn't appear to be any reason for us to be poking at
implementation details here aside from changing the name from "unit" to
"building" for that case. Just iterate over the known strike targets.

Making this change uncovered some latent type errors.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2564.
2022-11-25 14:14:38 -08:00
Dan Albert
ca5c0055d1 Remove dead code. 2022-11-25 14:14:38 -08:00
Dan Albert
e208df16b2 Add radios for the MB-339A.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2511.
2022-11-25 14:07:56 -08:00
Dan Albert
11632b0ef1 Update RoleplayingPleb's campaigns.
https://github.com/dcs-liberation/dcs_liberation/issues/2558
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2561.
2022-11-25 13:05:20 -08:00
Dan Albert
b0bc46f539 Make the casualty report scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2567.
2022-11-25 13:00:04 -08:00
SnappyComebacks
627ed45065 Add banner for MB-339A. 2022-11-25 11:58:56 -07:00
RndName
fc9ad5b519 Remove dcs capture event from state json
With the latest change we added capture zones and corresponding trigger rules for all Airfields as well so we do not need to rely on the dcs capture event S_EVENT_BASE_CAPTURED anymore.
2022-11-24 11:14:50 +01:00
RndName
40ddad1d9a Add Airfield to list of capture zone types
This will create capture zones and the trigger rules to check for a base capture. Will fix an issue where the dcs capture event is not fired and therefore the capture not recognized by liberation
2022-11-24 11:14:50 +01:00
RndName
eb997db703 Fix carrier group generation 2022-11-23 12:57:43 +01:00
MetalStormGhost
e53dc5b80b Attempt at fixing Carrier killed in state.json but not being removed from game, issue #2405. GenericCarrierGenerator.generate() will now generate the ship group with an array that only contains alive ship units, just like GroundObjectGenerator.generate() has previously done.
Carrier groups will now also show up as destroyed/damaged on the map when the carrier is sunk.
2022-11-23 12:57:43 +01:00
RndName
ab64655f05 Validate primary and secondary nodes for iads network 2022-11-21 12:13:49 +01:00
RndName
e1b530e4fc Fix IADS network error caused by dead groups
Fixed an error which would occur when dead units which are non static would be added as secondary node during the skynet lua data generation. This should in general not be possible as connection nodes and power sources are currently most of the time static.
2022-11-21 12:13:49 +01:00
SnappyComebacks
4414853e45 Update pydcs.
Added ice halo generation.
2022-11-20 17:27:35 -07:00
Dan Albert
35adcd2c7f Move develop forward to 7.0. 2022-11-20 12:57:42 -08:00
Dan Albert
5ec487a832 Attribution compliance for OSM data.
https://github.com/dcs-liberation/dcs_liberation/issues/2434
2022-11-20 12:44:25 -08:00
Dan Albert
0cc56edc95 Fuzzle's campaign updates.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2425.
2022-11-20 12:09:58 -08:00
Dan Albert
3de8b7e022 Add Gran Polvorin campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2424.
2022-11-20 12:09:58 -08:00
Dan Albert
e5946e59a8 Add Up the Coast campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2223.
2022-11-20 12:09:58 -08:00
Dan Albert
0f48a48a4e MB-339A loadouts.
Courtesy of Starfire.

https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-20 11:44:57 -08:00
Dan Albert
1a255969a7 Fix drop zone display for air assault.
Troops must be dropped inside this zone or they won't attack the target.
The zone needs to be drawn in the map so players don't break the flight
plan by accidentally moving the drop waypoint outside the DZ.

I've move the API for doing this out of `PatrollingFlightPlan` in favor
of a mixin so this is no longer presented as `engagement_distance` by
the flight plan. I don't love that it's still the `commit-boundary`
endpoint, but it's fine for now.

I don't know why mypy wasn't able to catch this. pycharm is also
struggling to understand this class.
2022-11-20 11:39:56 -08:00
Dan Albert
bf4728fded MB-339A icon.
https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-19 21:14:26 -08:00
Dan Albert
d5e91c7168 Add MB-339A to CAS and runway attack roles.
https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-19 19:24:50 -08:00
Dan Albert
2ded922b5d Add MB-339A to factions that used it.
https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-19 19:24:50 -08:00
Dan Albert
193ab0ff63 Add MB-339A unit yaml.
Not adding the MB-339APAN because that's an aerobatic model, which isn't
particularly useful in Liberation, but is potentially confusing to
people that don't know that.

https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-19 19:24:50 -08:00
Dan Albert
9356449f45 Classify technicals as APCs so they get used more.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2482.
2022-11-19 18:49:06 -08:00
Dan Albert
670683b47f Fix typo. 2022-11-19 18:47:46 -08:00
Dan Albert
517212225e Note the start time feature in the changelog.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2400.
2022-11-19 18:42:12 -08:00
Dan Albert
6315beb7cd Changelog 6 cleanup.
Typo fixes, sort, recategorize.
2022-11-19 18:42:12 -08:00
Dan Albert
c1653b7ee1 Update pydcs.
Includes all the new airfields in the South Atlantic.
2022-11-19 16:24:43 -08:00
Dan Albert
8ed0efe241 Hide sim speed controls behind a flag.
Flag is only controlled from the command-line because redoing Qt layout
usually breaks things. Off by default in 6 since this feature is nowhere
near done enough to even be used experimentally (most changes to the ATO
made after the sim begins will break the game).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2535.
2022-11-19 15:55:03 -08:00
Dan Albert
7b50894ca6 Fix adding and removing waypoints in the UI.
This moves more of the logic out of the UI so mypy can actually spot
these mistakes more often.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2495.
2022-11-19 15:39:41 -08:00
Dan Albert
7dfd99a0b0 Add bug link for refuelzonegeometry. 2022-11-19 15:20:08 -08:00
Dan Albert
c78e6dc231 Remove refueling from sweep flights.
The timing for these doesn't work. Sweep RTBs at the same time the
package reaches its TOT. The tanker won't be on station until 1m30s
before the package reaches the refueling point.
2022-11-19 13:23:36 -08:00
Dan Albert
93f3e81cfc Fix layout for TARCAP, Escort, and strike-like.
If there's a refuel point, nav from that, not from the patrol end/split.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1749.
2022-11-19 13:23:36 -08:00
Dan Albert
38f4b27d10 Clarify AirAssault flight plan method name.
`engagement_distance` is used elsewhere to mean commit distance, so this
looked like a bug when I stumbled across it. Rename it to be more
explicit.
2022-11-19 12:44:46 -08:00
SnappyComebacks
541ac6f8dd Tune turbulence values. 2022-11-19 13:17:18 -07:00
SnappyComebacks
774eb48828 Spell turbulence correctly. 2022-11-19 13:17:18 -07:00
SnappyComebacks
1eccedb74d Calculate turbulance.
Turbulance is based off time of day, and day of year.
Each theatre may adjust their turbulance parameters.
2022-11-19 13:17:18 -07:00
SnappyComebacks
bc6f953f76 Limit wind speed to 97 knots.
Made minor adjustments to wind speed calculation.
2022-11-18 11:48:13 -07:00
SnappyComebacks
261f939896 Note increased wind speeds in the changelog. 2022-11-18 11:48:13 -07:00
SnappyComebacks
c5f0f1ef9f Modify the range of values used to choose a wind speed.
Wind speed at high elevation IRL can range from 20 to 160 knots around the globe.
You may see wind speed generated here up to 100+ knots, but generally around 40 or so.
IRL wind speed appears to depend on the latitude of the sun, not in this implementation.
2022-11-18 11:48:13 -07:00
dependabot[bot]
dc843a811e Bump pillow from 9.2.0 to 9.3.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.2.0...9.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 18:08:22 -08:00
dependabot[bot]
c8ada1ac46 Bump loader-utils from 1.4.1 to 1.4.2 in /client
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 17:48:50 -08:00
RndName
d82ac8f355 Fix IADS Network update for basic mode
the iads update_network method would recreate a basic iads network as advanced network by range. This small change now checks for advanced mode before calculating connetions.
2022-11-14 17:53:24 +01:00
RndName
7ab8683d72 Add docs and better logging to iads network 2022-11-14 16:58:44 +01:00
RndName
d0d56aceb6 Rewrite IADS tgo update method for correct updating
These Events are covered
- Mission Debriefing
- Capture Event
- GroundObject Buy Menu
2022-11-14 16:58:44 +01:00
RndName
c33ba2c5af Fix IADS by range calculation 2022-11-14 16:58:44 +01:00
RndName
72e67d7b71 Implement iads_network update 2022-11-14 16:58:44 +01:00
Dan Albert
8dabac916b Update pydcs. 2022-11-12 14:44:42 -08:00
MetalStormGhost
56da2dfd4c Fix Bronco loadout name.
Changed the "name" of the OV-10A Bronco loadout file from "A-4E-C" to "Bronco-OV-10A".
2022-11-12 13:45:18 -08:00
RndName
624ca3c308 Clarify cargo waypoints for AirLift and AirAssault 2022-11-11 14:46:08 +01:00
RndName
123db516ad Remove unneeded LandRefuel from Airlift 2022-11-11 14:46:08 +01:00
RndName
4531fc7f37 Remove AirAssault completly from AutoPlanner
see #2506 for mor details
2022-11-11 14:46:08 +01:00
RndName
ea6662c38b Add simulation halt at AirAssault ingress
implements #2452
2022-11-11 14:46:08 +01:00
RndName
9139f84c33 Add Ingress Point to AirAssault FlightPlan 2022-11-11 14:46:08 +01:00
RndName
9e625b0e5e Remove CTLD logic from Airlift flightplan for AI 2022-11-11 14:46:08 +01:00
Dan Albert
336df10da2 Remove unnecessary refuel waypoint in airlifts. 2022-11-11 14:46:08 +01:00
Dan Albert
79e241730b Document some airlift waypoint behavior. 2022-11-11 14:46:08 +01:00
Dan Albert
251d329a71 Add error handling for cargo drop waypoints. 2022-11-11 14:46:08 +01:00
Dan Albert
8b384f184c Add docs explaining what the assault area is. 2022-11-11 14:46:08 +01:00
Dan Albert
d81ba04ba5 Make air assault drop-off non-optional.
There is always a drop-off location for troops.
2022-11-11 14:46:08 +01:00
Dan Albert
8f9270e9fe Forbid planes from air assault.
This doesn't work.
2022-11-11 14:46:08 +01:00
RndName
b4b9bbf476 Cleanup and refine airlift and airassault waypoints
- Drop Off and Pickup now correctly worded
- Helo waypoints now represent LandingZones for pickup and dropoff
2022-11-11 14:46:08 +01:00
RndName
a47cb865fb Cleanup and reword refuel waypoints
- rename Stopover back to CargoStop
- precise some waypoint naming
2022-11-11 14:46:08 +01:00
Nosajthedevil
4f9719abc4 Add OV-10A Bronco Mod
Adding the OV-10A Bronco Mod to develop.
2022-11-10 23:04:03 -08:00
dependabot[bot]
9785cf9fe6 Bump minimatch and recursive-readdir in /client
Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together.

Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `recursive-readdir` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/jergason/recursive-readdir/releases)
- [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: recursive-readdir
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 23:01:50 -08:00
RndName
91100a75db Update Skynet plugin to 3.0.1 2022-11-10 22:49:42 -08:00
dependabot[bot]
fdac9e99e1 Bump loader-utils from 1.4.0 to 1.4.1 in /client
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 22:43:17 -08:00
Nosajthedevil
3204466295 Reworked JSOW fallbacks
JSOW fallbacks now work their way through large warhead IR Mavs
2022-11-04 21:04:32 -07:00
Nosajthedevil
aac68436d9 Weapons data corrections
Remove weapon Type "ARM" to fix error in 5.2.1 and add AIM-54C-MK60
2022-11-04 21:04:32 -07:00
Nosajthedevil
085bf65d45 Corrected new line errors 2022-11-04 21:04:32 -07:00
Nosajthedevil
3e1312b53a Update AIM-9B-2X.yaml 2022-11-04 21:04:32 -07:00
Nosajthedevil
60ab332235 Updated US and russian standoff weapon data
Adds a number of standoff weapons data files and fall backs, including for the B-52 and B-1. Generally used the logic long range guided weapons>big warhead mavs > smallwarheadmavs > walleye > fallback to LGB then dumb bombs. followed similarish logic with Russian weapons. Used selerate paths for laser mavs. Also corrected error with S-24B in rockets. There is probably a lot of room for improvement here.
2022-11-04 21:04:32 -07:00
Nosajthedevil
16c1fd83bc Updated US and russian rocket weapons data
Added russian fallback rockets. Changed the AGR-20s to fallback to the AGM-65E2/L.
2022-11-04 21:04:32 -07:00
Nosajthedevil
455854f91d Added US and russia Bomb Weapon Data
Added US and Russian guided and dumb bomb weapons fallback data. Dumb bombs expanded to include fallbacks for B-1 and B-52.
2022-11-04 21:04:32 -07:00
Nosajthedevil
62f7a9f112 Updated US Aim-9 Weapons Info
Add Aim-9B's as fallbacks for F-4s and A-4s. Rework path by capability and not year (i.e. Aim-9X>M>L>P5>P>B), leave note in P that the year can be pushed back to represent earlier models the P is based on that are missing from game.
2022-11-04 21:04:32 -07:00
MetalStormGhost
a1f2685629 Correct Polish faction Leopard 2 variants.
The old "Leopard 2" maps to the Leopard 2A6 variant whereas The Polish
Land Forces operate Leopard 2A4s and Leopard 2A5s.
2022-11-04 17:07:32 -07:00
Starfire13
3f2ec65c2c Starfire's campaign updates for 10.5. 2022-11-04 17:06:31 -07:00
Dan Albert
73b7be0606 Note hold point fix in the changelog.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2494.
2022-10-31 11:28:06 -07:00
Raffson
73ee2ba4c0 Fix for orbit's broken stop condition
(cherry picked from commit 7e7c920816d384001ac1dbf1bcbcf8ccaad4a093)
2022-10-31 11:28:06 -07:00
Dan Albert
3d4d9af3f4 Add broken loiter bug to major DCS bug list. 2022-10-30 15:07:55 -07:00
Dan Albert
41fb28ae80 Update campaigns known to use quad zones.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2377.
2022-10-29 03:30:45 -07:00
Dan Albert
5c18af4638 Support quad zones for scenery objectives.
This works by recreating the trigger zone in the generated mission to
exactly (aside from the ID, and a possibly escaped name) match the one
from the campaign definition.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2473.
2022-10-29 03:30:45 -07:00
Dan Albert
66a5878fc6 Refactor scenery group creation.
Breaking up some large methods and shifting error handling to places
where it can catch more mistakes.
2022-10-29 03:30:45 -07:00
Dan Albert
5b93149c7b Obsolete and remove SceneryGroup.position.
Rework the preset location finder so this property isn't required. We
still need _some_ location, but it's fine for that location to be
approximate so the centroid works; the new name is just much more clear
about what we can assume about it.
2022-10-29 03:30:45 -07:00
Dan Albert
83c084e476 Rename some scenery group variables for clarity.
These were perfectly obvious to me when I reviewed them, but not so much
months later when I need to make changes :)
2022-10-29 03:30:45 -07:00
Raffson
60b92a5577 Update mods after pydcs update
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2376.

(cherry picked from commit 9fbc2d2c58bdf1707e19815cfda4af2970b224f7)
2022-10-20 17:58:40 -07:00
Paul Dockar
202dbb6259 Fix barely visible text in the Intel box 2022-10-16 22:46:10 -07:00
Paul Dockar
75b19a5f06 update changelog 2022-10-16 22:46:10 -07:00
Paul Dockar
ab6eebab43 Adding conditions vanilla theme icons
Update uiconstants.py to include theme icon path for all weather conditions.
Moving DCS theme icons.
Created Vanilla theme icons
Fixes #1062
2022-10-16 22:46:10 -07:00
Dan Albert
b482dbb031 Stop using shapely's almost_equals.
The docs say it was deprecated in favor of equals_exact with an explicit
tolerance.
2022-10-15 17:26:27 -07:00
Dan Albert
59af080bfb Update pydcs.
Includes a new data export with a fix for the Apache property bug.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2470.
2022-10-15 15:46:22 -07:00
Dan Albert
db7cd17c10 Send the new turn event from turn initialization.
We'll have to get smarter about this some day (since turn initialization
won't always exist), but for now we can avoid stale UI data by doing
what we've always done and refreshing the world on turn init.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2397.
2022-10-15 14:47:55 -07:00
Dan Albert
2f0a7e4f12 Add a toolbar button for filing a bug. 2022-10-15 14:17:33 -07:00
Dan Albert
b63ecc59fb Add a dialog with bug report information. 2022-10-15 13:15:40 -07:00
Dan Albert
575cbf659c Add the git SHA to the build ID.
The build number is actually a pain to use. The git SHA is much more
useful.
2022-10-15 13:15:40 -07:00
Dan Albert
b50219ba0b Faction update for insurgents (hard).
https://github.com/dcs-liberation/dcs_liberation/issues/2482
2022-10-15 01:53:43 -07:00
Dan Albert
e4d76b3b13 Updated insurgent faction.
https://github.com/dcs-liberation/dcs_liberation/issues/2482
2022-10-13 22:27:54 -07:00
Dan Albert
99d9a2e4b9 Campaign update: The Valley of Rotary.
https://github.com/dcs-liberation/dcs_liberation/issues/2481
2022-10-13 22:27:54 -07:00
Dan Albert
04a6782b48 Campaign update: Tblisi Gap.
https://github.com/dcs-liberation/dcs_liberation/issues/2481
2022-10-13 22:27:54 -07:00
Dan Albert
cb3257e704 New campaign: The Falcon Went Over the Mountain.
https://github.com/dcs-liberation/dcs_liberation/issues/2481
2022-10-13 22:27:54 -07:00
Dan Albert
daf11c01c9 Add a comment explaining a wtf in alt estimation. 2022-10-09 23:07:39 -07:00
Dan Albert
207d56c2e9 Fix offshore targets for WW2 factions.
This makes the oil platform a required building so that all factions can
use it. Alternatively, we could pick a different offshore target for WW2
factions, or gracefully degrade to not generating these targets for WW2
factions. This approach seems to best match the designer's intent.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2322.
2022-10-09 19:06:29 -07:00
Dan Albert
3629fa1b36 Make Mozdok to Maykop editable without WW2 assets.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2391.
2022-10-09 18:47:15 -07:00
Dan Albert
21f8550fc7 Changelog updates. 2022-10-09 18:43:13 -07:00
Dan Albert
9bd0be20a6 Don't allow helicopters at non-FARP FOBs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2378.
2022-10-09 17:46:11 -07:00
Dan Albert
d6b1c1409d Add additional weapon data.
Partial submission of the data in
https://github.com/dcs-liberation/dcs_liberation/issues/2348. I haven't
changed anything that conflicted with
https://github.com/dcs-liberation/dcs_liberation/pull/1858.
2022-10-09 17:31:48 -07:00
Dan Albert
eee0039add Key the PrimaryMarker with destination presence.
This is how React recommend dealing with derived state that needs to be
reset:
https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html

The problem is that the new turn will give the component new props, but
new props will not cause the state to be reset. We can either do that
manually (which React recommends only for the cases where it is
absolutely necessary:
https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops),
or by forcing the component to be replaced by using a key.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2388.
2022-10-09 16:25:35 -07:00
Dan Albert
c9d49f6f40 Split up the ControlPoint.tsx monolith.
This is in need of some serious refactoring so that
https://github.com/dcs-liberation/dcs_liberation/issues/2388 can be
fixed.
2022-10-09 16:25:35 -07:00
Dan Albert
0f5e35a2eb Factor out control point location event behavior. 2022-10-09 16:25:35 -07:00
Dan Albert
979851aac9 Document primary/secondary CP marker behavior. 2022-10-09 16:25:35 -07:00
Dan Albert
3a2eb182f9 Fix the react app initialization.
ReactDOM.render is deprecated and using it forces react 17 behavior.
2022-10-09 16:25:35 -07:00
Dan Albert
2338c26392 Fix errors in log with 204 response endpoints.
FastAPI uses JsonResponse by default, which will convert the empty
response None to null. We need to forcibly use Response instead to
prevent that for No Content responses.

This didn't cause any observable issues but was polluting the log.
2022-10-07 14:42:03 -07:00
Dan Albert
c835cda5b6 Update NPM dependencies.
New versions of react and leaflet, along with a lot of other packages.
I'm hoping that the newest react-leaflet might let use solve the carrier
drag and drop issues in a less hacky way, since that's the cause of
https://github.com/dcs-liberation/dcs_liberation/issues/2388.
2022-10-07 13:33:53 -07:00
Dan Albert
6295f3fd71 Fix the react test.
It's still a useless test, but now it passes.
2022-10-07 13:33:53 -07:00
Dan Albert
84d0a40547 Ignore vscode tasks file in client. 2022-10-07 13:33:53 -07:00
Dan Albert
36ef1479a6 Update caniuse-lite.
Complains when tests are run.
2022-10-07 13:33:53 -07:00
Dan Albert
67dcc6e7f5 Double the front line thickness.
Make it easier to click on.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2437.
2022-09-28 11:03:50 -07:00
Dan Albert
edd162c3d2 Add missing type annotation.
Caught by newer versions of typescript.
2022-09-27 22:07:58 -07:00
Dan Albert
982656bd5a Update pydcs.
Includes the AIM-54C Mk 60.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2436.
2022-09-27 20:54:02 -07:00
Dan Albert
469d8b7b12 Ignore loadouts with invalid weapons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2320.
2022-09-27 20:23:32 -07:00
Dan Albert
f1562a7b94 Add a hint about how to transfer squadrons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1911.
2022-09-27 19:54:07 -07:00
Dan Albert
1e12f1cc80 Revert "Add support for the AI-only F-14A."
AI behavior with the Heatblur F-14 has been fixed, so not needed any
more.

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

This reverts commit 7387c2ed8f.
2022-09-27 19:43:02 -07:00
Dan Albert
123d8fcaa6 Add Falklands weather data.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2242.
2022-09-27 19:32:15 -07:00
Dan Albert
4b4738c58f Load map icons directly from DCS.
If the user's DCS directory is not configured correctly this will
degrade by not showing an icon. Otherwise (and typically) we get nicer
looking icons for each theater, and we don't have to make these for each
new map.
2022-09-27 19:26:05 -07:00
Dan Albert
037ff85396 Remove unused data.
We get TACAN, ILS, and ATC data from pydcs now. The rest of this
manually curated data is unused.
2022-09-27 18:34:23 -07:00
Dan Albert
e0160ac876 Get TACAN and ILS data from pydcs. 2022-09-27 18:34:23 -07:00
Dan Albert
08abe36443 Fix TACAN beacon type import.
The dataclass contructor will not automatically convert the int in the
JSON file to the enum type, so our enum equivalence check was not
actually working, and could result in us re-allocating a TACAN channel
that was used by the map.

Fixing this problem surfaces a latent bug, where we can't actually treat
duplicate map TACAN channels as a bug because some channels are used by
multiple airports in PG.
2022-09-27 18:24:49 -07:00
Dan Albert
2461a66ad8 Number beacon types explicitly.
auto() starts at 1 for IntEnum, so this has always been wrong.
2022-09-27 18:24:49 -07:00
Dan Albert
9ab3430cc4 Move beacons module.
This isn't related to the missiongenerator, and importing this file from
some places (such as runway data) will cause a circular reference when
importing the rest of the missiongenerator package.
2022-09-27 18:24:49 -07:00
Dan Albert
a9348154af Alter the beacon format to be keyed by ID.
ID based lookup will be used for finding ILS and TACAN beacons from the
pydcs data.
2022-09-27 18:24:49 -07:00
Dan Albert
5621b4cbd4 Fix broken error message in beacon importer. 2022-09-27 18:24:49 -07:00
Dan Albert
028576f208 Update pydcs.
This update includes expanded runway data that lets us clean up some
code. It also include beacon IDs for runways and airfields that will let
us get ILS and TACAN info from pydcs, but that's a bigger change that
I'll land separately.
2022-09-27 17:57:31 -07:00
MetalStormGhost
746bada0d4 Add fidelity for SIDC status of TGOs.
The new behavior is as follows for SAMs:

No damaged units: fully capable (green)
Damaged but still operational: present (no bar)
Not fully destroyed but inoperable: damaged (yellow)
Fully destroyed: destroyed (red)

And for all other TGOs:

Fully destroyed: destroyed (red)
Any missing units: damaged (yellow)
No missing units: present (no bar)

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2438.
2022-09-20 22:34:48 -07:00
Dan Albert
c89327586d Speed up computation of front line positions.
Needs to be properly measured, but this has made a multi-second speedup
in turn times.
2022-09-18 02:31:57 -07:00
Dan Albert
bbfe1657d6 Remove error handling for impossible case. 2022-09-18 02:31:57 -07:00
Dan Albert
c39a094d88 Remove unused behavior from frontline positioning. 2022-09-18 02:31:57 -07:00
Dan Albert
13f0dd8b01 Make FrontLineBounds actually a bounds container. 2022-09-18 02:31:57 -07:00
Dan Albert
ba7b3aa473 Clean up one frontline bounds user. 2022-09-18 02:31:57 -07:00
Dan Albert
08d4fe92d1 Remove junk from FrontLineConflictDescription. 2022-09-11 14:45:12 -07:00
Dan Albert
09786c6d29 Split air and ground conflict descriptions. 2022-09-11 14:37:28 -07:00
Dan Albert
1150750c09 Re-disable sending landmap data for Falklands.
Still too slow.
2022-09-11 14:24:01 -07:00
Dan Albert
b9b1f51957 Rename frontline vector to bounds, add a class.
This isn't actually the data that callers usually want. Most of the
callers just want the bounds. The heading and length are trivially
computed from that. Add a class to contain the result so it's easier to
refactor.
2022-09-11 14:23:31 -07:00
Dan Albert
e53a487948 Rename confusing front line methods/members. 2022-09-11 14:23:31 -07:00
Dan Albert
cd19f2ab21 Use simplified Falklands exclusion zones.
This is significantly faster on my machine. Checking it in (and
re-enabling the UI layer) to see how it affects slower machines.
2022-09-11 11:59:30 -07:00
Dan Albert
124e2d5e10 Avoid sending landmap data for Falklands.
This is too damn slow. A possible solution is explained in the comment,
but we shouldn't tackle that until we're sure the rest of the game runs
okay.
2022-09-10 16:31:47 -07:00
Dan Albert
bb2ceb9968 Log planning times per-task. 2022-09-10 16:31:47 -07:00
Dan Albert
ddd203a79f Add additional information to multi-event tracing.
Show the number of times the event was logged as well as an average run-
time.
2022-09-10 16:31:47 -07:00
Dan Albert
017a673211 Bump the campaign version for the Falklands.
Support isn't done yet, but the things that would affect campaign design
are done.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-09 15:41:20 -07:00
Dan Albert
b011870c03 Set the Falklands timezone.
https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-09 15:30:49 -07:00
Dan Albert
db4672f4af Fix mistake in join point placement.
This looks like it was just a typo. We want to join as late as possible
to allow flights coming from other airfields to take the best route to
the target that is safe, rather than joining as early as possible, which
isn't useful since pre-join and post-split are supposed to be safe areas
anyway.
2022-09-09 15:12:19 -07:00
Dan Albert
cc5c625a99 Fix rendering of join permissible zones.
The zones themselves are supposed to be unstroked because we only want
to stroke the boundaries of the zone that are preferred.
2022-09-09 15:12:19 -07:00
Dan Albert
8480dadba8 Add a Falklands landmap, imported from GIS.
https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-09 15:05:50 -07:00
Dan Albert
fd88a6a22f Add Falklands terrain shapefiles. 2022-09-09 15:05:50 -07:00
Dan Albert
7a230c90f0 Add a GIS shapefile to landmap importer. 2022-09-09 15:05:50 -07:00
Dan Albert
f15c2ada1b Fix DaytimeMap error with disabled night missions.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2429
2022-09-09 13:01:10 -07:00
Dan Albert
fa7dbc587a Use ATC radio info from pydcs. 2022-09-08 20:26:25 -07:00
Dan Albert
5e40042ace Update pydcs.
This update adds ATC information to the exported data.
2022-09-08 20:26:25 -07:00
Dan Albert
df85d2627d Add a data linter with Markdown output.
Wildly incomplete, but it's a start.
2022-09-08 15:47:56 -07:00
Dan Albert
229008577b Load airfield data when called for airport.
The for_theater method is always called before for_airport is during
normal gameplay, but I'm writing a linter to show missing airfield data
that calls for_airport first.
2022-09-08 15:47:56 -07:00
Dan Albert
a679c19af1 Be tolerant of theaters with no airfield data.
This shouldn't be the case for anything shipped, but is typical when new
theaters are still being developed.

We could potentially add an `in_progress` flag to the theater definition
to make this only optionally tolerant, but since that code path would
rarely be exercised it's just likely to bitrot. This data isn't critical
to mission generation anyway, so this is fine. What we should do is add
some linters that document all the data that is missing though (and
ideally publish that to our docs).
2022-09-08 13:21:26 -07:00
Dan Albert
8b1cd5965a Update beacon data. 2022-09-07 17:17:03 -07:00
Dan Albert
1881fecc83 Clean up ConflictTheater constructor.
Now that all theaters are defined in YAML, we can lose some of the mess
in this class.
2022-09-07 16:52:48 -07:00
Dan Albert
d133809bc0 Note theater moddability in the changelog. 2022-09-07 16:52:48 -07:00
Dan Albert
49001bb558 Migrate Falklands to YAML.
All theaters are now moddable.
2022-09-07 16:52:48 -07:00
Dan Albert
18f1048dc4 Migrate The Channel to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
0afc4d2af6 Migrate Normandy to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
0e62e50b1c Migrate Nevada to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
07960bd65a Migrate Marianas to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
647529f35f Migrate Syria to yaml. 2022-09-07 16:52:48 -07:00
Dan Albert
90e9e3ecd6 Port Persian Gulf to yaml. 2022-09-07 16:52:48 -07:00
Dan Albert
87f88f4c50 Make theater properties moddable.
Only the Caucasus has been migrated so far. Will follow up with the
others, and also will be adding beacon/airport data to this.
2022-09-07 16:06:20 -07:00
Dan Albert
49fd9c0c36 Add Grabthar's Hammer Falklands campaign. 2022-09-07 14:39:47 -07:00
Dan Albert
7e4f81d541 Add a Falklands theater.
Not at all done yet, but loads.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-07 14:39:47 -07:00
Dan Albert
eb3d2ef049 Ignore user vscode settings in the client. 2022-09-07 14:24:13 -07:00
Dan Albert
080782e011 Support polygons with holes in the API.
We don't have any of these yet because our landmaps suck, but we'll need
holes in the sea zones to mask islands correctly.
2022-09-07 14:22:26 -07:00
Dan Albert
10d0dd861c Update pydcs.
Newest Falklands updates.
2022-09-07 10:34:29 -07:00
Adam Clemons
693afb7949 Use the Missions directory for state fall back.
Useful for servers that do not allow access to other paths.
2022-09-04 16:42:54 -07:00
Nosajthedevil
d16f6692b8 Additional weapons fallback data.
Added weapons fallback data for the laser guided rockets, AIM-54's,
AGM-65 E/F, 4X Hellfire and TOW carried by US helis, rockets for them
to fall back to, all of the USSR IR missiles, R-3R, Mk-83 & Mk-84 and
adjusted the dates for the R-27ER &ET to 1990.
2022-09-03 21:26:40 +00:00
Dan Albert
a74add96b7 Make generate_landmap importable.
This file may not be needed long term, but for now I want to import
to_multipoly for some other work.
2022-09-03 14:13:53 -07:00
Dan Albert
643d1be6d7 Fix inclusion/exclusion zone reversal in UI. 2022-09-03 14:13:07 -07:00
Dan Albert
1717bc98cb Move logging_config to game.
This isn't unique to the UI, the UI is just the current caller.
2022-09-03 14:12:21 -07:00
Dan Albert
0c5e548892 Move FlightPlan ownership from Flight to IBuilder.
The next step in splitting up the layout and scheduling phases. This
facilitates splitting flights into two classes where one has a full
flight plan, but one used in the earlier phases of planning has only a
layout. Layout-only flights won't need TOTs, which will make them much
easier to work with once we've migrated TOTs from timedeltas to
datetimes.

Layout-only flights of course aren't actually usable, but it lets us
avoid dealing with the current sim time until we're certain the Flight
will even survive planning.

I'm not actually sure if we'll be able to split the two phases any more,
but this ends up being a nice cleanup anyway.
2022-09-03 02:39:38 -07:00
Dan Albert
f4ecfe6da9 Un-dataclass Package.
This hasn't been very dataclass-like for a long time.
2022-09-02 23:13:58 -07:00
Dan Albert
71f68b3103 Simplify flight startup time calls.
We can always estimate a startup time now. Remove the nullability from
the result, cleanup the callsites, and eliminate
TotEstimator.mission_start_time since it no longer does anything useful.
2022-09-02 23:09:05 -07:00
Dan Albert
d8486568b7 Remove unused property from Flight. 2022-09-02 21:13:23 -07:00
Dan Albert
24a6c5995b Fix crash when deleting waypoints.
self.coalition is used but was never set.
2022-09-02 21:13:23 -07:00
Dan Albert
452848fd2a Make TOT waypoints non-optional for flight plans.
Flights without a meaningful TOT make the code around startup time (and
other scheduling behaviors) unnecessarily complicated because they have
to handle unpredictable flight plans. We can simplify this by requiring
that all flight plans have a waypoint associated with their TOT. For
custom flight plans, we can just fall back to the takeoff waypoint. For
RTB flight plans (which are only synthetic flight plans injected for
aborted flights), we can use the abort point.

This also means that all flight plans now have, at the very least, a
departure waypoint. Deleting this waypoint is invalid even for custom
flights, so that's no a problem.
2022-09-02 21:13:23 -07:00
Dan Albert
4f1e3da70a Remove splash screen delay.
This has been in for a long time, so people will have seen the message
by now (and it's on our GitHub page).
2022-09-02 19:56:29 -07:00
Dan Albert
c630226e2d Add campaign property for campaign start time.
This field is optional. Omitting the field (or using only a date instead
of a full timestamp) will use the old behavior of picking a random
daylight hour to start the campaign.

This doesn't include any UI in the new game wizard yet. This is only a
campaign yaml option.

https://github.com/dcs-liberation/dcs_liberation/issues/2400
2022-09-01 01:13:01 -07:00
Dan Albert
82939a446b Turn the daytime map in theater into a real type.
No (intended) user visible effects, but this is the groundwork that will
support https://github.com/dcs-liberation/dcs_liberation/issues/2400.
2022-09-01 01:13:01 -07:00
Dan Albert
f49833646d Don't advance the clock between turn 0 and turn 1.
Turn 0 isn't a real thing, it's just a game play affordance that allows
players to set up their initial conditions.
2022-09-01 00:52:51 -07:00
root0fall
422e335328 Sort vehicles in new game wizard.
Fixes #2402.
2022-08-31 09:47:17 -07:00
Dan Albert
c803a49134 Remove unused Package field. 2022-08-21 22:19:37 -07:00
Dan Albert
236812cc81 Remove superfluous constructors. 2022-08-21 22:19:37 -07:00
Dan Albert
a101527906 Move FlightPlan creation into Flight.
For now this is just a callsite cleanup. Later, this will make it easier
to separate unscheduled and scheduled flights into different classes
without complicating the layout/scheduling.
2022-08-21 19:37:20 -07:00
Dan Albert
7a45391c22 Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.
2022-08-21 19:37:20 -07:00
Dan Albert
4521053804 Move FlightPlan instantiation into the builder.
I'm working on moving the builder to be owned by the Flight, which will
simplify callers that need to create (or recreate) flight plans for a
flight.
2022-08-21 19:37:20 -07:00
Dan Albert
3dd0e4a66f Clean up silly some exception handling. 2022-08-21 19:37:20 -07:00
Dan Albert
9cd511da3d Clean some cruft out of FlightPlanBuilder. 2022-08-21 19:37:20 -07:00
Dan Albert
6bbe583e82 Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.
2022-08-21 19:37:20 -07:00
MetalStormGhost
6519f48149 Correct the name of Ural-375 ZU-23s.
Previously, only the insurgent variant was used because the names were
identical. Also added descriptions to all ZU-23 variants and specified that the
insurgent variants are used with both Insurgent factions.
2022-08-21 19:36:05 -07:00
Dan Albert
d02afdf22e Update pydcs.
Includes the suppression and logging for encoding errors in livery
files.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2368.
2022-08-14 19:15:35 -07:00
Dan Albert
be38969c40 Update contributors list. 2022-08-14 18:36:45 -07:00
Raffson
7c2690ca54 Disable player options for non-flyable aircraft
3 items handled:

- Enable/Disable player checkbox if (not) flyable
- Disable player list in air wing config dialog for non-flyable aircraft
- Update changelog

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

(cherry picked from commit 18057af9ad9212e750b2338add1bc01bf50b868e)
2022-08-14 18:21:03 -07:00
Raffson
36bd628378 Refactor 'grey-out' CSS
The CSS used to grey out the checkbox and label for
advanced IADS should be refactored so it can be reused for
disabling player checkboxes in the flight edit/create dialogs.

The solution is applied to all checkboxes/labels, so that
there's a consistent way of showing users when a
checkbox/label is disabled.

(cherry picked from commit d9c6be0a9d232f73269da720bf7c0f4dfa1b9329)
2022-08-14 18:11:12 -07:00
Raffson
38ff691eac Fix squadron reuse.
This was never marking the original squadron as claimed. Just update the
object rather than cloning it.

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

(cherry picked from commit 6e555167e068a727ed0e104be81615965437de45)
2022-08-14 18:07:56 -07:00
Dan Albert
582fcf8b19 Update pydcs.
Includes terrain export for the Falklands.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-08-10 20:21:35 -07:00
Dan Albert
60f772081c Update pydcs. 2022-08-10 19:17:06 -07:00
root0fall
267da47f6e Fix grammatical typo in main.py 2022-08-07 09:34:09 -07:00
Dan Albert
151cf17e35 Move tests into main workflows.
The workflow UI works best if there's only a single main workflow in a
PR. We can keep things organized similarly by turning the test workflow
into a reusable workflow. Same code (mostly), better UI.
2022-07-27 20:50:49 -07:00
Dan Albert
6437700a61 Fix warning in black job. 2022-07-27 20:50:49 -07:00
Dan Albert
07ac8957c8 Split Python linting into separate jobs.
This is just the first step to prove the concept. Most of the work done
in our workflows can be split into separate jobs to parallelize the
workflow. This will also make the checks page more readable.

This change alone probably won't speed up CI much.
2022-07-27 20:50:49 -07:00
SnappyComebacks
2bd39bd9f5 Changed garrison terminology to battle position. (#2352) 2022-07-26 22:41:45 -06:00
RndName
2ecb3506b5 Update skynet to V3.0.0 release 2022-07-26 18:47:41 +02:00
Tom Wabinski
35fc43cda0 Refactor unclear conditional. 2022-07-25 23:51:26 -07:00
Tom Wabinski
71311eb157 Fix inverted pilot leveling flag. 2022-07-25 22:54:20 -07:00
Raffson
02c52f0801 Support for Mirage F1.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2335.

Co-authored-by: Starfire13 <72491792+Starfire13@users.noreply.github.com>
Co-authored-by: Jake Lewis <jake@logdyn.com>
Co-authored-by: Dan Albert <dan@gingerhq.net>
2022-07-25 16:11:36 +00:00
Raffson
ee7a0ade9e Update pydcs
Last version of pydcs was missing flyable aircraft, specifically the following:
- Mi-24P
- I-16
- Christen Eagle II
- Mirage-F1CE

It also removed the flyable option for the F/A-18C, i.e. the AI variant.
Note that the flyable F-18's ID is "FA-18C_hornet".
2022-07-24 09:57:46 -07:00
Raffson
1bee29de83 Fix incomplete reset (#2330)
* Fixing 'Reset' in squadron boxes

* Always use confirmation pop-up when closing with [X]
2022-07-23 12:10:26 +02:00
C. Perreau
d1c1977a9c pydcs updated for 2.7.16 (#2337)
Co-authored-by: Raffson <raffson@users.noreply.github.com>
2022-07-23 10:09:14 +02:00
dependabot[bot]
16b03ec90e Bump terser from 5.11.0 to 5.14.2 in /client (#2333)
Bumps [terser](https://github.com/terser/terser) from 5.11.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 23:33:51 +02:00
C. Perreau
7162bf4d24 #2203 : Added RNLAF Redskins 301 Squadron by KillgOreNL (#2332) 2022-07-20 16:25:47 +00:00
C. Perreau
3fb31c9d78 #2324 : Fixed buildings.miz not being usable without WW2 asset pack (#2331)
#2324 : Fixed buildings.miz not being usable without WW2 asset pack installed
2022-07-20 16:02:10 +00:00
Raffson
52c0be63ea Fix 'Accept' button in AirWingConfigurationDialog (#2318)
* Fix 'Accept' button in AirWingConfigurationDialog

- Fixes 'Accept' not saving changes
- Adds 'Reset' button (non-confirming)
- Adds confirmation pop-up when pressing [X]
2022-07-18 16:14:17 -06:00
Raffson
a54c217f88 Guard against null squadron in flight creator.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2323
2022-07-17 18:21:35 -07:00
Dan Albert
622e5d65aa Ack campaign version 10 for my campaigns.
No changes are required, as anyone oriented toward zero will be
automatically rotated to face the center of the conflict (the legacy)
behavior, and all my units do already.
2022-07-11 13:31:27 -07:00
Dan Albert
21199d9a24 Fix the command-line campaign generator for IADS. 2022-07-11 13:25:16 -07:00
MetalStormGhost
51b9d80488 Update contributors list. 2022-07-11 02:16:42 -07:00
Dan Albert
ccfd82e1c9 Get shapely from pypi again.
There's a wheel for this now.
2022-07-11 02:13:33 -07:00
SnappyComebacks
cbb81bbba7 Update most python dependencies (#2308)
* Change routes to return HTTP.OK instead of HTTP.NO_CONTENT.
2022-07-10 16:54:58 -06:00
SnappyComebacks
e60cde892a Added accept button to Air Wing Configuration window. (#2307)
* Add accept button to Air Wing Configuration window.
* Update black to 22.6.0.  Change pre-commit to use updated black.
* Update click to 8.1.3.
2022-07-10 07:25:48 -06:00
Raffson
7355162d80 Fix combat updates in the front-end.
`setCombat` was never called, so old combats were never cleared on turn
end, game load, or unload.

https://github.com/dcs-liberation/dcs_liberation/issues/2253
2022-07-06 13:36:15 -07:00
Raffson
9823f7b96f Push full navmesh/threatzone info in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2253
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 13:27:06 -07:00
Raffson
a20b95bb26 Push full TGO information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 12:41:58 -07:00
MetalStormGhost
0fc2e8872d Added Leopard 2A6M as a variant in Leopard-2.yaml (#2298)
DCS names this unit "MBT Leopard-2A6M". The other Leopard 2 variants have
more specific names, but the generic 2 is the 2A6M.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2295
2022-07-06 12:28:00 -07:00
Raffson
746eda70ee In-Flight spawn: Minimum AGL altitude (#2302)
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2212
2022-07-06 18:56:39 +00:00
Raffson
ec425501cd Replace exceptions with 'if' statement 2022-07-06 11:32:22 -07:00
Raffson
64e68706ad Grey out advanced IADS if it's not supported 2022-07-06 11:30:49 -07:00
Raffson
2f97d948b8 Hotfix IADS (#2296)
fix for #2292
2022-07-04 16:02:22 +02:00
Raffson
cc4237d076 Fix incorrect start types for off-map squadrons. 2022-06-30 04:21:18 +00:00
Raffson
13546d77e7 Return self from end_combat.
No behavioral change, just consistency with the other APIs.
2022-06-29 21:05:53 -07:00
Raffson
27dff95df5 Handle IADS updates properly.
This adds the missing events in the backend, and handles them properly in the front end.
2022-06-29 18:58:49 -07:00
Raffson
5f071a6138 Add missing mission types for IADS targets. 2022-06-29 18:54:34 -07:00
Raffson
def611ef89 Focus on the exception window (#2282) 2022-06-28 20:31:07 -07:00
Raffson
8c2c353071 Clean up IADS exception handling. 2022-06-28 20:30:17 -07:00
Raffson
d45bba19c8 Initialize restore_start_type 2022-06-28 20:28:27 -07:00
Dan Albert
9ab1dbab78 Dedup pyinstaller actions. 2022-06-26 16:37:08 -07:00
Dan Albert
83af032bee Enable dependency caching in workflows. 2022-06-26 14:34:07 -07:00
Dan Albert
2a5e12dfc5 Refactor some repeated actions out of workflows. 2022-06-26 14:11:15 -07:00
Dan Albert
e751b53241 Mark advanced IADS WIP.
The advanced IADS currently only works during the initial game
generation. Any changes to the TGO (purchases/sales, captures, etc) will
disconnect the node from the network and return it to basic IADS
functionality.
2022-06-26 12:31:42 -07:00
Raffson
61488627a4 Push full control point information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:17:08 -07:00
Raffson
da90a40bc4 Push full front line information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:13:10 -07:00
Raffson
d578e763c0 Push full flight information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:09:51 -07:00
Raffson
289545e777 Push full unculled zone information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 21:09:07 +00:00
Dan Albert
3eafd0cb62 Add a few more notes to the pull request template. 2022-06-25 13:47:21 -07:00
Raffson
75cc8bfd50 Skip UI update for canceled packages.
This is theoretically impossible, but for some reason the dialog that
owns this object QEditFlightDialog does not dispose properly on close,
so this handler may be called for a flight whose package has been
canceled, which is an invalid state for calling anything in
TotEstimator.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2250
2022-06-25 13:31:40 -07:00
Raffson
76bc0fde33 Fix filter definitions for TGO layers.
https://github.com/dcs-liberation/dcs_liberation/issues/2253
2022-06-22 01:57:36 -07:00
Raffson
7f05f6bc7d Don't send updates for CP TGOs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2139
2022-06-16 18:08:13 -07:00
dependabot[bot]
8f0d071afb Bump electron from 17.1.0 to 17.2.0 in /client
Bumps [electron](https://github.com/electron/electron) from 17.1.0 to 17.2.0.
- [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/v17.1.0...v17.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 16:28:14 -07:00
Raffson
30bdcfac29 Fix eslint warning in CI 2022-06-16 09:38:29 -07:00
Raffson
8a1c0c041c Add missing unculled zone update event. 2022-06-16 01:50:40 +00:00
Raffson
ad7032064d Add culling exclusion zones display to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2158
2022-06-14 18:57:04 -07:00
Raffson
c5ff8777be Fix Exception: 'DeadFlightPlan' object has no attribute 'targets'
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2247
2022-06-12 13:34:43 -07:00
Raffson
70e5c578ae Add the ruler to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2158
2022-06-12 13:15:26 -07:00
Raffson
6557864697 Import QApplication 2022-06-11 20:17:39 -07:00
Raffson
04cb53a9c8 Replace 'Arrival combo box' with a label.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2243
2022-06-10 15:04:26 -07:00
Raffson
5f1ae30f19 Close all windows on exit 2022-06-10 14:53:11 -07:00
RndName
aa77cfe4b9 Add AirAssault and Airlift mission types with CTLD support
- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
2022-06-09 22:45:29 +02:00
RndName
de148dbb61 Add CTLD script and update JTACAutoLase config
- Added the CTLD script
- Removed the previous jtacautolase script
- Updated the configuration to allow the JTACAutoLase function to work
- Added the JTac name, freq and mod to the lua
2022-06-09 22:45:29 +02:00
Dan Albert
0a7ded4052 Update pydcs.
Includes the latest data export and the missing torpedo weapon data.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1901
2022-05-29 17:08:26 -07:00
Dan Albert
c401ac7560 Give the CAS F-16 some gas.
This loadout is significantly heavier than the previous loadout, but the
previous loadout had very limited range because it lacked bags.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2130
2022-05-29 15:34:11 -07:00
Dan Albert
22c3d4ebc5 Add a CLI tool for viewing default loadouts. 2022-05-29 15:23:21 -07:00
Dan Albert
c5efc908de Ensure a unique ID for supply routes.
List indexes are not a reliable list key unless the list is static.
Indexes will be reused when games are loaded, which prevents the state
from updating reliably.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2167
2022-05-29 14:07:40 -07:00
dependabot[bot]
046c863768 Bump async from 2.6.3 to 2.6.4 in /client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-28 20:35:11 -07:00
dependabot[bot]
3335cafa94 Bump ejs from 3.1.6 to 3.1.7 in /client
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-28 20:25:16 -07:00
Dan Albert
ee3fb6df09 Fix generation of convoys along non-front routes.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2083
2022-05-27 17:02:45 -07:00
RndName
d59653eed9 Add 2nd STR to patriot layout
closes #1531
2022-05-14 16:13:55 +02:00
RndName
50b82f6383 Improve Layout loading and ForceGroup generation
- fix layout not preserving the correct group index
- fix ForceGroup generation merging preset_groups with generics
2022-05-14 16:13:09 +02:00
RndName
72682e4db3 Remove special heading to conflict calculation for radars
The special handling is not required anymore as we now rotate the whole TGO to head towards the conflict if the campaign designer has not defined any specific heading
2022-05-13 21:47:16 +02:00
RndName
10e7ce6363 Update and generalize Anti Air Layouts 2022-05-13 21:47:09 +02:00
RndName
e874f47920 Set default value for reversed_heading property
Prevent breaking the save compat.
2022-05-12 16:36:07 +02:00
RndName
92992fc068 Fix missing return in steam_into_wind 2022-05-12 16:26:48 +02:00
RndName
48075ace90 Fx typo in tt_ZU-23 unit yaml 2022-05-12 16:21:13 +02:00
RndName
88a8caa023 Add reversed_heading property to ground units
This allows to define if a unit should be placed backwards in the generated mission. This is required for example for the SA-11/SA-17 or Silkworm Launchers.
2022-05-12 16:21:12 +02:00
RndName
f20d0effe9 Update Anti Air and Naval Layouts
- Break down the remaining Anti Air Layouts. Now each layout.miz only contains 1 layout
- Added a python script which can fix the orientation of a layout
- Fix layout orientation. Now all aa layouts are oriented to the north.
- Add small change so that whole carrier group will be rotated correctly with the BRC

closes #2215
2022-05-12 16:21:12 +02:00
RndName
7acc418489 Update the High Digit SAMs implementation
- Add more HighDigitSAMs units
- Add hds SA-2, SA-3 and HQ-2 to capable factions
- Update radar db with hds as these entries were missing
2022-05-12 16:20:44 +02:00
RndName
47b6c2608c Fix destroyed buildings generate income 2022-05-07 18:24:29 +02:00
RndName
00dc8df0de Fix income not correctly calculated
- Fix the Income class to correctly count the income with the recent ground object refactoring
- Adjust the Factory income from 10 to 2.5 as we now have 4 units instead of 1 as with v5.2

closes #2207
2022-05-07 18:08:26 +02:00
RndName
244425381d Fix incorrect forcegroup loading
Forcegroups were not loaded correctly from preset groups during faction initialization. When a user created a new game and directly after that created another game with different factions the Forcegroups for the preset groups were still reused and therefore units which were not accessible by the faction were accidently available to the new faction.
closes #2186
2022-05-06 19:31:40 +02:00
RndName
a10e55cfd7 Calculate orientation of specific TGOs automatically
This will allow to automatically calculate the orientation of TGOs which are required to head to the conflict if the campaign designer has not defined a specific heading in the campaign miz. This is for example required for silkworm, scuds or some SAM systems like the SA-11.
Added the should_head_to_conflict property to the TGO
2022-05-06 17:34:16 +02:00
RndName
2d39fb496c Update heading and iads state of TGO after capture 2022-05-06 16:17:01 +02:00
RndName
9e3edd7208 Set correct unit name for carriers 2022-05-06 16:17:01 +02:00
RndName
015103f613 Fix incorrect handling of disabled groups in buy menu
Disabled groups would still be bought free of charge. this is now fixed
2022-05-06 16:17:01 +02:00
RndName
321bd4e874 Fix Skynet scripting errors
added a better exception handling

closes #2205
2022-05-06 16:16:35 +02:00
RndName
799e01c7b3 Support for DCS 2.7.12.23362 (#2196)
- Add link4 and acls
- Allocate Link4 frequency
-  new unit yamls
2022-05-02 19:08:44 +02:00
RndName
e4f91fd3ba Fix AAA not placed as frontline unit
- Spawn AAA like SHORAD
- change SA-19 unit class from AAA to SHORAD

fixes #2194
2022-05-02 18:58:57 +02:00
RndName
41d1ae099f Consider priority order in Aircraft selector 2022-04-25 19:24:48 +02:00
RndName
2836a89f91 Update DEAD task priority list
Set SEAD capable planes with higher priority instead of adding them at the end
2022-04-25 19:24:48 +02:00
RndName
f04030858b Allow custom mission types
Instead of giving an error when a mission type which was added to the squadron is not defined in the Ai autoplanner db for the aircraft the user should be able to task the aircraft accordingly.
2022-04-25 19:24:48 +02:00
RndName
5be92cd75e Cleanup threat and detection range calculation
- Moved logic from TGO to TheaterGroup and Unit, cleanup
- Fixed an issue with wrong radar threat zone calculation
- Correctly handle dead and alive units in threat calculation (dead units are no more threats...)
- Fixed wrong air_defenses threat zone used for planning (now uses aa-capable tgos instead of all tgos for the CP)
- Remove the might_have_aa property from TGOs and actually check if there is any aa-capable unit present (this is needed as with the recent tgo refactor all type of TGOs can also have anti air units if they have some defined in the layout)
2022-04-21 21:20:02 +02:00
MetalStormGhost
36d9dda500 Update UH-60L mod support to version 1.3.1
Updated the UH-60L loadout for version 1.3.1 and added the UH-60 to the following factions as per #2176
    Israel-USN 2005 (Allied Sword)
    Israel 2000
    Israel 2012'ish
2022-04-21 21:16:10 +02:00
RndName
3008d9a512 Fix QFlightWaypointTab preventing save game
closes #2180
2022-04-21 13:25:01 +02:00
RndName
c437fa329c Improve SEAD ingress tasking and target waypoint
* Fix suicide SEAD flights (diving to the SAM)

additional fix for #2152. This sets the Target Waypoint ALT to the Ingress ALT for non player flights. Player flights will have the target waypoint set to 0 AGL so that they can slave weapons or TGP to it.

* Add GroupAttack to SEAD so that they suppress more
2022-04-20 00:19:03 +02:00
RndName
004bcce58e Allow skynet properties override and improve dead unit handling
Now the user can override special skynet properties from the unit.yaml of the main Radar of the sam site. Which unit needs these overrides can be looked up over here: https://github.com/walder/Skynet-IADS/blob/develop/skynet-iads-source/skynet-iads-supported-types.lua

- fixed wrong exclusion of groups with the first unit dead but still able to participate
- added some exception handling in the lua script for groups which skynet is not able to control. preventing scripting errors
2022-04-19 10:41:16 +02:00
RndName
4664a7bbd4 Update Mist and Skynet scripts (V3.0.0)
- adopt skynet config to v3
2022-04-19 10:41:16 +02:00
RndName
fd7bd28381 Fix incorrect faction loading 2022-04-19 10:41:16 +02:00
RndName
5b090c20ec Update Golan Heights to support advanced skynet
- Updated to 10.1 (headings + advanced iads)
- Demonstrates how the advanced system will work
2022-04-19 10:41:16 +02:00
RndName
5569f49456 Bump campaign version to 10.2 2022-04-19 10:41:16 +02:00
RndName
5cdfe62e2d Implement advanced skynet functions
- factor out own class for the iadsnetwork within the conflicttheater
- This class will handle all Skynet related things - no specific group_name handling necessary in future
- make iadsbuilding own TGO class because SAM & EWRs are Vehicle Groups. IADS Elements dont have any groups attached.
- added command center, connection node and power source as Ground objects which can be added by the campaign designer
- adjust lua generator to support new iads units
- parse the campaign yaml to get the iads network information
- use the range as fallback if no yaml information was found
- complete rewrite of the skynet lua script
- allow destruction of iads network to be persistent over all rounds
- modified the presetlocation handling: the wrapper PresetLocation for PointWithHeading now stores the original name from the campaign miz to have the ability to process campaign yaml configurations based on the ground unit
- Implementation of the UI representation for the IADS Network
- Give user the option to enable or disable advanced iads
- Extended the layout system: Implement Sub task handling to support PD
2022-04-19 10:41:16 +02:00
RndName
138e48dc2d Refactor luagenerator
- cleaned up the generation
- created special class to handle the serialization
- improved string escaping: Replace OS Path separator with normal slash and allow the usage of a single quote in unit names by changing the delimiter to double quote instead (1797)
- adjusted unit_name generation to prevent scripting errors with unescaped characters
2022-04-19 10:41:16 +02:00
RndName
8f16f242b1 Update Changelog 2022-04-19 10:32:53 +02:00
RndName
679dfc3441 Improve Ingress Waypoint Attack tasking
* Improve Ingress WP attack tasking and update pydcs

- Updated the Attack Tasking of SEAD, DEAD, Strike and BAI to match the pydcs changes
- Changed DEAD, BAI and SEAD AttackGroup task to expend=auto. This solves an issue where the AI uses all Ammo on one single target as we defined the expend param to All instead of Auto which is used by default.

* Set Expend=All for SEAD Ingress

This ensures that the AI will only do one Attack Pass and also really suppress the Target what they are expected to do.
2022-04-19 10:21:15 +02:00
RndName
4115ca6040 Add option to set Auto-Assignable mission types in AirWing Config Dialog 2022-04-19 10:19:52 +02:00
RndName
88ea647c3a Fix empty bases in squadron configuration
- Filter the list of available aircraft by bases and only add aircrafts which can be operated
- Only enable the accept button when a base is selected

fixes #2127
2022-04-19 10:19:52 +02:00
RndName
69a5b4f227 Add modulation to RadioFrequency
- This adds the information about the modulation of the RadioFrequency.
- Updated all Radios with the capabale modulation
- Show Modulation on Kneeboard
- Defaulting to AM Modulation as this is also the default used by pydcs.
- Force AM Modulation for JTAC tasking

We currently do not force the modulation in the code anywhere other than JTAC. Pydcs defaults to AM (modulation=0). So this change is more a preparation for upcoming features which allow to use more frequencies like VHF FM or similar.
2022-04-19 10:19:44 +02:00
RndName
aae314ae1d Fix debriefing wait thread not closing correctly
- now stops the thread when manually submitting results
- added check for mission_end state on debrief update to prevent creating another waiting thread when the mission is already over
- also fixed an issue when manually submitting but canceling the file open dialog.

closes #2165
2022-04-14 13:48:23 +02:00
MetalStormGhost
4b89220a7b Added separate base images for carriers
Forrestal, Supercarrier (CVN-75), Kuznetsov, Kuznetsov (2017/Supercarrier) and Type 071 Yuzhao.

Resolves #1292
2022-04-14 11:17:09 +02:00
RndName
759b934184 Update campaigns by Fuzzle with recommended economy settings
solves #2157
2022-04-13 00:25:33 +02:00
RndName
25d0dcd08e Allow campaign designer to set default economy values
default starting money and income multiplier can be set in campaign.yaml

bumps campaign Version to 10.1
2022-04-10 10:24:25 +02:00
RndName
1d20e6277e Fix silkworm launcher falsely added to scud groups
Added AntiShipMissile unit class and updated the hy_launcher unit as well as the silkworm layout to differentiate clearly between missile (scud, v1) and antiship (silkworm)

fixes #2159
2022-04-08 21:30:44 +02:00
walterroach
9c9dc1c976 Add Starfire's loadouts for AH-64D_BLK_II
cherry-pick from 4d2289ece9 as it was only commited to 5.2
2022-04-02 13:55:17 +02:00
RndName
c6d1f31108 Mention the SEAD fix in the changelog 2022-04-02 10:16:11 +02:00
RndName
8362797381 Add ARM weapon data
Added all ARM weapons i was able to identify. May have missed some
2022-04-02 10:16:11 +02:00
RndName
1bb7e1bf47 Change SEAD task to Search and Engage for ARM weapon
SEAD flights will have the Search and Engage Group Task instead of the current AttackGroup task when the flight has ARM weapons in the Loadout. This resolves an issue with AI not able to attack a SAM when skynet is used. This is due to the RADAR not emitting and the AI therefore just diving into the SAM.
Non-ARM Loadouts will still use the AttackGroup task. This ensures that for example the ADM-141 TALD used by the F-14s will work correctly
2022-04-02 10:16:11 +02:00
RndName
23ba3215d4 Add SEAD Escort to tasks_by_priority 2022-04-02 10:16:11 +02:00
RndName
ad8fef2fda Fix detection range calculation if TGO is empty
implement fix like in #1980
solves #2128
2022-04-01 11:54:47 +02:00
RndName
2274cef68c Fix missile layout orientation
- changed the heading to 0
2022-03-30 20:01:58 +02:00
RndName
bc76efaea6 Move the tgo value calculation from UI to the tgo 2022-03-30 12:48:58 +02:00
RndName
de76276a4d Fix incorrect value calculation of ground objects
A user would be able to sell a complete damaged TGO for the price of a new one as the value calculation function was not taking care if the unit was dead or alive. This fix now only takes alive units into account for the actual value of the tgo
2022-03-30 12:05:46 +02:00
Starfire13
4738a722a6 Campaign Update to Version 10.0 2022-03-29 18:21:19 +02:00
RndName
6de50d1515 Fix JTAC names
- Add additional naming method to naming.py
- JTACs now use the ALPHA_MILITARY. So first JTAC is called JTAC Alpha, 2nd JTAC is called JTAC Bravo and so on

fixes #2120
2022-03-28 20:32:19 +02:00
Dan Albert
088073b257 Update bug templates now that 5.2.0 is out. 2022-03-27 12:47:38 -07:00
RndName
c9df8cc803 Fix GroundObject Menu
- fixed incorrect Buy button enable / disable
- update the game after repair
2022-03-27 20:37:42 +02:00
RndName
5f010bb94d Update Changelog with the 5.2.0 release 2022-03-27 01:40:26 +01:00
RndName
f7f565477c Set unrestricted_satnav for NATO factions 2022-03-26 17:06:11 +01:00
RndName
6a6df8936e Capaign update: Task Force Thunder
Submission by sith1144 #2121
2022-03-26 13:12:41 +01:00
RndName
d30701c1bb Campaign update for Tripoint Hostility 2022-03-26 12:01:09 +01:00
dependabot[bot]
5492a45b67 Bump minimist from 1.2.5 to 1.2.6 in /client
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 22:12:26 -07:00
dependabot[bot]
d2d62c350c Bump node-forge from 1.2.1 to 1.3.0 in /client
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 21:53:32 -07:00
RndName
9050e705ff Campaign updates by Fuzzle 2022-03-25 21:39:40 +01:00
RndName
7b0676025b Campaign submission: Tripoint Hostility
Submission by sgtfuzzle17
2022-03-25 21:31:30 +01:00
Benjamin Fischer
8eb97136b0 Make Apache LHA capable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2113.
2022-03-24 17:15:34 -07:00
Benjamin Fischer
e9c5cac20c Fix can_operate for airfields without runways.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2110.
2022-03-24 17:15:06 -07:00
RndName
1e19afe0e5 Use Heading from Campaign miz for Buildings
Like with most other GroundObjects now the Buildings also will use the Heading defined in the campaign miz and will place and rotate the generated TGO accordingly there.
2022-03-23 18:02:34 +01:00
RndName
bbb08aa1db Add orientation info and allow user to rotate TGO
- Give user information about the heading of a TGO
- Add a button to change the heading to head to conflic
- Change the orientation of a TGO during Buy
- Run the heading to conflict calculation to change the orientation of the newly bought group. It will then head to the center of the conflict
2022-03-23 17:26:47 +01:00
RndName
274f689f70 Fix Heading to conflict calculation 2022-03-23 17:26:47 +01:00
RndName
892bd9f069 Fix ForceGroup merging and PresetGroup handling 2022-03-23 17:26:47 +01:00
RndName
d0fe058a24 Change ZU-23 from SHORAD to AAA 2022-03-23 17:26:47 +01:00
RndName
14218f4d09 Fix SA-3 TR not beeing added 2022-03-23 17:26:47 +01:00
RndName
c7270e8654 Fix error during faction loading
ForceGroup loading failed due to wrong unit parsing and prevented factions without naval units to load before the first faction with naval units got loaded (this affected the Allies 1940 and 44 factions)
2022-03-23 17:26:47 +01:00
RndName
d67d32610d Fix fallback_classes for EWR layout 2022-03-23 17:26:47 +01:00
RndName
e93639e1ab Fix GroundObjectBuy Menu after buy or sell
- Close the Buy Menu after complete buy
- Update the Ground Object Dialog with the changes
- Update the Game & map correctly
2022-03-23 17:26:47 +01:00
RndName
f0a3fd1e3a Merge forcegroups with the same task 2022-03-23 17:26:47 +01:00
RndName
9a2fa50b0f Bump Campaign version to 10.0
The new introduced layout system extends the mission generation so that a campaign designer can now define the heading of the ground objects which will be also used later in mission generation to orient the group accordingly. This removes the randomization of the orientation from the generation.

Most campaigns will not need any updates and will work out of the box.
2022-03-23 17:26:47 +01:00
RndName
4ace13c857 Improve the optional unit handling in layouts
added the fill property to the layout groups which allows to specify if a optional layout group should be filled with a faction accessible unit if it was not defined by the preset groups. This is usefull to allow more generalized templates which for example may or may not have a Search Radar without adding one to all layouts (example: Rapier and Roland Sites which use the generic SHORAD layout)

this fixes an issue which prevented optional units like logistics to be added to the forcegroup if they were not defined in the preset group yaml
2022-03-23 17:26:47 +01:00
RndName
923549ef69 Generalize and update more AA layouts
- Generalize Hawk, Rapier, Roland, SA-2, SA-3, SA-11, HQ-7, NASAMS
- One layout miz with 6 Launchers
- Two general layout yamls for 6 and 4 Launchers using the same miz
- Split up the SHORAD layout (one with TELAR units and one with Track Units)
2022-03-23 17:26:47 +01:00
RndName
437fdd6d12 Support for the AH-64D radios
- Support for the AH-64D radios
- Mention missing Radio preset support for AH-64D
2022-03-23 17:16:24 +01:00
RndName
4014a4e250 Update bug template for 5.2.0 2022-03-22 10:14:23 +01:00
Starfire13
46e220cecc Peace Spring, Vectron's Claw, Vegas Nerve updates. 2022-03-21 11:25:36 -07:00
RndName
78e901cbf7 Fix vscode dev launch config
removed the --new-map arg
2022-03-21 15:57:44 +01:00
Dan Albert
123a44fefc Scenic Route II update.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2099.
2022-03-20 16:19:26 -07:00
Dan Albert
b683246647 Add Apache squadrons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2097.
2022-03-20 16:18:41 -07:00
Dan Albert
f72b2a21f7 Remove the old map.
The new map has no open bugs.
2022-03-20 16:13:07 -07:00
Dan Albert
3af3bd606c Migrate off deprecated shapely APIs. 2022-03-20 16:00:29 -07:00
Dan Albert
6c1e1e1e95 Remove save compat.
There was a necessary break in the previous commit. Clean up any
existing save compat to go with it.
2022-03-20 16:00:29 -07:00
Dan Albert
039ac9ec74 Replace CP integer ID with a UUID.
This allows unique identification across saves. The front-end needs to
be able to differentiate the first carrier in game A and the first
carrier in game B, but because carriers (and other non-airfield CPs) are
assigned IDs sequentially, collisions were to be expected. The front-end
can't tell the difference between a reloaded game and a new turn, so we
need to ensure different IDs across games.

This is a handy cleanup anyway, since callers constructing CPs no longer
need to manually track the CP ID counter.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2078.
2022-03-20 16:00:29 -07:00
Dan Albert
941a7d441c Fix order of package deletion actions.
We need to register the deleted flights before we clear the package, or
we'll just delete an empty package.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2062.
2022-03-20 14:05:04 -07:00
Dan Albert
ad37dcce44 Fix broken iteration when clearing ATO.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2046.
2022-03-20 13:40:57 -07:00
Dan Albert
2c041081c9 Start sim if needed.
This used to be accidentally performed by the pause function. That's no
longer done, so start if needed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2098.
2022-03-20 00:02:51 -07:00
Dan Albert
8dddffb8b5 Revert "Use shapely from PyPI now that there's a wheel."
Works locally, not in GitHub action.

This reverts commit 47d54fd295.
2022-03-19 16:21:44 -07:00
Dan Albert
78c3da99f7 Don't initialize the simulation on game update.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1844.
2022-03-19 13:51:26 -07:00
Dan Albert
47d54fd295 Use shapely from PyPI now that there's a wheel. 2022-03-19 13:15:06 -07:00
Dan Albert
bc39d5eaa8 Update pydcs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2096.
2022-03-19 12:40:57 -07:00
DillieKoe
29cfff70ee Fix unit role of Type 04A (ZBD-04A).
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2072.
2022-03-18 00:20:24 -07:00
Dan Albert
8c0be1099c Add Sith1144's new campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1833.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1834.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1835.
2022-03-18 00:19:30 -07:00
Benjamin Fischer
e6a3bf9885 Round waypoint altitudes in tooltips.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2089.
2022-03-18 00:10:06 -07:00
Benjamin Fischer
31bc5eb2aa Fix SAM repair.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2091.
2022-03-18 00:07:41 -07:00
Benjamin Fischer
be67d6dbc6 Fix custom waypoint addition/removal.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2063.
2022-03-18 00:06:41 -07:00
RndName
01f872c960 Add support for the flyable Apache. 2022-03-18 00:00:02 -07:00
Dan Albert
995ccadc5b Update pydcs. 2022-03-17 23:53:22 -07:00
RndName
c5918d5531 Add VSCode launch config for node server
Used for node debugging within VSCode
2022-03-17 13:18:13 +01:00
Benjamin Fischer
4a666705c4 Log information about the generated campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1735
2022-03-16 18:03:21 -07:00
Benjamin Fischer
f7ced1aea6 Make the flight dialog modal to prevent inventory loss.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1971.
2022-03-16 17:29:27 -07:00
RndName
46694e458d Fix for incorrect unit_count in layout
- Raise LayoutException if the unit_count in the layout is greater than the available units
- Fix Flak Layout to solve #2043
2022-03-16 22:10:19 +01:00
RndName
c238e50e41 Fix silkworm layout
Changed the orientation of the layout and flip the launchers by 180 to fix #2084
2022-03-16 21:54:34 +01:00
RndName
5aa358c27b Add VSCode launch config for dev server
Added args and env according to the readme file. Developer still needs to run npm run start from the client dir
2022-03-16 21:50:56 +01:00
Benjamin Fischer
1207b082dc another high dpi fix which fixes some resizing issues. 2022-03-12 18:40:07 -08:00
Benjamin Fischer
da4bd8120b Round balance and income in the finance window.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1983
2022-03-12 13:55:44 -08:00
Benjamin Fischer
2c10d3f5b2 fixes #1987 by adding highdpi qt attributes. 2022-03-12 11:44:32 -08:00
Benjamin Fischer
827c68bf75 Fixes #1774 by adding a logmessage for non ascii install path. 2022-03-11 18:48:43 -08:00
Dan Albert
769fe12159 Split flight plan layout into a separate class.
During package planning we don't care about the details of the flight
plan, just the layout (to check if the layout is threatened and we need
escorts). Splitting these will allow us to reduce the amount of work
that must be done in each loop of the planning phase, potentially
caching attempted flight plans between loops.
2022-03-11 16:00:48 -08:00
Dan Albert
fa8c0d9660 Clean up flight plan code.
Split the oversized file into one per plan type. This also moves the
layout responsibility out of the oversized FlightPlanBuilder and into
each flight plan type file.
2022-03-09 02:15:07 -08:00
Dan Albert
c5fd3df235 Fix caching behavior of flight plan data.
This is far from complete but it at least covers anything related to
flight plans.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2060
2022-03-08 18:49:41 -08:00
Dan Albert
4993353184 RTB canceled in-progress flights.
The UI won't stop you from aborting a flight that is already home, but
that should also result in it re-completing again on the next tick.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2022-03-08 01:04:19 -08:00
Dan Albert
7fe73ad2eb Fix description of dead flights.
Completed is technically correct but not very helpful.
2022-03-07 23:39:43 -08:00
Dan Albert
f63a107c11 Account for time elapsed when leaving combat. 2022-03-07 23:23:52 -08:00
Dan Albert
e36c62b30e Identify aircraft types based on their mission.
It would probably be more accurate to have the icon based on the
aircraft type and use the modifier to indicate the mission, but this
will do for now (I also might have that backwards, I can't find the
guidance because it's in STANAG 1241 which isn't free).

I also increased the icon size a bit in the UI because the longest icon
text ("SEAD") was hard to read.
2022-03-07 21:45:33 -08:00
Dan Albert
73a8ec02b2 Speed up game tick by caching TGO threat regions.
Still more could be done here by caching the merged poly at the theater
level, but this goes a long way.

Aircraft commit regions are already cached (in the FlightState), so
those are already fairly fast. The combined A2A commit boundary could
also potentially be cached at the theater level.
2022-03-07 21:19:04 -08:00
Dan Albert
453f6ac74a Include positions of dead aircraft for the UI. 2022-03-07 19:43:06 -08:00
Dan Albert
895a4eb0dc Make flight death chance not impossible.
The odds of random.random() returning exactly 1.0 are basically nil, and
that was the only way a non-solo flight could lose this.
2022-03-07 19:35:19 -08:00
Dan Albert
005090fbcd Support display of dead flights. 2022-03-07 19:34:51 -08:00
Dan Albert
053a1287c9 Fix missing key in combat display. 2022-03-07 19:33:11 -08:00
Dan Albert
f5955dafaf Roll over time in excess of the current waypoint. 2022-03-07 18:35:16 -08:00
Dan Albert
e95a9e0685 Stop ticking elapsed waypoints.
If the parent tick caused the flight to move to the next waypoint, we
shouldn't send events for the elapsed waypoint.
2022-03-07 18:19:09 -08:00
Dan Albert
a6a44ef433 Fix marking of non-marked waypoints. 2022-03-07 18:10:04 -08:00
Dan Albert
cf7c7d853f Add back the "selected only" flight plans layer.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2058
2022-03-07 18:06:30 -08:00
Dan Albert
ca640ebabe Move the default port to 16880.
1688 is used by MS KMS.
2022-03-07 17:56:10 -08:00
Dan Albert
baae65919f Enable configuration of the server bind address.
A serverconfig.env (or just environment variables) can be set to
override the default bind address/port for the backend. This is passed
to the front end as a query parameter.
2022-03-07 17:53:55 -08:00
Dan Albert
a70ab8cc1d Add waypoint debug layers to the new map.
This is now feature complete with the exception of the ruler, none of
which seem to work with react. Someone that understands JS packaging
better than I do (which is a very low bar) will need to have a look.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-07 17:28:43 -08:00
Dan Albert
f7f0cf942c Update pydcs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2042
2022-03-07 16:54:22 -08:00
Dan Albert
54b9392d4b Add missing front line click handlers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2056
2022-03-07 03:29:56 -08:00
Dan Albert
cf3ef5b403 Support terrain zones on the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-07 00:26:13 -08:00
Dan Albert
8c63274f57 Move the server off the default uvicorn port. 2022-03-07 00:05:45 -08:00
Dan Albert
d7e62d0b0b Remove another hand written API model.
There are still two more of these that don't show up in openapi.json
because they don't show up in HTTP routes (only in the websocket):

* GameUpdateEvents
* FrozenCombat

I'm not sure if there's a way to forcibly include those in the
openapi.json, if I should add a no-op API to force it to happen, or if I
should just ignore it. For now I'm going with option 3.
2022-03-06 23:44:15 -08:00
Dan Albert
4b4336391a Remove hand written API objects. 2022-03-06 23:42:23 -08:00
Dan Albert
6ee235545f Clean up leaflet polygon API surface. 2022-03-06 23:25:25 -08:00
Dan Albert
15176223fa Add navmesh support to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 23:07:24 -08:00
Dan Albert
b08b91ca2e Fix flight plan updates when waypoints are moved.
The store serializes everything; we can't store references.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2055
2022-03-06 22:18:36 -08:00
Dan Albert
0afe1f69d4 Don't dispatch flight position updates when empty. 2022-03-06 22:03:38 -08:00
Dan Albert
6f21067ddb Fix lint error, add lint script. 2022-03-06 21:59:44 -08:00
Dan Albert
ccce801dc4 Add missing TGO click handlers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2056
2022-03-06 21:57:40 -08:00
Dan Albert
dc4762a03b Add threat zone support to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 19:32:30 -08:00
Dan Albert
30aebf2546 Replace api.ts with auto-generated API.
All the slices will come later.
2022-03-06 18:23:52 -08:00
Dan Albert
2310ef0f80 Auto-generate API hooks for the backend. 2022-03-06 18:18:53 -08:00
Dan Albert
de284c2bf6 Add tooling/docs for auto-generating API hooks. 2022-03-06 18:18:35 -08:00
Dan Albert
b7439cbd17 Add metadata to FastAPI endpoints for OpenAPI.
operation_ids give us better function names when generating the
typescript API from the openapi.json. BaseModel.Config.title does the
same for type names. Response models (or 204 status codes) need to be
explicit or the API will be declared as returning any.
2022-03-06 17:12:00 -08:00
Dan Albert
4053356e13 Default to the React map the default.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 02:02:25 -08:00
Dan Albert
904602510d Remove API key auth; CORS is sufficient.
The React UI running in a browser can't connect to the backend without
punching a hole for CORS, which isn't done by default. We don't need the
API key to protect from browsers, and anything else running on the
user's machine that can access the backend (that's hosted on only
localhost) already has enough control to do damage without using
Liberation as an attack vector.

https://github.com/dcs-liberation/dcs_liberation
2022-03-06 01:57:12 -08:00
Dan Albert
8165d3bd8c Add support for running the build react map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 01:53:22 -08:00
Dan Albert
3c9acea31c Fix CORS configuration.
We need to configure this always, but limit the allowed origins for non-
dev modes.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 01:52:06 -08:00
Dan Albert
17f2f007d2 Copy open source licenses into the distribution.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 01:34:53 -08:00
Dan Albert
7e213dbfbe Add license checking to npm ci.
These are all the licenses we currently depend on.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 01:33:33 -08:00
Dan Albert
fcb897a0e8 Uninstall @types/axios.
Axios ships types by default now so we don't need this.
2022-03-06 01:02:09 -08:00
Dan Albert
5230591dc2 Add npm ci to GitHub actions.
Formatting currently being forced to preserve line endings because for
whatever reason that's only causing problems in CI.
2022-03-06 00:59:58 -08:00
Dan Albert
605d8f057f Fix save loading.
https://stackoverflow.com/a/44888113/632035

Pickle can't deal with loading sets (and probably dicts) of objects with
custom __hash__ functions that depend on their state because __hash__
can be called before __setstate__. Make the hash function stupider (but
still correct) by just relying on the object ID.
2022-03-06 00:14:20 -08:00
Dan Albert
738cf1f381 Reset game state on new turn.
This may not be the way to do this long term, but it is how the old map
works so it's at least not a regression. It might be better to generate
events for the between-turn changes in state instead.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-06 00:02:25 -08:00
Dan Albert
73fcfcec7b Handle map reset when the game is loaded/unloaded.
https://github.com/dcs-liberation/dcs_liberation/issues/2039

Partial fix for
https://github.com/dcs-liberation/dcs_liberation/issues/2045 (now works
in the new map, old one not fixed yet).
2022-03-05 18:02:46 -08:00
Dan Albert
995e28cb32 Support mobile CPs in the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-05 15:41:58 -08:00
Dan Albert
2c6e8c414c Add --dev flag to put the game in developer mode.
Right now the only thing this does is remove sleeps meant to give people
time to read things that developers have already seen hundreds of times.
2022-03-05 11:24:37 -08:00
Dan Albert
b4edd5d841 Draw commit boundaries in the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-05 02:23:14 -08:00
Dan Albert
35df036eb8 Fix flight position update performance.
dispatch is expensive when called in a loop because each call
re-renders. Doing more work per dispatch causes fewer renders.

https://redux.js.org/style-guide/style-guide#avoid-dispatching-many-actions-sequentially
2022-03-05 00:42:22 -08:00
Dan Albert
05fbdae54c Remove redux-logger middleware.
https://github.com/reduxjs/redux-devtools does the same thing better
without spamming the log.
2022-03-05 00:39:26 -08:00
Dan Albert
b6457ae434 Un-split the flight data by coalition.
This made one callsite cleaner at the expense of the others and the
state management.
2022-03-04 19:54:41 -08:00
Dan Albert
59f734dd07 Draw frozen combat in the new UI.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-04 19:41:33 -08:00
Dan Albert
88cd9e19c5 Draw aircraft locations in the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-04 18:34:01 -08:00
Dan Albert
980d8f3092 Fix mistake introduced in previous commit.
Debugging code incorrectly reverted.
2022-03-04 02:23:42 -08:00
Dan Albert
811f46c289 Draggable waypoints with timing info.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-04 02:21:22 -08:00
Dan Albert
6933470ce0 Respond to ATO changes in the new UI. 2022-03-04 00:46:44 -08:00
Dan Albert
cba39df5da Handle to front line events in the new UI. 2022-03-04 00:37:31 -08:00
Dan Albert
34111cfc67 Update all TGOs on capture.
We need to update all TGOs, not just the cleared ones, because the
captured buildings need to update their icon to show the new color.
2022-03-04 00:29:31 -08:00
Dan Albert
fef123c2d4 Add redux-logger.
This automatically logs state changes (in a readable form) to the js
console. We'll probably want to turn this off in production to cut down
on log noise.
2022-03-04 00:24:31 -08:00
Dan Albert
a710ce5e1b Run prettier across the react source. 2022-03-03 23:34:18 -08:00
Dan Albert
13ca5352c7 Add import sorting to prettier. 2022-03-03 23:32:57 -08:00
Dan Albert
92236a5bc3 Update the react map for some new events. 2022-03-03 23:31:07 -08:00
Dan Albert
4539e91fa9 Add missing keys to list components. 2022-03-03 21:51:47 -08:00
Dan Albert
c5c596dc2f Move TGOs out of MapModel. 2022-03-03 17:11:01 -08:00
C. Perreau
d0ad554e14 Merge pull request #2040 from dcs-liberation/ukraine
🇺🇦 Support for Ukraine
2022-03-03 23:48:11 +01:00
C. Perreau
3037b540d4 Update README.md 2022-03-03 23:35:43 +01:00
Khopa
0b1365a04b Properly credit CC artwork author. 2022-03-03 23:34:22 +01:00
Dan Albert
ccb510fe47 Move front lines out of MapModel. 2022-03-03 02:17:13 -08:00
Dan Albert
89b987fc87 Stop fetching timing info for unselected flights.
The flight will be redrawn when it's selected. Don't bother fetching
this info for flights that aren't selected.
2022-03-03 01:24:32 -08:00
Dan Albert
8d806def5b Use FastAPI interface for the front lines.
Can't submit yet because there's no way to uniquely identify front-
lines, so no way to update these as they change.
2022-03-03 00:43:13 -08:00
Dan Albert
e5f4974e9a Stop ad-hoc constructing FrontLines.
The UI needs to be able to identify these to the server and vice versa,
so they'll need IDs that don't change. Rather than constructing an ID
based on the control points names, make them an owned part of the
control point. The constructed ID would be fine, but a UUID will make
them more suitable for the database, and this was always fairly gross
anyway.

Some follow up work if anyone is interested: a bunch of the data that's
computed in the various properties can now probably be computed *once*
and persisted to the FrontLine type.
2022-03-03 00:38:52 -08:00
Dan Albert
4dfc42528d Eliminate unnecessary waypoint API call in map.
I added the with_waypoints option for the react map. Use it in the old
one.
2022-03-03 00:10:45 -08:00
Dan Albert
79b471b41c Remove CSS that was messing with text alignment.
This was added by create-react-app. We're not using it any more.
2022-03-02 23:57:05 -08:00
Dan Albert
f9f18dd38b Fix drawing of non-path waypoints. 2022-03-02 23:53:16 -08:00
Dan Albert
d53fc46ffc All multiple event steam connections.
We don't support multi-client yet, but this is useful when debugging the
react UI in a browser instead of in the Liberation UI.
2022-03-02 23:51:12 -08:00
Dan Albert
781f8fb0e8 Fix a few display discrepancies in the new map. 2022-03-02 23:44:46 -08:00
Dan Albert
b39a44ae37 Draw front lines on the react map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-02 23:33:15 -08:00
Dan Albert
9a2c10a98f Draw supply routes on the react map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-02 23:14:05 -08:00
Dan Albert
0bdb4ac894 Draw air defense threat/detection ranges.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-02 21:51:16 -08:00
Khopa
510dcd762f 🇺🇦 Support for Ukraine 2022-03-02 17:52:47 +01:00
Dan Albert
64b01c471b Partial implementation of TGO display.
No threat/detection circles yet.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-02 01:01:33 -08:00
Dan Albert
1cd77a4a77 Fix display of control points.
Apparently redux state objects *must* be objects.
2022-03-01 23:39:49 -08:00
Dan Albert
dba2699b7e Add missing controls for flight plan layers. 2022-03-01 23:31:46 -08:00
Dan Albert
78b080063e Add layer control.
This isn't the grouped layer control that we have in the non-react map.
The react variant of that hasn't been updated in years and won't work
with our base maps (and may not work at all). We'll need to fix that or
write our own if we want to use that. This will do for now though.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-01 23:25:02 -08:00
Dan Albert
98c36c8b03 Remove default zoom control, add map scale.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-01 23:09:55 -08:00
Dan Albert
aac333e132 Draw waypoint markers for the selected flight.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-01 23:06:03 -08:00
Dan Albert
030675812e Cite the websocket tutorial I used for reference.
This was tricky to work out and most of the tutorials were bad. This one
was good, so keep a link around in case we need the reference again.
2022-03-01 21:25:32 -08:00
Dan Albert
8e8bbe84f3 Add websocket handling for selected flights. 2022-03-01 21:08:08 -08:00
Dan Albert
6d29bfdf65 Fix game state on refresh.
There was accidentally a second layer of callback here. I'm not sure why
it worked. I think the lambda being returned was being used as the
cleanup function?
2022-03-01 20:46:32 -08:00
Dan Albert
625f36c780 More cleanup. 2022-03-01 01:14:21 -08:00
Dan Albert
6ff9208d46 Reorganize React project structure.
Whatever I was doing was getting out of control :)
2022-03-01 01:14:21 -08:00
Dan Albert
406a64ae3f Draw flight plan paths in the react UI.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-01 01:14:21 -08:00
Dan Albert
bd8aa0296b Add map debugging launch configuration for vscode. 2022-02-28 22:37:06 -08:00
Dan Albert
21ba1bea36 Remove debug logging from react map. 2022-02-28 22:32:19 -08:00
Dan Albert
e51662526b Add an electron app for the React front-end. 2022-02-28 22:24:46 -08:00
Dan Albert
c628695a4e Persist window geometry on close.
Re-opens the window in the configuration it was in (size, maximized,
correct display, etc) when it was closed.
2022-02-28 18:08:40 -08:00
Dan Albert
155f9d4052 Make react-scripts devdependency to shut up audit.
The vulnerabilities are false positives and React doesn't think those
are worth fixing to make `npm audit` be quiet. We can at least make them
go away for `npm audit --production`, which is the official advice:
https://github.com/facebook/create-react-app/issues/11174.
2022-02-28 00:44:13 -08:00
Dan Albert
abadfef5a7 Remove unused workflow.
I'd added this early on with the intent of implementing is but forgot to
come back to it. We should do that at some point.
2022-02-28 00:35:22 -08:00
Dan Albert
59e98b31df Add a basic React implementation of the map.
See client/README.md for instructions.
2022-02-28 00:31:56 -08:00
Dan Albert
4e348dd99a Add a server setting for disabling the API key.
Useful for development if you want to disable API key authentication for
debugging the server without having to pull the generated key out of the
log every time.
2022-02-28 00:31:56 -08:00
Dan Albert
0056747aee Add an endpoint for listing all control points. 2022-02-28 00:20:01 -08:00
Dan Albert
e3adcada52 Migrate air icons to milsymbol.
All NATO icons are now generated by the milsymbol library based on their
SIDC.
2022-02-27 22:25:45 -08:00
Dan Albert
02383763ec Update TGOs to use milsymbol for icons. 2022-02-27 22:13:06 -08:00
Dan Albert
e7398af877 Update ControlPoint UI to use milsymbol library.
This gets us out of the business of maintaining our own icons. The
milsymbol library generates the SVG data needed to display anything
covered by APP-6.
2022-02-27 19:10:22 -08:00
Dan Albert
e1cdbed2e1 Update pre-commit to a newer version of Black.
Adds compatibility with match.
2022-02-27 19:05:32 -08:00
Dan Albert
41158543cf Add basic implementation for APP-6 SIDCs.
These will be used in conjunction with
https://github.com/spatialillusions/milsymbol to simplify the
specification of unit type to the front-end.
2022-02-27 18:38:59 -08:00
walterroach
05f3f3636b Add possible options to aircraft yamls
for convenience
2022-02-26 22:52:33 -06:00
RndName
0e324115be Update changelog 2022-02-27 01:19:33 +01:00
Dan Albert
a3a5c59327 Stream turn initialization events from the UI. 2022-02-26 13:41:11 -08:00
RndName
762bc328e1 Fix SA-8 LD used incorrectly as SA-13 and cleanup
- The SA-8 LD unit hat the SA-13 unit name as variant. The Layout tried to create a SA-13 SHORAD Site but actually used an SA-8 LD unit instead with zero threat range. This resulted in a yellow marked GroundObject on the map
- Cleaned up the treat and radar range functions a bit
2022-02-26 22:32:25 +01:00
Dan Albert
2585dcc130 Add (very!) rough simulation of frozen combat.
There are some TODOs here but th behavior is flagged off by default. The
biggest TODO here is that the time spent frozen is not simulated, so
flights that are engaged by SAMs will unfreeze, move slightly, then re-
freeze.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2022-02-26 13:01:46 -08:00
RndName
bc41261009 Fix missing parameter for initialize_turn
The recent changes missed to add the required parameter also for the ui callers.
2022-02-26 21:56:49 +01:00
RndName
a53812c0fb Fix helipad creation
Only create a Farp StaticGroup when there are actual helipads. This prevents accidental creation of a helipad at the position of a carrier.
2022-02-26 21:56:42 +01:00
Dan Albert
af4a718fc7 Fix server shut down on exit.
If there's a websocket being waited on the shut down won't actually
happen. Add a new event for shut down and send it to break the websocket
out of its loop.
2022-02-25 17:12:00 -08:00
Dan Albert
2efe4f6c80 Add missing super() call. 2022-02-25 16:52:28 -08:00
Dan Albert
332959128a Move back to upstream pydcs. 2022-02-25 16:49:26 -08:00
Dan Albert
d6e82d44fc Fix FastAPI doc pages.
We can't directly use frozen dataclasses from pydcs in our interface
because pydantic can't process them. Pydantic is able to automatically
convert to our modelview type from the pydcs type though.
2022-02-25 16:47:41 -08:00
Dan Albert
45e76e12b6 Move FlightJs out of MapModel. 2022-02-25 01:31:07 -08:00
RndName
ad0d3412fb Cleanup helipad creation and heli spawn 2022-02-24 23:21:17 +01:00
RndName
6f8c30ec81 Fix helicopter spawning inside each other
Also use NoParkingSlotError for better error handling if no helipads are available
2022-02-24 21:47:37 +01:00
RndName
c88fa6d2af Fix error in mission caused by wrong farp creation 2022-02-24 21:46:05 +01:00
Dan Albert
e4aedc9e83 Stop connecting to dead signal.
This was causing all further signals (which was just the flight
selection) to not register.
2022-02-22 20:42:15 -08:00
Dan Albert
b1356551c6 Move threat zones out of MapModel. 2022-02-22 19:59:29 -08:00
Dan Albert
1c543666b5 Move unculled zones out of MapModel. 2022-02-22 19:37:43 -08:00
Dan Albert
95836a217c Remove dead code. 2022-02-22 19:17:55 -08:00
Dan Albert
2ae820fb20 Move MapZones out of MapModel. 2022-02-22 19:16:55 -08:00
Dan Albert
0e6a303c17 Move NavMesh out of MapModel. 2022-02-22 18:49:12 -08:00
Dan Albert
1a9930b93a Remove our old lat/lon support code.
pydcs provides this now.
2022-02-22 17:40:35 -08:00
Walter Ray Haynie
bb72acd3ac Fix #1988 broken stored heading in Payload editor (#2020)
* Fix #1988

* Allow overwriting default aircraft properties

* Add logging to setting invalid props
2022-02-22 19:06:20 -06:00
Dan Albert
9e2e4ffa74 Update pydcs, adapt to new Point APIs.
This is briefly moving us over to my fork of pydcs while we wait for
https://github.com/pydcs/dcs/pull/206 to be merged. The adaptation is
invasive enough that I don't want it lingering for long.
2022-02-23 01:02:48 +00:00
RndName
ff12b37431 Load TgoLayoutGroups in correct order
Add handling to insert the layout group at the correct index according to the order used in the layout yaml
2022-02-23 00:07:37 +01:00
Dan Albert
ac80c4adc1 Finish moving gen into game. 2022-02-22 00:10:31 -08:00
Dan Albert
3e08e0e8b6 Un-pydantic FlightWaypoint.
Apparently it's a bad idea to try to make the core data pydantic models,
and those should really be treated more as a view-model. Doing otherwise
causes odd patterns (like the UI info I had leaked into the core type),
and makes it harder to interop with third-party types.
2022-02-21 23:10:28 -08:00
Dan Albert
c5ab0431a9 Re-enable uvicorn error logging.
This doesn't get enabled on the root logger by default.
2022-02-21 23:09:26 -08:00
Dan Albert
df7be8603b Clean up some uses of Point to prep for update. 2022-02-21 18:12:59 -08:00
RndName
bafc9dc65e Mention incompatible skynet plugin 2022-02-21 20:55:07 +01:00
RndName
0a13839155 Fix missing logistic units in layout causing error 2022-02-21 20:45:41 +01:00
RndName
54e24dff39 Improve Layout System and adopt to review
- adopted to review comments
- removed the role from layouts
- reworked the Groups within the layouts
- added more documentation
- rebased to latest changes
2022-02-21 20:45:41 +01:00
RndName
2c17a9a52e Refactor Templates to Layouts, Review and Cleanup
- Fix tgogenerator
- Fix UI for ForceGroup and Layouts
- Fix ammo depot handling
- Split bigger files in smaller meaningful files (TGO, layouts, forces)
- Renamed Template to Layout
- Renamed GroundGroup to TheaterGroup and GroundUnit to TheaterUnit
- Reorganize Layouts and UnitGroups to a ArmedForces class and ForceGroup similar to the AirWing and Squadron
- Reworded the UnitClass, GroupRole, GroupTask (adopted to PEP8) and reworked the connection from Role and Task
- added comments
- added missing unit classes
- added temp workaround for missing classes
- add repariable property to TheaterUnit
- Review and Cleanup

Added serialization for loaded templates

Loading the templates from the .miz files takes a lot of computation time and in the future there will be more templates added to the system. Therefore a local pickle serialization for the loaded templates was re-added:
- The pickle will be created the first time the TemplateLoader will be accessed
- Pickle is stored in Liberation SaveDir
- Added UI option to (re-)import templates
2022-02-21 20:45:41 +01:00
RndName
1ae6503ceb Rework S-300 and Naval Templates, Groups and Classes
- Unified SA-10, SA-10B, SA-12, SA-20, SA-20B, SA-23 to only one template: SA-300 Site
- Updated the unit groups for S-300
- unified russian and chinese navy templates
- added frigate class
2022-02-21 20:45:41 +01:00
RndName
f72f669d00 Update Units, add Ships and Groups 2022-02-21 20:45:41 +01:00
RndName
f10f792c4b Update Factions 2022-02-21 20:45:41 +01:00
RndName
344d4e31b7 Migrate generators to templats
- added all new templates
- deleted the generators
- added documentation
2022-02-21 20:45:41 +01:00
RndName
60c8c80480 Decoupling and generalization of templates
Improvement for factions and templates which will allow decoupling of the templates from the actual units
- Implement UnitGroup class which matches unit_types and possible templates as the needed abstraction layer for decoupling.
- Refactor UnitType, Add ShipUnitType and all ships we currently use
- Remove serialized template.json and migrated to multiple yaml templates (one for each template) and multiple .miz
- Reorganized a lot of templates and started with generalization of many types (AAA, Flak, SHORAD, Navy)
- Fixed a lot of bugs from the previous reworks (group name generation, strike targets...)
- Reorganized the faction file completly. removed redundant lists, added presets for complex groups / families of units like sams
- Reworked the building template handling. Some templates are unused like "village"
- Reworked how groups from templates can be merged again for the dcs group creation (e.g. the skynet plugin requires them to be in the same group)
- Allow to define alternative tasks
2022-02-21 20:45:41 +01:00
RndName
daf4704fe7 Rotate ground-units as in the campaign miz
This implements a logic to rotate groups which are generated from templates like the origin (ground unit) which was placed by the campaign designer
2022-02-21 20:45:41 +01:00
RndName
5febcdd4e4 Implement Template System for ground objects
- Factored out the current generators to use a better approach with Templates build from the dcs mission editor.
- This information is extended with a template-mapping in a json file which allows to logically group together multiple dcs groups and even statics to one template
- The combination of mapping and miz will be serialized to a template.json which is only used for loading.
- Factions now load templates during initialization and hold all the templates they can really use. This is based around the faction file.
- Implemented a template randomizer which allows to add some randomization to templates
- Each Template Group can have 1 randomizer which randomizes unit_type and size based on the mapping definition. Larger groups need to be devided in more fine detailed groups as we can now handle them better due to the change from dcs group types to our own classes.
- Rewritten the ArmorGroup, Naval and EWR template handling

Rework GroundObjectBuyMenu to support templates
2022-02-21 20:45:41 +01:00
RndName
d154069877 Refactor ground objects and prepare template system
- completly refactored the way TGO handles groups and replaced the usage of the pydcs ground groups (vehicle, ship, static) with an own Group and Unit class.
- this allows us to only take care of dcs group generation during miz generation, where it should have always been.
- We can now have any type of unit (even statics) in the same logic ground group we handle in liberation. this is independent from the dcs group handling. the dcs group will only be genarted when takeoff is pressed.
- Refactored the unitmap and the scenery object handling to adopt to changes that now TGOs can hold all Units we want.
- Cleaned up many many many lines of uneeded hacks to build stuff around dcs groups.
- Removed IDs for TGOs as the names we generate are unique and for liberation to work we need no ids. Unique IDs for dcs will be generated for the units and groups only.
2022-02-21 20:45:41 +01:00
RndName
6baf36c587 Prepare the generators for template migration
adopt armor and ship generators for randomization
2022-02-21 20:45:41 +01:00
Dan Albert
9e6b1cf716 Move logging config to a file.
By default logging configuration is defined by
resources/default_logging.yaml. Very noisy loggers (like the
uvicorn.access logger) are kept out of the console and UI logs by
default. Developers (or weird users) can customize their default logging
config by copying the file to resources/logging.yaml and editing as
needed. It would be preferable to load this file form the Liberation
user directory, but because first-time initialization requires the UI,
we want to configure logging before we necessarily know where to find
that.
2022-02-20 14:17:44 -08:00
Dan Albert
c16ca40894 Move waypoints and commit boundaries to FastAPI. 2022-02-20 13:30:36 -08:00
RndName
b533633494 Improve the replenish rate function in squadron.py
reword and reuse
2022-02-20 00:51:05 +01:00
MetalStormGhost
2af274dc77 Autoplanner will take number of pilots into account when planning purchases
- Added expected_pilots_next_turn() to Squadron. The procurement AI now correctly compares to it when evaluating if planes should be bought, instead of the maximum possible number of pilots.
- Added replenish_rate method to squadron.py to prevent expected_pilots_next_turn from returning an incorrect (too large) number when replenish rate > pilots required.
#1837
2022-02-20 00:48:05 +01:00
Dan Albert
5cd9af32fa Move UI-only waypoint number out of the model.
This isn't needed by the backend, so just handle it in the front end.
2022-02-19 15:09:58 -08:00
Dan Albert
4c3509a455 Remove unused signals. 2022-02-19 14:49:04 -08:00
Dan Albert
77d29e314c Add API key authentication.
We don't have any sensitive data, but we do access the file system. On
the off chance that some phishing website decides to try to use
Liberation as an attack vector, prevent access to the API by
unauthorized applications. An API key is generated at each program start
and passed to the front end via the QWebChannel.
2022-02-19 14:41:39 -08:00
Dan Albert
09457d8aab Move frozen combat handling out of MapModel. 2022-02-19 13:51:18 -08:00
RndName
2168143fea fix loading for vehicle pydcs_extensions 2022-02-19 22:27:17 +01:00
Dan Albert
cba68549d8 Add a UUID -> Flight database to Game.
This will be expanded with other types as needed.
2022-02-19 12:57:41 -08:00
Dan Albert
ab6f44cb6f Move remnants of db.py to config.py.
This is now just a few prices and income configurations. Both should
probably be defined in YAML but for now this makes the name "db" usable
again.
2022-02-18 18:22:02 -08:00
Dan Albert
9b20a6d053 Move UI defaults out of db. 2022-02-18 18:18:46 -08:00
Dan Albert
5cd2b91e28 Move another helper function out of db. 2022-02-18 18:15:29 -08:00
Dan Albert
9bdb81019b Remove unused class. 2022-02-18 18:13:43 -08:00
Dan Albert
ddfe4c00b1 Move missiongenerator helper to missiongenerator. 2022-02-18 18:12:53 -08:00
Dan Albert
4f64329f25 Move pydcs helper function out of db. 2022-02-18 18:11:32 -08:00
Dan Albert
b4742ad54c Move faction cache out of db.py. 2022-02-18 17:58:34 -08:00
Dan Albert
36f74ae0a9 Remove useless wrappers from db.py. 2022-02-18 17:50:51 -08:00
Dan Albert
758feab413 Remove unused piece of db.py.
There aren't any references to this field in the project.
2022-02-18 17:48:28 -08:00
Dan Albert
52ed6f3f94 Move livery overrides to unit yaml. 2022-02-18 17:22:43 -08:00
Dan Albert
c1cb32de21 Move a type out of game.db. 2022-02-18 13:00:42 -08:00
Dan Albert
e3ee988225 Move mod vehicle registration to a decorator.
This cruft doesn't need to be in game.db, it can be kept with the mod
support code.
2022-02-18 12:54:41 -08:00
Dan Albert
4e030c4a3a Add explicit types where they aren't needed.
I have no idea why mypy is whining about this.
2022-02-16 17:04:25 -08:00
Dan Albert
4f73c47dcb Use explicit reference to app object for server.
I have no idea why the docs think strings are better. pyinstaller wasn't
able to detect the import through the string so the code ended up being
stripped from the package. Use an explicit import to prevent that.
2022-02-16 16:50:35 -08:00
Dan Albert
21f7912458 Add websocket event stream for sim updates.
As a proof of concept this only covers the flight positions.
2022-02-16 01:34:56 -08:00
Dan Albert
350f08be2f Add FastAPI interface between the game and map.
A possible explanation for the infrequent CTDs we've been seeing since
adding fast forward is that QWebChannel doesn't keep a reference to the
python objects that it passes to js, so if the object is GC'd before the
front end is done with it, it crashes.

We don't really like QWebChannel anyway, so this begins replacing that
with FastAPI.
2022-02-15 18:14:34 -08:00
C. Perreau
1df31b2496 Merge pull request #2013 from Starfire13/patch-1
Fixed 492nd FS using 335th FS's nickname
2022-02-15 11:47:00 +01:00
Starfire13
05ae78a671 Update 492nd FS.yaml
Fixed incorrect nickname. Looks like the nickname wasn't updated when the contents were copy-pasted over from the other squadron.
2022-02-15 20:58:07 +11:00
Dan Albert
6ebda41922 Replace debug QObject models with Pydantic.
This requires less duplication and paves the way for us replacing
QWebChannel with FastAPI, which in turn gets us closer to not needing
Qt.
2022-02-13 14:52:41 -08:00
Dan Albert
1adafac35f Make lines_to_leaflet tolerant of single lines. 2022-02-13 14:35:31 -08:00
Dan Albert
d488bcffbd Fix debug zones not updating on flight switch. 2022-02-13 14:35:30 -08:00
Dan Albert
f153e75f03 Fix default layer in debug mode. 2022-02-13 14:35:30 -08:00
Dan Albert
51961294dd Fix incorrect HoldZonesJs initialization. 2022-02-13 14:35:30 -08:00
MetalStormGhost
9f7f391609 Loaadouts for the Tornado GR4 2022-02-13 15:58:29 +01:00
MetalStormGhost
33ed127cba UH-60L mod support
Resolves #1964 but adding CTLD will require the use of Liberation plugins and thus are not included in this pull request.

- Implemented support for the UH-60L mod by =X51= Kinkkujuustovoileipa, Cubeboy, Jonas, JinxxDCS, Dorian, =X51= Parzival & =X51= Lawson.
- Because the standard DCS tankers will not fly below 160ish knots, the UH-60L mod team have included a modified version of the KC-130 tanker designed for refueling at speeds of 120-130kts.
2022-02-13 15:56:51 +01:00
Hornet2041
8a66bf2e09 Remove Fw A-8 and D-9 from Germany 1940/1942 faction 2022-02-13 12:33:37 +01:00
Dan Albert
2e901f3586 Replace some isinstance calls with TypeGuard.
These aren't as ergonomic as I'd hoped because of
https://www.python.org/dev/peps/pep-0647/#narrowing-of-implicit-self-and-cls-parameters.

I added a decorator `@self_type_guard` so we can avoid needing to import
the descendent types in the typeguard implementation (which wouldn't fix
any circular imports, just move them).
2022-02-12 14:59:44 -08:00
Dan Albert
85e7b1762d Upgrade to Python 3.10.
Shapely doesn't have a Windows wheel on pypi yet, but we can get them
from https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely. This unblocks
(and because wheels are matched to python versions, *requires*)
upgrading to Python 3.10.
2022-02-12 22:09:49 +00:00
Dan Albert
7c4d1e2f60 Speed up artifact upload with explicit zip.
GitHub has limits on the number of files that can be used with
upload-artifact, and it sounds like it will also be faster to compress
locally before uploading.
2022-02-12 21:52:07 +00:00
Dan Albert
5d0fa0fbb3 Update Python dependencies. 2022-02-12 21:40:33 +00:00
Dan Albert
011d8a4e12 Export airfield data to yaml, switch to ID keys.
This exports all the old AIRFIELD_DATA to yaml files. It's easier for
users to send fixes if it's defined this way, and they can also fix it
in their install without having to wait for a new release.

This also switches the indexes from the unstable DCS airfield names to
airfield IDs, so this fixes another case of DCS updates occasionally
breaking Liberation.

I also ended up finding quite a few typos in airfield names, and
incorrect theater names in the process. Those have been fixed.
2022-02-11 01:39:57 -08:00
C. Perreau
079f19a66e Merge pull request #1985 from bbirchnz/farp-stuck-helis
Add all helipads to single group per FARP allowing take off from parking behavour
2022-02-08 21:58:42 +01:00
Khopa
7a19a7d696 Removed version information from F10 map drawings layer 2022-02-08 20:36:52 +01:00
C. Perreau
c0890b2347 Merge pull request #2002 from dcs-liberation/fix_issue_1966
Fix issue 1966
2022-02-07 21:25:57 +01:00
Khopa
61c1d12a86 Fix #1966 : Refactored squadron default overrides in dedicated function 2022-02-07 18:14:35 +01:00
Khopa
dc0562b3be Fix #1966 : Naming; replaced female_pilot_ratio by female_pilot_percentage 2022-02-07 18:01:43 +01:00
Khopa
05d69ba003 Mypy fix 2022-02-06 23:11:29 +01:00
Khopa
ffedd2e1ad #1966 : Updated campaign file version & updated golan heights campaign with an example usage 2022-02-06 22:44:53 +01:00
Khopa
3932e28417 #1966 : Updated squadrons files with the new female_pilot_ratio parameters 2022-02-06 22:41:28 +01:00
Khopa
33a75b5450 #1966 : Added female_pilot_ratio param in squadrons. Also possible to force name or nickname for squadrons in campaign yaml files. 2022-02-06 22:41:27 +01:00
MetalStormGhost
a024be6b1d Don't reject exact fits when transferring squadrons.
Resolves #1952
2022-02-06 12:39:41 -08:00
SnappyComebacks
3987f26689 Add performance option to not cull threatening IADS (#1953)
- Don't cull EWRs in detection range.
- Don't cull SAMs within threat range + small buffer.
2022-02-05 18:38:25 -07:00
Tom Wabinski
ac5d20ff82 Add OCA/Runway loadouts for F-15E and F-16C.
Unguided bombs for the AI.
2022-02-04 12:57:37 -08:00
Dan Albert
9d14333cc0 Update pydcs. 2022-02-04 12:43:17 -08:00
Ben Birch
a70a951192 Add all helipads to single group per FARP allowing take off from parking behavour and fixes #1910 2022-01-30 15:04:53 +11:00
RndName
3afc6ba24b Add NASAM Radar and Launcher to radar_db
This will allow correct calculation of the threat range and prevent creating a threat zone when the SR is dead. #1978
2022-01-28 09:41:17 +01:00
MetalStormGhost
3231d008cc Tolerate empty TGOs in max_threat_range. 2022-01-27 00:43:31 -08:00
Dan Albert
205929bfc9 Log time spent running to first contact. 2022-01-24 18:24:28 -08:00
Dan Albert
8128b2ed17 Log mission generation time. 2022-01-24 18:20:34 -08:00
Dan Albert
32dd0f543a Log the time it takes to save the game. 2022-01-24 17:58:35 -08:00
Dan Albert
e80851b0a1 Impose minimum altitude for mid-mission spawns.
We had this for the old style in-flight spawns, but not for mid-mission
spawns. Aircraft that were spawning soon after takeoff could potentially
be close to (or under) the ground, causing them to "crash" at game
start. The altitude is different here than for the old style in-flight
spawns to try to get closer to the intended spawn location.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1941
2022-01-24 17:43:41 -08:00
Dan Albert
2499276b2a Fix helicopters at airfields breaking generation.
Helipads at airfields don't work well right now because they are not
counted as additional parking, but we should still allow them to take
off from the airfield parking.

Follow up work would be to fix the parking problem and allow adding
helipads to airfields, or maybe to just "ground" start helicopters at
airfields so they take off from parking rather than the runway.

May fix https://github.com/dcs-liberation/dcs_liberation/issues/1890
2022-01-24 17:17:00 -08:00
Dan Albert
f95795d547 Revert "Remove front line minimum distance."
This bug still isn't well understood and this made things worse.
Reverting until we understand the cause.

This reverts commit c844c364fa.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1912
2022-01-24 17:00:00 -08:00
SnappyComebacks
b3a3eb414a Typhoon GR4 and Typhoon IDS images (#1970)
* Add icons for Tornado GR4 and Tornado IDS.
2022-01-22 12:20:23 -07:00
Starfire13
0300b77ff5 Update bluefor_modern.json 2022-01-22 11:09:56 -08:00
RndName
93a0db3112 Add otion to ignore the empty install dir warning message
Adds a do not show again checkbox to the empty install dir warning popup on lib start. This only appears when the install dir is empty to prevent mission scripting replacement.

Also adds a warning message to the log when the dir is empty. Will help to identify this in bug reports.
2022-01-22 13:13:18 +01:00
Dan Albert
b312242cb8 Remind PR authors about the changelog.
I suspect we'll still be writing most of these ourselves, but might as
well point it out for the people that want to.
2022-01-16 14:02:05 -08:00
leemarov
5d291846d5 Fix unculled zones not updating when needed.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1034.
2022-01-16 13:54:09 -08:00
MetalStormGhost
7387c2ed8f Add support for the AI-only F-14A.
The AI for the flyable one is having issues firing AIM-54s. This allows
working around that.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1927.
2022-01-16 13:53:05 -08:00
SnappyComebacks
bf034e18eb Add preset formations to different flights and waypoints. (#1948)
* Update pydcs version.
* Add formation presets for various flight types.
2022-01-16 14:49:17 -07:00
dependabot[bot]
a97a4b2c15 Bump pillow from 8.3.2 to 9.0.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.3.2 to 9.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.3.2...9.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 19:56:36 -08:00
bbirchnz
4b99ae957e Improve unit system support in kneeboards.
* Factor out unit systems.
* Add support for more unit systems (nautical and imperial).
* Fuel units support.
* Data for many more aircraft.
2022-01-12 17:21:06 -08:00
MetalStormGhost
cd97565cce Commit JAS-39-C support update for v1.8.0-beta again 2022-01-12 20:22:26 +01:00
RndName
0106e1c64a Revert accidental wrong commit 2022-01-12 20:22:26 +01:00
RndName
420779fb4e Updated JAS-39-C mod support version v1.8.0-Beta
#1887
2022-01-12 19:59:02 +01:00
MetalStormGhost
11328ea241 Updated the Community A-4E-C mod support to version 2.0.0
Resolves #1897
2022-01-12 19:44:20 +01:00
MetalStormGhost
ecd2f2b6e5 Add missing HTTPS to pydcs URL. 2022-01-11 14:50:50 -08:00
Dan Albert
0036dca773 Update bug templates for 5.1.0. 2022-01-09 12:49:20 -08:00
bbirchnz
cefc36a6a9 Add aircraft property for Zulu time preference. 2022-01-08 21:37:57 -08:00
RndName
194b4dfd6b Update Iran factions / Revert previous changes
readded ZSU-57 and SA-17 as they can be used from the country even if dcs mission editor leaves the type empty / does not have them for the country.
2022-01-09 01:26:23 +01:00
RndName
d9b4342293 Fix the P-47D and P-51D radio definition
set the correct ChannelAllocator
from common to SCR-522)

#1925
2022-01-08 14:08:24 +01:00
bbirchnz
39152eab3c Add windsocks to FARPs, kneeboard improvements.
Kneeboard improvements:

* Optional (aircraft specific) metric speeds/distances/altitudes.
* Heading to waypoint.

Fuel still needs to be converted to metric, but good enough for now.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/915
2022-01-07 16:58:53 -08:00
Starfire13
eb6c187180 Update Vegas Nerve campaign 2022-01-07 17:46:54 +01:00
RndName
808db05d23 Fix threat range calculation
tThreat range calculation had a hidden bug which could possibly lead to wrong threat range calculation
2022-01-07 15:36:59 +01:00
RndName
795df1a93f Update Distance comparison operators
remove order=True and implement the comparison operators manually to fix typing error
2022-01-07 15:34:49 +01:00
RndName
54745e786e Fix incorrect threat range of SA-5
The SA-5 was not part of the radar_db.py and therefore the threat_range calculation was wrong / ever LN counted as threat even when the TR was dead. Also fixed a wrong unit for the SA-11 TELAR.
#1816
2022-01-07 14:41:01 +01:00
RndName
82dfeb8afa Update pydcs
Latest version with the new terrain from 2.7.9.18080
2022-01-06 21:20:21 +01:00
RndName
8df9f6989a Update for the nevada map update
Conflicttheater and Airfields needed an update as nearly all Nevada Airports were renamed with the last map update
2022-01-06 19:50:45 +01:00
Starfire13
19713e6159 Update campaign Exercise Vegas Nerve by Starfire 2022-01-06 18:00:37 +01:00
RndName
f526681f3d Update SA-5 Generator for factions without the TinShield
- added an EarlySA5Generator with the P-19 FlatFace SR which is supported by all factions
- allows factions without access to the TinShield to have a working SA-5
2022-01-05 01:08:09 +01:00
RndName
77edeac990 Add Igla manpad INS ground unit
Fix for Iran faction #1900
2022-01-04 23:51:33 +01:00
RndName
2c0d7c8e55 Campaign submission from Fuzzle
- new campaign Scenic Route 2 - Dust To Dust including NATO_OIF faction and 3 squadrons
- update for pacific repartee

#1898, #1902
2022-01-04 23:38:39 +01:00
RndName
5c0227b86f Update faction Iran 1988 & 2015
support for the latest pydcs export as some units were not usable by the country
2022-01-04 21:30:07 +01:00
RndName
8e5d7d9f20 Update changelog 2022-01-02 23:57:20 +01:00
MetalStormGhost
c844c364fa Remove front line minimum distance.
This isn't what it says. It doesn't enforce a minimum distance between
points, but a minimum path length, which isn't useful and isn't a
documented requirement.
2022-01-02 13:34:01 -08:00
RndName
4139258508 Cleanup the killed map objects recognition
removed the extra array to track killed_map_objects and reuse the existing killed_ground_units routine to remove duplicate code and possible confusion
2022-01-02 12:55:10 +01:00
Benjamin Fischer
2d07ef717c changed AWACS orbit to a racetrack (#1826)
* AWACS now orbits in a racetrack.

* Update AWACS racetrack length

* Increase AWACS threat spacing.
2022-01-01 19:05:28 -07:00
MetalStormGhost
383d1b2c9c Update multi-part Caucasus campaigns. 2022-01-01 16:22:11 -08:00
RndName
c31ace409f Update pydcs 2022-01-02 01:19:24 +01:00
RndName
8dbd2e2561 Revert "Bump Campaign version to 10.0"
This reverts commit 209afd3adf.
2022-01-02 01:19:24 +01:00
RndName
abe76ea003 Rework killed map_objects recognition
- removed the map_object_id from the TGO
- add a new TriggerRule with the MapObjectIsDead Condition which adds the map object to the killed_map_objects array in the state.json
- Use the trigger_zone_name as the unique identifier used for the unit_map to recognize the kill
2022-01-02 01:19:23 +01:00
SnappyComebacks
a013d27d17 Add ECM behavior to not Air to Air flights (#1879)
* If a plane has a jammer, and it is not an air to air flight it will jam between join and split.
2022-01-01 16:49:04 -07:00
MetalStormGhost
641c21627e Improved the F-104G CAP loadout.
Replace hydra pods with more AIM-9s.
2022-01-01 14:20:28 -08:00
Starfire13
1bad0f045e Added missing squadron nickname 2021-12-31 16:46:55 +01:00
RndName
209afd3adf Bump Campaign version to 10.0
with the latest dcs update the Object IDs were changed.
updated the campaign version for these campaigns i was able to check.

#1868
2021-12-31 16:30:52 +01:00
RndName
deb7227ce9 Fix Viggen FR22 group channel id and mention in changelog 2021-12-30 18:47:50 +01:00
RndName
abeebe9c8b Update Viggen radio presets for 2.7.9
the radio presets of the Viggen were changed with the recent dcs update, they will no longer be automatically generated so we have to add them manually
fixes #1883
2021-12-30 18:16:38 +01:00
RndName
81cbf807cb Update Fuzzle Campaigns
fixes #1855, fixes #1821
2021-12-30 11:05:56 +01:00
Dan Albert
4528233830 Add UI for setting flight properties like HMD.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/706
2021-12-25 15:04:49 -08:00
MetalStormGhost
5684570880 Updates for WW2 loadouts.
Major changes:
 - FW190A8 ground attack loadout WGr21 rockets (primarily an air-to-air weapon) replaced with SC500J or AB500 bombs.
 - FW190D9 WGr21 rockets replaced with R4M rocket packs and SC500 bombs for CAS.
 - Added droptanks for I-16.
 - Ju-88A4 CAS loadout changed for AB500 cluster bombs.
 - Mosquito now has rockets which were introduced in DCS World 2.7.9.17830 open beta
 - Added more/heavier bombs to P-47
 - P-51 now has a separate OCA/Runway loadout with bombs. Other ground attack loadouts switched to rockets.

Also includes an SA342Minigun loadout which we didn't previously have.
2021-12-25 12:16:34 -08:00
Dan Albert
c0dfa77d76 Add ECM pod to Viper A2G loadouts.
Didn't add to the A2A loadouts since the ECM interferes with radar
operation and is otherwise weight and drag. It does have a radar
priority mode though, so maybe it should be added there too?

https://github.com/dcs-liberation/dcs_liberation/issues/1868
2021-12-24 09:52:44 +00:00
Dan Albert
d81c6a0426 Update pydcs.
https://github.com/dcs-liberation/dcs_liberation/issues/1868
2021-12-24 01:34:11 -08:00
Dan Albert
656a98675e Rework sim status update to not need a thread.
Rather than polling at 60Hz (which may be faster than the tick rate,
wasting cycles; and also makes synchronization annoying), collect events
during the tick and emit them after (rate limited, pooling events until
it is time for another event to send).

This can be improved by paying attention to the aircraft update list,
which would allow us to avoid updating aircraft that don't have a status
change. To do that we need to be able to quickly lookup a FlightJs
matching a Flight through, and Flight isn't hashable.

We should also be removing dead events and de-duplicating. Currently
each flight has an update for every tick, but only the latest one
matters. Combat update events also don't matter if the same combat is
new in the update.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-23 17:46:24 -08:00
Dan Albert
43d5dc0528 Fix bad import. 2021-12-23 12:57:14 -08:00
Dan Albert
0c7d549e59 Add weapon data for the AN/ALQ-184.
https://github.com/dcs-liberation/dcs_liberation/issues/1868
2021-12-23 12:57:14 -08:00
Dan Albert
fc4022a76d Fix misclassification of the HTS as a TGP. 2021-12-23 12:57:13 -08:00
RndName
de87b4be92 Mention squadron config and f-104 mod in changelog 2021-12-23 13:25:54 +01:00
RndName
d2f7785f9f Finish implementation of add/remove squadrons from AirWingConfigurationDialog
Users can now add and remove squadrons with specific buttons. this also allows new aircraft types to be added as well.

- rebased existing PR to develop
- reverted observable and changed to signals
- changed the general concept so that changes only affect the ui data model and not the game directly. Game will only be updated on apply
- removed unused code
- adopt to review comments
- allow user to choose a predefined squadron preset (also alow none value to use the random generator)
- Reuse the squadron defs from the default assigner in the AirWing class
- allow user to re-roll the squadron nickname (also added new ui icons for the button)
2021-12-23 13:20:59 +01:00
Richard Pump
e4ba9a8b72 Added squadron configuration gui
- added add/remove buttons to Air Wing Menu, implemented remove
2021-12-23 13:20:41 +01:00
Starfire13
4803ae5f78 Fixed typo in squadrondefgenerator.py 2021-12-23 11:20:31 +00:00
Starfire13
d739d830ab Fixed typo in naming.py 2021-12-23 11:19:56 +00:00
MetalStormGhost
3626fa79b4 Re-add From Caen to Evreux campaign. 2021-12-22 14:16:11 -08:00
Dan Albert
dea2c883a7 Renormalize line endings. 2021-12-22 13:22:13 -08:00
Dan Albert
2193af1a95 Add .gitattributes file to enforce line endings. 2021-12-22 13:22:12 -08:00
MetalStormGhost
88bc4fd852 F-104 mod support. 2021-12-22 13:01:51 -08:00
Dan Albert
515efd0598 Draw frozen combat on the map.
Very basic display. Draws the engagement footprint for air-to-air
combat, a line from the flight to the target for IP, and lines from SAMs
to their target for air defense.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:56:25 -08:00
Dan Albert
fb10a8d28e Add frozen combat modelling.
This doesn't do anything yet, but sets up the data model handling for
frozen combat. The next step is to show combat in the map view, since
that will be helpful when debugging the step after that one: resolving
frozen combat.

This would benefit from caching the Shapely data for SAM threat zones.
Right now it's generating them once per tick and the stuttering is
visible at max speed.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:28 -08:00
Dan Albert
ce4628b64f Separate combat as a distinct flight state.
Will be used later to simulate combat.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:27 -08:00
Dan Albert
d9108a7ca6 Update mypy and dependencies.
The newer version includes a partial fix for
https://github.com/python/mypy/issues/5485 (it doesn't fix the problem
for frozen dataclasses, but fixes other cases).
2021-12-21 14:51:45 -08:00
Dan Albert
8867aaeb6d Break up mapmodel.py monolith. 2021-12-21 13:01:24 -08:00
RndName
490a4e8097 Revert "Temporary Fix for broken upload action"
This reverts commit 697e2c2b11.
2021-12-21 09:34:56 +01:00
RndName
f9ed61d199 Enable / Disable game specific functions if no game is loaded
- Disable Save, Settings, Stats and Notes if game is none

fixes #1854
2021-12-20 13:55:05 +01:00
Dan Albert
61015b127e Add pull request template explaining branching. 2021-12-18 14:58:08 -08:00
Dan Albert
e99c36a21f Add links to the FAQ, manual, etc to the bug form. 2021-12-18 14:52:37 -08:00
Dan Albert
0608147cd9 Remove duplicate text in bug report template. 2021-12-18 14:42:42 -08:00
Dan Albert
c40f538782 Migrate bug report template to a form. 2021-12-18 14:41:18 -08:00
Dan Albert
3afaa90183 Fix syntax error in new game bug template. 2021-12-18 14:22:48 -08:00
Dan Albert
bdf2976a89 Add a new bug template for New Game bugs.
First attempt at using a bug form so we can use required fields.
2021-12-18 14:20:28 -08:00
RndName
697e2c2b11 Temporary Fix for broken upload action
The upload-artifact version 2.3 has problems with 0byte files and prevent the build action from beeing completed.
This temporary fix should be reverted when they fixed the bug.
2021-12-13 20:47:28 +01:00
RndName
c643adf57b Fix empty convoy when transfer is not completable
fixes #1553
2021-12-13 20:45:15 +01:00
RndName
2c21644a2c Add Easy Communication Setting
allow to enforce the mission setting for easy communication
implements #1425
2021-12-12 01:20:17 +01:00
MetalStormGhost
d11d3b58f7 Add option to limit convoy travel distances.
CPU load seems to scale with route length, so add an option to limit
the length of the convoy route. The tradeoff is that the performance
sensitive route won't necessarily be a correct route.
2021-11-27 01:40:06 -08:00
RndName
690705ff8f fix PySide Error
fix #1801 which was introduced with f3bf9c0
2021-11-26 09:20:34 +01:00
RndName
34100d1c76 Update UI when buy or sell raises exception
fixes #1562
2021-11-22 16:48:52 +01:00
RndName
676a25631b Generate unit_id for helipads
fixes mission scripting error (1748)
2021-11-22 15:05:12 +01:00
Dan Albert
9e92c87351 Revert "Update dependencies."
Seems to have broken the executable produced by pyinstaller. It doesn't
repro for me locally so figuring out which dep is the problem would take
ages. Reverting the whole thing to get to a clean state and will
revisit.

This reverts commit 66c8b96c9a.
2021-11-21 18:04:03 -08:00
Dan Albert
2a75d14e0e Revert upgrade to pyside6.
This appears to be incompatible with pyinstaller. I get the following
when trying to run the executable generated with pyside6:

```
Traceback (most recent call last):
  File "qt_ui\main.py", line 29, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "qt_ui\windows\QLiberationWindow.py", line 28, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "qt_ui\widgets\map\QLiberationMap.py", line 11, in <module>
ImportError: could not import module 'PySide6.QtPrintSupport'
```
2021-11-21 17:39:43 -08:00
Dan Albert
f3bf9c0c3c Silence some useless generation warnings. 2021-11-21 13:55:41 -08:00
Dan Albert
acd63fdeac Fix more not-cleared flight plan elements.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1745
2021-11-21 13:37:45 -08:00
Dan Albert
bc819d59f4 Prevent drawing flights that are being deleted.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1720
2021-11-21 13:21:25 -08:00
Dan Albert
8c2e25339f More Python 3.10 compat. 2021-11-21 11:30:39 -08:00
Dan Albert
ef73f712ec More Python 3.10 compat. 2021-11-21 11:28:51 -08:00
Dan Albert
08d670a882 Really fix the build. 2021-11-20 22:27:48 -08:00
Dan Albert
477d3fb197 Fix CI builds for PySide6. 2021-11-20 19:30:30 -08:00
Dan Albert
4a7dae9cc2 Upgrade to PySide6.
PySide2 renamed to PySide6 for Qt 6 support. It doesn't seem like
PySide2 is getting a 3.10 wheel, so upgrade to Qt 6 to prep for that.
2021-11-20 19:26:18 -08:00
Dan Albert
69649d7496 Vendor more map js/css. 2021-11-20 19:26:00 -08:00
Dan Albert
12f420f50e Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in
collections.abc.
2021-11-20 18:49:14 -08:00
Dan Albert
66c8b96c9a Update dependencies. 2021-11-20 18:45:27 -08:00
Dan Albert
a51b3b4621 Note HTS support in the changelog. 2021-11-19 16:06:08 -08:00
Dan Albert
d69ebc728b Add weapon data and loadouts for the HTS.
Used in the default Viper DEAD and SEAD loadouts.
2021-11-19 16:05:03 -08:00
Dan Albert
f13795b743 Update pydcs.
HTS support.
2021-11-19 16:04:39 -08:00
Dan Albert
1dfc625f79 Clarify display of start times. 2021-11-18 23:25:59 -08:00
Dan Albert
0c731e4856 Fix start time used for the kneeboard.
The times we're given are an offset from the turn start, not the mission
start.
2021-11-18 23:13:48 -08:00
Dan Albert
9c0f72921f Randomly offset mid-mission spawns.
This is what we do for the old in-air starts too. It's not perfect but
it's not a regression either.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1754
2021-11-18 17:07:24 -08:00
MetalStormGhost
a94db0ec43 Add a new base banner for FARPs. 2021-11-18 16:58:46 -08:00
Dan Albert
0ff00acf9d Clarify the role of the faction aircraft list. 2021-11-14 18:56:36 -08:00
Dan Albert
45b7b4b2cb Fix incorrect radio range for AN/ARC-222.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1740
2021-11-14 13:34:32 -08:00
Khopa
59d178f99e Fixed mypy errors 2021-11-14 22:05:23 +01:00
Khopa
c59c87c3e8 Now displaying Liberation control points, paths, and frontlines in the mission editor / F10 map. (WIP) 2021-11-14 21:58:56 +01:00
Khopa
c21476b262 Fix #1718 : Remove Merkava IV from faction "Israel 1982" 2021-11-14 21:26:25 +01:00
Khopa
5b4d65db23 Fix #1717 : Removed SA5Generator from Iran 1988 faction 2021-11-14 21:20:12 +01:00
Khopa
b351551568 pydcs : Updated to latest pydcs master commit 2021-11-14 21:15:03 +01:00
Khopa
ea868b7079 SA5Generator : Added an ural truck to reload SA-5 sites 2021-11-14 21:14:35 +01:00
Dan Albert
613008b56e Fix typo. 2021-11-13 14:34:17 -08:00
Dan Albert
2ea2ecec94 Remove incompatible campaigns. 2021-11-13 11:20:06 -08:00
Dan Albert
a3038e75cf Add A-4E squadrons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1716
2021-11-13 11:16:17 -08:00
Dan Albert
5dcd4580c3 Add IRIAF F-4E squadron.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1721
2021-11-13 11:12:09 -08:00
MetalStormGhost
68b48ad610 Update Marianas campaigns.
More FARPs to both Orote Point and Andersen Northwest Field.
2021-11-13 11:07:00 -08:00
SnappyComebacks
532ac261ff Ability to plan tanker recovery for strike like flights (#1729)
* Initial refueling definitions.

* Adding refuel definitions.

* Initial functionality changes

* Regenerate package when adding refueling flight.

* Recursively change package waypoint.

* Fix mypy errors.

* Regenerate flight plans when tanker is added to package.

* Give tanker better starting position on package recovery.

* Add TOT calculation for refueling waypoint.

* Timing changes to Strike split point and Refueling start time.

* Add correct waypoint builder for refuel in tarcap and sweep.  Remove restrict afterburner on refuel point.

* Always generate a refuel point for a package.

* Less arbitrary altitude in Refuel track start time calculation.

* Refueling waypoint no longer optional.

* Fix mypy gen error.

* Better discrimination of which tanker flight plan to make.

* Remove refuel tot calculations.

* Remove package regeneration on tanker flight addition.
2021-11-12 21:37:34 -07:00
Dan Albert
94f65d8f70 Drop a few unsupported campaigns.
Probably more coming but these are the ones that are confirmed not
happening before release.
2021-11-12 14:02:16 -08:00
Dan Albert
46e5299c60 Update Syria full campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1728
2021-11-12 13:42:36 -08:00
Starfire13
56e1eb33af Add files via upload 2021-11-12 12:33:55 -08:00
Dan Albert
753b301e88 Fix crash when creating packages.
I'm not sure if this is a symptom of the bug or if this is actually a
separate bug, but pushing this for now to make the bug less severe.

https://github.com/dcs-liberation/dcs_liberation/issues/1720
2021-11-07 19:25:38 -08:00
Dan Albert
2c14a140fe Highlight icons for selected flights.
https://spatialillusions.com/unitgenerator/ doesn't support generating
white icons AFAICT, so this was just the blue icon manually edited to
white.

https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-07 11:44:04 -08:00
Dan Albert
d31f0e22e3 Show the status of each flight in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-07 11:27:50 -08:00
Dan Albert
30cfd8a769 Don't rebuild the ATO model on selection change.
Much faster and avoids nasty concurrency issues between the JS and
Python side.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1719
2021-11-07 01:38:55 -07:00
Dan Albert
d645b4fe73 Update Pacific Repartee.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1707
2021-11-06 19:13:16 -07:00
Dan Albert
68c794f608 Update Caucasus multi-part Georgia.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1706
2021-11-06 19:12:35 -07:00
Dan Albert
475d18b701 5.0 changelog fixes. 2021-11-06 19:07:06 -07:00
Dan Albert
e9634b7066 Prevent assigning fixed wing squadrons to FARPs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1671
2021-11-06 18:34:23 -07:00
Dan Albert
c60bba1166 Fix crash when planning ferry flights.
At some point this needed to be type-only to resolve a circular import,
but that's fixed now.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1698
2021-11-06 17:36:43 -07:00
Dan Albert
35900c2350 Fix fixed wing squadrons retreating to FARPs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1615
2021-11-06 16:53:55 -07:00
Dan Albert
e6fc817f49 Use uncontrolled for late shore starts.
These should be uncontrolled rather than late activation so that they
are present in the parking area as OCA targets. This bug was introduced
as a mistranslation when I was moving from strings to StartType.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1695
2021-11-06 16:40:09 -07:00
Dan Albert
7a18d160c8 Add missing NavalControlPoint case for BAI.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1702
2021-11-06 16:35:04 -07:00
Dan Albert
a33104d7c4 Split runway attack list from strike list.
Not all strike aircraft are capable of runway attack, so copy the strike
list into the runway attack list and remove the incompatible aircraft.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1703
2021-11-06 16:25:14 -07:00
Dan Albert
7f57180da4 Update Skynet to 2.4.0.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1713
2021-11-06 16:21:52 -07:00
Dan Albert
a23e7fe83d Restore missing income multiplier labels.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1712
2021-11-06 16:19:27 -07:00
Dan Albert
c854508381 Updates for Syria full.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1675
2021-11-06 16:15:58 -07:00
Dan Albert
d1cf8915e3 Updates for Northern Russia.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1676
2021-11-06 16:13:42 -07:00
Dan Albert
d9b5b87f2b Check in Pacific Repartee campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1701
2021-11-06 16:13:18 -07:00
Dan Albert
5923ba21de Tell Qt that we actually want text to fit.
Why isn't this the default?

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1670
2021-11-03 19:23:54 -07:00
Dan Albert
8fe805bc68 Revert use of ABC in FlightPlan.
Mypy can't handle ABC dataclasses:
https://github.com/python/mypy/issues/5374
2021-11-03 17:32:05 -07:00
Dan Albert
1944a172a3 Fix NotImplementedError for some flight plans.
Implement custom behavior for some of the flight plans but also add a
base implementation that just returns the empty set.

Use ABC for FlightPlan so that we can fail-fast on these kinds of
problems.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1711
2021-11-03 17:28:13 -07:00
Dan Albert
de0b267568 Shut down the sim update thread on quit.
Otherwise the update thread just sits there waiting forever...
2021-11-02 23:59:08 -07:00
Dan Albert
03430a4df5 Update the UI to show sim state.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
87bf3110c8 Add play/pause features to the sim.
There's no UI feedback for this yet other than the log messages.

https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
748d80ff3b Re-flip fast-forward option.
This was set to default on by mistake (turned on for debugging and
forgot to turn off before check in). The option itself may be going away
soon in favor of explicit buttons, but keep the experimental feature off
by default for now.
2021-11-02 23:22:35 -07:00
Dan Albert
33f00fb811 Add E-2D variant of the E-2C.
In game this is an E-2D, but the ID of the aircraft in the game data is
E-2C. Presumably it was repainted at some point in a DCS update.

This adds a variant but doesn't delete the old one to avoid breaking
campaigns and factions. I moved blufor modern to the E-2D but the rest
of the factions are too old so we'll let them pretend.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1696
2021-10-30 15:25:36 -07:00
Dan Albert
ae99558f40 Document Su-33 carrier takeoff fix.
https://github.com/dcs-liberation/dcs_liberation/issues/1352
2021-10-30 15:16:46 -07:00
Dan Albert
85cbffb845 Update develop to 6.0. 2021-10-30 15:11:29 -07:00
Dan Albert
70dbe7c9ca Fix (presumable) accidental edit of A-4 pylons.
I'm not sure if this was a mistaken edit that the author made on check-
in or if we have a broken script that's generating these. For now I've
manually fixed it.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1574
2021-10-30 13:26:24 -07:00
ghost
2d0b5023c9 Update Marianas campaigns to use the Tu-142. 2021-10-30 13:25:04 -07:00
ghost
92fdd0b80d Enable anti-ship missions for the Tu-142.
This is the only mission type that the Tu-142 is capable of.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1683
2021-10-30 13:25:04 -07:00
Dan Albert
dac3533654 Tone down the out-of-parking message.
There's nothing the user can do about this and it's somewhat expected,
so downgrade to a warning so users don't think it's a bug.

If we ever get around to doing more cautious parking allocation this
should become a generation-halting error, but until then we expect it to
happen somewhat often.
2021-10-30 13:12:11 -07:00
Starfire13
2d93ac58fc Campaigns updated to 9.1
Peace Spring, Vectron's Claw, and Vegas Nerve have been updated to 9.1. Squadrons have also been completely overhauled to work much better, so there should no longer be a whole bunch of squadrons on OPFOR that are never used.
2021-10-30 13:05:29 -07:00
Starfire13
79924a59bc H-6J Loadout Update
Added loadouts for DEAD and OCA/Aircraft as those are default mission types for the H-6J.
2021-10-30 13:04:42 -07:00
MetalStormGhost
545f974552 Forcibly allow GPS for more non-US factions.
Enable unrestricted_satnav with non-US factions operating either the
F-16CM or the F/A-18C to allow the use of GPS in missions.
2021-10-30 13:03:47 -07:00
Dan Albert
2699a38f7b Use stored alignment for the F-14A.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1689
2021-10-30 13:01:53 -07:00
MetalStormGhost
13d52803d6 Use Chinese navy group generators for China.
Replaced Chinese factions' Type54GroupGenerator naval group generators with
ChineseNavyGroupGenerator to make Type 52B and Type 52C destroyers also
spawn besides frigates.
2021-10-30 12:58:59 -07:00
Dan Albert
1a3b8d1dd6 Reduce fuel for fast-forwarded player flights.
This only has an effect for aircraft for which we have fuel consumption
data, but that's fine.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-30 11:37:06 -07:00
Dan Albert
b2cbf4b6f4 Halt sim on A2A contact.
https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-30 10:18:49 -07:00
Dan Albert
9839787b6d Interrupt fast-forward on air defense contact.
https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-26 23:06:58 -07:00
Dan Albert
cd0c0f1b01 Fix missing waypoint generation for most flights.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1693
2021-10-26 19:29:50 -07:00
Dan Albert
5db1b94ac4 Add option to fast forward to first contact.
This is the first step in a larger project to add play/pause buttons to
the Liberation UI so the mission can be generated at any point.
docs/design/turnless.md describes the plan.

This adds an option to fast forward the turn to first contact before
generating the mission. None of that is reflected in the UI (for now),
but the miz will be generated with many flights in the air.

For now "first contact" means as soon as any flight reaches its IP. I'll
follow up to add threat checking so that air-to-air combat also triggers
this, as will entering a SAM's threat zone.

This also includes an option to halt fast-forward whenever a player
flight reaches a certain mission-prep phase. This can be used to avoid
fast forwarding past the player's startup time, taxi time, or takeoff
time. By default this option is disabled so player aircraft may start in
the air (possibly even at their IP if they're the first mission to reach
IP).

Fuel states do not currently account for distance traveled during fast
forward. That will come later.

https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-24 17:40:45 -07:00
Dan Albert
c8f30b3289 Split aircraft spawning into its own class. 2021-10-23 20:51:39 -07:00
Dan Albert
88b4039e47 Clean up AircraftGenerator.
This class does far too many things and the file is huge. Split it up
into a few more classes.
2021-10-23 20:18:40 -07:00
MetalStormGhost
49033f67f3 Added H-6J support for China 2010 and Iraq 1991.
Includes H-6J loadouts by @Starfire13

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1661
2021-10-23 16:58:27 -07:00
MetalStormGhost
410077467b Marianas campaigns 2.7.7.14727
Updated Marianas Mount Barrigada and Landing at Agat campaigns to DCS World 2.7.7.14727 open beta.
2021-10-23 12:20:55 -07:00
Dan Albert
14769c0350 Fix type errors with Flight.start_type in the UI.
Also reorders the enum so that iteration shows the order we want in the
UI by default.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1672
2021-10-23 12:19:20 -07:00
Dan Albert
b728fcc2d6 Clean up mission result handling. 2021-10-22 14:36:51 -07:00
Dan Albert
74291271e3 Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static
class.
2021-10-22 13:48:43 -07:00
Dan Albert
b0787d9a3f Build a proper type for StartType. 2021-10-22 11:42:13 -07:00
Dan Albert
be69d17345 Move Flight and its related components out of gen. 2021-10-22 11:30:28 -07:00
Dan Albert
52b9656a1a Remove no-op code.
We won't have set late activation until after this function is called,
and that part does it correctly by checking the player preferences.
2021-10-22 11:30:27 -07:00
Dan Albert
46bf952562 Add Forrestal support, use in US 1975.
https://github.com/dcs-liberation/dcs_liberation/issues/1657
2021-10-22 10:11:15 -07:00
Dan Albert
822d737f65 Adapt to pydcs update.
https://github.com/dcs-liberation/dcs_liberation/issues/1657
2021-10-22 00:13:33 -07:00
Dan Albert
d656ec3220 Update pydcs.
https://github.com/dcs-liberation/dcs_liberation/issues/1657
2021-10-22 00:10:20 -07:00
Dan Albert
a2140b915f Flip main/detail text boldness.
Emphasize the main item text and leave the fine print as fine print.
2021-10-21 22:27:35 -07:00
Dan Albert
6dae5b98d5 Fix carrier option not taking effect this turn.
This really shouldn't need to happen but I don't feel like rewriting the
culling code right now. There's no reason for these to be persisted to
the Game at all, we should be generating these once they're needed.
2021-10-21 20:05:07 -07:00
Dan Albert
626740366b Port the mission generator settings to auto.
Done now. Not porting the cheat menu because it contains non-settings
elements as well.
2021-10-21 19:54:58 -07:00
Dan Albert
a618f00662 Port the campaign management page to auto.
Also fixes the oversight in the previous commit where float options were
not saved when changed.
2021-10-21 19:16:47 -07:00
Dan Albert
7bec4c62f7 Generate settings pages automatically.
This adds metadata to settings fields that can be used to automatically
generate the settings window. For now I have replaced the Difficulty
page. Will follow up to replace the others.
2021-10-21 18:30:56 -07:00
Dan Albert
39fae9effc Update MissionScripting.original.lua.
We don't really even need this. Some cleanup of the replacer could just
keep the original contents in memory, but this will do for now.
2021-10-21 15:50:52 -07:00
Dan Albert
3c145cf2ff Updates for Fuzzle's campaigns and squadrons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1664
2021-10-21 15:23:49 -07:00
Dan Albert
ad6f3ef8cc Update for Northern Russia campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1663
2021-10-21 15:22:18 -07:00
MetalStormGhost
79839f83a0 Change AI Su-33 carrier flights to "Takeoff from runway".
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1352
2021-10-20 19:11:22 +00:00
Johan Aberg
17011820de Fix crash if log window is open when entering mission.
Use signal to append text to LogWindow to avoid crash from crossing thread boundaries.
Change modal flag to enable interacting with LogWindow while the mission is running

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1493
2021-10-19 17:04:16 -07:00
Dan Albert
551ea728fc Update Skynet to 2.3.0.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1658
2021-10-18 17:02:14 -07:00
Dan Albert
d4f77f6588 Fix changelog sorting. 2021-10-18 17:01:32 -07:00
Dan Albert
8fe7551176 Update pydcs with radio preset fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1596
2021-10-18 16:57:43 -07:00
Dan Albert
e47276ce2e Fix config file name. 2021-10-17 19:50:15 -07:00
Dan Albert
fd1463eb4c Disable the blank issue template.
Why do we even have that lever?
2021-10-17 19:38:45 -07:00
Dan Albert
d5eaa4d091 Add a preferred_start_date for campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1079
2021-10-17 17:37:23 -07:00
Dan Albert
b174e668f4 Fix day being off-by-one on turn zero.
Doesn't have any real effect since no mission can be generated for that
turn, but shows up wrong in the top bar.
2021-10-17 17:33:29 -07:00
Dan Albert
fd49d213c2 Load custom campaigns from the user directory.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1311
2021-10-17 16:48:19 -07:00
Dan Albert
bbeb80fc48 Give aircraft purchase the majority of the window.
This makes long squadron names more likely to fit. I also added a
horizontal scroll bar for the cases when this still isn't enough space
and made the vertical scroll bar only appear when necessary. Typically
aircraft purchase menus are neither wide enough for long enough to need
either scroll bar.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1592
2021-10-17 13:28:02 -07:00
Dan Albert
702e29b54b Fix case of unused aircraft not spawning.
This function was exiting too early causing unused aircraft to stop
being spawned at *any* airfield as soon as the first full airfield was
found.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1566
2021-10-17 13:03:15 -07:00
Dan Albert
0fd911feb1 Fix some CAS planning quirks.
CAS would never be planned for turn 0 because there were no enemy ground
units, so a breakthrough attack was planned and CAS was considered
unnecessary. Fix that by rejecting all frontline stance tasks when there
are no *friendly* ground units to command.

Another issue is that CAS missions were being planned even when there
were no enemy front line forces. Skip planning in that case except on
turn 0 since we expect there to be enemy ground units on turn 1.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1629
2021-10-17 12:31:12 -07:00
Dan Albert
39234adff7 Update Allied Sword campaign miz.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1655.
2021-10-17 11:27:07 -07:00
Dan Albert
e45505b406 Note PR #1600 in the changelog. 2021-10-17 11:23:24 -07:00
Dan Albert
b1eb876572 Note PR #1646 in the changelog. 2021-10-17 11:21:45 -07:00
Dan Albert
7e66aa16f7 Fix submerged ammo depot in Black Sea.
Not sure if this was originally an accidental extra ammo depot or if it
was intended to belong to Sochi, but I've moved it to Sochi to increase
the difficulty at the first front.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1644
2021-10-17 11:16:40 -07:00
Dan Albert
35b30a01ed Fix flight resizing when switching aircraft.
No idea why we were only resetting this if the max was >= 2. Instead,
always reset the flight to the default size when switching aircraft. The
default for anything capable of a two-ship is two, but limit based on
the airframe's group size limit and the number of aircraft available.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1593
2021-10-14 21:03:55 -07:00
Dan Albert
76b3ff5f6e Override squadron base preferences when named.
This allows campaign designers to forcibly place specific squadrons at
bases that they would not normally be assigned to, such as assigning
CV-only squadrons to the shore. The airframe itself must be compatible
with the location type, so A-10s still may not be assigned to carriers.

This change only applies to squadrons that are named explicitly. There's
no need for squadrons defined by type because a squadron will always be
generated to fit the need if no pre-defined squadron is found.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1621
2021-10-14 20:49:18 -07:00
Starfire13
5e5f249bd2 Starfire's Campaigns 9.0 Update (#1654) 2021-10-13 22:51:13 -07:00
Dan Albert
ce57acb9d6 Update Fuzzle's campaigns and supporting content.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1651
2021-10-13 17:45:49 -07:00
MetalStormGhost
2a79e4a4e5 Force carrier planes to start at +1s (#1600)
Forces carrier planes with original start_time of zero seconds to have a start time of 1 second. This will prevent them from spawning on the 'sixpack' and functions as a workaround for a DCS problem (deadlock / traffic jam).

Fixes #1309.
2021-10-13 17:10:17 -07:00
ghost
7f948465a4 Added a missing call to commit_cargo_ship_losses when committing mission results, fixing a problem which caused lost ground units on sinked cargo ships to not register. 2021-10-13 17:04:49 -07:00
ghost
a24ab63fc7 Changed "range" to "max_range" on several aircraft .yaml files since that is the key which is actually evaluated in the code. 2021-10-13 17:03:59 -07:00
MetalStormGhost
643718be23 Two Marianas Guam campaigns (#1652)
This PR contains two new campaigns for the Marianas terrain, depicting capture of the island of Guam. The first has BLUFOR start after landing at Agat and requires a carrier/LHA capable BLUFOR faction, because there are no land based airbases captured initially. The second has about half of the island already in control, enabling BLUFOR land based aircraft to operate from Antonio B Won Pat (and can also be used by WWII factions). Both campaigns support inversion.

Credit to Dank Williams, the campaigns were heavily inspired by his Marianas insurgency campaign and contain some ground units placed by him, used with permission of course.

They are by no means historical and contain a relatively large number of FOBs compared to only having two airfields. The routes zig-zag a bit since space is limited on the island and I had to place the FOBs far enough from each other to clear the capture zone radius.

The two other airfields on Guam, Orote and Andersen Northwest Field, have FARPs, enabling helicopter operations as well as rearming and refueling for player fixed wing flights (but no mission starts or AI takeoffs).

Included are also two WWII factions which don't require the WWII asset pack. The "Japanese" faction consists of German/Russian equipment with stock Japanese liveries.
2021-10-13 17:01:54 -07:00
C. Perreau
d4d6ee3d26 Merge pull request #1645 from MetalStormGhost/mi24_hind_campaign_squadrons
Changed the Mi-24 squadrons of 2 campaigns
2021-10-12 22:29:57 +02:00
Khopa
4399e10cef SA-5 support 🚀 2021-10-12 22:26:59 +02:00
ghost
519f0542dd Changed the Mi-24 squadrons of 2 campaigns from:
- Mi-24P Hind-F
        - Mi-24P Hind-E
to:
        - Mi-24P Hind-F
        - Mi-24V Hind-E
fixing a problem which caused Mi-24V no not show up in the campaign.
2021-10-08 20:42:28 +03:00
Khopa
9456fd77d1 Updated Mozdok to Maykop campaign to v9 2021-09-21 22:27:50 +02:00
Khopa
37874d82f2 Pydcs : Switched to the pydcs version from the official repo 2021-09-21 21:24:44 +02:00
Khopa
9f2a9bf458 pydcs version : Use temporary version with mosquito flyable fix 2021-09-19 23:30:57 +02:00
Khopa
43a8897c28 Added MosquitoFBMkVI support (use campaign operation dynamo) 2021-09-19 02:05:08 +02:00
Khopa
6980f96697 JAS-39 mod : removed reference to a weapon class that was removed in last update 2021-09-18 18:51:54 +02:00
Khopa
4ffb294d65 Update pydcs version 2021-09-18 18:01:17 +02:00
C. Perreau
ae46631b2b Merge pull request #1622 from teamMOYA/banners_icons
Banners and icons
2021-09-18 17:49:07 +02:00
teamMOYA
c42bdd256f fix wrong extension 2021-09-18 15:32:42 +02:00
teamMOYA
8990e0c1ff leopard-2A4 banner fix 2021-09-18 15:27:09 +02:00
teamMOYA
f26452c07d vehicle banners 2021-09-18 15:10:44 +02:00
teamMOYA
89789f16d2 f-86 icon fix 2021-09-18 15:09:05 +02:00
teamMOYA
3bb4c9c29a aircrafts banners 2021-09-16 22:26:17 +02:00
teamMOYA
3b8e392395 aircrafts icons 2021-09-16 22:24:47 +02:00
Magnus Wolffelt
3e6d63e8f7 Fix random heading function, randomize wind better (#1619)
* Fix random heading function, randomize wind better

* Use 359 as max default for random heading, for uniform distribution
2021-09-16 12:29:00 +02:00
Khopa
90ca619839 Load red static group to define helipads for farp 2021-09-14 22:22:46 +02:00
Starfire13
8c2aa78b9f Add missing data to Frenchpack technicals. 2021-09-10 15:34:57 -07:00
Starfire13
e544b2d1ba Mirage Squadron Mission Types Fix (#1607)
* Update ADA_EscadronDeChasse_1-30_Alsace.yaml

* Update ADA_EscadronDeChasse_2-5_IleDeFrance.yaml

* Update ADA_EscadronDeChasse_1-12_Cambresis.yaml
2021-09-09 09:52:26 -04:00
C. Perreau
82f5287282 Merge pull request #1183 from dcs-liberation/helipads
[WIP] Add possibility to add helipads to FOB control points
2021-09-08 22:54:05 +02:00
C. Perreau
589a353f02 Merge pull request #1603 from teamMOYA/bugfix/helicopter_carrier-Type_071
fix for Type_071 helicopter carrier
2021-09-08 22:47:37 +02:00
Khopa
e84e36fd22 Merge remote-tracking branch 'khopa/develop' into helipads
# Conflicts:
#	changelog.md
2021-09-08 21:56:45 +02:00
dependabot[bot]
a4b03c5cfe Bump pillow from 8.2.0 to 8.3.2
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.2.0 to 8.3.2.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.2.0...8.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-07 20:00:45 -07:00
teamMOYA
6aee4c2ec4 fix for Type_071 helicopter carrier
fixed bad name for Type_071 helicopter carrier
2021-09-07 11:59:36 +02:00
Starfire13
65abef7979 Update squadrondefgenerator.py 2021-09-07 02:37:25 -07:00
Dan Albert
45b52f4dea Remove auto-loss on front line for skipped turns. 2021-09-05 21:19:36 -07:00
Dan Albert
18336f58d3 Minor cleanup of notification system. 2021-09-05 21:15:32 -07:00
Dan Albert
12ad4fbf63 Note the FC3 laser codes in the changelog. 2021-09-05 02:13:13 -07:00
MetalStormGhost
b1fee9fe56 Add an option to use FC3-compatible laser codes.
FC3 aircraft don't have laser codes like all the other aircraft do, they just use 1113.
2021-09-05 02:10:24 -07:00
Dan Albert
2a6f250706 Fix transcription error in Abu Dhabi. 2021-09-04 14:20:29 -07:00
Dan Albert
ab2bb6814e Clean up aircraft allocation and procurement.
This also does improve the over-purchase problems, though I can't spot
the behavior change that's causing that. Presumably the old
implementation had a bug I can't spot and in rewriting it I solved the
problem...

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1582
2021-09-03 17:08:32 -07:00
Dan Albert
94fb0d8c66 Don't create squadrons for removed bases. 2021-09-03 15:25:34 -07:00
Dan Albert
a192e4c872 Allow showing the enemy aircraft inventory. 2021-09-03 13:56:03 -07:00
Dan Albert
99acd52e89 Increase some range estimates.
These are still fairly pessimistic because the AI loves afterburner, but
less so.
2021-09-03 13:33:15 -07:00
Dan Albert
a1ee9d7476 Add more aircraft range estimates. 2021-09-03 13:23:23 -07:00
Dan Albert
757363e372 Fix JSON -> YAML translation error in Black Sea. 2021-09-03 13:14:38 -07:00
Dan Albert
7d0b3a096d Update Abu Dhabi. 2021-09-03 13:14:16 -07:00
Starfire13
24a0211d8c Update naming.py 2021-09-02 04:06:44 -07:00
Dan Albert
2c8f960696 Prevent creating empty ferry packages.
An empty squadron or a fully-assigned squadron won't have anything to
assign to the ferry mission.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1588
2021-09-01 19:22:37 -07:00
Dan Albert
16d397db1c Fix unit info menus for aircraft.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1586
2021-09-01 19:22:37 -07:00
Dan Albert
9c3171f1ce Sort the animal names list.
Make it easier to figure out what's already there.
2021-09-01 18:01:53 -07:00
Dan Albert
8a60fa5c83 Fix errors when changing task or aircraft type.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1587
2021-09-01 17:14:51 -07:00
Magnus Wolffelt
15ce48e712 Arm the ferry viper :) (#1584) 2021-09-01 21:56:11 +02:00
Dan Albert
c252fd6a77 Add a ferry loadout for the viper. 2021-08-31 23:13:02 -07:00
Dan Albert
90a8bb63dc Fix AI landing behavior.
The landing waypoints need the airdrome_id field set to actually
associate with the airfield. Without this ferry flights will take off
and immediately land at their departure airfield.
2021-08-31 23:06:20 -07:00
Dan Albert
1a4be911c0 Implement ferry flights for squadron transfers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-31 23:03:27 -07:00
Dan Albert
f9f0b429b6 Set the flight airfields based on the Squadron. 2021-08-31 22:14:00 -07:00
Dan Albert
a404792bd2 Reset the max flight size when changing squadrons. 2021-08-31 22:10:23 -07:00
Dan Albert
e0047b1bbc Move the start type requirement into ControlPoint. 2021-08-31 22:09:39 -07:00
Dan Albert
18eb661e84 Merge branch 'squadron-relocation' into develop 2021-08-29 16:22:02 -07:00
Dan Albert
c2e5cba061 Implement manual squadron transfers.
Lightly tested but seems to work fine.

https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-29 16:21:54 -07:00
Dan Albert
cd15de6d42 Add an uncaught exception handler. 2021-08-29 16:21:54 -07:00
Mustang-25
60a5ee42fe Adds Most Default USN F-14A & B Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
46e2d8c1f9 Adds All Default USAF F-15E Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
824745c11d Adds All Default A-10C I & II Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
33709b0558 Adds All Default USAF F-15C Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
aac91c15d9 Adds AEW&C Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
67405e4af5 Adds Tanker Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
41aa743947 Adds all default USAF Viper Squadrons 2021-08-29 15:26:44 -07:00
Mustang-25
7aca108ef5 Adds Russian VVS Mig-29S Squadrons 2021-08-29 15:26:44 -07:00
Dan Albert
380d6bf47a Fix weird wrong default campaign field bug.
I tried fixing this using setField after registering it, but it does
nothing. I suspect this is because the page hasn't been registered with
the wizard yet so it's setting the field for the wrong wizard.
2021-08-29 02:17:10 -07:00
Dan Albert
8fea8e7b47 Move squadron end-turn behavior into the squadron. 2021-08-28 18:03:33 -07:00
Dan Albert
469b1e5efe Reimplement aircraft retreats for captured bases. 2021-08-28 18:02:11 -07:00
Dan Albert
5fae178081 Reduce squadron location bookkeeping. 2021-08-28 17:59:56 -07:00
Dan Albert
4715773bba Store the owning coalition in ControlPoint.
This is needed fairly often, and we have a lot of Game being passed
around to ControlPoint methods specifically to support this. Just store
the owning Coalition directly in the ControlPoint to clean up. I haven't
cleaned up *every* API here, but did that aircraft allocations as an
example.
2021-08-28 16:40:55 -07:00
Dan Albert
74577752e0 Update pydcs for the Viper CBU-105. 2021-08-26 23:59:29 -07:00
Magnus Wolffelt
056e6b28da Simplify and rename TACAN registry reserve function (#1559)
* Simplify and rename TACAN registry reserve function

* Remove unused tacan error
2021-08-18 14:46:55 +02:00
Nils Heiden
0cb10e4224 Make the Mi-24 LHA capable. 2021-08-17 17:00:16 -07:00
Magnus Wolffelt
34ff5fbc6a Allow operation.py to ignore TACAN rules 2021-08-18 00:06:34 +02:00
Magnus Wolffelt
f63a35b1fa Use TACAN channels more selectively, use pytest (#1554)
* Use TACAN channels more selectively

* Increase tacan range to 126

* Use pytest and add workflow

* Skip faction tests due to outdated test data

* Run mypy on tests directory also

* Use iterators for bands AND usages, add tests
2021-08-17 23:14:54 +02:00
Khopa
57e78d5c55 Added squadrons for Syria & Israel 2021-08-16 19:47:40 +02:00
Khopa
2ee604d2a4 Fixed : Missing icons for E-2C Hawkeye 2021-08-16 19:47:38 +02:00
Khopa
a7c3a0f7fd Added squadrons for Syria & Israel 2021-08-16 19:47:00 +02:00
Khopa
5445c41f81 Fixed : Missing icons for E-2C Hawkeye 2021-08-16 19:45:43 +02:00
Khopa
e1e1e471a1 Added comment on total_aircraft_parking 2021-08-16 19:37:21 +02:00
Khopa
2e3b43b28b Allow both FARP SINGLE_HELIPAD, and Invisible FARP in campaigns files. 2021-08-16 13:27:41 +02:00
Khopa
fe118d81db Fixed error introduced during last merge. (Missing import) 2021-08-16 13:04:58 +02:00
Khopa
d3b2a751e2 Golan heights campaign migrated to v 9.0 2021-08-16 12:58:26 +02:00
Khopa
b856a84adc Ran black to fix lint issue. 2021-08-16 12:23:51 +02:00
C. Perreau
707d13a65c Merge branch 'develop' into helipads 2021-08-16 12:20:43 +02:00
Magnus Wolffelt
7417429fdb Merge pull request #1552 from dcs-liberation/better-tarcap-racetracks-2
Better TARCAP racetracks
2021-08-16 11:52:50 +02:00
Magnus Wolffelt
8f5b6f58d1 Add rmul to distance and speeds, so that reversed operands work 2021-08-16 10:38:26 +02:00
Magnus Wolffelt
08365bcbda Simplify and enhance tarcap flight planning 2021-08-16 10:37:44 +02:00
Dan Albert
4423288a53 Assign aircraft to squadrons rather than bases.
This is needed to support the upcoming squadron transfers, since
squadrons need to bring their aircraft with them.

https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-15 17:42:56 -07:00
Dan Albert
99274133ff Add range estimates for the F-15s. 2021-08-14 21:51:25 -07:00
Dan Albert
55c6728c42 Update Black Sea to campaign version 9.0. 2021-08-14 21:51:01 -07:00
Dan Albert
357487b767 Remove random purchase pessimization.
Aircraft variety is now handled by explicit squadron selection, so no
longer needed.
2021-08-14 21:46:27 -07:00
Dan Albert
9768fb3493 Add base selection UI to startup.
https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-14 21:46:27 -07:00
Dan Albert
90ad1f4a61 Change squadrons to operate out of a single base.
https://github.com/dcs-liberation/dcs_liberation/issues/1145

Currently this is fixed at the start of the campaign. The squadron
locations are defined by the campaign file.

Follow up work:

* Track aircraft ownership per-squadron rather than per-airbase.
* UI for relocating squadrons.
* Ferry missions for squadrons that are relocating.
* Auto-relocation (probably only for retreat handling).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1138
2021-08-14 21:46:27 -07:00
Dan Albert
51e056a765 Convert Black Sea to yaml. 2021-08-14 20:15:05 -07:00
Dan Albert
8e1b33bc51 Add range info for some Russian aircraft. 2021-08-14 20:12:33 -07:00
Dan Albert
d2e22ef8bf More campaign loader cleanup. 2021-08-14 13:39:27 -07:00
Magnus Wolffelt
103675e5bb Make some paths cross-platform compatible (#1543)
* Make some paths cross-platform compatible

* Fix lint error for Path
2021-08-14 21:45:23 +02:00
RndName
b5b0d82a1a Open all files with utf-8 encoding
- will not be used for binary read/writes (rb,wb)!
- prevents a bug where units with special characters in the unit name can not be tracked anymore as there will be a name mismatch due to wrong encoding
2021-08-14 13:10:43 +02:00
Magnus Wolffelt
c80d0e5378 Raise helo AGL to 60 m for ingress, egress, cap, escort (#1542) 2021-08-14 00:54:48 +02:00
RndName
adeebbc422 Enable sell button according to available aircraft
also added a tooltip which gives the user the hint that maybe the aircraft is assigned to mission and therefore the button is disabled
2021-08-12 22:06:48 +02:00
RndName
ee8e8d4a9a Fix selling of units not visible
allow pending_deliveries to become negative again but still delete the delivery when the amount of a specific unit_type comes to exactly 0 to prevent emtpy group sizes
2021-08-12 19:42:40 +02:00
RndName
bc5ffdec8e EWR heading towards conflict
implements #1530
2021-08-11 20:58:54 +02:00
Dan Albert
88d52003b3 Allow using yaml for campaign definitions.
JSON continues to be supported as well. No additional work needed here,
just needed to allow both.
2021-08-10 18:21:52 -07:00
Dan Albert
6c7b62b8b1 Move MizCampaignLoader out of conflicttheater.py.
Also removes the useless `size` and `importance` fields from
`ControlPoint`.
2021-08-10 18:21:26 -07:00
Magnus Wolffelt
37491ceffb Stop using Su-34 for CAP missions, update changelog 2021-08-10 13:38:35 +02:00
Magnus Wolffelt
b3dedbdf75 Update changelog with sam site heading fix 2021-08-10 13:32:58 +02:00
Magnus Wolffelt
42d09292b7 Update changelog with Marianas fix for 4.1.1 2021-08-10 13:32:12 +02:00
Dan Albert
c80293d9e0 Add a bug template for mod support requests. 2021-08-08 12:58:04 -07:00
RndName
b31c09c4ff 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:16:39 +02:00
Dan Albert
91daabc9d2 Fixup auto-assignable tasks when limits change.
The air wing config was fixing the main `mission_types` field, but the
`auto_assignable_mission_types` property had already been set. Update
that field whenever the `mission_types` are changed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1515
2021-08-07 14:04:32 -07:00
Kangwook Lee
def5454e5f Add battle damage assessment option 2021-08-07 13:11:10 -07:00
Kangwook Lee
74e6226d13 Fix typo 2021-08-07 13:03:13 -07:00
Kangwook Lee
72d83e2fe4 Reorganize setting fields to match UI 2021-08-07 13:00:22 -07:00
Dan Albert
85ccbf34c7 Add fuel esimtations for the Viper. 2021-08-06 19:24:07 -07:00
Khopa
5e715daded Changed helipad generation structure as to not impact "Game" object, as suggested by Dan. 2021-08-07 01:05:57 +02:00
Khopa
5412487178 Handle another error case in generate_at_cp_helipad + align helos heading with their slot 2021-08-07 00:38:12 +02:00
Khopa
c4937e95e9 Refactored the helipad generation code in a dedicated method "_generate_at_cp_helipad" + better error handling + removed useless temp variables 2021-08-07 00:16:07 +02:00
Khopa
4f53e2beea Fixed another minor issue with the PR 2021-08-07 00:12:55 +02:00
Khopa
9ea1edf9db Applied minor requested changes 2021-08-06 23:55:58 +02:00
Khopa
ce1c416b20 Revert version bump for campaign that do not use helipads 2021-08-06 23:28:36 +02:00
Magnus Wolffelt
fdbc3c55c7 Add weather changes to changelog (#1513)
Co-authored-by: Magnus Wolffelt <magnus.wolffelt@avanza.se>
2021-08-06 18:17:46 +02:00
Magnus Wolffelt
71559154a8 Cherry-pick cap/helo changelog from 4.x (#1512)
* Changelog updates for 4.x.

Regarding patrol speeds and helo fix.

* Update changelog for 4.x

BAI missions are actually planned at low altitude. The problem remaining is that they have join/hold/split waypoints, which makes the flight times _incredibly_ long for these slow movers.
2021-08-06 18:01:24 +02:00
Dan Albert
07f8a203ea Remove abandoned campaigns. 2021-08-05 19:32:52 -07:00
RndName
b67fd16081 tweak the airlift procurement
- only buy airlift capable aircraft if there is one friendly cp without a factory which can only be reached via airlift
- prevent that an airlift procurement gets fulfilled at a different cp than the requesting one. this ensures that the cp also has a factory to produce ground units which can then be transported
- fixes an infinite buy loop if the fulfilling cp has no factory and the requesting cp has no space for airlift
- have always 2 reserve transport planes at the biggest CP
2021-08-05 22:09:53 +02:00
Magnus Wolffelt
9792c17c69 Make arid theaters more likely to have clouds, and tweak others sliiightly (#1501) 2021-08-05 13:54:42 +02:00
Magnus Wolffelt
8488a5ec1a Use AGL altitude for helo hold (#1499) 2021-08-05 13:52:33 +02:00
Dan Albert
ff571db494 Update Syria Full and Humble Helper campaigns.
https://github.com/dcs-liberation/dcs_liberation/issues/1494
https://github.com/dcs-liberation/dcs_liberation/issues/1497
2021-08-04 23:33:22 -07:00
Kangwook Lee
aaa932f725 Update freq list for ARC-210 2021-08-04 20:40:47 -07:00
Kangwook Lee
c58ecd96f0 Make Radio dataclass store list of ranges 2021-08-04 20:40:47 -07:00
Kangwook Lee
8608b73009 Wrap lines for NotesPage 2021-08-03 17:53:01 -07:00
Magnus Wolffelt
30801dff9f 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:22:55 +02:00
Khopa
912311ad55 changelog update 2021-08-03 01:32:10 +02:00
Khopa
14615f9976 Bump campaign miz file version for helipad support 2021-08-03 01:10:00 +02:00
Khopa
9121cf7ecb Fixed icons not appearing in UI for Mi-24V, Tu-95 and Tu-142 2021-08-03 01:05:27 +02:00
Khopa
a831800a05 Fixed mypy errors 😒 2021-08-03 01:00:56 +02:00
Khopa
399c739fd7 Fixed mypy errors 2021-08-03 00:51:47 +02:00
Khopa
63f687a20e Fixed mypy errors in gen 2021-08-03 00:42:49 +02:00
Khopa
fbd0198771 Fixed mypy errors 2021-08-03 00:37:26 +02:00
Khopa
00e85280fd Golan heights campaign updated with helipads. 2021-08-03 00:29:06 +02:00
Khopa
5b37698d36 Fixed mypy errors 2021-08-03 00:28:22 +02:00
Khopa
483640b0c6 Fixed errors after merge on helipad feature. 2021-08-03 00:15:14 +02:00
Khopa
1e96aad484 Fixed icons not appearing in UI for Mi-24V, Tu-95 and Tu-142 2021-08-02 23:51:56 +02:00
Khopa
b88e0e8a52 Merge branch 'develop' into helipads
# Conflicts:
#	resources/squadrons/A20/no_107_squadron_raf.yaml
#	resources/squadrons/SpitfireLFMkIX/no_145_squadron_raf.yaml
#	resources/squadrons/SpitfireLFMkIX/no_16_squadron_raf.yaml
2021-08-02 22:05:36 +02:00
Khopa
6028009aac Added RAF clipped wing spitfire squadron 2021-08-02 22:00:17 +02:00
Khopa
9aa9b72557 Fixed issue with previously added squadrons 2021-08-02 21:57:50 +02:00
Khopa
8c023c5727 Added Ju-88A4 squadron 2021-08-02 21:57:27 +02:00
Khopa
d9edaede89 Added FW-190D9 squadron 2021-08-02 21:57:10 +02:00
Khopa
0220b37c2d Added FW-190A8 squadron 2021-08-02 21:57:00 +02:00
Khopa
f2d2d1cc8d Added Bf-109K4 squadron 2021-08-02 21:56:47 +02:00
Khopa
437eeef9a0 Fixed icon not showing for Ju 88 A-4 2021-08-02 21:15:22 +02:00
Khopa
8e4f291389 Added Spitfire LF Mk IX's squadrons for RAF 2021-08-02 21:08:07 +02:00
Khopa
8f27222b07 Added A-20G squadron for RAF 2021-08-02 21:08:05 +02:00
Khopa
9e05991908 Fixed issue with livery in custom M2000-C squadron 2021-08-02 21:08:05 +02:00
Khopa
1c76bf93a2 Added Spitfire LF Mk IX's squadrons for RAF 2021-08-02 20:00:14 +02:00
Khopa
d5cedee6c5 Added A-20G squadron for RAF 2021-08-02 19:59:13 +02:00
Khopa
eb1b7176a6 Fixed issue with livery in custom M2000-C squadron 2021-08-02 19:46:07 +02:00
Khopa
71143536bf Merge branch 'develop' into helipads
# Conflicts:
#	game/game.py
#	game/operation/operation.py
#	game/theater/conflicttheater.py
#	game/theater/controlpoint.py
#	gen/groundobjectsgen.py
#	resources/campaigns/golan_heights_lite.miz
2021-08-02 19:34:05 +02:00
Khopa
f2608cecd5 Campaign Update 8.0 : operation_dynamo.miz, updated mission targets ids 2021-08-02 19:24:34 +02:00
Khopa
c95d5464d8 Campaign Update 8.0 : golan_heights_lite.miz, updated mission targets ids 2021-08-02 19:21:09 +02:00
Khopa
0ac7466a81 Campaign Update 8.0 : caen_to_evreux.miz, updated mission targets ids 2021-08-02 19:15:31 +02:00
Kangwook Lee
77e62d5a54 Fix text foreground color for dark kneeboard 2021-08-01 23:37:10 -07:00
Dan Albert
bef015eb57 Changelog updates for 4.x. 2021-08-01 17:27:01 -07:00
Kangwook Lee
d99d95217f Remove console window 2021-08-01 15:42:14 -07:00
Kangwook Lee
5cbf8db272 Add QLogsWindow 2021-08-01 15:42:14 -07:00
Kangwook Lee
6ee0c7600b Add HookableInMemoryHandler logging handler 2021-08-01 15:42:14 -07:00
Magnus Wolffelt
6621421a6f Tweak max-speed-based patrol altitudes 2021-08-01 15:21:32 -07:00
Dan Albert
edf95ea9fb Dedup purchase requests.
Since the theater commander runs once per campaign action, missions that
do not have aircraft available may be checked more than once a turn.
Without deduping requests this can lead to cases where the AI buys
dozens of tankers on turn 0.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1470
2021-08-01 15:17:43 -07:00
Magnus Wolffelt
a3e3e9046f Estimate preferred patrol altitude based on max speed 2021-08-01 12:15:15 -07:00
RndName
04cdb6fbfc fix for wrong patrol speed 2021-08-01 12:05:28 -07:00
bgreman
8c7e56a2bd Update skynet plugin (#1478) 2021-08-01 11:36:37 -04:00
Dan Albert
3e08574fbe Reduce the size of kneeboard non-table text.
The bullseye and weather data were looking a bit more like headers than
content.
2021-07-31 16:54:00 -07:00
Dan Albert
73ba7933da Assign laser codes to players with TGPs.
This doesn't configure the bombs in the mission or anything yet; it only
pre-assigns a laser code for the player to use if they choose to.
2021-07-31 16:49:58 -07:00
bgreman
fc45c3b98c Fixes an unlikely bug with JTAC laser code allocation (#1477)
* Fixes an unlikely bug with JTAC laser code allocation, allows for future allocation of codes to a/c with TGPs

* Fixing typing issues

* Changelog
2021-07-31 18:44:16 -04:00
Mustang-25
0d6f420f97 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
2021-07-31 14:57:49 -07:00
Dan Albert
bef85963a6 Update USN 2005 faction.
https://github.com/dcs-liberation/dcs_liberation/issues/1427
2021-07-31 14:47:13 -07:00
Dan Albert
3be57efa97 Campaign updates from Starfire. 2021-07-31 14:40:38 -07:00
Dan Albert
981d8510c2 Ack new campaign version for unaffected maps. 2021-07-31 14:37:49 -07:00
Dan Albert
5d8f655243 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.
2021-07-31 14:23:46 -07:00
Dan Albert
0cb41469ab Update pydcs to latest master.
https://github.com/dcs-liberation/dcs_liberation/issues/1448
2021-07-31 13:54:17 -07:00
Dan Albert
971d7e730a Add ALIC codes for the tin shield and NASAMS.
https://github.com/dcs-liberation/dcs_liberation/issues/1448
2021-07-31 13:53:04 -07:00
Dan Albert
06f8b9b817 Update the F-16 DEAD loadout to use JSOWs.
https://github.com/dcs-liberation/dcs_liberation/issues/1448
2021-07-31 13:48:02 -07:00
Dan Albert
db51384b63 Add auto-generation warning to files. 2021-07-31 13:40:04 -07:00
RndName
ac088ea692 improved the validation for planned transfers
- instead of only checking if the transfer destination was captured it now checks if there is a valid route between origin and destination. This also ensures that there will be a check if the current position or next_stop was captured and therefore the transfer should be disbanded.
- disband uncompletable transfer before planning or performing (also when user cheated a base capture)
2021-07-31 13:27:48 -07:00
Dan Albert
2a5793e8ce Fix display of AEW&C channel on the kneeboard. 2021-07-31 13:04:42 -07:00
Dan Albert
6c60ff88a3 Fix intra_flight_channel filter syntax. 2021-07-31 13:00:14 -07:00
Dan Albert
8d68c10905 Set up JTAC channel assignments. 2021-07-31 13:00:14 -07:00
bgreman
119d4b9514 Vendor ruler (#1476)
* Fixes ruler module integrity issues by bringing module into source

* Changing ruler stylesheet to vaguely match DCS theme in Liberation

* Changelog
2021-07-31 15:43:48 -04:00
Kangwook Lee (이강욱)
0370aa8df5 Add AFAC task to JTAC unit.
This causes the JTAC unit that's used for autolase to also work as
a FAC over the radio.
2021-07-31 12:37:18 -07:00
Kangwook Lee (이강욱)
6034c899d3 Add flight intra radio channel to mission briefing (#1475) 2021-07-31 12:34:49 -07:00
bgreman
d2fe11ba6f Updates Gripen support, fixes missing DEAD legacy loadouts. (#1469) 2021-07-31 12:07:57 -04:00
bgreman
58c96e1329 Adds more details to frontline movement logging (#1465)
* adds more detailed logging for frontline movement

* Fixing attribute name

* Fixing if, adding else
2021-07-31 12:05:22 -04:00
Magnus Wolffelt
4c51b4b822 Seasonal weather types per theater.
Adjusts the weather conditions per theater and  per season.
2021-07-31 03:57:23 -07:00
C. Perreau
f5dea4935c Merge pull request #1467 from Mustang-25/develop
Increment Campaigns to v8.0
2021-07-31 00:13:45 +02:00
Mustang-25
0117ab8aa4 Increment to Campaign v8.0 2021-07-28 10:37:14 -07:00
Mustang-25
a5ade0c41a Increment to Campaign v8.0 2021-07-28 10:36:43 -07:00
Mustang-25
4df12ae675 Increment to Campaign v8.0 2021-07-28 10:36:17 -07:00
Mustang-25
274a41f052 Increment to Campaign v8.0 2021-07-28 10:35:12 -07:00
Mustang-25
3670c8f879 Increment to Campaign v8.0 2021-07-28 10:34:28 -07:00
Mustang-25
e88bb442f3 Increment to Campaign v8.0 2021-07-28 10:32:47 -07:00
Mustang-25
a0d1bf4b5c Merge branch 'dcs-liberation:develop' into develop 2021-07-28 10:31:31 -07:00
Khopa
32f05dccd9 Added Tin Shield EWR support 2021-07-28 00:15:00 +02:00
Khopa
4aac2d2b7b Added NASAMS support 2021-07-27 23:43:00 +02:00
Mustang-25
e5a40bfb69 Merge branch 'dcs-liberation:develop' into develop 2021-07-27 14:07:41 -07:00
C. Perreau
741ae36d4c Merge pull request #1459 from RndName/fix-empty-transfer
fix generation of empty transfer during cp capture
2021-07-27 22:54:51 +02:00
RndName
67fa4a8910 fix generation of empty transfer during cp capture
when a cp capture happens and the next cp has pending unit deliveries then they will be redeployed to the newly captured cp. The redeploy was drecreasing the num of pending unit deliveries for the old cp but was not removing them completly from the dict when all were removed
2021-07-25 15:24:16 +02:00
Dan Albert
80bf3c97b2 Remove the SA-10 from Syria 2011.
They didn't get this until a few years later. This was a stand-in for
the SA-5 that DCS doesn't have, but the SA-10 is so much more capable
that it's not a good replacement.
2021-07-24 15:10:22 -07:00
Dan Albert
9f23cb35a9 Update pydcs to latest master. 2021-07-24 15:09:35 -07:00
RndName
458de17b8f adopt sam heading to new heading class 2021-07-23 15:57:03 -07:00
RndName
dd50ee92a9 calculate heading to center of conflict for sams 2021-07-23 15:57:03 -07:00
bgreman
1094085872 Fixes #1449 and updates another area where the Heading class can apply (#1451) 2021-07-22 15:30:46 -04:00
Dan Albert
edbd3de4a4 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.
2021-07-21 17:10:29 -07:00
bgreman
91d430085e Addresses #478, adding a heading class to represent headings and angles (#1387)
* Addresses #478, adding a heading class to represent headings and angles
Removed some unused code

* Fixing bad merge

* Formatting

* Fixing type issues and other merge resolution misses
2021-07-21 10:29:37 -04:00
Dan Albert
fab550157a Add a per-aircraft weapon linter.
Run with `main.py lint-weapons $AIRCRAFT` to show all the weapons the
aircraft can carry that do not have data.
2021-07-19 20:07:58 -07:00
Dan Albert
5e2ed04d72 Add weapon data for the CBU-87 and CBU-97. 2021-07-19 16:53:49 -07:00
Dan Albert
e87aa83666 Add CLI generator options for date restrictions. 2021-07-19 16:27:20 -07:00
Dan Albert
c9b6b5d4a8 Correct changelog. 2021-07-18 19:38:55 -07:00
Dan Albert
ce01ad2083 Default to aircraft at only appropriate bases. 2021-07-18 17:12:34 -07:00
Dan Albert
0eb8ec70d9 Make opfor airwing configurable. 2021-07-18 16:09:20 -07:00
Dan Albert
270f87f193 Add per-aircraft tabs to air wing configuration. 2021-07-18 15:49:58 -07:00
Dan Albert
c2951e5e41 Increase minimum hold distance.
The previous values were far too optimistic for a non-AB climb to hold
altitude, especially for the AI.
2021-07-18 14:52:12 -07:00
Dan Albert
e22e8669e1 Add fallback locations for join zones.
It's rare with the current 5NM buffer around the origin, but if we use
the hold distance as the buffer like we maybe should it's possible for
the preferred join locations to fall entirely within the home zone. In
that case, fall back to a location within the max-turn-zone that's
outside the home zone and is nearest the IP.
2021-07-18 14:52:12 -07:00
Dan Albert
2580fe6b79 Update the changelog. 2021-07-17 19:53:16 -07:00
Dan Albert
c11c6f40d5 Add minimum fuel per waypoint on the kneeboard. 2021-07-17 19:51:55 -07:00
Dan Albert
3c90a92641 Add fuel consumption data for the Hornet.
Will be used to calculate bingo and min remaining fuel for the
kneeboard.
2021-07-17 18:23:20 -07:00
Dan Albert
4c0a97e62f Log a warning for unknown max ranges. 2021-07-17 17:27:40 -07:00
Dan Albert
0a57bb5029 Increase airfield distance in Battle of Abu Dhabi.
Removes some of the low capacity airfields from the campaign now that
missions can plan longer ranges if needed.

This removes Khasab, Bandar Lengeh, and Qeshm from the blue side, so
blue no longer has any airfields on the peninsula.

The CVN has moved quite a ways west to make it a good platform for
attacking the area around Dubai, and to prevent it from being the
primary mission source (with a 90 aircraft limit, a *lot* of missions
can get planned there before other airbases will be used).

The LHA moves to near where the CVN was, making it a good platform for
early game missions. Once the LHA's 20 aircraft limit is exhausted, Kish
and Bandar Abbas will be the primary airfields early game. Bandar Abbas
is still close enough to source Hornet and Viper missions to most of the
area around Dubai. It's unable to reach Lar with those aircraft, but
Kish and the CVN can (as can captured airfields).
2021-07-17 16:34:13 -07:00
Dan Albert
c65ac5a7cf Move mission range data into the aircraft type.
The doctrine/task limits were capturing a reasonable average for the
era, but it did a bad job for cases like the Harrier vs the Hornet,
which perform similar missions but have drastically different max
ranges. It also forced us into limiting CAS missions (even those flown
by long range aircraft like the A-10) to 50nm since helicopters could
commonly be fragged to them.

This should allow us to design campaigns without needing airfields to be
a max of ~50-100nm apart.
2021-07-17 16:34:13 -07:00
Dan Albert
04a8040292 Prevent carriers from claiming most TGOs.
The naval CP generators will only spawn ships, so if any of the other
TGO types were closest to the CV or LHA they just would not be
generated.
2021-07-17 16:34:13 -07:00
Dan Albert
adab00bc0e Update changelog. 2021-07-17 14:31:14 -07:00
Dan Albert
9bb8e00c3d Allow configuration of the air wing at game start.
After completing the new game wizard but before initializing turn 0,
open a dialog to allow the player to customize their air wing. With this
they can remove squadrons from the game, rename them, add players, or
change allowed mission types. *Adding* squadrons is not currently
supported, nor is changing the squadron's livery (the data in pydcs is
an arbitrary class hierarchy that can't be safely indexed by country).

This only applies to the blue air wing for now.

Future improvements:

* Add squadron button.
* Collapse disable squadrons to declutter?
* Tabs on the side like the settings dialog to group by aircraft type.
* Top tab bar to switch between red and blue air wings.
2021-07-17 14:29:04 -07:00
Dan Albert
f2dc95b86d Fix typo. 2021-07-16 22:43:59 -07:00
Dan Albert
28f98aed88 Migrate pressure to a typed unit. 2021-07-16 22:38:41 -07:00
Dan Albert
d11174da21 Stop cluttering the kneeboard with empty notes. 2021-07-16 22:25:40 -07:00
Dan Albert
8e977f994f Remove LGBs from degraded loadouts without TGPs.
This only takes effect for default loadouts. Custom loadouts set from
the UI will allow LGBs. In the default case there will not be buddy-lase
coordination so we should take iron bombs instead.

Also adds single/double Mk 83 and Mk 82 weapon data to accomodate this.
2021-07-16 18:34:41 -07:00
Dan Albert
11c2d4ab25 Add JDAMs and their fallbacks.
Hornet should be compatible with 1990 campaigns now. Air-to-ground
weapon restrictions are less interesting for AI aircraft so I haven't
covered *all* the variants here (the >2 variants of each carried by the
B1 and such).
2021-07-16 16:23:22 -07:00
Dan Albert
b733e6855b Add SLAM/SLAM-ER weapon data. 2021-07-16 15:48:12 -07:00
Dan Albert
aa3d644f97 Prevent empty cheek stations for the Hornet.
This is a bit of a hack that makes the TGPs fall back to AIM-120s. It
works okay because this only applies to a few cases:

The A-10 gets an empty pylon. That's fine. Maybe later we can add
multiple fallback paths and depth-first-search through them so that that
pylon could carry bombs instead.

The Viper has no replacemnt for that station. The jammer goes on the
other fuselage station, the HTS isn't a replacement, and we don't have
LANTIRN for the Viper. No weapons can be fit to those stations.

What this helps is the Hornet, where any Gulf War scenario ends up with
an empty cheek station because we don't have the NITE HAWK to fall back
to. In this case we can instead fall back through the air-to-air
missiles to fill the station.
2021-07-16 15:27:32 -07:00
Dan Albert
bb46d00f22 Add weapon data for R-77, R-27, and R-24. 2021-07-16 15:22:11 -07:00
Dan Albert
771c74ee75 Fill out weapon data for AIM-9s. 2021-07-16 15:12:49 -07:00
Magnus Wolffelt
04a346678c Add situational temperature and pressure variation.
Now varies by:

* Season
* Theater
* Weather
* Time of day
2021-07-16 14:08:14 -07:00
Dan Albert
e5c0fc92ec Don't reload weapon data if already loaded. 2021-07-16 01:06:31 -07:00
Dan Albert
1b640f40dc Fix map issues when debugging tools are disabled. 2021-07-16 00:27:11 -07:00
Mustang-25
ee77516716 Replace TGP with SPJ for JF-17 CAP/SEAD.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1422.
2021-07-16 00:17:20 -07:00
Dan Albert
82cca0a602 [3/3] Rework hold points. 2021-07-15 23:21:56 -07:00
Dan Albert
d444d716f5 [2/3] Improve join point placement. 2021-07-15 23:18:10 -07:00
Dan Albert
e03d710d53 [1/3] Rework IP placement.
Test cases:

1. Target is not threatened.

   The IP should be placed on a direct heading from the origin to the
   target at the max ingress distance, or very near the origin airfield
   if the airfield is closer to the target than the IP distance.

2. Unthreatened home zone, max IP between origin and target, safe
   locations available for IP.

   The IP should be placed in LAR at the closest point to home.

3. Unthreatened home zone, origin within LAR, safe locations available
   for IP.

   The IP should be placed near the origin airfield to prevent
   backtracking more than needed.

4. Unthreatened home zone, origin entirely nearer the target than LAR,
   safe locations available for IP.

   The IP should be placed in LAR as close as possible to the origin.

5. Threatened home zone, safe locations available for IP.

   The IP should be placed in LAR as close as possible to the origin.

6. No safe IP.

   The IP should be placed in LAR at the point nearest the threat
   boundary.
2021-07-15 23:18:10 -07:00
Mustang-25
b46d44c3a5 Change CAP and SEAD Loadouts
Replaced the TGP with SPJ pod for these roles.
2021-07-15 16:58:14 -07:00
Mustang-25
7a459fd5b8 Merge branch 'dcs-liberation:develop' into develop 2021-07-15 16:55:03 -07:00
Magnus Wolffelt
2b696144e3 Add QNH and temperature to the kneeboard. 2021-07-15 15:34:58 -07:00
RndName
62036a273e allow user to set empty dcs install dir
This will allow expert users to disable the automatic MissionScripting.lua replacement. There are many warnings and errors which have to be ignored to achieve this because DCS Liberation will not work with unmodified MissionScripting.lua
2021-07-15 13:46:59 -07:00
Magnus Wolffelt
d25befabdd Randomize mission temperature and pressure. 2021-07-15 13:34:09 -07:00
Dan Albert
56b17dfbcf Correct behavior for multi-task HTN methods.
Add tasks to the left of the deque, not the right.

Not symptomatic yet since we don't actually have any multi-task methods
currently.
2021-07-14 18:34:33 -07:00
Dan Albert
72c181a399 Fix budget mismatch in the UI.
Much of the UI was using the old budget which wasn't removed from Game
like it should have been when Coaltion was introduced. The UI displayed
(and in some cases pulled from) the starting budget rather than the real
budget.
2021-07-14 17:33:01 -07:00
Dan Albert
b1b60f4286 Add JSOW A and C weapon data and fallbacks.
Both types use JSOW -> Walleye -> Mk 84. The JSOW A should maybe fall
back to some CBU instead, but I think the standoff capability is more
important to preserve than the warhead type.
2021-07-14 01:27:00 -07:00
Dan Albert
7648716199 Make weapon groups explicit and moddable.
The only parts of the old weapon data that worked well (didn't commonly
result in empty pylons) did this implicitly, so make the grouping
explicit.

This also moves the data out of Python and into the resources, which
both makes the data moddable and isolates us from a huge amount of
effort and a save compat break whenever ED changes weapon names.

I didn't auto migrate the old data since the old groups were not
explict and there's no way to infer the grouping. Besides, since most of
the weapons were *not* grouped, the old data did more harm than good in
my experience. I've handled the AIM-120 and AIM-7 for now, but will get
at least all the fox 3 missiles before we ship.
2021-07-14 01:04:03 -07:00
Dan Albert
9177588220 Don't target ammo depots at inactive front lines. 2021-07-13 20:49:31 -07:00
Dan Albert
9bbcee645e Cleanup and document some of Doctrine. 2021-07-13 20:18:30 -07:00
Dan Albert
a7d49b986d Exclude both path endpoints for joins/splits.
Without this the points would often be placed exactly on top of the
origin airfield, when in that case we actually should use the fallback
behavior.
2021-07-13 20:11:09 -07:00
Dan Albert
7c3e08050f Perturb fallback join/split points.
Otherwise they're placed exactly on top of each other, which makes the
map harder to read.
2021-07-13 20:10:29 -07:00
Dan Albert
076df7cf66 Fix placement of fallback split points.
Using the target placed the split in the threatened area.
2021-07-13 20:07:42 -07:00
Dan Albert
415b8c6317 Allow the split point to differ from the join.
This places the split point based on the best path from the IP to home,
rather than the best path from home to the target. The outcome is that
the planner might choose an alternate route out of a threatened area
based on the safest escape from the IP, which is where the aircraft
should be when it releases its weapons, rather than at the target.
That's of course not always perfect since the IP distance is not based
on the carried weapon, but it's a better choice when it matters more
(when carrying standoff weapons attacking a more dangerous target).
2021-07-13 19:59:22 -07:00
Dan Albert
c1d3c93dbb Speed up turn processing.
Run the expensive precondition check (package fulfillment) last.
2021-07-13 18:56:06 -07:00
Dan Albert
8e59c99666 Improve hold point placement for nearby joins. 2021-07-13 18:43:02 -07:00
Dan Albert
dfcd372d2d Remove egress points from most flight plans.
These don't have any function. Remove them and remove the angled attack
heading from the IP.
2021-07-13 18:36:38 -07:00
Dan Albert
f7bbe0fa94 Improve flight plan layout for untheatened IPs.
Try all the nav points between the origin and the target rather than
just the first non-threatened point. This prevents us from using the
fallback behavior for any target that's sufficiently far from the
package airfield.
2021-07-13 18:22:42 -07:00
Dan Albert
a1910f49a8 Color navmesh zones based on threat. 2021-07-13 17:49:10 -07:00
Dan Albert
5f8be5fa91 Fix type checker issue. 2021-07-13 17:08:37 -07:00
Dan Albert
587034ad03 Prioritize ammo depots when appropriate.
The AI will now prioritize targeting ammo depots if the current
deployable enemy forces outnumber the friendly cap by 50% or more.
2021-07-13 17:06:25 -07:00
Dan Albert
9568bc7ea6 Fix inversion of AI management for opfor. 2021-07-13 17:04:49 -07:00
Dan Albert
ccf6b6ef5f Check for available aircraft as task precondition.
This makes it so that the mission planning effects are applied only if
the package can be fulfilled. For example, breakthrough will be used
only if all the BAI missions were fulfilled, not if they will *attempt*
to be fulfilled.
2021-07-13 16:26:15 -07:00
Dan Albert
24f6aff8c8 Reduce mission planning dependence on Game. 2021-07-13 15:20:42 -07:00
Dan Albert
17c19d453b Factor out Coalition from Game. 2021-07-13 14:29:40 -07:00
Dan Albert
4534758c21 Account for planned missions for breakthrough.
Consider BAI missions planned this turn when determining if a control
point is still garrisioned for preventing breakthrough.

This isn't very accurate yet since the HTN isn't checking for aircraft
fulfillment yet, so it might *plan* a mission to kill the garrison, but
there's no way to know if it will be fulfilled.
2021-07-13 13:50:50 -07:00
Dan Albert
c180eb466d Use aggressive stance for similar troop counts.
Bumps the breakthrough requirement to 2x, elimination to 1.5x, and uses
agressive for 0.8-1.5x.
2021-07-12 21:28:00 -07:00
Dan Albert
0a416ab758 Let the TheaterCommander manage front line stance.
This improves the AI behavior by choosing the stances non-randomly:

* Breakthrough will be used if the base is expected to be capturable and
  the coalition outnumbers the enemy by 20%.
* Elimination will be used if the coalition has at least as many units
  as the enemy.
* Defensive will be used if the coalition has at least half as many
  units as the enemy.
* Retreat will be used if the coalition is significantly outnumbers.

This also exposes the option to the player.
2021-07-12 21:12:02 -07:00
Dan Albert
575aca5886 Fix targeting dead BAI targets. 2021-07-12 20:44:19 -07:00
Dan Albert
c0cc5657a7 Attack detecting radars with low priority.
IADS that are in detection range (but not attack range) of missions will
be targeted at very low priority. These will typically only be planned
when no other targets are in range.
2021-07-12 17:33:45 -07:00
Dan Albert
78514b6c2e Only auto-target strike against buildings.
The players can still manually assign strike missions on other target
types since that's sometimes better for player waypoint generation (one
waypoint per unit is nice for SAMs), but it's bad for the AI so by
default we should exclude non-buildings.

This also prevents double targeting of groups, since they might have
been identified by other missions as well.

We already did some of this, but since we were excluding specific TGO
types rather than only allowing building TGOs we were often missing
things (missile sites, coastal defenses, and EWRs, it seems).
2021-07-12 17:04:17 -07:00
Dan Albert
7e4390d743 Improve prioritization of garrison targeting.
Garrison groups should be preferred with the following priority:

1. Groups blocking base capture
2. Groups at bases connected to an active front line
3. Rear guard units

Previously they were being prioritized based on the distance to the
closest friendy control point, which is similar to this but an
aggressively placed carrier could throw it off.
2021-07-12 16:59:49 -07:00
Dan Albert
cd558daf5a 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.
2021-07-12 13:44:49 -07:00
Dan Albert
dda5955121 Improve DEAD mission prioritization.
This alters the DEAD task planning to be the *least* preferred task, but
prevents other tasks from being planned unless they are excepted to be
clear of air defenses first. Even so, missions are a guaranteed success
so those other missions will still get SEAD escorts if there's potential
for a SAM in the area.

This means that air defenses that are not protecting a more useful
target (like a convoy, armor column, building, etc) will no longer be
considered by the mission planner. This isn't *quite* right since we
currently only check the target area for air defenses rather than the
entire flight plan, so there's a chance that we ignore IADS that have
threatened ingress points (though that's mostly solved by the flight
plan layout).

This also is still slightly limited because it's not checking for
aircraft availability at this stage yet, so we may aggressively plan
missions that we should be skipping unless we can guarantee that the
DEAD mission was planned. However, that's not new behavior.
2021-07-12 13:02:23 -07:00
Dan Albert
783ac18222 Replace existing campaign planner with an HTN.
An HTN (https://en.wikipedia.org/wiki/Hierarchical_task_network) is
similar to a decision tree, but it is able to reset to an earlier stage
if a subtask fails and tasks are able to account for the changes in
world state caused by earlier tasks.

Currently this just uses exactly the same strategy as before so we can
prove the system, but it should make it simpler to improve on task
planning.
2021-07-12 13:02:23 -07:00
Dan Albert
81c8052449 Note tracking bug for shapely type annotations. 2021-07-11 14:41:40 -07:00
Dan Albert
6ce02282e7 Correct int/float confusion in Point APIs.
The heading and distance calculations always return floats.
2021-07-11 14:33:46 -07:00
Dan Albert
a19a0b6789 Use Pillow types from typeshed. 2021-07-11 13:53:58 -07:00
Dan Albert
9de08dc83f 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).
2021-07-11 13:37:17 -07:00
Dan Albert
96c7b87ac7 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.
2021-07-09 16:35:03 -07:00
Brock Greman
469dd49def Fixing broken group generation. 2021-07-09 12:35:32 -07:00
Dan Albert
53f6a0b32b Fix some typing in preparation for pydcs types.
Not complete, but progress.
2021-07-08 23:23:05 -07:00
Dan Albert
fb9a0fe833 Flesh out typing information, enforce. 2021-07-07 17:41:29 -07:00
Dan Albert
69c3d41a8a Disallow partially specified generics. 2021-07-07 16:01:20 -07:00
Dan Albert
fc32b98341 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
2021-07-07 15:47:19 -07:00
Dan Albert
299ed88f09 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.
2021-07-07 15:17:05 -07:00
Dan Albert
29753a6aa9 Add (mostly disabled) mypy configs.
We're missing a lot of checking right now. Most of it requires
additional cleanup. For now I've enabled what I could and will follow up
to clean up and enable more checking.
2021-07-07 15:17:05 -07:00
Dan Albert
7983cd8d62 Add documentation for turn processing. 2021-07-07 14:44:38 -07:00
RndName
05fab1f79d correct display of turn statistics 2021-07-07 14:12:20 -07:00
RndName
7229b886e0 replan opfor mission on sell or buy of tgos 2021-07-07 14:12:20 -07:00
Dan Albert
8b70d2674f Note fix for empty convoy groups. 2021-07-05 15:54:23 -07:00
RndName
8ba27cdaea remove completely destroyed units from the convoy 2021-07-05 15:51:34 -07:00
Khopa
1c2411a0fc Added a basic campaign on Mariana Islands theater to try it out. 2021-07-04 19:35:36 +02:00
Khopa
ec88d07ef1 Corrected some bugs preventing marianas campaigns from running 2021-07-04 19:34:58 +02:00
bgreman
aa328d3ef7 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>
2021-07-03 14:51:26 -04:00
Dan Albert
727facfb90 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
2021-07-02 17:33:24 -07:00
Dan Albert
4add853473 Fix the legacy tanker.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1379
2021-07-02 17:18:21 -07:00
RndName
b2db27f9aa 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
2021-07-02 16:46:16 -07:00
RndName
96be6c0efe 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
2021-07-02 16:46:16 -07:00
Dan Albert
3f42f1281d Note the silkworm fix in the changelog. 2021-07-02 16:28:06 -07:00
Mustang-25
bab8384803 Corrected Silkworm launcher name 2021-07-02 16:26:47 -07:00
Mustang-25
ceb77c990b Corrected Silkworm launcher name 2021-07-02 11:45:01 -07:00
Florian
3f65928e9d Remove the randomness from SAM group size. 2021-07-02 01:38:27 -07:00
Dan Albert
4e6659e7e8 4.0.1 -> 4.1.0
This includes new features now.
2021-07-02 01:27:51 -07:00
Chris Seagraves
9e22d4b5df Note TGO tooltip improvement in the changelog. 2021-07-02 01:26:55 -07:00
RndName
357361de3d fixed lua data generation 2021-07-02 01:25:03 -07:00
RndName
de443fa3f0 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
2021-07-02 01:25:03 -07:00
Dan Albert
20839853b7 Minor formatting fix for the changelog. 2021-07-01 20:07:28 -07:00
Chris Seagraves
bc2539b566 Fix for crash when clear weather.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1394
2021-07-01 20:07:01 -07:00
Dan Albert
c89416702d Revert "Revert "Add Cloud Base Altitude to Weather Display (#1371)""
This reverts commit b2dd8c68e1.
2021-07-01 20:07:01 -07:00
Dan Albert
b2dd8c68e1 Revert "Add Cloud Base Altitude to Weather Display (#1371)"
Reverting until
https://github.com/dcs-liberation/dcs_liberation/issues/1394 is
resovled.

This reverts commit f80696b724.
2021-07-01 20:00:08 -07:00
Dan Albert
2ef2eafdd3 Remove debug cruft.
We don't need to print the description of every unit on startup.
2021-07-01 19:37:08 -07:00
Schneefl0cke
568655d503 Add incomes for WW2 villages and camps. 2021-07-01 17:04:03 -07:00
bgreman
9bd6f9ef47 Addresses #478 to clean up the angle summing functionality. (#1386) 2021-06-30 23:58:20 -04:00
bgreman
c8e5cefd36 Increasing time JTAC radio messages stay on the UI. (#1369)
- Target lost or killed: 10s -> 20s
- New target : 10s -> 30s
- Request JTAC Status: 25s -> 60s
2021-06-30 23:55:37 -04:00
bgreman
7ba4077f9f Fixes #240 by making statistics windows axis labels integers (#1370) 2021-06-30 23:50:02 -04:00
Mustang-25
151f8bf329 Update TGP Restriction Dates
TGP dates to more accurately reflect IRL IOC dates.
2021-06-30 19:17:14 -07:00
Chris Seagraves
e94d48c265 Notes to kneeboard (#1375)
Adds global-level kneeboard notes.  Explicit save compatability with 4.0.0
2021-06-30 18:07:53 -04:00
Fryderyk Wysocki
2a5c523afd Update poland_2010.json (#1380)
* Update poland_2010.json

* Adding MiG-29G to PL faction

Poland has bought some MiG-29Gs from unified Germany in the early '90s
2021-06-30 15:30:38 -04:00
Chris Seagraves
f80696b724 Add Cloud Base Altitude to Weather Display (#1371)
Adds tooltip with cloud base altitude to weather panel
2021-06-30 15:22:14 -04:00
Chris Seagraves
5f5b5f69e3 asset reference links 😎 (#1363)
Adds urls to unit info pages that don't have data.
2021-06-30 15:04:06 -04:00
Chris Seagraves
d99f8fef09 Update main.py (#1382) 2021-06-29 18:19:37 -04:00
Khopa
97e59db5e6 Helipads : Support for warm takeoff, use InvisibleFarp rather than Single Helipad. 2021-06-27 19:57:04 +02:00
Khopa
1c813c0e0e Merge remote-tracking branch 'khopa/develop' into helipads 2021-06-27 18:35:24 +02:00
Simon Clark
e39f17b3de Fix begin campaign button on reload. 2021-06-26 22:43:22 +01:00
Dan Albert
0b90b53e09 Add changelog section for 4.0.1. 2021-06-26 14:40:00 -07:00
Dan Albert
847d729ba4 Release 4.0.0. (#1365) 2021-06-26 12:46:26 -07:00
Dan Albert
aa86a6e53b Add the most important feature to the changelog. 2021-06-26 12:33:56 -07:00
Brock Greman
34470336e4 Clarify the impact of non-cold flight starts. 2021-06-26 12:29:17 -07:00
Mustang-25
5a2a89f19e Update Op Mole Cricket 2010 Campaign.
Moved SAM generator at Rosh Pina so it does not spawn units on the runway.
2021-06-26 12:17:27 -07:00
Dan Albert
7eb4df770e Revert accidental change to default pilot limit. 2021-06-26 12:06:18 -07:00
Simon Clark
550bb5fd33 Bump campaign versions. 2021-06-26 19:30:03 +01:00
Chris Seagraves
ffcae66f59 Include control point name in ground object info.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/498
2021-06-26 11:24:12 -07:00
Dan Albert
d2df795ba7 Ack campaign version update.
No scenery targets in this campaign so no work needed.

https://github.com/dcs-liberation/dcs_liberation/issues/1359
2021-06-26 11:19:02 -07:00
Dan Albert
b930e13964 Remove dead campaign.
https://github.com/dcs-liberation/dcs_liberation/issues/1359
2021-06-26 11:18:46 -07:00
Khopa
1b9da9cdd8 Fixed mypy error after merge 2021-06-26 20:00:10 +02:00
Dan Albert
e6bf318cdf Fix save path for new games. 2021-06-26 10:59:58 -07:00
Dan Albert
4cfed08247 Disband unfilled incompletable transfers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1317
2021-06-26 10:54:09 -07:00
Khopa
4460b526cb Golan heights : re-add helipads for testing in helipad branch after merge of develop feature. 2021-06-26 19:27:33 +02:00
Khopa
01e6a87968 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:22:13 +02:00
Khopa
7667a4f8c0 Merge branch 'develop' into helipads
# Conflicts:
#	game/game.py
#	resources/campaigns/golan_heights_lite.miz
2021-06-26 18:00:36 +02:00
Khopa
6fbfb83e6c Fixed duplicates in france 2005 faction 2021-06-26 15:26:33 +02:00
Khopa
123d3e182a Fixed yaml issue causing an issue with Leclerc MBT 2021-06-26 15:16:46 +02:00
Khopa
fd8d16035c Updated campaign : Operation Dynamo for The Channel map 2021-06-26 14:44:16 +02:00
Khopa
1ff45b55d6 Updated campaign : Russia Small, renamed it to "From Mozdok to Maykop" 2021-06-26 13:48:31 +02:00
Khopa
0ce02d7766 Updated campaign : Battle for Golan Heights 2021-06-26 13:27:01 +02:00
Dan Albert
959a13a514 Fix save path cleanup. 2021-06-25 23:21:31 -07:00
Chris Seagraves
b601d713d2 Use directory of current save for open/save-as. 2021-06-25 23:01:49 -07:00
Dan Albert
dc96d8699a Add "Nevada Limited Air" campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1358
2021-06-25 21:34:28 -07:00
Dan Albert
f38cdd8432 Add "Scenic Route" campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1334
2021-06-25 21:28:27 -07:00
Dan Albert
91655a3d5a Fix lint. 2021-06-25 19:33:55 -07:00
Dan Albert
7774a9b2ab Move the default save game directory.
The top level DCS directory gets messy fast if we fill it with save
games.
2021-06-25 17:48:09 -07:00
Dan Albert
80cf8f484d 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
2021-06-25 16:46:49 -07:00
Dan Albert
cb7c075a61 State carrier requirement for Blackball.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1355
2021-06-25 16:35:15 -07:00
Dan Albert
4d0fb67c53 Fix crash when buying or selling TGO units.
Updating the game destroys this window so we cannot continue with the
calls. It worked in my initial testing, so presumably it's partly
dependent on when the finalizers run.

Since the windows will be destroyed there's nothing for us to actually
update, so just remove that signal and the explicit close calls.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1344
2021-06-25 16:30:18 -07:00
Dan Albert
380d1d4f18 Ack campaign version bump.
Campaigns don't use scenery targets.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1341
2021-06-24 18:17:25 -07:00
Dan Albert
71832859a5 Update pydcs to use latest master.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/993
2021-06-24 18:14:11 -07:00
docofmur
a31432ad9e Fixes #1337 by making ground location search look in both directions (#1338) 2021-06-24 13:24:13 -04:00
bgreman
26743154d8 Implements #1331 by changing the Pass Turn button text on Turn 0. (#1333) 2021-06-24 10:59:12 -04:00
bgreman
a50a6fa917 Adds a ruler to the map (#1332)
* Adds a ruler to the map

* Updating changelog

* Updating changelog
2021-06-24 02:58:39 -04:00
bgreman
b43e5bac0b Fix #1329 player loses frontline progress when skipping turn 0 (#1330) 2021-06-24 02:04:27 -04:00
Dan Albert
ddaef1fb64 Retry reading state.json on failure.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1313
2021-06-23 20:18:06 -07:00
Dan Albert
6f264ff5de Signal game update when buying/selling TGO units.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1312
2021-06-23 20:08:05 -07:00
Dan Albert
a06fc6d80f Fix another unit type mismatch. 2021-06-23 20:01:38 -07:00
Dan Albert
3ddfc47d3a 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.
2021-06-23 18:47:34 -07:00
docofmur
905bd05ba8 Campaign version update (#1326)
Caucasus Multi part campaign version update. No map strike objects so just the version change
2021-06-23 20:00:39 -04:00
Dan Albert
aa19787654 Document high level concepts of unit transfers. 2021-06-23 16:50:54 -07:00
bgreman
3274f3ec35 Fix empty convoys (#1327)
* Hopefully getting rid of empty convoys for good

* changing Dict to dict for type checks
2021-06-23 19:48:16 -04:00
bgreman
c3b8c48ca2 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
2021-06-23 17:09:17 -04:00
Dan Albert
d365094616 Update From Caen to Evreux.
Add support for inversion and ack the version change (Normandy is
unaffected by ID updates).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1232
2021-06-23 13:57:16 -07:00
Dan Albert
7c76684076 Ack version update for PG campaigns.
PG is unaffected by building ID changes.
2021-06-23 13:49:27 -07:00
Dan Albert
0ef27b038a Update Vectron's Claw and Peace Spring.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1323
2021-06-23 12:58:56 -07:00
Dan Albert
610a27c0e4 Copy initialization fix to AircraftType. 2021-06-23 12:50:07 -07:00
RndName
752c91a721 set window title empty on new game
also fixed small exception when aborting the open file dialog which lead to " as filename

fixes #1305
2021-06-23 12:24:36 -07:00
Dan Albert
d3d655da07 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
2021-06-22 23:41:05 -07:00
Dan Albert
db36cf248e Return pilots when canceling flight creation. 2021-06-22 23:36:39 -07:00
Dan Albert
153d8e106e Add the Around the Mountain campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1280
2021-06-22 23:28:54 -07:00
Dan Albert
df8829b477 Add Operation Blackball campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1320
2021-06-22 23:22:42 -07:00
Dan Albert
569bc297a8 Update Syria Full campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1319
2021-06-22 23:20:03 -07:00
Dan Albert
099cbbdb64 Update Northern Russia campaign.
I bumped the submitted 6.1 to 7.0 (which didn't exist when the files
were uploaded) because this campaign uses no scenery targets.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1318
2021-06-22 23:16:12 -07:00
Dan Albert
ca7469b92e Update Allied Sword.
Only change from the uploaded files is that I increased the campaign
version to 7.0 since this doesn't use any scenery targets so has no work
to do for that.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1249
2021-06-22 23:13:16 -07:00
Dan Albert
6db4145927 Correct mistakenly updated campaign. 2021-06-22 23:08:12 -07:00
Dan Albert
ca93f2baff Bump campaign version to account for DCS changes.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1308
2021-06-22 23:04:16 -07:00
Dan Albert
84a0a3caeb Fix unit type mismatch.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1314
2021-06-22 22:54:40 -07:00
Dan Albert
7b327693e2 Update Operation Peace Spring.
https://github.com/dcs-liberation/dcs_liberation/issues/1303
2021-06-22 15:17:39 -07:00
docofmur
dba70dc6d5 Faction Audit.
Transports and mod aircraft added where needed cleaned up various
duplicates in factions.
2021-06-22 15:01:50 -07:00
Mike Jones
bd1618e41d Use pydcs has_tacan attribute to check if tankers support TACAN. 2021-06-22 14:35:28 -07:00
Mike Jones
08b7aff0d8 Add gunfighter flag to aircraft data files. 2021-06-22 14:35:28 -07:00
Mike Jones
a75688f89c Add patrol configuration to unit data files.
This allows altitude/speed of AEW&C and tankers to be configured.
2021-06-22 14:35:28 -07:00
Mike Jones
30763b5401 Fix unit type comparisons.
When comparing UnitType against a pydcs type, use .dcs_unit_type.
2021-06-22 14:35:28 -07:00
Chris Seagraves
814519248c Fix bug with file name in title with invalid save games. 2021-06-22 14:19:53 -07:00
Simon Clark
8c71be5257 Campaign clarity. 2021-06-22 17:21:21 +01:00
Simon Clark
91763b233e Add clarity for mod selection page. 2021-06-21 20:04:58 +01:00
Simon Clark
ab51f5e69a Merge branch 'develop' of https://github.com/dcs-liberation/dcs_liberation into develop 2021-06-21 19:46:10 +01:00
Simon Clark
d278d58f6c Add Operation Atilla campaign.
It's a Cyprus invasion campaign - what's not to like!
2021-06-21 19:46:05 +01:00
Dan Albert
47e038c9fa Fix command line campaign generator. 2021-06-20 23:46:06 -07:00
Dan Albert
e96210f48c 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.
2021-06-20 23:44:00 -07:00
Simon Clark
aa3811ad02 Updated factions to reflect mod select changes. 2021-06-21 01:32:43 +01:00
Simon Clark
963ab38b2e Refactor the mod select changes, re-add accidentally deleted factions. 2021-06-21 01:16:48 +01:00
Simon Clark
11069cc219 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 01:16:41 +01:00
Dan Albert
d074500109 Revert "Don't propose missions the air wing can't plan."
This is redundant because plan_mission already checks this.

This reverts commit 3338df9836.
2021-06-20 15:57:54 -07:00
Dan Albert
63af28b016 Develop is now 5.x. 2021-06-20 15:48:54 -07:00
Dan Albert
d2cc3f673e Switch pydcs to a pip requirement. 2021-06-20 15:16:22 -07: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
SnappyComebacks
0b5bdf8151 Move max_group_size from S-3B to S-3B Tanker. 2021-06-20 14:13:23 -07:00
jsjlewis96
b27238a69a Moved Hind-F to separate faction, not operational at time, but only gunship pilotable 2021-06-20 14:13:03 -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
Chris Seagraves
7e17533cc6 Air/ground intel prettification. (#1285)
* Sort rows.
* Add totals to group headers.
* Indent content.
* Add space between sections.
2021-06-20 13:43:54 -07:00
Chris Seagraves
7808da118a Include the save name in the window title. 2021-06-20 13:33:27 -07:00
Mustang-25
4259cf8764 Add IAF Eagle Sqn 2021-06-20 13:33:01 -07:00
Mustang-25
994c55945e Add IAF Strike Eagle Sqn 2021-06-20 13:33:01 -07:00
Mustang-25
f20c145ece Add IAF Viper Sqns 2021-06-20 13:33:01 -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
Simon Clark
39fe5951f7 Add factories to Russian Intervention Campaign. 2021-06-20 19:23:07 +01:00
Simon Clark
9d767c3dd8 Fix destination opacity bug. 2021-06-20 19:06:24 +01:00
Simon Clark
2a3f9bf81c More Russian Intervention campaign work. 2021-06-20 18:48:46 +01:00
Khopa
82bb2fcf6a Helipad : fixed typing errors after merge 2021-06-20 18:25:19 +02:00
Khopa
e56e765450 Helipad : fixed errors after merge of develop features. 2021-06-20 18:20:40 +02:00
Simon Clark
3fd4359cb1 Adds Russian Intervention 2015 campaign. 2021-06-20 17:08:44 +01:00
Khopa
c70169b4a0 Merge branch 'develop' into helipads
# Conflicts:
#	game/game.py
#	game/operation/operation.py
#	game/theater/controlpoint.py
#	gen/aircraft.py
#	resources/campaigns/golan_heights_lite.miz
2021-06-20 18:07:50 +02:00
Khopa
ca1be580df Squadrons : Added french Sa-342 and Mirage 2000-5 squadrons 2021-06-20 17:43:35 +02:00
Khopa
28820f2e64 Squadrons : Allow unicode characters in squadrons names 2021-06-20 17:43:07 +02:00
Simon Clark
6c3987ec86 Updates the intel box text for turn 0.
It was a bit misleading beforehand, as there were no forces on either side.
2021-06-20 15:56:53 +01:00
Simon Clark
089eb9e86b Changelog. 2021-06-20 15:36:40 +01:00
Simon Clark
0793e9afc5 Addresses #1184.
CV and LHA icons are now the same colour as airfields.

Destination markers now have transparency.
2021-06-20 15:33:01 +01: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
e09f53da8f Fix exceptions when no aircraft are selected.
This commonly happens during reset of the UI, but also happens when the
player is out of aircraft.
2021-06-19 20:26:33 -07:00
Dan Albert
29b4b62a44 Revert "Add Around the Mountain campaign."
Doesn't include basic requirements like factories.

This reverts commit 30cab8e3a7.
2021-06-19 15:11:41 -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
9940dc8451 Fix type annotations for some UI code. 2021-06-19 15:03:39 -07:00
Dan Albert
703c68eb66 Add Akrotiri to Inherent Resolve. 2021-06-19 12:17:47 -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
Dan Albert
5f8b838652 Add new campaign minor version for Cyprus. 2021-06-19 11:18:31 -07:00
Dan Albert
4efd1b5d3e Note EWR waypoint selector fix. 2021-06-19 11:16:20 -07:00
RndName
ad6ed21b6b Add EWR objects to predefined waypoints 2021-06-19 11:01:35 -07:00
Dan Albert
2ffaa71bb5 Note some new features in the changelog. 2021-06-19 10:47:59 -07:00
RndName
1763f59320 Allow deletion of multiple waypoints by selection
#1221
2021-06-19 10:40:40 -07:00
RndName
08d32ffc77 Allow shift/ctrl click to buy/sell multiple units.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1221
2021-06-19 10:36:33 -07:00
RndName
7e3cebb96d Fix purchase groups.
The new class PurchaseGroup coming in with commit 9bb986c was not
initiallized correctly.

This causes the bug that the update function is not working when you
for example open the AircraftRecruitmentMenu press "+" or "-", close
the dialog and then open ArmorRecruitmentMenu. If you then want to buy
or sell the update function will raise an error "Internal C++ Object
Already Deleted".
2021-06-19 10:33:35 -07:00
Jake Lewis
930fb404af Updated Hind-F price for rebalance 2021-06-19 03:43:55 -07:00
jsjlewis96
6cd711a1e2 Added option to disable AI pilot levelling 2021-06-19 03:03:50 -07:00
docofmur
1bcc332885 Syrian Terrain update 2021-06-19 02:28:11 -07:00
Dan Albert
9bb986cff9 Update *all* buy/sell buttons, not just the row.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1207
2021-06-18 20:14:44 -07:00
Dan Albert
1247942bf1 Note fix for convoy naming bug. 2021-06-18 19:41:03 -07:00
Dan Albert
95d3ff4cbe Don't show ground unit menu at carriers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1220
2021-06-18 19:39:42 -07:00
Marcel
0a874a28ef Fix group name for EWRs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1246
2021-06-18 19:26:42 -07:00
Dan Albert
2dee702060 Persist name generator state to the save game.
This is a bit of an ugly hack but it's effectively what we would need
anyway. We could clean up the global replacement by making the name
generator _only_ a property of Game and plumbing it through to a large
number of places. Could maybe also use `__getstate__` and `__setstate__`
tricks to save `naming.namegen` to the file even without making it truly
a part of Game.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1247
2021-06-18 19:24:23 -07:00
Dan Albert
4ea66477fe Add options for changing pilot limits and rates. 2021-06-18 18:33:15 -07:00
Dan Albert
d3be732566 Fix tooltips for scuds/silkworms.
Same problem as the ground object menu, same cleanup required at some
point.
2021-06-18 18:14:20 -07:00
Dan Albert
933517055e Fix ground object menus for scuds and silkworms.
These really need to be added to the unit data, but this will do as a
stop gap since the group generators need an overhaul anyway.
2021-06-18 18:06:05 -07:00
Dan Albert
040a3d9b36 Add coastal defenses and missiles to Abu Dhabi. 2021-06-18 18:02:33 -07:00
Florian
2c859bf280 Rebalance aircraft prices.
Main goal here is to make sure that warbirds don't cost more than early
jets, but this includes rebalancing of all aircraft.
2021-06-18 17:53:19 -07:00
jsjlewis96
fe227e02b8 Shows total at top for economic intel 2021-06-18 17:35:18 -07:00
Dan Albert
c68e583c20 Note the Skynet EWR fix. 2021-06-18 17:02:22 -07:00
Khopa
6620d56859 Factions : Added hind-P to Russia 75. 2021-06-19 01:58:11 +02: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
Dan Albert
a90cb0dad9 Fix carrier names in factions.
The rest of the ships were covered but it looks like carriers were
missed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1258
2021-06-18 16:42:34 -07:00
Khopa
8854a491ab Custom banner for Mi-24P (different from Mi-24V) 2021-06-19 01:32:43 +02:00
UKayeF
74e8073328 add Mi-24V Hind icons as placeholders for Mi-24P icons yet to come 2021-06-19 01:32:43 +02:00
Dan Albert
a6d62a7596 Add some missing changes to the changelog. 2021-06-18 16:23:44 -07:00
Dan Albert
980a224d02 Move fixes to the correct changelog section.
What was to be 3.1.0 is now 4.0.0 to accomodate that DCS update.
2021-06-18 16:11:02 -07:00
Khopa
0c6b83fc35 Added default Mi-24P payloads 2021-06-19 01:05:14 +02: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
jsjlewis96
05107fab1c Added Mi-24P to factions post '80 that use Hind-E 2021-06-19 00:51:49 +02:00
jsjlewis96
285bed65c6 Added Mi-24P to Russia 1990 & 2010 factions 2021-06-19 00:51:47 +02:00
Khopa
b523c23e7a Added french Mirage-2000C squadrons 2021-06-18 18:38:05 +02:00
Khopa
4c9a028a4e Fixed pydcs error in test_factions.py 2021-06-18 18:19:48 +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
Khopa
d8511fab1d Fixed pydcs error with missiles units 2021-06-18 18:08:03 +02:00
Khopa
b2d10e92e9 Fixed requirements.txt changes not required 2021-06-18 18:01:44 +02:00
Khopa
0582d5e2b6 Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2021-06-18 18:00:58 +02:00
C. Perreau
da2b56b5b1 Merge pull request #1252 from docofmur/terrain_update_cyprus
Syria Terrian map update
2021-06-18 18:00:09 +02:00
docofmur
46c15f37c5 exclusion zone update 1 test change on caucases, massive update on syria 2021-06-18 17:58:08 +02:00
Dan Albert
4ddc02d7fe Update pydcs. 2021-06-17 23:01:20 -07:00
Dan Albert
4c3ac0af91 Adapt to DCS update. 2021-06-17 22:58:46 -07:00
Dan Albert
edd0b90576 Update pydcs. 2021-06-17 22:22:47 -07:00
Dan Albert
11dca41945 Remove unused file. 2021-06-17 22:11:00 -07:00
Dan Albert
75c4724200 Delete the obsolete converter. 2021-06-17 22:10:15 -07:00
Dan Albert
09704b6f37 Add a wrapper type for ground unit info. 2021-06-17 22:09:17 -07:00
Dan Albert
8a0824880e Add unit classes and weights to infantry. 2021-06-17 22:09:16 -07:00
Dan Albert
d84abf021e Fix some bad unit data. 2021-06-17 22:09:16 -07:00
Dan Albert
e7223da19f Convert remaining unit data. 2021-06-17 22:09:16 -07:00
Dan Albert
499d143199 Add a converter for groun unit info. 2021-06-17 22:09:06 -07:00
Dan Albert
fefeb3c006 Fix broken factions. 2021-06-17 18:49:55 -07:00
Dan Albert
6aeee933d2 Fix broken ground unit data. 2021-06-17 18:39:45 -07:00
Dan Albert
34c0698c48 Remove unused aircraft from the old unit data. 2021-06-17 18:39:45 -07:00
jsjlewis96
1cc1a00820 Updated changelog 2021-06-17 23:12:57 +01:00
jsjlewis96
62f6b57948 Added neutral dot option 2021-06-17 23:12:30 +01:00
docofmur
5387acf533 exclusion zone update 1 test change on caucases, massive update on syria 2021-06-17 14:51:48 -07:00
C. Perreau
077b3ef04d Merge pull request #1243 from DanAlbert/f-16-strike-gbu-31
Update F-16 strike loadout to use GBU-31.
2021-06-17 22:39:58 +02:00
Dan Albert
9c654254d3 Update F-16 strike loadout to use GBU-31. 2021-06-16 21:43:09 -07:00
Mustang-25
4bb8bbbad8 Add remaining HAF Viper squadrons. 2021-06-16 21:05:50 -07:00
Dan Albert
39adafb1be Fix Greek F-16 livery ID. 2021-06-16 20:52:15 -07:00
Dan Albert
e19bfcdd04 Add a Greek F-16 squadron. 2021-06-16 20:37:07 -07:00
Dan Albert
6fde92f5ac Add the 191. Filo Turkish F-16 squadron. 2021-06-16 20:13:07 -07:00
Dan Albert
7170a7b302 Fix spawning unused aircraft.
These are assigned a squadron even though they're unused as a hack. We
need to tolerate these aircraft having no pilot assigned since that's
the desired case for unused aircraft (though only happens when the
squadron runs out of pilots, which should be fixed).
2021-06-16 20:11:36 -07:00
Dan Albert
24884e4a77 Import latest beacon data from DCS. 2021-06-16 19:46:19 -07:00
Dan Albert
384be8ceae Update Turkish faction.
Add a bunch of missing helicopters, some ground units, and remove the
KC-130 which they don't seem to use.
2021-06-16 19:10:23 -07:00
Dan Albert
ee9a5e8482 Update the Greek faction.
Greece has C-130s and Patriots. They don't have the E-3 but they do have
AEW&C via the ER-99, which isn't in DCS so just use an E-3 to pretend.
Also remove the Hawk radar as an EWR since we have the P-19 which is
better.
2021-06-16 18:54:12 -07:00
Dan Albert
34453fa3be Fix incorrect conditional. 2021-06-16 17:23:57 -07:00
Dan Albert
f727712bfa Make non-interactive map elements unobstructive.
This makes most of the lines and polygons on the map non-interactive so
they don't capture mouse events, and also makes the culling exclusion
zones unfilled so they don't obscure real map objects in dense areas.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1217
2021-06-16 17:22:07 -07:00
Dan Albert
3bb974b9e0 Note procurement fix in the changelog. 2021-06-16 17:10:21 -07:00
Dan Albert
021445216e Escape the JTAC zone name in the plugin data.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1218
2021-06-16 17:06:45 -07:00
Schneefl0cke
c13bf3ccd1 Fix procurement for factions that lack some units.
Fixes procurement for factions with no aircraft, no ground units, or no
tanks.
2021-06-16 09:34:58 -07:00
Mustang-25
8d53f42421 Update KC135MPRS.yaml
Fixed minor spelling error
2021-06-13 22:56:35 -07:00
Dan Albert
ace42019fb Cap squadron size, limit replenishment rate.
This caps squadrons to 12 pilots and limits their replenishment rate to
1 pilot per turn. Should probably make those values configurable, but
they aren't currently.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1136
2021-06-13 14:40:15 -07:00
Dan Albert
54aa161da0 Fix new game wizard faction template.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1227
2021-06-12 21:48:22 -07:00
Dan Albert
25c289deaa Make squadron nicknames optional. 2021-06-12 21:43:26 -07:00
Dan Albert
3c802e7d55 Fix unit info window. 2021-06-12 21:35:01 -07:00
Dan Albert
ba3cf4d2bd Put back all the radio data. 2021-06-12 20:56:24 -07:00
Dan Albert
4aa905716b Remove old file.
This was from testing and shouldn't have been kept.
2021-06-12 20:28:14 -07:00
Dan Albert
0fc1e8ec10 Remove unused file, begin fixing radios.
My radio data converter broke at some point while testing, so adding
this all back manually.
2021-06-12 20:27:18 -07:00
Dan Albert
0875d35129 Fix some squadrons.
I accidentally reverted my changes here while testing something earlier.
2021-06-12 20:24:04 -07:00
Dan Albert
8c62a081fe Remove unused code from AircraftType conversion. 2021-06-12 20:13:45 -07:00
Dan Albert
f811ae6c61 Convert factions and unit data. 2021-06-12 20:13:45 -07:00
Dan Albert
4a3ef42e67 Wrap the pydcs FlyingType in our own AircraftType.
This is an attempt to remove a lot of our supposedly unnecessary error
handling. Every aircraft should have a price, a description, a name,
etc; and none of those should require carrying around the faction's
country as context.

This moves all the data for aircraft into yaml files (only one converted
here as an example). Most of the "extended unit info" isn't actually
being read yet.

To replace the renaming of units based on the county, we instead
generate multiple types of each unit when necessary. The CF-18 is just
as much a first-class type as the F/A-18 is.

This doesn't work in its current state because it does break all the
existing names for aircraft that are used in the faction and squadron
files, and we no longer let those errors go as a warning. It will be an
annoying one time switch, but it allows us to define the names that get
used in these files instead of being sensitive to changes as they happen
in pydcs, and allows faction designers to specifically choose, for
example, the Su-22 instead of the Su-17.

One thing not handled by this is aircraft task capability. This is
because the lists in ai_flight_planner_db.py are a priority list, and to
move it out to a yaml file we'd need to assign a weight to it that would
be used to stack rank each aircraft. That's doable, but it makes it much
more difficult to see the ordering of aircraft at a glance, and much
more annoying to move aircraft around in the priority list. I don't
think this is worth doing, and the priority lists will remain in their
own separate lists.

This includes the converted I used to convert all the old unit info and
factions to the new format. This doesn't need to live long, but we may
want to reuse it in the future so we want it in the version history.
2021-06-12 20:13:45 -07:00
Dan Albert
88abaef7f9 Fix inconsistencies in prices and unit data. 2021-06-12 20:13:45 -07:00
Schneefl0cke
21fe746f2f Use ID for unit info lookups instead of name. 2021-06-12 02:24:21 -07:00
Dan Albert
c3c6915fa0 Include the micro version in the version string. 2021-06-11 16:52:23 -07:00
Dan Albert
b2705c1a13 Update Northern Russia campaign.
https://github.com/dcs-liberation/dcs_liberation/issues/1206
2021-06-11 16:42:12 -07:00
Mustang-25
75e3b4cc84 Add the First Lebanon War Historical Campaign. 2021-06-10 17:38:40 -07:00
Khopa
78f5235eca Removed helipad from golan heights campaign to avoid capture trigger error 2021-06-10 23:27:45 +02:00
Khopa
adad88681e Generate helipads as neutral objects, so they do not interfer with base capture trigger 2021-06-10 23:18:41 +02:00
Florian
78cd17e279 added missing units 2021-06-10 11:18:52 -07:00
Khopa
1b9ac088e4 Refactor & fix code after comments 2021-06-10 13:19:22 +02:00
Khopa
e00951e5b9 Merge remote-tracking branch 'khopa/develop' into helipads 2021-06-10 13:01:24 +02:00
Dan Albert
c51c8aae5c Clarify the docs/name of the task type list. 2021-06-09 21:53:45 -07:00
Dan Albert
40aa7734e1 Fix CAS commit range display.
CAS commits around the target, not its flight plan.
2021-06-09 21:51:26 -07:00
Dan Albert
0594e1148e Update Operation Mole Cricket.
https://github.com/dcs-liberation/dcs_liberation/issues/1203
2021-06-09 21:26:47 -07:00
Dan Albert
9eacd1563f Add Northern Russia campaign.
https://github.com/dcs-liberation/dcs_liberation/issues/1202
2021-06-09 21:25:59 -07:00
SnappyComebacks
a53a648a63 Add plannable tankers.
This Pull Request lets users plan Tanker flights.

Features:

- Introduction of `Refueling` flight type.
- Tankers can be purchased at airbases and carriers.
- Tankers get planned by AI.
- Tankers are planned from airbases and at aircraft carriers.
- Tankers aim to be at high, fast, and 70 miles from the nearest threat.
  (A10s won't be able to tank)
- Tankers racetrack orbit for one hour.
- Optional Tickbox to enable legacy tankers.
- S-3B Tanker added to factions.
- KC-130 MPRS added to factions.
- Kneeboard shows planned tankers, their tacans, and radios.

Limitations:

- AI doesn't know whether to plan probe and drogue or boom refueling
  tankers.
- User can't choose tanker speed.  Heavily loaded aircraft may have
  trouble.
- User can't choose tanker altitude.  A-10s will not make it to high
  altitude.

Problems:

- Tanker callsigns do not increment, see attached image.  (Investigated:
  Need to use `FlyingType.callsign_dict`, instead of just
  `FlyingType.callsign`.  This seems like it might be significant work
  to do.).
- Having a flight of two or more tankers only spawns one tanker.
- Let me know if you have a solution, or feel free to commit one.

https://user-images.githubusercontent.com/74509817/120909602-d7bc3680-c633-11eb-80d7-eccd4e095770.png
2021-06-09 21:14:10 -07:00
Dan Albert
a9dacf4a29 Fix engagement distance display. 2021-06-09 21:01:14 -07:00
Dan Albert
66f82b6ff9 Update mission start guidance. 2021-06-09 19:20:56 -07:00
Dan Albert
0e68884493 Remove incompatible campaigns.
We have quite a few campaigns now, so removing the broken ones.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1178
2021-06-09 19:08:36 -07:00
Dan Albert
f8d885fc9a Fix broken import. 2021-06-09 19:06:02 -07:00
Florian
366190ee99 added missing units to price table 2021-06-09 19:03:25 -07:00
Dan Albert
42d56a324f Make campaign names consistent. 2021-06-09 18:58:35 -07:00
docofmur
7d1f1ea2f7 Campaigns for 3.0
4 campaigns updated for 3.0 1 small PG 3 for Caucasus 1 full and 2 parts based on the full
2021-06-09 18:55:22 -07:00
Dan Albert
30cab8e3a7 Add Around the Mountain campaign.
https://github.com/dcs-liberation/dcs_liberation/issues/1199
2021-06-09 18:51:34 -07:00
Dan Albert
e0e2162c6d Add Operation Allied Sword campaign and factions.
https://github.com/dcs-liberation/dcs_liberation/issues/1196
2021-06-09 18:44:09 -07:00
Dan Albert
f1582fcc10 Add Humble Helper campaign and factions.
https://github.com/dcs-liberation/dcs_liberation/issues/1197
2021-06-09 18:39:26 -07:00
Florian
eb6206ea57 added texts for all units 2021-06-09 12:42:56 -07:00
Brock Greman
3ad51cafa8 Fixing display of "sunny" during clear conditions at night. 2021-06-09 02:16:05 -07:00
Dan Albert
b8c14d69c3 Make enable_and_reset not half lie.
https://github.com/dcs-liberation/dcs_liberation/issues/1185
2021-06-08 21:19:48 -07:00
Dan Albert
725b5083c7 Fix typo in Incirlik runway data.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1188
2021-06-08 21:14:36 -07:00
Dan Albert
87dd6b19bf Fix repeated JTACs after multiple generations.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1191
2021-06-08 20:56:00 -07:00
bgreman
3188994261 Gripen mod support.
(cherry picked from commit 0220fa4ff6)
2021-06-08 20:49:24 -07:00
Schneefl0cke
e4c9d8799e Add Recon combat role. 2021-06-08 19:48:56 -07:00
dependabot[bot]
bc938db7f9 Bump pillow from 8.1.1 to 8.2.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.1.1...8.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-08 16:15:25 -07:00
Khopa
b7a0feba5b Added more helipads on Golan Heights 2021-06-08 13:45:21 +02:00
Khopa
51fa0a0891 Added function to get cp number of fuel depots 2021-06-08 13:18:27 +02:00
Khopa
f4c54bb9e6 Autogenerate ammo & fuel for helipads so player controlled helicopter can use ground crew menu to refuel and rearm at FARPs. 2021-06-08 13:17:34 +02:00
Khopa
e00ca5d096 Merge branch 'develop' into helipads 2021-06-08 13:09:11 +02:00
Dan Albert
0a9dc49e7f Remove UNIT_BY_TASK. 2021-06-07 19:13:49 -07:00
Dan Albert
07cdfc16d0 Move support tanker off find_unittype. 2021-06-07 19:12:30 -07:00
Dan Albert
622a171ac4 Move armor TGO purchase off find_unittype. 2021-06-07 19:01:16 -07:00
Dan Albert
fd85efbf55 Remove more dead code in game.db. 2021-06-07 18:59:02 -07:00
Dan Albert
ae2a818d8c Move the base intel menu off find_unittype. 2021-06-07 18:54:51 -07:00
Dan Albert
6966c16dd2 Remove dead code. 2021-06-07 18:54:39 -07:00
Dan Albert
27b5f24a0f Move unit purchase off find_unittype. 2021-06-07 18:54:21 -07:00
Dan Albert
ea15421308 Migrate support AEW&C away from find_unittype. 2021-06-07 18:52:54 -07:00
Dan Albert
ef35ad90b8 Remove one user of UNIT_BY_TASK. 2021-06-07 18:01:31 -07:00
Dan Albert
914691eaa7 Remove more unused code from Base. 2021-06-07 17:51:25 -07:00
Dan Albert
37bb83dfa6 Delete a bunch of unused code from Base. 2021-06-07 17:48:03 -07:00
Dan Albert
d8881e2734 Fix hangar status display. 2021-06-06 17:12:44 -07:00
Dan Albert
45869c428e Label the player checkbox in the roster editor. 2021-06-06 13:43:34 -07:00
Dan Albert
40832bd3a1 Update screenshot on the front page. 2021-06-06 13:37:01 -07:00
Khopa
126a8e8efb Added a small WW2 campaign on Normandy map (Replacing the former Normandy Small campaign). 2021-06-06 18:50:16 +02:00
Khopa
07b93167f0 Improved implementation. 2021-06-06 17:49:56 +02:00
Khopa
29c0a8d054 Fixed ground start for helos in FOB 2021-06-06 17:28:23 +02:00
Khopa
73b1be36a2 Merge branch 'develop' into helipads
# Conflicts:
#	game/theater/conflicttheater.py
#	gen/flights/flightplan.py
2021-06-06 15:46:30 +02:00
Dan Albert
1796c21f48 Update the Syria full campaign.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1182
2021-06-05 21:39:45 -07:00
Dan Albert
363d4af639 Add Jordan 2010 faction. 2021-06-05 19:08:52 -07:00
Dan Albert
f1c881378c Add/updates campaigns from Starfire.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1181
2021-06-05 19:07:13 -07:00
Dan Albert
d316e13fa6 Suppress events fired while rebuilding model. 2021-06-05 15:21:23 -07:00
Dan Albert
1ea98a6ed1 Hide incompatible campaigns by default.
https://github.com/dcs-liberation/dcs_liberation/issues/1178
2021-06-05 15:15:30 -07:00
Dan Albert
3d4415d5d2 Move develop to 4.0. 2021-06-05 14:35:07 -07:00
Dan Albert
3e43414d9c Make the new package dialog modal.
In the *new* package dialog, a package has been created and may have
aircraft assigned to it, but it is not a part of the ATO until the user
saves it.

Other actions (modifying settings, closing some other dialogs like the
base menu) can cause a Game update which will forcibly close this window
without either accepting or rejecting it, so we neither save the package
nor release any allocated units.

While it would be preferable to be able to update this dialog as needed
in the event of game updates, the quick fix is to just not allow
interaction with other UI elements until the new package has either been
finalized or canceled.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1027
2021-06-05 14:21:31 -07:00
Dan Albert
6d682d509f Restore former turn 0 budget split. 2021-06-05 14:09:10 -07:00
Florian
3a592aee8b Split purchase budget based on investment ratio.
The AI purchaser will aim to have a 50/50 ground/air investment mix.
This allows it to overspend on one category if significant losses were
taken the previous turn.

The total purchase amount is still limited, so if the bases are full
when only 10% of the investment is in ground units, the full budget for
the turn will still go to air.
2021-06-05 14:07:18 -07:00
Dan Albert
b74f60fe0e Stagger packages in units of seconds, not minutes.
Missions with very large numbers of packages and short mission windows
would raise an exception here because we couldn't schedule more
frequently than once a minute. Switch to using seconds instead of
minutes to avoid that problem. If there are more packages than there are
seconds in the mission the game is broken for other reasons.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1154
2021-06-05 13:50:28 -07:00
Dan Albert
34f3a50234 Fix UI quirks when reopening custom loadout.
* Disable the selector.
* Select the default loadout rather than the first one so unchecking the
  custom box goes back to the default loadout.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1152
2021-06-05 13:40:11 -07:00
Dan Albert
6094179a40 Show pending ground unit count in the base menu.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1161
2021-06-05 13:24:12 -07:00
Dan Albert
e3bc2688ba Revert accidental change to IR campaign.
Used this for debugging airlifts and accidentally included it.
2021-06-05 12:46:19 -07:00
Dan Albert
96cdea2a94 Load two units per cargo plane.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1029
2021-06-05 12:21:34 -07:00
Dan Albert
cb159e3341 Fix canceling transfers.
singledispatchmethod only overloads on the first argument.
2021-06-05 12:00:43 -07:00
Dan Albert
136e776b03 Add map markers for each building in the group.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1126
2021-06-04 18:07:12 -07:00
Dan Albert
a0833e8943 Allow selection of auto-assigned mission types.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1176
2021-06-04 17:50:21 -07:00
Dan Albert
8bb1b1da7c Fix squadron roster size.
This was excluding a number of pilots from the end of the roster equal
to the number of losses the squadron had suffered.
2021-06-04 17:01:29 -07:00
Dan Albert
558502d8ea Convert flight creator to pilot roster.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1143
2021-06-04 17:01:29 -07:00
Khopa
8edb952800 Updated campaign "Golan Heights" to version 6.0 2021-06-05 01:24:08 +02:00
Mustang-25
f3d79e58db Add the Battle for the UAE Campaign.
The Battle for the UAE is a follow-on campaign to the Battle for Abu Dhabi.
2021-06-03 23:30:02 -07:00
Dan Albert
f26ff085e1 Add a new bug template for campaign update "PRs". 2021-06-03 19:08:00 -07:00
Brock Greman
7ea550738e Sorts flights in the base menu by mission start time. Also makes base menu dialog bigger. 2021-06-03 15:32:49 -07:00
Brock Greman
6b1048590f Fixes issue where only first a/c in a flight would show in air inventory 2021-06-03 14:46:12 -07:00
Schneefl0cke
203f0d3851 Introduce recon unit type, adjust ratios. 2021-06-02 23:00:35 -07:00
Dan Albert
d9c38a716c Move settings and stats to the toolbar.
https://github.com/dcs-liberation/dcs_liberation/issues/1146
2021-06-01 22:59:15 -07:00
Mustang-25
24709d01bd Add the Operation Mole Cricket 2010 Campaign. 2021-06-01 22:13:23 -07:00
Dan Albert
2dc2681f84 Attach bug URL to a TODO. 2021-06-01 20:16:33 -07:00
Dan Albert
d53a39860e Update Black Sea to latest campaign format. 2021-06-01 18:49:33 -07:00
SnappyComebacks
ad2f084112 Added ammunition depot changes to 3.0 changelog. 2021-05-31 22:20:38 -07:00
Dan Albert
d59c42ed3f Fix generation crash for large campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1162
2021-05-31 21:02:46 -07:00
Dan Albert
e022ffee62 Auto-ASAP player missions. 2021-05-31 20:05:04 -07:00
Dan Albert
77ddd5ed78 Don't include off-map spawns for AEW&C planning. 2021-05-31 20:00:10 -07:00
Dan Albert
8604faffe6 Make EWR sites purchasable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/968
2021-05-31 16:33:55 -07:00
Dan Albert
45919200c4 Depopulate captured objectives.
Buildings are left to be captured, but the retreating coalition now
destroys their abandoned equipment.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1158
2021-05-31 15:43:20 -07:00
Dan Albert
d498bb9cff Give AEW&C a significant buffer from threats. 2021-05-31 15:33:21 -07:00
Dan Albert
389f60786a Fix moving carriers. 2021-05-31 15:13:56 -07:00
Dan Albert
2d0929cd69 Plan AEW&C in safer locations.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1119
2021-05-31 14:57:25 -07:00
Dan Albert
e94ebd6ed2 Invert AEW&C default behavior.
This is working well. Make it the default, but don't remove it since we
don't have HAVCAP yet.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1118
2021-05-31 14:42:22 -07:00
Dan Albert
77373606fe Fix crash in startup. 2021-05-31 14:36:25 -07:00
Dan Albert
284f2bc323 Show runway status on the new map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1105
2021-05-31 14:18:27 -07:00
Dan Albert
355e6e1d15 Fix several cases of wrongly using broken runways.
The usual symptom here was the game breaking when a carrier is
destroyed. The carrier would no longer be operational but missions would
be assigned there that could not generate flight plans.
2021-05-31 14:13:33 -07:00
Dan Albert
f6909d2f98 Use airfield icons for off-map spawns.
Nothing else is really appropriate, and these are meant to represent
off-map airfields.
2021-05-31 13:23:47 -07:00
Dan Albert
c42974f7b3 Update FOB icon.
Also removes the possibility of generating FOBs that are not FOBs.
2021-05-31 13:14:45 -07:00
Khopa
230d80a2a5 Updated campaign "Russia Small" campaign to version 6.0 2021-05-31 19:52:06 +02:00
Dan Albert
551038b295 Fix TGO purchase UI.
Enable buying and selling of armor groups. Don't allow armor groups to
be replaced with air defenses or vice versa. These are a different TGO
type and this has always been a thing that will break the flight
planner.
2021-05-30 21:17:55 -07:00
Dan Albert
4055b06e71 Clean up and rename ControlPoint.for_airbase. 2021-05-30 21:17:12 -07:00
Dan Albert
6616359baf Remove "base defenses" UI features.
There's no such thing any more. There are just objectives that are
closer to the CP than the others.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1130
2021-05-30 21:07:48 -07:00
Dan Albert
a5336bbe56 Note dropping random objectives in the changelog. 2021-05-30 20:51:18 -07:00
Dan Albert
871e7f7a50 Remove random objective generation.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1076
2021-05-30 20:47:20 -07:00
Dan Albert
d1c7146a47 Add cheat options back to front lines.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1108.
2021-05-30 20:16:54 -07:00
Dan Albert
30f6220c3e Remove the old map. 2021-05-30 19:57:14 -07:00
Dan Albert
acd3e87996 Remove accidentally preserved debug log in UI. 2021-05-30 19:46:38 -07:00
Dan Albert
8c8814d07e Add culling display option to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-30 19:32:08 -07:00
Dan Albert
417fc3af5b Allow objects near missile launchers to be culled.
We want the scud to not be culled, but we should still cull things
nearby. Rather than making the scud the center of a 2.5km unculled zone,
just exclude missile objectives from culling.
2021-05-30 19:29:59 -07:00
Dan Albert
2218733da4 Add exclusion zone display to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-30 18:50:53 -07:00
Brock Greman
9d1060975e Fixes the ugly border on the Air Inventory View 2021-05-30 16:47:18 -07:00
Dan Albert
82281e2477 Fix inventory handling when adjusting flight size.
We need to resize the flight before attempting to claim the aircraft, or
we'll reclaim the original number of aircraft rather than the new size.
2021-05-30 15:46:54 -07:00
Dan Albert
d0976c45e9 Add pilot assignements to the inventory table. 2021-05-30 14:28:58 -07:00
bgreman
a888397bef Add a global air inventory view to air wing dialog.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/428.
2021-05-30 13:40:51 -07:00
Brock Greman
7b2bb4a128 Show ground unit supply info in the base menu.
Update the base UI to have a hint about ground unit deployment limits
and a matching tooltip for how it is calculated.
2021-05-30 13:15:06 -07:00
SnappyComebacks
d440dc00f1 Purchase reserves at front lines.
This changes the ground unit purchase behavior such that the supply
limit is exceeded by 30%, with the extra units kept in reserve.

The old hard cap of 50 units is no longer needed, since the ammo supply
now does the same task, so that's been removed.
2021-05-30 13:04:18 -07:00
Florian
d61382f4e2 Maintain composition when buying ground units.
Unit composition is defined by the doctrine. The most understaffed CP
will now get the most underrepresented unit type. Previously a random
understaffed CP would get a random unit type.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1057.
2021-05-30 12:52:35 -07:00
Khopa
d4fe893539 Updated "Russia Small" campaign to 5.0 (ammo depots) 2021-05-30 17:58:56 +02:00
Khopa
1af95955b6 Base menu UI : Added ammo depots & factory information (WIP UX) 2021-05-30 17:49:15 +02:00
Khopa
4eb78810c6 Merge branch 'develop' into helipads
# Conflicts:
#	resources/campaigns/golan_heights_lite.miz
2021-05-30 17:29:55 +02:00
Khopa
a43e926dd2 Updated campaign "Golan Height" for v5.0 (Ammo depots) 2021-05-30 16:59:02 +02:00
Khopa
ff49046bfa Updated locales for a few factions 2021-05-30 16:57:51 +02:00
SnappyComebacks
95b0b851a5 Limit front line size with ammo depots.
This limit is determined by the number of buildings that belong to Ammo
Depots at the front line's connected Control Point. The limit increases
for every surviving building at ammo depot objectives.

There is a lower limit to the number of units that will spawn, so that
if there are no surviving ammo depot buildings at a control point, there
will still be some ground conflict.
2021-05-29 13:25:23 -07:00
Dan Albert
077ca19912 Add ammo depots to Abu Dhabi and Inherent Resolve.
IR gets one per base to maintain the old behavior. Abu Dhabi has a bit
more variety, with major bases like Al Dhafra and Bandar Abbas getting
two and FOBs getting none.
2021-05-29 12:36:05 -07:00
Brock Greman
089cc23648 Fixing duplicate connected CPs between Beslan and Modok and Beslan and Nalchik. 2021-05-29 03:05:22 -07:00
Dan Albert
e6b9a73d03 Improve AI air defense target prioritization.
Target the air defenses whose *threat ranges* come closest to friendly
bases rather than the closest sites themselves. In other words, the
SA-10 that is 5 miles behind the SA-6 will now be the priority.

This also treats EWRs a bit differently. If they are not protected by a
SAM their detection range will be used for determining their "threat"
range. Otherwise a heuristic is used to determine whether or not they
can be safely attacked without encroaching on the covering SAM.
2021-05-28 19:27:02 -07:00
Dan Albert
cea264e871 Remove special case behavior for FOB missions.
The only difference from the main CP types was that it didn't support
AEW&C (which shouldn't have been on the main ControlPoint class anyway)
and add strike.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1132
2021-05-28 18:02:57 -07:00
Dan Albert
d0bde7b016 Check for interesection when localizing.
Apparently it is possible to place an objective exactly on the boundary
of a navpoly.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1140
2021-05-28 17:26:46 -07:00
Dan Albert
5b271df66f Propagate planning error for package waypoints.
We did this for the flight plan itself, but did not if the package
waypoints failed to generate.

https://github.com/dcs-liberation/dcs_liberation/issues/1140
2021-05-28 17:26:31 -07:00
Dan Albert
bc7faee880 Add navmesh map mode to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-28 17:00:33 -07:00
Dan Albert
a2abdcf5d3 Ensure that a transit path exists for recruitment.
Networks can be disconnected even by airlift because FOBs are not
airports.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1147
2021-05-28 16:28:50 -07:00
Dan Albert
d4e843983d Add more tracing for turn processing.
Most of the time (1-2 seconds) is going to flight plan layout. There
don't seem to be any easy opportunities for improvement.
2021-05-28 15:31:33 -07:00
Dan Albert
6e41c36a44 Fix replacing unassigned pilot slots. 2021-05-27 22:51:11 -07:00
Dan Albert
1fe3451120 Set locales for some factions.
Far from complete.
2021-05-27 21:37:04 -07:00
Dan Albert
bc4a95d0a5 Un-WIP squadrons in the changelog.
This is feature complete.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 21:05:01 -07:00
Dan Albert
14dc6d1604 Add squadron selector to flight creator.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1142
2021-05-27 21:00:32 -07:00
Dan Albert
1795ed7617 Limit squadron tasks to those of the aircraft.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 20:27:45 -07:00
Dan Albert
e8edb31be3 Revert "Don't assign pilots to unused aircraft."
The unitmap needs to account for this.

This reverts commit dae3835eb0.
2021-05-27 20:02:39 -07:00
Dan Albert
58fd30e6ad Add the 15th Airlift Squadron. 2021-05-27 19:58:45 -07:00
Dan Albert
9a34ada258 Clear last turn's procurement requests each turn.
Without this, *this turn's* urgent requests are lower priority than last
turn's stretch goals. The requests are remade every turn so we lose
nothing by removing this.

Bug was introduced by f69450e2ae, so this
doesn't affect 2.5.
2021-05-27 19:58:45 -07:00
Dan Albert
748a752e29 Fix pydcs loadout cache for command line launcher. 2021-05-27 19:58:45 -07:00
Dan Albert
37748ef3bd Obey squadron mission types when planning airlift.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 19:58:45 -07:00
Dan Albert
d41007de8e Add VFA-192. 2021-05-27 19:58:45 -07:00
Dan Albert
45befd440c Consider squadron for task capability checking.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 19:58:45 -07:00
Dan Albert
a2c10f1c7a Check for compatible squadrons when buying planes.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 19:58:45 -07:00
Dan Albert
d7768f86d3 Obey squadron mission types in auto-planning.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 19:58:45 -07:00
Dan Albert
dae3835eb0 Don't assign pilots to unused aircraft.
These "flights" are only created so that we can spawn the aircraft on
the ramp for OCA strikes. They shouldn't have pilots assigned.
2021-05-27 19:58:45 -07:00
Dan Albert
e9b5784d30 Update player slot advice for update UI.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 17:35:54 -07:00
Dan Albert
1521f0a9b1 Add on-leave toggle for pilots.
Pilots on leave will not be assignable to any flights (but will not be
unassigned from any already scheduled this turn).

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 17:09:09 -07:00
Dan Albert
9a9c351f47 Copy the list of random names as was intended.
Every name generated depopulated the global list which made reset do
nothing. Large numbers of TGOs (or generation of many campaigns) would
drain the list fully and new squadrons would no longer have a name list
to pull from.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1144
2021-05-27 16:32:21 -07:00
Dan Albert
4ec11ddea5 Auto-ASAP player packages based on preferences.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 16:04:51 -07:00
Dan Albert
f619b6b9fc Choose player pilots based on player preference.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 16:00:27 -07:00
Dan Albert
bcccb3206d Connect auto-ATO disable option.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/315
2021-05-27 15:43:47 -07:00
Dan Albert
11a8ff7f70 Add settings UI for auto-ato behavior.
https://github.com/dcs-liberation/dcs_liberation/issues/276
https://github.com/dcs-liberation/dcs_liberation/issues/315
2021-05-27 15:41:08 -07:00
Dan Albert
f6ab1aad77 Clean up signal handling in pilot roster editor. 2021-05-27 15:06:36 -07:00
Dan Albert
5a732acf64 Fix creating new fights to create player pilots.
This is just a hack that automatically converts the assigned pilots to
players if needed. This really needs to be replaced with a roster editor
like the flight edit screen has, but that also requires squadron
selection, which isn't a thing we're ready for yet.

https://github.com/dcs-liberation/dcs_liberation/issues/1139
2021-05-27 14:15:27 -07:00
Dan Albert
e4e06e0a6e Add player toggle to flight settings.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 02:18:57 -07:00
Dan Albert
28f20d47d3 Add player pilot invulnerability option.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 01:40:23 -07:00
Dan Albert
82ce688a0d Allow players to be defined in the squadron file.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 01:15:52 -07:00
Dan Albert
f36757b650 Add livery selection for predefined squadrons.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 00:56:05 -07:00
Dan Albert
ac4a7441e9 Add predefined squadron support.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 00:23:40 -07:00
Dan Albert
9091afe682 Remove very dead campaign.
This was never updated to the miz format. Patches welcome if someone
wants to bring it up to date.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1129
2021-05-26 23:05:57 -07:00
Dan Albert
e2034b19e7 Update missing clients advice.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 20:41:22 -07:00
Dan Albert
1b7a225f9d Replace client count with player pilots.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 20:33:23 -07:00
Dan Albert
a52043ef29 Allow toggling player/AI pilot state.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 20:33:15 -07:00
Dan Albert
b38d271f10 Show player/AI status for pilots.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 19:47:53 -07:00
Dan Albert
e480519855 Increase skill level for experienced pilots.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 19:34:24 -07:00
Dan Albert
8b8d1e87e7 Track missions flown for each pilot.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 19:04:06 -07:00
Dan Albert
cd6de191d1 Track pilot deaths.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 18:54:07 -07:00
Dan Albert
8b8e018521 Fix cases where pilots were not returned.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 18:49:19 -07:00
Dan Albert
5277beede3 Show active and available pilots in air wing view.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 18:18:22 -07:00
Dan Albert
57a2457050 Show aircraft type in the squadron list.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
2f8656d54f Generate random squadron nicknames.
A little weird that the animal names aren't plural, but good enough.

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
49102e510d Disallow creating missions with missing pilots.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
e7b8548698 Clean up more delegates.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
9c2bad85d5 Show number of missing pilots in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
4147d2f684 Initial squadrons implementation.
Doesn't actually do anything yet, but squadrons are created for each
aircraft type and pilots will be created as needed to fill flights.

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
6b30f47588 Fix airlifts always using player country. 2021-05-26 16:48:36 -07:00
Dan Albert
e49da6afd6 Inject the saved games path from preferences.
pydcs can't guess the saved games path accurately for all users, so
inject the path that they've told us is correct to work around that.

It seems pydcs has two problems:

1. Only `DCS` is checked, not `DCS.openbeta`.
2. Only `%USERPROFILE%/Saved Games` is used, so if the user has moved
   their Saved Games directory (but not their whole user profile) pydcs
   cannot find the location.

https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid would
be the starting place for fixing problem 2 properly. 1 is just a matter
of trying both.
2021-05-26 16:02:54 -07:00
Dan Albert
6fa0a29249 Update to Python 3.9.
This is what I've been using locally for ages and it seems to work fine.
2021-05-26 13:15:27 -07:00
bgreman
c163e2c981 Inject mod plane weapons into pydcs.
Adds a simple injector that iterates over attrs of an input class and
injects things that look like custom weapons into pydcs's weapons
classes.

Also updated all current mod aircraft configs to perform the injection.
2021-05-26 12:49:49 -07:00
Brock Greman
372bf9d97f Fixing F-22 loadouts 2021-05-26 01:46:29 -07:00
Dan Albert
619d5dd1b9 Teach sweep to care about multi-role too.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1124
2021-05-25 22:58:09 -07:00
Dan Albert
4939faf5fa Schedule SEAD with a one minute lead time. 2021-05-25 22:53:57 -07:00
bgreman
205e4aa707 Add ability to toggle between own/enemy intel. 2021-05-25 22:23:33 -07:00
Dan Albert
81ce7fbb62 Fix handling of empty polys in the new UI.
This was copied from the Qt map and tweaked, but the use cases are
slightly different so this needs to return an empty list for an empty
polygon instead of None.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1121
2021-05-25 19:19:45 -07:00
Dan Albert
de9651533f Load map.js explicitly from canvas.html.
Without this it's hard to get to map.js in the debug tools since Chrome
doesn't know about the anonymous js. Probably improves logging too.
2021-05-25 18:46:41 -07:00
Dan Albert
e6e31fd234 Actually ASAP the ASAP packages.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1117
2021-05-25 14:23:00 -07:00
Brock Greman
d242079a74 Making Sweep flight types have appropriate aircraft 2021-05-25 13:20:47 -07:00
Dan Albert
48f26cb181 Fix Bandar Abbas airfield data.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1114
2021-05-25 00:14:20 -07:00
bgreman
c37a5b2405 Prevent empty transfers.
Disables the 'create transfer order' button in the unit transfer dialog if no units are actually selected for transfer (including when the dialog is first loaded).
2021-05-24 20:43:33 -07:00
Dan Albert
d15bfaac76 Fix group targeting for multi-group TGOs.
AI flights were only getting a single Attack Group task against multi-
group TGOs (currently only a small group of SAMs like the SA-10, I
believe), so the AI would never attack the point defense SA-15 or AAA
groups.
2021-05-24 19:26:03 -07:00
Dan Albert
e94657875f Reselect same row after deleting waypoint. 2021-05-24 18:20:19 -07:00
Dan Albert
f2bd7300aa Improve precision of kneeboard lat/lon.
DMS with decimal seconds is what the hornet uses for PP targest. In the
future we'll want to make this aircraft specific (and potentially user
preference for jets like the A-10 that can handle both L/L and MGRS).
2021-05-24 18:06:47 -07:00
Dan Albert
c255aee3b9 Make default AEW&C missions ASAP. 2021-05-24 17:21:33 -07:00
Dan Albert
305d1f0523 Reset non-custom loadout when changing task. 2021-05-24 16:57:36 -07:00
Dan Albert
970f2c25dd Fix loadout reset when disabling custom loadouts. 2021-05-24 16:49:31 -07:00
Dan Albert
b7b3b35816 Make some waypoint types undraggable.
None of these (takeoff, landing, divert, bullseye, precise target
locations) can be usefully moved, so prevent it.
2021-05-24 16:45:21 -07:00
Dan Albert
e8f326ebce Update Skynet to 2.1.0. 2021-05-24 14:35:22 -07:00
Dan Albert
62b743025a Fix supply route clobbering, make immutable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1083
2021-05-23 17:30:50 -07:00
Dan Albert
7934463a53 Add base capture cheat to the new UI.
We don't have a context menu yet, so just add it to the base menu.

https://github.com/dcs-liberation/dcs_liberation/issues/1108
2021-05-23 17:18:01 -07:00
Dan Albert
d15ef63182 Remove unused method of ControlPoint. 2021-05-23 17:17:59 -07:00
Dan Albert
c7edba5120 Add TGO-specific layers.
This also splits the main and debug controls because the main list was
getting too long.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1069
2021-05-23 15:36:22 -07:00
Dan Albert
188f871bc8 Remove errant whitespace. 2021-05-23 15:01:10 -07:00
Dan Albert
31eba975fd Note flight planner changes.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1106
2021-05-23 15:00:27 -07:00
Dan Albert
2ea0bccd25 Hide dead opfor objectives.
These are just clutter.
2021-05-23 14:44:24 -07:00
Dan Albert
fa321c7ddc Don't plan SEAD when only a search radar remains. 2021-05-23 13:15:42 -07:00
Dan Albert
1d7b0c9b17 Tweak F/A-18 BARCAP and CAS loadouts.
Add bags to each. CAS only gets one but that should be plenty for only
four Mavericks. CAP gets two.
2021-05-23 13:07:16 -07:00
Dan Albert
a4fbcd2d02 Update pydcs for loadout loading fix. 2021-05-23 13:07:16 -07:00
Dan Albert
d788b286aa Remove unused UI classes. 2021-05-23 13:03:18 -07:00
Dan Albert
eedb5c26a9 Ignore non-escorted regions when planning escorts.
We shouldn't consider the non-escorted parts of the flight path when
checking for threats to determine if escorts should be used or not,
since escorts can't help in those areas anyway. This was causing escorts
to be overly requested since the bullseye is now a part of the
"flight plan", but could have also triggered for divert waypoints, or
for aircraft taking off in a retreat from a threatened location.
2021-05-23 13:01:44 -07:00
Dan Albert
ddd6e7d18f Improve detection of functional radar SAMs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1109
2021-05-23 13:01:44 -07:00
Dan Albert
eae0d6be94 Add threat zone drawing for the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-23 12:25:15 -07:00
Dan Albert
5e68dbe1ca Correct the list of units with radars.
Probably.

https://github.com/dcs-liberation/dcs_liberation/issues/1109
2021-05-23 01:30:23 -07:00
Dan Albert
98e0be6be9 Revert "Correct radar detection."
We need this after all, but we do need to audit the list. Will follow
up with that fix.

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

This reverts commit f68935735d.
2021-05-23 01:10:29 -07:00
Dan Albert
7450a6b7eb Configure more loadout fallbacks. 2021-05-22 20:12:56 -07:00
Dan Albert
c3802e5a37 Make UI created packages ASAP by default. 2021-05-22 19:35:56 -07:00
Dan Albert
43cd9bce67 Fix cargo ship locations in Abu Dhabi.
Apparently these ships have a > 32ft draft and these ports are shallow.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1104
2021-05-22 19:17:53 -07:00
Dan Albert
2f6ab6d2b0 Update Hornet loadouts, add DEAD loadout. 2021-05-22 17:11:10 -07:00
Dan Albert
2df17c32cd Clean up aircraft selector. 2021-05-22 17:11:10 -07:00
Dan Albert
16fff8d87a Fall back to SEAD loadout for SEAD escort.
These usually do not need to differ.
2021-05-22 17:11:10 -07:00
Dan Albert
1087069277 Fix F-14 SEAD/DEAD loadouts.
The AI doesn't use mixed loadouts effectively (only the TALDs get used
and the flight returns home with a full bomb load):
https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/

This makes the SEAD loadout TALDs only and the DEAD loadout bombs only.
2021-05-22 16:53:48 -07:00
Dan Albert
1b624e7e6f Remove center tank for F-16 loadouts. 2021-05-22 16:53:48 -07:00
Dan Albert
7223ae327a Add DEAD loadout for the F-16. 2021-05-22 16:45:06 -07:00
Dan Albert
bcdefda0db Make the F-15E CAS loadout less empty. 2021-05-22 16:45:06 -07:00
Dan Albert
fc56642631 Fix default mission length in the UI too. 2021-05-22 16:15:29 -07:00
Dan Albert
69299d395c Empty gun for AI missions that do not need a gun.
There is no "all but gun" RTB winchester option, so air to ground
missions with mixed weapon types will insist on using all of their
bullets after running out of missiles and bombs. Take away their bullets
so they don't strafe a Tor.

Exceptions are made for player flights and for airframes where the gun
is essential like the A-10 or warbirds.
2021-05-22 16:14:20 -07:00
Dan Albert
a789f58068 Allow SEAD escorts against broken SAMs and EWRs. 2021-05-22 15:37:31 -07:00
Dan Albert
f68935735d Correct radar detection.
This list includede units without radars and also missed units with
radars. Stop curating the list and just query the unit type.
2021-05-22 15:36:56 -07:00
Dan Albert
ba2157cc43 Tweak winchester behavior for SEAD escort.
They can't suppress air defenses after running out of TALDs or ARMs.
2021-05-22 15:09:10 -07:00
Dan Albert
57fe5c04ec Improve DEAD mission planning.
We don't need to include a SEAD flight in missions against EWRs or SAMs
that no longer have a radar.

Also plan DEAD missions against air defenses that have no radars.
Previously we would never finish killing launcher only sites (which
cannot defend any more, but are cheaper to return to working order than
a fully destroyed site) nor would we plan DEAD against IR SAMs or AAA.
2021-05-22 14:56:18 -07:00
Dan Albert
3a08944c99 Use the CAS DCS type for SEAD so F-14s can do it.
The CAS task type appears to be a superset of the SEAD task in every
way. Larger task variety as well as larger aircraft pool.
2021-05-22 14:27:30 -07:00
Dan Albert
b6154b273c Differentiate SEAD and SEAD escorts.
SEAD suppresses the package's target. SEAD escort protects the package
from any SAM threat along its flight path.
2021-05-22 14:24:13 -07:00
Dan Albert
e332bff362 Decrease error margin on TOT planning.
Everyone seems to do pretty okay generally, with the exception of
estimating ground ops time, which I've also increased (and is a
non-issue for runway/air start defaults).
2021-05-22 01:11:28 -07:00
Dan Albert
59e03434e4 Increase flight speeds to mach 0.85 or 85% of max.
Everyone seems a bit slow, generally. 0.85 is probably a better cruise
speed for supersonic jets and 85% of max is probably fine for subsonic.
2021-05-22 01:10:23 -07:00
Dan Albert
2ca0edf5fd Increase estimate for airfield ground ops.
5 minutes is pretty optimistic at most airfields.
2021-05-22 01:09:43 -07:00
Dan Albert
90dca9072e Change default mission duration to 60 minutes.
This seems like it works better for the number of missions we usually
frag, plus the fact that players will almost always choose an ASAP
package.
2021-05-22 01:04:10 -07:00
Dan Albert
c0ead4a484 Add icons for CPs. 2021-05-21 23:26:15 -07:00
Dan Albert
f8cb9e2bd3 Update Inherent Resolve to use non-random TGOs.
Also adds Ramat David to blue.
2021-05-21 19:13:32 -07:00
Dan Albert
df4dabf68f Add an LHA to Abu Dhabi. 2021-05-21 17:59:19 -07:00
Dan Albert
40720f9949 Fix convoy spawn point from Tabqa to Jirah.
The current spawn point is a disonnected road network according to the
map, so the convoy will never start moving because they have no route to
the destination.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1101
2021-05-21 17:54:01 -07:00
Dan Albert
7e7a1dce7b Fix icons for dead SAMs showing as damaged.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1099
2021-05-21 11:11:44 -07:00
Khopa
f31861441b Merge branch 'develop' into helipads
# Conflicts:
#	game/data/weapons.py
#	game/db.py
#	game/theater/conflicttheater.py
#	resources/factions/france_1995.json
#	resources/factions/insurgents.json
#	resources/factions/iraq_1991.json
#	resources/factions/syria_1967_with_ww2_weapons.json
#	resources/factions/syria_2011.json
2021-05-21 13:58:22 +02:00
Dan Albert
39b9a7f0ed Note DCS bugs that are common issues. 2021-05-21 00:24:12 -07:00
Dan Albert
43010779d4 Enable multirole fighter targeting for escorts.
pydcs didn't support this until now :(
2021-05-20 23:58:05 -07:00
Dan Albert
a1a4fc8c7c Update pydcs. 2021-05-20 23:57:52 -07:00
Dan Albert
621e4a513c Fix DEAD flights to use more than just missiles.
It doesn't seem like AI pilots are capable of using more than one weapon
effectively (see link below), but this at least makes DEAD flights work
when the DEAD flight is carrying only one type of weapon and some other
flight is performing SEAD.

https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/
2021-05-20 23:51:39 -07:00
Dan Albert
6c821039b5 Add a spectator slot.
So I stop accidentally giving orders while testing AI behavior after
waiting 20 minutes for them to get to their objective.
2021-05-20 21:46:20 -07:00
Dan Albert
f80b948fb1 Fix loadout downgrading bugs.
If the pylon had no weapon this would raise, and if no replacement was
found we wouldn't clear the pylon.
2021-05-20 21:10:02 -07:00
Dan Albert
d4c27da892 Move the strike eagle down the CAP list.
Most of the pylons are not actually capable of carrying air to air
missiles.
2021-05-20 20:12:49 -07:00
Dan Albert
11bf0ca868 Replace JSOW fallbacks with walleyes.
The GBU-12 that was chosen doesn't fit on the hornet in the first place,
and we ought to replace glide bombs with glide bombs.
2021-05-20 19:58:26 -07:00
Dan Albert
664092c023 Remove non-CP FOBs. 2021-05-20 19:01:43 -07:00
Dan Albert
0cd2c4a90c Stop awarding income for FOB structures.
The CP already grants income.

Fixes: https://github.com/dcs-liberation/dcs_liberation/issues/685
2021-05-20 18:59:03 -07:00
Dan Albert
2f6c04a86d Add bullseye to the kneeboard.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/136
2021-05-20 18:35:32 -07:00
Dan Albert
a382e74a89 Set up bullseye early, create waypoints.
Setting this up as part of the game makes it possible for us to show in
the UI.

https://github.com/dcs-liberation/dcs_liberation/issues/136
2021-05-20 18:29:35 -07:00
Khopa
3c8c76f50d Unit support : La Combattante II class ship 2021-05-21 02:45:15 +02:00
Khopa
cbce379132 Unit support : T-155 Firtina 2021-05-21 02:29:31 +02:00
Dan Albert
e795e96bfb Don't show red support units on blue kneeboards.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1080
2021-05-20 17:24:39 -07:00
Khopa
e12e2c4b0b Unit support : Chieftain Mk3 2021-05-21 02:24:14 +02:00
Khopa
9a1b21a2fa Unit support : PT-76 2021-05-21 02:19:52 +02:00
Khopa
79708f9ba6 Unit support : VAB Mephisto 2021-05-21 02:06:35 +02:00
Dan Albert
102544877d Fix common cases of kneeboard overflow. 2021-05-20 16:57:35 -07:00
Dan Albert
1c32ae1227 Create default strike target implementation. 2021-05-20 16:50:01 -07:00
Dan Albert
55d7e444c7 Split support info into its own kneeboard page.
The first page is getting very crowded.
2021-05-20 16:25:06 -07:00
Khopa
cc93c686d9 pydcs update for DCS 2.7.1 2021-05-21 01:17:56 +02:00
Khopa
9243fd499b pydcs update for DCS 2.7.1 2021-05-21 01:15:54 +02:00
Khopa
d5990e60c9 Helicopter flights can be planned from FOBs 2021-05-21 00:34:51 +02:00
Khopa
844dc48d65 Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2021-05-20 13:23:06 +02:00
Dan Albert
52d96b8518 Include steerpoint number in strike page.
https://github.com/dcs-liberation/dcs_liberation/issues/1001
2021-05-20 00:20:48 -07:00
Dan Albert
8274e68846 Add SEAD/DEAD target info kneeboard page.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/965
2021-05-20 00:13:49 -07:00
Dan Albert
f1adcd1836 Be permissive about presumably incorrect loadouts.
These might be broken loadouts, or might be broken pydcs data. In case
it's the latter, attempt to load the pylon. DCS will remove the weapon
if it's not compatible automatically.
2021-05-19 23:33:24 -07:00
Dan Albert
2a77f57aa4 Improve AI strike targeting.
We were setting up all the correct *target* waypoints but the AI doesn't
use the target waypoints; they use the targets property of the ingress
waypoint. This meant that the flight plan looked correct in the UI and
was correct for players but the tasks were set up incorrectly for the AI
because building TGOs are aggravatingly multiple TGOs with the same name
in the implementation.

Mission targets now enumerate their own strike targets so that this
mistake is harder to make in the future.

This won't be perfect, the AI is still not able to parallelize tasks and
since buildings aren't groups they can only attack one structure at a
time, but they'll now at least switch to the next target after hitting
the first one.

As a bonus, stop bombing the dead buildings.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/235
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/244
2021-05-19 23:33:15 -07:00
Dan Albert
04ebe4c68a Add the rest of the TGO icons. 2021-05-19 21:40:36 -07:00
Dan Albert
1c7e065c52 Add more icons. 2021-05-19 21:24:54 -07:00
Dan Albert
80f3857f44 Stop forcing open CP tooltips.
These obscure the TGOs around them. Easy enough to mouse over, and the
names aren't the important part.
2021-05-19 20:49:51 -07:00
Dan Albert
3b62831401 Replace icons for some TGOs.
Only covered about half of the types so far.

This also removes the clustering, since that doesn't really seem to be
needed with the newer icons.
2021-05-19 20:47:52 -07:00
Khopa
a047e1d063 Updated Operation Dynamo campaign 2021-05-19 14:03:24 +02:00
Khopa
45985e1684 Updated payloads for Ju-88A4 2021-05-19 13:24:11 +02:00
Dan Albert
7dac886375 Remove fixed todo from the map. 2021-05-18 23:55:00 -07:00
Dan Albert
af3b8a9902 Set up icons for TGOs.
These are just the old icons, but it's better than nothing.
2021-05-18 23:35:25 -07:00
Dan Albert
4e37666037 Clean up the category property of TGOs.
This really needs to be a proper type, but this is a start: create new
categories for the types of TGOs that are missing. This removes some
icon special cases.
2021-05-18 23:35:25 -07:00
Dan Albert
2769d32c81 Mark enemy transfers in the transfer menu.
https://github.com/dcs-liberation/dcs_liberation/issues/1069
2021-05-18 21:20:38 -07:00
Dan Albert
4b004320a4 Make the transfer button more obvious.
https://github.com/dcs-liberation/dcs_liberation/issues/1069
2021-05-18 21:17:38 -07:00
Dan Albert
edfc879b41 Reorder some CAS aircraft priorities.
Move the harrier up, and the F-14s and B-1 down.
2021-05-18 21:04:11 -07:00
Dan Albert
0879d1da0d Use the best aircraft rather than first found.
The priority list was guiding the purchase decision which largely meant
that this was working correctly, but there were suboptimal cases where
the list was being taken in FIFO order by purchased type. This fixes the
search to be locally optimal, although this does still mean that a worse
but closer aircraft will be chosen over a better but slightly farther
away aircraft. We'd need to have a quality vs distance rating to do
better.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/755
2021-05-18 21:01:26 -07:00
Dan Albert
c5159f8a87 Fix swapped list order for purchase priorities.
We were accidentally iterating over the faction list and checking it
against the priority list rather than the other way around, so the
faction's aircraft list was being used for purchase priority rather than
the actual priority list in the game.
2021-05-18 19:54:39 -07:00
Dan Albert
a0d9bf0f26 Add Ju-88 to the CAS, strike, and DEAD lists.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1008
2021-05-18 19:51:27 -07:00
Dan Albert
a3cce8ff72 Invert the random location warning.
Campaigns should no longer be using these. Remove the warning when a
location cannot be found, and emit a warning when they are used.
2021-05-18 19:36:20 -07:00
Dan Albert
242f00390d Fix purchasing past 0 budget for ground units too.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1032
2021-05-18 19:23:29 -07:00
Dan Albert
f4b64370bb Remove fallback for old non-convoy behavior. 2021-05-18 19:21:43 -07:00
MaHuJa
ae57e4da83 Black sea campaign, inverted: "Russia" now blue. 2021-05-18 19:17:32 -07:00
Dan Albert
cd391a360c Add support for AAA objectives.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/999
2021-05-18 17:29:42 -07:00
Schneefl0cke
dcbe12f1af Changed latest planned flight to desired game settings. 2021-05-18 11:54:56 -07:00
Dan Albert
5b61cfe922 Remove random objectives from Abu Dhabi. 2021-05-18 00:48:12 -07:00
Dan Albert
739406614d Add support for required variants of all TGOs.
Adds required variants of:

* SHORADS
* Armor groups
* Buildings
* Oil rigs
* Coastal defenses
* Missile sites
* Ships

This is prep work for removing random generation.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1076
2021-05-18 00:48:12 -07:00
Dan Albert
8076206a90 Add major/minor versioning of the campaign schema.
Many of the schema version increases are just to add new features that
don't render old campaigns obsolete. Convert the version number to a
major/minor format so we can detect the difference between changes that
render old campaigns obsolete (major versions) and new features that
will not work on older builds of Liberation (minor versions).
2021-05-18 00:12:55 -07:00
Dan Albert
f63d218aae Fix loadouts to work with clean pylons. 2021-05-17 21:28:12 -07:00
Dan Albert
f2e3ccd18c Add loadout names for every Liberation task type.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/867
2021-05-17 01:51:21 -07:00
Dan Albert
d41e69d770 Add DCS loadout selector.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/273.
2021-05-17 01:24:55 -07:00
Dan Albert
0e3bc1ce43 Loadout implementation cleanup.
Loadout selection no longer has two (disagreeing) implementations. What
the UI shows is now what the miz will have.

We now store the chosen layout in the Flight *always*, not just for
custom loadouts. This means that we do loadout lookups at the start of
each turn, but the data is cached in pydcs.

Era-specific loadout degradation is still done at generation (and
presentation) time. This is so that players can toggle that option and
have it affect the *current* turn, rather than the next one.
2021-05-17 01:23:00 -07:00
Dan Albert
6ca175345f Fix DEAD for many bombers, audit DEAD/SEAD lists.
Many of the aircraft that we use for DEAD are not actually capable of
the SEAD task in DCS, so they were being loaded as some other task type,
usually one that doesn't support Attack Group, which made them lose
their waypoint actions and do nothing.

This switches them to using CAS which supports a superset of the SEAD
capable aircraft.

I've also audited the SEAD/DEAD lists. The F-117 was removed because it
is not capable of Attack Group *at all*, and all the non-SEAD aircraft
that are capable of ground attack moved from SEAD to DEAD.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1086
2021-05-16 22:23:01 -07:00
Dan Albert
c063a638cd Disable double click zoom action.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1087
2021-05-16 21:59:48 -07:00
Dan Albert
2dfe1420bc Add "Show all" option for flight plans.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1085
2021-05-16 13:15:51 -07:00
Dan Albert
7dd379c5c3 Show active supply routes in the new UI. 2021-05-16 12:58:03 -07:00
Dan Albert
752eb6235d Remove errant factory from Abu Dhabi.
This wasn't supposed to be here, and it wasn't showing up until I fixed
the bug preventing FOBs from spawning factories.
2021-05-16 12:55:20 -07:00
Dan Albert
3f077727ae Group allied and enemy SAM controls. 2021-05-15 22:08:00 -07:00
Dan Albert
51d557524d Fix unit list for non-building TGOs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1082
2021-05-15 22:05:14 -07:00
Dan Albert
5d9563304f Update commit boundaries after moving waypoints.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1084
2021-05-15 21:57:37 -07:00
Dan Albert
53cb68f82c Make waypoints draggable. 2021-05-15 16:21:03 -07:00
Dan Albert
95b107ffad Pop up CV move errors. 2021-05-15 14:22:19 -07:00
Dan Albert
06dedf51aa Improve CV waypointing UX. 2021-05-15 14:12:43 -07:00
Dan Albert
ed7c8c11d9 Make CV waypoint less janky.
The CP is now draggable when there is no destination. Otherwise the
destination is draggable.
2021-05-15 13:23:56 -07:00
Dan Albert
643e5954f3 Cluster TGOs less aggressively. 2021-05-15 12:41:04 -07:00
Dan Albert
c7cc9d2a65 Disable SAM threat fill, thicken outline.
As predicted, this only runs well on my machine.
2021-05-15 12:36:56 -07:00
Dan Albert
5050914d25 Make the new UI the default. 2021-05-15 03:38:29 -07:00
Dan Albert
31fa2d866f Allow setting CV routes in the new UI.
This is a pretty janky system until we get add context menu support. For
now the destination is set by dragging the CV marker and cleared by
right clicking the destination marker. Once we have a context menu a
context action will begin setting the destination the way it did in the
old UI, and the destination marker will be draggable.
2021-05-15 03:35:35 -07:00
Dan Albert
4a096cb728 Use load instead of setHtml so paths resolve.
Without this we can't resolve local paths to files.
2021-05-15 01:21:25 -07:00
Dan Albert
16b52f929c Bring CP markers to the front. 2021-05-15 00:21:22 -07:00
Dan Albert
8ec133830f Don't tell the UI about CP TGOs.
These are an implementation quirk, and passing them to the UI just means
that we put TGO pins on top of the CP, which makes the base menu
unopenable.

In the old UI we avoided this by not drawing anything that was
`for_airbase`, but now that we can zoom in further we're drawing base
defenses.
2021-05-15 00:10:05 -07:00
Dan Albert
c144799a11 Shade SAM threat ranges.
This runs a little bit worse but looks a lot better. Will flip back off
if this runs poorly on less powerful computers.
2021-05-14 23:58:37 -07:00
Dan Albert
e56511a05a Ack campaign version 4 for Abu Dhabi.
V4 is scenery objects, so not required.
2021-05-14 23:48:58 -07:00
Dan Albert
bdb959d986 Draw patrol commit ranges in the new map. 2021-05-14 23:41:55 -07:00
Dan Albert
dae9c368b7 Replace var with const/let in map.js. 2021-05-14 23:18:34 -07:00
Dan Albert
2a401a302d Add a topographic map layer. 2021-05-14 23:10:04 -07:00
Dan Albert
ff3b8e5270 Note scenery objective support in the changelog. 2021-05-14 17:19:49 -07:00
SnappyComebacks
bb1a066ff7 Let map objects be Strike targets.
This PR allows campaign creators to incorporate map objects (referred to as Scenery in the code) into their Liberation campaign.

Map objects are defined using white trigger zones created by right clicking on scenery and clicking `assign as...`.   Objective groups are defined by creating a blue TriggerZone surrounding the centers of the white trigger zones.  The type of objective is determined by the campaign creator, assigning the value of the first property of the blue TriggerZone with the objective type.

Map objects maintain their visually dead state by assigning a `Mission Start` `Scenery Object Dead` trigger to the trigger zone.  It is important for the Liberation generated TriggerZone to be as small as possible so that no other scenery is marked dead by DCS.

TriggerZones are hidden during gameplay (DCS behavior.  I don't know if it's possible to turn that off.)  TriggerZones are visible in the mission editor and mission planner however.  If a player is using an older plane, it is important for them to remember where the target is.

In the mission planner, the trigger zones' will be blue or red depending on which faction the map objects belong to.

Inherent Resolve campaign has been modified to integrate scenery objects.

### **Limitations:**
- Objective definitions (Any Blue TriggerZones) in campaign definition cannot overlap.
- Map object deaths in `state.json` is tracking integers.  You won't know what died until debriefing.
- No images for the various buildings.  In theory it can be done, but an unreasonable amount of work.
- Every blue trigger zone must have a unique name.  (If you let DCS auto increment the names this is not a concern.
- No output to screen when scenery object is dead.  You can see the building drawn as dead in the F10 map though.


### **Pictures:**

An objective:
![CampaignCreation](https://user-images.githubusercontent.com/74509817/117526797-c294af00-af84-11eb-9fb7-3940db64c5d8.png)

How the objective looks once in the mission planner/editor.  This objective belongs to the enemy faction:
![MissionPlanner](https://user-images.githubusercontent.com/74509817/117526819-ece66c80-af84-11eb-9db0-64000dedcf89.png)
2021-05-14 17:18:03 -07:00
Dan Albert
9a9872812f Generate factories at FOBs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1021
2021-05-14 11:38:14 -07:00
Khopa
969e4a2d65 Merge remote-tracking branch 'khopa/develop' into develop 2021-05-14 16:16:11 +02:00
Khopa
77f0b87c54 Campaigns : Migrated campaign Golan Height to version 3 2021-05-14 15:31:46 +02:00
Dan Albert
eec56256e8 Add AEW&C aircraft to the faction aircraft list.
To avoid confusion, use only the aircraft list for the purchasable
aircraft. This fix also caught a faction's Tu-142 that was not actually
purchasable. Invalid aircraft in the faction aircraft list will now
raise an error.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1074
2021-05-13 21:44:07 -07:00
Dan Albert
99dc91dcb4 Fix game break when capturing factory.
We need to recompute the transit networks after a capture *before*
processing transfers. Otherwise units deployed that turn will not be
able to find their destination.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1070
2021-05-13 21:00:13 -07:00
Dan Albert
5adcfbd7bd Work around PySide2 bug in Property.
https://bugreports.qt.io/browse/PYSIDE-1426

For whatever reason this only shows up in packaged builds for us, and
also the recommended workaround of using a member property rather than a
decorated method does not work for us.

Until PySide2 5.15.3 (or later) is released, we need to use a named
signal for every property we expose.
2021-05-13 20:24:22 -07:00
Dan Albert
3c5f1f7c4b Log python version at startup. 2021-05-13 19:16:54 -07:00
Dan Albert
4415429661 Stop requiring user input for mkrelease.py. 2021-05-13 19:16:40 -07:00
Dan Albert
92c404fbb6 Persist DCS configuration across installs. 2021-05-13 18:55:48 -07:00
Khopa
956b9aaf95 Updated campaign "Russia Small" to campaign version 3 2021-05-13 19:30:10 +02:00
Khopa
c8348f1b44 Added campaign Operation Dynamo for The Channel map. 2021-05-13 18:59:53 +02:00
Dan Albert
d73ceb374c Add front lines to new map UI.
Only shows an approximate front line. Still need support for "actual".
2021-05-13 01:49:35 -07:00
Dan Albert
3e01953a3a Supply route styling, line weight rebalancing. 2021-05-13 01:23:15 -07:00
Dan Albert
1a65b1affb Connect CP/TGO package fragging dialogs. 2021-05-13 01:05:15 -07:00
Dan Albert
dd75078019 Connect TGO dialogs. 2021-05-13 00:56:35 -07:00
Dan Albert
1ab205cb46 Add tooltips for TGOs. 2021-05-13 00:44:47 -07:00
Dan Albert
eb26d54ac1 Show tooltips automatically based on zoom level. 2021-05-13 00:16:59 -07:00
Dan Albert
d884645f37 Cluster TGO markers. 2021-05-12 23:43:47 -07:00
Dan Albert
45f0c3c85f Add map scale widget. 2021-05-12 23:30:54 -07:00
Dan Albert
4e498e6932 Add waypoint info tooltip to the new map. 2021-05-12 23:03:53 -07:00
Dan Albert
d9d68cd37c Add a new Leaflet based map UI.
This is extremely WIP. It is not usable for play yet. Enable with
`--new-map`.
2021-05-12 21:52:23 -07:00
Schneefl0cke
56abd0bb7f Add option for setting desired mission length. 2021-05-11 03:13:15 -07:00
Dan Albert
747683e9e8 Allow other TGO types to be factories.
The `FactoryGroundObject` is just a special case of
`BuildingGroundObject` that we maybe don't actually need. For now it
provides some special case logic for the layout, but this allows any TGO
with the "factory" category to behave as a ground unit source.

Note that the "factory" random strike targets are *not* generated
anymore, so this doesn't affect campaign design currently.
2021-05-10 20:21:19 -07:00
Hornet2041
5b191d72a6 Add F-4E Phantom to the list of CAS/STRIKE capable planes. 2021-05-10 18:14:56 -07:00
Dan Albert
b7619630cf Add logged_duration context manager for profiling. 2021-05-08 18:06:55 -07:00
Dan Albert
de07f10e57 Remove fixed TODO. 2021-05-08 16:50:35 -07:00
Dan Albert
87e6080215 Fix "show actual front line location". 2021-05-08 16:49:05 -07:00
Dan Albert
e721a234e1 Clean up front line code.
The routes do not need be be recreated each time we create a
`FrontLine`. The front lines follow the convoy routes, which are static.
Add the convoy route data to the `ControlPoint` the way we do for
shipping lanes and have `FrontLine` load the data from there.
2021-05-08 16:46:02 -07:00
Dan Albert
67289bbba2 Fix now obvious reversal of convoy friendliness.
Convoy attack and shipping attacks were being planned against *only*
friendly targets. The renaming made the bug obvious.
2021-05-07 21:10:22 -07:00
Dan Albert
b0c24f6e51 Refactor front line code to make sides explicit.
A was intended to be the blue point and B was intended to be the red
point. Make this a part of the name so that's clear, and clean up
related code to keep that reliable.
2021-05-07 21:10:22 -07:00
Dan Albert
12f474ecbe Fix name of Al Minhad for latest DCS version. 2021-05-07 19:59:34 -07:00
Dan Albert
e2f20a7a65 Fix initialization order of turn 0.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/674
2021-05-07 19:58:39 -07:00
Dan Albert
58ffabe2d6 Fix aggressive objectives in Abu Dhabi.
Some of the objective locations for the starting front line are too
aggressive and put opfor at a disadvantage since blue ships might start
so close to their bases.
2021-05-07 19:37:25 -07:00
SnappyComebacks
426f06045e Updated pydcs version. 2021-05-07 19:13:45 -07:00
Dan Albert
2ca875192a Save budget for filling whole packages.
No sense filling airbases with cheap escorts if we'll never afford the
rest of the package. Filling the airbases with cheap escorts also makes
it impossible to buy the rest of the package when the faction eventually
does have the money since there's nowhere to park the needed aircraft.

https://github.com/dcs-liberation/dcs_liberation/issues/1058
2021-05-07 18:22:52 -07:00
Dan Albert
36b2f24de9 Skip planning for faction incompatible missions.
Required for improving purchasing as well, since we need to not halt
purchasing when a faction has no AEW&C aircraft.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/683
2021-05-07 18:22:52 -07:00
Dan Albert
2cf3b3be2b Fix bug causing overpurchase of aircraft.
After fulfilling a request we were not exiting the loop, so we'd fulfill
the request for the aircraft at _all_ the bases capable of operating it
until either the bases were full or the budget ran out. In factions like
Iraq 1991 this could cause the budget to be spent on tons of cheap
MiG-19s while never buying the more expensive Su-17s or Su-24s that they
need to actually complete a package.

https://github.com/dcs-liberation/dcs_liberation/issues/1058
2021-05-07 17:25:14 -07:00
Dan Albert
8320c6940b Fix map centering for CLI generated games. 2021-05-07 17:13:53 -07:00
Dan Albert
3c9d21e38d Fix CLI campaign generator.
Factions can be loaded from the user directory now so we need to know
where that is.
2021-05-07 17:13:03 -07:00
Dan Albert
0d7f00aef6 Fix lint error. 2021-05-07 16:58:42 -07:00
Dan Albert
1640763a7f Show parking status for enemy airfields. 2021-05-07 15:30:09 -07:00
Dan Albert
0ec5346574 Auto center the map on load.
Stops all PG campaigns from starting with their view pointed way up
north at the empty mountains.
2021-05-07 14:55:33 -07:00
Khopa
977845e2f4 Fixed links to github in the repo to account for the transfer to the new github organization. 2021-05-07 13:08:39 +02:00
Khopa
4bb2ab73c1 Changelog update 2021-05-07 13:03:15 +02:00
Khopa
af5584d244 Added a settings to control the amount smoke effects on frontlines. Default smoke spacing changed from 800 to 1600 (half the current amount) 2021-05-07 12:49:56 +02:00
Khopa
b289e41a0d Merge remote-tracking branch 'khopa/develop' into develop 2021-05-07 01:01:00 +02:00
Khopa
c0b4eef948 Updated readme for new organization repo link 2021-05-07 01:00:41 +02:00
Marcos Sigueros Fernández
b8e6c2fe78 Check for empty package before estimating TOT.
Fixes https://github.com/Khopa/dcs_liberation/issues/1014.
2021-05-03 11:01:41 -07:00
Dan Albert
b10e86e484 Add support for user faction directory.
This allows users to install custom factions to their home directory
rather than the Liberation install directory. Makes it easier to keep
mods across Liberation downloads, and easier for us devs to keep custom
factions without git always wanting us to add them.
2021-05-02 14:35:21 -07:00
Dan Albert
1c31cffe4b More Python 3.9 compat. 2021-05-02 14:33:24 -07:00
Dan Albert
b9822cd5d1 Python 3.9 compatibility.
This argument was removed and wasn't needed anyway since the file itself
is already opened UTF-8.
2021-05-02 14:31:08 -07:00
Dan Albert
ef1c70123c Remove duplicate SH-60s from factions. 2021-05-02 14:19:47 -07:00
Dan Albert
c245531d65 Update changelog for 2.5.1.
(cherry picked from commit 4555a4968d)
2021-05-02 13:18:21 -07:00
Dan Albert
522495fd11 Update pyinstaller.
Need a version smart enough to handle pyproj.

Fixes https://github.com/Khopa/dcs_liberation/issues/1049.
2021-05-01 11:06:01 -07:00
Marcos Sigueros Fernández
b2a551dc63 FIX: Purchase from airfield or anywhere allows negative budget. 2021-04-29 00:57:48 -07:00
SnappyComebacks
840107c69e Move base EWRs into their own category.
Without this we're sometimes spawning base EWRs at points far outside the base perimeter.
2021-04-28 21:08:54 -07:00
Dan Albert
2a06a1ffdf Add proof-of-concept target info kneeboard page.
This is extremely rough and just serves as an example of how to use the
map projection API.
2021-04-27 21:20:11 -07:00
Dan Albert
8a01209ded Add data for lat/lon conversions. 2021-04-27 21:20:11 -07:00
Dan Albert
2b8dfc9dbc Stop counting neutral base captures in status.
These had no effect but were being counted on the waiting for mission
results page. Cleaned up the implementation a bunch while I was here.

Fixes https://github.com/Khopa/dcs_liberation/issues/1037
2021-04-26 17:54:32 -07:00
Dan Albert
e9f25eb562 Remove unused file.
mypy is flagging problems with this in the github action but not locally
for whatever reason, but it's not used so just delete it.
2021-04-25 20:30:55 -07:00
Dan Albert
475c7fd6db Update black and mypy requirements. 2021-04-25 18:46:37 -07:00
HerrTom
fa5d64022d Condense budget and intel sections of the top panel.
Budget and Intel panels now house a single button instead of separate Details buttons. Makes the top bar more compact and can fit in a 1080p monitor now.
2021-04-25 18:38:45 -07:00
Dan Albert
5c0f6cf65e Flip default for factory feature flag.
This is feature complete, we have a handful of campaigns that work with
the new mode now and it will be the only option at some point.
2021-04-25 18:20:20 -07:00
Dan Albert
0f8d366e31 Reformat with the latest black. 2021-04-25 18:09:33 -07:00
Dan Albert
9e2e593825 Improve transport descriptions. 2021-04-25 17:38:05 -07:00
Dan Albert
028bfc11eb Fix convoys skipping intermediate stops. 2021-04-25 17:38:05 -07:00
Dan Albert
b6cf7a4534 Fix cancelling convoys and cargo ships.
Not sure when I broke this but all transports were being cancelled as if
they were airlifts.
2021-04-25 17:10:24 -07:00
Dan Albert
0779679b99 Connect networks to enable multi-mode transfers.
Removing the per-transit type supply routes allows us to find the best
route from A to B even if the unit needs to switch transit modes along
the way.

The "best" route is the one that will generate better gameplay. That is,
convoys are preferred to ships (use cases for GMT are rare in DCS), and
ships are preferred to airlift (reasons to attack cargo ships are also
rare). Avoiding airlift is also a good strategic choice generally since
it consumes aircraft that could be performing other missions.

The extreme weight against airlift in the pathfinding algorithm could
probably be scaled way down so that airlift would be given preference
over a very long trip, possibly only for urgent transfers.

Later when we add rail that will probably be given the most preference,
but possibly between road and shipping.

https://github.com/Khopa/dcs_liberation/issues/823
2021-04-25 17:02:18 -07:00
Dan Albert
a48ef69e41 Disband cargo ships after processing.
Shipping lanes that received a ship would never lose their ships when
transfers completed, so the line on the map was staying solid (and
probably targetable).
2021-04-25 14:43:25 -07:00
Dan Albert
64d7953e50 Fix crash when opening FOB menus. 2021-04-25 14:39:32 -07:00
Dan Albert
21c35b31d4 AI planning for anti shipping missions.
Same as for anti convoy, these are rarely planned due to ordering issue
between mission planning and procurement.

Fixes https://github.com/Khopa/dcs_liberation/issues/826
2021-04-25 14:37:49 -07:00
Dan Albert
2d64acf299 Add mission targeting for cargo ships.
https://github.com/Khopa/dcs_liberation/issues/826
2021-04-25 14:31:13 -07:00
Dan Albert
e80819fc06 Add campaign inversion support to Abu Dhabi. 2021-04-25 14:17:24 -07:00
Dan Albert
7e40d58d04 Add cargo ships to the sim, track kills.
Not targetable yet.

https://github.com/Khopa/dcs_liberation/issues/826
2021-04-25 14:12:59 -07:00
Dan Albert
ba8fafcc95 First pass at cargo ships.
The simple form of this works, but without the multi-mode routing it'll
only get used when the final destination is a port with a link to a port
with a factory.

These also aren't targetable or simulated yet.

https://github.com/Khopa/dcs_liberation/issues/826
2021-04-25 12:10:06 -07:00
Dan Albert
42694d2004 Update 3.0 compatible campaigns to latest version.
Adds shipping lanes to Battle of Abu Dhabi. The others are acking the
new requirement but don't have an viable shipping lanes so no changes
are needed.
2021-04-24 21:55:40 -07:00
Dan Albert
5e67ce0ab2 Add shipping lane support to campaign files.
These don't actually do anything yet, this is just the campaign support
and UI.

https://github.com/Khopa/dcs_liberation/issues/826
2021-04-24 21:33:21 -07:00
Dan Albert
97b73e1a01 Add a north-to-south PG campaign.
Going to use this as the test bed for shipping transfers.
2021-04-24 19:43:40 -07:00
Dan Albert
4239257000 Add UAE 2015 faction.
Same as 2005 but with the Patriot  and some additional utilit aircraft.
2021-04-24 18:09:53 -07:00
Dan Albert
6bd94761d0 Update pydcs. 2021-04-24 15:33:51 -07:00
Starfire13
bc54e57fd4 Update campaigns and the splash damage plugin. 2021-04-24 15:30:31 -07:00
Dan Albert
17751e52fd Clear transports when disbanding convoys.
Also changes when we clear the convoys. Because we plan when transfers
are added (to plan UI orders immediately) we were planning convoys when
delivering units, then clearing the convoys, then planning them again.

Aside from the wasted effort, when we cleared the convoys we forgot to
tell the transfer that they no longer had transport, so when replanning
they did not get a new convoy.
2021-04-24 15:18:45 -07:00
Dan Albert
6016ebd3b4 Get transports from the closest airfield.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 23:24:25 -07:00
Dan Albert
8a44fc19ee Limit range for transport helicopters.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 23:24:25 -07:00
Dan Albert
f69450e2ae Add auto-procurment for airlift assets.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 23:24:25 -07:00
Mustang-25
3161ccced3 Re-adds GAR-8 (now AIM-9B in DCS) Fallback dates (#1025) 2021-04-23 22:25:11 -07:00
Dan Albert
909aad22a6 Make landing stops for cargo missions.
Until pydcs supports the timeReFuAr property this will have a wait time
of zero minutes, but it does seem to work.

Updating to https://github.com/pydcs/dcs/pull/132 will make the wait
time work automatically.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 22:19:54 -07:00
Dan Albert
c8b4fd1690 Use any (and only) transport aircraft for airlift.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 22:06:38 -07:00
Dan Albert
dac2271084 Add transport aircraft to US factions. 2021-04-23 22:06:38 -07:00
Dan Albert
5320d20f71 Add C-130 to the CAS capable list, clean up. 2021-04-23 21:21:05 -07:00
Dan Albert
20d8cc2b47 Plan transports at the beginning of the turn.
https://github.com/Khopa/dcs_liberation/issues/823
2021-04-23 20:31:52 -07:00
Dan Albert
d3fdbdbca5 Fix convoys not spawning where they should. 2021-04-23 20:23:23 -07:00
Dan Albert
d80f7ebf3b Refactor transfers to support unfulfilled orders.
This gives a clean break between the transfer request and the type of
transport allocated to make way for transports that need to switch
types (to support driving to a port, then getting on a ship, to a train,
then back on the road, etc).

https://github.com/Khopa/dcs_liberation/issues/823
2021-04-23 20:10:29 -07:00
C. Perreau
d6c84e362f Merge pull request #1012 from SpaceEnthusiast/develop
Added and modified factions
2021-04-24 00:13:45 +02:00
Khopa
6aba07c33b Fixed ai_flight_planner for maps lacking frontlines (such as battle of britain on The Channel map) 2021-04-24 00:10:57 +02:00
Dan Albert
45913b0add Bump to 3.0.
DCS version numbers and Liberation version numbers are getting
confusing. Push us ahead before we're both on 2.7.
2021-04-23 01:11:46 -07:00
Dan Albert
c258409a8d Add AI planning for airlifts.
Downside to the current implementation is that whether or not transports
that were purchased last turn will be available for airlift this turn is
arbitrary. This is because transfers are created at the same time as
units are delivered, and units are delivered in an arbitrary order per
CP. If the helicopters are delivered before the ground units they'll
have access to the transports, otherwise they'll be refunded. This will
be fixed later when I rework the transfer requests to not require
immediate fulfillment.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 01:10:03 -07:00
Dan Albert
26cd2d3fef Add todo for transfer refactor. 2021-04-22 22:24:57 -07:00
Dan Albert
4069074f41 Move unit delivery out of an unrelated file.
Historically this inherited from Event but there was no reason for that.
That's gone now. Finish the separation and move the unit order tracking
class out of the combat results reaction class's file.
2021-04-22 22:15:45 -07:00
Dan Albert
182422249f Remove support for mizdata/random locations.
The introduction of factories broke every existing campaign so we don't
need to keep support for the ancient formats any more.
2021-04-22 22:12:52 -07:00
Dan Albert
29b70b3247 Track airlift cargo kills.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-22 19:22:41 -07:00
Dan Albert
e474748f4d Stop projecting threat zones from front lines.
This is an interim improvement since we should probably be pushing the
BARCAPs into TARCAP roles when the front line is so close. This does
regress flight pathing for anything that should route around the front
(to avoid getting shot at by SHORADS and TARCAPs), but for now it's one
or the other and this is the one everyone's complaining about.
2021-04-22 18:20:26 -07:00
Dan Albert
132ba905c7 Generalize commit range display for all patrols.
Fixes https://github.com/Khopa/dcs_liberation/issues/890
2021-04-22 17:55:14 -07:00
Dan Albert
208d1b82b5 Show BARCAP commit ranges by default.
BARCAP placement confuses a lot of people but this should make it more
clear.
2021-04-22 17:45:19 -07:00
Simon Clark
1fd7c95f1b Fix Russian carrier name; Kuznetov -> Kuznetsov. 2021-04-22 23:08:56 +01:00
Dan Albert
481f195725 Airlift support.
UI isn't finished. Bulk transfers where the player doesn't care what
aircraft get used work (though they're chosen with no thought at all),
but being able to plan your own airlift flight isn't here yet.

Cargo planes are not implemented yet.

No way to view the cargo of a flight (will come with the cargo flight
planning UI).

The airlift flight/package creation should probably be moved out of the
UI and into the game code.

AI doesn't use these yet.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-22 00:30:18 -07:00
SpaceEnthusiast
d6c1550a1d Added Australia with C130 Faction 2021-04-21 23:58:18 -04:00
SpaceEnthusiast
60b9ae0a70 Added Canada with C130 Faction 2021-04-21 23:43:31 -04:00
SpaceEnthusiast
bf71351e6d Canadian, Australian, and Spanish Hornets now use proper liveries 2021-04-21 22:45:44 -04:00
Dan Albert
8e361a8776 Fix missing index valid check in transfer menu.
Fixes https://github.com/Khopa/dcs_liberation/issues/1006
2021-04-21 17:14:45 -07:00
Khopa
e39fd53727 Fixed Lint issue 2021-04-21 22:55:08 +02:00
Khopa
76efcca64b Fixed error with Ramat David frequency (typo) 2021-04-21 22:41:04 +02:00
Khopa
35f49d9bc0 Fixed airfields frequency on Persian Gulf 2021-04-21 22:31:52 +02:00
Khopa
a0a55797a9 Fixed airfields frequency on Syria 2021-04-21 22:31:49 +02:00
Khopa
696a429e9e Pydcs update to latest version 2021-04-21 13:20:06 +02:00
Dan Albert
29cd55e795 Add WIP airlift UI.
Doesn't do anything yet.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-21 01:02:02 -07:00
Dan Albert
c2ebf61fd3 Disable cancel actions on enemy transfers.
Decided to leave these in the menu as intel for the player, but the
player can no longer cancel them.

Fixes https://github.com/Khopa/dcs_liberation/issues/995
2021-04-20 23:20:08 -07:00
Dan Albert
489b4d6acf Add AI convoy attack planning.
Like the comment says this rarely has any effect due to the ordering of
flight planning and convoy creation. Could be separated, but opfor will
still not be able to target any convoys that the player creates in the
UI on that turn because they planning is done before the player can use
the UI.

Multi-turn transfers will be targetable, however.
2021-04-20 22:56:53 -07:00
Dan Albert
6cffc47f3c Clean up convoy code. 2021-04-20 22:21:42 -07:00
Dan Albert
50d8e08a34 Redo convoy attack flight plans.
The previous flight plan only makes sense if the convoy will make it a
significant distance from its starting point. At road speeds over the
typical mission duration this is not true, so we can actually plan this
as if it was a strike mission near the origin point and that's close
enough.

There's some cleanup work to do here that I've added todos for.

Fixes https://github.com/Khopa/dcs_liberation/issues/996
2021-04-20 22:04:57 -07:00
Dan Albert
3f16c0378a Add BAI planning against supply routes.
This currently is only supported for player flights. I have no idea how
to create an AI flight plan that won't just get them killed. AI-only BAI
missions against supply routes will warn the player on mission creation.
2021-04-19 23:09:39 -07:00
Dan Albert
2b06d8a096 Convert front line segments to proper class.
Needed so we can add context menus to the lines.
2021-04-19 21:41:56 -07:00
Dan Albert
2a5b37b9ad Show convoys on the map. 2021-04-19 20:37:15 -07:00
Dan Albert
cabbd234af Fix incorrect docs. 2021-04-19 20:24:20 -07:00
Dan Albert
480039ca50 Add --cheats to the CLI mission generator.
Doesn't enable the red ATO display because that's a lot of clutter, but
enables the commonly needed for debugging things.
2021-04-19 17:22:31 -07:00
Dan Albert
81d5cddac9 Remove weird single-CP supply route edge case.
A CP with a factory would be able to supply itself, but was not in a
supply route if it was the only connected friendly CP. When the player
starts with only one base against an enemy base this meant that it was
in no supply route, causing it to not be a recruitment location or a
place to buy more than a reserve of vehicles automatically.
2021-04-19 17:15:41 -07:00
Dan Albert
bb3e83548c Remove support for old-style campaigns.
These won't work any more since they won't be able to define factories
or supply routes. They were made obsolete ages ago, so just remove them.
2021-04-19 01:54:16 -07:00
Dan Albert
a3ff58c42d Turn feature flags on for development mode. 2021-04-19 00:04:46 -07:00
Dan Albert
30bf4542f0 Special case turn 0 for recruitment.
We want there to be units on the front line on turn 1 regardless of
factory locations, so bypass the recruitment restrictions on turn 0.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-19 00:03:47 -07:00
Dan Albert
d11c9a4615 Use convoy spawn points defined by the campaign.
The start/end points of the waypoints that define the course of the
front line also define the spawn points for convoys. Use them.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 23:57:13 -07:00
Dan Albert
d4679e0029 Note the semi-completion of the factory feature.
https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:35:18 -07:00
Dan Albert
3c4d6eb8e4 Automate transfers for purchases in the UI.
Buying a unit places the order, but the unit will appear at the nearest
connected source and a transfer will be automatically created next turn.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:31:45 -07:00
Dan Albert
df98e1f8ac Fix campaign format version.
Updatd the comment but forgot to update the number...
2021-04-18 23:25:44 -07:00
Dan Albert
56fc2986e9 Automate transfers from factories.
The purchase system will seek out a source for its units when the
purchase is completed. If no source is available the order will be
refunded. Orders with no source available are prevented, so this only
happens when the source was cut off from the destination during the
turn.

There's still some funkiness going on with the first turn (but possibly
only when the first turn includes a cheat to capture) where the AI buys
a ton of units somewhere other than the front line. First turn behavior
should probably be different anyway, with the first turn allowing
purchases anywhere to avoid empty front lines while troops reinforce if
the front line isn't a factory.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
627f18c42b Require factories for purchasing ground units.
https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
67b341cbd6 Add feature flag for new ground unit recruitment.
This is going to render most campaigns unusable because they won't have
any places to spawn ground units, so flagging off for now.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
eff5b94db7 Add factory placement to the campaign files.
This also removes the "factory" type from the normal strike target
(money generating) generators to avoid confusion. Later only control
points with factories will be able to spawn ground units, at which point
these will no longer generate income.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
707323ca12 Update Inherent Resolve to latest camapign format.
* Moves front line endpoints to roads for convoys (not used yet).
* Adds EWR sites.
2021-04-18 23:22:30 -07:00
Dan Albert
cb2ba2f53a Update pydcs, move back to upstream. 2021-04-18 23:22:11 -07:00
Dan Albert
777cd310ef Clarify which game we're talking about. 2021-04-18 17:45:27 -07:00
Dan Albert
9a4ec5a899 Fix campaign description template. 2021-04-18 17:41:27 -07:00
Dan Albert
c92e4e06cc Move campaign format version to a stable location. 2021-04-18 17:37:55 -07:00
Dan Albert
39135f8c80 Add version field to campaign descriptor file.
This is used to provide a UI hint to guide players towards campaigns
that have been updated to work with the current version of the game.
All the campaigns we currently have were made for an unknown version of
the game, so they're all flagged as incompatible.

The version field is not the DCS Liberation version number because the
campaign format may change multiple times during development. Instead
the version number is a monotonically increasing integer that we
increment whenever a game change requires campaign updates.
2021-04-18 17:30:49 -07:00
Dan Albert
5e054cfc77 Disallow selling ground units.
Ground units should be transferred to a new location, not sold and
repurchased.

https://github.com/Khopa/dcs_liberation/issues/823
2021-04-18 16:32:02 -07:00
Dan Albert
3b72c13f9d Add ground unit transfers to the changelog.
Also documented the behavior on the wiki (link in the changelog).

This is currently fully functional for players, but since units can be
bought and sold at any base there's no real reason to use these yet.
Will follow up with making ground units only purchasable at bases with
factories (the UI will still allow the purchase directly at the base,
but it will automatically create the transfer order) so convoys end up
being used, and to make factories a more interesting strategic target.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
65ed110ab7 Track convoy kills.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
5dd7ea3060 Spawn convoys for transfers.
Destroying these units currently has no effect.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
bd9cbf5e3b Move transfers one CP per turn.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
65f6a4eddd Restrict transfers to connected bases.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 15:59:15 -07:00
Dan Albert
e9ff554f39 Basic implementation of road based transfers.
This adds the models and UIs for creating ground unit transfer orders.
Most of the feature is still missing:

* The AI doesn't do them.
* Transfers can move across the whole map in one turn.
* Transfers between disconnected bases are allowed.
* Transfers are not modeled in the simulation, so they can't be
  interdicted.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 15:59:15 -07:00
Dan Albert
b65d178cf1 Move develop to 2.6. 2021-04-18 15:57:18 -07:00
Dan Albert
157a59e3c4 Fix UI crash when unchecking default loadout.
This was throwing because it was being called with the wrong number of
arguments, preventing the UI from actually updating back to the default.
2021-04-18 13:05:22 -07:00
Khopa
d24c65c3aa Fixed airfield data airport name for Persian Gulf map 2021-04-18 20:10:52 +02:00
Khopa
d4d441ff9b Fixed some factions errors that weren't caught yet. 2021-04-18 18:11:00 +02:00
Khopa
f43fb1223f Fix : Fixed duplicate units on cold war flak site. 2021-04-18 15:16:17 +02:00
Khopa
3db275414d Allow 0 income multiplier in game settings windows (this was already possible in new game wizard) 2021-04-18 01:20:32 +02:00
Khopa
6e0ff6c805 pydcs update 2021-04-18 01:13:50 +02:00
Dan Albert
9c359efbff Note Litening -> ATFLIR change. 2021-04-17 16:03:56 -07:00
Dan Albert
c5cc1ea8e8 Make the F/A-18C strike loadout less silly.
Instead of 4xMk83 and 4xGBU-38, 2 bags and 2 GBU-31. ATFLIR added for
TOO/BDA.
2021-04-17 15:51:46 -07:00
Dan Albert
afb6a33131 Replace Litening II with ATFLIR in Honet loadouts.
https://github.com/pydcs/dcs/pull/120
2021-04-17 15:43:49 -07:00
Khopa
539a11f54d Added icons for new units 2021-04-18 00:15:10 +02:00
Khopa
9324e549e6 Updated changelog 2021-04-18 00:13:43 +02:00
Khopa
c8f6b6df87 Fixed lint issue 2021-04-18 00:11:06 +02:00
Dan Albert
38f632097e Add support for DCS 2.7 weather generation.
https://github.com/Khopa/dcs_liberation/issues/981
2021-04-17 15:06:17 -07:00
Khopa
e63743f537 Improved FOB support : new custom banner for FOB menu and do not display aircrafts menu on first page. 2021-04-17 23:49:49 +02:00
Khopa
ce13295cf0 pydcs repo now pointing on temporary branch 2-7-temp on https://github.com/Khopa/dcs for new weather development 2021-04-17 23:06:48 +02:00
Khopa
23c02a3510 Updated airfields data for the Channel map 2021-04-17 17:50:41 +02:00
Khopa
01ea7b9ee1 Updated airfields metadata for Syria 2021-04-17 17:37:15 +02:00
Khopa
6fed1284a1 Updated airfields metadata for Syria 2021-04-17 17:35:40 +02:00
Khopa
5574d849bd Unit support : S-60 added to Syria faction 2021-04-17 13:11:58 +02:00
Khopa
c2ce3a6992 Fixed Lint issue 2021-04-17 13:11:26 +02:00
Khopa
b61d15fdf4 Unit support : Added support for the PLZ-05, new artillery unit from the Chinese Asset Pack 2021-04-17 11:28:36 +02:00
Khopa
ad5cc83fb3 Unit support : now using the new unit S-60 57mm AA Gun units. 2021-04-17 11:23:00 +02:00
Ronny Röhricht
2f53edd775 Add plugin for exporting RED and BLUE threat circles to LotATC.
Implemented as a plugin because LotATC needs actual lat/lon, and the only APIs for those are in lua.

Fixes https://github.com/Khopa/dcs_liberation/issues/956.
2021-04-17 00:55:06 -07:00
Khopa
923459c88b Pydcs update to the good commit reference 2021-04-17 02:35:34 +02:00
Khopa
1192d26448 Fixed lint issue 2021-04-17 02:27:42 +02:00
Khopa
2d5e827417 Pydcs update to master repo 2021-04-17 02:26:31 +02:00
Khopa
a30d9276b8 Merge remote-tracking branch 'khopa/develop' into develop 2021-04-17 02:22:56 +02:00
Khopa
b963c2272f More naming fixes 2021-04-17 02:21:19 +02:00
Khopa
221cb8709b Ran black formatter 2021-04-17 02:15:49 +02:00
Khopa
648857fc44 Removed deprecated faction 2021-04-17 02:15:02 +02:00
Khopa
8091051bb4 Fixed weapons names in pdcs extensions, removed deprecated rafale mod, fixed many other compilation issues with pydcs 2.7+ 2021-04-17 02:13:52 +02:00
Khopa
1e468cd3e0 Fixed weapons fallback db names with new pydcs version 2021-04-17 01:23:08 +02:00
Khopa
15d2a5bb2b Updated units name in liberation 2021-04-16 23:33:22 +02:00
Khopa
5c76229ee5 Referencing pydcs new version 2021-04-16 23:31:03 +02:00
Dan Albert
0cd088122e Remove WIP status of AEW&C missions. 2021-04-15 21:35:25 -07:00
Dan Albert
b6f3467a89 Update changelog. 2021-04-15 21:34:31 -07:00
SnappyComebacks
52ce1a5959 Add support for additional EWR sites in campaigns.
* A Bluefor EWR 55GS in the campaign miz defines an optional EWR site. There is no distinction between how close or far it is to a base, so it's possible that there will be many EWRs within an airbase.
* A Redfor EWR 1L13 in the campaign miz defines a required EWR site.

It would be a good future idea to limit the amount of EWRs within a certain distance from an airbase. That way there's no chance of 5 EWRs all at the same airbase. Even better if there were something preventing any two EWRs from being right next to each other.

No campaigns take advantage of this yet.

Fixes https://github.com/Khopa/dcs_liberation/issues/524
2021-04-15 21:23:27 -07:00
Khopa
7ce05762f5 Possible to add additional helipad to any control point in campaign file. (WIP) 2021-04-14 00:00:25 +02:00
Dan Albert
cce736bc16 Note the font crash fix in the changelog. 2021-04-11 13:27:39 -07:00
Hanninho
2a1127e637 Force the basic layout engine when generating the kneeboard.
The libraqm backed layout engine causes crashes on some machines.

Fixes #531.
2021-04-11 13:24:31 -07:00
Dan Albert
8ca68b3d7a Set win/loss status for functioning airfields.
"Fixes" https://github.com/Khopa/dcs_liberation/issues/833. The crash is
still present, but we're at least telling the player that the game is
over so they shouldn't try to play. The UX for this sucks
(https://github.com/Khopa/dcs_liberation/issues/978), but it's the same
as other end-game states.
2021-04-10 15:44:57 -07:00
Dan Albert
0f76d893b8 Note date fix in the changelog. 2021-04-10 15:22:27 -07:00
Dan Albert
ab746b5195 Fix date given to the conditions generator.
`Game.date` is actually the start date, not the current date. Not renaming to
avoid breaking save compat.

This fix won't have any effect on existing saves until they pass the turn
because this is encoded into the conditions generated at the start of the turn,
but it will fix on the next turn.

Fixes https://github.com/Khopa/dcs_liberation/issues/973
2021-04-10 15:20:54 -07:00
Khopa
828c87df39 Game settings / new game wizard : Allowed a 0% income multiplier. 2021-04-07 19:33:23 +02:00
C. Perreau
888aeb621d Merge pull request #955 from Hornet2041/Integrate-splash-damage-script-plugin
Integrate splash damage plugin script
2021-04-05 20:33:17 +02:00
Khopa
ac2fddf87e Changelog update 2021-03-31 00:28:52 +02:00
Khopa
614304cc81 Added F86 Sabre loadout by Starfire. 2021-03-31 00:20:19 +02:00
Khopa
f363d66aac F_86F Sabre payloads can now be customized. 2021-03-31 00:17:21 +02:00
Khopa
1706c42695 Fix : Added Mig-19P to CAS capable aircraft list 2021-03-31 00:00:44 +02:00
Khopa
2b44b2fc0b Ran formatter to fix lint issue 2021-03-29 23:53:09 +02:00
C. Perreau
25986aa15c Merge pull request #928 from Mustang-25/patch-1
Add GAR-8 restriction date and fallback info
2021-03-29 23:51:21 +02:00
C. Perreau
264eb01afc Merge pull request #947 from SnappyComebacks/add-e2c-to-more-factions
Add E-2C to more factions
2021-03-29 23:49:27 +02:00
Khopa
6db3c3f9f1 Updated changelog 2021-03-29 23:46:44 +02:00
SnappyComebacks
714992bdcb ARMADILLLO to ARMADILLO. 2021-03-27 13:02:16 -07:00
SnappyComebacks
ca7a86b6d7 Merge branch 'develop' into add-e2c-to-more-factions 2021-03-27 11:04:13 -06:00
GvonH
49e729e9ec Add dark kneeboard option for night missions (#951) 2021-03-22 19:41:54 -07:00
Hornet2041
7f0a690c7b Add files via upload
referencing the original upload in Discord here: https://discord.com/channels/595702951800995872/768226890158702654/809571449979142174

and wheelyjoe's github repository here: https://github.com/wheelyjoe/DCS-Scripts

"Improves splash damage modelling by pulling weapon warhead info (where available) and using this to create explosions (only way to apply damage) to units in more sensible range." Makes using non-precision weaponry actually viable for ground targets.
2021-03-22 09:43:42 -04:00
C. Perreau
d07afc603b Merge pull request #950 from Khopa/dependabot/pip/pillow-8.1.1
Bump pillow from 7.2.0 to 8.1.1
2021-03-21 19:09:21 +01:00
Khopa
5bd4c00257 Merge branch 'develop_2_4_x' into develop
# Conflicts:
#	changelog.md
#	game/db.py
#	game/navmesh.py
#	game/operation/operation.py
#	game/theater/conflicttheater.py
#	game/theater/controlpoint.py
#	game/theater/start_generator.py
#	game/theater/theatergroundobject.py
#	game/threatzones.py
#	game/version.py
#	gen/aircraft.py
#	gen/airsupportgen.py
#	gen/fleet/carrier_group.py
#	gen/flights/ai_flight_planner.py
#	gen/flights/ai_flight_planner_db.py
#	gen/flights/flightplan.py
#	gen/flights/waypointbuilder.py
#	gen/groundobjectsgen.py
#	gen/kneeboard.py
#	pydcs
#	pydcs_extensions/f22a/f22a.py
#	qt_ui/uiconstants.py
#	qt_ui/widgets/combos/QAircraftTypeSelector.py
#	qt_ui/widgets/map/QLiberationMap.py
#	qt_ui/windows/QUnitInfoWindow.py
#	qt_ui/windows/mission/flight/payload/QPylonEditor.py
#	qt_ui/windows/settings/QSettingsWindow.py
2021-03-21 18:50:50 +01:00
dependabot[bot]
13272aa280 Bump pillow from 7.2.0 to 8.1.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 7.2.0 to 8.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/7.2.0...8.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 15:06:06 +00:00
Simon Krüger
260358c5fb AEW&C kneeboard + actually do AEW&C (#922)
* AEW&C will now do AEW&C
* AEW&C gets a frequency
* AEW&C is added to kneeboard (Frequency, Depature, Depature Time, Arrival Time)
2021-03-13 14:07:19 -08:00
Dan Albert
0f07b2c095 Increase size of navmesh to avoid planning issues.
The tradeoff is that any flights that might have previously routed
_around_ a threat near the edge of the map may no longer do so as the
zones at the edge are significantly larger now.

Fixes https://github.com/Khopa/dcs_liberation/issues/903
2021-03-13 13:41:57 -08:00
Dan Albert
b2fafc22dd Fix flight path debugging. 2021-03-13 13:34:49 -08:00
Dan Albert
6200ec8e0e Don't plan BAI targets at dead subgroups.
Fixes https://github.com/Khopa/dcs_liberation/issues/900
2021-03-13 13:16:10 -08:00
Dan Albert
831516c5f5 Ask for state.json in the bug template. 2021-03-13 12:56:33 -08:00
Dan Albert
fb49d9e6ae Project threat zone from front lines.
Fixes https://github.com/Khopa/dcs_liberation/issues/940
2021-03-13 12:53:10 -08:00
SnappyComebacks
e660726828 Added E-2C elements for UI. 2021-03-12 14:19:50 -07:00
SnappyComebacks
4519f47b19 Added US Aggressors. 2021-03-12 11:16:27 -07:00
SnappyComebacks
47174bbb4d Added E-2C to USA, France, Bluefor. 2021-03-12 11:12:29 -07:00
Mustang-25
de18ce3e7b Add GAR-8 restriction date and fallback info 2021-02-27 15:22:26 -08:00
Dan Albert
b5934633fa Improve wording of "never delay players" option. 2021-02-27 14:16:41 -08:00
Khopa
f314c08216 Improved map scale display 2021-02-27 00:29:23 +01:00
Khopa
6704cded2d Fixed unit info windows crashing when banner not found (variable referenced before assignment error) 2021-02-27 00:10:57 +01:00
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
58d5aa9944 Fixes : Missing weapons names would cause flight edition window to crash while setting up default loadout UI, preventing the user from editing flights. 2021-02-26 23:30:23 +01:00
Khopa
60af2ad0a4 Preparing 2.4.4 2021-02-26 23:12:59 +01:00
Dan Albert
4ec8994c38 Avoid warning in GitHub workflow. 2021-02-25 17:32:33 -08:00
Simon Krüger
49d6cece50 Merge pull request #896 from siKruger/aewc_no_threat_zone
if aewc is in threat zone move it further away
2021-02-24 22:14:22 +01:00
sikruger
03251d5bd5 some improvements 2021-02-24 22:06:42 +01:00
BenBenBeartrax
a6e03184bc fictional Korea factions 2021-02-22 16:52:53 -08:00
Khopa
54f2a6f1b5 Release 2.4.3 2021-02-22 21:58:56 +01:00
Khopa
7eed7ae6ba Release 2.4.3 2021-02-22 21:44:11 +01:00
C. Perreau
b3d642fdf5 Merge pull request #913 from Khopa/develop_2_4_x
Release 2.4.3    (fixed)
2021-02-22 21:41:48 +01:00
Khopa
35dd9427a5 Added possibility to set up custom date in new game wizard. 2021-02-22 21:34:14 +01:00
C. Perreau
bf1087df3c Merge pull request #912 from Khopa/develop_2_4_x
2.4.3 Release
2021-02-22 21:04:23 +01:00
Khopa
523ef08697 Ran black reformater on 2.4x branch 2021-02-22 20:55:51 +01:00
Khopa
c2310453d8 Updated version String to 2.4.3 2021-02-22 20:51:53 +01:00
Khopa
b4a6a5dc26 Changelog update for 4.2.3 2021-02-22 20:51:24 +01:00
Khopa
20ceb440fa black 2021-02-22 20:28:54 +01:00
Khopa
4ee9c66524 Updated Hercules cargo script to latest version. 2021-02-22 20:28:52 +01:00
Khopa
9d04abd3af Updated C130J Hercules pydcs data 2021-02-22 20:28:51 +01:00
Khopa
a562345876 Updated credits in about dialog. 2021-02-22 20:28:34 +01:00
Dan Albert
2e7daceb3c Increase file log level to debug.
Fixes https://github.com/Khopa/dcs_liberation/issues/907
2021-02-22 20:27:57 +01:00
Khopa
a9aba3484a F-22 default loadout replaced weapons in internal bay by their "no-drag" versions 2021-02-22 20:24:27 +01:00
Khopa
1b9bbb8eb6 Updated F22 mod 2021-02-22 20:24:19 +01:00
BenBenBeartrax
25c44723a9 customized_payloads: M-2000C add Eclair counter meassures pod to all loadouts 2021-02-22 20:18:24 +01:00
Khopa
688a20c312 Changelog update 2021-02-21 23:01:05 +01:00
Khopa
4c1b34461e Merge remote-tracking branch 'khopa/develop' into develop 2021-02-21 22:57:32 +01:00
Khopa
c6939e7194 Added possibility to set up custom date in new game wizard. 2021-02-21 22:57:21 +01:00
BenBenBeartrax
cd9432e395 kneeboard: custom flight name in title (#911)
If a flight has a custom flight name set it gets appended to the title in the kneeboard.
Partially addresses #862 .
2021-02-21 13:29:31 -08:00
Khopa
7d5244a5bc black 2021-02-21 17:47:51 +01:00
Khopa
1aa5d4f7de Updated Hercules cargo script to latest version. 2021-02-21 17:33:34 +01:00
Khopa
ad74204fe4 Updated C130J Hercules pydcs data 2021-02-21 17:31:58 +01:00
Khopa
5cb1a47ed3 Updated credits in about dialog. 2021-02-21 17:24:15 +01:00
Khopa
fff22d3cd1 F-22 default loadout replaced weapons in internal bay by their "no-drag" versions 2021-02-21 17:20:51 +01:00
Khopa
665cd7b996 Merge remote-tracking branch 'khopa/develop' into develop 2021-02-21 17:15:54 +01:00
Khopa
61173196d2 Updated F22 mod 2021-02-21 17:15:29 +01:00
Dan Albert
03e98ba562 Increase file log level to debug.
Fixes https://github.com/Khopa/dcs_liberation/issues/907
2021-02-20 15:38:52 -08:00
BenBenBeartrax
6195290adf customized_payloads: M-2000C add Eclair counter meassures pod to all loadouts 2021-02-20 12:49:08 -08:00
sikruger
4f1b0055e1 new point generation 2021-02-19 20:40:58 +01:00
sikruger
dd9fe87ff4 new point generation 2021-02-18 16:08:23 +01:00
sikruger
5bda4abfce if aewc is in threat zone move it further away 2021-02-17 16:47:24 +01:00
Dan Albert
24f98aede5 Undo unintentional change.
Not sure how the extra whitespace got there, but this gets overwritten
on every launch.

(cherry picked from commit 2ffe3bf722)
2021-02-13 13:09:47 -08:00
Dan Albert
f8ae1e9076 Merge pull request #885 from DanAlbert/black
Set up black.
2021-02-12 20:21:41 -08:00
Dan Albert
16b0dcad71 Add black workflow. 2021-02-12 20:13:47 -08:00
Dan Albert
9c1265d50d Add pre-commit configuration for black.
To set up, run `pre-commit install`.
2021-02-12 20:11:41 -08:00
Dan Albert
8c0e781c94 Ignore reformating in blame. 2021-02-12 20:11:36 -08:00
Dan Albert
a47bef1f13 Blacken. 2021-02-12 20:10:45 -08:00
Dan Albert
053663bd76 Merge branch 'develop_2_4_x' into develop 2021-02-12 19:23:13 -08:00
Dan Albert
e40b916b07 Merge pull request #884 from Khopa/develop_2_4_x
Release 2.4.2.
2021-02-12 19:05:44 -08:00
Dan Albert
2ffe3bf722 Undo unintentional change.
Not sure how the extra whitespace got there, but this gets overwritten
on every launch.
2021-02-12 18:59:48 -08:00
Dan Albert
1bc994c102 Fix version number of the release. 2021-02-12 16:18:01 -08:00
Dan Albert
21be4d38e1 Mention new start dates in the changelog.
(cherry picked from commit f7889b785d)
2021-02-12 16:16:36 -08:00
Mustang-25
3b58c571b3 Add a mid-90s campaign date option
1995 is a good date to pick if you want to date restrict all GPS weapons but still have all the laser guided options.

(cherry picked from commit 27829a024a)
2021-02-12 16:16:35 -08:00
Mustang-25
e0430cf607 Adjust HARM Weapon Restriction Date
Official Navy docs have the 88A's IOC date in 1983. Also left a note on the B and C IOC dates if DCS ever adds the older models.

(cherry picked from commit a0fda2552f)
2021-02-12 16:16:31 -08:00
Dan Albert
f7889b785d Mention new start dates in the changelog. 2021-02-12 16:16:13 -08:00
Mustang-25
27829a024a Add a mid-90s campaign date option
1995 is a good date to pick if you want to date restrict all GPS weapons but still have all the laser guided options.
2021-02-12 16:15:20 -08:00
Mustang-25
a0fda2552f Adjust HARM Weapon Restriction Date
Official Navy docs have the 88A's IOC date in 1983. Also left a note on the B and C IOC dates if DCS ever adds the older models.
2021-02-12 16:14:54 -08:00
Simon Krüger
65c185ebd2 Add an option for disabling the legacy AEW&C aircraft.
Using the legacy AEW&C aircraft is still the default until
https://github.com/Khopa/dcs_liberation/issues/844 is fixed.
2021-02-12 14:20:26 -08:00
Dan Albert
fb425d3524 Fix rounding of budget in recruitment menu.
Fixes https://github.com/Khopa/dcs_liberation/issues/861.

(cherry picked from commit 5792eb354c)
2021-02-12 14:01:34 -08:00
Dan Albert
5792eb354c Fix rounding of budget in recruitment menu.
Fixes https://github.com/Khopa/dcs_liberation/issues/861.
2021-02-12 14:00:58 -08:00
Dan Albert
45300b64c5 Mention weapon data in changelog.
(cherry picked from commit dce7d91511)
2021-02-12 13:54:51 -08:00
Dan Albert
dce7d91511 Mention weapon data in changelog. 2021-02-12 13:54:30 -08:00
Brandon Danyluk
4b7ef46f82 Add weapon era restrictions for USA/Russia/UK/France (#860)
(cherry picked from commit 61f1e11a48)
2021-02-12 13:49:40 -08:00
Dan Albert
b67e6d20f1 Move 2.4.2 fix to the correct section.
(cherry picked from commit 3d1afa74d4)
2021-02-12 13:48:02 -08:00
Dan Albert
3d1afa74d4 Move 2.4.2 fix to the correct section. 2021-02-12 13:47:14 -08:00
Dan Albert
0ae6575087 Transfer pending purchases forward along capture.
Fixes https://github.com/Khopa/dcs_liberation/issues/828.

(cherry picked from commit d8c94f5ece)
2021-02-12 13:46:08 -08:00
Dan Albert
d8c94f5ece Transfer pending purchases forward along capture.
Fixes https://github.com/Khopa/dcs_liberation/issues/828.
2021-02-12 13:45:01 -08:00
Brandon Danyluk
61f1e11a48 Add weapon era restrictions for USA/Russia/UK/France (#860) 2021-02-10 22:30:56 -08:00
Simon Krüger
98249b1aca Bugfix: Blue AEW&C above Red CV (#872) 2021-02-10 11:49:49 -08:00
Simon Krüger
8e51b7fc1d Carrier strike group (#863)
Generate a Carrier Group which comes close the the real Carrier Strike Group 8.

Under carrier_names in the faction simply add "Carrier Strike Group 8" as the first and only entry and enable super carrier.

* TRU as TACAN name
* Harry S. Truman CV
* 4x Arleigh Burke
* 1x Ticonderoga
* CV in the middle, Ticonderoga in a radius of 2 miles, Arleigh Burkes forming a rectangle
2021-02-09 14:17:46 -08:00
Simon Krüger
71914b8a8b Aew&c ai planning.
AI will generate AWE&C

* Only one flight per turn
* Takes the airfield farthest away from the frontline
* Prefers CV over any airfield
2021-02-09 12:35:47 -08:00
Khopa
7a077a0d21 Merge remote-tracking branch 'khopa/develop' into develop 2021-02-07 21:16:04 +01:00
Khopa
d23e4665e7 Fixed possible cheat by selling SA-10 SAMs site for more money than what they were bought for.
+ Fixed SA-10 sites having the same name in game UI.
2021-02-07 21:15:48 +01:00
C. Perreau
df12b54856 Merge pull request #858 from benedikt-wegmann/develop_kneeboard_briefing_cleanup
kneeboard: slight cleanup in Jinja
2021-02-07 18:48:47 +01:00
Khopa
ae12053d74 Pydcs update 2021-02-07 18:34:48 +01:00
Khopa
0e7695f2d6 pydcs update repo 2021-02-07 17:49:01 +01:00
BenBenBeartrax
38cee87ee9 kneeboard: slight cleanup in Jinja by not rendering sections that are empty anyway (JTAC, Carriers, AWACS etc.) 2021-02-07 16:44:41 +01:00
Simon Clark
c64a6083e2 Merge branch 'develop' of https://github.com/Khopa/dcs_liberation into develop 2021-02-07 11:41:04 +00:00
Simon Krüger
e0501e46e3 Initial implementation of AEW&C missions.
Still a work in progress (the missions don't actually perform their task, just orbit). Currently:

* AEW&C aircraft can be bought.
* AEW&C missions can be planned at any control point and at front lines.
* AEW&C will return after 4H or Bingo.
2021-02-07 11:39:22 +00:00
Khopa
4a0ccc4c2f Fixed error detected by mypy 2021-02-07 11:39:21 +00:00
Khopa
c92b7240eb Increased number of launchers on Silkworms sites 2021-02-07 11:39:21 +00:00
Khopa
6a74c3faeb Added coastal defenses sites generator for Iran and China. 2021-02-07 11:39:21 +00:00
BenBenBeartrax
c5ae872787 waypointbuilder: low altitude AGL for helos 2021-02-07 11:39:21 +00:00
Dan Albert
2e9ab0a9d7 Move develop to 2.5. 2021-02-07 11:39:20 +00:00
Malakhit
08f67860be Merge pull request #854 from Khopa/develop_2_4_x
2.4.1 Release
2021-02-07 11:22:38 +00:00
Simon Clark
3fab1d92b7 Fixed some areas where the non-pretty name for a unit was displayed. 2021-02-07 11:15:25 +00:00
Simon Clark
6573157112 Changelog. 2021-02-07 10:49:34 +00:00
Simon Clark
e83841eb0b Fix syntax error with SH-60B payload. 2021-02-07 10:47:36 +00:00
Simon Clark
6a0e18c0e9 Change the logic for culling missile sites.
Missile sites now generate a 2.5km culling circle around themselves, rather than using the standard full culling zone size.

Fixes #850.
2021-02-06 22:20:02 +00:00
Simon Clark
b71b6473e3 Start 2.4.1, fix #852. 2021-02-06 19:56:17 +00:00
Simon Krüger
a004f62fe8 Initial implementation of AEW&C missions.
Still a work in progress (the missions don't actually perform their task, just orbit). Currently:

* AEW&C aircraft can be bought.
* AEW&C missions can be planned at any control point and at front lines.
* AEW&C will return after 4H or Bingo.
2021-02-05 17:18:50 -08:00
Malakhit
c69e5e05a3 Merge pull request #841 from Khopa/develop_2_4_x
2.4.0 Release
2021-02-05 18:46:23 +00:00
Khopa
07ce20fd29 Fixed error detected by mypy 2021-02-05 00:48:35 +01:00
Khopa
df74f7c6c7 Increased number of launchers on Silkworms sites 2021-02-05 00:25:42 +01:00
Khopa
2a6e2d470d Added coastal defenses sites generator for Iran and China. 2021-02-05 00:15:06 +01:00
BenBenBeartrax
643dd65113 waypointbuilder: low altitude AGL for helos 2021-02-02 14:30:28 -08:00
Dan Albert
cee0532b85 Move develop to 2.5. 2021-01-31 15:42:13 -08:00
Dan Albert
845e7fb956 Highlight major areas of change in the changelog.
The list is getting too long to be easily scannable for big changes :)
2021-01-31 14:52:16 -08:00
Khopa
f5cc2c3a37 Removed Western georgia campaign 2021-01-31 23:44:49 +01:00
Dan Albert
d56c2f7a50 Allow editing the arrival/diver airfield.
Fixes https://github.com/Khopa/dcs_liberation/issues/810
2021-01-31 14:26:14 -08: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
Simon Clark
fb724e0150 Missed the bofors.
Also removes cargo carrier from factions.
2021-01-31 21:46:26 +00:00
Dan Albert
94ef47c89d Remove incomplete feature from changelog.
https://github.com/Khopa/dcs_liberation/issues/511 isn't done yet, and
as-is the system does barely anything, so not worth mentioning.
2021-01-31 13:26:29 -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
fee497219e FInal set of vehicles, I think? 2021-01-31 20:23:58 +00:00
Simon Clark
7624f09f98 A-20G is good at anti-ship. 2021-01-31 17:09:19 +00:00
Simon Clark
946fe0a94c Added a lot of tanks to the unit info list. A lot of tanks. 2021-01-31 16:55:17 +00:00
Khopa
c7e1699546 SEAD/DEAD loadout for Harrier is using 4 AGM65-F + 2 Sidearm 2021-01-31 17:14:40 +01:00
Khopa
de4a617743 Fixed AV8B Harrier SEAD loadout contains invalid ordnance (AGM-65G) Replace by AGM-65F 2021-01-31 17:11:24 +01: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
646ba94d10 Make UI update faster on TOT change.
Fixes https://github.com/Khopa/dcs_liberation/issues/815
2021-01-30 20:25:34 -08:00
Dan Albert
8c5c08d678 Don't show income for dead buildings on the map. 2021-01-30 18:27:07 -08:00
Dan Albert
3d0b47a181 Fix exception in building debrief.
There are always a bunch of integer dead ground units. Not sure what
they are.
2021-01-30 18:24:25 -08:00
Dan Albert
ea7bece3b8 Display the TGO's income, not the CPs. 2021-01-30 17:23:18 -08:00
Dan Albert
944a8e9cd6 Allow selecting start type when creating flights. 2021-01-30 16:16:04 -08:00
Simon Clark
88f7d1d572 Changelog. 2021-01-31 00:14:53 +00:00
Simon Clark
6d78c1e302 Round budget display income figure to 2DP.
Fixes #809
2021-01-31 00:13:10 +00:00
Simon Clark
791aa8b6d1 Fix the powerplant object template.
For some reason, the large building with the tank on is rotated 180 degrees when put into an actual mission. Therefore, I've just spun it around to counter this.
2021-01-30 23:46:15 +00:00
Dan Albert
a078b67b36 Show arrival airfield in the flight list.
Fixes https://github.com/Khopa/dcs_liberation/issues/798.
2021-01-30 15:14:05 -08: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
768d239840 Adds missile sites to the do-not-cull list.
Contributes-to: #700
2021-01-30 18:34:57 +00:00
Simon Clark
89392553bd Adds a new icon for AA sites with no threat.
Also adds the logic to check for this state.

Contributes-to: #239
2021-01-30 18:08:17 +00:00
Simon Clark
9a41217a59 Removes control point name dash->space replace.
This was breaking runway destruction. This seems to have been a legacy change from 1c67a2e4cf (diff-4c34a7844594e282145481e501ff81d198e869aad558b3589fbc1e140625ea03R20)

Fixes #741
2021-01-30 15:50:13 +00:00
Simon Clark
f6557e4980 Changelog. 2021-01-30 15:03:17 +00:00
Simon Clark
cc3cd95e2d Test for unit_name + " object" in the debrief.
This is because all building objects have " object" appended to the end in the unit map, but not in the state.json. Therefore, we should now find destroyed building objects in the unit map.

Should fix #793.
2021-01-30 15:00:40 +00:00
Simon Clark
8fb02136bb Changelog. 2021-01-30 13:38:55 +00: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
Simon Clark
242085966b Changelog. 2021-01-30 01:14:11 +00:00
Simon Clark
6217075adc Add mission planning docs link to TOT field.
Completes: #696
2021-01-30 01:12:59 +00:00
Simon Clark
883f233c09 Adds WIP handling for default payload display with restricted date feature enabled. 2021-01-30 01:00:40 +00:00
Khopa
e4cc749180 Changelog update 2021-01-30 01:33:36 +01:00
Khopa
9780798b75 Merge remote-tracking branch 'khopa/develop' into develop 2021-01-30 01:30:00 +01: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
Simon Clark
2e3307065c Changelog. 2021-01-30 00:22:37 +00:00
Simon Clark
f6a4316093 Merge branch 'develop' of https://github.com/Khopa/dcs_liberation into develop 2021-01-30 00:19:38 +00:00
Simon Clark
b80aad7449 Link custom theater/faction/loadout docs in UI.
Contributes-to: #614
2021-01-30 00:19:29 +00:00
Khopa
5dbd1d093b High digit sam pydcs export update 2021-01-30 00:33:26 +01:00
Simon Clark
64e2e1109e Add the two Redfor factions from @RobertPeary.
Contributes-to: #488
2021-01-29 21:42:34 +00:00
Simon Clark
9c60140cec Changelog and Hercules radio fix.
Contributes-to: #782
2021-01-29 20:43:19 +00:00
Simon Clark
6099b664ac Updates Hercules Cargo file.
Fixes #782.
2021-01-29 20:36:05 +00:00
Simon Clark
33d084eff0 Add required mod link for USA C-130 faction.
Fixes #803.
2021-01-29 20:32:59 +00:00
Simon Clark
07eb14eaa6 Final aircraft banner until I download some mods. 2021-01-29 20:25:24 +00:00
Simon Clark
b2710fafd4 More banners.
Fixed a few typos.
2021-01-29 20:16:10 +00:00
Simon Clark
8f44b4571a Another batch of banners.
Also removes unarmed trainers.
2021-01-29 19:17:27 +00:00
Simon Clark
169f010fae Bunch more banner images. 2021-01-29 17:33:19 +00:00
Khopa
3e1547e0da Harrier default CAS loadout has APKWS 2021-01-27 22:29:43 +01:00
Khopa
825b9935ee Merge remote-tracking branch 'khopa/develop' into develop 2021-01-27 22:26:14 +01:00
Khopa
2f2e086fbb Using new pydcs export 2021-01-27 22:25:26 +01:00
Simon Clark
2f6e0c15fe Unit detail updates 2021-01-26 16:14:58 +00:00
Simon Clark
09e0c3dd63 Made the description text message a bit clearer. 2021-01-24 17:18:45 +00:00
Simon Clark
4529ac9b92 More banner images. 2021-01-24 16:43:08 +00: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
Dan Albert
bf56091dc7 Fix inverted condition for building waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/548
2021-01-23 14:10:25 -08:00
Khopa
f10f580f1c Fixed factions descriptions not being updated after auto-selection of factions. 2021-01-23 00:33:07 +01:00
Khopa
c09861d1ca Changelog update 2021-01-22 23:51:17 +01:00
Khopa
8e8df2b846 Changelog update 2021-01-22 23:51:03 +01:00
Khopa
d4a1d5bb9e Added campaign "Exercise Vegas Nerve" by Starfire 2021-01-22 23:49:03 +01:00
Khopa
84145aa7a7 Added Black Sea Lite campaign by Starfire. 2021-01-22 23:42:48 +01:00
Khopa
25f32a4776 New game wizard : Added default factions in description 2021-01-22 23:41:12 +01:00
Khopa
097c42d1dd New game wizard : Added performance information about the selected campaigns. 2021-01-22 23:07:17 +01:00
Khopa
91ac368a19 Changelog update 2021-01-22 22:11:49 +01:00
Khopa
f959dd0519 Campaign have a recommended defaults faction setup to ease campaign setup 2021-01-22 22:09:55 +01: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
a102d8b39f Change case and add CR2. 2021-01-21 18:47:26 +00:00
Simon Clark
22eb861d28 More banner images. 2021-01-21 18:41:19 +00:00
Simon Clark
779b36bf7b The M163 Vulcan is now American again. 2021-01-20 18:07:16 +00:00
Simon Clark
f36336403b A few more ground units. The list goes on forever.
Next one to do is the TPz Fuchs.
2021-01-19 21:32:11 +00:00
Simon Clark
b7fbade968 More work on the unit info screen. 2021-01-19 17:53:55 +00:00
Simon Clark
0535b20db7 Another batch of screenshots. 2021-01-19 12:05:08 +00:00
Simon Clark
ddd91e3078 _24ed again. 2021-01-18 22:47:06 +00:00
Simon Clark
97f734b8fc Rename the B-1 image. 2021-01-18 22:46:12 +00:00
Simon Clark
38941f02a8 Add some initial images for the unit info pages.
This was pretty fun! DCS is very photogenic given the right conditions...
2021-01-18 22:44:34 +00:00
Simon Clark
84e09be199 Add aircraft manufacturer and role to info window. 2021-01-18 20:13:51 +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
6f11a269bc Add a few more pretty names. 2021-01-18 12:27:55 +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
3282ba0302 Hercules mod has AC-130s, so CAS makes sense too. 2021-01-17 21:10:14 +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
b545634d87 Revert accidental display options default change. 2021-01-16 15:30:54 -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
Dan Albert
1a2475dc25 Add display option for BARCAP commit range. 2021-01-16 15:15:40 -08:00
Dan Albert
2374239238 Fix doctrine inversion in threat zones.
The threat zone is the zone project by the given coaltition, not against
it.
2021-01-16 14:01:53 -08:00
Simon Clark
f84d77d334 Fix startup faction error. 2021-01-14 15:30:08 +00:00
Simon Clark
5a275e6153 Missed some subs. 2021-01-13 20:45:59 +00:00
Simon Clark
5f07069f1d Remove submarines for the time being.
They definitely feel too much like placeholders at this point.
They should be removed until they're in a better state.

https://forums.eagle.ru/topic/251238-submarines is a good read on the topic.
2021-01-13 19:52:35 +00:00
Simon Clark
1e1cebc3fc Display a "No aircraft available" message.
If in the create flight dialog, there are no suitable aircraft for a task, or no aircraft left at all, a suitable message is now shown that prevents the user from creating a flight.

Also adds in a quick "remember what plane the user had selected last" feature.
2021-01-13 12:11:53 +00:00
Simon Clark
c40ad75fa2 Add DEAD to the selectable aircraft list. 2021-01-13 10:37:05 +00:00
Simon Clark
c80db72bf7 Changelog. 2021-01-12 19:03:02 +00: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
9ebad734a9 Changelog. 2021-01-12 17:30:15 +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
a1136953d0 Fix custom waypoints. 2021-01-11 20:16:23 -08: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
5e24fe9bb1 Poland is now Poland again.
The Mission Editor can be tricked into giving factions any unit.
Therefore, Poland can be Poland again, and not CJTFB.
2021-01-10 13:16:40 +00:00
Simon Clark
bc5b32ddef Changelog. 2021-01-10 13:09:28 +00:00
Simon Clark
7269dbb79d Edit Flight window is now dynamically sized.
This means that the waypoint names no longer get cut off.

Contributes-to: Khopa/dcs_liberation#754
2021-01-10 13:07:02 +00: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
Dan Albert
1539d9c7ed Add a 1985 East German faction. 2021-01-09 16:02:51 -08:00
Dan Albert
4ae95e06ef Add a 1985 French faction. 2021-01-09 16:02:51 -08:00
Dan Albert
fa1166d014 Limit reserve ground units to 10.
Allowing these to grow infinitely leads to some really weird behaviors
when the enemy has been buying reserves long enough, where capturing a
base might result in 80 enemy vehicles suddenly at the gates.

This is just an interim fix. Ideally these units would be reinforcing
the front line as needed
(https://github.com/Khopa/dcs_liberation/issues/382), and a CP could be
lost without needing to completely destroy the defender.
2021-01-09 13:10:21 -08:00
Dan Albert
2d9e5fe984 Fix handling of destroyed buildings. 2021-01-08 19:21:06 -08:00
Simon Clark
7ae934e940 Make new flight comboboxes auto-adjust their size.
Content was previously being cut off when the first airport selected had a shorter name than the one the player wanted.
2021-01-08 22:52:21 +00:00
Simon Clark
64b2eeface Stop loadout resetting each time the editor opens. 2021-01-08 10:22:56 +00:00
Simon Clark
558dc591a3 Made the payload editor more user-friendly.
A user can now modify the existing default loadout, rather than starting from scratch.

Also adds WIP handling for removed pylons, which looks like it may need some PyDCS work.

Also fixes the F-14B default loadouts for everything OTHER than fighter sweep again.
2021-01-08 09:42:09 +00:00
Simon Clark
0bfd766a0b Make the base capture cheat also toggleable.
Also changelog.
2021-01-07 23:04:33 +00:00
Simon Clark
7741713a7c Makes the base intel window scrollable.
Contributes-to: Khopa/dcs_liberation#691
2021-01-07 22:56:04 +00:00
Khopa
454b540bce 2.3.4 changelog hadn't been added on develop branch. 2021-01-07 21:56:07 +01:00
Simon Clark
591c62b6d5 Make frontline advance/retreat cheats optional.
This can now be toggled on and off in the cheats menu.
2021-01-07 17:46:06 +00: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
f845ad9b31 Move the OCA payload type from runway->aircraft. 2021-01-07 15:56:00 +00:00
Simon Clark
f5f33ec865 Fixes the F-14B fighter sweep loadout.
The default one just picked two external tanks, so using the CAP one.

Fixes Khopa/dcs_liberation#663
2021-01-07 15:52:24 +00:00
Simon Clark
d35faf15d7 Tuples require a comma after a single item. 2021-01-07 13:42:21 +00:00
Simon Clark
7085bce6d4 Add support for some extra loadout types.
Also fixes the bug that @Starfire13 spotted in Khopa/dcs_liberation#744.
2021-01-07 13:37:16 +00:00
Simon Clark
a81890e844 Changelog. 2021-01-07 12:35:08 +00:00
Simon Clark
8dbec21b02 Adds Iran 1988 Faction.
Also adds the SA342 Gazelle to Iraq, as they used them.

Adds associated pretty names.
2021-01-07 12:34:35 +00:00
Simon Clark
a654c8229a Make the default loadout code more resilient.
It can now cope with the payload overrides defined in the db.
2021-01-07 11:31:46 +00:00
Simon Clark
f2e35c185b Displays the default loadout in the payload UI.
The default loadout is now displayed whenever the custom loadout checkbox is unchecked.

The custom loadout is reset when the custom loadout is checked, to force the user to be prescriptive about the loadout.

Contributes-to: Khopa/dcs_liberation#725
2021-01-07 01:45:45 -08:00
Simon Clark
062c2643ad Adds rockets/hellfires to Apaches where sensible. 2021-01-06 17:18:13 -08:00
Simon Clark
088c7b35ba Adds more strategic & maritime bombers for Russia.
Also adds the prettified name for the Tu-142.
2021-01-06 17:16:03 -08:00
walterroach
ef439a6c42 Merge pull request #736 from SimonC6R/fix-carrier-sam-rings
Carrier group threat rings move with the carrier.
2021-01-06 17:24:15 -06:00
Dan Albert
40956a4042 Merge pull request #738 from SimonC6R/remove-pyotr-velikiy
Remove Pyotr Velikiy from the generator for now.
2021-01-06 12:43:59 -08:00
Simon Clark
8680e90e3b Changelog. 2021-01-06 20:42:10 +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
042be9da6d Carrier group threat rings move with the carrier.
Previously, the individual units in the group were moved, but the ground_unit object was not.

Fixes: Khopa/dcs_liberation#735
2021-01-06 18:58:20 +00:00
Khopa
81b0ea1eef Updated AIM-7 config to account for the Belly and Shoulder versions of the AIM-7 used on the F-14. Also Downgrade AIM-54C to AIM-54A before 86 on the Tomcat. 2021-01-06 01:27:53 +01:00
Khopa
52289d1283 More fallbacks weapons for popular precision air to ground weapons 2021-01-06 00:56:20 +01:00
Khopa
1843d23203 Merge remote-tracking branch 'khopa/develop' into develop 2021-01-06 00:54:42 +01:00
Khopa
1a32fef987 More fallbacks weapons for popular precision air to ground weapons 2021-01-06 00:53:55 +01: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
c3401d478b Added R-73 -> R60 to weapons fallback data 2021-01-05 21:40:20 +01: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
Simon Clark
ef143a7ebb Changelog update. 2021-01-05 03:34:10 -08:00
SimonC6R
7aec483e73 Also add the E-2C to Israel and Japan.
Israel only got it in 1981 but it's that or the E-3A they never used.

Japan never used the E-3A, but did buy the E-2.
2021-01-05 02:36:08 -08:00
SimonC6R
db6a3b9849 Use E-2C Hawkeye for US faction between 1964-1977. 2021-01-05 02:36:08 -08:00
Dan Albert
657c5e1f52 Merge pull request #712 from SimonC6R/add-greece-2005
Adds a 2005-ish Greece faction.
2021-01-05 02:34:52 -08:00
Simon Clark
3b0466d7cb Adds a 2010-ish Poland faction. (#713)
The SU-17M4 represents the remaining Su-22s that Poland still flies.
I've used the Stryker as a replacement for the KTO Rosomak, which was in service as far back as 2007.
There were a few Molniyas still in service as of 2010, namely the Metalowiec and Rolnik, as well as a singular Kilo class.
2021-01-05 02:31:49 -08:00
Dan Albert
8a9177b459 Merge pull request #716 from SimonC6R/sold-aircraft-state
Adds a buffer for sold aircraft/vehicles.
2021-01-05 02:12:49 -08:00
Simon Clark
a0e63511d6 Update Greece faction with comments. 2021-01-05 10:12:46 +00:00
Simon Clark
7c3f7d4b8e Addresses review comments. 2021-01-05 09:42:05 +00:00
Dan Albert
be1062c373 Update era-specific loadout release notes. 2021-01-05 00:54:28 -08:00
Dan Albert
2bd5ab06a7 More weapon data.
https://github.com/Khopa/dcs_liberation/issues/490
2021-01-05 00:43:59 -08: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
7ef191be2a Add more weapon data.
Finishes AIM-120 and AIM-9X.

https://github.com/Khopa/dcs_liberation/issues/490
2021-01-05 00:25:37 -08:00
SimonC6R
03a29aeedf Type annotations. 2021-01-05 00:31:54 +00:00
SimonC6R
d10b4c1e13 Re-add whitespace. 2021-01-05 00:27:26 +00:00
SimonC6R
ab2046a2c2 Refactor the sell unit changes as requested.
It works more simply now, and also doesn't immediately sell the unit.

Also adds a matching UI dialog popup for selling too many ground units.
2021-01-05 00:26:40 +00:00
Dan Albert
bc6b2e0f3e Add warning for missing weapon data.
These are disabled by default because it would otherwise warn about
nearly every piece of equipment in the game currently.
2021-01-04 15:57:37 -08:00
Dan Albert
746c99ebd6 Update Skynet to 2.0.1.
Fixes https://github.com/Khopa/dcs_liberation/issues/717
2021-01-04 15:36:18 -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
Simon Clark
e222f17199 Adds payload and EWRS info for J-11A. (#715)
No loadout had been specified for the J-11A, so I've added one. The J-11A carries a similar loadout to the Su-27, but with R-77s instead of R-27ERs.

Also looks like it was missing from the EWRS details, so I've added it there too.

Addresses Khopa/dcs_liberation#610
Addresses Khopa/dcs_liberation#671
2021-01-04 13:07:07 -08:00
Simon Clark
144cfecc0f Adds the E-2C Hawkeye to the game. (#714)
* Adds the E-2C Hawkeye to the game.

It wasn't being imported from pydcs, and thus wasn't in the list of AWACS aircraft or prices.

Also adds it to the 1985 US Navy list, as that makes sense to do.

Updates .gitignore to ignore my VS Code settings file.

Addresses Khopa/dcs_liberation#709
2021-01-04 13:04:11 -08:00
Simon Clark
64066bfc90 Merge branch 'develop' of https://github.com/Khopa/dcs_liberation into develop 2021-01-04 19:27:36 +00:00
Simon Clark
366ac4ee14 Adds a buffer for sold aircraft/vehicles.
This feature allows you to cancel the sales of aircraft or ground vehicles if needed.

Upon clicking the minus button, a count of sold units will be appended to the unit count. This count responds to both further presses of the minus button, and also to presses of the plus button. No further units will be requested for the next turn until all sold units have been re-bought.

I've tested a bunch of different scenarios with this:

- Selling and rebuying a unit - the budget increases and decreases as expected.

- Selling one unit, buying a unit worth the new player budget, and then trying to rebuy the old unit - the old unit cannot be rebought until the budget has been freed up for it.

- Closing the base window and re-opening it - the sold unit count is retained.

- Ending the turn - the sold unit count is reset back to 0 as expected.

Contributes to Khopa/dcs_liberation#365
2021-01-04 19:27:29 +00:00
walterroach
851984ee66 Revert TGO ID reset - fixes #708 2021-01-04 11:36:40 -06:00
Dan Albert
34bdc0e80b Fix new game creation. 2021-01-01 16:15:43 -08:00
Dan Albert
61d7d5e041 Update minimum version of pyside2.
Fixes https://github.com/Khopa/dcs_liberation/issues/416
2021-01-01 15:50:01 -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
461635c001 Note pending unit refund in changelog. 2021-01-01 14:46:51 -08:00
Dan Albert
fcb1d8e104 Retreat ground forces from captured bases.
If the captured base has no connection to other friendly objectives (the
base was encircled) then the enemy equipment will be captured and sold.
Otherwise the units will retreat toward connected bases.

Partial fix for https://github.com/Khopa/dcs_liberation/issues/693.
Still need to fix this for air units.
2021-01-01 14:45:43 -08:00
Dan Albert
6cbc2b707a Fix type of Game.budget.
This *is* a float, since the income multiplier is a float. The type
annotations were wrong.
2021-01-01 13:56:33 -08:00
Dan Albert
9671542bdf Decouple unit deliveries and conflict events.
Fixes https://github.com/Khopa/dcs_liberation/issues/692 and lets us
clean up the interface quite a bit.
2021-01-01 13:48:23 -08:00
Dan Albert
de325c1208 Refunding unfulfilled orders on capture.
Fixes https://github.com/Khopa/dcs_liberation/issues/682
2021-01-01 13:23:58 -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
C. Perreau
068f9e42d7 Merge pull request #698 from Khopa/develop_2_3_x
Release 2.3.4
2020-12-31 14:07:30 +01:00
Khopa
4a483c3b27 Changelog 2020-12-31 13:52:02 +01:00
Khopa
e3bd958069 Fixed possible AttributeError when generating missile site fire tasks 2020-12-31 13:28:21 +01:00
Khopa
900cf0a9d0 Update preview version number 2020-12-31 13:16:09 +01:00
C. Perreau
64c424b9a6 Merge pull request #649 from Khopa/develop_2_3_x
Release 2.3.3
2020-12-31 01:26:19 +01:00
Dan Albert
5734c29312 Remove wrong precondition in aircraft procurement.
Those task types aren't correct here (that whole dict probably serves
little purpose now), and the actual unit pool is handled in
_affordable_aircraft_of_types.
2020-12-28 16:06:54 -08:00
walterroach
362caa6ac1 Merge pull request #689 from walterroach/naming
Naming
2020-12-28 17:22:42 -06:00
Dan Albert
b620976b70 Flesh out Desert War IADS, add carriers. 2020-12-28 13:16:39 -08: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
436725b38e Don't award base capture bonuses.
If anything we should be granting the loser extra income so they can
recover. For now just remove.
2020-12-27 19:52:42 -08:00
Dan Albert
922d935bc1 Tweak default budget and turn 0 allocation.
AI wasn't buying many ground vehicles. Keep the turn 0 air budget about
where it was but bump up the ground budget from ~120M to ~600M.
2020-12-27 19:48:03 -08:00
Dan Albert
3716395453 Don't show FOB structure as a target.
This isn't perfect because the auto planner might still target it. We
need a larger refactoring for target iteration so we don't need to
remember all the special rules at each call site. For now, this restores
the 2.3.2 behavior.

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

(cherry picked from commit 69833f66e3)
2020-12-27 19:35:45 -08:00
Dan Albert
69833f66e3 Don't show FOB structure as a target.
This isn't perfect because the auto planner might still target it. We
need a larger refactoring for target iteration so we don't need to
remember all the special rules at each call site. For now, this restores
the 2.3.2 behavior.

Fixes https://github.com/Khopa/dcs_liberation/issues/681
2020-12-27 19:34:10 -08: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 89f313295e)
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
7bc7a44c72 Allow managing disbanded sites in CPs.
Fixes https://github.com/Khopa/dcs_liberation/issues/679

(cherry picked from commit 317a882386)
2020-12-27 13:09:15 -08:00
Dan Albert
317a882386 Allow managing disbanded sites in CPs.
Fixes https://github.com/Khopa/dcs_liberation/issues/679
2020-12-27 13:08:59 -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
7bbb1c0822 Don't show repaired TGOs as dead.
We were never resetting the dead state for repaired SAMs. Rather than
tracking that manually, determine liveness from the number of units left
alive.

For building objectives where the group is not assigned to the TGO until
*mission* generation time we still need manual tracking.

(cherry picked from commit d3b1f6110f)
2020-12-26 16:21:31 -08:00
Dan Albert
d3b1f6110f Don't show repaired TGOs as dead.
We were never resetting the dead state for repaired SAMs. Rather than
tracking that manually, determine liveness from the number of units left
alive.

For building objectives where the group is not assigned to the TGO until
*mission* generation time we still need manual tracking.
2020-12-26 16:19:41 -08:00
Dan Albert
a6dc3d2aff Handle threat/detection per group.
Some SAMs have multiple groups (such as an SA-10 group with its
accompanying SA-15 and SA-19 groups). This shows each group's threat and
detection separately on the map, and also makes it so that an SA-10 with
dead radars will no longer contribute to the threat zone just because
the shilka next to it still has a functioning radar.

https://github.com/Khopa/dcs_liberation/issues/647
Fixes https://github.com/Khopa/dcs_liberation/issues/672
2020-12-26 15:52:36 -08:00
Dan Albert
d946a9e526 Don't count blind SAMs as threats.
https://github.com/Khopa/dcs_liberation/issues/647
2020-12-26 15:40:38 -08:00
Dan Albert
17dd1b193e Remove aa_ranges in favor of using the TGO data. 2020-12-26 15:25:23 -08:00
Dan Albert
d634fd3236 Adjust income based on control point type.
* Navies and off map spawns generate no income
* FOBs generate 10 instead of 20

Fixes https://github.com/Khopa/dcs_liberation/issues/662
2020-12-26 15:08:57 -08:00
Dan Albert
e861e5b3d6 Even out player and opfor income rules.
Should help fix the anemic enemy forces after the first few turns.
2020-12-26 14:35:57 -08:00
Dan Albert
6045f4dd91 Fix New Package for naval control points.
Also reordered the tasks so ship-specific tasks appear first.

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

(cherry picked from commit 8be2841bdf)
2020-12-26 14:30:34 -08:00
Dan Albert
8be2841bdf Fix New Package for naval control points.
Also reordered the tasks so ship-specific tasks appear first.

Fixes https://github.com/Khopa/dcs_liberation/issues/628
2020-12-26 14:30:26 -08:00
Dan Albert
b6e37b9e67 Exclude non-AA groups from SAM threat zones.
Fixes https://github.com/Khopa/dcs_liberation/issues/666
2020-12-26 14:00:31 -08:00
walterroach
0d0d582bd8 Add F-14A-135-GR Icon 2020-12-26 13:24:45 -06:00
walterroach
0c42227e5e Add F-14A-135-GR Icon 2020-12-26 13:23:45 -06:00
Dan Albert
98ac4bd5c8 Fix generator -> group conversion when buying SAM.
Fixes https://github.com/Khopa/dcs_liberation/issues/664
Fixes https://github.com/Khopa/dcs_liberation/issues/665
2020-12-26 02:23:15 -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
c7f9bfbb43 Sell off incomplete opfor squadrons.
Short term fix for https://github.com/Khopa/dcs_liberation/issues/41.
2020-12-25 18:45:58 -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
993e59413a Add pretty-print for AircraftProcurementRequest. 2020-12-25 17:31:26 -08:00
Dan Albert
9f2fab78a1 Flesh out intel displays.
* Add enemy air and ground unit reports.
* Changes the summary to be a comparison of relative strengths rather
  than raw enemy numbers.

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

(cherry picked from commit 3bdf1377c0)
2020-12-25 16:08:10 -08:00
Dan Albert
3bdf1377c0 Flesh out intel displays.
* Add enemy air and ground unit reports.
* Changes the summary to be a comparison of relative strengths rather
  than raw enemy numbers.

Fixes https://github.com/Khopa/dcs_liberation/issues/658
2020-12-25 16:08:02 -08:00
Dan Albert
8f24cf07be Improve layout of intel window.
(cherry picked from commit 1f4516b954)
2020-12-25 16:05:04 -08:00
Dan Albert
17c40234e9 Add basic intel window.
Currently only shows the enemy's economic information.

https://github.com/Khopa/dcs_liberation/issues/658
(cherry picked from commit 1d76ee4871)
2020-12-25 16:04:54 -08:00
Dan Albert
4cecddcdd0 Add basic enemy intel widget.
https://github.com/Khopa/dcs_liberation/issues/658
(cherry picked from commit b53cac4c7a)
2020-12-25 16:04:17 -08:00
Dan Albert
1f4516b954 Improve layout of intel window. 2020-12-25 14:42:04 -08:00
Dan Albert
1d76ee4871 Add basic intel window.
Currently only shows the enemy's economic information.

https://github.com/Khopa/dcs_liberation/issues/658
2020-12-25 03:24:33 -08:00
Dan Albert
b53cac4c7a Add basic enemy intel widget.
https://github.com/Khopa/dcs_liberation/issues/658
2020-12-25 01:38:14 -08:00
Dan Albert
29a0644719 Never generate empty ship groups.
Fixes https://github.com/Khopa/dcs_liberation/issues/391

(cherry picked from commit c833078e71)
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
e4cba8d19f Mention Skynet PD in changelog. 2020-12-24 19:32:31 -08:00
Dan Albert
cd6620712f Configure skynet point defenses.
Fixes https://github.com/Khopa/dcs_liberation/issues/470
2020-12-24 17:10:32 -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
Khopa
dcac5b488a Changelog update 2020-12-24 16:11:12 +01:00
Khopa
e1009bdafa Fixed ships group that could be replaced by sam site. Removed the possibility to disband ship groups for now. 2020-12-24 16:09:13 +01:00
Khopa
38ce842ca8 Merge remote-tracking branch 'khopa/master' into develop_2_3_x
# Conflicts:
#	changelog.md
#	game/version.py
#	gen/ground_forces/ai_ground_planner.py
#	pydcs
#	resources/factions/iraq_1991.json
#	resources/factions/russia_2010.json
2020-12-24 13:32:14 +01:00
Dan Albert
aafd09569c Fix mypy error. 2020-12-24 02:20:49 -08:00
Dan Albert
67a9df686e Add fast path for NavPoint equality.
Hot method and the FFI costs for comparing the points are not cheap.
2020-12-24 02:06:08 -08:00
Dan Albert
9a374711fd Don't access point coordinates when hashing.
For some reason this is crazy expensive. Turn time goes from 1.7 seconds
to 1 second with this change.
2020-12-24 01:49:07 -08:00
Dan Albert
b9138acbc8 Use shapely projection instead of brute force.
Converts the landmap to use MultiPolygon instead of a collection of
polygons, since Shapely has explicit support for this.

Because we've done that, we can use a single projection from a line
instead of brute forcing the extent of the front line.

This makes turn processing ~66% faster (3 seconds to 1.8).

There are probably other places this should be used.
2020-12-24 01:20:15 -08:00
Dan Albert
2a65916f7c Log time taken in turn processing. 2020-12-24 00:53:36 -08:00
Dan Albert
6aa1f1cca0 Prefer buying aircraft at safe airbases.
Fixes https://github.com/Khopa/dcs_liberation/issues/652
2020-12-23 22:25:47 -08:00
Dan Albert
8c1ebfda02 Show ASAP TOT for debug view flights. 2020-12-23 21:42:13 -08:00
Dan Albert
81af5d7497 Use navmesh to plan strike-like flight plans.
The cases where the target is extremely close to the origin point still
use the old flight plan pattern. This is probably fine.

https://github.com/Khopa/dcs_liberation/issues/292
2020-12-23 21:30:36 -08:00
Khopa
368bf08ade Fixed mypy error 2020-12-24 03:18:53 +01:00
Dan Albert
d95f623ca9 Use navmesh to plan sweep missions.
https://github.com/Khopa/dcs_liberation/issues/292
2020-12-23 18:08:58 -08:00
Dan Albert
2856fbc42b Improve display of nav points in kneeboard. 2020-12-23 17:52:14 -08:00
Dan Albert
ac59e15bd9 Use navmesh to plan CAS and BARCAP.
https://github.com/Khopa/dcs_liberation/issues/292
2020-12-23 17:40:59 -08:00
Dan Albert
91d9bbdc97 Add visual debugging for other fligth plans. 2020-12-23 17:31:04 -08:00
Dan Albert
575f4e1786 Clean up debug display options. 2020-12-23 17:19:57 -08:00
Dan Albert
bff905fae5 Use navmeshes to improve TARCAP flight plans.
Started with TARCAP because they're simple, but will follow and extend
this to the other flight plans next.

This works by building navigation meshes (navmeshes) of the theater
based on the threat regions. A navmesh is created for each faction to
allow the unique pathing around each side's threats. Navmeshes are built
such that there are nav edges around threat zones to allow the planner
to pick waypoints that (slightly) route around threats before
approaching the target.

Using the navmesh, routes are found using A*. Performance appears
adequate, and could probably be improved with a cache if needed since
the small number of origin points means many flights will share portions
of their flight paths.

This adds a few visual debugging tools to the map. They're disabled by
default, but changing the local `debug` variable in `DisplayOptions` to
`True` will make them appear in the display options menu. These are:

* Display navmeshes (red and blue). Displaying either navmesh will draw
  each navmesh polygon on the map view and highlight the mesh that
  contains the cursor. Neighbors are indicated by a small yellow line
  pointing from the center of the polygon's edge/vertext that is shared
  with its neighbor toward the centroid of the zone.
* Shortest path from control point to mouse location. The first control
  point for the selected faction is arbitrarily selected, and the
  shortest path from that control point to the mouse cursor will be
  drawn on the map.
* TARCAP plan near mouse location. A TARCAP will be planned from the
  faction's first control point to the target nearest the mouse cursor.

https://github.com/Khopa/dcs_liberation/issues/292
2020-12-23 17:09:34 -08:00
Khopa
c0fa135bf6 Artillery groups would retreat in the wrong direction - fixed (parameters of the find_retreat_point function are a bit confusing 😕 ) 2020-12-24 02:03:12 +01:00
Khopa
86394d8f19 Artillery groups would retreat in the wrong direction - fixed (parameters of the retreat point function are a bit confusing 😕 ) 2020-12-24 02:02:17 +01:00
Khopa
72c233cb0d Fixed possible assertion error when redeploying units which would lead to ground units not being redeployed. 2020-12-24 01:47:44 +01:00
Khopa
04e2c02eff SCUD missile sites will fire on nearest enemy airport by default 2020-12-24 01:26:00 +01:00
Khopa
7362744df2 Changelog update 2020-12-23 22:15:56 +01:00
Khopa
01951b5c32 Reworked emirates campaign 2020-12-23 21:58:39 +01:00
Khopa
f2f52771bd Removed "broken" midgame setting 2020-12-23 21:37:59 +01:00
Khopa
b59167d3ca Changelog update, WW2 factions can recruit AA/AT guns for frontlines. 2020-12-23 18:21:13 +01:00
Khopa
88e466562c Infantry squads can contain a mortar. 2020-12-23 17:53:52 +01:00
Khopa
1f85e5d7f8 Changelog update 2020-12-23 17:25:15 +01:00
Khopa
50471d510e Fixed and added many ground units icons 2020-12-23 17:24:20 +01:00
Khopa
8b7cf2f725 Changelog update 2020-12-23 01:35:19 +01:00
Khopa
282a5109ba Infantry group are always made of 5 units instead of a random amount. 2020-12-23 01:33:49 +01:00
Khopa
3d3b4738d9 Insurgent hard faction name fixed 2020-12-23 01:31:07 +01:00
Khopa
66149bb591 Fixed error in merge 2020-12-22 23:34:08 +01:00
Khopa
b0ad664ece Merge branch 'develop_2_3_x' into develop
# Conflicts:
#	changelog.md
#	game/procurement.py
#	resources/factions/iraq_1991.json
2020-12-22 23:32:06 +01:00
Khopa
7c29ea836c Infantry is only generated for IFV and APC groups 2020-12-22 23:24:27 +01:00
Khopa
92e9e8c56a Merge remote-tracking branch 'khopa/develop_2_3_x' into develop_2_3_x 2020-12-22 23:23:52 +01:00
Khopa
12bf26223d Added shorad units on frontline 2020-12-22 23:23:32 +01:00
Dan Albert
56d7993c8f Improve threat zone display options. 2020-12-22 13:57:05 -08:00
Dan Albert
52b63927b4 Prune escorts from packages that don't need them.
If the package is not flying into the threat zones of significant air
defenses there's no need for SEAD, and packages not near enemy airbases
do not need escorts. Prune these flights from the package to save
aircraft.
2020-12-22 13:12:04 -08:00
Dan Albert
86558bdef6 Add threat zone modeling.
Creates threat zones around airfields and non-trivial air defenses (it's
not worth dodging anything with a threat range under 3nm). These threat
zones can be used to aid mission planning and waypoint placement.

https://github.com/Khopa/dcs_liberation/issues/292
2020-12-22 13:12:04 -08:00
Dan Albert
e46262b021 Move has_radar into the TGO. 2020-12-22 12:59:29 -08:00
Dan Albert
c53feb5ccb Specify CAP engagement range in the doctrine. 2020-12-22 12:42:36 -08:00
Dan Albert
fc6d4f0990 Add EWRS plugin.
Fixes https://github.com/Khopa/dcs_liberation/issues/323
2020-12-21 21:28:27 +01:00
C. Perreau
df948bde9d Update CONTRIBUTING.md 2020-12-21 14:14:42 +01:00
C. Perreau
203a720ae1 Create CONTRIBUTING.md 2020-12-21 14:14:39 +01:00
C. Perreau
3410f08cfb Create CODE_OF_CONDUCT.md 2020-12-21 14:14:37 +01:00
C. Perreau
a553914ef4 Merge pull request #625 from Khopa/contributing
Create CONTRIBUTING.md
2020-12-21 14:13:29 +01:00
Khopa
21220141f2 pydcs submodule version update 2020-12-21 14:08:21 +01:00
Khopa
caf2d8436b Changelog update for 2.3.3 2020-12-21 13:56:00 +01:00
Khopa
4cc305fa81 Syrian civil war description updated 2020-12-21 13:55:33 +01:00
Khopa
60f837d0b9 Fixed : AI wouldn't buy artillery units 2020-12-21 13:34:56 +01:00
C. Perreau
05bd7f8e6b Update CONTRIBUTING.md 2020-12-21 13:04:16 +01:00
Emanuele Garofalo
e58ab34a15 Update NATO_Desert_Storm.json 2020-12-21 13:02:01 +01:00
Emanuele Garofalo
d960758ef3 Update iraq_1991.json 2020-12-21 13:01:58 +01:00
Emanuele Garofalo
a36ccdcc39 Update NATO_Desert_Storm.json 2020-12-21 13:01:57 +01:00
Emanuele Garofalo
d582948377 Update NATO_Desert_Storm.json 2020-12-21 03:31:19 -08:00
Emanuele Garofalo
d806e0b1c3 Update iraq_1991.json 2020-12-21 03:31:19 -08:00
Emanuele Garofalo
b9e110a7e3 Update NATO_Desert_Storm.json 2020-12-21 03:31:19 -08:00
Dan Albert
a2f218d56d Add EWRS plugin.
Fixes https://github.com/Khopa/dcs_liberation/issues/323
2020-12-21 01:19:54 -08:00
Khopa
2c475011a1 Syria terrain update + syrian civil war reworked in miz format 2020-12-21 03:19:17 +01:00
walterroach
2d7fc33726 Fix Distance being passed to pydcs methods 2020-12-20 17:19:49 -06:00
Dan Albert
0c8d1e1dc4 Remove checkbox from feature request form. 2020-12-20 14:48:54 -08:00
Khopa
bb04ce2abb Golan heights battle scenario fully migrated to miz format 2020-12-20 22:39:15 +01:00
Khopa
9850b22c0a Improved "Golan Heights Campaign Lite" for the Syria map. 2020-12-20 14:56:55 +01:00
C. Perreau
a2f65666a5 Create CONTRIBUTING.md 2020-12-20 14:20:18 +01:00
C. Perreau
7730809dbb Merge pull request #619 from Khopa/add-code-of-conduct-1
Add code of conduct
2020-12-20 13:45:25 +01:00
Dan Albert
2ac818dcdd Convert to new unit APIs, remove old APIs.
There are probably plenty of raw ints around that never used the old
conversion APIs, but we'll just need to fix those when we see them.

Fixes https://github.com/Khopa/dcs_liberation/issues/558
2020-12-19 22:08:57 -08:00
Dan Albert
113947b9f0 Add types for distance and speed.
Not converting all at once so I can prove the concept. After that we'll
want to cover all the cases where an int distance or speed is a part of
the save game (I've done one of them here with `Flight.alt`) so further
cleanups don't break save compat.

https://github.com/Khopa/dcs_liberation/issues/558
2020-12-19 21:07:55 -08:00
walterroach
44bc2d769b Merge branch 'develop_2_3_x' into develop 2020-12-19 20:27:31 -06:00
Khopa
02ecfebb85 Merge remote-tracking branch 'khopa/develop_2_3_x' into develop_2_3_x 2020-12-19 23:54:28 +01:00
Khopa
a1fed62591 Added "Golan Heights Campaign Lite" for the Syria map. 2020-12-19 23:54:02 +01:00
Dan Albert
778ed6ad91 Update 2.3 branch to 2.3.3 preview. 2020-12-19 13:48:44 -08:00
Dan Albert
7d539f5810 Remove pyproj from requirements.txt.
Not actually used.
2020-12-19 12:44:12 -08:00
Dan Albert
b407acbc07 Add section for 2.4 changelog. 2020-12-19 12:36:32 -08:00
Dan Albert
3260260dce Move more SAMs off runways in Syria Full.
(cherry picked from commit e5bca224e9)
2020-12-19 12:30:38 -08:00
Dan Albert
70c1290993 Note fixed SAM placement in changelog. 2020-12-19 12:30:38 -08:00
Dan Albert
6bae60c51e Note Iraq 1991 faction in changelog.
(cherry picked from commit 8447c563ea)
2020-12-19 12:30:38 -08:00
Emanuele Garofalo
a45adb6b3a New Faction Iraq 1991
(cherry picked from commit fd61a4b23a)
2020-12-19 12:30:38 -08:00
Dan Albert
476aaf5d3e Update changelog for #616.
(cherry picked from commit 3e4bb88089)
2020-12-19 12:30:38 -08:00
Dan Albert
58187b6969 Put back code to reserve beacon frequencies.
Fixes https://github.com/Khopa/dcs_liberation/issues/616

(cherry picked from commit 2f3f53a978)
2020-12-19 12:30:38 -08:00
Dan Albert
f3a3d81d96 Update beacon data.
(cherry picked from commit 89755b1005)
2020-12-19 12:30:38 -08:00
Dan Albert
7a40b54153 Update beacon importer to handle TheChannel.
TheChannel doesn't have message catalogs for English.

(cherry picked from commit a7203ea90a)
2020-12-19 12:30:38 -08:00
Dan Albert
9dd62d3538 Improve TOT planning.
Moves all TOT planning into the FlightPlan to clean up specialized
behavior and improve planning characteristics.

The important part of this change is that flights are now planning to
the mission time for their flight rather than the package as a whole.
For example, a TARCAP is planned based on the time from startup to the
patrol point, a sweep is planned based on the time from startup to the
sween end point, and a strike flight is planned based on the time from
startup to the target location. TOT offsets can be handled within the
flight plan.

As another benefit of theis cleanup, flights without hold points no
longer account for the hold time in their planning, so those flights are
planned to reach their targets sooner.

As a follow up TotEstimator can be removed, but I want to keep this low
impact for 2.3.2.

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

(cherry picked from commit 745dfc71bc)
2020-12-19 12:30:38 -08:00
walterroach
76e4a6ed83 Fix bad air defense location #617 2020-12-19 12:30:38 -08:00
Dan Albert
7a9eb06677 Add missing 2.3.2 change to changelog.
(cherry picked from commit 4eac743812)
2020-12-19 12:30:38 -08:00
Dan Albert
26f54e7619 Fix adding custom waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/604

(cherry picked from commit 296e6e8e8f)
2020-12-19 12:30:38 -08:00
Khopa
117b7ae414 Changelog update 2020-12-19 12:30:38 -08:00
Khopa
baeac324d6 Updated version string 2020-12-19 12:30:38 -08:00
Khopa
0db0f003dc Added ZSU-57 sites 2020-12-19 12:30:38 -08:00
Khopa
2d4f341710 T72B3 and BTR-82A support 2020-12-19 12:30:38 -08:00
Khopa
b8a41dc937 pydcs version update to include new data export 2020-12-19 12:30:38 -08:00
walterroach
2f2bb0de4f Fix Ground units ... don't move forward #601 2020-12-19 12:30:38 -08:00
Dan Albert
3b76d7f47e Fail gracefully when out of radio channels.
Fixes https://github.com/Khopa/dcs_liberation/issues/598

(cherry picked from commit 498af28efb)
2020-12-19 12:30:38 -08:00
Dan Albert
10b74e507f Don't exclude BARCAP targets from culling.
Fixes https://github.com/Khopa/dcs_liberation/issues/597

(cherry picked from commit b9ade2295e)
2020-12-19 12:30:38 -08:00
Dan Albert
8a03a9462b Move more SAMs off runways in Syria Full.
(cherry picked from commit e5bca224e9)
2020-12-19 12:22:27 -08:00
Dan Albert
e5bca224e9 Move more SAMs off runways in Syria Full. 2020-12-19 12:22:08 -08:00
Dan Albert
197bf5d0cf Mark develop branch as 2.4 preview. 2020-12-19 12:07:35 -08:00
Dan Albert
d8b15ebcdb Merge branch 'develop_2_3_x' into develop 2020-12-19 12:03:21 -08:00
Dan Albert
078466241f Note fixed SAM placement in changelog. 2020-12-19 12:02:34 -08:00
Dan Albert
57c3eb5d2c Remove checkboxes from bug template.
Prevents all our bugs from looking complete or in progress because they have partially completed "tasks".
2020-12-19 11:59:28 -08:00
C. Perreau
a4876167c4 Create CODE_OF_CONDUCT.md 2020-12-19 20:57:55 +01:00
Dan Albert
a38a5654a9 Document current license.
Copied from the original shdwp repository.

https://github.com/Khopa/dcs_liberation/issues/243
2020-12-19 11:56:13 -08:00
Dan Albert
69a41879bb Note Iraq 1991 faction in changelog.
(cherry picked from commit 8447c563ea)
2020-12-19 11:53:49 -08:00
Emanuele Garofalo
e3524a506b New Faction Iraq 1991
(cherry picked from commit fd61a4b23a)
2020-12-19 11:53:46 -08:00
Dan Albert
8447c563ea Note Iraq 1991 faction in changelog. 2020-12-19 11:53:25 -08:00
Emanuele Garofalo
fd61a4b23a New Faction Iraq 1991 2020-12-19 11:52:54 -08:00
Dan Albert
9257311896 Update changelog for #616.
(cherry picked from commit 3e4bb88089)
2020-12-19 11:47:02 -08:00
Dan Albert
23e870e416 Put back code to reserve beacon frequencies.
Fixes https://github.com/Khopa/dcs_liberation/issues/616

(cherry picked from commit 2f3f53a978)
2020-12-19 11:47:01 -08:00
Dan Albert
8270b28d85 Update beacon data.
(cherry picked from commit 89755b1005)
2020-12-19 11:47:00 -08:00
Dan Albert
1a0889d3d9 Update beacon importer to handle TheChannel.
TheChannel doesn't have message catalogs for English.

(cherry picked from commit a7203ea90a)
2020-12-19 11:47:00 -08:00
Dan Albert
5382d99a94 Improve TOT planning.
Moves all TOT planning into the FlightPlan to clean up specialized
behavior and improve planning characteristics.

The important part of this change is that flights are now planning to
the mission time for their flight rather than the package as a whole.
For example, a TARCAP is planned based on the time from startup to the
patrol point, a sweep is planned based on the time from startup to the
sween end point, and a strike flight is planned based on the time from
startup to the target location. TOT offsets can be handled within the
flight plan.

As another benefit of theis cleanup, flights without hold points no
longer account for the hold time in their planning, so those flights are
planned to reach their targets sooner.

As a follow up TotEstimator can be removed, but I want to keep this low
impact for 2.3.2.

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

(cherry picked from commit 745dfc71bc)
2020-12-19 11:46:58 -08:00
Dan Albert
3e4bb88089 Update changelog for #616. 2020-12-19 11:46:19 -08:00
Dan Albert
2f3f53a978 Put back code to reserve beacon frequencies.
Fixes https://github.com/Khopa/dcs_liberation/issues/616
2020-12-19 11:45:33 -08:00
Dan Albert
89755b1005 Update beacon data. 2020-12-19 11:44:12 -08:00
Dan Albert
a7203ea90a Update beacon importer to handle TheChannel.
TheChannel doesn't have message catalogs for English.
2020-12-19 11:44:02 -08:00
walterroach
afb0ac14c4 Fix bad air defense location #617 2020-12-19 13:31:31 -06:00
Dan Albert
745dfc71bc Improve TOT planning.
Moves all TOT planning into the FlightPlan to clean up specialized
behavior and improve planning characteristics.

The important part of this change is that flights are now planning to
the mission time for their flight rather than the package as a whole.
For example, a TARCAP is planned based on the time from startup to the
patrol point, a sweep is planned based on the time from startup to the
sween end point, and a strike flight is planned based on the time from
startup to the target location. TOT offsets can be handled within the
flight plan.

As another benefit of theis cleanup, flights without hold points no
longer account for the hold time in their planning, so those flights are
planned to reach their targets sooner.

As a follow up TotEstimator can be removed, but I want to keep this low
impact for 2.3.2.

Fixes https://github.com/Khopa/dcs_liberation/issues/593
2020-12-19 11:20:16 -08:00
Dan Albert
82d9689d1b Remove links from bug report template.
Links don't render here.
2020-12-18 13:39:48 -08:00
Dan Albert
6afaef1654 Add issue templates. 2020-12-18 13:38:07 -08:00
Dan Albert
bb42d86012 Add more information to the readme.
Adds information about filing bugs/feature requests, finding the roadmap, and finding the preview builds.
2020-12-18 13:10:05 -08:00
Dan Albert
5b44580061 Add missing 2.3.2 change to changelog.
(cherry picked from commit 4eac743812)
2020-12-17 16:28:17 -08:00
Dan Albert
4eac743812 Add missing 2.3.2 change to changelog. 2020-12-17 16:27:54 -08:00
Dan Albert
ed8ab37bd5 Fix adding custom waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/604

(cherry picked from commit 296e6e8e8f)
2020-12-17 16:26:19 -08:00
Dan Albert
563c3f0f1b Merge branch 'develop_2_3_x' into develop 2020-12-17 16:25:18 -08:00
Dan Albert
296e6e8e8f Fix adding custom waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/604
2020-12-17 16:21:31 -08:00
Khopa
334aab2755 Changelog update 2020-12-18 01:09:14 +01:00
Khopa
419f4f3156 Updated version string 2020-12-18 01:08:34 +01:00
Khopa
ec5a26e8dd Added ZSU-57 sites 2020-12-18 01:05:06 +01:00
Khopa
2b7cd36eea T72B3 and BTR-82A support 2020-12-18 00:42:44 +01:00
Khopa
2f11731052 pydcs version update to include new data export 2020-12-18 00:25:50 +01:00
Khopa
23a0846533 Merge branch 'develop_2_3_x' into develop
# Conflicts:
#	changelog.md
#	qt_ui/windows/QLiberationWindow.py
#	resources/campaigns/syria_full_map_remastered.json
2020-12-18 00:23:53 +01:00
walterroach
666858f8e2 Fix Ground units ... don't move forward #601 2020-12-17 02:03:02 -06:00
Dan Albert
2288b7f7b2 Fail gracefully when out of radio channels.
Fixes https://github.com/Khopa/dcs_liberation/issues/598

(cherry picked from commit 498af28efb)
2020-12-16 22:24:07 -08:00
Dan Albert
498af28efb Fail gracefully when out of radio channels.
Fixes https://github.com/Khopa/dcs_liberation/issues/598
2020-12-16 19:12:18 -08:00
Khopa
3902ab3375 Fixed : BMD_1 IFV missing from db. Fixed error preventing mission generation when the role of an unit can not be determined.
(cherry picked from commit 4112a86fe9)
2020-12-16 19:08:42 -08:00
Dan Albert
6bb0bdf66e Don't exclude BARCAP targets from culling.
Fixes https://github.com/Khopa/dcs_liberation/issues/597

(cherry picked from commit b9ade2295e)
2020-12-16 18:53:17 -08:00
Dan Albert
b9ade2295e Don't exclude BARCAP targets from culling.
Fixes https://github.com/Khopa/dcs_liberation/issues/597
2020-12-16 18:52:12 -08:00
C. Perreau
44b5f5a919 Merge pull request #596 from Khopa/develop_2_3_x
Release 2.3.1
2020-12-16 21:45:30 +01:00
Khopa
17d37494c2 2.3.1 changelog 2020-12-16 21:14:25 +01:00
Khopa
f0d81e98a0 About dialog update 2020-12-16 21:12:01 +01:00
Khopa
e3b13f7b4a UX : Display a warning message when attempting to buy more aircraft at an already full airfield. 2020-12-16 21:08:48 +01:00
Khopa
ba2686630a Updated version number 2020-12-16 20:51:36 +01:00
Emanuele Garofalo
e195cfa6a0 Replaced previous Syria full map by the new version by Hawkmoon 2020-12-16 20:49:03 +01:00
Emanuele Garofalo
b9fbd1906f Add files via upload
Fixed NATO DESERT STORM FACTIO
2020-12-16 20:47:04 +01:00
Emanuele Garofalo
1f611bafef Add files via upload
New Syria Full map Remastered
2020-12-16 20:46:54 +01:00
C. Perreau
af7faa59dc Merge pull request #595 from ITAHawkmoon/develop
Syria Full map Remastered & NATO Desert Storm fixed
2020-12-16 20:43:34 +01:00
Emanuele Garofalo
0b21ee46ea Delete NATO Desert Storm.json
old faction
2020-12-16 16:23:40 +01:00
Emanuele Garofalo
f64996a350 Add files via upload
Fixed NATO DESERT STORM FACTIO
2020-12-16 16:22:37 +01:00
Emanuele Garofalo
d7cccd1980 Add files via upload
New Syria Full map Remastered
2020-12-16 16:20:45 +01:00
walterroach
b9467d9236 Fix broken Full Caucasus Map frontline 2020-12-16 09:08:13 -06:00
walterroach
69096b15ae Fix broken Full Caucasus Map frontline 2020-12-16 09:06:51 -06:00
Dan Albert
a075e62bad Fix easy going CAPs.
Fixes https://github.com/Khopa/dcs_liberation/issues/592

(cherry picked from commit 1ebe367e07)
2020-12-15 22:48:21 -08:00
Dan Albert
1ebe367e07 Fix easy going CAPs.
Fixes https://github.com/Khopa/dcs_liberation/issues/592
2020-12-15 22:48:05 -08:00
Khopa
db229f25bf Changelog update 2020-12-16 00:28:59 +01:00
Khopa
787c93b9d4 Another yaml release update 2020-12-15 23:55:13 +01:00
Khopa
63953992a9 Fix release yml syntax error 2020-12-15 23:46:01 +01:00
Khopa
567cb0c0b6 Removed exe installer from release process (To avoid having people installing it in C:/Program Files 2020-12-15 23:38:59 +01:00
C. Perreau
f37999a3ef Merge pull request #590 from Khopa/develop_2_3_x
Release 2.3.0
2020-12-15 23:36:08 +01:00
Khopa
545761e3d4 2.3.0 changelog update 2020-12-15 23:22:21 +01:00
C. Perreau
97ea67d01d Merge pull request #533 from walterroach/changelog_audit
WIP: 2.3.0 Changelog Audit
2020-12-15 23:19:13 +01:00
Khopa
561d679a62 Merge remote-tracking branch 'khopa/develop_2_3_x' into develop_2_3_x 2020-12-15 23:14:51 +01:00
Khopa
991cd91dd4 Possible to setup Runway attack payload, default to strike payload otherwise; 2020-12-15 23:14:36 +01:00
walterroach
9e51ff0253 Merge pull request #589 from walterroach/sead_flyover
SEAD Tasking
2020-12-15 15:25:31 -06:00
Khopa
1a1e55e16c About dialog update 2020-12-15 21:01:13 +01:00
Khopa
2fe4a39784 Changed default payload for C-130 mod 2020-12-15 21:00:56 +01:00
Khopa
7d81b9ef5c C-130 Plugin by Plob 2020-12-15 20:19:42 +01:00
Khopa
b355b6dc60 Updated Persian Gulf Full Map in new miz format by Plob. 2020-12-15 20:19:36 +01:00
Khopa
819148762b Hercules 130 pydcs extensions updated to version 6.0 (MOAB 💣 support) 2020-12-15 20:19:35 +01:00
Khopa
4112a86fe9 Fixed : BMD_1 IFV missing from db. Fixed error preventing mission generation when the role of an unit can not be determined. 2020-12-15 20:09:41 +01:00
walterroach
7838c9b49b Revert DEAD flyover 2020-12-15 12:58:55 -06:00
Khopa
ca5a70e3bc pydcs version update 2020-12-15 19:57:32 +01:00
Khopa
d6376c3a91 pydcs version update 2020-12-15 19:57:04 +01:00
Khopa
e134143f16 Fixed possible crash in mission generation when generating a mission with a faction that doesn't have mandpad and with the disabled infantry option checked.
(cherry picked from commit 31fdd24c3e)
2020-12-15 10:20:41 -08:00
Dan Albert
0f1577d314 Fix crash in new game generation.
Fixes https://github.com/Khopa/dcs_liberation/issues/583

(cherry picked from commit 793b356c01)
2020-12-15 10:20:38 -08:00
Dan Albert
793b356c01 Fix crash in new game generation.
Fixes https://github.com/Khopa/dcs_liberation/issues/583
2020-12-15 10:16:21 -08:00
walterroach
a36858f3ea Change SEAD target waypoint to flyover 2020-12-15 11:53:12 -06:00
Dan Albert
aaa6637435 Don't cull objects near package targets.
https://github.com/Khopa/dcs_liberation/issues/578
Fixes https://github.com/Khopa/dcs_liberation/issues/262

(cherry picked from commit 25efdd3d4f)
2020-12-14 23:55:59 -08:00
Dan Albert
f0f6739cf8 Don't cull flights.
This was made largely pointless in 2.2, since the AI won't plan a dozen
CAPs 300nm from the front line any more. Culling flights mostly just
confuses players and breaks the planning AI.

If we do want to limit flight counts, we need to do that by limiting
flight counts. The AI will try to put their aircraft as close to the
mission as possible, so culling will do very little to stop them from
spawning 50 flights at the front-line attached airfield.

https://github.com/Khopa/dcs_liberation/issues/578
(cherry picked from commit 0b2483ea15)
2020-12-14 23:55:58 -08:00
Dan Albert
25efdd3d4f Don't cull objects near package targets.
https://github.com/Khopa/dcs_liberation/issues/578
Fixes https://github.com/Khopa/dcs_liberation/issues/262
2020-12-14 23:47:31 -08:00
Dan Albert
0b2483ea15 Don't cull flights.
This was made largely pointless in 2.2, since the AI won't plan a dozen
CAPs 300nm from the front line any more. Culling flights mostly just
confuses players and breaks the planning AI.

If we do want to limit flight counts, we need to do that by limiting
flight counts. The AI will try to put their aircraft as close to the
mission as possible, so culling will do very little to stop them from
spawning 50 flights at the front-line attached airfield.

https://github.com/Khopa/dcs_liberation/issues/578
2020-12-14 23:35:30 -08:00
Dan Albert
2c38ce910c Add off-map spawns to the Black Sea campaign.
Fixes https://github.com/Khopa/dcs_liberation/issues/561

(cherry picked from commit 4d26ec0789)
2020-12-14 22:36:57 -08:00
Dan Albert
4d26ec0789 Add off-map spawns to the Black Sea campaign.
Fixes https://github.com/Khopa/dcs_liberation/issues/561
2020-12-14 22:36:39 -08:00
Dan Albert
edba923f2f Fix budget update for non-base SAMs.
Just emit the signal to update the budget rather than trying to figure
out the heirarchy of the UI.

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

(cherry picked from commit 7d907aac0f)
2020-12-14 17:41:14 -08:00
Dan Albert
7d907aac0f Fix budget update for non-base SAMs.
Just emit the signal to update the budget rather than trying to figure
out the heirarchy of the UI.

Fixes https://github.com/Khopa/dcs_liberation/issues/581
2020-12-14 17:00:56 -08:00
Khopa
d6981550a8 C-130 Plugin by Plob 2020-12-14 22:23:21 +01:00
Khopa
8b0636367b Updated Persian Gulf Full Map in new miz format by Plob. 2020-12-14 22:09:37 +01:00
Khopa
a6c9d0f9bc Hercules 130 pydcs extensions updated to version 6.0 (MOAB 💣 support) 2020-12-14 21:41:30 +01:00
walterroach
4b0d2f7abc Merge pull request #576 from walterroach/explict_resources
Explicit resources
2020-12-13 18:04:58 -06:00
Dan Albert
dd28781b69 Fix kneeboard ILS for many airfields.
Fixes https://github.com/Khopa/dcs_liberation/issues/564

(cherry picked from commit 61ebe9780e)
2020-12-13 15:12:39 -08:00
Dan Albert
ece56032f1 Fix missing import for new package on enemy CVs.
Fixes https://github.com/Khopa/dcs_liberation/issues/570

(cherry picked from commit e887082501)
2020-12-13 15:12:39 -08:00
Dan Albert
61ebe9780e Fix kneeboard ILS for many airfields.
Fixes https://github.com/Khopa/dcs_liberation/issues/564
2020-12-13 13:48:08 -08:00
Dan Albert
e887082501 Fix missing import for new package on enemy CVs.
Fixes https://github.com/Khopa/dcs_liberation/issues/570
2020-12-13 13:44:10 -08:00
walterroach
8e3039dd37 Fix Zero Fuel Start #559 2020-12-13 15:41:13 -06:00
walterroach
1d1c130d19 Add missing WW2 units to db
Fixes #571
2020-12-13 15:03:19 -06:00
Khopa
1fd3f70eec Fix usa C-130 faction name being the same as usa_2005 2020-12-13 12:41:49 -06:00
walterroach
d9ea33cbb9 Fix diversified frontline distance 2020-12-13 12:21:09 -06:00
Khopa
80778aa267 Fix usa C-130 faction name being the same as usa_2005 2020-12-13 17:21:13 +01:00
C. Perreau
445cb4f146 Merge pull request #569 from ITAHawkmoon/ITAHawkmoon-update-db
Update db and new faction.py
2020-12-13 16:43:09 +01:00
C. Perreau
95db2aa14f Merge branch 'develop' into ITAHawkmoon-update-db 2020-12-13 16:25:52 +01:00
Emanuele Garofalo
4b0fc637eb Update NATO Desert Storm.json
syntax error
2020-12-13 12:43:47 +01:00
Emanuele Garofalo
48d6b4cfa1 Add files via upload
New faction NATO desert Storm
2020-12-13 12:33:21 +01:00
Emanuele Garofalo
fc11182bbe Update db.py
added some plane missing from the db
2020-12-13 12:29:58 +01:00
Dan Albert
25b72e1af4 Fix UI exception for custom flight plans.
(cherry picked from commit 1848338ef7)
2020-12-12 18:27:55 -08:00
Dan Albert
1848338ef7 Fix UI exception for custom flight plans. 2020-12-12 18:27:30 -08:00
Dan Albert
ff0446cc12 Fix division by zero for very close waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/557

(cherry picked from commit 08ceb57c31)
2020-12-12 14:51:32 -08:00
Dan Albert
08ceb57c31 Fix division by zero for very close waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/557
2020-12-12 14:51:03 -08:00
Dan Albert
affb332eb9 Fix duplication of pydcs translation keys.
We shouldn't be constructing these by hand, and the first argument is
not the value of the string. I'm not really sure why the current code
works at all. We probably do this in other places and should clean that
up, but for now this should fix Tauntaun.

Fixes https://github.com/Khopa/dcs_liberation/issues/528
2020-12-12 14:24:30 -08:00
Dan Albert
6455c38ff4 Fix duplication of pydcs translation keys.
We shouldn't be constructing these by hand, and the first argument is
not the value of the string. I'm not really sure why the current code
works at all. We probably do this in other places and should clean that
up, but for now this should fix Tauntaun.

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

(cherry picked from commit affb332eb9)
2020-12-12 14:24:09 -08:00
Dan Albert
f62c2fbabb Show player waypoint timing in the briefing.
Fixes https://github.com/Khopa/dcs_liberation/issues/536

(cherry picked from commit d5276c9d4a)
2020-12-12 14:18:36 -08:00
Dan Albert
d5276c9d4a Show player waypoint timing in the briefing.
Fixes https://github.com/Khopa/dcs_liberation/issues/536
2020-12-12 14:17:48 -08:00
walterroach
4c0fc5a407 Adjust tanker speed and altitudes #444 2020-12-12 16:08:37 -06:00
walterroach
f608cd5aef fix mypy issues 2020-12-12 15:45:55 -06:00
walterroach
0371b62acb Merge branch 'ground_tasking' into develop_2_3_x 2020-12-12 15:41:00 -06:00
walterroach
eddd66b5c4 West coast Caucasus Landmap improvements 2020-12-12 15:35:12 -06:00
walterroach
c8e71d269b Improve Ground Unit Behavior
* Prevent spinning units
* Prevent units spawning in exclusion zone
* Prevent units from moving into exclusion zone
2020-12-12 15:33:26 -06:00
Dan Albert
ae034d5387 Show takeoff time in waypoint list.
https://github.com/Khopa/dcs_liberation/issues/536
(cherry picked from commit 07e5c568c4)
2020-12-12 13:22:57 -08:00
Dan Albert
07e5c568c4 Show takeoff time in waypoint list.
https://github.com/Khopa/dcs_liberation/issues/536
2020-12-12 13:22:23 -08:00
walterroach
817d6a0e15 Merge remote-tracking branch 'upstream/develop_2_3_x' into ground_tasking 2020-12-12 12:44:47 -06:00
Khopa
31fdd24c3e Fixed possible crash in mission generation when generating a mission with a faction that doesn't have mandpad and with the disabled infantry option checked. 2020-12-12 15:27:36 +01:00
Khopa
bfa0e4ba49 Made normandy campaign less cluttered 2020-12-12 15:22:51 +01:00
Khopa
dff98f0b53 Made normandy campaign less cluttered 2020-12-12 15:22:35 +01:00
Khopa
d0856ff279 pydcs update 2020-12-12 14:36:57 +01:00
Khopa
c89ff2c3d6 pydcs update 2020-12-12 14:36:40 +01:00
Khopa
4ec88d524a Fixed invasion_from_turkey inverted setup. 2020-12-12 14:25:30 +01:00
Khopa
d6b762efa7 Fixed invasion_from_turkey inverted setup. 2020-12-12 14:25:12 +01:00
Khopa
b476a26759 Fix russia_small campaign not being invertable 2020-12-12 13:23:32 +01:00
Khopa
48c218b430 Fix russia_small campaign not being invertable 2020-12-12 13:22:01 +01:00
Dan Albert
1a062e2170 Set carrier speed for recovery.
https://github.com/Khopa/dcs_liberation/issues/543
(cherry picked from commit d316836e90)
2020-12-11 19:19:48 -08:00
Dan Albert
fe658eb877 Always aim the carrier into the wind.
https://github.com/Khopa/dcs_liberation/issues/543
(cherry picked from commit 8443f61f0a)
2020-12-11 19:19:47 -08:00
Dan Albert
d316836e90 Set carrier speed for recovery.
https://github.com/Khopa/dcs_liberation/issues/543
2020-12-11 19:19:08 -08:00
Dan Albert
8443f61f0a Always aim the carrier into the wind.
https://github.com/Khopa/dcs_liberation/issues/543
2020-12-11 19:01:35 -08:00
Khopa
feed55186f Migrated "polygon" code to shapely 2020-12-12 02:31:43 +01:00
walterroach
56591b8655 broken waypoint finder 2020-12-11 18:17:44 -06:00
Khopa
7c52ca15f3 C-130 example faction 2020-12-12 00:54:19 +01:00
Khopa
06c751f214 Migrated invasion from turkey campaign to new miz format. 2020-12-12 00:51:46 +01:00
Khopa
9d774eaad8 Fixed culling display distance. Allowed smaller distance for culling (useful for WW2 maps) 2020-12-11 22:39:09 +01:00
Khopa
babfd4abda Merge remote-tracking branch 'khopa/develop' into develop 2020-12-11 22:04:50 +01:00
Khopa
a029c165a0 Normandy campaigns and terrain update 2020-12-11 22:04:33 +01:00
walterroach
9b51533d96 Caucasus Terrain and frontline tweaks 2020-12-11 14:35:06 -06:00
Khopa
e1b7e0eb00 Merge remote-tracking branch 'khopa/develop' into develop 2020-12-11 20:56:30 +01:00
Khopa
508a5693c9 Fixed duplicated tgo issue with chinese and russian navy generators. 2020-12-11 20:55:59 +01:00
walterroach
67806f3d76 Dec 10 review 2020-12-11 11:53:25 -06:00
walterroach
f687a30c7e Merge pull request #525 from root0fall/fix_221
refresh budget after purchase from sub-dialog
2020-12-11 11:43:16 -06:00
Dan Albert
15615a1077 Add the Black Sea campaign.
Similar to Western Georgia, but extended further up the coast, and
without the initial battle in Georgia itself.
2020-12-11 01:15:28 -08:00
Dan Albert
905175c210 Add --invert to the game generator. 2020-12-11 01:15:28 -08:00
Dan Albert
409e070887 Generate required IADS near FOBs. 2020-12-11 01:09:14 -08:00
Dan Albert
f659dc1f76 Reference point rework.
* Introduce a real type.
* Rewrite _transform_point to make use of Point.
* Add shift modifier for large (10 pixel) adjustements to reference
  points. Unmodified behavior is now single pixel.
* Use WASD for moving the second point (shift modified numpad keys don't
  seem to work).
* Add a debug option to draw transformed reference points to check for
  errors. If they don't overlap, something is wrong.
* Cleaned up all the existing reference points. Caucasus in particular
  is now *much* better.

As an added bonus, the cleanup for carrier movement projection now also
shows an invalid destination when the destination is on land.
2020-12-10 21:08:38 -08:00
root0fall
b8922b39fd add type hinting to update_dialog_budget() 2020-12-11 09:24:21 +08:00
Khopa
8137d57cdf Dev : Improved Reference point setup mode, made it easier to setup point with polygon map appearing as transparent overlay, and displaying reference points on the map [Press Shift+R to toggle the mode]) 2020-12-11 00:08:08 +01:00
Khopa
bf290ac1a9 Improved Normandy reference points 2020-12-10 23:34:06 +01:00
Khopa
77fda00233 Invasion of iran lite campaign update. 2020-12-10 23:19:51 +01:00
Khopa
0255088e30 Fixed buildings showing in airbase defense menu for FOB points. 2020-12-10 23:19:26 +01:00
Khopa
b74d8b12d0 Fixed duplicated unit names in german WW2 Flak site groups. (Which would cause duplicated unit error in unitmap.py when trying to start the mission) 2020-12-10 22:32:24 +01:00
Khopa
2834f2982c Fix error on first start because of new last_save_file parameter. 2020-12-10 21:11:24 +01:00
Khopa
7d07faa5fb Fix last commit error 2020-12-10 21:09:19 +01:00
Khopa
fd70f0fc4a Pydcs extensions and db info added for C-130 Hercules mod ✈️ 2020-12-10 21:07:04 +01:00
walterroach
7744f84e85 Changelog audit 2020-12-10 14:04:48 -06:00
walterroach
441ef79aa4 Merge pull request #529 from walterroach/you_won
You Won Message
2020-12-09 18:30:47 -06:00
walterroach
c54f6ba4d2 Use set instead of dict 2020-12-09 18:25:24 -06:00
walterroach
61ecdfc48c Merge branch 'develop' into you_won 2020-12-09 18:12:18 -06:00
Khopa
5e2b259af1 Updated changelog 2020-12-10 00:20:22 +01:00
Khopa
1258f3e17c Carrier and Tarawa are now fully moveable 2020-12-10 00:13:34 +01:00
Khopa
44ed895277 Merge remote-tracking branch 'khopa/develop' into develop 2020-12-09 22:55:24 +01:00
Khopa
c74e18e449 Target positions for ship movement are now properly projected on DCS game X,Y plane 2020-12-09 22:55:11 +01:00
walterroach
2ea3f914f0 You Won message #419 2020-12-09 14:37:17 -06:00
Khopa
d6e4a50064 QOL : On launch, auto load the latest saved game. 2020-12-09 21:01:32 +01:00
walterroach
6296896471 Add special fuel case for C101 #492 2020-12-08 18:26:37 -06:00
walterroach
473cda971a Fix typing mistake 2020-12-08 17:16:09 -06:00
walterroach
cf570adabe Refactor armor
Break `plan_action_for_groups` into smaller methods

Add type hinting and cleanup formatting
2020-12-08 16:55:04 -06:00
walterroach
02196f2883 Change ground unit waypoints to offroad Ground Unit Waypoint
"On-Road" #495
2020-12-08 15:11:47 -06:00
root0fall
8b49752401 refresh budget after purchase from subwindow
fixes https://github.com/Khopa/dcs_liberation/issues/221
2020-12-08 20:47:02 +08:00
Dan Albert
8c64867918 Fix duplicate names of AAA units.
Fixes https://github.com/Khopa/dcs_liberation/issues/517
2020-12-06 22:14:56 -08:00
Dan Albert
e544063c40 Update Skynet and Mist. 2020-12-06 20:20:08 -08:00
Dan Albert
edfaaacd04 Determine player vs enemy early in debriefing.
This way the results of committing the debriefing can't alter the view
of the debriefing. It looks like it was probably that case that
debriefing information displays (but not the committed results) would be
incorrect after a base capture because the results might be shown after
the results were committed.

Maybe fixes https://github.com/Khopa/dcs_liberation/issues/513
2020-12-06 20:20:08 -08:00
Dan Albert
84b8613cf5 Cleanup debriefing signals.
We don't need most of this information.
2020-12-06 20:20:08 -08:00
walterroach
aea82e2266 Add FOB capture 2020-12-06 21:45:21 -06:00
Dan Albert
b0b9c1c8e6 Fix deletion of waypoints.
`FlightPlan.waypoints` returns a list created from the iterator now, so
removing items from that list does not actually alter the flight plan.

Fixes https://github.com/Khopa/dcs_liberation/issues/489
2020-12-06 15:32:28 -08:00
Dan Albert
b5ff32c5b6 Show patrol end time on the kneeboard.
Fixed https://github.com/Khopa/dcs_liberation/issues/421
2020-12-06 15:01:21 -08:00
Dan Albert
e0223ded54 Fix display of AA ranges for most ship types.
Fixes https://github.com/Khopa/dcs_liberation/issues/390
2020-12-06 14:22:33 -08:00
Khopa
2012ad0aa3 Fixed cursor / single click behaviour on map. 2020-12-06 21:12:44 +01:00
Dan Albert
15d72a8dcb Fix turn number off by one.
Fixes https://github.com/Khopa/dcs_liberation/issues/482
2020-12-06 01:08:23 -08:00
Dan Albert
e525b11695 Remove scary label from automation options. 2020-12-06 01:06:12 -08:00
Dan Albert
8f30e60e1b Use unplanned missions to guide aircraft purchase.
AI aircraft purchase decisions are now driven by the missions that the
flight planner was unable to fulfill. This way we're buying the aircraft
we actually need instead of buying them at random, in the locations we
need them, in the order they're needed.

There's a bit more that could be improved here:

* Unused aircraft could be ferried to where they would be more useful.
* Partial squadrons could be completed rather than buying a whole flight
  at a time.
* Aircraft could be ranked by their usefulness so we're not buying so
  many Hueys when a Hornet would do better.
* Purchase a buffer of CAP capable aircraft in case too many are shot
  down and they are not available next turn.

https://github.com/Khopa/dcs_liberation/issues/361
2020-12-06 00:59:04 -08:00
Dan Albert
ce977ac937 Remove the enemy forces multiplier option.
This didn't do what it claimed to (it actually just determines the
threshold for whether a control point shoudl be a *preferred* canidate
for purchasing ground units), and the income multipliers offer the
intended behavior.
2020-12-05 23:55:33 -08:00
Dan Albert
aa9ffa0855 Obey parking limits when auto-buying aircraft.
Fixes https://github.com/Khopa/dcs_liberation/issues/137
2020-12-05 23:36:51 -08:00
Dan Albert
6a8ca810ff Add auto-procure option to the CLI generator. 2020-12-05 23:20:58 -08:00
Dan Albert
f2d2fd7014 Add automation options to the new game wizard.
To have an effect on turn zero these need to be enabled in the wizard.
Since the last page was getting quite full I've split it into two pages:
one for the objective generation options and a second for the difficulty
and player assist options.

I also added an option to set the inital budget for opfor.
2020-12-05 23:16:17 -08:00
Dan Albert
ddd06b3162 Move mid-game option to the map options page. 2020-12-05 22:47:26 -08:00
Dan Albert
d519aa1dad Move the AI to the normal procurement system.
The procurement AI now uses the same system as the players. Orders are
placed and take a turn to fulfill.

This has a few advantages:

* We no longer need special case purchase logic for the turn 0
  population of opfor airbases.
* Players using auto-purchase can cancel orders they don't like.
2020-12-05 22:41:05 -08:00
Dan Albert
7226359e64 Avoid negative AI produrement budgets.
This also fixes the double charging that the AI was suffering from, so
they have a much better chance of actually affording planes now.

Fixes https://github.com/Khopa/dcs_liberation/issues/504
2020-12-05 21:50:30 -08:00
Dan Albert
f396ff7f12 Add procurement automation for players.
The allows the players to use the same auto-purchase mechanics that the
AI uses. The behavior is very bad, but it's no worse than what OPFOR
deals with.

There's a lot that needs to be improved before this is really a good
choice for the player:

* Option to adjust budget balance between front lines and airbases.
* Disallow negative budgets (which incidentally will cause more aircraft
  to be purchased, since the armor purchases currently accidentally
  spend the aircraft budget).
* Buy less randomly: https://github.com/Khopa/dcs_liberation/issues/361.
* Obey parking limits.
* Use the delivery events rather than instant delivery (also allows the
  player to cancel orders they don't want).

Fixes https://github.com/Khopa/dcs_liberation/issues/362
2020-12-05 21:18:23 -08:00
Dan Albert
1adee0af17 Factor AI purchases out of Game.
For now this is mostly behavior preserving. I slightly improved the
ability to buy units when multiple front lines exist by removing full
bases as candidates, but it should be a minor change at best. A larger
improvement will come later.

This is also written such that it will work for the player as well. The
procurer currently runs for the player but with all the options off, so
it does nothing. The next patch allows adds options for the player to
use auto-procurement.
2020-12-05 20:42:02 -08:00
Dan Albert
bac47dad83 Add settings for scaling income.
This adds both player and enemy income multiplier options. Note that
previously the AI was only getting 75% of their income. I've changed
that to give them their full income by default since the player can now
influence it.
2020-12-05 18:06:57 -08:00
Dan Albert
f1a2602cfd Move generator only settings out of Settings. 2020-12-05 16:56:14 -08:00
Dan Albert
b8e64d4369 Revert "Revert "Migrate buildings and TGOs to unit map.""
With fixed tracking for TGO groups and fortification "buildings".

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

This reverts commit 72ac8ca872.
2020-12-05 14:26:16 -08:00
Dan Albert
72ac8ca872 Revert "Migrate buildings and TGOs to unit map."
Not registering kills correctly. It was in my limited testing, so need
to dig deeper.

https://github.com/Khopa/dcs_liberation/issues/494

This reverts commit 90697194a1.
2020-12-04 23:57:58 -08:00
Dan Albert
ccb41829c9 Mark an optional property as optional. 2020-12-04 01:10:23 -08:00
Dan Albert
90697194a1 Migrate buildings and TGOs to unit map.
Fixes https://github.com/Khopa/dcs_liberation/issues/485.
2020-12-04 01:10:18 -08:00
Dan Albert
13f4baa34e Fix duplicate name of Patriot unit.
Caught by the `UnitMap`. This does break saves that have live Patriot
STRs.
2020-12-04 01:03:57 -08:00
Khopa
76840ff5c2 Added display settings to the toolbar. 2020-12-03 22:48:28 +01:00
Khopa
72ac806cb8 Possible to plan ships movements on the map (UI only) 2020-12-03 01:01:15 +01:00
Khopa
bf275fe564 Added FOB on Iran Invasion lite campaign. 2020-12-02 00:37:14 +01:00
Khopa
68818ae50d Syria 2011 country changed to combined joint task force red, as some units are not available to Syria in DCS. 2020-12-01 23:45:28 +01:00
Khopa
7315d097c2 Regorganized difficulty page of settings window 2020-12-01 23:42:34 +01:00
Khopa
cdf28700cf Possible to spawn manpads on frontline even if infantry squads are disabled. 2020-12-01 23:14:07 +01:00
Khopa
948c1d0bb0 Fixed unused aircraft not using skins setup in factions files. 2020-12-01 22:50:11 +01:00
Khopa
de0a3f929c Made WW2 Flak sites more compact, so it's easier to fit them in fields on the Normandy map. 2020-12-01 13:49:09 +01:00
Khopa
c3023a9f99 Normandy terrain data update 2020-12-01 13:39:54 +01:00
Dan Albert
4f37610dfb Convert front line units to UnitMap.
https://github.com/Khopa/dcs_liberation/issues/485
2020-12-01 01:25:51 -08:00
walterroach
aef4316f72 Merge pull request #487 from walterroach/fob
FOB Control Points
2020-11-30 23:29:15 -06:00
walterroach
378dbf254a Remove commented code 2020-11-30 23:28:39 -06:00
Khopa
f0b6a37ce2 Migrated normandy small to new miz format. 2020-12-01 00:36:49 +01:00
Khopa
ff12a120e6 Migrated invasion of iran campaign to miz format. 2020-11-30 23:12:01 +01:00
walterroach
d04be4d71b Merge branch 'develop' into fob 2020-11-30 12:18:38 -06:00
Dan Albert
581aaaad28 Merge develop 2020-11-30 12:18:31 -06:00
walterroach
453eb9feb4 revert unrelated changes 2020-11-30 12:10:03 -06:00
walterroach
4059ee44b8 pg campaign 2020-11-29 22:47:18 -06:00
walterroach
7a222ecfa0 gulf landmap update 2020-11-29 22:47:03 -06:00
Dan Albert
be15e9adf2 Adjust IADS for Inherent Resolve.
Had too many long range SAMs and not enough medium range SAMs. Balanced
that out a bit and added many of the fixed SAM positions on the map as
possible target locations.
2020-11-29 17:52:57 -08:00
Dan Albert
2fd097c613 Remove SA-15 from Syria 2011.
It looks like the SA-15s were something delivered a few years later than
this. The SA-10s are also more recent, but they have been using SA-5s
for quite some time and until those are available in DCS the SA-10 makes
a reasonable approximation.
2020-11-29 16:33:30 -08:00
Ignacio Muñoz Fernandez
66ee5f5392 Bingo & Joker Fuel for Flight Plans (#480)
Add bingo and joker fuel information to the kneeboard.
2020-11-29 14:53:15 -08:00
walterroach
3bb08f8d30 FOB names
Remove icon
2020-11-29 16:26:08 -06:00
walterroach
d7787adddc Generators for FOBs and their defenses 2020-11-29 14:21:02 -06:00
walterroach
1f37b879b1 Add FOB ControlPoint type 2020-11-29 12:16:39 -06:00
Khopa
45ce28f9bf Another big Persian gulf terrain update (Iran) 2020-11-29 15:19:28 +01:00
Khopa
4e87bed4e5 Migrated invasion of iran lite campaign to new miz format. 2020-11-29 15:00:56 +01:00
Khopa
a7421fc670 Updated Persian Gulf terrain data to include more exclusions zones. 2020-11-29 15:00:03 +01:00
Khopa
208a7550ef Added C101CC to list of antiship capable aircrafts. 2020-11-29 13:16:35 +01:00
Khopa
37e23f70d6 Put manpads in modern faction's infantry squads. And added a setting to disable it. 2020-11-29 13:11:49 +01:00
Dan Albert
7daefa8ae5 Fix off by one in briefing waypoint numbers.
Fixes https://github.com/Khopa/dcs_liberation/issues/441
2020-11-28 20:28:35 -08:00
walterroach
292ac42003 Fix campaigns without frontline.
* Missions will now generate without a frontline conflict
* Bulls is now defined as the nearest opposing airfield for each side
2020-11-28 19:53:01 -06:00
walterroach
c501c45c52 Update channel landmap
Ensures a valid frontline location can be found on the Dunkirk campaign
between Saint Omer and Dunkirk
2020-11-28 19:42:10 -06:00
walterroach
29b894f8b0 Fix odd frontline unit spawns
* Modfied frontline vector to ensure start point stays outside of
  exclusion zone.  (Previously it could be up to 100m inside)

* Change randomization in offset distance from frontline to be based
  on a percentage of the unit type's fixed offset instead of the
  width of frontline.
  (Prevents units from being far from their expected distance from
  frontline)

* Change visualgen to use the same frontline vector calculation as the
  unit spawns
2020-11-28 18:43:32 -06:00
Dan Albert
55573bf40a Clear loaded scripts before generation.
Every mission generated after the first each time Liberation was
skipping all of the plugins (including the base plugin) because they'd
already been loaded on a previous generation and the list wasn't
cleared.
2020-11-28 15:39:33 -08:00
Khopa
f2c2ef82c5 Fixed unused aircraft using the same slots as used aircrafts. 2020-11-28 22:29:09 +01:00
Khopa
d6b33d353c Now possible to get CVN-75 Harry S Truman supercarrier generated for US faction 2020-11-28 21:57:58 +01:00
Khopa
2ed1c36c54 Fixed infantry for red player being the same units as blue faction. Fixed skill for enemy vehicles being the same as player's one. 2020-11-28 21:34:21 +01:00
Khopa
7cbcbc1171 Migrated desert war to new miz format 2020-11-28 19:19:33 +01:00
Khopa
b74dcfa053 Battle of britain campaign migrated to new miz format. 2020-11-28 18:03:55 +01:00
Khopa
62bf7eb227 Dunkirk campaign migrated to the new miz format. 2020-11-28 17:41:20 +01:00
Dan Albert
07bfe8e29a Move a SAM that's occluding Palmyra. 2020-11-27 20:11:21 -08:00
Dan Albert
0b258997dd Update faction air defenses. 2020-11-27 19:56:49 -08:00
Dan Albert
69421ad7a1 Fix faction info for air defense changes. 2020-11-27 18:12:41 -08:00
Dan Albert
fdf571c016 Clean up faction air defenses vs shorads vs SAMs. 2020-11-27 18:10:13 -08:00
Dan Albert
bd60760f9d Merge faction sams and shorads into air_defenses.
Fixes https://github.com/Khopa/dcs_liberation/issues/473. Air defenses
for bases, strike locations, and fixed IADS will now all downgrade to
lower tier systems as needed. Strike locations will still be spawned as
an equally weighted random generator from either the medium or long
range groups, but will use a short range system if none are available to
the faction.

I've made the change in a way that leaves factions compatible, but will
follow up to clean up our built-in factions.
2020-11-27 17:45:40 -08:00
Dan Albert
e8aa9839b0 Fall back to lower range SAMs when needed.
Mostly fixes https://github.com/Khopa/dcs_liberation/issues/473. The
last part of the fix is to migrate the `shorads` property of the faction
to just be in `sams` and just use the property to decide its use.
Currently factions like USA 2005 that have long range SAMs and SHORADs
only will still not spawn anything at medium sites because they have no
other SAMs declared.
2020-11-27 17:45:40 -08:00
Dan Albert
fcdb22db5b Add range property to all air defense generators. 2020-11-27 17:45:40 -08:00
walterroach
e73cf68def Merge pull request #474 from walterroach/frontline_vector
Frontline vector
2020-11-27 18:49:50 -06:00
Dan Albert
fa5b842cc7 Strengthen SA-10, add point defense.
Fixes https://github.com/Khopa/dcs_liberation/issues/417, though the
notes on that bug about this being non-optimal for skynet are still
true. This doesn't make skynet behavior any worse though, and does
improve it some compared to not having PD.

Adds two new SA-10 generator variants:

* Tier 2, with SA-15 for point defense
* Tier 3, with SA-15 for point defense and the Shilka upgraded to a
  Tunguska.

Updated factions that are capable of those systems, added missing SAMs
to those factions, and removed use of SA-19 as an independent SAM from
those factions. Will do a larger audit of faction SAMs later.
2020-11-27 16:25:10 -08:00
walterroach
43a21cb341 Fix bug #353 2020-11-27 17:53:56 -06:00
walterroach
45361b57a7 fixed bad import 2020-11-27 16:42:11 -06:00
walterroach
046c7a662a DisplayOption string change 2020-11-27 16:33:31 -06:00
walterroach
a9f1de13b1 Fix armor groups spawning bugs
* Prevent common cases where ground units do not spawn due to
  frontline position being in exclusion zone

* Fix case where ground units will spawn inside exclusion zone due to
  random offset from frontline center being fixed

* Remove dead code from `conflictgen.py`

* Start cleanup of `GroundConflictGenerator`
2020-11-27 16:31:52 -06:00
walterroach
edbe2d86f2 Merge branch 'develop' into frontline_vector 2020-11-27 13:47:10 -06:00
walterroach
4e12a1cdad Rework frontline vector
Ensures frontline stays outside of exclusion zones by adjusting its
position and width

Adds a DisplayOption for viewing the frontline vector on the map
2020-11-27 13:46:53 -06:00
Dan Albert
d24c7ea93e Remove the Hawk from USA 2005.
According to Wikipedia the last user of these (USMC) stopped using them
in 2002.
2020-11-26 22:55:44 -08:00
Dan Albert
484f1e8d51 Generate required IADS even at unconnected bases.
If the campaign designer doesn't want SAMs at unconnected bases they can
just not put them there. If they *do* put them there, generate them.
2020-11-26 22:54:50 -08:00
Dan Albert
8d5abb877c Improve IADS on Inherent Resolve. 2020-11-26 22:54:30 -08:00
Dan Albert
fd454dce74 Load campaign data lazily.
Error checking comes later, but the new game wizard opens much faster by
not spending time creating theaters it doesn't need.

Fixes https://github.com/Khopa/dcs_liberation/issues/469
2020-11-26 22:14:23 -08:00
Dan Albert
5d4fccd438 Fix mypy regressions. 2020-11-26 20:08:24 -08:00
Dan Albert
9f078e1483 Don't generate empty groups. 2020-11-26 20:03:16 -08:00
Dan Albert
0e807d84c2 Differentiate required long and medium range SAMs.
To improve IADS design in campaigns, this differentiates required long
and medium range SAMs. SAMs that must be long range SAMs are defined by
SA-10 or Patriot launchers, while medium range SAMs are defined by SA-2,
SA-3, or Hawk launchers.

Long range SAMs positions will only be populated by long range SAMs
(Patriots and SA-10s), and not all factions have those available. Medium
range SAMs currently comprise all air defenses that are not long range
SAMs, so if the faction includes flak guns in their `sams` property then
flak guns may be spawned at medium range SAM locations.

Base defenses and random SAM locations continue to use either type of
SAM.
2020-11-26 19:48:14 -08:00
Ignacio Muñoz Fernandez
3ad57d995b feat: added timestamp to information widget log items 2020-11-26 15:48:16 -08:00
Ignacio Muñoz Fernandez
28cf42aeb8 fix: Unable to find MLRS_BM21_Grad in pydcs 2020-11-26 15:43:54 -08:00
Ignacio Muñoz Fernandez
7fcf74a8ed added none check on budget setGame 2020-11-26 15:43:36 -08:00
Ignacio Muñoz Fernandez
a0d38f7465 fix: disable topbar buttons when game is None 2020-11-26 15:43:36 -08:00
Dan Albert
cd97526d2b Mark the fishbed as capable of strike missions. 2020-11-26 13:46:33 -08:00
Khopa
87fdc16f9b Update to support the newest version of the Rafale mod. 2020-11-26 21:38:46 +01:00
Khopa
b69eb02766 Added base defenses for russia small campaign 2020-11-26 13:38:59 +01:00
Dan Albert
7636234649 Fix mission generation when labels are changed.
Fixes https://github.com/Khopa/dcs_liberation/issues/457
2020-11-25 22:17:15 -08:00
Dan Albert
2bd673a531 Don't allow operating on broken runways.
Doesn't allow helos or harriers to do it either even though they should
be able to because we don't currently support ground spawns, which would
be needed to prevent those aircraft from using the runway. Even then, I
don't know if they can be forced to *land* vertically.

Fixes https://github.com/Khopa/dcs_liberation/issues/432
2020-11-25 18:50:00 -08:00
Ignacio Muñoz Fernandez
a1b64bc72d Cleanup QWeatherInfoWindow and rjust wind bearings. (#456) 2020-11-25 18:10:46 -08:00
Dan Albert
80bc9d6b23 Support reparing damaged runways.
Repairing a damaged runway costs $100M and takes 4 turns (one day). The
AI will always repair runways if they can afford it. if a runway is
damaged again during the repair the process must begin again.

Runways are still operational despite what the UI says. Preventing the
player and AI from using damaged runways (except for with helicopters
and harriers) is next.
2020-11-25 18:07:51 -08:00
Dan Albert
ee768b9147 Display damaged runways. 2020-11-25 18:07:51 -08:00
Khopa
7dfb0c67e5 Migrated campaign "Russia Small" to the new campaign format. 2020-11-26 00:10:11 +01:00
Dan Albert
75ea5cc462 Fix None dereferences in weather UI.
Also normalizes line endings.
2020-11-25 14:39:33 -08:00
Khopa
afabf6fd00 Fixed Control Point being set as neutral in some case. 2020-11-25 23:35:01 +01:00
Khopa
0eb4519797 Fixed IndexError preventing mission generation when a faction does not have any awacs aircraft available. 2020-11-25 23:11:55 +01:00
Dan Albert
611f04ab5a Resurrect force multiplier option.
Fixes https://github.com/Khopa/dcs_liberation/issues/440
2020-11-25 14:10:34 -08:00
Dan Albert
a9ba2deafa Update pydcs to get access to satnav options.
Fixes https://github.com/Khopa/dcs_liberation/issues/426
2020-11-25 13:16:51 -08:00
Dan Albert
0c4e920af3 Handle runway damage in the debrief.
Apparently we were already getting this info because it's a unit like
any other according to the event system, so if runways were actually
sufficiently damaged we'd emit a ton of exceptions.

This doesn't do anything yet, but tracks the damage state. Will add the
ability to repair them next, and then finally make the damage render the
runway inoperable.
2020-11-25 13:12:46 -08:00
Ignacio Muñoz Fernandez
ef0e565337 chore: standarized parameters in game/utils.py and added docblocks 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
02e7ab41b4 feat: MVP done for Weather Information Display 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
59bd4541c4 Removed old daytime icons 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
ca30af4238 wip: finished work on the TopPanel Widget, added weather icons, changed timeofday icons 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
718b3f2623 wip: fixed qt cosmetic issue, added forecast text generation, initial for weather window 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
6e153c6451 wip: initial work on issue #406 2020-11-25 13:04:03 -08:00
Khopa
4a1809d56e Added name of F-22 mod author in USA 2005 faction. 2020-11-25 12:13:19 +01:00
Khopa
a2bf0c1bea Added the wrong F-22A.lua file last night 😵 2020-11-25 12:12:07 +01:00
Dan Albert
f0d9dae33b Remove M-2000 from runway strike preferred list. 2020-11-24 17:32:09 -08:00
Dan Albert
b99462b628 Rename OCA strike tasks. 2020-11-24 17:28:48 -08:00
Dan Albert
65ac30acda Merge ground strike and SAM location presets.
Locations that should always be SAMs should be done with fixed IADs
locations, so we don't need the separate type.

The generic "ground strike location" needs to be eventually split up
into more specific types, so eventually all of the non-base defense SAMs
will go away.
2020-11-24 17:15:24 -08:00
walterroach
2072b6fa63 Merge pull request #447 from walterroach/caucasus_miz
Caucasus full single miz campaign
2020-11-24 18:37:04 -06:00
walterroach
4f604ba687 replace mizdata 2020-11-24 18:30:56 -06:00
Khopa
b9fe559b42 Forgot to commit F-22A mod payload 2020-11-25 01:17:27 +01:00
Dan Albert
efcdbebda5 Handle additional preset location types.
Missile sites were accidentally excluded, and coastal defenses aren't
being generated yet.
2020-11-24 15:50:51 -08:00
Khopa
8886850c60 Added fictional factions from Discord user Starfire 2020-11-25 00:49:53 +01:00
Khopa
20276e5230 Removed an unused property in controlpoint.py 2020-11-25 00:46:23 +01:00
Khopa
ed96bc83b4 Added support for the F-22A mod. 2020-11-25 00:45:40 +01:00
walterroach
c0147f5eb7 Caucasus full single miz campaign 2020-11-24 17:06:59 -06:00
Khopa
5bf5f024cb More adjustments to ai_flight_planner_db 2020-11-24 23:34:22 +01:00
Khopa
4628e8320a Integrated and reviewed changes to flight planner db from @foxwxl 2020-11-24 23:03:23 +01:00
Khopa
9c1d36d18a Removed radials from control point data. (Not used anymore) 2020-11-24 22:48:40 +01:00
Khopa
789b618e37 Changelog update 2020-11-24 13:10:28 +01:00
Khopa
d0804a6f9e Added missile icons for missiles sites 2020-11-24 13:08:59 +01:00
walterroach
17fe977b06 Merge pull request #437 from walterroach/operation_refactor
Operation refactor
2020-11-23 22:36:46 -06:00
walterroach
60783ca390 remove mypy ignore 2020-11-23 22:28:53 -06:00
walterroach
34a7a37409 Operation refactor cleanup
Fix bug in closest cp algorithm
2020-11-23 22:27:12 -06:00
Dan Albert
e68d2b5deb Plan OCA strikes at heavily populated airfields.
https://github.com/Khopa/dcs_liberation/issues/349
2020-11-23 18:09:05 -08:00
Dan Albert
b0317055e7 Implement OCA strike missions.
https://github.com/Khopa/dcs_liberation/issues/349
2020-11-23 17:58:53 -08:00
Dan Albert
6e0af7c144 Fix names of tasks to not use the enum name. 2020-11-23 17:15:42 -08:00
Dan Albert
9394ed663a Add runway bombing missions.
This allows planning the missions and the missions are functional, but
they will have no effect on future turns yet.
2020-11-23 16:47:58 -08:00
walterroach
967574820f Remove unused conflictgen globals
Remove unused  `Conflict` properties

mypy fixes

Cleanup
2020-11-23 18:14:25 -06:00
walterroach
da17d1e5d1 Change Operation to a static class
Removed always True "event successful"

Add `AirWarEvent` as the primary game `Event` applied to every miz

Cleanup of `FrontLineAttackEvent`

Change `Operation.is_awacs_enabled` to two bools for each side red/blue
Currently controlled by whether an AWACs is available for the faction
(and only ever true for Blue)
2020-11-23 18:14:25 -06:00
Dan Albert
63bdbebcaa Refactor control points into individual classes. 2020-11-23 14:34:58 -08:00
Dan Albert
c67263662d Fix arrival box changing when changing aircraft. 2020-11-23 00:23:57 -08:00
Dan Albert
2484457183 Spawn unused aircraft at airports.
The aircraft that have not been fragged will now be spawned in parking
to provide more targets for OCA strikes. We do this only at airports,
not carriers. The AI has enough trouble taxiing around uncrowded carrier
decks that we probably shouldn't make it harder for them, plus most of
the aircraft will be stored below the flight deck (we allow 90 aircraft
to be stored at the carrier, which certainly will not fit on the flight
deck).

The aircraft are spawned in an uncontrolled state and nothing will
activate them, so aside from the cost of rendering them they shouldn't
affect performance.

Fixes https://github.com/Khopa/dcs_liberation/issues/148
2020-11-23 00:12:42 -08:00
Dan Albert
d7b328b887 Consider trasnfers when counting parking. 2020-11-22 18:44:16 -08:00
Dan Albert
493e53c28f Perform aircraft transfers at the end of the turn. 2020-11-22 18:44:16 -08:00
walterroach
7438c30885 Merge pull request #430 from walterroach/develop_test
Update pydcs submodule
2020-11-22 18:59:35 -06:00
walterroach
fac43ba20b update submodule 2020-11-22 18:46:18 -06:00
walterroach
c2eb243026 Fix bug #400
arg position
2020-11-22 17:43:19 -06:00
Khopa
2adaee8671 Added Soviet Union 1943 2020-11-23 00:15:44 +01:00
walterroach
57edc5678c Merge branch 'develop' of https://github.com/Khopa/dcs_liberation into develop 2020-11-22 16:41:59 -06:00
walterroach
730130b19e Set AGL altitude on target waypoints 2020-11-22 16:41:53 -06:00
Dan Albert
17b0cee507 Add unrestricted SATNAV support to factions.
Enabled for bluefor modern, since they ought to have GPS but seemingly
don't.

This change does nothing until https://github.com/pydcs/dcs/pull/102
lands and we update to it.
2020-11-22 13:28:05 -08:00
Dan Albert
2557383946 Fix type of default map visibility setting.
The UI sets these to the proper enum types; only the default is wrong.
Fix the default and clean up the associated code.

Note that this does minorly break save compatibility and alters default
behavior, since previously we were ignoring the default option. Ignoring
the default looks unintentional since there is no explicit "don't force
this option" setting in the UI.

Existing saves can be fixed simply by changing this option to something
else and then back.
2020-11-22 13:28:05 -08:00
walterroach
29d3b5dfc6 Add missing P-47 icons 2020-11-22 02:12:41 -06:00
Dan Albert
f6fad30852 Add unit name -> Liberation object map.
Generated units are added to this during mission generation so we can
map destroyed units back to the data that generated them. Currently only
implemented for aircraft as a proof of concept.
2020-11-21 21:01:46 -08:00
walterroach
d5a081a15f Merge pull request #422 from walterroach/groundwar
Operation refactor and conflictgen cleanup
2020-11-21 21:00:51 -06:00
walterroach
6147e9ac96 mypy cleanup 2020-11-21 19:31:30 -06:00
walterroach
b32ca4f92f merge 2020-11-21 18:57:15 -06:00
walterroach
b57dd51f86 Merge branch 'develop' into frontline 2020-11-21 18:55:56 -06:00
walterroach
fc6ca162af Merge branch 'develop_2_2_x' into develop 2020-11-21 18:24:36 -06:00
walterroach
58ba9e9d1d bad arg 2020-11-21 18:17:35 -06:00
walterroach
939b6c468d refactoring 2020-11-21 17:19:54 -06:00
Dan Albert
bf7df6721a Fix turn 0.
`Game.initialize_turn` doesn't run on turn zero, so we have to set up
the unit order events when we create the `Game`.
2020-11-21 15:00:49 -08:00
walterroach
f6e0dbbb6a operation refactoring 2020-11-21 17:00:22 -06:00
Dan Albert
851c2d88a9 Factor out Lua generation. 2020-11-21 14:55:00 -08:00
Dan Albert
200c13dc31 Remove dead code. 2020-11-21 13:27:19 -08:00
walterroach
8889e35f9e Merge branch 'develop' into frontline 2020-11-21 12:50:44 -06:00
Khopa
398fa1e73d Fixed warehouse building not generating any rewards 2020-11-21 18:31:12 +01:00
walterroach
316f73138c Merge branch 'develop' into frontline 2020-11-21 11:19:31 -06:00
walterroach
708b615ad7 Merge conflict 2020-11-21 11:18:30 -06:00
walterroach
866ff78518 Merge branch 'develop_2_2_x' into frontline 2020-11-21 11:15:36 -06:00
Khopa
f0480b033f Removed debug print 2020-11-21 17:30:31 +01:00
Khopa
4d19548736 Changelog update / consistency with 2.X branch. 2020-11-21 17:05:33 +01:00
Khopa
fcf45554ef Fixed culling display and added setting to include/exclude carriers from culling area. 2020-11-21 17:01:50 +01:00
Khopa
799b0fae94 Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2020-11-21 14:46:01 +01:00
Dan Albert
0d95716545 Correct type annotations. 2020-11-20 21:40:31 -08:00
walterroach
8c5b808eba inherent resolve frontlines 2020-11-20 20:28:59 -08:00
walterroach
007dcf548e remove dead code 2020-11-20 21:02:11 -06:00
walterroach
9a640bf7eb inherent resolve frontlines 2020-11-20 20:38:32 -06:00
walterroach
edd02d9dd6 Merge branch 'develop' into frontline 2020-11-20 20:32:50 -06:00
Dan Albert
75edbb62f1 Clean up available parking code a bit.
Moved more into the `ControlPoint`.
2020-11-20 18:31:19 -08:00
walterroach
2b6227f3b1 remove dead code 2020-11-20 20:29:30 -06:00
Dan Albert
c4b8a41742 Move calculation of aircraft amounts into game.
The planner needs to know how much space is still expected to be
available next turn.
2020-11-20 18:25:03 -08:00
Dan Albert
f8b2dbe283 Move unit delivery ownership out of the UI.
Breaks save compat, but we need to have this knowledge outside the UI so
we can know whether or not we can ferry aircraft to the airfield without
overflowing parking.
2020-11-20 18:04:27 -08:00
Dan Albert
20091292f4 Remove dead code. 2020-11-20 17:37:20 -08:00
Dan Albert
a594f45aae Pick divert airfields when planning.
https://github.com/Khopa/dcs_liberation/issues/342
2020-11-20 17:29:58 -08:00
Ignacio Muñoz Fernandez
d394d01ea8 fix: conditional value at passTurn on QTopPanel 2020-11-20 17:12:13 -08:00
Ignacio Muñoz Fernandez
70d982b0ed fix: Pass Turn and Take Off Buttons when no game is loaded 2020-11-20 17:12:13 -08:00
Dan Albert
ae68a35a1a Remove save compat since it's breaking anyway.
Removal of old paths/names for things that no longer exist.
2020-11-20 17:06:01 -08:00
Dan Albert
a9fcfe60f4 Add arrival/divert airfield selection.
Breaks save compat because it adds new fields to `Flight` that have no
constant default. Removing all of our other save compat at the same
time.

Note that player flights with a divert point will have a nav point for
their actual landing point. This is because we place the divert point
last, and DCS won't let us have a land point anywhere but the final
waypoint. It would allow a LandingReFuAr point, but they're only
generated for player flights anyway so it doesn't really matter.

Fixes https://github.com/Khopa/dcs_liberation/issues/342
2020-11-20 16:16:00 -08:00
Ignacio Muñoz Fernandez
c3b028ef4b fix: fixes #325 for version 2.2.x 2020-11-20 03:50:58 -08:00
C. Perreau
833399f068 Merge pull request #409 from kavinsky/fix/issue-325
fix: fixes #325 Budget calculation for both factions
2020-11-20 12:44:16 +01:00
Ignacio Muñoz Fernandez
5695cf4ac5 fix: fixes #325 Budget calculation and enemy reinforcement calculation now takes into account the destroyed buildings 2020-11-20 12:38:06 +01:00
Ignacio Muñoz Fernandez
1553e5efd5 chore: syntax cleaning and redundant variable cleanup 2020-11-20 02:57:23 -08:00
Ignacio Muñoz Fernandez
0f1b396dd2 chore: variable name changes 2020-11-20 02:57:23 -08:00
Ignacio Muñoz Fernandez
976ee51bf5 feat: Added Financial Income to GroundObjectMenu building window 2020-11-20 02:57:23 -08:00
Dan Albert
7c22f6e83b Change mach function to take altitude in meters.
All of the callers are passing altitude in meters because that's what
pydcs uses. This still returns knots which makes it extra weird, but
that's what almost all of the callers expect.

It's probably a good idea to introduce some explicit types for the
various distance and speed units to avoid these sorts of mistakes.
2020-11-20 02:19:38 -08:00
Dan Albert
18b6f7b84c Add off-map spawn locations.
The AI isn't making use of these yet, but it's not smart enough to do so
anyway.

Would benefit from an icon to differentiate it on the map.

I'm stretching the definition of "control point" quite a bit. We might
want to put a class above `ControlPoint` for `AirSpawnLocation` to
represent types of spawn locations that can't be captured and don't have
ground objectives.

Fixes https://github.com/Khopa/dcs_liberation/issues/274
2020-11-20 02:19:03 -08:00
Dan Albert
206d09f7f8 Maybe correct fishbed radios.
Maybe fixes https://github.com/Khopa/dcs_liberation/issues/377
2020-11-20 00:20:01 -08:00
Dan Albert
4e910c4b09 Maybe correct fishbed radios.
Maybe fixes https://github.com/Khopa/dcs_liberation/issues/377
2020-11-20 00:18:00 -08:00
Dan Albert
bc3cd50a6c Add support for required SAMs in campaigns.
"Required" SAMs (designative by redfor long range SAM launchers in the
ME) will always be spawned during campaign generation. This makes it
possible to build a semi-guaranteed IADS (the exact type of SAM is
dependent) on the choice of faction.

Requierd SAMs will consume the slots of random SAMs during generation.
Later we should differentiate between strategic SAMs like SA-10s and
tactical SAMs like SA-11s so we can fill in the medium range SAMs at
random locations among the fixed long range SAMs.
2020-11-19 23:47:07 -08:00
Dan Albert
cecf611f91 Add docs for PresetLocations. 2020-11-19 21:59:36 -08:00
Dan Albert
5e4802f05e Return base defense locations to pool on capture.
When a base is captured we clear its defenses. Those locations need to
be returned to the preset location pool so they can be used for the new
base defenses.
2020-11-19 21:50:29 -08:00
Dan Albert
1e70e654ed Don't attempt loading miz files as JSON. 2020-11-19 21:32:44 -08:00
Dan Albert
20054b9825 Update Inherent Resolve campaign presets.
None of these are placed precisely yet, but they're useful for testing.
2020-11-19 21:29:21 -08:00
Dan Albert
5fb6a53cbd Add preset configuration for offshore types. 2020-11-19 21:28:57 -08:00
Dan Albert
ff751c30f9 Add preset configuration for strike targets. 2020-11-19 21:20:40 -08:00
Dan Albert
c1614ad5a7 Add TODOs for carrier CP names. 2020-11-19 21:19:53 -08:00
Dan Albert
13e372159a Change default settings to match UI defaults.
Doesn't affect the thing players see, but corrects the defaults when
using the command line mission generator.
2020-11-19 21:19:12 -08:00
Dan Albert
1ee0aafd9a Unify TGO location selection.
We currently have three methods of choosing locations for TGOs:

1. From the campaign miz
2. From the per-CP mizdata files
3. Randomly

Move the selection among these sources into a single place and use it
everywhere that we search for a TGO location.

Longer term methods 2 and 3 will be removed.
2020-11-19 21:09:33 -08:00
Dan Albert
df80ec635f Add a new miz file based campaign generator.
Defining a campaign using a miz file instead of as JSON has a number of
advantages:

* Much easier for players to mod their campaigns.
* Easier to see the big picture of how objective locations will be laid
  out, since every control point can be seen at once.
* No need to associate objective locations to control points explicitly;
  the campaign generator can claim objectives for control points based
  on distance.
* Easier to create an IADS that performs well.
* Non-random campaigns are easier to make.

The downside is duplication across campaigns, and a less structured data
format for complex objects. The former is annoying if we have to fix a
bug that appears in a dozen campaigns. It's less an annoyance for
needing to start from scratch since the easiest way to create a campaign
will be to copy the "full" campaign for the given theater and prune it.

So far I've implemented control points, base defenses, and front lines.
Still need to add support for non-base defense TGOs.

This currently doesn't do anything for the `radials` property of the
`ControlPoint` because I'm not sure what those are.
2020-11-19 16:55:21 -08:00
C. Perreau
6524286f04 Merge pull request #403 from Khopa/develop_2_2_x
Release 2.2.1
2020-11-20 00:29:15 +01:00
Khopa
87248fec53 Changelog update 2020-11-19 22:00:56 +01:00
Khopa
6470d25d18 About dialog update 2020-11-19 21:59:01 +01:00
Khopa
b7634a8ac3 About dialog update 2020-11-19 21:54:33 +01:00
walterroach
434755a620 Update README.md 2020-11-19 14:23:43 -06:00
walterroach
3eb2529b0b Fix #402 2020-11-19 13:20:05 -06:00
Khopa
e6e4cca076 Made it possible to setup custom liveries in faction files. 2020-11-19 20:18:26 +01:00
Khopa
8d57bbc777 Changelog update 2.2.1 2020-11-19 20:17:11 +01:00
Khopa
483db564f9 Added F-14A support 2020-11-19 20:14:21 +01:00
Khopa
63d5862319 Pydcs module update 2020-11-19 20:13:15 +01:00
Dan Albert
365b379798 Update changelog for 2.2.1. 2020-11-19 00:45:03 -08:00
Dan Albert
20f97e48a9 Update changelog for 2.2.1. 2020-11-19 00:42:54 -08:00
Dan Albert
fd473f0a46 Fix custom waypoints.
Like with deleting waypoints, these will degrade the flight plan to the
2.1 behavior.

Ascend/descend points aren't in use any more, so I removed those.
2020-11-19 00:36:43 -08:00
Dan Albert
94c5ed8bdc Fix custom waypoints.
Like with deleting waypoints, these will degrade the flight plan to the
2.1 behavior.

Ascend/descend points aren't in use any more, so I removed those.
2020-11-19 00:29:05 -08:00
Dan Albert
4b7b4bf110 Allow deleting waypoints.
In almost every case this leaves us with a flight plan we can't reason
about, so it gets degraded to `CustomFlightPlan`. The exception is when
deleting a target point when there are other target points remaining.
This probably gets people using this feature back to what they want
though, which is essentially the 2.1 behavior.

Fixes https://github.com/Khopa/dcs_liberation/issues/393
2020-11-18 23:44:16 -08:00
Dan Albert
a816877d08 Allow deleting waypoints.
In almost every case this leaves us with a flight plan we can't reason
about, so it gets degraded to `CustomFlightPlan`. The exception is when
deleting a target point when there are other target points remaining.
This probably gets people using this feature back to what they want
though, which is essentially the 2.1 behavior.

Fixes https://github.com/Khopa/dcs_liberation/issues/393
2020-11-18 23:43:01 -08:00
Dan Albert
2d56ae1cb6 Avoid cases where empty flights could be created.
Fixes https://github.com/Khopa/dcs_liberation/issues/373
2020-11-18 22:04:24 -08:00
Dan Albert
a223da8f99 Avoid cases where empty flights could be created.
Fixes https://github.com/Khopa/dcs_liberation/issues/373
2020-11-18 22:03:33 -08:00
Dan Albert
216adcc35a Add infor about delayed flights to the start page.
Fixes https://github.com/Khopa/dcs_liberation/issues/398
2020-11-18 21:27:19 -08:00
Dan Albert
8d485d5fa2 Delay player CV flight when their settings say so.
Fixes https://github.com/Khopa/dcs_liberation/issues/375

This also fixes a problem where we're spawning non-cold start planes in
an uncontrolled state. The ME won't let us do this, so we probably
shouldn't be doing that.
2020-11-18 21:27:18 -08:00
Dan Albert
fa549fcf94 Don't delay player flights with short delays.
Not much point in delaying humans 8 seconds.

Fixes https://github.com/Khopa/dcs_liberation/issues/397
2020-11-18 21:27:18 -08:00
Dan Albert
98fd707aea Add infor about delayed flights to the start page.
Fixes https://github.com/Khopa/dcs_liberation/issues/398
2020-11-18 21:26:14 -08:00
Dan Albert
5928f29f11 Delay player CV flight when their settings say so.
Fixes https://github.com/Khopa/dcs_liberation/issues/375

This also fixes a problem where we're spawning non-cold start planes in
an uncontrolled state. The ME won't let us do this, so we probably
shouldn't be doing that.
2020-11-18 19:34:38 -08:00
Dan Albert
c3ebabbe44 Don't delay player flights with short delays.
Not much point in delaying humans 8 seconds.

Fixes https://github.com/Khopa/dcs_liberation/issues/397
2020-11-18 19:27:03 -08:00
Khopa
29fd094dd0 Added F-14A support 2020-11-19 00:34:24 +01:00
walterroach
f7966b8d8c fix bug #394 2020-11-18 16:37:30 -06:00
Khopa
ee2f4ecbc8 Pydcs submodule update 2020-11-18 21:51:47 +01:00
Khopa
b08f6cad1d French translations for jinja templates, might be useful later. 2020-11-18 21:50:58 +01:00
Dan Albert
e851223733 Fix mypy. 2020-11-18 01:58:35 -08:00
Dan Albert
1f12546ff4 Add command line option to generate a new game.
Saves us a ton of clicks while developing the campaign generator.
2020-11-17 18:56:35 -08:00
Dan Albert
8345063e84 Move theater into game. 2020-11-17 18:11:33 -08:00
walterroach
482bedd739 Merge pull request #381 from foxwxl/patch-1
Create briefingtemplate_CN.j2
2020-11-17 15:47:27 -06:00
Dan Albert
7d7a334418 Fix mypy. 2020-11-17 02:04:38 -08:00
Dan Albert
69dbe62b70 Plan anti-ship missions automatically. 2020-11-17 01:08:06 -08:00
foxwxl
f61167cedf Create briefingtemplate_CN.j2
Briefing template CN version
2020-11-17 16:52:52 +08:00
Dan Albert
2ac92a75a4 Plan BAI missions automatically. 2020-11-17 00:36:41 -08:00
Dan Albert
fe80a9fd08 Make garrisons not SAMs.
The AI planner was planning DEAD against tanks because technically they
were SAMs.
2020-11-17 00:25:45 -08:00
Dan Albert
505af7635f Include EWRs in DEAD targets. 2020-11-16 23:53:25 -08:00
Dan Albert
426dc69e1d Allow DEAD on EWRs. 2020-11-16 23:53:25 -08:00
Dan Albert
082e8c062c Add anti-ship missions.
The only practical difference between this and BAI is that the target is
floating, so this mostly shares its implementation with BAI.

Fixes https://github.com/Khopa/dcs_liberation/issues/350
2020-11-16 23:29:19 -08:00
Dan Albert
9f2409bb9e Make sweep flights actually sweep flights.
DCS group task doesn't alter behavior, but it does alter which tasks are
available to the group.
2020-11-16 22:47:32 -08:00
Dan Albert
14dd8e43a4 Improve waypoint names for BAI targets. 2020-11-16 22:37:19 -08:00
Dan Albert
9fb33526a7 Add BAI missions.
BAI is used for attacking ground vehicles as opposed to buildings like
strike does, and not air defenses like DEAD does. Unlike strike, BAI is
tolerant of moving targets.

Fixes https://github.com/Khopa/dcs_liberation/issues/216
2020-11-16 21:11:18 -08:00
Dan Albert
8bd00bf450 Move mission type compatibility to the target.
This was also needed in other parts of the UI and is easier to implement
in the target class anyway.

Note that DEAD is now properly restricted to air defense targets.

Also added error boxes to the UI for when planning fails on an invalid
target.
2020-11-16 21:11:14 -08:00
walterroach
f3553ced78 Merge pull request #366 from walterroach/new_frontline
New frontline paths.  First step in #287
2020-11-16 22:13:33 -06:00
Khopa
a52dc43c9e MAde it possible to setup liveries in faction files. 2020-11-16 22:02:30 -06:00
Khopa
0b6b40a358 Pydcs repository update : Fixed issue with clipped wing variant of the spitfire not being seen as a flyable module 2020-11-16 22:02:27 -06:00
Dan Albert
f6371d2ef1 Further improve split/join positioning. 2020-11-16 22:02:22 -06:00
walterroach
ecd073e31d typing and comment cleanup 2020-11-16 22:01:49 -06:00
Dan Albert
b7d160631a Further improve split/join positioning.
(cherry picked from commit dc235f36c8)
2020-11-16 19:15:41 -08:00
Dan Albert
dc235f36c8 Further improve split/join positioning. 2020-11-16 19:15:11 -08:00
Khopa
7503c1e1e9 Pydcs repository update : Fixed issue with clipped wing variant of the spitfire not being seen as a flyable module 2020-11-17 00:06:10 +01:00
walterroach
253e8a209c fix return statement 2020-11-16 17:02:04 -06:00
Khopa
e26b692631 MAde it possible to setup liveries in faction files. 2020-11-16 23:57:12 +01:00
walterroach
658d808524 Merge branch 'develop' into new_frontline 2020-11-16 16:25:21 -06:00
Dan Albert
28e00055ab Differentiate BARCAP and TARCAP.
Previously the only difference between these was the objective type:
TARCAP was for front lines and BARCAP was for everything else.

Now BARCAP is for friendly areas and TARCAP is for enemy areas. The
practical difference between the two is that a TARCAP package is like
the old front line CAP in that it will adjust its patrol time to match
the package if it can, and it will also arrive two minutes ahead of the
rest of the package to clear the area if needed.
2020-11-16 00:32:50 -08:00
Dan Albert
8eef1eaa7c Fix mypy issue. 2020-11-15 23:59:20 -08:00
Dan Albert
e361a857a4 Only engage fighters with sweep. 2020-11-15 23:53:12 -08:00
Dan Albert
d369ce8847 Add fighter sweep tasks.
Fighter sweeps arrive at the target ahead of the rest of the package
(currently a fixed 5 minute lead) to clear out enemy fighters and then
RTB.

Fixes https://github.com/Khopa/dcs_liberation/issues/348
2020-11-15 23:49:14 -08:00
walterroach
d05897edcb Change default CAS loadout for Viggen
Reported that AI can't hit the broad side of a barn with the rockets.
2020-11-15 22:59:46 -06:00
walterroach
1d98432c57 Briefing tweak
Fixes frontline info repeating when player has no vehicles.
2020-11-15 22:59:40 -06:00
walterroach
e60166dc89 Change default CAS loadout for Viggen
Reported that AI can't hit the broad side of a barn with the rockets.
2020-11-15 22:50:14 -06:00
walterroach
87afc2fcef bezier frontline display
Start on refactoring and cleanup of QLiberationMap.py
2020-11-15 22:08:30 -06:00
walterroach
bd1457c435 Complete Caucasus Full Map frontline data. 2020-11-15 22:08:30 -06:00
walterroach
c1f88b4a5f frontline refactoring
`FrontLine` is tightly coupled with `ConflictTheater`.
  Moved into the same module to prevent circular imports.

Moved `ConflictTheater.frontline_data` from class var
to instance var to allow save games to have different
versions of frontlines.
2020-11-15 22:08:18 -06:00
walterroach
a080d4b692 Briefing tweak
Fixes frontline info repeating when player has no vehicles.
2020-11-15 22:06:05 -06:00
walterroach
c20e9e19cb Add cheat for more easily debugging frontline 2020-11-15 20:56:09 -06:00
Dan Albert
d9056acc6d Improve hold/split/join point positioning.
This also removes ascend/descend waypoints. They don't seem to be
helping at all. The AI already gets an implicit ascend waypoint (they
won't go to waypoint one until they've climbed sufficiently), and
forcing unnecessary sharp turns toward the possibly mispredicted ascent
direction can mess with the AI. It's also yet another variable to
contend with when planning hold points, and hold points do essentially
the same thing.

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

(cherry picked from commit 21cd764f66)
2020-11-15 18:53:42 -08:00
Dan Albert
21cd764f66 Improve hold/split/join point positioning.
This also removes ascend/descend waypoints. They don't seem to be
helping at all. The AI already gets an implicit ascend waypoint (they
won't go to waypoint one until they've climbed sufficiently), and
forcing unnecessary sharp turns toward the possibly mispredicted ascent
direction can mess with the AI. It's also yet another variable to
contend with when planning hold points, and hold points do essentially
the same thing.

Fixes https://github.com/Khopa/dcs_liberation/issues/352.
2020-11-15 18:53:17 -08:00
Khopa
dfc31dfd5c Changelog update
(cherry picked from commit 8ffbf32677)
2020-11-15 18:53:13 -08:00
Khopa
8ffbf32677 Changelog update 2020-11-15 16:14:18 +01:00
Khopa
6e2124252c Added full persian gulf map by Plob 2020-11-15 15:58:00 +01:00
Khopa
3dd07b8c23 Added factions made by Discord user HerrTom 2020-11-15 15:57:59 +01:00
Khopa
2e067aada6 Added full persian gulf map by Plob 2020-11-15 15:57:36 +01:00
Khopa
78cd60f3df Added factions made by Discord user HerrTom 2020-11-15 15:50:29 +01:00
Dan Albert
2891649531 Fix pyinstaller spec for release.
final and buildnumber are optional files. Move them into resources to
avoid naming them explicitly.

(cherry picked from commit fae9650f56)
2020-11-14 13:13:18 -08:00
Dan Albert
4b40739918 Fix versioning for release builds.
(cherry picked from commit 9019cbfd2b)
2020-11-14 13:13:18 -08:00
Dan Albert
96c401e1b9 Fix pyinstaller spec for release.
final and buildnumber are optional files. Move them into resources to
avoid naming them explicitly.

(cherry picked from commit fae9650f56)
2020-11-14 13:06:59 -08:00
Dan Albert
fad132dcca Fix versioning for release builds.
(cherry picked from commit 9019cbfd2b)
2020-11-14 13:06:01 -08:00
Dan Albert
fae9650f56 Fix pyinstaller spec for release.
final and buildnumber are optional files. Move them into resources to
avoid naming them explicitly.
2020-11-14 13:01:11 -08:00
C. Perreau
e26e7f53c5 Merge pull request #367 from Khopa/develop_2_2_x
Release 2.2.0
2020-11-14 21:46:59 +01:00
Khopa
696710bf41 Merge remote-tracking branch 'khopa/master' into develop_2_2_x
# Conflicts:
#	changelog.md
#	game/operation/operation.py
#	gen/aircraft.py
#	gen/groundobjectsgen.py
#	qt_ui/uiconstants.py
2020-11-14 21:40:07 +01:00
Dan Albert
9019cbfd2b Fix versioning for release builds. 2020-11-14 12:39:50 -08:00
Khopa
f8735927bf Version string 2.2.0 2020-11-14 21:32:27 +01:00
Khopa
16cfc4e945 Changelog update for 2.2.0 2020-11-14 21:32:05 +01:00
Khopa
85f931316a Changelog update for 2.2.0 2020-11-14 21:29:03 +01:00
Khopa
717ea05d38 Pulled latest pydcs version 2020-11-14 21:24:45 +01:00
Khopa
3987274764 Pulled latest pydcs version 2020-11-14 21:24:15 +01:00
Khopa
73a97f9c2a Added High Digit Sams mods pydcs export extensions, maybe for later use. 2020-11-14 20:27:38 +01:00
walterroach
80612ba97d Merge branch 'develop_2_2_x' into develop 2020-11-14 12:24:26 -06:00
walterroach
c4d2b92e34 Merge branch 'develop_2_2_x' into new_frontline 2020-11-14 12:18:40 -06:00
walterroach
169fba9ab8 fixes viggen client waypoints
Only one target waypoint created when flight is Viggen client flight.

    M Waypoints not explicitly set anymore
      (they don't need to be when waypoint has a TOT)
2020-11-14 12:17:15 -06:00
Khopa
0b902e19ee Adding Persian gulf started mizdata files before release 2020-11-14 14:48:48 +01:00
Khopa
ab26a76789 A-20G won't level bomb unit groups 2020-11-14 14:19:34 +01:00
Khopa
1f43fbe16e A-20G won't level bomb unit groups 2020-11-14 14:17:07 +01:00
Dan Albert
f29cb99530 Update the README with a more recent screenshot.
(cherry picked from commit ef84703da9)
2020-11-14 01:39:47 -08:00
Dan Albert
ef84703da9 Update the README with a more recent screenshot. 2020-11-14 01:39:20 -08:00
Dan Albert
9e32ea7413 Handle inventory when selling aircraft.
This still leaves a bit to be desired, namely that selling aircraft
happens immediately but buying aircraft takes a turn. However, that's
how this behaved before, so this restores the 2.1 behavior. Worth
investigating further in the future.

(cherry picked from commit 75769df8e2)
2020-11-14 00:12:02 -08:00
Dan Albert
75769df8e2 Handle inventory when selling aircraft.
This still leaves a bit to be desired, namely that selling aircraft
happens immediately but buying aircraft takes a turn. However, that's
how this behaved before, so this restores the 2.1 behavior. Worth
investigating further in the future.
2020-11-14 00:11:19 -08:00
Dan Albert
95fd4cab05 Fix error box in flight creation.
(cherry picked from commit a81254cd18)
2020-11-13 21:01:30 -08:00
Dan Albert
a81254cd18 Fix error box in flight creation. 2020-11-13 21:00:55 -08:00
Dan Albert
4cff838de0 Develop is now 2.3. 2020-11-13 18:46:59 -08:00
walterroach
3838b3ca4f More frontlines 2020-11-13 17:03:46 -06:00
walterroach
7dc3e041c8 Merge branch 'new_frontline' of https://github.com/walterroach/dcs_liberation into new_frontline 2020-11-13 09:12:40 -06:00
walterroach
33b92423d8 cleanup comments
remove unnecessary method call
2020-11-13 09:12:08 -06:00
walterroach
6237fffa5a cleanup comments 2020-11-13 09:03:02 -06:00
walterroach
0b4e2d3b6b Merge branch 'develop' into new_frontline 2020-11-13 08:58:43 -06:00
Dan Albert
c4d08fa7b7 Fix handling of non-AA units in AA groups.
Some units in pydcs have detection_range and threat_range
defined, but explicitly set to None.
2020-11-13 02:57:51 -08:00
Dan Albert
cec28351e7 Remove dead code. 2020-11-13 01:20:59 -08:00
walterroach
398630d51e initial tooling 2020-11-12 21:51:54 -06:00
walterroach
61400ba726 caucasus test data 2020-11-12 21:47:54 -06:00
walterroach
33885e2216 initial multi segment frontline implementation 2020-11-12 21:47:13 -06:00
walterroach
5719b136fe sanity check 2020-11-12 19:16:01 -06:00
walterroach
ede5ee60c3 frontline 2020-11-12 18:21:37 -06:00
Khopa
9620ac7e7e Updated mizdata on Caucasus map 2020-11-12 21:08:44 +01:00
Dan Albert
c0bfdbf4bb Update client counts when packages are changed.
Fixes https://github.com/Khopa/dcs_liberation/issues/345
2020-11-11 15:06:57 -08:00
Dan Albert
efb544a303 Fix bad argument type. 2020-11-11 15:05:58 -08:00
Dan Albert
adfc4b7244 Don't plan DEAD missions against scuds.
Fixes https://github.com/Khopa/dcs_liberation/issues/355
2020-11-11 14:57:39 -08:00
Khopa
7a5ce98569 Added mizdata preset locations for the channel map. 2020-11-11 14:27:13 +01:00
Khopa
1fcceb0901 Mizdata for the channel map 2020-11-11 02:53:12 +01:00
Khopa
22c552053f Made Patriot and Sa-10 sites more compact, so it's easier to find valid position to generate them on the map. 2020-11-11 01:03:57 +01:00
Khopa
818c679d4f Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2020-11-10 23:48:45 +01:00
Khopa
3ff36c45aa Ground Object and Sam sites locations are chosen from a set of preset location when possible. 2020-11-10 23:48:27 +01:00
Dan Albert
623d461b06 Fix delays of AI flights.
Fixes https://github.com/Khopa/dcs_liberation/issues/354
2020-11-10 13:18:06 -08:00
Dan Albert
7535013848 Fix #85: update the max aircraft available.
https://github.com/Khopa/dcs_liberation/issues/85
2020-11-10 00:52:19 -08:00
Dan Albert
a63bac8826 Don't display scud sites as SAM threat range. 2020-11-09 21:51:55 -08:00
Dan Albert
d2c831c4ee Handle inventory for changing flight size. 2020-11-09 21:29:47 -08:00
walterroach
840b5ce071 Change CAS ROE 2020-11-09 20:36:07 -06:00
walterroach
be6abc0025 Don't display attack button for dead base groups 2020-11-09 15:48:34 -06:00
walterroach
ef585c59dd Merge pull request #343 from walterroach/missed_events
Missed Debrief Events
2020-11-09 15:36:09 -06:00
walterroach
16d9c1ccad Add EWR to destruction events in debrief
Also impacted reinforcement generation on turn after EWR destroyed.
2020-11-09 14:49:44 -06:00
walterroach
9a9ef78583 Fix statics not being killed in debrief 2020-11-09 13:34:56 -06:00
Dan Albert
fe7ee5b610 Add more to the changelog. 2020-11-09 00:55:57 -08:00
walterroach
680804040a Update changelog. 2020-11-09 00:43:53 -08:00
Dan Albert
0d4fe73daa Add ships to skynet EWR. 2020-11-08 23:51:28 -08:00
Dan Albert
407190c6c5 Use EWRs for EWR. 2020-11-08 22:17:06 -08:00
Dan Albert
73998dbde0 Show EWRs as detection range, not threat range. 2020-11-08 19:03:47 -08:00
Dan Albert
8827f7df34 Cleanup Lua plugin implementation.
* Move the UI code out of the plugin logic.
* Add types where needed.
* Move into game package.
* Improve error handling.
* Simplify settings behavior.
* Don't load disabled plugins.
* Remove knowledge of non-base plugins from game generation.

Fixes https://github.com/Khopa/dcs_liberation/issues/311
2020-11-08 17:53:52 -08:00
Khopa
4c394a9e2d Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2020-11-08 23:24:24 +01:00
Khopa
5946fc7404 Improved campaign selection screen in new game wizard. 2020-11-08 23:24:10 +01:00
Dan Albert
5b8ecb2c14 Add radio data for the MiG-21.
Fixes https://github.com/Khopa/dcs_liberation/issues/49
2020-11-08 13:25:58 -08:00
Khopa
61253e4d4d Show name instead of Id of ground units in faction selection screen. 2020-11-08 22:02:16 +01:00
Khopa
2c0ca5803f Improved the faction selection screen in the new game wizard. 2020-11-08 21:57:26 +01:00
Khopa
690f3d0f13 B-52 default strike loadout use Mk-84 2020-11-08 13:52:43 +01:00
walterroach
42c259bc58 Fix briefing whitespace 2020-11-08 01:28:28 -08:00
walterroach
11426a0713 Revert "more explicity waypoint namespace"
This reverts commit 314be482f9.
2020-11-07 21:16:10 -08:00
walterroach
e6af1b8645 more explicity waypoint namespace 2020-11-07 21:16:10 -08:00
walterroach
103f18191d Move viggen tot check down to pydcs waypoint only. 2020-11-07 21:16:10 -08:00
walterroach
fb312236a2 rework special waypoints 2020-11-07 21:16:10 -08:00
Dan Albert
c850c0095d Add DEAD to the flight recreate types. 2020-11-07 17:07:45 -08:00
Dan Albert
58481268f7 Fix mypy issue. 2020-11-07 16:33:00 -08:00
Dan Albert
11604671f8 Fix bad stagger interval calculation.
Was using the interval from mission start to latest rather than from
earliest to latest, so this could sometimes be off by a bit and cause
us to not generate enough start times.
2020-11-07 16:25:56 -08:00
Dan Albert
e8feded4c3 Add EWR generation.
Fixes https://github.com/Khopa/dcs_liberation/issues/66
2020-11-07 16:20:58 -08:00
walterroach
18f9b38d25 Keep only last base capture per base in debrief 2020-11-07 15:14:02 -08:00
Dan Albert
676eea3ccc Don't plan missions against dead targets.
Fixes https://github.com/Khopa/dcs_liberation/issues/314
2020-11-07 13:59:52 -08:00
Dan Albert
ee113d080e Merge branch 'theater-refactor' into develop 2020-11-07 13:39:35 -08:00
Dan Albert
8bc69415a7 Clean up base defense generation. 2020-11-07 13:38:58 -08:00
Dan Albert
3979ee57ff Cleanup oddities of CP generation.
* Don't spawn missile sites or ground locations for CVs/LHAs.
* Don't spawn ground locations around CVs/LHAs.
* Spawn AA sites even if the faction has no buildings defined.
2020-11-07 13:38:58 -08:00
Dan Albert
c2ee169d16 Fix regeneration of base defenses on capture.
I messed up the counting here and was counting *every* object rather
than just the base defenses, so it was very unlikely that we'd hit
base defenses on the second object, which is the only index valid for
SAM generation. That logic maybe needs to be different, but this
restores the previous behavior.
2020-11-07 13:38:58 -08:00
Dan Albert
56b51c85bb Fix targeting SAMs with strike missions.
The changes for Skynet unfortunately broke this because the names used
by the TGO and the name of the group itself were no longer in sync.
This deserves a larger cleanup where we decouple that naming
requirement (TGOs don't need a lot of the data they currently have),
but this works until we have the time to do that.

Fixes https://github.com/Khopa/dcs_liberation/issues/298
2020-11-07 13:37:52 -08:00
Dan Albert
853ee5aac4 Cleanup Theater Ground Object.
A whole bunch of this data is redundant.
2020-11-07 13:10:06 -08:00
Dan Albert
4cf406aefa Defer game load to after UI initialization.
This removes both the double load that happens on startup and also
makes it possible to get the UI to create a new game if the existing
default.liberation is not compatible.
2020-11-07 13:03:25 -08:00
Khopa
1abb341cb6 Added SCUD missiles sites 2020-11-07 19:20:08 +01:00
Khopa
44dce9598c Added support for Tetrarch and Daimler Armoured car. (New WW2 units) 2020-11-07 17:43:30 +01:00
Khopa
aefc8685a1 Added new FLAK units to WW2 allies factions 2020-11-07 17:40:26 +01:00
Khopa
26761342f5 Changelog update 2020-11-07 16:25:23 +01:00
Khopa
ca777bcebb Tuned base defense location generator for big airbases. (Some would end up without any base defenses before) 2020-11-07 16:23:46 +01:00
Khopa
5742075ff2 Syria terrain update for Incirlik airbase exlusions zones. 2020-11-07 16:22:59 +01:00
Khopa
c7a6ec9691 Changelog update 2020-11-07 03:27:03 +01:00
Khopa
e0153cfa6a Added Freya EWR sites to WW2 german factions 2020-11-07 03:21:53 +01:00
Khopa
3fd5e1bae7 Added newest P-47 variants to WW2 factions 2020-11-07 02:31:29 +01:00
Khopa
d9511a7edd Improved Strike mission generation.
- B52, A-20, and Tu-22 will level bomb targets
- When there is an unit group as target, all the units are now engaged instead of only the first unit of the group
2020-11-07 02:13:17 +01:00
C. Perreau
040db055fd Merge pull request #309 from DanAlbert/theater-refactor
Refactor game and ground object generation.
2020-11-06 20:33:19 +01:00
C. Perreau
b9f8cfd10d Merge pull request #319 from walterroach/fix_flight_edit
Fixes #312
2020-11-06 20:18:33 +01:00
Khopa
ff46556927 Fixed russia 1990 faction. Added Tu_22M3. 2020-11-06 18:56:25 +01:00
walterroach
d1815a3d6e Fixes #312 2020-11-06 10:38:29 -06:00
Dan Albert
fdfa4827ab Remove unused and broken scripts. 2020-11-05 21:39:49 -08:00
Dan Albert
5d579ccef9 Add hints for creating packages. 2020-11-05 17:08:34 -08:00
Dan Albert
4145d5578e Refactor game and ground object generation.
No real functional improvements yet, just reorganizing to make
improvements easier.
2020-11-05 16:09:34 -08:00
Dan Albert
43eb041bb8 Fix escort planning for racetracks. 2020-11-05 15:17:45 -08:00
Dan Albert
0b8ac8fc47 Move to hold points more slowly.
This should give the AI a better chance to climb before reaching the
waypoint.
2020-11-05 15:17:45 -08:00
Dan Albert
de3ba5908f Round waypoint TOTs in the UI. 2020-11-05 15:17:45 -08:00
C. Perreau
bbb6251aa9 Merge pull request #308 from walterroach/briefing_jinja
Briefing jinja
2020-11-05 23:31:58 +01:00
walterroach
6f71d92a7b Merge branch 'develop' into briefing_jinja 2020-11-05 16:08:16 -06:00
walterroach
a8b59cc567 Move briefing string literals to template 2020-11-05 16:07:44 -06:00
walterroach
f4d3660eac split sead and dead
change SEAD to engage in zone
2020-11-05 13:42:44 -08:00
walterroach
1f165835c6 type hinting and comment cleanup 2020-11-05 13:20:54 -08:00
walterroach
9087f3487d Single ShipGroupGenerator added 2020-11-05 13:20:54 -08:00
Walter
4ca92ea22d Fix ships being wrong unit type 2020-11-05 13:20:54 -08:00
Khopa
e2682d633f Added payloads for bombers. 2020-11-05 20:43:49 +01:00
Khopa
e6cb1b5970 Updated pydcs submodule commit reference 2020-11-05 19:59:21 +01:00
Khopa
de2d548139 Added Flak guns to most coldwar factions 2020-11-05 00:34:57 +01:00
Khopa
4d1a0b85e4 Added free version of WW2 factions that will not require the WW2 Asset Pack. 2020-11-04 22:25:24 +01:00
Khopa
5cfbd8c3ad Added building set for WW2 units that does not require WW2 asset pack. 2020-11-04 22:01:28 +01:00
Khopa
95f72be8eb Fixed issue with duplicated WW2 germany faction IDs 2020-11-04 21:51:09 +01:00
Khopa
95c4dfa52f Added new Flak site configuration (now that flak 18 and bofors guns do not require WW2 asset pack) 2020-11-04 21:50:25 +01:00
Khopa
b72a2f4a5f Fixed error in new game wizard with units and mods required not being displayed correctly in some cases. 2020-11-04 21:09:48 +01:00
Khopa
844f8595d1 Fixed ID of some units to match new pydcs data-export. 2020-11-04 21:07:28 +01:00
Khopa
1c9d9be667 Using latest pydcs data-export 2020-11-04 21:02:01 +01:00
Khopa
2a02a743a4 Do not display manage button on base defense group for enemy cp. 2020-11-04 18:53:18 +01:00
Khopa
968d9365d6 Re-added F-15E to bluefor modern. 2020-11-03 20:38:04 +01:00
Walter
cdb16cc591 Fixes #268
Changes red base info to show defenses first, and adds an attack option
2020-11-02 18:06:10 -08:00
Walter
86bc41c15c Add base menu to new package dialog for red cp 2020-11-02 18:06:10 -08:00
Dan Albert
ac05c7cfaa Fix recreate as CAP for ground targets. 2020-11-02 02:33:09 -08:00
Dan Albert
9c07fe5963 Remove source of error in package waypoint timing.
We were calculating the TOT based on travel time to the *flight's*
target, but the ingress point based on the travel time to the target
area. If the difference in travel time between the center of the
target area and the first target were different then we'd calculate
the start time incorrectly even for single flight packages.

Seems to fix https://github.com/Khopa/dcs_liberation/issues/295
2020-11-02 02:26:07 -08:00
Dan Albert
ed05f995b5 Refactor strike formation timing calculations. 2020-11-02 02:25:33 -08:00
Dan Albert
85491dca20 Fix front line CAP patrol end time. 2020-11-02 01:34:35 -08:00
Dan Albert
465399f803 Add radio configuration for the UH-1H and Ka-50. 2020-11-01 17:12:42 -08:00
Dan Albert
3550c8a8f6 Remove afterburner restrictions.
The AI often needs afterburner to recover from high AoA.

Fixes https://github.com/Khopa/dcs_liberation/issues/205
2020-11-01 15:12:05 -08:00
Dan Albert
739c0f8f52 Add radio data for MiG-15bis and MiG-19P.
Fixes https://github.com/Khopa/dcs_liberation/issues/233.
2020-11-01 14:50:23 -08:00
Dan Albert
49aa79c612 Fix mypy issues. 2020-11-01 14:49:50 -08:00
Dan Albert
cdde75b517 Add option to avoid delaying player flights.
Fixes https://github.com/Khopa/dcs_liberation/issues/227
2020-11-01 14:13:06 -08:00
Dan Albert
dde74af6b5 Fix client/player detection.
Client needs to be used if there are other player slots in *any*
flight, not just the same group.

Fixes https://github.com/Khopa/dcs_liberation/issues/297
2020-11-01 14:02:32 -08:00
Dan Albert
eff9c77c9a Fix departure time in the kneeboard.
We don't have the departure time set until after we create the initial
FlightData object. Populate the value after it is determined.

Fixes https://github.com/Khopa/dcs_liberation/issues/290
2020-11-01 13:31:56 -08:00
Dan Albert
5ba633c8a1 Round TOT/start time as needed.
The increased precision that we had everywhere except the UI and the
interface with DCS was causing issues with ASAP creating barely
negative start times. The main cause of this was that we'd compute the
earliest possible TOT, it would result in, for example, 23:10.002.
When we then set the QTimeEdit for the TOT, we have to round because
it does not support (nor do we really want to display) sub-second
values, which then caused the previously 0 start time to be -0.002.

Instead, since the sub-second values aren't really interesting anyway,
we now just round TOTs up and start times down. This should prevent
negative start times from occurring (except when they've been manually
planned as such), and also prevents start times of 00:00:01.

Also rounds the package waypoint times to avoid the same issues, but
it's not really important which direction we round these.

Fixes https://github.com/Khopa/dcs_liberation/issues/295
2020-11-01 13:31:10 -08:00
Dan Albert
ab67a38ca5 Remove rounding from waypoint timing in the UI.
This is behaving strangely on some machines. Stop hiding the details
in the UI while we debug.
2020-11-01 01:42:58 -08:00
Dan Albert
08f0c9d30a Fix timedelta -> timedelta conversion.
Fixes https://github.com/Khopa/dcs_liberation/issues/293
2020-11-01 00:58:35 -07:00
Dan Albert
9d747a9f9b Fix kneeboard ground speeds. 2020-10-31 20:28:07 -07:00
walterroach
31ca121498 Add github build number to title bar for preview
builds
2020-10-31 20:10:58 -07:00
walterroach
44b5f5acf1 added notify call back 2020-10-31 20:09:20 -07:00
walterroach
eb4878dfc4 remove useless props 2020-10-31 20:09:20 -07:00
walterroach
3dc7dc3d1a Dan'ts notes
commit 35ab9103cebf823bab85fbb1c9ff4bc2b9c5701a
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:25:42 2020 -0500

    more cleanup

commit d3d008bc6b29f328ad48063bd4b0520e1b819d68
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:17:59 2020 -0500

    More briefinggen cleanup

commit b2033f091d7191aecefb86fecb5cb060c074706e
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:08:48 2020 -0500

    briefinggen cleanup

commit 72ea0196c22d9493df078765800f3fafb9c054dc
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 21:57:52 2020 -0500

    Add notifier method back to Operation

commit efd39a9e03d02b9d581637d0d1c289af68e749c3
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 21:34:37 2020 -0500

    Revert "Move kneeboard and briefing gen to unified"
    Removes properties added to Operation
    This reverts commit 941f2af770.
2020-10-31 20:09:20 -07:00
Walter
6a6133e5cd template cleanup 2020-10-31 20:09:20 -07:00
Walter
65c85d7f0b init args change 2020-10-31 20:09:20 -07:00
Walter
d519dfa5da docstrings and cleanup 2020-10-31 20:09:20 -07:00
Walter
73ea83bbdd Move kneeboard and briefing gen to unified
interface
2020-10-31 20:09:20 -07:00
Walter
235a5ec538 cleanup 2020-10-31 20:09:20 -07:00
walterroach
f81a3d03c0 working briefinggen refactor 2020-10-31 20:09:20 -07:00
walterroach
6878b57fba refactor frontline brief generation 2020-10-31 20:09:20 -07:00
walterroach
0143e5641f var change 2020-10-31 20:09:20 -07:00
walterroach
5adc92c601 Properly get enum instead of value on strategy
selecter
2020-10-31 20:09:20 -07:00
walterroach
0b2fbddbc5 refactor frontline situation briefing 2020-10-31 20:09:20 -07:00
Walter
28035bf02b linting and formatting 2020-10-31 20:09:20 -07:00
Walter
6c9a9de3f3 parent f03121af5a
first pass briefing refactor

briefing fixes

briefing fixes

Stop briefing generate being called twice

Stop frontline advantage string being appended
when there are no units.

jinja template

always return enum instance in Strategy Selector

For some reason on DEFENSE, enum is appended to control point stance,
but on all other the enum.value is added instead.

I don't see any case where the value is used, but there are many
cases that the enum instance is evaluated against.

type issue

junja's not a thing

swap mapping with dict

jinja template

always return enum instance in Strategy Selector

For some reason on DEFENSE, enum is appended to control point stance,
but on all other the enum.value is added instead.

I don't see any case where the value is used, but there are many
cases that the enum instance is evaluated against.

type issue

Update build.yml

junja's not a thing

swap mapping with dict

Restore build job
2020-10-31 20:09:20 -07:00
Walter
62139fc4eb Fix Nevada landmap not loading
logging on open try except block
2020-10-31 19:55:26 -07:00
Dan Albert
88b9ed29ba Reorganize flight planning.
Previously we were trying to make every potential flight plan look
just like a strike mission's flight plan. This led to a lot of special
case behavior in several places that was causing us to misplan TOTs.

I've reorganized this such that there's now an explicit `FlightPlan`
class, and any specialized behavior is handled by the subclasses.

I've also taken the opportunity to alter the behavior of CAS and
front-line CAP missions. These no longer involve the usual formation
waypoints. Instead the CAP will aim to be on station at the time that
the CAS mission reaches its ingress point, and leave at its egress
time. Both flights fly directly to the point with a start time
configured for a rendezvous.

It might be worth adding hold points back to every flight plan just to
ensure that non-formation flights don't end up with a very low speed
enroute to the target if they perform ground ops quicker than
expected.
2020-10-31 19:29:24 -07:00
Dan Albert
d94c57afd6 Fix error displaying flight edit dialog.
If no airfield was selected (as sometimes happens, usually when there
are no aircraft available anywhere), report that no aircraft are
available.
2020-10-31 18:39:06 -07:00
Dan Albert
b6421646ff Name the set TOT ASAP button better. 2020-10-30 17:28:04 -07:00
Dan Albert
611b6fc272 Fix mypy. 2020-10-30 16:43:19 -07:00
Dan Albert
9cdbef9faf Revert "Run tests in GitHub actions."
Was pushed by accident.

This reverts commit f5047fc0cc.
2020-10-30 16:14:38 -07:00
Dan Albert
b34de70fc7 Fix logging.
Same problem as last time: we were logging during initialization
before the log handlers could be initialized.
2020-10-30 16:13:34 -07:00
Dan Albert
f5047fc0cc Run tests in GitHub actions. 2020-10-30 15:09:20 -07:00
Dan Albert
258c34e61d Make test runnable from command line.
`pytest tests` works now. I can't explain why `pytest` alone does not,
but it could have something to do with us not being a real Python
package.

With just `pytest` I get:

    E   ModuleNotFoundError: No module named 'tests.test_factions'

But `python -c "import tests.test_factions"` works fine.
2020-10-30 15:05:44 -07:00
Dan Albert
f365487fd6 Remove user-specific config file. 2020-10-30 13:51:18 -07:00
Khopa
8f65b7ee7c Fixed and added many ground unit icons 2020-10-30 16:59:13 +01:00
Khopa
9397f1f39c Fixed issue with Russian 1955/65/75 factions 2020-10-30 16:16:46 +01:00
Walter
f03121af5a fixed wrong conditionals 2020-10-28 16:27:18 -07:00
Dan Albert
239b9f8234 Use python, not py.
py is a shortcut that launches the *latest* version of Python on the
machine. https://stackoverflow.com/a/50896577/632035

The build machines were updated to include python 3.9, so we were
doing everything with 3.9 instead of 3.8. pyproj doesn't have a binary
wheel for 3.9 on pypi yet, so we were falling back to building it from
source, which we aren't able to do, breaking the build.
2020-10-28 00:06:12 -07:00
Dan Albert
1620c602cf Fix mypy issue. 2020-10-27 18:12:13 -07:00
Walter
fa01303460 #257 CasIngressBuilder changes
* Calculate radius from frontline length global
* Determine CAS waypoint by waypoint type rather than name
* Change logging from error to exception
2020-10-27 09:48:36 -05:00
walterroach
1e5bd916d9 CasIngressBuilder proper inheritence 2020-10-26 23:33:56 -05:00
walterroach
62d89239fc merge 2020-10-26 23:20:05 -05:00
walterroach
91bee4e6c2 Changed CAS engage task to zone 2020-10-26 23:10:53 -05:00
Walter
a465dde32f Changed task to add AAA and infantry properly 2020-10-26 16:42:40 -07:00
Walter
254dd5f70f Add Air Defenses to engage task 2020-10-26 16:42:40 -07:00
Walter
1a70ed5121 CAS Weapons Hold until Ingress 2020-10-26 16:42:40 -07:00
Walter
16d5a550ce Move Engage targets to ingress point for CAS 2020-10-26 16:42:40 -07:00
Khopa
794cc43a41 Fix pmc mb339 modded faction id 2020-10-26 23:56:52 +01:00
Walter
8583bbf893 Changed task to add AAA and infantry properly 2020-10-26 17:19:52 -05:00
Walter
63d510f2ea Add Air Defenses to engage task 2020-10-26 15:48:22 -05:00
David Pierron
2c6b26003b Merge pull request #237 from VEAF/skynet-iads-plugin
First version of the Skynet IADS plugin
2020-10-26 21:39:58 +01:00
Walter
fdaf3bc30f CAS Weapons Hold until Ingress 2020-10-26 15:26:51 -05:00
Walter
816d9696b5 Move Engage targets to ingress point for CAS 2020-10-26 15:26:47 -05:00
David Pierron
bdaa6a294a Merge branch 'skynet-iads-plugin' of https://github.com/VEAF/dcs_liberation into skynet-iads-plugin 2020-10-26 21:17:26 +01:00
David Pierron
a6b15b9529 Merge remote-tracking branch 'upstream/develop' into skynet-iads-plugin 2020-10-26 21:17:16 +01:00
David Pierron
878529e8f8 Merge branch 'develop' into skynet-iads-plugin 2020-10-26 21:14:24 +01:00
David Pierron
2cb37b5bd8 added typing 2020-10-26 21:06:25 +01:00
David Pierron
de95cfc981 base plugin needs to be loaded first,
before skynetiads
2020-10-26 21:06:08 +01:00
David Pierron
0477247cf2 correction :
skipping plugin work orders did not work
2020-10-26 21:05:34 +01:00
David Pierron
e0319a4047 Merge remote-tracking branch 'upstream/develop'
into skynet-iads-plugin
2020-10-26 18:05:07 +01:00
Khopa
839f163ac5 Fixed issue with base defense that could not be repaired 2020-10-26 00:32:05 +01:00
Khopa
ba9ad4c371 Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop 2020-10-26 00:24:30 +01:00
Khopa
bdcf7c1828 Fixed mig 21 wrong identifier in some files. 2020-10-26 00:24:03 +01:00
Dan Albert
821e9fc114 Merge branch 'fix-mypy-actions' into develop 2020-10-25 16:19:57 -07:00
Dan Albert
334d21897b Fix mypy actions.
GitHub actions fail based on the exit code of the *last* command in
the step, so we were failing mypy but passing the action.
2020-10-25 16:19:46 -07:00
Dan Albert
b405c3ab32 Fix mypy issues in faction code. 2020-10-25 16:19:46 -07:00
Khopa
3cabb1e02d Inverted usa 1990 and 2005 factions names 2020-10-26 00:16:37 +01:00
Khopa
ec7f8f5710 Completed basic faction parameters loading test. 2020-10-25 14:38:10 +01:00
Khopa
93f0627c5e Fixed errors in faction code 2020-10-25 14:21:25 +01:00
Khopa
3d8c2d689e Added unit tests for faction. (To be completed) 2020-10-25 14:20:43 +01:00
Khopa
e1572c09ff Improved faction & faction loader typing. Fixed error with netherlands faction. 2020-10-25 14:08:11 +01:00
Khopa
910af12fb9 Default faction for bluefor is USA 2005. 2020-10-25 12:19:51 +01:00
C. Perreau
acbd45341f Merge pull request #249 from Khopa/faction_refactor
Moddable factions
2020-10-25 02:19:22 +02:00
Khopa
901c89371c Fixed syntax errors in json files 2020-10-24 23:40:05 +02:00
Khopa
743534bdda Migrated latest factions to new faction json format. 2020-10-24 23:35:39 +02:00
Walter
98bb1a9f65 Explicit message for confirm_no_client_launch 2020-10-24 13:28:02 -07:00
Dan Albert
bfc602f22f Add cheat option to capture bases.
Capturing bases is sometimes really annoying because of the DCS unit
AI and our non-optimal ground victory heuristics. Add a cheat option
to allow the player to move on without the tedium.
2020-10-24 13:06:37 -07:00
Dan Albert
dd2b61edf3 Use FrontLine in ConflictTheater.conflicts. 2020-10-24 12:24:29 -07:00
Khopa
0fd58135fd Migrated more factions to new faction json format. 2020-10-24 18:02:41 +02:00
Khopa
4672252242 Added description field to both campaign and faction json file. 2020-10-24 17:40:04 +02:00
Khopa
a0c61bf73a Authors informations are loaded in Campaign object (to be displayed in UI later) 2020-10-24 17:23:09 +02:00
Khopa
d6c19a8aff Added author field to campaign json file 2020-10-24 17:18:55 +02:00
Khopa
b6a933e264 Readded Full Map - Caucasus, remade by Discord user "george" 2020-10-24 17:16:56 +02:00
Khopa
0191eca9dc Keeping new factions up to date with develop branch. 2020-10-24 17:03:39 +02:00
Khopa
f962fd55bc Merge branch 'develop' into faction_refactor
# Conflicts:
#	game/factions/bluefor_coldwar.py
#	game/factions/bluefor_coldwar_a4.py
#	game/factions/bluefor_coldwar_mods.py
#	game/factions/bluefor_modern.py
2020-10-24 16:57:28 +02:00
David Pierron
33fa719e8d Merge branch 'skynet-iads-plugin' of https://github.com/VEAF/dcs_liberation into skynet-iads-plugin 2020-10-24 11:03:03 +02:00
David Pierron
adb9352905 removed mist.lua from skynet plugin
It's already included in the base plugin, which is mandatory
2020-10-24 11:02:46 +02:00
David Pierron
58574c67df Merge branch 'develop' into skynet-iads-plugin 2020-10-24 11:01:18 +02:00
Dan Albert
04d3ba4c47 Add mypy to github actions so we stop regressing. 2020-10-24 01:25:47 -07:00
Dan Albert
0f1d2b8685 Remove a plugin we don't include. 2020-10-24 01:10:15 -07:00
Dan Albert
c06a855113 Fix mypy regressions.
Mostly in the plugin system, which needed a handful of asserts that
shouldn't be necessary, but fixing them requires a refactor.
2020-10-24 01:10:11 -07:00
Dan Albert
e9bfd58ee1 Shorten strike waypoint descriptions.
We don't really need this much detail in these, and it was overflowing
the kneeboard.
2020-10-23 22:52:32 -07:00
Dan Albert
5f02febb6c Fix kneeboard crash for small strike missions.
When we don't coalesce target points on the kneeboard we call
add_waypoint_row multiple times, so calls after the first were using
the travel time from one strike target to the next. Since they were so
close that rounded down to zero and caused a divide by zero error.

Update the last waypoint in add_waypoint instead.
2020-10-23 22:41:28 -07:00
Dan Albert
15db12fb21 Fix TOT/start for BARCAPs in other packages.
We were only getting BARCAP results right in BARCAP packages. This
fixes calculations of TOTs and start times for BARCAPs in strike
packages.

The probably needs some refactoring. BARCAP is just the symptomatic
example at the moment, but the real problem is that different mission
profiles exist and we currently only handle one. Making profiles
explicit in mission planning will clean this up, will be needed for
other future mission types, and makes it easier for us to alter
behavior for waypoint and timing decisions based on the aircraft or
mission type.
2020-10-23 22:28:51 -07:00
Dan Albert
c3fca6696d Fix waypoint altitudes for helicopters.
Fixes https://github.com/Khopa/dcs_liberation/issues/234
2020-10-23 14:52:14 -07:00
Dan Albert
dd4c37cde3 Pick runways and ascent/descent based on headwind. 2020-10-23 14:41:42 -07:00
Dan Albert
aa7ffdabb0 Fix planned flights view, stop hiding bugs. 2020-10-23 14:19:45 -07:00
Dan Albert
85f6616185 Add bombers to coalitions.
* B-1
* B-52
* F-117
* Tu-160
* Tu-22
* Tu-95

Also alters the default loadouts for the F-15E.
2020-10-23 13:50:03 -07:00
David Pierron
c8955bdca7 activate the SAM at mission start,
to haste their response
2020-10-23 07:49:26 +02:00
Khopa
669a8c9e64 Merge branch 'develop' into faction_refactor 2020-10-23 01:39:48 +02:00
Khopa
b4d0eb0b99 Started cleaning old factions, added back most factions as json. Fixed LHA not spawning. 2020-10-23 01:38:08 +02:00
C. Perreau
035bebaab8 Merge pull request #238 from walterroach/ter_fix
Fixes issue Khopa#203 TER weapons not selectable in custom payload
2020-10-23 01:07:37 +02:00
Walter
b20200318b ter fix 2020-10-22 16:29:46 -05:00
Walter
9caf83cda9 Fixes issue #203
Conditional in comprehension appears to be intended to exclude
dunders, but was also excluding many TER weapons from Weapon class args
beginning with '_'
2020-10-22 16:28:38 -05:00
David Pierron
493f9df4e2 Merge remote-tracking branch 'upstream/develop' into skynet-iads-plugin 2020-10-22 21:36:49 +02:00
Dan Albert
cc61893bca Fix more fallout from double/right click change. 2020-10-22 12:12:28 -07:00
David Pierron
3ba2fb76aa removed VEAF from the default plugins 2020-10-22 18:40:40 +02:00
David Pierron
e024da277b first working version of the skynetiads plugin 2020-10-22 18:39:54 +02:00
Khopa
bc1e793ce6 Fixed faction loader so it works with known modded units 2020-10-22 13:55:37 +02:00
Khopa
aa7eacc043 Added list of modded units in pydcs_extensions module 2020-10-22 13:51:24 +02:00
Khopa
dd7b9f1790 Fix faction shorad units loader 2020-10-22 13:50:24 +02:00
Khopa
d6b94345d9 Merge branch 'develop' into faction_refactor 2020-10-22 13:40:14 +02:00
Khopa
aa1ac56ec3 Faction rework, working :) 2020-10-22 13:33:18 +02:00
Dan Albert
fd969020af Add escort tasks for the AI. 2020-10-22 01:29:19 -07:00
Dan Albert
95f486870d Correct AI startup time.
It doesn't look like the AI is subject to much startup time. I see
B-1, F-15, F-16, and M-2000 all start up in about 2 minutes.
2020-10-22 00:46:53 -07:00
C. Perreau
f6d049da3c Merge pull request #232 from VEAF/develop
changes to the export of state.json :
2020-10-22 09:46:10 +02:00
Dan Albert
69f15824ca Fix breakage in package list UI. 2020-10-22 00:45:10 -07:00
Dan Albert
8c70d1ab79 Fix foot to meter conversion.
Somehow this constant was wrong so all of our foot-to-meter
conversions were coming out ~7% too large. We're still introducing
some error because we're rounding early rather than only when we need
an integer, but it's much more accurate now.
2020-10-21 23:58:23 -07:00
Dan Albert
58fd651a0b Confirm exit to avoid losing progress.
Fixes https://github.com/Khopa/dcs_liberation/issues/218
2020-10-21 18:35:14 -07:00
Dan Albert
177b505cb7 Update client slots UI on end turn.
Fixes https://github.com/Khopa/dcs_liberation/issues/222
2020-10-21 17:54:58 -07:00
Dan Albert
8ac5dbe22a Add double- and right-click actions for ATO lists.
Fixes https://github.com/Khopa/dcs_liberation/issues/230
2020-10-21 17:52:21 -07:00
Khopa
b744238fb8 Factions are properly loaded, now need to refactor whole code. 2020-10-22 01:32:33 +02:00
David Pierron
57b7402753 changes to the export of state.json :
- dcsLiberation.installPath does not include "state.json" anymore
- corrected behavior :
  - try LIBERATION_EXPORT_DIR
  - then try dcsLiberation.installPath
  - then try TEMP
  - then try working directory
- corrected multiple bugs in dcs_liberation.lua
- corrected bad string.format causing DCS crashes in
  jtacautolase-config.lua
2020-10-21 23:44:36 +02:00
Khopa
dcaa390d24 Added support for Su-57 mod by Cubanace 2020-10-21 22:21:36 +02:00
Khopa
59010f6949 Added support for Su-57 mod by Cubanace 2020-10-21 21:40:31 +02:00
Khopa
6a91fad10a Merge branch 'develop' into faction_refactor 2020-10-21 19:51:25 +02:00
C. Perreau
f03029417d Merge pull request #229 from VEAF/develop
Removed VEAF submodule
2020-10-21 11:39:18 +02:00
David Pierron
f5aa342602 Removed VEAF submodule 2020-10-21 11:32:39 +02:00
C. Perreau
53582ba539 Merge pull request #228 from VEAF/new-plugin-system
New plugin system
2020-10-20 23:16:19 +02:00
David Pierron
44c976948d bug correction in the JTACautolase LUA config 2020-10-20 23:02:46 +02:00
David Pierron
41d5020467 bug correction - when running a new campaing
without accessing the plugin setup screen
2020-10-20 22:25:39 +02:00
David Pierron
1bd26005f2 Merge remote-tracking branch 'upstream/develop' into new-plugin-system 2020-10-20 22:10:19 +02:00
David Pierron
b1840ce2ca Merge 'upstream/develop' into new-plugin-system 2020-10-20 22:10:08 +02:00
C. Perreau
769246c55d Merge pull request #224 from justin-lovell/feature/remote-hosting-flexibility
Flexible Dedicated Hosting Options for Mission Files
2020-10-20 22:04:37 +02:00
Khopa
24394d4d00 Faction rework wip. 2020-10-20 20:58:39 +02:00
Justin Lovell
cab5825b72 Flexible Dedicated Hosting Options
* Fixed minor errors on the original LUA scripting
* Refactored code to be self-contained to a function
* Changed the search logic to use an environment variable first, then
  fallback into other search options
2020-10-20 21:49:32 +11:00
Dan Albert
84beb2dfe5 Remove dead code. 2020-10-20 00:15:22 -07:00
Dan Albert
f8ac39fb82 Fix min/max inversion in wind setting. 2020-10-20 00:10:37 -07:00
Dan Albert
eb69d01067 Add distance and ground speed to the kneeboard. 2020-10-19 23:25:46 -07:00
Dan Albert
1c4f255c7f Add waypoint departure time to the kneeboard. 2020-10-19 22:44:54 -07:00
Dan Albert
4125f6ec06 Don't scale waypoint info text size when zooming. 2020-10-19 22:26:31 -07:00
Dan Albert
5023e0d30f Fix disabled delete button in package UI.
The selection changed handler isn't called for the initial selection.
2020-10-19 21:34:17 -07:00
Dan Albert
f65595c626 Automatically select newly created packages. 2020-10-19 21:17:24 -07:00
Dan Albert
916d1eec96 Limit flight size to available aircraft. 2020-10-19 20:46:18 -07:00
Dan Albert
c2d615315e Add client slot selection to new flight window. 2020-10-19 20:29:55 -07:00
Dan Albert
aa96ce7134 Fix cancel of new package. 2020-10-19 01:21:49 -07:00
Dan Albert
01f83e8451 Place CAP racetracks more defensively.
Ensure that we're never putting a CAP race track within 20 nmi of an
enemy airfield (aside from the target airfield, if the target is
hostile).
2020-10-19 00:12:36 -07:00
David Pierron
ed92e9afb9 changed the system to make use of JSON files 2020-10-18 18:23:31 +02:00
Dan Albert
064890c0a2 Mark the F-16 as SEAD capable.
Latest OB update has HARMs for the F-16.
2020-10-17 16:47:41 -07:00
Dan Albert
8617f48fc2 Sort air unit purchases properly, and by name.
Previously we were sorting by task first and price second. Much easier
to find things if they're sorted by name (although longer term we
should make the sort option selectable).
2020-10-17 16:46:54 -07:00
Dan Albert
2269cf0f08 Show objective value per turn in the tooltip. 2020-10-17 16:11:28 -07:00
Dan Albert
3d41eb1ab4 Clean up CAP types.
Stop using "CAP". Use BARCAP or TARCAP instead.

TARCAP no longer allowed anywhere but front lines, since that's all we
have mission planning for right now. Later will add TARCAP and BARCAP
for all objective types with different timing profiles.

Part two of the fix for
https://github.com/Khopa/dcs_liberation/issues/210.
2020-10-17 14:32:09 -07:00
Dan Albert
cace523aa8 Avoid crash for custom/empty flight plans.
Fixes https://github.com/Khopa/dcs_liberation/issues/210
2020-10-17 14:10:54 -07:00
Dan Albert
002f55dc04 Update the map from the main window.
This guarantees that we update the map *after* updating the model that
the map uses to draw flight plans. Without this, after creating a new
game we'd redraw the previous game's flight plans because the model
hadn't been updated by the time the map was.

Fixes https://github.com/Khopa/dcs_liberation/issues/212
2020-10-17 13:33:28 -07:00
Dan Albert
49b6951ac3 Generate weather conditions at turn start.
Weather and exact time of day information is helpful during mission
planning, so generate it at the start of the turn rather than at
takeoff time.

Another advantage aside from planning is that we can now use the wind
information to set carrier headings and takeoff runways appropriately.
2020-10-16 18:25:25 -07:00
Dan Albert
7aa17e5ad6 Fix package/flight selection signals.
Qt helpfully converts None to 0 for us, so use -1 instead of None.
2020-10-16 14:12:27 -07:00
Dan Albert
9db41270f3 Add red ATO cheat option, show red flight plans. 2020-10-16 13:43:01 -07:00
Dan Albert
e4852c74ab Remove completed TODOs/dead code. 2020-10-16 13:00:59 -07:00
Dan Albert
613f84aa3c Add aircraft-specific speed estimates. 2020-10-16 03:10:14 -07:00
Dan Albert
2814876976 Fix A-10C II radio data.
These are two different planes.
2020-10-16 03:09:21 -07:00
Dan Albert
69bf3999aa Fix new package double flight delete.
This button was connected twice.
2020-10-16 03:08:48 -07:00
Dan Albert
2fa3b26119 Improve speed estimations.
Reasonable ground speed depends a lot on altitude, so plumb that
information through to the speed estimator.

Also adds calculations for ground speed based on desired mach. I don't
know if DCS is using the same formulas, but we should at least be
pretty close.
2020-10-16 02:11:50 -07:00
Dan Albert
5a027c552e Point players to the kneeboard from the briefing. 2020-10-15 21:43:41 -07:00
Dan Albert
9efecf9514 Fix inventory handling for new packages. 2020-10-15 21:33:04 -07:00
Dan Albert
8b87c43869 Warn the player about misconfigured TOTs. 2020-10-15 21:04:22 -07:00
Dan Albert
f7fec834e6 Add a button to automatically set the package TOT. 2020-10-15 20:23:57 -07:00
Dan Albert
de43a1215c Update departure time when TOT is changed.
Fixes https://github.com/Khopa/dcs_liberation/issues/207
2020-10-15 18:03:03 -07:00
Dan Albert
8dc531bb7f Make the departure time non-editable.
Fixes part 2 of https://github.com/Khopa/dcs_liberation/issues/207.
2020-10-15 17:57:25 -07:00
Khopa
da2584d7ee Updated pydcs version 2020-10-15 20:58:06 +02:00
David Pierron
373924a959 small changes to veaf plugin 2020-10-15 16:21:39 +02:00
Khopa
f75032bd79 Put 2.2.0-preview as version string 2020-10-15 12:17:33 +02:00
Khopa
4203dc5d41 Prepared changelog first draft for version 2.2.0 2020-10-14 23:34:09 +02:00
Khopa
9fe1f8ff90 Now use the new sea map to place boats and offshore buildings. 2020-10-14 23:30:33 +02:00
Khopa
bc825f760d Added sea zones for each map, and display it in polygon map mode. 2020-10-14 23:21:16 +02:00
David Pierron
191199d9de Merge remote-tracking branch 'upstream/develop' into new-plugin-system 2020-10-14 09:01:37 +02:00
Khopa
883a66a792 Fix : Added missing channel.json file 2020-10-13 00:35:27 +02:00
Khopa
411e71b9a2 Added setting to display culling distance 2020-10-12 20:57:32 +02:00
David Pierron
5463505787 added documentation for plugins system 2020-10-12 20:01:27 +02:00
David Pierron
ec6fc076de multiple changes
- load plugins when loading a game
- moved plugins scripts to resources/plugins (for pyinstaller)
- removed vanilla JTAC and JTAC_smoke options and settings GUI
- call JtacAutolasePlugin in armor.py
- made a dictionary of INSTALLED_PLUGINS
- removed NIOD from the VEAF plugin
2020-10-12 19:49:39 +02:00
Khopa
5a245bf362 Fixed crash in polygon display mode for Nevada map. 2020-10-12 18:53:15 +02:00
Khopa
d95912322c Added Polygon drawing mode for map background 2020-10-12 18:48:50 +02:00
Khopa
9c58e73b39 Added more display options for SAMS 2020-10-12 18:12:45 +02:00
David Pierron
3c4ccd7d57 Merge remote-tracking branch 'upstream/develop' into new-plugin-system 2020-10-12 17:29:54 +02:00
David Pierron
d22943d755 added a customizable plugin system
- the base LUA functionality has been implemented as a mandatory plugin
- the jtacautolase functionality has been implemented as a plugin
- added a VEAF framework plugin

The plugins have GUI elements in the Settings window.
2020-10-12 17:27:13 +02:00
Dan Albert
974b6590d8 Estimate TOTs for packages.
We estimate the longest possible time from mission start to TOT for
all flights in a package and use that to set the TOT (plus any delay
used to stagger flights). This both cuts down on loiter time for
shorter flights and ensures that long flights will make it to the
target in time.

This is also used to compute the start time for the AI, so the
explicit delay option is no longer needed.
2020-10-12 01:00:47 -07:00
Dan Albert
d414c00b74 Make waypoint info more readable. 2020-10-10 16:52:59 -07:00
Khopa
7b79d183eb Changelog 2.1.5 did not make it on this branch somehow 2020-10-11 00:48:13 +02:00
Dan Albert
edd56cb407 Fix bad import of THEMES. 2020-10-10 14:11:44 -07:00
Dan Albert
c777204f50 Draw waypoint information on the map. 2020-10-10 14:09:10 -07:00
Dan Albert
55f12f20c1 Fix missing default parameter. 2020-10-10 14:05:25 -07:00
Dan Albert
1ac062653d Make the starting budget text editable. 2020-10-10 13:00:59 -07:00
Dan Albert
b0a176a22c Make "all" the default flight path display option. 2020-10-10 12:43:51 -07:00
Khopa
f4b07cb518 New game wizard : added to slider to choose starting money 2020-10-10 16:21:41 +02:00
Khopa
a0ff78a810 Merge branch 'develop' of https://github.com/khopa/dcs_liberation into develop
 Conflicts:
	qt_ui/widgets/map/QLiberationMap.py
2020-10-10 15:46:23 +02:00
Khopa
f22391855b Fixed SAM threat radius scale, added detection range, changed UI colors for SAMS range. 2020-10-10 15:43:58 +02:00
Dan Albert
1fa18447e1 Show player slots in the overview. 2020-10-09 20:07:54 -07:00
Dan Albert
2d8c8c63c9 Improve flight path display options.
Adds an option show only selected flight, and also changes the show
all option to highlight the selected flight.
2020-10-09 16:49:32 -07:00
Dan Albert
31d5e3151b Refactor display rules. 2020-10-09 14:54:58 -07:00
David Pierron
c77bfe9da2 plugin base : inject mission configuration data 2020-10-09 21:25:21 +02:00
David Pierron
9a7dfc55e3 Merge remote-tracking branch 'upstream/develop' into develop 2020-10-09 21:03:12 +02:00
C. Perreau
63bc3bd46e Merge pull request #193 from DanAlbert/tot
Plan waypoint TOTs.
2020-10-09 13:25:08 +02:00
Dan Albert
b5e5a3b2da Plan waypoint TOTs.
Also fixes the CAP racetracks so the AI actually stays on station.

Waypoint TOT assignment happens at mission generation time for the
sake of the UI. It's a bit messy since we have the late-initialized
field in FlightWaypoint, but on the other hand we don't have to reset
every extant waypoint whenever the player adjusts the mission's TOT.

If we want to clean this up a bit more, we could have two distinct
types for waypoints: one for the planning stage and one with the
resolved TOTs. We already do some thing like this with Flight vs
FlightData.

Future improvements:

* Estimate the group's ground speed so we don't need such wide margins
  of error.
* Delay takeoff to cut loiter fuel cost.
* Plan mission TOT based on the aircraft in the package and their
  travel times to the objective.
* Tune target area time prediction. Flights often don't need to travel
  all the way to the target point, and probably won't be doing it
  slowly, so the current planning causes a lot of extra time spent in
  enemy territory.
* Per-flight TOT offsets from the package to allow a sweep to arrive
  before the rest, etc.
2020-10-09 01:08:34 -07:00
Dan Albert
7abe32be5c Fix name of decent waypoint. 2020-10-09 00:26:57 -07:00
Dan Albert
f0279a6866 Ignore the entire logs directory.
We use a rotating log handler, so we generate more than just the one
file.
2020-10-08 22:49:04 -07:00
Dan Albert
5ce942c9a0 Confirm mission start when no client slots exist.
Especially considering the button in this position used to be how
players added client slots, confirm that they in fact want to launch
an AI-only mission before launching, and guide them toward the new UI.
2020-10-07 17:09:57 -07:00
David Pierron
59d6cc7625 Merge remote-tracking branch 'upstream/develop' into develop 2020-10-07 09:21:41 +02:00
Dan Albert
4abf806837 Fix initial frequencies for support aircraft.
Vaicom (a mod that adds voice control for the communications menus)
isn't able to follow the waypoint frequency change that normally sets
the radio channel for the AWACS/tanker flights. Set the group's
frequency correctly to start so it works.
2020-10-06 23:44:11 -07:00
Dan Albert
6bfb8cf2fd Fix double logging.
Calling logging.basicConfig creates a stream handler for the root
logger, and then we were adding our own with a different formatter.
Pass the format string to basicConfig so we don't need to add our own
duplicate stream handler.
2020-10-06 23:31:40 -07:00
Dan Albert
1d7f1082ea Fix logging by deferring campaign data loading.
Logging before we've made it to the logging setup was causing the root
logger to be permanently configured to the default (warning) log
level, so we weren't getting any info or debug logs any more.

Defer the campaign data load until it is needed rather than doing it
at import time. I've also cleaned up a bit so we only load each
campaign once, rather than re-loading the campaign to create the
theater again after the wizard is finished.
2020-10-06 23:26:18 -07:00
Dan Albert
1c4aec83cb Clean up start-up logging.
Most of this wasn't helpful. What was is now logging instead of print
so it can be configured.
2020-10-06 22:24:47 -07:00
Dan Albert
e537396fec Stagger package start times.
Avoids crowding the taxiways, and adds some life to the end of the
mission.

Later on, this will happen more naturally because we can delay
takeoffs to align with the package's DTOT.
2020-10-06 21:51:23 -07:00
Dan Albert
944748a0ac Don't throw away exception info on save/load.
Makes it much easier to determine what we did that broke save game
compatibility.
2020-10-06 21:50:44 -07:00
Dan Albert
023925d741 Set preferred mission types for aircraft. 2020-10-06 17:30:20 -07:00
Dan Albert
93db1254ec Improve insufficient aircraft message.
Specify only the tasks which were unfulfilled so the player knows what
to buy.
2020-10-06 17:29:42 -07:00
Dan Albert
e0725ff139 Add escort mission planning to the UI. 2020-10-06 17:29:19 -07:00
Dan Albert
9e96aee89f Add default escort loadouts. 2020-10-06 17:29:11 -07:00
Dan Albert
db6b660270 Fix mypy issues in all modules except qt_ui. 2020-10-06 17:24:08 -07:00
Dan Albert
1808e5bccf Add initial mypy.ini. 2020-10-06 17:01:37 -07:00
Dan Albert
5f1601a2da Remove the userdata package. 2020-10-06 17:01:37 -07:00
Khopa
60ce6658ad Campaigns are sorted by terrain in new game wizard 2020-10-07 01:12:16 +02:00
Khopa
e664652cc5 Now properly merged operation.py 2020-10-07 01:07:56 +02:00
Khopa
ca48a42701 Revert "Reverted automerge errors."
This reverts commit 00ea8ac4
2020-10-07 00:59:18 +02:00
Khopa
00ea8ac4e1 Reverted automerge errors. 2020-10-07 00:56:42 +02:00
Khopa
de5238e89a Fixed issue in Normandy small campaign 2020-10-07 00:27:43 +02:00
Khopa
3bb1327a65 Manuall reintroduced inverted campaign config in json campaign files 2020-10-07 00:25:02 +02:00
Khopa
71f77dd8fb Added moddable campaigns through json files. 2020-10-07 00:09:11 +02:00
C. Perreau
9101dae38a Merge pull request #184 from DanAlbert/waypoint-planning
Improve automated mission planning.
2020-10-06 22:04:58 +02:00
C. Perreau
1f18bf2bd8 Merge branch 'develop' into waypoint-planning 2020-10-06 22:01:44 +02:00
C. Perreau
41445c3092 Merge pull request #187 from Khopa/develop_2_1_x
2.1.5
2020-10-05 19:45:30 +02:00
Khopa
2a3bf9821b Fixed EPLRS cherry pick merge. 2020-10-05 19:33:48 +02:00
Khopa
819d775282 EPLRS for 2.1.5 2020-10-05 19:30:43 +02:00
Khopa
efbc6fe3ae Enable EPLRS for ground units that can use it. 2020-10-05 19:29:34 +02:00
Khopa
262ba6c113 Chery picked another fix for this release, so updated changelog 2020-10-05 19:28:55 +02:00
Khopa
c41ecb6735 Fix aircrafts landing point 2020-10-05 19:27:03 +02:00
Khopa
f5c32c6b98 Version 2.1.5 2020-10-05 19:26:07 +02:00
Dan Albert
a1886e37f8 Fix save issues after aborting mission.
When the mission is aborted the pending mission is still in the event
list, which is part of the game option. That event has a reference to
the operation, which in turn contains all the mission generator
objects. Two of these objects are the radio/TACAN allocators, which
use a generator to track the next free channel. Generators cannot be
picked, so because these are transitively part of the game object the
game cannot be saved.

Aside from the briefing generator, none of those objects are
actually needed outside the generation function itself, so just make
them locals instead.

This probably needs a larger refactor at some point. It doesn't look
like we need so many calls into the operation type (it has an
initialize, a prepare, and a generate, and it doesn't seem to need
anything but the last one). The only reason breifinggen needs to
remain a part of the class is because the briefing title and
description are filled in from the derived class, where title and
description should probably be overridden properties instead. I'm also
not sure if we need to make the event list a part of game at all, and
also don't think that the mission needs to be one of these events.
2020-10-05 19:20:57 +02:00
Dan Albert
f040804d02 Fix save issues after aborting mission.
When the mission is aborted the pending mission is still in the event
list, which is part of the game option. That event has a reference to
the operation, which in turn contains all the mission generator
objects. Two of these objects are the radio/TACAN allocators, which
use a generator to track the next free channel. Generators cannot be
picked, so because these are transitively part of the game object the
game cannot be saved.

Aside from the briefing generator, none of those objects are
actually needed outside the generation function itself, so just make
them locals instead.

This probably needs a larger refactor at some point. It doesn't look
like we need so many calls into the operation type (it has an
initialize, a prepare, and a generate, and it doesn't seem to need
anything but the last one). The only reason breifinggen needs to
remain a part of the class is because the briefing title and
description are filled in from the derived class, where title and
description should probably be overridden properties instead. I'm also
not sure if we need to make the event list a part of game at all, and
also don't think that the mission needs to be one of these events.
2020-10-05 02:17:14 -07:00
Khopa
e27625556c Exported existing campaigns to json objects. 2020-10-04 22:09:57 +02:00
Dan Albert
b13711ddef Update the waypoint builder UI.
Changing targets doesn't make sense now that flights belong to a
package. Change all the "generate" dialogs to simply confirm dialogs
to make sure the user is okay with us clobbering the flight plan.
2020-10-04 12:24:31 -07:00
Dan Albert
6ce82be46b Set up split/join points. 2020-10-04 12:24:31 -07:00
Dan Albert
56a5864600 Generate common ingress/egress points.
This still isn't very good because it doesn't work well for anything
but the automatically planned package.

Instead, should be a part of the Package itself, generated the first
time it is needed, and resettable by the user.
2020-10-04 12:24:31 -07:00
Dan Albert
07cbaa3e70 Plan escort flights.
TODO: UI
2020-10-04 12:24:31 -07:00
Dan Albert
2aecea88b0 Orient CAP tracks toward the enemy.
Pointing the race track 90 degrees away from where the enemy is
expected means the radar can't see much. CAP flights normally fly
*toward* the expected direction of contact and alternate approaching
and retreating legs with their wingman.
2020-10-04 12:24:31 -07:00
Dan Albert
582c43fb6c Generate CAP missions in useful locations.
CAP missions should be between the protected location and the nearest
threat. Find the closest enemy airfield and ensure that the CAP race
track is between it and the protected location.
2020-10-04 12:24:26 -07:00
Dan Albert
cc7c2cc707 Refactor flight plan generation. 2020-10-04 12:24:26 -07:00
Dan Albert
8b717c4f4c Replace doctrine dict with a real type. 2020-10-04 12:24:26 -07:00
Dan Albert
aa309af015 Redraw flight plans when they change. 2020-10-04 12:24:26 -07:00
Dan Albert
1e041b6249 Perform coalition-wide mission planning.
Mission planning on a per-control point basis lacked the context it
needed to make good decisions, and the ability to make larger missions
that pulled aircraft from multiple airfields.

The per-CP planners have been replaced in favor of a global planner
per coalition. The planner generates a list of potential missions in
order of priority and then allocates aircraft to the proposed flights
until no missions remain.

Mission planning behavior has changed:

* CAP flights will now only be generated for airfields within a
  predefined threat range of an enemy airfield.
* CAS, SEAD, and strike missions get escorts. Strike missions get a
  SEAD flight.
* CAS, SEAD, and strike missions will not be planned unless
  they have an escort available.
* Missions may originate from multiple airfields.

There's more to do:

* The range limitations imposed on the mission planner should take
  aircraft range limitations into account.
* Air superiority aircraft like the F-15 should be preferred for CAP
  over multi-role aircraft like the F/A-18 since otherwise we run the
  risk of running out of ground attack capable aircraft even though
  there are still unused aircraft.
* Mission priorities may need tuning.
* Target areas could be analyzed for potential threats, allowing
  escort flights to be optional or omitted if there is no threat to
  defend against. For example, late game a SEAD flight for a strike
  mission probably is not necessary.
* SAM threat should be judged by how close the extent of the SAM's
  range is to friendly locations, not the distance to the site itself.
  An SA-10 30 nm away is more threatening than an SA-6 25 nm away.
* Much of the planning behavior should be factored out into the
  coalition's doctrine.

But as-is this is an improvement over the existing behavior, so those
things can be follow ups.

The potential regression in behavior here is that we're no longer
planning multiple cycles of missions. Each objective will get one CAP.
I think this fits better with the turn cycle of the game, as a CAP
flight should be able to remain on station for the duration of the
turn (especially with refueling).

Note that this does break save compatibility as the old planner was a
part of the game object, and since that class is now gone it can't be
unpickled.
2020-10-04 12:24:26 -07:00
Khopa
1f240b02f4 Fix aircrafts landing point 2020-10-04 14:27:13 +02:00
Khopa
6317f376b7 EPLRS typo fixed 2020-10-04 14:11:28 +02:00
Khopa
5ecf9aeed8 EPLRS implemented for base defense unit. 2020-10-03 18:32:11 +02:00
Khopa
db36a76c2c Fixed eplrs for frontline ground units 2020-10-03 17:35:06 +02:00
Khopa
3df8fb5fe9 Merge branch 'develop' into develop_mission_planner 2020-10-03 17:06:07 +02:00
Khopa
5ba2e8a7a1 Fixed error after merge 2020-10-03 16:18:32 +02:00
Khopa
07d4b126f5 Enable EPLRS for ground units that can use it. 2020-10-03 16:18:12 +02:00
C. Perreau
6e14ec3227 Merge pull request #147 from DanAlbert/ato
Replace mission planning UI.
2020-10-02 13:31:45 +02:00
C. Perreau
028292a023 Merge branch 'develop_mission_planner' into ato 2020-10-02 13:26:21 +02:00
David Pierron
a38f2e36a2 Merge remote-tracking branch 'upstream/develop' into develop 2020-10-02 09:25:18 +02:00
David Pierron
5807fbf896 added a 'mkrelease' config for VS.Code 2020-09-30 13:35:09 +02:00
David Pierron
2c1dc6a18d removed useless link.cmd.sample file 2020-09-30 13:34:41 +02:00
Dan Albert
a3c06ce6e0 Limit task type combo box to valid mission types. 2020-09-27 13:44:58 -07:00
Dan Albert
0e1dfb8ccb Implement CAP and CAS for front lines. 2020-09-27 13:44:58 -07:00
Dan Albert
8a4a81a008 Remove unused frontline code. 2020-09-27 13:44:58 -07:00
Dan Albert
ff083942e8 Replace mission planning UI.
Mission planning has been completely redone. Missions are now planned
by right clicking the target area and choosing "New package".

A package can include multiple flights for the same objective. Right
now the automatic flight planner is only fragging single-flight
packages in the same manner that it used to, but that can be improved
now.

The air tasking order (ATO) is now the left bar of the main UI. This
shows every fragged package, and the flights in the selected package.
The info bar that was previously on the left is now a smaller bar at
the bottom of the screen. The old "Mission Planning" button is now
just the "Take Off" button.

The flight plan display no longer shows enemy flight plans. That could
be re-added if needed, probably with a difficulty/cheat option.

Aircraft inventories have been disassociated from the Planner class.
Aircraft inventories are now stored globally in the Game object.

Save games made prior to this update will not be compatible do to the
changes in how aircraft inventories and planned flights are stored.
2020-09-27 13:44:58 -07:00
Dan Albert
0eee5747af Clean up flight path drawing code. 2020-09-24 01:01:26 -07:00
Dan Albert
80f2b7a1db Cleanups in map object UI.
* Fix the context menu
* Remove unnecessary overrides
* Clean up formatting/naming
* Factor out base class for shared behavior
2020-09-24 01:01:26 -07:00
2847 changed files with 170343 additions and 27076 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

2
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,2 @@
# Black
a47bef1f1336fd264d0b175f4421758339a30acb

92
.gitattributes vendored Normal file
View File

@@ -0,0 +1,92 @@
* text=auto
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python
*.pyi text diff=python
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary export-ignore
*.pyo binary export-ignore
*.pyd binary
unshipped_data/arcgis_maps/ filter=lfs diff=lfs merge=lfs -text
# https://github.com/alexkaratarakis/gitattributes/blob/master/Common.gitattributes
# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary
# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text
# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary
# Text files where line endings should be preserved
*.patch -text
#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

93
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
---
name: Bug report
description: >
Use for any bug that happens after campaign generation. If the New Game wizard
failed, use the "New Game wizard failed" template instead.
labels: bug
body:
- type: markdown
attributes:
value: >
Before filing, please search the issue tracker to see if the issue has
already been reported.
- type: dropdown
validations:
required: true
attributes:
label: Affected versions
multiple: true
description: >
Select all DCS Liberation versions in which you have observed this bug.
You do not need to test all of them, but the information is useful if
you have it.
If you do not see your version listed here you are on an old release
that is not supported, and the bug may already be fixed in a newer
release. Check that the bug still exists in a newer release before
filing.
If the bug was found in a development build, select "Development build"
and provide a link to the build in the field below.
options:
- 8.1.0
- Development build
- type: textarea
attributes:
label: Build information
description:
The build information from the Help -> Report an issue window.
- type: textarea
attributes:
label: Description
description: >
Describe the bug. What went wrong? What did you expect to happen
instead? What steps should we take to reproduce the error? If an error
dialog was shown, include the full text.
validations:
required: true
- type: textarea
attributes:
label: Save game and other files (save game required, bugs without saves will be closed)
description: >
Attach any files needed to reproduce the bug here. **A save game is
required.** Even if it seems unnecessary to you, this is required.
Repro steps that are obvious to you might not be obvious to anyone
else, and it is impossible for us to know what default settings or mods
may be impacting behavior without a save game. Bugs filed without a
save game are very often not reproducible, and those waste scarce
developer time. It is **much** easier for you to attach a save game
than it is for us to recreate your save state by guessing at what you
did. As such, bug reports that do not attach a saved game will be
closed without investigation. Attach the `.liberation.zip` file found
in `%USERPROFILE%/Saved Games/DCS/Liberation/Saves`.
Other useful files to include are:
The Liberation log file. The log file is located at `<Liberation install
directory>/logs/liberation.log`. The log often includes data about
non-fatal errors that could be the root cause of the problem.
The `liberation_nextturn.miz` or a track file. This should always be
included for bugs where the mission was generated incorrectly or where
the in-game AI is misbehaving.
The `state.json` file for the most recently completed turn, located at
`<Liberation install directory>/state.json`. This file is essential for
investigating any issues with end-of-turn results processing.
If reporting an issue that occurred during or after flying the mission
in DCS, the DCS log file found in `%USERPROFILE%/Saved Games/DCS/Logs`.
You can attach files to the bug by dragging and dropping the file into
this text box. GitHub will not allow uploads of all file types, so
attach a zip of the files if needed.
validations:
required: true

View File

@@ -0,0 +1,28 @@
---
name: Campaign update submission
about: Submit an update to a campaign you maintain.
title: 'Update for <campaign name>'
labels: campaign-update-submission
assignees: ''
---
This form should only be used for submitted updated miz/json files for campaigns
distributed with Liberation. If you are _requesting_ an update to a campaign, see
https://github.com/dcs-liberation/dcs_liberation/wiki/Campaign-maintenance. If the
campaign has an owner, it will be updated before release. If it does not, you can
volunteer to own it.
If you are not the owner of the campaign listed on
https://github.com/dcs-liberation/dcs_liberation/wiki/Campaign-maintenance, please start
there.
Otherwise, delete everything above the line below and fill out the following form. Note:
GitHub does not accept .miz files. You can either rename the file to .miz.txt or add the
file to a .zip file.
---
* Campaign name:
* Files:
* Update summary (optional):

19
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
blank_issues_enabled: false
contact_links:
- name: FAQ
url: https://discord.gg/PXHA6AXw
about: Check to see if your issue is in the FAQ.
- name: Manual
url: https://github.com/dcs-liberation/dcs_liberation/wiki/
- name: Feature blocking DCS AI bugs
url: https://github.com/dcs-liberation/dcs_liberation#dcs-bugs
about: >
A list of known DCS bugs that prevent us from improving AI behavior. Check
the list before filing AI bugs here to see if it's something we know about
but cannot fix.
- name: DCS bugs
url: https://forums.eagle.ru/forum/119-dcs-world-27/
about: >
DCS bugs should be reported against DCS, not here. Occasionally we can add
workarounds for DCS bugs. Use the "Bug report" template if you can suggest
a workaround.

View File

@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
Before filing, please search the issue tracker to see if this feature has already been requested.
If requesting a DCS AI feature, check If reporting a DCS AI bug, check https://github.com/dcs-liberation/dcs_liberation#dcs-bugs.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.

12
.github/ISSUE_TEMPLATE/mod_support.md vendored Normal file
View File

@@ -0,0 +1,12 @@
---
name: Mod support request
about: Request Liberation support for new mods, or updates to existing mods
title: Add/update <mod name>
labels: mod support
assignees: ''
---
* Mod name:
* Mod URL:
* Update or new mod?

113
.github/ISSUE_TEMPLATE/new-game-bug.yml vendored Normal file
View File

@@ -0,0 +1,113 @@
---
name: New Game wizard failed
description: >
Use for bugs that prevent the "New Game" wizard from completing successfully.
If the wizard completes without issue, use the normal bug report template.
labels: bug
body:
- type: markdown
attributes:
value: >
Before filing, please search the issue tracker to see if the issue has
already been reported.
If the bug is not related to campaign generation (the campaign was
created successfully and as expected), use the normal bug report
template instead, as this template will not include the information we
need. We are unable to investigate incomplete bug reports, so they will
be closed and you will be asked to refile. If you're unsure, use your
best guess. Needing to refile is not the end of the world :)
- type: dropdown
validations:
required: true
attributes:
label: Affected versions
multiple: true
description: >
Select all DCS Liberation versions in which you have observed this bug.
You do not need to test all of them, but the information is useful if
you have it.
If you do not see your version listed here you are on an old release
that is not supported, and the bug may already be fixed in a newer
release. Check that the bug still exists in a newer release before
filing.
If the bug was found in a development build, select "Development build"
and provide a link to the build in the field below.
options:
- 8.1.0
- Development build
- type: textarea
attributes:
label: Build information
description:
The build information from the Help -> Report an issue window.
- type: input
attributes:
label: Campaign name
description: >
The name of the campaign you selected. If the bug only occurs with a
custom campaign (or modifications to a stock campaign), upload the
campaign file as an attachment to the bug description field.
validations:
required: true
- type: input
attributes:
label: Blue faction
description: >
The name of the blue faction you selected. If the bug only occurs with a
custom faction (or modifications to a stock faction), upload the faction
file as an attachment to the bug description field.
validations:
required: true
- type: input
attributes:
label: Red faction
description: >
The name of the red faction you selected. If the bug only occurs with a
custom faction (or modifications to a stock faction), upload the faction
file as an attachment to the bug description field.
validations:
required: true
- type: textarea
attributes:
label: Modifications to default settings
description: >
Describe any modifications you made to the default campaign generation
settings.
- type: textarea
attributes:
label: Description
description: >
Describe the bug. What went wrong? If an error dialog was shown, include
the full text.
Attach any relevant files such as custom campaign files or factions
here. You can attach files to the bug by dragging and dropping the file
into this text box. GitHub will not allow uploads of all file types, so
attach a zip of the files if needed.
If possible, also include the save game. If the bug prevented the game
from being generated at all this will not be possible, but if the bug is
that the wizard generated something incorrectly, the save game will help
us see what went wrong.
validations:
required: true
- type: textarea
attributes:
label: Log file
description: >
Attach the Liberation log file. The log file is located at `<Liberation
install directory>/logs/liberation.log`.
You can attach files to the bug by dragging and dropping the file into
this text box.
validations:
required: true

22
.github/actions/build-app/action.yaml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build Liberation package
description: Assembles the full Liberation application.
runs:
using: composite
steps:
- name: Build client
shell: powershell
run: |
cd client
npm run build
- name: Build binaries
shell: powershell
run: |
./venv/scripts/activate
$env:PYTHONPATH=".;./pydcs"
pyinstaller pyinstaller.spec
- name: Install changelog
shell: powershell
run: |
Copy-Item .\changelog.md .\dist

16
.github/actions/mypy/action.yaml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: mypy
description: Type checks Python code.
runs:
using: composite
steps:
- name: mypy game
shell: powershell
run: |
./venv/scripts/activate
mypy game
- name: mypy tests
shell: powershell
run: |
./venv/scripts/activate
mypy tests

View File

@@ -0,0 +1,17 @@
name: Liberation JS set-up
description: Sets up the Liberation Javascript environment.
runs:
using: composite
steps:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16"
cache: npm
cache-dependency-path: client/package-lock.json
- name: npm ci
shell: powershell
run: |
cd client
npm ci

View File

@@ -0,0 +1,21 @@
name: Liberation Python set-up
description: Sets up the Liberation Python environment.
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
cache: pip
- name: Install environment
shell: powershell
run: |
python -m venv ./venv
- name: Install dependencies
shell: powershell
run: |
./venv/scripts/activate
python -m pip install -r requirements.txt

24
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,24 @@
Pull requests should be made against the `develop` branch. Any backports
necessary will be handled by the development team.
Pull requests should be focused on one task. Multiple bug fixes should be
multiple PRs. We cannot merge half a PR, and combined PRs are much more
difficult to review. PRs that do not adhere to this will have their review
delayed.
Prefer rebase to merge, and squash commits as needed to preserve a readable
commit history. This project maintains linear history in the develop branch, so
we will either rebase or squash your PR when merging. It is much easier for us
if your branch already has a readable commit history (ensure that your commit
subject lines are clear enough to identify the patch in the git log). An
exception to this is made for large PRs that are likely to require multiple
rounds of review; in that case it's easier if you **don't** do this (GitHub
does not preserve the history of old commits, so we cannot filter a PR for only
new changes if a branch is force pushed) and we will squash it when merging.
New features and bug fixes are usually worth mentioning in the changelog.
Exceptions are fixes for bugs that never shipped (were only present in a canary
build), and changes with no intended user observable behavior, such as a
refactor. If you're comfortable writing the note yourself, add it to
`changelog.md` in the root of the project in the section for the upcoming
release.

View File

@@ -3,37 +3,39 @@ name: Build
on: [push, pull_request]
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up Python environment
uses: ./.github/actions/setup-liberation-python
- name: Install environment
run: |
py -m venv ./venv
- name: Set up JS environment
uses: ./.github/actions/setup-liberation-js
- name: Install dependencies
run: |
./venv/scripts/activate
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
- name: Set build number
run: |
[IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
[IO.File]::WriteAllLines($pwd.path + "\resources\gitsha", $env:GITHUB_SHA)
- name: Build binaries
run: |
./venv/scripts/activate
$env:PYTHONPATH=".;./pydcs"
pyinstaller pyinstaller.spec
- name: Build app
uses: ./.github/actions/build-app
- uses: actions/upload-artifact@v2
with:
name: dcs_liberation
path: dist/
- name: Create archive
run:
Compress-Archive -Path .\dist\dcs_liberation\ -DestinationPath
dist\dcs_liberation.zip
- uses: actions/upload-artifact@v2
with:
name: dcs_liberation
path: dist/dcs_liberation.zip

30
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Python lint
on: workflow_call
jobs:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
version: ~=22.12
src: "."
options: "--check"
mypy:
name: Type checking
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python environment
uses: ./.github/actions/setup-liberation-python
- name: mypy
uses: ./.github/actions/mypy

View File

@@ -2,106 +2,83 @@ name: Release Pipeline
on:
push:
tags: [ '*' ]
tags: ["*"]
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up Python environment
uses: ./.github/actions/setup-liberation-python
- name: Install environment
run: |
py -m venv ./venv
- name: Set up JS environment
uses: ./.github/actions/setup-liberation-js
- name: Install dependencies
run: |
./venv/scripts/activate
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
- name: Finalize build
run: |
New-Item -ItemType file resources\final
- name: Build binaries
run: |
./venv/scripts/activate
$env:PYTHONPATH=".;./pydcs"
pyinstaller pyinstaller.spec
- name: Build app
uses: ./.github/actions/build-app
with:
release: true
- name: Create Installer
env:
TAG_NAME: ${{ github.ref }}
run: |
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
(Get-Content .\installer\dcs_liberation.iss) -replace "{{version}}",$version | Out-File .\build\installer.iss
cd .\installer
iscc.exe ..\build\installer.iss
cd ..
Copy-Item .\changelog.md .\dist
- uses: actions/upload-artifact@v2
with:
name: dcs_liberation
path: dist/
- uses: actions/upload-artifact@v2
with:
name: dcs_liberation
path: dist/
release:
needs: [ build ]
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v2
with:
name: dcs_liberation
- uses: actions/download-artifact@v2
with:
name: dcs_liberation
- name: "Get Version"
id: version
env:
TAG_NAME: ${{ github.ref }}
run: |
Get-ChildItem -Recurse -Depth 1
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
$prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower()
Write-Host $version
Write-Host $prerelease
Write-Output "::set-output name=number::$version"
Write-Output "::set-output name=prerelease::$prerelease"
$changelog = Get-Content .\changelog.md
$last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2
($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md
Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: releasenotes.md
draft: false
prerelease: ${{ steps.version.outputs.prerelease }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dcs_liberation.exe
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.exe
asset_content_type: application/exe
- name: "Get Version"
id: version
env:
TAG_NAME: ${{ github.ref }}
run: |
Get-ChildItem -Recurse -Depth 1
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
$prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower()
Write-Host $version
Write-Host $prerelease
Write-Output "::set-output name=number::$version"
Write-Output "::set-output name=prerelease::$prerelease"
$changelog = Get-Content .\changelog.md
$last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2
($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md
Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_content_type: application/zip
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: releasenotes.md
draft: false
prerelease: ${{ steps.version.outputs.prerelease }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip
asset_content_type: application/zip

38
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Tests
on: workflow_call
jobs:
python-tests:
name: Python tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python environment
uses: ./.github/actions/setup-liberation-python
- name: run tests
run: |
./venv/scripts/activate
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@v2
- 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

18
.gitignore vendored
View File

@@ -1,24 +1,26 @@
*.pyc
__pycache__
build/**
# Sphinx
docs/_build
resources/payloads/*.lua
venv
logs.txt
.DS_Store
.vscode/settings.json
dist/**
a.py
resources/tools/a.miz
tests/**
/.coverage
/coverage.xml
# User-specific stuff
.idea/
.env
env/
/kneeboards
/liberation_preferences.json
/state.json
/serverconfig.env
logs/liberation.log
qt_ui/logs/liberation.log
/logs/
/resources/logging.yaml
*.psd
resources/scripts/plugins/*

4
.gitmodules vendored
View File

@@ -1,4 +0,0 @@
[submodule "pydcs"]
path = pydcs
url = https://github.com/pydcs/dcs
branch = master

6
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.12.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

39
.vscode/launch.json vendored
View File

@@ -15,6 +15,32 @@
},
"preLaunchTask": "Prepare Environment"
},
{
"name": "Python: Debug",
"type": "python",
"request": "launch",
"program": "qt_ui\\main.py",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": ".;./pydcs",
"CORS_ALLOW_DEBUG_SERVER": "true"
},
"args": ["--dev"],
"preLaunchTask": "Prepare Environment"
},
{
"name": "Node: Development Server",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}\\client",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run", "start"
],
"env": {
"BROWSER": "none"
},
},
{
"name": "Python: Make Release",
"type": "python",
@@ -25,6 +51,17 @@
"PYTHONPATH": ".;./pydcs"
},
"preLaunchTask": "Prepare Environment"
}
},
{
"name": "Fix Layout orientation",
"type": "python",
"request": "launch",
"program": "resources\\tools\\fix_layout_orientation.py",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": ".;./pydcs"
},
"args": ["resources/layouts/anti_air/S-300_Site.miz"]
},
]
}

View File

@@ -1,4 +0,0 @@
{
"python.pythonPath": "g:\\python\\dcs_liberation\\venv\\Scripts\\python.exe",
"vsintellicode.python.completionsEnabled": true
}

76
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at khopa.studio@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

26
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,26 @@
First, note that we have a code of conduct, please follow it in all your interactions with the project.
## Contributing as a non-developer
* Report bugs by opening issues here on Github.
* Help others users on Discord by answering their questions.
* Raise awareness about the project, by making a video and/or a tutorial.
Should you report a bug, please use the search bar at the top of the page to see if it has already been reported.
Note that you may need to remove the filter for open bugs if it's something we've recently fixed.
## 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 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.
## Develop new features
If you want to develop a new feature, we recommend you first open an issue describing the new feature and discuss it with us on Discord before starting development.
However, feel free to work on any existing issue.
## Pull requests
Please submit your pull requests on the **develop** branch. We expect a description of its content, and when applicable, a reference to the issue(s) it is resolving.

165
LICENSE Normal file
View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1,29 +1,54 @@
![Logo](https://i.imgur.com/c2k18E1.png)
[![Logo](https://i.imgur.com/HJBT4BL.png)](https://shdwp.github.io/ukraine/)
(Github Readme Banner and Splash screen Artwork by Andriy Dankovych, CC BY-SA 4.0)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?logo=paypal)](https://www.paypal.com/paypalme/KhopaDCSL)
[![Patreon](https://img.shields.io/badge/patreon-become%20a%20patron-orange?logo=patreon)](https://patreon.com/khopa)
[![Download](https://img.shields.io/github/downloads/khopa/dcs_liberation/total?label=Download)](https://github.com/Khopa/dcs_liberation/releases)
[![Download](https://img.shields.io/github/downloads/dcs-liberation/dcs_liberation/total?label=Download)](https://github.com/dcs-liberation/dcs_liberation/releases)
[![Discord](https://img.shields.io/discord/595702951800995872?label=Discord&logo=discord)](https://discord.gg/bKrtrkJ)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/khopa/dcs_liberation)](https://github.com/Khopa/dcs_liberation)
[![GitHub issues](https://img.shields.io/github/issues/khopa/dcs_liberation)](https://github.com/Khopa/dcs_liberation/issues)
![GitHub stars](https://img.shields.io/github/stars/khopa/dcs_liberation?style=social)
[![codecov](https://codecov.io/gh/dcs-liberation/dcs_liberation/branch/develop/graph/badge.svg?token=EEQ7G76K2L)](https://codecov.io/gh/dcs-liberation/dcs_liberation)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/dcs-liberation/dcs_liberation)](https://github.com/dcs-liberation/dcs_liberation)
[![GitHub issues](https://img.shields.io/github/issues/dcs-liberation/dcs_liberation)](https://github.com/dcs-liberation/dcs_liberation/issues)
![GitHub stars](https://img.shields.io/github/stars/dcs-liberation/dcs_liberation?style=social)
## About DCS Liberation
DCS Liberation is a [DCS World](https://www.digitalcombatsimulator.com/en/products/world/) turn based single-player semi dynamic campaign.
It is an external program that generates full and complex DCS missions and manage a persistent combat environment.
DCS Liberation 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.
![Logo](https://imgur.com/B6tvlBJ.png)
**Note that DCS Liberation does not support the stable release of DCS. We can
only guarantee compatibility with either the open beta or the stable release,
and more people play the open beta. DCS stable _might_ work sometimes, but it's
untested, and we will be unable to fix any bugs unique to stable DCS.**
![Screenshot](https://user-images.githubusercontent.com/315852/120939254-0b4a9f80-c6cc-11eb-82f5-ce3f8d714bfe.png)
## Downloads
Latest release is available here : https://github.com/Khopa/dcs_liberation/releases
Latest release is available here : https://github.com/dcs-liberation/dcs_liberation/releases
To download preview builds of the next version of DCS Liberation, see https://github.com/dcs-liberation/dcs_liberation/wiki/Preview-builds.
## DCS bugs
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/)
## Bugs and feature requests
If you need to report a bug or want to suggest a new feature, you can do this on our [bug tracker](https://github.com/dcs-liberation/dcs_liberation/issues). In either case, please use the search bar at the top of the page to see if it has already been reported. Note that you may need to remove the filter for open bugs if it's something we've recently fixed.
## Roadmap
Our plans for future releases can be found on our [Projects page](https://github.com/dcs-liberation/dcs_liberation/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-liberation/dcs_liberation/wiki/Preview-builds) for that release. Items in the To do column are planned to be added to that release.
## Resources
Tutorials, contributors and developer's guides are available in the project's [Wiki](https://github.com/Khopa/dcs_liberation/wiki/)
Tutorials, contributors and developer's guides are available in the project's [Wiki](https://github.com/dcs-liberation/dcs_liberation/wiki/)
## Special Thanks
@@ -31,6 +56,10 @@ First, a big thanks to shdwp, for starting the original DCS Liberation project.
Then, DCS Liberation uses [pydcs](http://github.com/pydcs/dcs) for mission generation, and nothing would be possible without this.
It also uses the popular [Mist](https://github.com/mrSkortch/MissionScriptingTools) lua framework for mission scripting.
And for the JTAC feature, DCS Liberation embed Ciribob's JTAC Autolase [script](https://github.com/ciribob/DCS-JTACAutoLaze).
Excellent lua scripts DCS Liberation uses as plugins:
* For the JTAC feature, DCS Liberation 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.
Please also show some support to these projects !

View File

@@ -1,9 +1,846 @@
# 9.0.0
Saves from 8.x are not compatible with 9.0.0.
## Features/Improvements
* **[Engine]** Support for DCS Open Beta 2.9.0.46801.
* **[Campaign]** Added ferry only control points, which offer campaign designers a way to add squadrons that can be brought in after additional airfields are captured.
* **[Campaign]** The new squadron rules (size limits, beginning the campaign at full strength) are now the default and required. The old style of unlimited squadron sizes and starting with zero aircraft has been removed.
* **[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+.
* **[Mission Generation]** Added a package kneeboard page that shows the radio frequencies, tasks, and laser codes for each member of your package.
* **[Mission Generation]** Added option to generate AI flights with unlimited fuel (enabled by default).
* **[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.
* **[Modding]** Updated Community A-4E-C mod version support to 2.2.0 release.
* **[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.
* **[Loadouts]** Fixed error when loading certain DCS loadouts which contained an empty pylon (notably the Mosquito).
* **[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 Recovery Tanker mission type intermittently failing due to not being able to find the CVN.
* **[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.
* **[Mission Generation]** Fixed flights not being selectable in the mission editor if fast-forward was used and they were generated at a waypoint that had a fixed TOT (such as a BARCAP that was on-station).
* **[Mission Generation]** Fixed error when planning TARCAPs on the sole remaining enemy airfield.
* **[Mission Generation]** Fixed allocation range for carrier Link 4 datalink.
* **[Modding]** Unit variants can now actually override base unit type properties.
* **[New Game Wizard]** Factions are reset to default after clicking "Back" to Theater Configuration screen.
* **[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]** In unit transfer dialog, only list control points that are reachable from the control point units are being transferred from.
* **[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]** Fixed odd spacing of the finance window when there were not enough items to fill the page.
* **[UI]** Fixed regression where waypoint altitude changes in the waypoint list screen are applied to the wrong waypoint.
* **[UI]** Fixed regression where waypoint additions in custom flight plans are not reflected until the window is reloaded.
# 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
* **[Engine]** Support for Normandy 2 airfields.
* **[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 Generation]** Added settings for controlling number of tactical commander, observer, JTAC, and game master slots.
* **[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.
* **[New Game Wizard]** The air wing configuration dialog will check for and reject overfull airbases before continuing when the new squadron rules are used.
* **[New Game Wizard]** Closing the air wing configuration dialog will now cancel and return to the new game wizard rather than reverting changes and continuing.
* **[New Game Wizard]** A warning will be displayed next to the new squadron rules button if the campaign predates the new rules and will likely require user intervention before continuing.
* **[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.
## Features/Improvements
* **[Engine]** Support for DCS 2.8.5.40170.
* **[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]** 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.
* **[Mission Generation]** Game state will automatically be checkpointed before fast-forwarding the mission, and restored on mission abort. This means that it's now possible to abort a mission and make changes without needing to manually re-load your game.
* **[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]** Added support for AI C-47 mod.
* **[Modding]** Custom factions can now be defined in YAML as well as JSON. JSON support may be removed in the future if having both formats causes confusion.
* **[Modding]** Campaigns which require custom factions can now define those factions directly in the campaign YAML. See Operation Aliied Sword for an example.
* **[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]** 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]** 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.
* **[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
* **[Data]** Fixed unit ID for the KS-19 AAA. KS-19 would not previously generate correctly in missions. A new game is required for this fix to take effect.
* **[Flight Planning]** Automatic flight planning will no longer accidentally plan a recovery tanker instead of a theater refueling package. This fixes a potential crash during mission generation when opfor plans a refueling task at a sunk carrier. You'll need to skip the current turn to force opfor to replan their flights to get the fix.
* **[Mission Generation]** Using heliports (airports without any runways) will no longer cause mission generation to fail.
* **[Mission Generation]** Prevent helicopters from spawning into collisions at FARPs when more than one flight uses the same FARP.
# 6.1.0
Saves from 6.0.0 are compatible with 6.1.0
## Features/Improvements
* **[Engine]** Support for DCS 2.8.1.34437, including Blackshark 3.
* **[Factions]** Defaulted bluefor modern to use Georgian and Ukrainian liveries for Russian aircraft.
* **[Factions]** Added Peru.
* **[Flight Planning]** AEW&C and Refueling flights are now plannable on LHA carriers.
* **[Flight Planning]** Refueling flights planned on aircraft carriers will act as a recovery tanker for the carrier.
* **[Loadouts]** Adjusted F-15E loadouts.
* **[Mission Generation]** The previous turn will now be saved as last_turn.liberation when submitting mission results. This is often essential for debugging bug reports. **Include this file in the bug report whenever it is available.**
* **[Modding]** Added support for the HMS Ariadne, Achilles, and Castle class.
* **[Modding]** Added HMS Invincible to the game data as a helicopter carrier.
## Fixes
* **[Flight Planning]** Fixes CAS flights not having landing waypoints.
* **[Mission Generation]** Airbase and FOB capture is no longer blocked by grounded aircraft / helicopters.
* **[Squadrons]** Fixed the livery for the VF-33 F-14A squadron.
* **[Theaters]** Fixed Channel campaigns not having data for land/sea/obstacle boundaries, causing front lines to extend into forests and water. Requires a new campaign to get the fix.
* **[UI]** Fixed an issue where manual submit of mission results did not end the mission correctly.
# 6.0.0
Saves from 5.x are not compatible with 6.0.
## Features/Improvements
* **[Engine]** Support for DCS 2.8.0.33006.
* **[Factions]** Updated the Faction file structure. Older custom faction files will not work correctly and have to be updated to the new structure.
* **[Flight Planning]** Added preset formations for different flight types at hold, join, ingress, and split waypoints. Air to Air flights will tend toward line-abreast and spread-four formations. Air to ground flights will tend towards trail formation.
* **[Flight Planning]** Added the ability to plan tankers for recovery on package flights. This mission type will not be planned automatically.
* **[Flight Planning]** Air to Ground flights now have ECM enabled on lock at the join point, and SEAD/DEAD also have ECM enabled on detection and lock at ingress.
* **[Flight Planning]** AWACS flightplan changed from orbit to a racetrack to reduce data link disconnects which were caused by blind spots as a result of the bank angle.
* **[Flight Planning]** Added a new helo mission type: AirAssault which can be used to load and transport infantry troops from a pickup zone or a carrier to an enemy CP to capture it.
* **[Flight Planning]** Improved the Airlift mission type so that it now can be enforced within the unit transfer dialog and implemented CTLD support. This allows user to spawn sling loadable crates at the pickup location and fly transport flights.
* **[Mission Generation]** Added an option to fast-forward mission generation until the point of first contact (WIP).
* **[Mission Generation]** Added performance option to not cull IADS when culling would affect how mission is played at target area.
* **[Mission Generation]** Reworked the ground object generation which now uses a new layout system
* **[Mission Generation]** Added information about the modulation (AM/FM) of the assigned frequencies to the kneeboard and assign AM modulation instead of FM for JTAC.
* **[Mission Generation]** Added ice halos.
* **[Mission Generation]** Adjusted wind speeds. Wind speeds at high altitude are generally higher now.
* **[Mission Generation]** Added turbulence. Higher in Summer and Winter, also higher at day time than at nighttime.
* **[Modding]** Updated UH-60L mod version support to 1.3.1
* **[Modding]** Updated the High Digit SAMs implementation and added the HQ-2 as well as the upgraded SA-2 and SA-3 Launchers from the mod. Threat range circles will now also be displayed correctly.
* **[Modding]** Theater information such as climate properties is now moddable.
* **[Modding]** Allow campaign designers to define default values for the economy settings (starting budget and multiplier).
* **[Modding]** Campaigns can now optionally define their start time by including a time in the `recommended_start_date` field. There is not currently a way to override the start time in the UI.
* **[Plugins]** Allow full support of the SkynetIADS plugin with all advanced features (connection nodes, power sources, command centers) if campaign supports it.
* **[Plugins]** Added support for the CTLD script by ciribob with many possible customization options and updated the JTAC Autolase to the CTLD included script.
* **[UI]** Added options to the loadout editor for setting properties such as HMD choice.
* **[UI]** Added separate images for the different carrier types.
* **[UI]** Add Accept/Reset buttons to Air Wing Configurator screen.
## Fixes
* **[Engine]** Fixed issue that prevented some weapon types like torpedoes from being recognized.
* **[Flight Planning]** Fixed a miscalculation of waypoint TOTs that would require time travel.
* **[Loadouts]** Improved the range of the F-16 CAS loadout by adding bags.
* **[Mission Generation]** AAA ground units now spawn correctly at the frontline
* **[Mission Generation]** Fixed SA-13 incorrectly created as SA-8 Loading Unit which will not be spawned in the generated mission.
* **[Mission Generation]** Fixed adding additional mission types for a squadron causing error messages when the mission type is not supported by the aircraft type by default
* **[Mission Generation]** Fixed an issue where SEAD/DEAD/BAI flights fired all missiles / bombs against a single unit in a group instead of targeting the whole group.
* **[Mission Generation]** Fixed an issue which generated the helipads at FARPs incorrectly and placed the helicopters within each other.
* **[Mission Generation]** Fixed an issue with SEAD missions flown by the AI when using the Skynet Plugin and anti-radiation missiles (ARM). The AI now correctly engages the SAM when it comes alive instead of diving into it.
* **[Mission Generation]** Fixed generation issue that would cause AI helicopters to get stuck after taking off from a FARP.
* **[Mission Generation]** Fixed mission scripting error caused by control points with apostrophes in their names, such as Tha'lah.
* **[Modding]** Campaigns that used quad zones for scenery targets will no longer load. Only circular zones were ever supported, but an implementation quirk allowed them to load in a way that would misbehave. A "No white triggerzones found" message during campaign generation is the sign of a broken campaign.
* **[Modding]** Loadouts with invalid weapons (typically new DCS weapons not yet available in Liberation) will be ignored rather than causing an error.
* **[Squadrons]** Fixed issue in air wing configuration that would allow squadrons to be created with no home base if no base was available.
* **[Squadrons]** Helicopter squadrons can no longer be assigned to FOBs that are not FARPs.
* **[UI]** Add vanilla theme weather and time of day icons
* **[UI]** Disable player slots for non-flyable aircraft.
* **[UI]** Fixed and issue where the liberation main exe was still running after application close.
# 5.2.1
## Fixes
* **[Mission Generation]** Work around DCS 2.8 bug preventing the AI from leaving their hold point.
# 5.2.0
Saves from 5.1.0 are compatible with 5.2.0
## Features/Improvements
* **[Engine]** Support for DCS 2.7.11.21408, including the new Apache AH-64D and the Syria map extension
* **[Mission Generation]** Improved FARP Helipad handling and creation (now includes windsocks)
* **[Modding]** Add UH-60L mod support
* **[Modding]** Updated Community A-4E-C mod version support to 2.0.0 release. Version 1.4.2 is no longer compatible, unless the mod default loadouts are deleted/modified.
* **[Modding]** Updated JAS-39-C mod support for v1.8.0-beta
* **[Campaign]** Peace Spring, Vectron's Claw, Vegas Nerve, Scenic Route 2 campaign update
* **[Campaign]** Added Tripoint Hostility campaign by Fuzzle
* **[Campaign]** Add 3 new campaigns from Sith1144
## Fixes
* **[Mission Generation]** Fixed incorrect SA-5 and NASAMS threat range when TR destroyed. It will not count as threat anymore when the TR is dead.
* **[Mission Generation]** Fixed "Max Threat Range" error
* **[Mission Generation]** Fix unculled zones not updating when needed
* **[Mission Planner]** Now allows squadron transfers to control points where the number of free slots matches exactly the expected size of the transferring squadron next turn.
* **[Data]** Removed Fw 190 A-8 and D-9 from Germany 1940 and 1942 faction list for historical accuracy.
* **[Data]** Updated Loadouts for Tornado GR4, F-15E and F-16C
* **[Data]** Corrected some unit data
* **[UI]** Fixed various UI issues (for example Scaling and HighDPI)
* **[UI]** Typhoon GR4 and IDS images
# 5.1.0
Saves from 5.0.0 are compatible with 5.1.0
## Features/Improvements
* **[Engine]** Support for DCS 2.7.9.17830 and newer, including the HTS and ECM pod.
* **[Campaign]** Add option to manually add and remove squadrons and different aircraft type in the new game wizard / air wing configuration dialog.
* **[Mission Generation]** Add Option to enforce the Easy Communication setting for the mission
* **[Mission Generation]** Add Option to select between only night missions, day missions or any time (default).
* **[Modding]** Add F-104 mod support
## Fixes
* **[Campaign]** Fixed some minor issues in campaigns which generated error messages in the log.
* **[Campaign]** Changed the way how map object / scenery kills where tracked. This fixes issues with kill recognition after map updates from ED which change the object ids and therefore prevent correct kill recognition.
* **[Mission Generation]** Fixed incorrect radio specification for the AN/ARC-222.
* **[Mission Generation]** Fixed mission scripting error when using a dedicated server.
* **[Mission Generation]** Fixed an issue where empty convoys lead to an index error when a point capture made a pending transfer of units not completable anymore.
* **[Mission Generation]** Corrected Viggen FR22 & FR24 preset channels for the DCS 2.7.9 update
* **[Mission Generation]** Fixed the SA-5 Generator to use the P-19 FlatFace SR as a Fallback radar if the faction does not have access to the TinShield SR.
* **[UI]** Enable / Disable the settings, save and stats actions if no game is loaded to prevent an error as these functions can only be used on a valid game.
* **[UI]** Added missing icons for Tornado GR4, and Tornado IDS.
# 5.0.0
Saves from 4.x are not compatible with 5.0.
## Features/Improvements
* **[Campaign]** Weather! Theaters now experience weather that is more realistic for the region and its current season. For example, Persian Gulf will have very hot, sunny summers and Marianas will experience lots of rain during fall. These changes affect pressure, temperature, clouds and precipitation. Additionally, temperature will drop during the night, by an amount that is somewhat realistic for the region.
* **[Campaign]** Weapon data such as fallbacks and introduction years is now moddable. Due to the new architecture to support this, the old data was not automatically migrated.
* **[Campaign]** Era-restricted loadouts will now skip LGBs when no TGP is available in the loadout. This only applies to default loadouts; buddy-lasing can be coordinated with custom loadouts.
* **[Campaign]** FOBs control point can have FARP/helipad slot and host helicopters. To enable this feature on a FOB, add "Invisible FARP" statics objects near the FOB location in the campaign definition file.
* **[Campaign]** Squadrons now have a home base and will not operate out of other bases. See https://github.com/dcs-liberation/dcs_liberation/issues/1145 for status.
* **[Campaign]** Aircraft now belong to squadrons rather than bases to support squadron location transfers.
* **[Campaign]** Skipped turns are no longer counted as defeats on front lines.
* **[Campaign AI]** Overhauled campaign AI target prioritization.
* **[Campaign AI]** Player front line stances can now be automated. Improved stance selection for AI.
* **[Campaign AI]** Reworked layout of hold, join, split, and ingress points. Should result in much shorter flight plans in general while still maintaining safe join/split/hold points.
* **[Campaign AI]** Auto-planning mission range limits are now specified per-aircraft. On average this means that longer range missions will now be plannable. The limit only accounts for the direct distance to the target, not the path taken.
* **[Campaign AI]** Transport aircraft will now be bought only if necessary at control points which can produce ground units and are capable to operate transport aircraft.
* **[Campaign AI]** Aircraft will now only be automatically purchased or assigned at appropriate bases. Naval aircraft will default to only operating from carriers, Harriers will default to LHAs and shore bases, helicopters will operate from anywhere. This can be customized per-squadron.
* **[Engine]** Support for DCS 2.7.7.14727 and newer, including support for F-16 CBU-105s, SA-5s, and the Forrestal.
* **[Kneeboard]** Minimum required fuel estimates have been added to the kneeboard for aircraft with supporting data (currently only the Hornet and Viper).
* **[Kneeboard]** QNH (pressure MSL) and temperature have been added to the kneeboard.
* **[Mission Generation]** EWRs are now also headed towards the center of the conflict
* **[Mission Generation]** FACs can now use FC3 compatible laser codes. Note that this setting is global, not per FAC.
* **[Modding]** Can now install custom campaigns to <DCS saved games>/Liberation/Campaigns instead of the Liberation install directory.
* **[Modding]** Campaigns can now define a default start date.
* **[Modding]** Campaigns now specify the squadrons that are present in the campaign, their roles, and their starting bases. Players can customize this at game start but the campaign will choose the defaults.
* **[New Game Wizard]** Can now customize the player's air wing before campaign start to disable, relocate, or rename squadrons.
* **[Plugins]** Updated SkynetIADS to 2.4.0 (adds SA-5 support).
* **[UI]** Sell Button for aircraft will be disabled if there are no units available to be sold or all are already assigned to a mission
* **[UI]** Enemy aircraft inventory now viewable in the air wing menu.
## Fixes
* **[Campaign]** Naval control points will no longer claim ground objectives during campaign generation and prevent them from spawning.
* **[Campaign]** Units aboard sunk cargo ships will now have their losses tracked properly.
* **[Mission Generation]** Mission results and other files will now be opened with enforced utf-8 encoding to prevent an issue where destroyed ground units were untracked because of special characters in their names.
* **[Mission Generation]** Fixed generation of landing waypoints so that the AI obeys them.
* **[Mission Generation]** AI carrier aircraft with a start time of T+0 will now start at T+1s to avoid traffic jams.
* **[Mission Generation]** Fixed cases of unused aircraft not being spawned at airfields as soon as any airport filled up.
* **[Mission Generation]** Fixed cases with multiple client flights of the same airframe all received the same preset channels.
* **[Mission Generation]** F-14A is now generated with stored alignment.
* **[Mission Generation]** Su-33s set to cold or warm start on the Kuznetsov will always be generated as runway starts to avoid the AI getting stuck.
* **[Mission Generation]** Fixed AI not receiving anti-ship tasks against carriers and LHAs.
* **[Mods]** Fixed broken A-4 support causing no weapons to be available.
* **[UI]** Selling of Units is now visible again in the UI dialog and shows the correct amount of sold units
* **[UI]** Fixed bug where an incompatible campaign could be generated if no action is taken on the campaign selection screen.
# 4.1.1
Saves from 4.1.0 are compatible with 4.1.1.
## Fixes
* **[Campaign]** Fixed broken support for Mariana Islands map.
* **[Mission Generation]** Fix SAM sites pointing towards the center of the conflict.
* **[Flight Planning]** No longer using Su-34 for CAP missions.
# 4.1.0
Saves from 4.0.0 are compatible with 4.1.0.
## Features/Improvements
* **[Campaign]** Air defense sites now generate a fixed number of launchers per type.
* **[Campaign]** Added support for Mariana Islands map.
* **[Campaign AI]** Adjustments to aircraft selection priorities for most mission types.
* **[Engine]** Support for DCS 2.7.4.9632 and newer, including the Marianas map, F-16 JSOWs, NASAMS, and Tin Shield EWR.
* **[Flight Planning]** CAP patrol altitudes are now set per-aircraft. By default the altitude will be set based on the aircraft's maximum speed.
* **[Flight Planning]** CAP patrol speeds are now set per-aircraft to be more suitable/sensible. By default the speed will be set based on the aircraft's maximum speed.
* **[Mission Generation]** Improvements for better support of the Skynet Plugin and long range SAMs are now acting as EWR
* **[Mission Generation]** SAM sites are now headed towards the center of the conflict
* **[Mods]** Support for latest version of Gripen mod. In-progress campaigns may need to re-plan Gripen flights to pick up updated loadouts.
* **[Plugins]** Increased time JTAC Autolase messages stay visible on the UI.
* **[Plugins]** Updated SkynetIADS to 2.2.0 (adds NASAMS support).
* **[UI]** Added ability to take notes and have those notes appear as a kneeboard page.
* **[UI]** Hovering over the weather information now dispalys the cloud base (meters and feet).
* **[UI]** Google search link added to unit information when there is no information provided.
* **[UI]** Control point name displayed with ground object group name on map.
* **[UI]** Buy or Replace will now show the correct price for generated ground objects like sams.
* **[UI]** Improved logging for frontline movement to be more descriptive about what happened and why.
* **[UI]** Brought ruler map module into source, which should fix file integrity issues with the module.
## Fixes
* **[Campaign]** Fixed the Silkworm generator to include launchers and not all radars.
* **[Data]** Fixed Introduction dates for targeting pods (ATFLIR and LITENING were both a few years too early).
* **[Data]** Removed SA-10 from Syria 2011 faction.
* **[Economy]** EWRs can now be bought and sold for the correct price and can no longer be used to generate money
* **[Flight Planning]** Helicopters are now correctly identified, and will fly ingress/CAS/BAI/egress and similar at low altitude.
* **[Flight Planning]** Fixed potential issue with angles > 360° or < 0° being generated when summing two angles.
* **[Mission Generation]** The lua data for other plugins is now generated correctly
* **[Mission Generation]** Fixed problem with opfor planning missions against sold ground objects like SAMs
* **[Mission Generation]** The legacy always-available tanker option no longer prevents mission creation.
* **[Mission Generation]** Prevent the creation of a transfer order with 0 units for a rare situtation when a point was captured.
* **[Mission Generation]** Planned transfers which will be impossible after a base capture will no longer prevent the mission result submit.
* **[Mission Generation]** Fix occasional KeyError preventing mission generation when all units of the same type in a convoy were killed.
* **[Mission Generation]** Fix for AAA Flak generator using Opel Blitz preventing the mission from being generated because duplicate unit names were used.
* **[Mission Generation]** Fixed a potential bug with laser code generation where it would generate invalid codes.
* **[UI]** Statistics window tick marks are now always integers.
* **[UI]** Statistics window now shows the correct info for the turn
* **[UI]** Toggling custom loadout for an aircraft with no preset loadouts no longer breaks the flight.
# 4.0.0
Saves from 3.x are not compatible with 4.0.
## Features/Improvements
* **[Engine]** Support for DCS 2.7.2.7910.1 and newer, including Cyprus, F-16 JDAMs, and the Hind.
* **[Campaign]** Squadrons now (optionally, off by default) have a maximum size and killed pilots replenish at a limited rate.
* **[Campaign]** Added an option to disable levelling up of AI pilots.
* **[Campaign]** Added Russian Intervention 2015 campaign on Syria, for a small and somewhat realistic Russian COIN scenario.
* **[Campaign]** Added Operation Atilla campaign on Syria, for a reasonably large invasion of Cyprus scenario.
* **[Campaign AI]** AI will plan Tanker flights.
* **[Campaign AI]** Removed max distance for AEW&C auto planning.
* **[Economy]** Adjusted prices for aircraft to balance out some price inconsistencies.
* **[Factions]** Added more tankers to factions.
* **[Flight Planner]** Added ability to plan Tankers.
* **[Modding]** Campaign format version is now 7.0 to account for DCS map changes that made scenery strike targets incompatible with existing campaigns.
* **[Mods]** Added support for the Gripen mod.
* **[Mods]** Removes MB-339PAN support, as the mod is now deprecated and no longer works with DCS 2.7+.
* **[Mission Generation]** Added support for "Neutral Dot" label options.
* **[New Game Wizard]** Mods are now selected via checkboxes in the new game wizard, not as separate factions.
* **[UI]** Ctrl click and shift click now buy or sell 5 or 10 units respectively.
* **[UI]** Multiple waypoints can now be deleted simultaneously if multiple waypoints are selected.
* **[UI]** Carriers and LHAs now match the colour of airfields, and their destination icons are translucent.
* **[UI]** Updated intel box text for first turn.
* **[UI]** Base Capture Cheat is now usable at all bases and can also be used to transfer player-owned bases to OPFOR.
* **[UI]** Pass Turn button is relabled as "Begin Campaign" on Turn 0.
* **[UI]** Added a ruler to the map.
* **[UI]** Liberation now saves games to `<DCS user directory>/Liberation/Saves` by default to declutter the main directory.
## Fixes
* **[Campaign AI]** Fix procurement for factions that lack some unit types.
* **[Campaign AI]** Fix auto purchase of aircraft for factions that have no transport aircraft.
* **[Campaign AI]** Fix refunding of pending aircraft purchases when a side has no factory available.
* **[Mission Generation]** Fixed problem with mission load when control point name contained an apostrophe.
* **[Mission Generation]** Fixed EWR group names so they contribute to Skynet again.
* **[Mission Generation]** Fixed duplicate name error when generating convoys and cargo ships when creating manual transfers after loading a game.
* **[Mission Generation]** Fixed empty convoys not being disbanded when all units are killed/removed.
* **[Mission Generation]** Fixed player losing frontline progress when skipping from turn 0 to turn 1.
* **[Mission Generation]** Fixed issue where frontline would only search to the right for valid locations.
* **[UI]** Made non-interactive map elements less obstructive.
* **[UI]** Added support for Neutral Dot difficulty label
* **[UI]** Clear skies at night no longer described as "Sunny" by the weather widget.
* **[UI]** Removed ability to buy (useless) ground units at carriers and LHAs.
* **[UI]** Fixed enable/disable of buy/sell buttons.
* **[UI]** EWRs now appear in the custom waypoint list.
# 3.0.0
Saves from 2.5 are not compatible with 3.0.
## Features/Improvements
* **[Campaign]** Ground units can now be transferred by road, airlift, and cargo ship. See https://github.com/dcs-liberation/dcs_liberation/wiki/Unit-Transfers for more information.
* **[Campaign]** Ground units can no longer be sold. To move units to a new location, transfer them.
* **[Campaign]** Ground units must now be recruited at a base with a factory and transferred to their destination. When buying units in the UI, the purchase will automatically be fulfilled at the closest factory, and a transfer will be created on the next turn.
* **[Campaign]** Non-control point FOBs will no longer spawn.
* **[Campaign]** Added squadrons and pilots. See https://github.com/dcs-liberation/dcs_liberation/wiki/Squadrons-and-pilots for more information.
* **[Campaign]** Capturing a base now depopulates all of its attached objectives with units: air defenses, EWRs, ships, armor groups, etc. Buildings are captured.
* **[Campaign]** Ammunition Depots determine how many ground units can be deployed on the frontline by a control point.
* **[Campaign AI]** AI now considers Ju-88s for CAS, strike, and DEAD missions.
* **[Campaign AI]** AI planned AEW&C missions will now be scheduled ASAP.
* **[Campaign AI]** AI now considers the range to the SAM's threat zone rather than the range to the SAM itself when determining target priorities.
* **[Campaign AI]** Auto purchase of ground units will now maintain unit composition instead of buying randomly. The unit composition is predefined.
* **[Campaign AI]** Auto purchase will aim to purchase enough ground units to support the frontline, plus 30% reserve units.
* **[Campaign AI]** Auto purchase will now adjust its air/ground balance to favor whichever is under-funded.
* **[Flight Planner]** Desired mission length is now configurable (defaults to 60 minutes). A BARCAP will be planned every 30 minutes. Other packages will simply have their takeoffs spread out or compressed such that the last flight will take off around the mission end time.
* **[Flight Planner]** Flight plans now include bullseye waypoints.
* **[Flight Planner]** Differentiated SEAD and SEAD escort. SEAD is tasked with suppressing the package target, SEAD escort is tasked with protecting the package from all SAMs along its route.
* **[Flight Planner]** Planned airspeed increased to 0.85 mach for supersonic airframes and 85% of max speed for subsonic.
* **[Flight Planner]** Taxi time estimation for airfields increased from 5 minutes to 8 minutes.
* **[Flight Planner]** Reduce expected error margin for flight plans from 10% to 5%.
* **[Flight Planner]** SEAD flights are scheduled one minute ahead of the package's TOT so that they can suppress the site ahead of the strike.
* **[Flight Planner]** Automatic ATO generation for the player's coalition can now be disabled in the settings.
* **[Payloads]** AI flights for most air to ground mission types (CAS excluded) will have their guns emptied to prevent strafing fully armed and operational battle stations. Gun-reliant airframes like A-10s and warbirds will keep their bullets.
* **[Kneeboard]** ATC table overflow alleviated by wrapping long airfield names and splitting ATC frequency and channel into separate rows.
* **[UI]** Overhauled the map implementation. Now uses satellite imagery instead of low res map images. Display options have moved from the toolbar to panels in the map.
* **[UI]** Campaigns generated for an older or newer version of the game will now be marked as incompatible. They can still be played, but bugs may be present.
* **[UI]** DCS loadouts are now selectable in the loadout setup menu.
* **[UI]** Added global aircraft inventory view under Air Wing dialog.
* **[UI]** Base menu now shows information about ground unit deployment limits.
* **[Modding]** Campaigns now choose locations for factories to spawn.
* **[Modding]** Campaigns now choose locations for ammunition depots to spawn.
* **[Modding]** Campaigns now use map structures as strike targets.
* **[Modding]** Campaigns may now set *any* objective type to be a required spawn rather than random chance. Support for random objective generation was removed.
* **[Modding]** Campaigns may now place AAA objectives.
* **[Modding]** Can now install custom factions to <DCS saved games>/Liberation/Factions instead of the Liberation install directory.
* **[Performance Settings]** Added a settings to lower the number of smoke effects generated on frontlines. Lowered default settings for frontline smoke generators, so less smoke should be generated by default.
* **[Configuration]** Liberation preferences (DCS install and save game location) are now saved to `%LOCALAPPDATA%/DCSLiberation` to prevent needing to reconfigure each new install.
* **[Skynet]** Updated to 2.1.0.
## Fixes
* **[Campaign AI]** Fix purchase of aircraft by priority (the faction's list was being used as the priority list rather than the game's).
* **[Campaign AI]** Fixed bug causing AI to over-purchase cheap aircraft.
* **[Campaign AI]** Auto planner will no longer attempt to plan missions for which the faction has no compatible aircraft.
* **[Campaign AI]** Stop purchasing aircraft after the first unaffordable package to attempt to complete more packages rather than filling airfields with cheap escorts that will never be used.
* **[Campaign]** Fixed bug where offshore strike locations were being used to spawn ship objectives.
* **[Campaign]** EWR sites are now purchasable.
* **[Flight Planner]** AI strike flight plans now include the correct target actions for building groups.
* **[Flight Planner]** AI BAI/DEAD/SEAD flights now have tasks to attack all groups at the target location, not just the primary group (for multi-group SAM sites).
* **[Flight Planner]** Fixed some contexts where damaged runways would be used. Destroying a carrier will no longer break the game.
# 2.5.1
## Features/Improvements
* **[UI]** Engagement ranges are now displayed by default.
* **[UI]** Engagement range display generalized to work for all patrolling flight plans (BARCAP, TARCAP, and CAS).
* **[Flight Planner]** Front lines no longer project threat zones to avoid pushing BARCAPs back so much. TARCAPs will be forcibly planned but strike packages will not route around front lines even if it is reasonable to do so.
## Fixes
* **[Campaigns]** EWRs associated with a base will now only be generated near the base.
* **[Flight Planner]** Fixed error when generating AEW&C flight plans in campaigns with no front lines.
# 2.5.0
Saves from 2.4 are not compatible with 2.5.
## Features/Improvements
* **[Engine]** DCS 2.7 Support
* **[UI]** Improved FOB menu, added a custom banner, and do not display aircraft recruitment menu
* **[Flight Planner]** Added AEW&C missions. (by siKruger)
* **[Kneeboard]** Added dark kneeboard option (by GvonH)
* **[Campaigns]** Multiple EWR sites may now be generated, and EWR sites may be generated outside bases (by SnappyComebacks)
* **[Mission Generation]** Cloudy and rainy (but not thunderstorm) weather will use the cloud presets from DCS 2.7.
* **[Plugins]** Added LotATC export plugin (by drsoran)
* **[Plugins]** Added Splash Damage Plugin (by Wheelijoe)
* **[Loadouts]** Replaced Litening with ATFLIR for all default F/A-18C loadouts.
## Fixes
* **[Flight Planner]** Front lines now project threat zones, so TARCAP/escorts will not be pruned for flights near the front. Packages may also route around the front line when practical.
* **[Flight Planner]** Fixed error when planning BAI at SAMs with dead subgroups.
* **[Flight Planner]** Mig-19 was not allowed for CAS roles fixed
* **[Flight Planner]** Increased size of navigation planning area to avoid plannign failures with distant waypoints.
* **[Flight Planner]** Fixed UI refresh when unchecking the "default loadout" box in the loadout editor.
* **[Objective names]** Fixed typos in objective name : ARMADILLLO -> ARMADILLO (by SnappyComebacks)
* **[Payloads]** F-86 Sabre was missing a custom payload
* **[Payloads]** Added GAR-8 period restrictions (by Mustang-25)
* **[Campaign]** Date now progresses.
* **[Campaign]** Added game over message when a coalition runs out of functioning airbases.
* **[Mission Generation]** Fixed "invalid face handle" error in kneeboard generation that occurred on some machines.
## Regressions
* **[Mod Support]** Stopped support for 2.5.5 Rafale Mode, and removed factions that were using it
* **[Mod Support]** Su-57 mod support might be out of date
# 2.4.3
## Features/Improvements
* **[New Game Wizard]** Added the possibility to setup custom start date
## Fixes
* **[Mods]** Updated C-130J mod data to version 6.4
* **[Mods]** Updated F-22A mod to latest version
# 2.4.2
## Features/Improvements
* **[Factions]** Introduction dates and fallback weapons added for US, Russian, UK, and French weapons. Huge thanks to @TheCandianVendingMachine for the massive amount of data entry!
* **[Campaigns]** Added 1995 start dates.
## Fixes
* **[Economy]** Pending ground unit purchases will also be transferred when a connected base is captured.
* **[UI]** Fixed rounding of budget in recruitment menu.
# 2.4.1
## Fixes
* **[Units]** Fixed syntax error with the SH-60B payload file.
* **[Culling]** Missile sites generate reasonably sized non-cull zones rather than 100km ones.
* **[UI]** Budget display is also now rounded to 2 decimal places.
* **[UI]** Fixed some areas where the old, non-pretty name was displayed to users.
# 2.4.0
Saves from 2.3 are not compatible with 2.4.
## Highlights
* Improved flight plan generation to avoid loitering in or traveling through threatened areas when practical.
* Improved AI aircraft purchasing behavior.
* Era-restricted weapons (work in progress).
* Tons of UI polish.
* Rebalanced economy to keep opfor competitive over the course of the game.
## Features/Improvements
* **[Flight Planner]** Air-to-air and SEAD escorts will no longer be automatically planned for packages that are not in range of threats.
* **[Flight Planner]** Non-custom flight plans will now navigate around threat areas en route to the target area when practical.
* **[Flight Planner]** Flight plans along front lines now ensure that the race track start is closer to the departure airfield than the race track end.
* **[Campaign AI]** Auto-purchase now prefers airfields that are not within range of the enemy.
* **[Campaign AI]** Auto-purchase now prefers the best aircraft for the task, but will attempt to maintain some variety.
* **[Campaign AI]** Opfor now sells off odd aircraft since they're unlikely to be used.
* **[Campaign AI]** Multiple rounds of CAP will be planned (roughly 90 minutes of coverage). Default starting budget has increased to account for the increased need for aircraft.
* **[Mission Generator]** Multiple groups are created for complex SAM sites (SAMs with additional point defense or SHORADS), improving Skynet behavior.
* **[Mission Generator]** Default start type can now be chosen in the settings. This replaces the non-functional "AI Parking Start" option. **Selecting any type other than cold will break OCA/Aircraft missions.**
* **[Cheat Menu]** Added ability to toggle base capture and frontline advance/retreat cheats.
* **[Skynet]** Updated to 2.0.1.
* **[Skynet]** Point defenses are now configured to remain on to protect the site they accompany.
* **[Hercules]** Updated the Hercules Cargo list file.
* **[Balance]** Opfor now gains income using the same rules as the player, significantly increasing their income relative to the player for most campaigns.
* **[Balance]** Units now retreat from captured bases when able. Units with no retreat path will be captured and sold.
* **[Economy]** FOBs generate only $10M per turn (previously $20M like airbases).
* **[Economy]** Carriers and off-map spawns generate no income (previously $20M like airbases).
* **[Economy]** Sales of aircraft and ground vehicles can now be cancelled before the next turn begins.
* **[UI]** Multi-SAM objectives now show threat and detection rings per group.
* **[UI]** New icon for AA sites with no active threat.
* **[UI]** Unit names are now prettier and more accurate, and can now be set per-country for added historical flavour.
* **[UI]** Default loadout is now shown for flights with no custom loadout selected.
* **[UI]** Aircraft for a new flight are now only selectable if they match the task type for that flight.
* **[UI]** WIP - There is now a unit info button for each unit in the recruitment list, that should help newer players learn what each unit does.
* **[UI]** Docs for time-on-target and creating new theaters/factions/loadouts are now linked in the UI at the appropriate places.
* **[UI]** ASAP is now a checkbox rather than a button. Enabling this will disable the TOT selector but changes to the package structure will automatically re-ASAP the package.
* **[UI]** Arrival airfield is now shown in the flight list if it differs from the departure airfield.
* **[UI]** Start type can now be selected when creating a flight.
* **[UI]** Arrival and divert airfields can be edited after the flight is created.
* **[Factions]** Added option for date-based loadout restriction. Active radar homing missiles are handled, patches welcome for the other thousand weapons.
* **[Factions]** Added Poland 2010 faction.
* **[Factions]** Added Greece 2005 faction.
* **[Factions]** Added Iran 1988 faction.
* **[Units]** Support for E-2 Hawkeye, SH-60B Seahawk, S-3B Viking (thanks to awinterquest) and SpGH Dana - these are now being used by appropriate factions.
* **[Culling]** Missile sites are no longer culled.
* **[Campaigns]** Added campaign "Black Sea Lite" by Starfire
* **[Campaigns]** Added campaign "Exercise Vegas Nerve" by Starfire
* **[New game Wizard]** The theater page is now the first page of the campaign wizard, recommended factions will be selected automatically on the faction selection page
* **[New game Wizard]** Added information text about the selected campaign performance.
* **[Mod Support]** Added support for High Digit SAMs mod 1.4.0
* **[Mod Support]** Added SAMs sites generator : KS19Generator, SA10BGenerator, SA12Generator, SA17Generator, SA20Generator, SA20BGenerator, SA23Generator
## Fixes
* **[Hercules]** Updated the default Hercules radio frequency.
* **[Economy]** Pending unit orders at captured bases will be refunded.
* **[UI]** Carrier group SAM threat rings now move with the carrier.
* **[UI]** Base intel menu no longer compresses text, and is now scrollable.
* **[UI]** Edit Flight window is now dynamically sized to adapt to the width of waypoint names, so they no longer get truncated.
* **[UI]** Budget income display is now rounded to 2 decimal places.
* **[UI]** Fixed incorrect income per turn displayed for strike target tooltip.
* **[Factions]** USA with C-130 faction now links to the required mod.
* **[Campaign]** Fixed issue where destroyed buildings would sometimes not count as destroyed and thus respawn.
* **[Campaign]** Fixed issue where destroyed runways were not registered.
* **[Units]** J-11A is no longer spawned with empty loadout.
* **[Units]** F-14B is no longer spawned with empty loadout for fighter sweep tasks.
* **[Units]** Pyotr Velikiy cruiser has been removed for now as it's nearly unkillable.
* **[Units]** Submarines have been removed for now as they aren't wholly functional.
* **[Units]** Fixed "FACTION ERROR : Unable to find OliverHazardPerryGroupGenerator in pydcs" error at startup.
* **[Mission Generator]** Fixed a bug where units set to Aggressive stance sometimes did not move.
* **[Mission Generator]** Flyover points for OCA/Aircraft missions are now generated correctly.
* **[Flight Planner]** Fixed not being able to create custom waypoints for buildings.
* **[Flight Planner]** Strike missions will no longer be automatically planned against SAMs.
* **[Flight Planner]** Strike missions will no longer be automatically planned against FOB structures.
# 2.3.4
## Fixes:
[Mission Generator] Mission generator would crash when generating fire missions for destroyed SCUD sites - fixed
# 2.3.3
## Features/Improvements
* **[Campaigns]** Reworked Golan Heights campaign on Syria, (Added FOB and preset locations for SAMS)
* **[Campaigns]** Added a lite version of the Golan Heights campaign
* **[Campaigns]** Reworked Syrian Civil War campaign (Added FOB and preset locations for SAMS)
* **[Campaigns]** Reworked Emirates campaign
* **[Campaigns]** AA units added to frontlines and updated all factions to include some frontline AA units.
* **[Mission Generator]** Infantry will only be generated for APC and IFV groups
* **[Mission Generator]** Infantry squads size is not randomized anymore
* **[Mission Generator]** Infantry squads can have a mortar.
* **[Mission Generator]** SCUD missiles sites will now fire on enemy controls points in range when possible
* **[Factions]** Updated Nato Desert Storm to include F-14A
* **[Factions]** Updated Iraq 1991 factions to include Zsu-57 and Mig-29A
* **[Factions]** Germany 1944, added Stug III and Stug IV
* **[Factions]** Added factions Insurgents (Hard) with better and more weapons
* **[Plugins]** [The EWRS plugin](https://github.com/Bob7heBuilder/EWRS) is now included.
* **[UI]** Added enemy intelligence summary and details window.
## Fixes:
* **[Factions]** AI would never buy artillery units for the frontline - fixed
* **[Factions]** Removed the F-111 unit from the NATO desert storm faction. (Recruiting it would cause crashes in DCS, since it is not a valid unit)
* **[Campaign]** Automatic redeployment of ground units would sometimes fail - fixed
* **[Mission Generator]** Artillery groups would retreat in the wrong direction - fixed
* **[Units]** Fixed SPG_Stryker_M1128_MGS not being in db
* **[UI]** Fixed and added many missing ground units icons
* **[UI]** Ship groups could be replaced by SAM sites in the UI, which would lead to broken mission being generated - fixed
* **[New Game Wizard]** Removed the "mid game" campaign generator option which is currently broken
* **[Mission Generator]** Empty navy groups will no longer be generated
* **[Mission Generator]** Fixed BAI, SEAD, and DEAD flights ocassionally being assigned the wrong targets.
* **[Flight Planner]** Fixed not being able to plan packages against opfor carriers
* **[UI]** Repaired SAMs no longer show as dead.
* **[UI]** Fixed not being able to manage a disbanded site after disbanding and closing the base menu.
# 2.3.2
## Features/Improvements
* **[Units]** Support for newly added BTR-82A, T-72B3
* **[Units]** Added ZSU-57 AAA sites
* **[Culling]** BARCAP missions no longer create culling exclusion zones.
* **[Flight Planner]** Improved TOT planning. Negative start times no longer occur with TARCAPs and hold times no longer affect planning for flight plans without hold points.
* **[Factions]** Added Iraq 1991 faction (thanks again to Hawkmoon!)
## Fixes:
* **[Mission Generator]** Fix mission generation error when there are too many radio frequency to setup for the Mig-21
* **[Mission Generator]** Fix ground units not moving forward
* **[Mission Generator]** Fixed assigned radio channels overlapping with beacons.
* **[Flight Planner]** Fix creation of custom waypoints.
* **[Campaigns]** Fixed many cases of SAMs spawning on the runways/taxiways in Syria Full.
# 2.3.1
## Features/Improvements
* **[UX]** Added a warning message when the player is attempting to buy more planes at an already full airbase.
* **[Campaigns]** Migrated Syria full map to new format. (Thanks to Hawkmoon)
* **[Faction]** Added NATO desert Storm faction (Thanks to Hawkmoon)
## Fixes:
* **[AI]** CAP flights will engage enemies again.
* **[Campaigns]** Fixed a missing path on the Caucasus Full Map campaign
# 2.3.0
## Features/Improvements
* **[Campaign Map]** Overhauled the campaign model
* **[Campaign Map]** Possible to add FOB as control points
* **[Campaign Map]** Added off-map spawn locations
* **[Campaign AI]** Overhauled AI recruiting behaviour
* **[Campaign AI]** Added AI procurement for Blue
* **[Campaign]** New Campaign: "Black Sea"
* **[Mission Planner]** Possible to move carrier and tarawa on the campaign map
* **[Mission Generator]** Infantry squads on frontline can have manpads
* **[Mission Generator]** Unused aircraft now spawned to allow for OCA strikes
* **[Mission Generator]** Opfor now obeys parking limits
* **[Mission Generator]** Support for Anubis C-130 Hercules mod
* **[Flight Planner]** Added fighter sweep missions.
* **[Flight Planner]** Added BAI missions.
* **[Flight Planner]** Added anti-ship missions.
* **[Flight Planner]** Differentiated BARCAP and TARCAP. TARCAP is now for hostile areas and will arrive before the package.
* **[Flight Planner]** Added OCA missions
* **[Flight Planner]** Added Alternate/divert airfields
* **[Culling]** Added possibility to include/exclude carriers from culling zones
* **[QOL]** On liberation startup, your latest save game is loaded automatically
* **[Units]** Reduced starting fuel load for C101
* **[UI]** Inform the user of the weather
* **[UI]** Added toolbar buttons to change map display settings
* **[Game]** Added new Economy options for adjusting income multipliers and starting budgets.
## Fixes :
* **[Map]** Missiles sites now have a proper icon and will not re-use the SAM sites icon
* **[Mission Generator]** Ground unit waypoints improperly set to "On Road" - fixed
* **[Mission Generator]** Target waypoints not at ground level - fixed
* **[Mission Generator]** Selected skill not applied to Helicopters - fixed
* **[Mission Generator]** Ground units do not always spawn - fixed
* **[Kneeboard]** Briefing waypoints off by one - fixed
* **[Game]** Destroyed buildings still granting budget - fixed
# 2.2.1
## Features/Improvements
* **[Factions]** Added factions : Georgia 2008, USN 1985, France 2005 Frenchpack by HerrTom
* **[Factions]** Added map Persian Gulf full by Plob
* **[Flight Planner]** Player flights with start delays under ten minutes will spawn immediately.
* **[UI]** Mission start screen now informs players about delayed flights.
* **[Units]** Added support for F-14A-135-GR
* **[Modding]** Possible to setup liveries overrides in factions definition files
## Fixes :
* **[Flight Planner]** Hold, join, and split points are planned cautiously near enemy airfields. Ascend/descend points are no longer planned.
* **[Flight Planner]** Custom waypoints are usable again. Not that in most cases custom flight plans will revert to the 2.1 flight planning behavior.
* **[Flight Planner]** Fixed UI bug that made it possible to create empty flights which would throw an error.
* **[Flight Planner]** Player flights from carriers will now be delayed correctly according to the player's settings.
* **[Misc]** Spitfire variant with clipped wings was not seen as flyable by DCS Liberation (hence could not be setup as client/player slot)
* **[Misc]** Updated Syria terrain parking slots database, the out-of-date database could end up generating aircraft in wrong slots (We are still experiencing issues with somes airbases, such as Khalkhalah though)
# 2.2.0
## Features/Improvements :
* **[Campaign Generator]** Added early warning radar generation
* **[Campaign Generator]** Added scud launcher sites
* **[Cheat Menu]** Added ability to capture base from mission planner
* **[Cheat Menu]** Added ability to show red ATO
* **[Factions]** Added WW2 factions that do not depend on WW2 asset pack
* **[Factions]** Cold War / Middle eastern factions will use Flak sites
* **[Flight Planner]** Flight planner overhaul, with package and TOT system
* **[Flight Planner]** Pick runways and ascent/descent based on headwind
* **[Map]** Added polygon debug mode display
* **[Map]** Highlight the selected flight path on the map
* **[Map]** Improved SAM display settings
* **[Map]** Improved flight plan display settings
* **[Map]** Caucasus and The Channel map use a new system to generate SAM and strike target location to reduce probability of targets generated in the middle of a forests
* **[Misc]** Flexible Dedicated Hosting Options for Mission Files via environment variables
* **[Moddability]** Custom campaigns can be designed through json files
* **[Moddability]** LUA plugins can now be injected into Liberation missions.
* **[Moddability]** Optional Skynet IADS lua plugin now included
* **[New Game]** Starting budget can be freely selected
* **[New Game]** Exanded information for faction and campaign selection in the new game wizard
* **[UI]** Add double and right click actions to many UI elements.
* **[UI]** Add polygon drawing mode for map background
* **[UI]** Added a warning if you press takeoff with no player enabled flights
* **[UI]** Packages and flights now visible in the main window sidebar
* **[Units/Factions]** Added bombers to some coalitions
* **[Units/Factions]** Added support for SU-57 mod by Cubanace
* **[Units]** Added Freya EWR sites to german WW2 factions
* **[Units]** Added support for many bombers (B-52H, B-1B, Tu-22, Tu-142)
* **[Units]** Added support for new P-47 variants
## Fixes :
* **[Campaign Generator]** Big airbases could end up without any airbase defense.
* **[Campaign generator]** Ship group and offshore buildings should not be generated on land anymore
* **[Flight Planner]** Fix waypoint alitudes for helicopters
* **[Flight Planner]** Fixed CAS aircraft wandering away from frontline
* **[Maps]** Incirlik airbase was missing exclusions zones, so SAMS could end up being generated on the runway
* **[Mission Generator]** Fixed player/client confusion when a flight had only one player slot.
* **[Radios]** Fix A-10C radio
* **[UI]** Many missing unit icons were added
* **[UI]** Missing TER weapons in custom payload now selectable.
# 2.1.5
## Features/Improvements :
* **[Units/Factions]** Enabled EPLRS for ground units that supports it (so they appear on A-10C II TAD and Helmet)
## Fixes :
* **[UI]** Fixed an issue that prevent saving after aborting a mission
* **[Mission Generator]** Fixed aircraft landing point type being wrong
# 2.1.4
## Fixes :
* **[UI]** Fixed an issue that prevent generating the mission (take off button no working) on old savegames.
# 2.1.3
* **[UI]** Fixed an issue that prevented generating the mission (take off button no working) on old savegames.
## Features/Improvements :
* **[Units/Factions]** Added A-10C_2 to USA 2005 and Bluefor modern factions
@@ -267,4 +1104,4 @@ Sorry :(
* **[Mission Generator]** Planned flights will spawn even if their home base has been captured or is being contested by enemy ground units.
* **[Campaign Generator]** Base defenses would not be generated on Normandy map and in some rare cases on others maps as well
* **[Mission Planning]** CAS waypoints created from the "Predefined waypoint selector" would not be at the exact location of the frontline
* **[Naming]** CAP mission flown from airbase are not named BARCAP anymore (CAP from carrier is still named BARCAP)
* **[Naming]** CAP mission flown from airbase are not named BARCAP anymore (CAP from carrier is still named BARCAP)

26
client/.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/settings.json
.vscode/tasks.json

10
client/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"configurations": [
{
"type": "pwa-chrome",
"name": "http://localhost:3000",
"request": "launch",
"url": "http://localhost:3000"
}
]
}

76
client/README.md Normal file
View File

@@ -0,0 +1,76 @@
# DCS Liberation Client
This is a React app for the front-end of DCS Liberation. It is a work in
progress that just barely implements the map. This is not useful for players
yet.
For development, set the following environment variables when launching DCS
Liberation (the Qt UI):
- `CORS_ALLOW_DEBUG_SERVER=true`
This will allow the front-end to make requests to the server, as long as the
front-end is running on http://localhost:3000.
Then, run `npm start` to start the development server. Launch the Qt UI with
`--new-map --dev` to connect the webview to the development server, or navigate
to http://localhost:3000 in your browser.
## Regenerating the API stubs
The backend uses FastAPI which exposes `/openapi.json`. This is consumed by
`@rtk-query/codegen-openapi` to automatically generate the API stubs in
`src/api/liberationApi.ts`.
If you make a change to the API surface the typescript API will need to be
regenerated. To do this, first launch Liberation (to start the backend) and run
```powershell
npm run regenerate-api
```
See https://redux-toolkit.js.org/rtk-query/usage/code-generation for more
information.
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you cant go back!**
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).

57
client/main.js Normal file
View File

@@ -0,0 +1,57 @@
const path = require("path");
const { app, BrowserWindow } = require("electron");
const isDev = require("electron-is-dev");
const windowStateKeeper = require("electron-window-state");
function createWindow() {
let mainWindowState = windowStateKeeper({
defaultWidth: 1000,
defaultHeight: 800,
});
// Create the browser window.
const win = new BrowserWindow({
x: mainWindowState.x,
y: mainWindowState.y,
width: mainWindowState.width,
height: mainWindowState.height,
show: false,
webPreferences: {
nodeIntegration: true,
},
});
mainWindowState.manage(win);
// and load the index.html of the app.
// win.loadFile("index.html");
win.loadURL(
isDev
? "http://localhost:3000"
: `file://${path.join(__dirname, "../build/index.html")}`
);
// Open the DevTools.
if (isDev) {
win.webContents.openDevTools({ mode: "detach" });
}
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit();
}
});
app.on("activate", () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});

12
client/openapi-config.ts Normal file
View File

@@ -0,0 +1,12 @@
import { ConfigFile } from "@rtk-query/codegen-openapi";
const config: ConfigFile = {
schemaFile: "http://[::1]:16880/openapi.json",
apiFile: "./src/api/baseApi.ts",
apiImport: "baseApi",
outputFile: "./src/api/_liberationApi.ts",
exportName: "_liberationApi",
hooks: true,
};
export default config;

37292
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

87
client/package.json Normal file
View File

@@ -0,0 +1,87 @@
{
"name": "liberation-client",
"version": "0.1.0",
"private": true,
"main": "main.js",
"license": "LGPL-3.0-or-later",
"homepage": ".",
"dependencies": {
"@reduxjs/toolkit": "^1.8.5",
"@testing-library/jest-dom": "^5.16.5",
"@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.6.0",
"electron-window-state": "^5.0.3",
"esri-leaflet": "^3.0.8",
"leaflet": "^1.9.2",
"leaflet-ruler": "^1.0.0",
"milsymbol": "^2.0.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",
"redux-logger": "^3.0.6",
"typescript": "~4.8.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && generate-license-file --input package.json --output build/NOTICE",
"regenerate-api": "rtk-query-codegen-openapi ./openapi-config.ts",
"lint": "eslint src",
"prepare": "eslint src && license-checker --onlyAllow \"MIT;Apache-2.0;CC0-1.0;BSD-3-Clause;ISC;Custom: https://github.com/tmcw/jsonlint;BSD-2-Clause;Hippocratic-2.1;BSD*;WTFPL\" --excludePrivatePackages --production",
"test": "react-scripts test",
"eject": "react-scripts eject",
"electron": "wait-on tcp:3000 && electron ."
},
"eslintConfig": {
"extends": "react-app"
},
"eslintIgnore": [
"leaflet-ruler.d.ts"
],
"prettier": {
"endOfLine": "auto"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@rtk-query/codegen-openapi": "^1.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
"@types/leaflet": "^1.8.0",
"@types/redux-logger": "^3.0.9",
"@types/websocket": "^1.0.5",
"electron": "^22.3.25",
"electron-is-dev": "^2.0.0",
"generate-license-file": "^2.0.0",
"jest-transform-stub": "^2.0.0",
"license-checker": "^25.0.1",
"msw": "^1.2.2",
"react-scripts": "5.0.1",
"ts-node": "^10.9.1",
"wait-on": "^6.0.1"
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!(@?react-leaflet|axios)/)"
],
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
}
}
}

BIN
client/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

43
client/public/index.html Normal file
View File

@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React Redux App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

BIN
client/public/logo192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
client/public/logo512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

3
client/public/robots.txt Normal file
View File

@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

12
client/src/App.test.tsx Normal file
View File

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

16
client/src/App.tsx Normal file
View File

@@ -0,0 +1,16 @@
import LiberationMap from "./components/liberationmap";
import useEventStream from "./hooks/useEventSteam";
import useInitialGameState from "./hooks/useInitialGameState";
function App() {
useInitialGameState();
useEventStream();
return (
<div className="App">
<LiberationMap />
</div>
);
}
export default App;

View File

@@ -0,0 +1,504 @@
import { baseApi as api } from "./baseApi";
const injectedRtkApi = api.injectEndpoints({
endpoints: (build) => ({
listControlPoints: build.query<
ListControlPointsApiResponse,
ListControlPointsApiArg
>({
query: () => ({ url: `/control-points/` }),
}),
getControlPointById: build.query<
GetControlPointByIdApiResponse,
GetControlPointByIdApiArg
>({
query: (queryArg) => ({ url: `/control-points/${queryArg.cpId}` }),
}),
controlPointDestinationInRange: build.query<
ControlPointDestinationInRangeApiResponse,
ControlPointDestinationInRangeApiArg
>({
query: (queryArg) => ({
url: `/control-points/${queryArg.cpId}/destination-in-range`,
params: { lat: queryArg.lat, lng: queryArg.lng },
}),
}),
setControlPointDestination: build.mutation<
SetControlPointDestinationApiResponse,
SetControlPointDestinationApiArg
>({
query: (queryArg) => ({
url: `/control-points/${queryArg.cpId}/destination`,
method: "PUT",
body: queryArg.body,
}),
}),
clearControlPointDestination: build.mutation<
ClearControlPointDestinationApiResponse,
ClearControlPointDestinationApiArg
>({
query: (queryArg) => ({
url: `/control-points/${queryArg.cpId}/cancel-travel`,
method: "PUT",
}),
}),
getDebugHoldZones: build.query<
GetDebugHoldZonesApiResponse,
GetDebugHoldZonesApiArg
>({
query: (queryArg) => ({
url: `/debug/waypoint-geometries/hold/${queryArg.flightId}`,
}),
}),
getDebugJoinZones: build.query<
GetDebugJoinZonesApiResponse,
GetDebugJoinZonesApiArg
>({
query: (queryArg) => ({
url: `/debug/waypoint-geometries/join/${queryArg.flightId}`,
}),
}),
listFlights: build.query<ListFlightsApiResponse, ListFlightsApiArg>({
query: (queryArg) => ({
url: `/flights/`,
params: { with_waypoints: queryArg.withWaypoints },
}),
}),
getFlightById: build.query<GetFlightByIdApiResponse, GetFlightByIdApiArg>({
query: (queryArg) => ({
url: `/flights/${queryArg.flightId}`,
params: { with_waypoints: queryArg.withWaypoints },
}),
}),
getCommitBoundaryForFlight: build.query<
GetCommitBoundaryForFlightApiResponse,
GetCommitBoundaryForFlightApiArg
>({
query: (queryArg) => ({
url: `/flights/${queryArg.flightId}/commit-boundary`,
}),
}),
listFrontLines: build.query<
ListFrontLinesApiResponse,
ListFrontLinesApiArg
>({
query: () => ({ url: `/front-lines/` }),
}),
getFrontLineById: build.query<
GetFrontLineByIdApiResponse,
GetFrontLineByIdApiArg
>({
query: (queryArg) => ({ url: `/front-lines/${queryArg.frontLineId}` }),
}),
getGameState: build.query<GetGameStateApiResponse, GetGameStateApiArg>({
query: () => ({ url: `/game/` }),
}),
getTerrainZones: build.query<
GetTerrainZonesApiResponse,
GetTerrainZonesApiArg
>({
query: () => ({ url: `/map-zones/terrain` }),
}),
listUnculledZones: build.query<
ListUnculledZonesApiResponse,
ListUnculledZonesApiArg
>({
query: () => ({ url: `/map-zones/unculled` }),
}),
getThreatZones: build.query<
GetThreatZonesApiResponse,
GetThreatZonesApiArg
>({
query: () => ({ url: `/map-zones/threats` }),
}),
getNavmesh: build.query<GetNavmeshApiResponse, GetNavmeshApiArg>({
query: (queryArg) => ({
url: `/navmesh/`,
params: { for_player: queryArg.forPlayer },
}),
}),
openNewFrontLinePackageDialog: build.mutation<
OpenNewFrontLinePackageDialogApiResponse,
OpenNewFrontLinePackageDialogApiArg
>({
query: (queryArg) => ({
url: `/qt/create-package/front-line/${queryArg.frontLineId}`,
method: "POST",
}),
}),
openNewTgoPackageDialog: build.mutation<
OpenNewTgoPackageDialogApiResponse,
OpenNewTgoPackageDialogApiArg
>({
query: (queryArg) => ({
url: `/qt/create-package/tgo/${queryArg.tgoId}`,
method: "POST",
}),
}),
openTgoInfoDialog: build.mutation<
OpenTgoInfoDialogApiResponse,
OpenTgoInfoDialogApiArg
>({
query: (queryArg) => ({
url: `/qt/info/tgo/${queryArg.tgoId}`,
method: "POST",
}),
}),
openNewControlPointPackageDialog: build.mutation<
OpenNewControlPointPackageDialogApiResponse,
OpenNewControlPointPackageDialogApiArg
>({
query: (queryArg) => ({
url: `/qt/create-package/control-point/${queryArg.cpId}`,
method: "POST",
}),
}),
openControlPointInfoDialog: build.mutation<
OpenControlPointInfoDialogApiResponse,
OpenControlPointInfoDialogApiArg
>({
query: (queryArg) => ({
url: `/qt/info/control-point/${queryArg.cpId}`,
method: "POST",
}),
}),
listSupplyRoutes: build.query<
ListSupplyRoutesApiResponse,
ListSupplyRoutesApiArg
>({
query: () => ({ url: `/supply-routes/` }),
}),
listTgos: build.query<ListTgosApiResponse, ListTgosApiArg>({
query: () => ({ url: `/tgos/` }),
}),
getTgoById: build.query<GetTgoByIdApiResponse, GetTgoByIdApiArg>({
query: (queryArg) => ({ url: `/tgos/${queryArg.tgoId}` }),
}),
listAllWaypointsForFlight: build.query<
ListAllWaypointsForFlightApiResponse,
ListAllWaypointsForFlightApiArg
>({
query: (queryArg) => ({ url: `/waypoints/${queryArg.flightId}` }),
}),
setWaypointPosition: build.mutation<
SetWaypointPositionApiResponse,
SetWaypointPositionApiArg
>({
query: (queryArg) => ({
url: `/waypoints/${queryArg.flightId}/${queryArg.waypointIdx}/position`,
method: "POST",
body: queryArg.leafletPoint,
}),
}),
getIadsNetwork: build.query<
GetIadsNetworkApiResponse,
GetIadsNetworkApiArg
>({
query: () => ({ url: `/iads-network/` }),
}),
getIadsConnectionsForTgo: build.query<
GetIadsConnectionsForTgoApiResponse,
GetIadsConnectionsForTgoApiArg
>({
query: (queryArg) => ({ url: `/iads-network/for-tgo/${queryArg.tgoId}` }),
}),
}),
overrideExisting: false,
});
export { injectedRtkApi as _liberationApi };
export type ListControlPointsApiResponse =
/** status 200 Successful Response */ ControlPoint[];
export type ListControlPointsApiArg = void;
export type GetControlPointByIdApiResponse =
/** status 200 Successful Response */ ControlPoint;
export type GetControlPointByIdApiArg = {
cpId: string;
};
export type ControlPointDestinationInRangeApiResponse =
/** status 200 Successful Response */ boolean;
export type ControlPointDestinationInRangeApiArg = {
cpId: string;
lat: number;
lng: number;
};
export type SetControlPointDestinationApiResponse =
/** status 204 Successful Response */ undefined;
export type SetControlPointDestinationApiArg = {
cpId: string;
body: LatLng;
};
export type ClearControlPointDestinationApiResponse =
/** status 204 Successful Response */ undefined;
export type ClearControlPointDestinationApiArg = {
cpId: string;
};
export type GetDebugHoldZonesApiResponse =
/** status 200 Successful Response */ HoldZones;
export type GetDebugHoldZonesApiArg = {
flightId: string;
};
export type GetDebugJoinZonesApiResponse =
/** status 200 Successful Response */ JoinZones;
export type GetDebugJoinZonesApiArg = {
flightId: string;
};
export type ListFlightsApiResponse =
/** status 200 Successful Response */ Flight[];
export type ListFlightsApiArg = {
withWaypoints?: boolean;
};
export type GetFlightByIdApiResponse =
/** status 200 Successful Response */ Flight;
export type GetFlightByIdApiArg = {
flightId: string;
withWaypoints?: boolean;
};
export type GetCommitBoundaryForFlightApiResponse =
/** status 200 Successful Response */ LatLng[][];
export type GetCommitBoundaryForFlightApiArg = {
flightId: string;
};
export type ListFrontLinesApiResponse =
/** status 200 Successful Response */ FrontLine[];
export type ListFrontLinesApiArg = void;
export type GetFrontLineByIdApiResponse =
/** status 200 Successful Response */ FrontLine;
export type GetFrontLineByIdApiArg = {
frontLineId: string;
};
export type GetGameStateApiResponse =
/** status 200 Successful Response */ Game;
export type GetGameStateApiArg = void;
export type GetTerrainZonesApiResponse =
/** status 200 Successful Response */ MapZones;
export type GetTerrainZonesApiArg = void;
export type ListUnculledZonesApiResponse =
/** status 200 Successful Response */ UnculledZone[];
export type ListUnculledZonesApiArg = void;
export type GetThreatZonesApiResponse =
/** status 200 Successful Response */ ThreatZoneContainer;
export type GetThreatZonesApiArg = void;
export type GetNavmeshApiResponse =
/** status 200 Successful Response */ NavMesh;
export type GetNavmeshApiArg = {
forPlayer: boolean;
};
export type OpenNewFrontLinePackageDialogApiResponse =
/** status 200 Successful Response */ any;
export type OpenNewFrontLinePackageDialogApiArg = {
frontLineId: string;
};
export type OpenNewTgoPackageDialogApiResponse =
/** status 200 Successful Response */ any;
export type OpenNewTgoPackageDialogApiArg = {
tgoId: string;
};
export type OpenTgoInfoDialogApiResponse =
/** status 200 Successful Response */ any;
export type OpenTgoInfoDialogApiArg = {
tgoId: string;
};
export type OpenNewControlPointPackageDialogApiResponse =
/** status 200 Successful Response */ any;
export type OpenNewControlPointPackageDialogApiArg = {
cpId: string;
};
export type OpenControlPointInfoDialogApiResponse =
/** status 200 Successful Response */ any;
export type OpenControlPointInfoDialogApiArg = {
cpId: string;
};
export type ListSupplyRoutesApiResponse =
/** status 200 Successful Response */ SupplyRoute[];
export type ListSupplyRoutesApiArg = void;
export type ListTgosApiResponse = /** status 200 Successful Response */ Tgo[];
export type ListTgosApiArg = void;
export type GetTgoByIdApiResponse = /** status 200 Successful Response */ Tgo;
export type GetTgoByIdApiArg = {
tgoId: string;
};
export type ListAllWaypointsForFlightApiResponse =
/** status 200 Successful Response */ Waypoint[];
export type ListAllWaypointsForFlightApiArg = {
flightId: string;
};
export type SetWaypointPositionApiResponse =
/** status 204 Successful Response */ undefined;
export type SetWaypointPositionApiArg = {
flightId: string;
waypointIdx: number;
leafletPoint: LatLng;
};
export type GetIadsNetworkApiResponse =
/** status 200 Successful Response */ IadsNetwork;
export type GetIadsNetworkApiArg = void;
export type GetIadsConnectionsForTgoApiResponse =
/** status 200 Successful Response */ IadsConnection[];
export type GetIadsConnectionsForTgoApiArg = {
tgoId: string;
};
export type LatLng = {
lat: number;
lng: number;
};
export type ControlPoint = {
id: string;
name: string;
blue: boolean;
position: LatLng;
mobile: boolean;
destination?: LatLng;
sidc: string;
};
export type ValidationError = {
loc: (string | number)[];
msg: string;
type: string;
};
export type HttpValidationError = {
detail?: ValidationError[];
};
export type HoldZones = {
homeBubble: LatLng[][];
targetBubble: LatLng[][];
joinBubble: LatLng[][];
excludedZones: LatLng[][][];
permissibleZones: LatLng[][][];
preferredLines: LatLng[][];
};
export type JoinZones = {
homeBubble: LatLng[][];
targetBubble: LatLng[][];
ipBubble: LatLng[][];
excludedZones: LatLng[][][];
permissibleZones: LatLng[][][];
preferredLines: LatLng[][];
};
export type Waypoint = {
name: string;
position: LatLng;
altitude_ft: number;
altitude_reference: string;
is_movable: boolean;
should_mark: boolean;
include_in_path: boolean;
timing: string;
};
export type Flight = {
id: string;
blue: boolean;
position?: LatLng;
sidc: string;
waypoints?: Waypoint[];
};
export type FrontLine = {
id: string;
extents: LatLng[];
};
export type Tgo = {
id: string;
name: string;
control_point_name: string;
category: string;
blue: boolean;
position: LatLng;
units: string[];
threat_ranges: number[];
detection_ranges: number[];
dead: boolean;
sidc: string;
};
export type SupplyRoute = {
id: string;
points: LatLng[];
front_active: boolean;
is_sea: boolean;
blue: boolean;
active_transports: string[];
};
export type IadsConnection = {
id: string;
points: LatLng[];
node: string;
connected: string;
active: boolean;
blue: boolean;
is_power: boolean;
};
export type IadsNetwork = {
advanced: boolean;
connections: IadsConnection[];
};
export type ThreatZones = {
full: LatLng[][][];
aircraft: LatLng[][][];
air_defenses: LatLng[][][];
radar_sams: LatLng[][][];
};
export type ThreatZoneContainer = {
blue: ThreatZones;
red: ThreatZones;
};
export type NavMeshPoly = {
poly: LatLng[][];
threatened: boolean;
};
export type NavMesh = {
polys: NavMeshPoly[];
};
export type NavMeshes = {
blue: NavMesh;
red: NavMesh;
};
export type UnculledZone = {
position: LatLng;
radius: number;
};
export type Game = {
control_points: ControlPoint[];
tgos: Tgo[];
supply_routes: SupplyRoute[];
front_lines: FrontLine[];
flights: Flight[];
iads_network: IadsNetwork;
threat_zones: ThreatZoneContainer;
navmeshes: NavMeshes;
map_center?: LatLng;
unculled_zones: UnculledZone[];
};
export type MapZones = {
inclusion: LatLng[][][];
exclusion: LatLng[][][];
sea: LatLng[][][];
};
export const {
useListControlPointsQuery,
useGetControlPointByIdQuery,
useControlPointDestinationInRangeQuery,
useSetControlPointDestinationMutation,
useClearControlPointDestinationMutation,
useGetDebugHoldZonesQuery,
useGetDebugJoinZonesQuery,
useListFlightsQuery,
useGetFlightByIdQuery,
useGetCommitBoundaryForFlightQuery,
useListFrontLinesQuery,
useGetFrontLineByIdQuery,
useGetGameStateQuery,
useGetTerrainZonesQuery,
useListUnculledZonesQuery,
useGetThreatZonesQuery,
useGetNavmeshQuery,
useOpenNewFrontLinePackageDialogMutation,
useOpenNewTgoPackageDialogMutation,
useOpenTgoInfoDialogMutation,
useOpenNewControlPointPackageDialogMutation,
useOpenControlPointInfoDialogMutation,
useListSupplyRoutesQuery,
useListTgosQuery,
useGetTgoByIdQuery,
useListAllWaypointsForFlightQuery,
useSetWaypointPositionMutation,
useGetIadsNetworkQuery,
useGetIadsConnectionsForTgoQuery,
} = injectedRtkApi;

View File

@@ -0,0 +1,5 @@
import { Game } from "./liberationApi";
import { createAction } from "@reduxjs/toolkit";
export const gameLoaded = createAction<Game>("game/loaded");
export const gameUnloaded = createAction("game/unloaded");

18
client/src/api/backend.ts Normal file
View File

@@ -0,0 +1,18 @@
import axios from "axios";
const backendAddr =
new URL(window.location.toString()).searchParams.get("server") ??
"[::1]:16880";
// MSW can't handle IPv6 URLs...
// https://github.com/mswjs/msw/issues/1388
export const HTTP_URL =
process.env.NODE_ENV === "test" ? "" : `http://${backendAddr}/`;
export const backend = axios.create({
baseURL: HTTP_URL,
});
export const WEBSOCKET_URL = `ws://${backendAddr}/eventstream`;
export default backend;

View File

@@ -0,0 +1,7 @@
import { HTTP_URL } from "./backend";
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
export const baseApi = createApi({
baseQuery: fetchBaseQuery({ baseUrl: HTTP_URL }),
endpoints: () => ({}),
});

8
client/src/api/combat.ts Normal file
View File

@@ -0,0 +1,8 @@
import { LatLng } from "leaflet";
export default interface Combat {
id: string;
flight_position: LatLng | null;
target_positions: LatLng[] | null;
footprint: LatLng[][] | null;
}

View File

@@ -0,0 +1,49 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import Combat from "./combat";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface CombatState {
combat: { [key: string]: Combat };
}
const initialState: CombatState = {
combat: {},
};
export const combatSlice = createSlice({
name: "combat",
initialState,
reducers: {
newCombats: (state, action: PayloadAction<Combat[]>) => {
for (const combat of action.payload) {
state.combat[combat.id] = combat;
}
},
updateCombats: (state, action: PayloadAction<Combat[]>) => {
for (const combat of action.payload) {
state.combat[combat.id] = combat;
}
},
endCombats: (state, action: PayloadAction<string[]>) => {
for (const cID of action.payload) {
delete state.combat[cID];
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.combat = {};
});
builder.addCase(gameUnloaded, (state) => {
state.combat = {};
});
},
});
export const { newCombats, updateCombats, endCombats } =
combatSlice.actions;
export const selectCombat = (state: RootState) => state.combat;
export default combatSlice.reducer;

View File

@@ -0,0 +1,44 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { ControlPoint } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface ControlPointsState {
controlPoints: { [key: string]: ControlPoint };
}
const initialState: ControlPointsState = {
controlPoints: {},
};
export const controlPointsSlice = createSlice({
name: "controlPoints",
initialState,
reducers: {
updateControlPoint: (state, action: PayloadAction<ControlPoint[]>) => {
for (const cp of action.payload) {
state.controlPoints[cp.id] = cp;
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.controlPoints = action.payload.control_points.reduce(
(acc: { [key: string]: ControlPoint }, curr) => {
acc[curr.id] = curr;
return acc;
},
{}
);
});
builder.addCase(gameUnloaded, (state) => {
state.controlPoints = {};
});
},
});
export const { updateControlPoint } = controlPointsSlice.actions;
export const selectControlPoints = (state: RootState) => state.controlPoints;
export default controlPointsSlice.reducer;

View File

@@ -0,0 +1,149 @@
import { AppDispatch } from "../app/store";
import { gameUnloaded } from "./actions";
import Combat from "./combat";
import { endCombats, newCombats, updateCombats } from "./combatSlice";
import { updateControlPoint } from "./controlPointsSlice";
import {
deselectFlight,
registerFlights,
selectFlight,
unregisterFlights,
updateFlights,
updateFlightPositions,
} from "./flightsSlice";
import {
deleteFrontLine,
updateFrontLine,
} from "./frontLinesSlice";
import reloadGameState from "./gamestate";
import {
ControlPoint,
Flight,
FrontLine,
IadsConnection,
NavMesh,
Tgo,
ThreatZones,
UnculledZone,
} from "./liberationApi";
import { navMeshUpdated } from "./navMeshSlice";
import { updateTgo } from "./tgosSlice";
import { threatZonesUpdated } from "./threatZonesSlice";
import { unculledZonesUpdated } from "./unculledZonesSlice";
import { LatLng } from "leaflet";
import { updateIadsConnection, removeIadsConnection } from "./iadsNetworkSlice";
interface GameUpdateEvents {
updated_flight_positions: { [id: string]: LatLng };
new_combats: Combat[];
updated_combats: Combat[];
ended_combats: string[];
navmesh_updates: {blue: boolean, mesh: NavMesh}[];
updated_unculled_zones: UnculledZone[];
threat_zones_updated: {blue: boolean, zones: ThreatZones}[];
new_flights: Flight[];
updated_flights: Flight[];
deleted_flights: string[];
selected_flight: string | null;
deselected_flight: boolean;
updated_front_lines: FrontLine[];
deleted_front_lines: string[];
updated_tgos: Tgo[];
updated_control_points: ControlPoint[];
updated_iads: IadsConnection[];
deleted_iads: string[];
reset_on_map_center: LatLng | null;
game_unloaded: boolean;
new_turn: boolean;
}
export const handleStreamedEvents = (
dispatch: AppDispatch,
events: GameUpdateEvents
) => {
if (Object.keys(events.updated_flight_positions).length) {
dispatch(
updateFlightPositions(Object.entries(events.updated_flight_positions))
);
}
if (events.new_combats.length > 0) {
dispatch(newCombats(events.new_combats));
}
if (events.updated_combats.length > 0) {
dispatch(updateCombats(events.updated_combats));
}
if (events.ended_combats.length > 0) {
dispatch(endCombats(events.ended_combats));
}
if (Object.keys(events.navmesh_updates).length > 0) {
dispatch(navMeshUpdated(events.navmesh_updates));
}
if (events.updated_unculled_zones.length > 0) {
dispatch(unculledZonesUpdated(events.updated_unculled_zones));
}
if (Object.keys(events.threat_zones_updated).length > 0) {
dispatch(threatZonesUpdated(events.threat_zones_updated));
}
if (events.new_flights.length > 0) {
dispatch(registerFlights(events.new_flights));
}
if (events.updated_flights.length > 0) {
dispatch(updateFlights(events.updated_flights));
}
if (events.deleted_flights.length > 0) {
dispatch(unregisterFlights(events.deleted_flights));
}
if (events.deselected_flight) {
dispatch(deselectFlight());
}
if (events.selected_flight != null) {
dispatch(selectFlight(events.selected_flight));
}
if (events.updated_front_lines.length > 0) {
dispatch(updateFrontLine(events.updated_front_lines));
}
if (events.deleted_front_lines.length > 0) {
dispatch(deleteFrontLine(events.deleted_front_lines));
}
if (events.updated_tgos.length > 0) {
dispatch(updateTgo(events.updated_tgos));
}
if (events.updated_control_points.length > 0) {
dispatch(updateControlPoint(events.updated_control_points));
}
if (events.deleted_iads.length > 0) {
dispatch(removeIadsConnection(events.deleted_iads));
}
if (events.updated_iads.length > 0) {
dispatch(updateIadsConnection(events.updated_iads));
}
if (events.reset_on_map_center != null) {
reloadGameState(dispatch);
}
if (events.game_unloaded) {
dispatch(gameUnloaded());
}
if (events.new_turn) {
reloadGameState(dispatch, true);
}
};

View File

@@ -0,0 +1,89 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { Flight } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
import { LatLng } from "leaflet";
interface FlightsState {
flights: { [id: string]: Flight };
selected: string | null;
}
const initialState: FlightsState = {
flights: {},
selected: null,
};
export const flightsSlice = createSlice({
name: "flights",
initialState,
reducers: {
registerFlights: (state, action: PayloadAction<Flight[]>) => {
for (const flight of action.payload) {
if (flight.id in state.flights) {
console.log(`Overriding flight with ID: ${flight.id}`);
}
state.flights[flight.id] = flight;
}
},
unregisterFlights: (state, action: PayloadAction<string[]>) => {
for (const id of action.payload) {
delete state.flights[id];
}
},
updateFlights: (state, action: PayloadAction<Flight[]>) => {
for (const flight of action.payload) {
state.flights[flight.id] = flight;
}
},
deselectFlight: (state) => {
state.selected = null;
},
selectFlight: (state, action: PayloadAction<string>) => {
state.selected = action.payload;
},
updateFlightPositions: (
state,
action: PayloadAction<[string, LatLng][]>
) => {
for (const [id, position] of action.payload) {
state.flights[id].position = position;
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.selected = null;
state.flights = action.payload.flights.reduce(
(acc: { [key: string]: Flight }, curr) => {
acc[curr.id] = curr;
return acc;
},
{}
);
});
builder.addCase(gameUnloaded, (state) => {
state.selected = null;
state.flights = {};
});
},
});
export const {
registerFlights,
unregisterFlights,
updateFlights,
deselectFlight,
selectFlight,
updateFlightPositions,
} = flightsSlice.actions;
export const selectFlights = (state: RootState) => state.flights;
export const selectSelectedFlightId = (state: RootState) =>
state.flights.selected;
export const selectSelectedFlight = (state: RootState) => {
const id = state.flights.selected;
return id ? state.flights.flights[id] : null;
};
export default flightsSlice.reducer;

View File

@@ -0,0 +1,50 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { FrontLine } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface FrontLinesState {
fronts: { [key: string]: FrontLine };
}
const initialState: FrontLinesState = {
fronts: {},
};
export const frontLinesSlice = createSlice({
name: "frontLines",
initialState,
reducers: {
updateFrontLine: (state, action: PayloadAction<FrontLine[]>) => {
for (const front of action.payload) {
state.fronts[front.id] = front;
}
},
deleteFrontLine: (state, action: PayloadAction<string[]>) => {
for (const uid of action.payload) {
delete state.fronts[uid];
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.fronts = action.payload.front_lines.reduce(
(acc: { [key: string]: FrontLine }, curr) => {
acc[curr.id] = curr;
return acc;
},
{}
);
});
builder.addCase(gameUnloaded, (state) => {
state.fronts = {};
});
},
});
export const { updateFrontLine, deleteFrontLine } =
frontLinesSlice.actions;
export const selectFrontLines = (state: RootState) => state.frontLines;
export default frontLinesSlice.reducer;

View File

@@ -0,0 +1,24 @@
import { AppDispatch } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import backend from "./backend";
import { Game } from "./liberationApi";
export default function reloadGameState(
dispatch: AppDispatch,
ignoreRecenter: boolean = false
) {
backend
.get("/game")
.catch((error) => console.log(`Error fetching game state: ${error}`))
.then((response) => {
if (response == null || response.data == null) {
dispatch(gameUnloaded());
return;
}
const game = response.data as Game;
if (ignoreRecenter) {
game.map_center = undefined;
}
dispatch(gameLoaded(game));
});
}

View File

@@ -0,0 +1,49 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { IadsConnection} from "./_liberationApi";
interface IadsNetworkState {
connections: {[key: string]: IadsConnection}
}
const initialState: IadsNetworkState = {
connections: {},
};
export const IadsNetworkSlice = createSlice({
name: "iadsNetwork",
initialState,
reducers: {
updateIadsConnection: (state, action: PayloadAction<IadsConnection[]>) => {
for (const connection of action.payload) {
state.connections[connection.id] = connection
}
},
removeIadsConnection: (state, action: PayloadAction<string[]>) => {
for (const cID of action.payload) {
delete state.connections[cID];
}
}
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.connections = action.payload.iads_network.connections.reduce(
(acc: { [key: string]: IadsConnection }, curr) => {
acc[curr.id] = curr;
return acc;
},
{}
);
});
builder.addCase(gameUnloaded, (state) => {
state.connections = {};
});
},
});
export const { updateIadsConnection, removeIadsConnection } = IadsNetworkSlice.actions;
export const selectIadsNetwork = (state: RootState) => state.iadsNetwork;
export default IadsNetworkSlice.reducer;

View File

@@ -0,0 +1,66 @@
import { _liberationApi } from "./_liberationApi";
// See https://redux-toolkit.js.org/rtk-query/usage/automated-refetching for an
// explanation of tag behavior.
export enum Tags {
FLIGHT_PLAN = "FlightPlan",
}
const LIST_ID = "LIST";
function providesList<R extends { id: string | number }[], T extends string>(
resultsWithIds: R | undefined,
tagType: T
) {
return resultsWithIds
? [
{ type: tagType, id: LIST_ID },
...resultsWithIds.map(({ id }) => ({ type: tagType, id })),
]
: [{ type: tagType, id: LIST_ID }];
}
export const liberationApi = _liberationApi.enhanceEndpoints({
addTagTypes: Object.values(Tags),
endpoints: {
// /debug/waypoint-geometries
getDebugHoldZones: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
getDebugJoinZones: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
// /flights/
getCommitBoundaryForFlight: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
getFlightById: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
listFlights: {
providesTags: (result) => providesList(result, Tags.FLIGHT_PLAN),
},
// /waypoints/
listAllWaypointsForFlight: {
providesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
setWaypointPosition: {
invalidatesTags: (result, error, arg) => [
{ type: Tags.FLIGHT_PLAN, id: arg.flightId },
],
},
},
});
export * from "./_liberationApi";

View File

@@ -0,0 +1,32 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { createSlice } from "@reduxjs/toolkit";
import { LatLngLiteral } from "leaflet";
interface MapState {
center: LatLngLiteral;
}
const initialState: MapState = {
center: { lat: 0, lng: 0 },
};
const mapSlice = createSlice({
name: "map",
initialState: initialState,
reducers: {},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
if (action.payload.map_center != null) {
state.center = action.payload.map_center;
}
});
builder.addCase(gameUnloaded, (state) => {
state.center = { lat: 0, lng: 0 };
});
},
});
export const selectMapCenter = (state: RootState) => state.map.center;
export default mapSlice.reducer;

View File

@@ -0,0 +1,53 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { NavMesh, NavMeshPoly } from "./liberationApi";
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
interface NavMeshState {
blue: NavMeshPoly[];
red: NavMeshPoly[];
}
const initialState: NavMeshState = {
blue: [],
red: [],
};
export interface INavMeshUpdate {
blue: boolean;
mesh: NavMesh;
}
const navMeshSlice = createSlice({
name: "navmesh",
initialState: initialState,
reducers: {
updated: (state, action: PayloadAction<INavMeshUpdate[]>) => {
for (const [blue, navmesh] of Object.entries(action.payload)) {
const data = {blue: (blue === "true"), mesh: navmesh} as unknown as INavMeshUpdate
const polys = data.mesh.polys;
if (data.blue) {
state.blue = polys;
} else {
state.red = polys;
}
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.blue = action.payload.navmeshes.blue.polys;
state.red = action.payload.navmeshes.red.polys;
});
builder.addCase(gameUnloaded, (state) => {
state.blue = [];
state.red = [];
});
},
});
export const { updated: navMeshUpdated } = navMeshSlice.actions;
export const selectNavMeshes = (state: RootState) => state.navmeshes;
export default navMeshSlice.reducer;

View File

@@ -0,0 +1,30 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { SupplyRoute } from "./liberationApi";
import { createSlice } from "@reduxjs/toolkit";
interface SupplyRoutesState {
routes: SupplyRoute[];
}
const initialState: SupplyRoutesState = {
routes: [],
};
export const supplyRoutesSlice = createSlice({
name: "supplyRoutes",
initialState,
reducers: {},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.routes = action.payload.supply_routes;
});
builder.addCase(gameUnloaded, (state) => {
state.routes = [];
});
},
});
export const selectSupplyRoutes = (state: RootState) => state.supplyRoutes;
export default supplyRoutesSlice.reducer;

View File

@@ -0,0 +1,44 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { Tgo } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface TgosState {
tgos: { [key: string]: Tgo };
}
const initialState: TgosState = {
tgos: {},
};
export const tgosSlice = createSlice({
name: "tgos",
initialState,
reducers: {
updateTgo: (state, action: PayloadAction<Tgo[]>) => {
for (const tgo of action.payload) {
state.tgos[tgo.id] = tgo;
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.tgos = action.payload.tgos.reduce(
(acc: { [key: string]: Tgo }, curr) => {
acc[curr.id] = curr;
return acc;
},
{}
);
});
builder.addCase(gameUnloaded, (state) => {
state.tgos = {};
});
},
});
export const { updateTgo } = tgosSlice.actions;
export const selectTgos = (state: RootState) => state.tgos;
export default tgosSlice.reducer;

View File

@@ -0,0 +1,61 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { ThreatZoneContainer, ThreatZones } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface ThreatZonesState {
zones: ThreatZoneContainer;
}
const initialState: ThreatZonesState = {
zones: {
blue: {
full: [],
aircraft: [],
air_defenses: [],
radar_sams: [],
},
red: {
full: [],
aircraft: [],
air_defenses: [],
radar_sams: [],
},
},
};
export interface IThreatZoneUpdate {
blue: boolean;
zones: ThreatZones;
}
export const threatZonesSlice = createSlice({
name: "threatZonesState",
initialState,
reducers: {
updated: (state, action: PayloadAction<IThreatZoneUpdate[]>) => {
for (const [blue, zones] of Object.entries(action.payload)) {
const data = {blue: (blue === "true"), zones: zones} as unknown as IThreatZoneUpdate
if (data.blue) {
state.zones.blue = data.zones;
} else {
state.zones.red = data.zones;
}
}
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.zones = action.payload.threat_zones;
});
builder.addCase(gameUnloaded, (state) => {
state.zones = initialState.zones;
});
},
});
export const { updated: threatZonesUpdated } = threatZonesSlice.actions;
export const selectThreatZones = (state: RootState) => state.threatZones;
export default threatZonesSlice.reducer;

View File

@@ -0,0 +1,36 @@
import { RootState } from "../app/store";
import { gameLoaded, gameUnloaded } from "./actions";
import { UnculledZone } from "./liberationApi";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
interface UnculledZonesState {
zones: UnculledZone[];
}
const initialState: UnculledZonesState = {
zones: [],
};
export const unculledZonesSlice = createSlice({
name: "unculledZonesState",
initialState,
reducers: {
updated: (state, action: PayloadAction<UnculledZone[]>) => {
state.zones = action.payload;
},
},
extraReducers: (builder) => {
builder.addCase(gameLoaded, (state, action) => {
state.zones = action.payload.unculled_zones;
});
builder.addCase(gameUnloaded, (state) => {
state.zones = initialState.zones;
});
},
});
export const { updated: unculledZonesUpdated } = unculledZonesSlice.actions;
export const selectUnculledZones = (state: RootState) => state.unculledZones;
export default unculledZonesSlice.reducer;

6
client/src/app/hooks.ts Normal file
View File

@@ -0,0 +1,6 @@
import type { RootState, AppDispatch } from "./store";
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
// Use throughout your app instead of plain `useDispatch` and `useSelector`
export const useAppDispatch = () => useDispatch<AppDispatch>();
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;

53
client/src/app/store.ts Normal file
View File

@@ -0,0 +1,53 @@
import { baseApi } from "../api/baseApi";
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 threatZonesReducer from "../api/threatZonesSlice";
import unculledZonesReducer from "../api/unculledZonesSlice";
import {
Action,
PreloadedState,
ThunkAction,
combineReducers,
configureStore,
} from "@reduxjs/toolkit";
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,
});
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,
unknown,
Action<string>
>;

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

@@ -0,0 +1,32 @@
import { Flight } from "../../api/liberationApi";
import { Icon, Point } from "leaflet";
import { Symbol } from "milsymbol";
import { Marker } from "react-leaflet";
function iconForFlight(flight: Flight) {
const symbol = new Symbol(flight.sidc, {
size: 20,
});
return new Icon({
iconUrl: symbol.toDataURL(),
iconAnchor: new Point(symbol.getAnchor().x, symbol.getAnchor().y),
});
}
interface AircraftProps {
flight: Flight;
}
export default function Aircraft(props: AircraftProps) {
if (!props.flight.position) {
return <></>;
}
return (
<Marker
position={props.flight.position}
icon={iconForFlight(props.flight)}
/>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./Aircraft";

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,15 @@
import { selectFlights } from "../../api/flightsSlice";
import { useAppSelector } from "../../app/hooks";
import Aircraft from "../aircraft";
import { LayerGroup } from "react-leaflet";
export default function AircraftLayer() {
const flights = useAppSelector(selectFlights).flights;
return (
<LayerGroup>
{Object.values(flights).map((flight) => {
return <Aircraft key={flight.id} flight={flight} />;
})}
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./AircraftLayer";

View File

@@ -0,0 +1,146 @@
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: "",
},
},
},
},
});
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: "",
},
},
},
},
});
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: "",
},
},
},
},
});
expect(mockLayerGroup).toHaveBeenCalledTimes(1);
expect(mockCircle).toHaveBeenCalledWith(
expect.objectContaining({
center: {
lat: 10,
lng: 20,
},
radius: 20,
color: colorFor(true, true),
interactive: false,
})
);
});
});

View File

@@ -0,0 +1,65 @@
import { Tgo } from "../../api/liberationApi";
import { selectTgos } from "../../api/tgosSlice";
import { useAppSelector } from "../../app/hooks";
import { Circle, LayerGroup } from "react-leaflet";
interface TgoRangeCirclesProps {
tgo: Tgo;
blue: boolean;
detection?: boolean;
}
export function colorFor(blue: boolean, detection: boolean) {
if (blue) {
return detection ? "#bb89ff" : "#0084ff";
}
return detection ? "#eee17b" : "#c85050";
}
const TgoRangeCircles = (props: TgoRangeCirclesProps) => {
const radii = props.detection
? props.tgo.detection_ranges
: props.tgo.threat_ranges;
const color = colorFor(props.blue, props.detection === true);
const weight = props.detection ? 1 : 2;
return (
<>
{radii.map((radius, idx) => {
return (
<Circle
key={idx}
center={props.tgo.position}
radius={radius}
color={color}
fill={false}
weight={weight}
interactive={false}
/>
);
})}
</>
);
};
interface AirDefenseRangeLayerProps {
blue: boolean;
detection?: boolean;
}
export const AirDefenseRangeLayer = (props: AirDefenseRangeLayerProps) => {
const tgos = Object.values(useAppSelector(selectTgos).tgos);
var tgosForSide = tgos.filter((tgo) => tgo.blue === props.blue);
return (
<LayerGroup>
{tgosForSide.map((tgo) => {
return (
<TgoRangeCircles key={tgo.id} tgo={tgo} {...props}></TgoRangeCircles>
);
})}
</LayerGroup>
);
};
export default AirDefenseRangeLayer;

View File

@@ -0,0 +1 @@
export { default } from "./AirDefenseRangeLayer";

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,53 @@
import CombatModel from "../../api/combat";
import { LatLng } from "leaflet";
import { Polygon, Polyline } from "react-leaflet";
interface CombatProps {
combat: CombatModel;
}
function CombatFootprint(props: CombatProps) {
if (!props.combat.footprint) {
return <></>;
}
return (
<Polygon
positions={props.combat.footprint}
color="#c85050"
interactive={false}
fillOpacity={0.2}
/>
);
}
function CombatLines(props: CombatProps) {
if (!props.combat.flight_position || !props.combat.target_positions) {
return <></>;
}
const flightPosition: LatLng = props.combat.flight_position;
return (
<>
{props.combat.target_positions.map((position, idx) => {
return (
<Polyline
key={idx}
positions={[flightPosition, position]}
color="#c85050"
interactive={false}
/>
);
})}
</>
);
}
export default function Combat(props: CombatProps) {
return (
<>
<CombatFootprint {...props} />
<CombatLines {...props} />
</>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./Combat";

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

@@ -0,0 +1,16 @@
import { selectCombat } from "../../api/combatSlice";
import { useAppSelector } from "../../app/hooks";
import Combat from "../combat/Combat";
import { LayerGroup } from "react-leaflet";
export default function CombatLayer() {
const combats = useAppSelector(selectCombat);
return (
<LayerGroup>
{Object.values(combats.combat).map((combat) => {
return <Combat key={combat.id} combat={combat} />;
})}
(
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./CombatLayer";

View File

@@ -0,0 +1,15 @@
import { ControlPoint as ControlPointModel } from "../../api/liberationApi";
import { MobileControlPoint } from "./MobileControlPoint";
import { StaticControlPoint } from "./StaticControlPoint";
interface ControlPointProps {
controlPoint: ControlPointModel;
}
export default function ControlPoint(props: ControlPointProps) {
if (props.controlPoint.mobile) {
return <MobileControlPoint {...props} />;
} else {
return <StaticControlPoint {...props} />;
}
}

View File

@@ -0,0 +1,22 @@
import { ControlPoint } from "../../api/_liberationApi";
import backend from "../../api/backend";
function openInfoDialog(controlPoint: ControlPoint) {
backend.post(`/qt/info/control-point/${controlPoint.id}`);
}
function openNewPackageDialog(controlPoint: ControlPoint) {
backend.post(`/qt/create-package/control-point/${controlPoint.id}`);
}
export const makeLocationMarkerEventHandlers = (controlPoint: ControlPoint) => {
return {
click: () => {
openInfoDialog(controlPoint);
},
contextmenu: () => {
openNewPackageDialog(controlPoint);
},
};
};

View File

@@ -0,0 +1,15 @@
import { ControlPoint } from "../../api/_liberationApi";
import { Icon, Point } from "leaflet";
import { Symbol } from "milsymbol";
export const iconForControlPoint = (cp: ControlPoint) => {
const symbol = new Symbol(cp.sidc, {
size: 24,
colorMode: "Dark",
});
return new Icon({
iconUrl: symbol.toDataURL(),
iconAnchor: new Point(symbol.getAnchor().x, symbol.getAnchor().y),
});
};

View File

@@ -0,0 +1,9 @@
interface LocationTooltipTextProps {
name: string;
}
export const LocationTooltipText = (props: LocationTooltipTextProps) => {
return <h3 style={{ margin: 0 }}>{props.name}</h3>;
};
export default LocationTooltipText;

View File

@@ -0,0 +1,228 @@
import { ControlPoint } from "../../api/_liberationApi";
import backend from "../../api/backend";
import {
useClearControlPointDestinationMutation,
useSetControlPointDestinationMutation,
} from "../../api/liberationApi";
import { makeLocationMarkerEventHandlers } from "./EventHandlers";
import { iconForControlPoint } from "./Icons";
import LocationTooltipText from "./LocationTooltipText";
import { MovementPath, MovementPathHandle } from "./MovementPath";
import { StaticControlPoint } from "./StaticControlPoint";
import { LatLng, Marker as LMarker, LatLngLiteral } from "leaflet";
import { useCallback, useEffect, useRef, useState } from "react";
import ReactDOMServer from "react-dom/server";
import { Marker, Tooltip } from "react-leaflet";
function metersToNauticalMiles(meters: number) {
return meters * 0.000539957;
}
function formatLatLng(latLng: LatLng) {
const lat = latLng.lat.toFixed(2);
const lng = latLng.lng.toFixed(2);
const ns = latLng.lat >= 0 ? "N" : "S";
const ew = latLng.lng >= 0 ? "E" : "W";
return `${lat}&deg;${ns} ${lng}&deg;${ew}`;
}
function destinationTooltipText(
cp: ControlPoint,
destinationish: LatLngLiteral,
inRange: boolean
) {
const destination = new LatLng(destinationish.lat, destinationish.lng);
const distance = metersToNauticalMiles(
destination.distanceTo(cp.position)
).toFixed(1);
if (!inRange) {
return `Out of range (${distance}nm away)`;
}
const dest = formatLatLng(destination);
return `${cp.name} moving ${distance}nm to ${dest} next turn`;
}
interface PrimaryMarkerProps {
controlPoint: ControlPoint;
}
/**
* The primary control point marker. For non-mobile control points, this has
* fairly simple behavior: it's a marker in a fixed location that can manage
* units and can have missions planned against it.
*
* For mobile control points, this is a draggable marker. If the control point
* has a destination (either because it was dragged after render, or because it
* had a destination in the game that was loaded), the unit management and
* mission planning behaviors are delegated to SecondaryMarker, and the primary
* marker becomes only a destination marker. It can be dragged to change the
* destination, and can be right clicked to cancel movement.
*/
function PrimaryMarker(props: PrimaryMarkerProps) {
// We can't use normal state to update the marker tooltip or the line points
// because if we set any state in the drag event it will re-render this
// component and all children, interrupting dragging. Instead, keep refs to
// the objects and mutate them directly.
//
// For the same reason, the path is owned by this component, because updating
// sibling state would be messy. Lifting the state into the parent would still
// cause this component to redraw.
const markerRef = useRef<LMarker | null>(null);
const pathRef = useRef<MovementPathHandle | null>(null);
const [hasDestination, setHasDestination] = useState<boolean>(
props.controlPoint.destination != null
);
const [position, setPosition] = useState<LatLngLiteral>(
props.controlPoint.destination
? props.controlPoint.destination
: props.controlPoint.position
);
const setDestination = useCallback((destination: LatLng) => {
setPosition(destination);
setHasDestination(true);
}, []);
const resetDestination = useCallback(() => {
setPosition(props.controlPoint.position);
setHasDestination(false);
}, [props]);
const [putDestination, { isLoading }] =
useSetControlPointDestinationMutation();
const [cancelTravel] = useClearControlPointDestinationMutation();
useEffect(() => {
markerRef.current?.setTooltipContent(
props.controlPoint.destination
? destinationTooltipText(
props.controlPoint,
props.controlPoint.destination,
true
)
: ReactDOMServer.renderToString(
<LocationTooltipText name={props.controlPoint.name} />
)
);
});
const locationClickHandlers = makeLocationMarkerEventHandlers(
props.controlPoint
);
return (
<>
<Marker
position={position}
icon={iconForControlPoint(props.controlPoint)}
draggable={!isLoading}
autoPan
// We might draw other markers on top of the CP. The tooltips from the
// other markers are helpful so we want to keep them, but make sure the CP
// is always the clickable thing.
zIndexOffset={1000}
opacity={props.controlPoint.destination ? 0.5 : 1}
ref={(ref) => {
if (ref != null) {
markerRef.current = ref;
}
}}
eventHandlers={{
click: () => {
if (!hasDestination) {
locationClickHandlers.click();
}
},
contextmenu: () => {
if (props.controlPoint.destination) {
cancelTravel({ cpId: props.controlPoint.id }).then(() => {
resetDestination();
});
} else {
locationClickHandlers.contextmenu();
}
},
drag: (event) => {
const destination = event.target.getLatLng();
backend
.get(
`/control-points/${props.controlPoint.id}/destination-in-range?lat=${destination.lat}&lng=${destination.lng}`
)
.then((inRange) => {
markerRef.current?.setTooltipContent(
destinationTooltipText(
props.controlPoint,
destination,
inRange.data
)
);
});
pathRef.current?.setDestination(destination);
},
dragend: async (event) => {
const currentPosition = new LatLng(position.lat, position.lng);
const destination = event.target.getLatLng();
setDestination(destination);
try {
await putDestination({
cpId: props.controlPoint.id,
body: { lat: destination.lat, lng: destination.lng },
}).unwrap();
} catch (error) {
console.error("setDestination failed", error);
setDestination(currentPosition);
}
},
}}
>
<Tooltip />
</Marker>
<MovementPath
source={props.controlPoint.position}
destination={position}
ref={pathRef}
/>
</>
);
}
interface SecondaryMarkerProps {
controlPoint: ControlPoint;
destination: LatLngLiteral | undefined;
}
/**
* The secondary marker for a control point. The secondary marker will only be
* shown when the control point has a destination set. For mobile control
* points, the primary marker is draggable, and the secondary marker will be
* shown at the current location iff the control point has been dragged. The
* secondary marker is also the marker that has the normal control point
* interaction options (mission planning and unit management).
*/
function SecondaryMarker(props: SecondaryMarkerProps) {
if (!props.destination) {
return <></>;
}
return <StaticControlPoint controlPoint={props.controlPoint} />;
}
interface MobileControlPointProps {
controlPoint: ControlPoint;
}
export const MobileControlPoint = (props: MobileControlPointProps) => {
return (
<>
<PrimaryMarker
controlPoint={props.controlPoint}
key={props.controlPoint.destination ? 0 : 1}
/>
<SecondaryMarker
controlPoint={props.controlPoint}
destination={props.controlPoint.destination}
/>
</>
);
};

View File

@@ -0,0 +1,35 @@
import { LatLngLiteral, Polyline as LPolyline } from "leaflet";
import { forwardRef, useImperativeHandle, useRef } from "react";
import { Polyline } from "react-leaflet";
interface MovementPathProps {
source: LatLngLiteral;
destination: LatLngLiteral;
}
export interface MovementPathHandle {
setDestination: (destination: LatLngLiteral) => void;
}
export const MovementPath = forwardRef<MovementPathHandle, MovementPathProps>(
(props: MovementPathProps, ref) => {
const lineRef = useRef<LPolyline | null>(null);
useImperativeHandle(
ref,
() => ({
setDestination: (destination: LatLngLiteral) => {
lineRef.current?.setLatLngs([props.source, destination]);
},
}),
[props]
);
return (
<Polyline
positions={[props.source, props.destination]}
weight={1}
color="#80BA80"
ref={lineRef}
/>
);
}
);

View File

@@ -0,0 +1,27 @@
import { ControlPoint } from "../../api/_liberationApi";
import { makeLocationMarkerEventHandlers } from "./EventHandlers";
import { iconForControlPoint } from "./Icons";
import LocationTooltipText from "./LocationTooltipText";
import { Marker, Tooltip } from "react-leaflet";
interface StaticControlPointProps {
controlPoint: ControlPoint;
}
export const StaticControlPoint = (props: StaticControlPointProps) => {
return (
<Marker
position={props.controlPoint.position}
icon={iconForControlPoint(props.controlPoint)}
// We might draw other markers on top of the CP. The tooltips from the
// other markers are helpful so we want to keep them, but make sure the CP
// is always the clickable thing.
zIndexOffset={1000}
eventHandlers={makeLocationMarkerEventHandlers(props.controlPoint)}
>
<Tooltip>
<LocationTooltipText name={props.controlPoint.name} />
</Tooltip>
</Marker>
);
};

View File

@@ -0,0 +1 @@
export { default } from "./ControlPoint";

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,17 @@
import { selectControlPoints } from "../../api/controlPointsSlice";
import { useAppSelector } from "../../app/hooks";
import ControlPoint from "../controlpoints";
import { LayerGroup } from "react-leaflet";
export default function ControlPointsLayer() {
const controlPoints = useAppSelector(selectControlPoints);
return (
<LayerGroup>
{Object.values(controlPoints.controlPoints).map((controlPoint) => {
return (
<ControlPoint key={controlPoint.id} controlPoint={controlPoint} />
);
})}
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./ControlPointsLayer";

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

@@ -0,0 +1,39 @@
import { UnculledZone } from "../../api/liberationApi";
import { selectUnculledZones } from "../../api/unculledZonesSlice";
import { useAppSelector } from "../../app/hooks";
import { LayerGroup, LayersControl, Circle } from "react-leaflet";
interface CullingExclusionCirclesProps {
zones: UnculledZone[];
}
const CullingExclusionCircles = (props: CullingExclusionCirclesProps) => {
return (
<>
<LayerGroup>
{props.zones.map((zone, idx) => {
return (
<Circle
key={idx}
center={zone.position}
radius={zone.radius}
color="#b4ff8c"
fill={false}
interactive={false}
/>
);
})}
</LayerGroup>
</>
);
};
export default function CullingExclusionZones() {
const data = useAppSelector(selectUnculledZones).zones;
return (
<LayersControl.Overlay name="Culling exclusion zones">
<CullingExclusionCircles zones={data}></CullingExclusionCircles>
</LayersControl.Overlay>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./CullingExclusionZones";

View File

@@ -0,0 +1,120 @@
import { Flight } from "../../api/liberationApi";
import { useGetCommitBoundaryForFlightQuery } from "../../api/liberationApi";
import WaypointMarker from "../waypointmarker";
import { ReactElement } from "react";
import { Polyline } from "react-leaflet";
const BLUE_PATH = "#0084ff";
const RED_PATH = "#c85050";
const SELECTED_PATH = "#ffff00";
interface FlightPlanProps {
flight: Flight;
selected: boolean;
highlight?: boolean;
}
const pathColor = (props: FlightPlanProps) => {
if (props.selected && props.highlight) {
return SELECTED_PATH;
} else if (props.flight.blue) {
return BLUE_PATH;
} else {
return RED_PATH;
}
};
function FlightPlanPath(props: FlightPlanProps) {
const color = pathColor(props);
const waypoints = props.flight.waypoints;
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 }}
/>
);
}
const WaypointMarkers = (props: FlightPlanProps) => {
if (!props.selected || props.flight.waypoints == null) {
return <></>;
}
var markers: ReactElement[] = [];
props.flight.waypoints?.forEach((p, idx) => {
if (p.should_mark) {
markers.push(
<WaypointMarker
key={idx}
number={idx}
waypoint={p}
flight={props.flight}
/>
);
}
});
return <>{markers}</>;
};
interface CommitBoundaryProps {
flightId: string;
selected: boolean;
}
function CommitBoundary(props: CommitBoundaryProps) {
const { data, error, isLoading } = useGetCommitBoundaryForFlightQuery(
{
flightId: props.flightId,
},
// RTK Query doesn't seem to allow us to invalidate the cache from anything
// but a mutation, but this data can be invalidated by events from the
// websocket. Just disable the cache for this.
//
// This isn't perfect. It won't redraw until the component remounts. There
// doesn't appear to be a better way.
{ refetchOnMountOrArgChange: true }
);
if (isLoading) {
return <></>;
}
if (error) {
console.error(`Error loading commit boundary for ${props.flightId}`, error);
return <></>;
}
if (!data) {
console.log(
`Null response data when loading commit boundary for ${props.flightId}`
);
return <></>;
}
return (
<Polyline positions={data} color="#ffff00" weight={1} interactive={false} />
);
}
function CommitBoundaryIfSelected(props: CommitBoundaryProps) {
if (!props.selected) {
return <></>;
}
return <CommitBoundary {...props} />;
}
export default function FlightPlan(props: FlightPlanProps) {
return (
<>
<FlightPlanPath {...props} />
<WaypointMarkers {...props} />
<CommitBoundaryIfSelected
flightId={props.flight.id}
selected={props.selected}
/>
</>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./FlightPlan";

View File

@@ -0,0 +1,405 @@
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,
},
},
});
expect(mockPolyline).toHaveBeenCalledTimes(2);
expect(mockLayerGroup).toBeCalledTimes(1);
});
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 blue={true} 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 blue={false} 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).not.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

@@ -0,0 +1,67 @@
import { selectFlights, selectSelectedFlight } from "../../api/flightsSlice";
import { Flight } from "../../api/liberationApi";
import { useAppSelector } from "../../app/hooks";
import FlightPlan from "../flightplan";
import { LayerGroup } from "react-leaflet";
interface FlightPlansLayerProps {
blue: boolean;
selectedOnly?: true;
}
function SelectedFlightPlan(props: FlightPlansLayerProps) {
const flight = useAppSelector(selectSelectedFlight);
if (!flight) {
return <></>;
}
if (!props.blue) {
// We don't currently support playing as red, so nothing to draw.
return <></>;
}
return (
<FlightPlan
key={flight.id}
flight={flight}
selected={true}
highlight={!props.selectedOnly}
/>
);
}
function UnselectedFlightPlans(props: FlightPlansLayerProps) {
const flightData = useAppSelector(selectFlights);
const isNotSelected = (flight: Flight) => {
if (flightData.selected == null) {
return true;
}
return flightData.selected !== flight.id;
};
if (props.selectedOnly) {
return <></>;
}
return (
<>
{Object.values(flightData.flights)
.filter(isNotSelected)
.filter((flight) => props.blue === flight.blue)
.map((flight) => {
return (
<FlightPlan key={flight.id} flight={flight} selected={false} />
);
})}
</>
);
}
export default function FlightPlansLayer(props: FlightPlansLayerProps) {
return (
<LayerGroup>
<UnselectedFlightPlans {...props} />
<SelectedFlightPlan {...props} />
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./FlightPlansLayer";

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,
})
);
});
});

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