23 Commits

Author SHA1 Message Date
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
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
a192e4c872 Allow showing the enemy aircraft inventory. 2021-09-03 13:56:03 -07:00
Dan Albert
1a4be911c0 Implement ferry flights for squadron transfers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1145
2021-08-31 23:03:27 -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
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
17c19d453b Factor out Coalition from Game. 2021-07-13 14:29:40 -07:00
Dan Albert
ace42019fb Cap squadron size, limit replenishment rate.
This caps squadrons to 12 pilots and limits their replenishment rate to
1 pilot per turn. Should probably make those values configurable, but
they aren't currently.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1136
2021-06-13 14:40:15 -07:00
Dan Albert
25c289deaa Make squadron nicknames optional. 2021-06-12 21:43:26 -07:00
Dan Albert
4a3ef42e67 Wrap the pydcs FlyingType in our own AircraftType.
This is an attempt to remove a lot of our supposedly unnecessary error
handling. Every aircraft should have a price, a description, a name,
etc; and none of those should require carrying around the faction's
country as context.

This moves all the data for aircraft into yaml files (only one converted
here as an example). Most of the "extended unit info" isn't actually
being read yet.

To replace the renaming of units based on the county, we instead
generate multiple types of each unit when necessary. The CF-18 is just
as much a first-class type as the F/A-18 is.

This doesn't work in its current state because it does break all the
existing names for aircraft that are used in the faction and squadron
files, and we no longer let those errors go as a warning. It will be an
annoying one time switch, but it allows us to define the names that get
used in these files instead of being sensitive to changes as they happen
in pydcs, and allows faction designers to specifically choose, for
example, the Su-22 instead of the Su-17.

One thing not handled by this is aircraft task capability. This is
because the lists in ai_flight_planner_db.py are a priority list, and to
move it out to a yaml file we'd need to assign a weight to it that would
be used to stack rank each aircraft. That's doable, but it makes it much
more difficult to see the ordering of aircraft at a glance, and much
more annoying to move aircraft around in the priority list. I don't
think this is worth doing, and the priority lists will remain in their
own separate lists.

This includes the converted I used to convert all the old unit info and
factions to the new format. This doesn't need to live long, but we may
want to reuse it in the future so we want it in the version history.
2021-06-12 20:13:45 -07:00
Dan Albert
8bb1b1da7c Fix squadron roster size.
This was excluding a number of pilots from the end of the roster equal
to the number of losses the squadron had suffered.
2021-06-04 17:01:29 -07:00
Dan Albert
558502d8ea Convert flight creator to pilot roster.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1143
2021-06-04 17:01:29 -07:00
Brock Greman
6b1048590f Fixes issue where only first a/c in a flight would show in air inventory 2021-06-03 14:46:12 -07:00
Dan Albert
d0976c45e9 Add pilot assignements to the inventory table. 2021-05-30 14:28:58 -07:00
bgreman
a888397bef
Add a global air inventory view to air wing dialog.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/428.
2021-05-30 13:40:51 -07:00
Dan Albert
1521f0a9b1 Add on-leave toggle for pilots.
Pilots on leave will not be assignable to any flights (but will not be
unassigned from any already scheduled this turn).

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 17:09:09 -07:00
Dan Albert
5277beede3 Show active and available pilots in air wing view.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 18:18:22 -07:00
Dan Albert
57a2457050 Show aircraft type in the squadron list.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
e7b8548698 Clean up more delegates.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
9c2bad85d5 Show number of missing pilots in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
4147d2f684 Initial squadrons implementation.
Doesn't actually do anything yet, but squadrons are created for each
aircraft type and pilots will be created as needed to fill flights.

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00