930 Commits

Author SHA1 Message Date
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
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
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
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
MetalStormGhost
383d1b2c9c
Update multi-part Caucasus campaigns. 2022-01-01 16:22:11 -08:00
RndName
8dbd2e2561
Revert "Bump Campaign version to 10.0"
This reverts commit 209afd3adf07388b994d52d5a223e1dac9f76ae2.
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
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