1026 Commits

Author SHA1 Message Date
Dan Albert
ba10298dbc Allow adjusting TOTs after sim start.
This makes the start time in WaitingForStart dynamic, which is more
expensive but probably still cheap enough.

It also checks that the new TOT will not result in a start time in the
past when the player changes the TOT.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-02-06 00:33:08 -08:00
Nosajthedevil
70b9d4c174 Add VSN F-4 Mod Support
Added VSN F-4 Mod support
2023-02-02 17:15:21 -08:00
Dan Albert
0f34946127 Restructure save games into a zipped bundle.
This is the first step toward bundling all assets related to a save game
into a single item. That makes it easier to avoid clobbering "temporary"
assets from other games like the state.json, but also makes it easier
for players to file bug reports, since there's only a single asset to
upload.

This is only the first step because so far it only includes the various
save files: start of turn, end of last turn before results processing,
and "latest" (the game saved explicitly by the player).
2023-01-16 13:59:16 -08:00
MetalStormGhost
575470ae1b Updated Community A-4E-C mod version support to 2.1.0 release. 2023-01-09 23:28:22 -08:00
Dan Albert
7a8b3591cd Add locking to some UI actions.
This is by no means complete. The bugs that this solves were already in
6.x, but we'd hidden the speed controls for the sim in that release, and
have always said that anything done after pressing "go" the first time
is undefined behavior. This is the first step on making those mid-sim
actions behave correctly.

UI actions such as creating a new package need to be executed between
ticks of the sim. We can either do this synchronously by blocking the UI
until the tick is done executing, acquiring a lock on the sim, executing
the action, then releasing the lock; or asynchronously by queueing
events and letting the sim execute them when it completes the current
tick (or instantly if the sim is paused).

Anything that comes from the new UI (currently just the map) must be
asynchronous because it goes through the REST API, but for the old UI
it's simpler (and because the lock will only be acquired as quickly as
the user can act, shouldn't slow anything down) to do this
synchronously, since it's difficult to use coroutines in Qt.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-01-04 12:58:36 -08:00
Dan Albert
fd2ba6b2b2 Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-01-04 12:58:36 -08:00
Dan Albert
ac6cc39616 Fix AdjustToContents use for Qt6.
This is no longer a property exposed directly on QComboBox.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2684.
2023-01-04 12:30:43 -08:00
Dan Albert
306971230b Update to PySide6.
It sounds like PySide2 will not be moving to Python 3.11, so we're stuck
on 3.10 without this. Upgrading to a newer Qt also fixes some high DPI
bugs (the file browser dialog for save/load is no longer tiny on 4k).

https://github.com/pyinstaller/pyinstaller/issues/5414 previously
blocked this, but the bug appears to be fixed now.
2022-12-29 16:26:50 -08:00
Dan Albert
24a04fb8c6 Workaround pycharm debugger issue when used.
Works around
https://youtrack.jetbrains.com/issue/PY-53232/Debugger-doesnt-work-when-pyproj-is-imported
whenever the pycharm debugger is detected.
2022-12-28 14:00:45 -08:00
RndName
3863b8ef40 Fix manual debrief submit not ending mission 2022-11-30 13:20:31 +01:00
Dan Albert
5e7e5e2636 Unfilter the custom waypoint targets.
There doesn't appear to be any reason for us to be poking at
implementation details here aside from changing the name from "unit" to
"building" for that case. Just iterate over the known strike targets.

Making this change uncovered some latent type errors.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2564.
2022-11-25 14:14:38 -08:00
Dan Albert
ca5c0055d1 Remove dead code. 2022-11-25 14:14:38 -08:00
Dan Albert
b0bc46f539 Make the casualty report scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2567.
2022-11-25 13:00:04 -08:00
Dan Albert
5ec487a832 Attribution compliance for OSM data.
https://github.com/dcs-liberation/dcs_liberation/issues/2434
2022-11-20 12:44:25 -08:00
Dan Albert
bf4728fded MB-339A icon.
https://github.com/dcs-liberation/dcs_liberation/issues/2511
2022-11-19 21:14:26 -08:00
Dan Albert
8ed0efe241 Hide sim speed controls behind a flag.
Flag is only controlled from the command-line because redoing Qt layout
usually breaks things. Off by default in 6 since this feature is nowhere
near done enough to even be used experimentally (most changes to the ATO
made after the sim begins will break the game).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2535.
2022-11-19 15:55:03 -08:00
Dan Albert
7b50894ca6 Fix adding and removing waypoints in the UI.
This moves more of the logic out of the UI so mypy can actually spot
these mistakes more often.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2495.
2022-11-19 15:39:41 -08:00
Nosajthedevil
4f9719abc4 Add OV-10A Bronco Mod
Adding the OV-10A Bronco Mod to develop.
2022-11-10 23:04:03 -08:00
Paul Dockar
202dbb6259 Fix barely visible text in the Intel box 2022-10-16 22:46:10 -07:00
Paul Dockar
ab6eebab43 Adding conditions vanilla theme icons
Update uiconstants.py to include theme icon path for all weather conditions.
Moving DCS theme icons.
Created Vanilla theme icons
Fixes #1062
2022-10-16 22:46:10 -07:00
Dan Albert
2f0a7e4f12 Add a toolbar button for filing a bug. 2022-10-15 14:17:33 -07:00
Dan Albert
b63ecc59fb Add a dialog with bug report information. 2022-10-15 13:15:40 -07:00
Dan Albert
f1562a7b94 Add a hint about how to transfer squadrons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1911.
2022-09-27 19:54:07 -07:00
Dan Albert
4b4738c58f Load map icons directly from DCS.
If the user's DCS directory is not configured correctly this will
degrade by not showing an icon. Otherwise (and typically) we get nicer
looking icons for each theater, and we don't have to make these for each
new map.
2022-09-27 19:26:05 -07:00
Dan Albert
f15c2ada1b Fix DaytimeMap error with disabled night missions.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2429
2022-09-09 13:01:10 -07:00
Dan Albert
7e4f81d541 Add a Falklands theater.
Not at all done yet, but loads.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-07 14:39:47 -07:00
Dan Albert
1717bc98cb Move logging_config to game.
This isn't unique to the UI, the UI is just the current caller.
2022-09-03 14:12:21 -07:00
Dan Albert
71f68b3103 Simplify flight startup time calls.
We can always estimate a startup time now. Remove the nullability from
the result, cleanup the callsites, and eliminate
TotEstimator.mission_start_time since it no longer does anything useful.
2022-09-02 23:09:05 -07:00
Dan Albert
24a6c5995b Fix crash when deleting waypoints.
self.coalition is used but was never set.
2022-09-02 21:13:23 -07:00
Dan Albert
452848fd2a Make TOT waypoints non-optional for flight plans.
Flights without a meaningful TOT make the code around startup time (and
other scheduling behaviors) unnecessarily complicated because they have
to handle unpredictable flight plans. We can simplify this by requiring
that all flight plans have a waypoint associated with their TOT. For
custom flight plans, we can just fall back to the takeoff waypoint. For
RTB flight plans (which are only synthetic flight plans injected for
aborted flights), we can use the abort point.

This also means that all flight plans now have, at the very least, a
departure waypoint. Deleting this waypoint is invalid even for custom
flights, so that's no a problem.
2022-09-02 21:13:23 -07:00
Dan Albert
4f1e3da70a Remove splash screen delay.
This has been in for a long time, so people will have seen the message
by now (and it's on our GitHub page).
2022-09-02 19:56:29 -07:00
Dan Albert
c630226e2d Add campaign property for campaign start time.
This field is optional. Omitting the field (or using only a date instead
of a full timestamp) will use the old behavior of picking a random
daylight hour to start the campaign.

This doesn't include any UI in the new game wizard yet. This is only a
campaign yaml option.

https://github.com/dcs-liberation/dcs_liberation/issues/2400
2022-09-01 01:13:01 -07:00
Dan Albert
a101527906 Move FlightPlan creation into Flight.
For now this is just a callsite cleanup. Later, this will make it easier
to separate unscheduled and scheduled flights into different classes
without complicating the layout/scheduling.
2022-08-21 19:37:20 -07:00
Dan Albert
9cd511da3d Clean some cruft out of FlightPlanBuilder. 2022-08-21 19:37:20 -07:00
Dan Albert
be38969c40 Update contributors list. 2022-08-14 18:36:45 -07:00
Raffson
7c2690ca54 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

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

(cherry picked from commit 18057af9ad9212e750b2338add1bc01bf50b868e)
2022-08-14 18:21:03 -07:00
Raffson
36bd628378 Refactor 'grey-out' CSS
The CSS used to grey out the checkbox and label for
advanced IADS should be refactored so it can be reused for
disabling player checkboxes in the flight edit/create dialogs.

The solution is applied to all checkboxes/labels, so that
there's a consistent way of showing users when a
checkbox/label is disabled.

(cherry picked from commit d9c6be0a9d232f73269da720bf7c0f4dfa1b9329)
2022-08-14 18:11:12 -07:00
root0fall
267da47f6e Fix grammatical typo in main.py 2022-08-07 09:34:09 -07:00
Raffson
02c52f0801
Support for Mirage F1.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2335.

Co-authored-by: Starfire13 <72491792+Starfire13@users.noreply.github.com>
Co-authored-by: Jake Lewis <jake@logdyn.com>
Co-authored-by: Dan Albert <dan@gingerhq.net>
2022-07-25 16:11:36 +00: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
Raffson
a54c217f88
Guard against null squadron in flight creator.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2323
2022-07-17 18:21:35 -07:00
Dan Albert
21199d9a24 Fix the command-line campaign generator for IADS. 2022-07-11 13:25:16 -07:00
MetalStormGhost
51b9d80488 Update contributors list. 2022-07-11 02:16:42 -07: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
Raffson
64e68706ad Grey out advanced IADS if it's not supported 2022-07-06 11:30:49 -07:00
Raffson
cc4237d076
Fix incorrect start types for off-map squadrons. 2022-06-30 04:21:18 +00:00
Raffson
27dff95df5
Handle IADS updates properly.
This adds the missing events in the backend, and handles them properly in the front end.
2022-06-29 18:58:49 -07:00
Raffson
def611ef89
Focus on the exception window (#2282) 2022-06-28 20:31:07 -07:00
Raffson
d45bba19c8 Initialize restore_start_type 2022-06-28 20:28:27 -07:00