1147 Commits

Author SHA1 Message Date
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
walterroach
05f3f3636b Add possible options to aircraft yamls
for convenience
2022-02-26 22:52:33 -06: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
Dan Albert
45e76e12b6 Move FlightJs out of MapModel. 2022-02-25 01:31:07 -08: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
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
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
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
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
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
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
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
Dan Albert
52ed6f3f94 Move livery overrides to unit yaml. 2022-02-18 17:22:43 -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
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
f153e75f03 Fix default layer in debug mode. 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
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
Khopa
dc0562b3be Fix #1966 : Naming; replaced female_pilot_ratio by female_pilot_percentage 2022-02-07 18:01:43 +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
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
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
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
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