32 Commits

Author SHA1 Message Date
Raffson
f00a3fb1d2
pydcs update: refactored livery-scanner 2023-05-16 21:45:27 +02:00
Raffson
785beffee0
Cleanup after cherry-picking... 2023-05-14 21:37:24 +02:00
Dan Albert
5c07a2556e
Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea,
but the old mode will probably go away.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
2023-05-14 20:56:58 +02:00
Dan Albert
f719e1cfe7
Add an option to prefer primary tasked aircraft.
We're still using mostly the same aircraft selection as we have before
we added squadrons: the closest aircraft is the best choice.

This adds an option to obey the primary task set by the campaign
designer (can be overridden by players), even if the squadron is farther
away than one that is capable of it as a secondary task.

I don't expect this option to live very long. I'm making it optional for
now to give people a chance to test it, but it'll either replace the old
selection strategy or will be removed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1892.
2023-05-14 20:33:55 +02:00
Dan Albert
e95a6bf759
Support replacing squadrons in-place. 2023-05-14 17:37:53 +02:00
Dan Albert
03c48376c4
Disallow squadrons from disabling mission types.
After this change, players will always have the final say in what
missions a squadron can be assigned to. Squadrons are not able to
influence the default auto-assignable missions either because that
property is always overridden by the campaign's air wing configuration
(the primary and secondary task properties). The `mission-types` field
of the squadron definition has been removed since it is no longer
capable of influencing anything. I haven't bothered cleaning up the now
useless data in all the existing squadrons though.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2785.
2023-05-14 17:18:55 +02:00
MetalStormGhost
e2797fd796
F/A-18E/F/G Super Hornet mod support v2.1 (#84)
* Don't generate runway data for heliports.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2710.

* Remove dead code.

* Implemented support for Chiller Juice Studios F/A-18E/F/G Super Hornet mod

The Chiller Juice Studios Super Hornet mod works like this: it changes the stock F/A-18C Hornet into F/A-18E/F/G Super Hornet / Growler. The exact variant is selected with argument 999 in the livery description.lua, which is why I chose to add the three variants in the FA-18C_hornet.yaml. This way, we can use the squadrons mechanism in Liberation to select the appropriate variant by specifying the correct livery for the squadron.

Current properties injected are wingspan / width and the custom ordnance added by the mod.

Added F/A-18E/F/G banner by Schmokedpancake and F/A-18F icon.

Resolves https://github.com/dcs-liberation/dcs_liberation/issues/2681

* Added a separate loadout file for the Chiller Juice Studios F/A-18E/F/G Super Hornet mod. Currently only replaces the FPU-8A fuel tanks with FPU-12s.

* Added the possibility to use the AI variant of the F/A-18C in campaigns, allowing different loadouts and in the future, the Super Hornet mod alongside legacy Hornets in the same campaign.

* Updated Chiller Juice Studios F/A-18E/F/G Super Hornet mod support to version 2.0. Removed the 1.x version property and pylon injection since they are no longer necessary, since 2.0 adds the Super Hornet variants as separate aircraft. For the same reason, removed the AI-only F/A-18C from the faction files (still retained the aircraft yaml, loadout files and icon/banner in case someone still wants to use it).

Includes F/A-18E/F/G banner by Schmokedpancake, loadouts by @sgtfuzzle17 and F/A-18E/F icons.

* Added Super Hornet, Growler squadrons and Growler banner by @sgtfuzzle17
The squadrons include the model of the airframe in their name, so they can be referenced directly from campaign yaml files without the risk of conflicting with the same squadron of a different era, flying a different airframe.

Also updated the E and G model icons.

Resolves #77

* Fixed a bug with the EA-18G banner not being visible in Retribution. Also added the Super Hornet variants to factions bluefor_modern and Israel-USN_2005_Allied_Sword.

* Corrected the descriptions for tandem-seat Super Hornet variants.

* Updated Chiller Juice Studios F/A-18E/F/G Super Hornet mod support to version 2.1

* Anti-ship loadouts are now named properly.

* Update changelog.md

* Update QNewGameWizard.py

---------

Co-authored-by: Dan Albert <dan@gingerhq.net>
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-03-12 19:17:29 +00:00
Raffson
6c673697f0
Fix livery overrides 2022-12-04 13:40:11 +01:00
Raffson
a736bf9b09
"Optimize Imports" in game & qt-ui
Adjustments made by PyCharm
2022-10-24 18:54:41 +02:00
Raffson
429a397cc8
Readd QMessageBox in AirWingConfigurationDialog
Fixing a mistake that happened during merging/rebasing
2022-08-14 16:34:12 +02:00
Raffson
18057af9ad
Disable player options for non-flyable aircraft
3 items handled:

- Enable/Disable player checkbox if (not) flyable
- Disable player list in air wing config dialog for non-flyable aircraft
- Update changelog
2022-08-14 14:45:27 +02:00
Raffson
a8d6f90f55
Add livery-selector in AirWingConfigurationDialog
Resolves #1861
2022-08-14 14:45:26 +02:00
Raffson
1bee29de83
Fix incomplete reset (#2330)
* Fixing 'Reset' in squadron boxes

* Always use confirmation pop-up when closing with [X]
2022-07-23 12:10:26 +02:00
Raffson
52c0be63ea
Fix 'Accept' button in AirWingConfigurationDialog (#2318)
* Fix 'Accept' button in AirWingConfigurationDialog

- Fixes 'Accept' not saving changes
- Adds 'Reset' button (non-confirming)
- Adds confirmation pop-up when pressing [X]
2022-07-18 16:14:17 -06:00
SnappyComebacks
e60cde892a
Added accept button to Air Wing Configuration window. (#2307)
* Add accept button to Air Wing Configuration window.
* Update black to 22.6.0.  Change pre-commit to use updated black.
* Update click to 8.1.3.
2022-07-10 07:25:48 -06:00
RndName
4115ca6040 Add option to set Auto-Assignable mission types in AirWing Config Dialog 2022-04-19 10:19:52 +02:00
RndName
88ea647c3a Fix empty bases in squadron configuration
- Filter the list of available aircraft by bases and only add aircrafts which can be operated
- Only enable the accept button when a base is selected

fixes #2127
2022-04-19 10:19:52 +02:00
RndName
d2f7785f9f
Finish implementation of add/remove squadrons from AirWingConfigurationDialog
Users can now add and remove squadrons with specific buttons. this also allows new aircraft types to be added as well.

- rebased existing PR to develop
- reverted observable and changed to signals
- changed the general concept so that changes only affect the ui data model and not the game directly. Game will only be updated on apply
- removed unused code
- adopt to review comments
- allow user to choose a predefined squadron preset (also alow none value to use the random generator)
- Reuse the squadron defs from the default assigner in the AirWing class
- allow user to re-roll the squadron nickname (also added new ui icons for the button)
2021-12-23 13:20:59 +01:00
Richard Pump
e4ba9a8b72
Added squadron configuration gui
- added add/remove buttons to Air Wing Menu, implemented remove
2021-12-23 13:20:41 +01:00
RndName
690705ff8f
fix PySide Error
fix #1801 which was introduced with f3bf9c0
2021-11-26 09:20:34 +01:00
Dan Albert
2a75d14e0e Revert upgrade to pyside6.
This appears to be incompatible with pyinstaller. I get the following
when trying to run the executable generated with pyside6:

```
Traceback (most recent call last):
  File "qt_ui\main.py", line 29, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "qt_ui\windows\QLiberationWindow.py", line 28, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "qt_ui\widgets\map\QLiberationMap.py", line 11, in <module>
ImportError: could not import module 'PySide6.QtPrintSupport'
```
2021-11-21 17:39:43 -08:00
Dan Albert
f3bf9c0c3c Silence some useless generation warnings. 2021-11-21 13:55:41 -08:00
Dan Albert
4a7dae9cc2 Upgrade to PySide6.
PySide2 renamed to PySide6 for Qt 6 support. It doesn't seem like
PySide2 is getting a 3.10 wheel, so upgrade to Qt 6 to prep for that.
2021-11-20 19:26:18 -08:00
Dan Albert
be69d17345 Move Flight and its related components out of gen. 2021-10-22 11:30:28 -07:00
Dan Albert
c2e5cba061 Implement manual squadron transfers.
Lightly tested but seems to work fine.

https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-29 16:21:54 -07:00
Dan Albert
4423288a53 Assign aircraft to squadrons rather than bases.
This is needed to support the upcoming squadron transfers, since
squadrons need to bring their aircraft with them.

https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-15 17:42:56 -07:00
Dan Albert
9768fb3493 Add base selection UI to startup.
https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-14 21:46:27 -07:00
Dan Albert
90ad1f4a61 Change squadrons to operate out of a single base.
https://github.com/dcs-liberation/dcs_liberation/issues/1145

Currently this is fixed at the start of the campaign. The squadron
locations are defined by the campaign file.

Follow up work:

* Track aircraft ownership per-squadron rather than per-airbase.
* UI for relocating squadrons.
* Ferry missions for squadrons that are relocating.
* Auto-relocation (probably only for retreat handling).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1138
2021-08-14 21:46:27 -07:00
Dan Albert
91daabc9d2 Fixup auto-assignable tasks when limits change.
The air wing config was fixing the main `mission_types` field, but the
`auto_assignable_mission_types` property had already been set. Update
that field whenever the `mission_types` are changed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1515
2021-08-07 14:04:32 -07:00
Dan Albert
0eb8ec70d9 Make opfor airwing configurable. 2021-07-18 16:09:20 -07:00
Dan Albert
270f87f193 Add per-aircraft tabs to air wing configuration. 2021-07-18 15:49:58 -07:00
Dan Albert
9bb8e00c3d Allow configuration of the air wing at game start.
After completing the new game wizard but before initializing turn 0,
open a dialog to allow the player to customize their air wing. With this
they can remove squadrons from the game, rename them, add players, or
change allowed mission types. *Adding* squadrons is not currently
supported, nor is changing the squadron's livery (the data in pydcs is
an arbitrary class hierarchy that can't be safely indexed by country).

This only applies to the blue air wing for now.

Future improvements:

* Add squadron button.
* Collapse disable squadrons to declutter?
* Tabs on the side like the settings dialog to group by aircraft type.
* Top tab bar to switch between red and blue air wings.
2021-07-17 14:29:04 -07:00