4359 Commits

Author SHA1 Message Date
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