3516 Commits

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