76 Commits

Author SHA1 Message Date
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
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
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
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
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
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
053a1287c9 Fix missing key in combat display. 2022-03-07 19:33:11 -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
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
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
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
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
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
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