1026 Commits

Author SHA1 Message Date
Dan Albert
43d5dc0528 Fix bad import. 2021-12-23 12:57:14 -08: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
MetalStormGhost
88bc4fd852
F-104 mod support. 2021-12-22 13:01:51 -08:00
Dan Albert
515efd0598 Draw frozen combat on the map.
Very basic display. Draws the engagement footprint for air-to-air
combat, a line from the flight to the target for IP, and lines from SAMs
to their target for air defense.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:56:25 -08:00
Dan Albert
fb10a8d28e Add frozen combat modelling.
This doesn't do anything yet, but sets up the data model handling for
frozen combat. The next step is to show combat in the map view, since
that will be helpful when debugging the step after that one: resolving
frozen combat.

This would benefit from caching the Shapely data for SAM threat zones.
Right now it's generating them once per tick and the stuttering is
visible at max speed.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:28 -08:00
Dan Albert
8867aaeb6d Break up mapmodel.py monolith. 2021-12-21 13:01:24 -08:00
RndName
f9ed61d199
Enable / Disable game specific functions if no game is loaded
- Disable Save, Settings, Stats and Notes if game is none

fixes #1854
2021-12-20 13:55:05 +01:00
RndName
690705ff8f
fix PySide Error
fix #1801 which was introduced with f3bf9c0
2021-11-26 09:20:34 +01:00
RndName
34100d1c76
Update UI when buy or sell raises exception
fixes #1562
2021-11-22 16:48:52 +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
bc819d59f4 Prevent drawing flights that are being deleted.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1720
2021-11-21 13:21:25 -08:00
Dan Albert
ef73f712ec More Python 3.10 compat. 2021-11-21 11:28:51 -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
12f420f50e Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in
collections.abc.
2021-11-20 18:49:14 -08:00
MetalStormGhost
a94db0ec43
Add a new base banner for FARPs. 2021-11-18 16:58:46 -08:00
Dan Albert
753b301e88 Fix crash when creating packages.
I'm not sure if this is a symptom of the bug or if this is actually a
separate bug, but pushing this for now to make the bug less severe.

https://github.com/dcs-liberation/dcs_liberation/issues/1720
2021-11-07 19:25:38 -08:00
Dan Albert
d31f0e22e3 Show the status of each flight in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-07 11:27:50 -08:00
Dan Albert
30cfd8a769 Don't rebuild the ATO model on selection change.
Much faster and avoids nasty concurrency issues between the JS and
Python side.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1719
2021-11-07 01:38:55 -07:00
Dan Albert
a23e7fe83d Restore missing income multiplier labels.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1712
2021-11-06 16:19:27 -07:00
Dan Albert
5923ba21de Tell Qt that we actually want text to fit.
Why isn't this the default?

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1670
2021-11-03 19:23:54 -07:00
Dan Albert
de0b267568 Shut down the sim update thread on quit.
Otherwise the update thread just sits there waiting forever...
2021-11-02 23:59:08 -07:00
Dan Albert
03430a4df5 Update the UI to show sim state.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
87bf3110c8 Add play/pause features to the sim.
There's no UI feedback for this yet other than the log messages.

https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
5db1b94ac4 Add option to fast forward to first contact.
This is the first step in a larger project to add play/pause buttons to
the Liberation UI so the mission can be generated at any point.
docs/design/turnless.md describes the plan.

This adds an option to fast forward the turn to first contact before
generating the mission. None of that is reflected in the UI (for now),
but the miz will be generated with many flights in the air.

For now "first contact" means as soon as any flight reaches its IP. I'll
follow up to add threat checking so that air-to-air combat also triggers
this, as will entering a SAM's threat zone.

This also includes an option to halt fast-forward whenever a player
flight reaches a certain mission-prep phase. This can be used to avoid
fast forwarding past the player's startup time, taxi time, or takeoff
time. By default this option is disabled so player aircraft may start in
the air (possibly even at their IP if they're the first mission to reach
IP).

Fuel states do not currently account for distance traveled during fast
forward. That will come later.

https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-24 17:40:45 -07:00
Dan Albert
14769c0350 Fix type errors with Flight.start_type in the UI.
Also reorders the enum so that iteration shows the order we want in the
UI by default.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1672
2021-10-23 12:19:20 -07:00
Dan Albert
b728fcc2d6 Clean up mission result handling. 2021-10-22 14:36:51 -07:00
Dan Albert
74291271e3 Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static
class.
2021-10-22 13:48:43 -07:00
Dan Albert
be69d17345 Move Flight and its related components out of gen. 2021-10-22 11:30:28 -07:00
Dan Albert
a2140b915f Flip main/detail text boldness.
Emphasize the main item text and leave the fine print as fine print.
2021-10-21 22:27:35 -07:00
Dan Albert
6dae5b98d5 Fix carrier option not taking effect this turn.
This really shouldn't need to happen but I don't feel like rewriting the
culling code right now. There's no reason for these to be persisted to
the Game at all, we should be generating these once they're needed.
2021-10-21 20:05:07 -07:00
Dan Albert
626740366b Port the mission generator settings to auto.
Done now. Not porting the cheat menu because it contains non-settings
elements as well.
2021-10-21 19:54:58 -07:00
Dan Albert
a618f00662 Port the campaign management page to auto.
Also fixes the oversight in the previous commit where float options were
not saved when changed.
2021-10-21 19:16:47 -07:00
Dan Albert
7bec4c62f7 Generate settings pages automatically.
This adds metadata to settings fields that can be used to automatically
generate the settings window. For now I have replaced the Difficulty
page. Will follow up to replace the others.
2021-10-21 18:30:56 -07:00
Johan Aberg
17011820de
Fix crash if log window is open when entering mission.
Use signal to append text to LogWindow to avoid crash from crossing thread boundaries.
Change modal flag to enable interacting with LogWindow while the mission is running

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1493
2021-10-19 17:04:16 -07:00
Dan Albert
d5eaa4d091 Add a preferred_start_date for campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1079
2021-10-17 17:37:23 -07:00
Dan Albert
bbeb80fc48 Give aircraft purchase the majority of the window.
This makes long squadron names more likely to fit. I also added a
horizontal scroll bar for the cases when this still isn't enough space
and made the vertical scroll bar only appear when necessary. Typically
aircraft purchase menus are neither wide enough for long enough to need
either scroll bar.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1592
2021-10-17 13:28:02 -07:00
Dan Albert
35b30a01ed Fix flight resizing when switching aircraft.
No idea why we were only resetting this if the max was >= 2. Instead,
always reset the flight to the default size when switching aircraft. The
default for anything capable of a two-ship is two, but limit based on
the airframe's group size limit and the number of aircraft available.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1593
2021-10-14 21:03:55 -07:00
Khopa
e84e36fd22 Merge remote-tracking branch 'khopa/develop' into helipads
# Conflicts:
#	changelog.md
2021-09-08 21:56:45 +02:00
Dan Albert
18336f58d3 Minor cleanup of notification system. 2021-09-05 21:15:32 -07:00
Dan Albert
a192e4c872 Allow showing the enemy aircraft inventory. 2021-09-03 13:56:03 -07:00
Dan Albert
16d397db1c Fix unit info menus for aircraft.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1586
2021-09-01 19:22:37 -07:00
Dan Albert
8a60fa5c83 Fix errors when changing task or aircraft type.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1587
2021-09-01 17:14:51 -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
f9f0b429b6 Set the flight airfields based on the Squadron. 2021-08-31 22:14:00 -07:00
Dan Albert
a404792bd2 Reset the max flight size when changing squadrons. 2021-08-31 22:10:23 -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
cd15de6d42 Add an uncaught exception handler. 2021-08-29 16:21:54 -07:00
Dan Albert
380d6bf47a Fix weird wrong default campaign field bug.
I tried fixing this using setField after registering it, but it does
nothing. I suspect this is because the page hasn't been registered with
the wizard yet so it's setting the field for the wrong wizard.
2021-08-29 02:17:10 -07:00