213 Commits

Author SHA1 Message Date
Khopa
2c0ca5803f Improved the faction selection screen in the new game wizard. 2020-11-08 21:57:26 +01:00
Dan Albert
c850c0095d Add DEAD to the flight recreate types. 2020-11-07 17:07:45 -08:00
Dan Albert
4cf406aefa Defer game load to after UI initialization.
This removes both the double load that happens on startup and also
makes it possible to get the UI to create a new game if the existing
default.liberation is not compatible.
2020-11-07 13:03:25 -08:00
C. Perreau
040db055fd
Merge pull request #309 from DanAlbert/theater-refactor
Refactor game and ground object generation.
2020-11-06 20:33:19 +01:00
Dan Albert
5d579ccef9 Add hints for creating packages. 2020-11-05 17:08:34 -08:00
Dan Albert
4145d5578e Refactor game and ground object generation.
No real functional improvements yet, just reorganizing to make
improvements easier.
2020-11-05 16:09:34 -08:00
Dan Albert
de3ba5908f Round waypoint TOTs in the UI. 2020-11-05 15:17:45 -08:00
Khopa
b72a2f4a5f Fixed error in new game wizard with units and mods required not being displayed correctly in some cases. 2020-11-04 21:09:48 +01:00
Khopa
2a02a743a4 Do not display manage button on base defense group for enemy cp. 2020-11-04 18:53:18 +01:00
Walter
cdb16cc591 Fixes #268
Changes red base info to show defenses first, and adds an attack option
2020-11-02 18:06:10 -08:00
Dan Albert
ac05c7cfaa Fix recreate as CAP for ground targets. 2020-11-02 02:33:09 -08:00
Dan Albert
49aa79c612 Fix mypy issues. 2020-11-01 14:49:50 -08:00
Dan Albert
cdde75b517 Add option to avoid delaying player flights.
Fixes https://github.com/Khopa/dcs_liberation/issues/227
2020-11-01 14:13:06 -08:00
Dan Albert
ab67a38ca5 Remove rounding from waypoint timing in the UI.
This is behaving strangely on some machines. Stop hiding the details
in the UI while we debug.
2020-11-01 01:42:58 -08:00
Dan Albert
08f0c9d30a Fix timedelta -> timedelta conversion.
Fixes https://github.com/Khopa/dcs_liberation/issues/293
2020-11-01 00:58:35 -07:00
walterroach
3dc7dc3d1a Dan'ts notes
commit 35ab9103cebf823bab85fbb1c9ff4bc2b9c5701a
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:25:42 2020 -0500

    more cleanup

commit d3d008bc6b29f328ad48063bd4b0520e1b819d68
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:17:59 2020 -0500

    More briefinggen cleanup

commit b2033f091d7191aecefb86fecb5cb060c074706e
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 22:08:48 2020 -0500

    briefinggen cleanup

commit 72ea0196c22d9493df078765800f3fafb9c054dc
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 21:57:52 2020 -0500

    Add notifier method back to Operation

commit efd39a9e03d02b9d581637d0d1c289af68e749c3
Author: walterroach <37820425+walterroach@users.noreply.github.com>
Date:   Fri Oct 30 21:34:37 2020 -0500

    Revert "Move kneeboard and briefing gen to unified"
    Removes properties added to Operation
    This reverts commit 941f2af77074d79b992ae859a0108b67aac5460c.
2020-10-31 20:09:20 -07:00
walterroach
5adc92c601 Properly get enum instead of value on strategy
selecter
2020-10-31 20:09:20 -07:00
Walter
6c9a9de3f3 parent f03121af5ae214e7a58f37e4e1d4ad9102a2f35e
first pass briefing refactor

briefing fixes

briefing fixes

Stop briefing generate being called twice

Stop frontline advantage string being appended
when there are no units.

jinja template

always return enum instance in Strategy Selector

For some reason on DEFENSE, enum is appended to control point stance,
but on all other the enum.value is added instead.

I don't see any case where the value is used, but there are many
cases that the enum instance is evaluated against.

type issue

junja's not a thing

swap mapping with dict

jinja template

always return enum instance in Strategy Selector

For some reason on DEFENSE, enum is appended to control point stance,
but on all other the enum.value is added instead.

I don't see any case where the value is used, but there are many
cases that the enum instance is evaluated against.

type issue

Update build.yml

junja's not a thing

swap mapping with dict

Restore build job
2020-10-31 20:09:20 -07:00
Dan Albert
88b9ed29ba Reorganize flight planning.
Previously we were trying to make every potential flight plan look
just like a strike mission's flight plan. This led to a lot of special
case behavior in several places that was causing us to misplan TOTs.

I've reorganized this such that there's now an explicit `FlightPlan`
class, and any specialized behavior is handled by the subclasses.

I've also taken the opportunity to alter the behavior of CAS and
front-line CAP missions. These no longer involve the usual formation
waypoints. Instead the CAP will aim to be on station at the time that
the CAS mission reaches its ingress point, and leave at its egress
time. Both flights fly directly to the point with a start time
configured for a rendezvous.

It might be worth adding hold points back to every flight plan just to
ensure that non-formation flights don't end up with a very low speed
enroute to the target if they perform ground ops quicker than
expected.
2020-10-31 19:29:24 -07:00
Dan Albert
b6421646ff Name the set TOT ASAP button better. 2020-10-30 17:28:04 -07:00
Khopa
910af12fb9 Default faction for bluefor is USA 2005. 2020-10-25 12:19:51 +01:00
Khopa
a0c61bf73a Authors informations are loaded in Campaign object (to be displayed in UI later) 2020-10-24 17:23:09 +02:00
Khopa
f962fd55bc Merge branch 'develop' into faction_refactor
# Conflicts:
#	game/factions/bluefor_coldwar.py
#	game/factions/bluefor_coldwar_a4.py
#	game/factions/bluefor_coldwar_mods.py
#	game/factions/bluefor_modern.py
2020-10-24 16:57:28 +02:00
Dan Albert
c06a855113 Fix mypy regressions.
Mostly in the plugin system, which needed a handful of asserts that
shouldn't be necessary, but fixing them requires a refactor.
2020-10-24 01:10:11 -07:00
Dan Albert
15db12fb21 Fix TOT/start for BARCAPs in other packages.
We were only getting BARCAP results right in BARCAP packages. This
fixes calculations of TOTs and start times for BARCAPs in strike
packages.

The probably needs some refactoring. BARCAP is just the symptomatic
example at the moment, but the real problem is that different mission
profiles exist and we currently only handle one. Making profiles
explicit in mission planning will clean this up, will be needed for
other future mission types, and makes it easier for us to alter
behavior for waypoint and timing decisions based on the aircraft or
mission type.
2020-10-23 22:28:51 -07:00
Dan Albert
aa7ffdabb0 Fix planned flights view, stop hiding bugs. 2020-10-23 14:19:45 -07:00
Khopa
669a8c9e64 Merge branch 'develop' into faction_refactor 2020-10-23 01:39:48 +02:00
Walter
9caf83cda9 Fixes issue #203
Conditional in comprehension appears to be intended to exclude
dunders, but was also excluding many TER weapons from Weapon class args
beginning with '_'
2020-10-22 16:28:38 -05:00
Dan Albert
cc61893bca Fix more fallout from double/right click change. 2020-10-22 12:12:28 -07:00
Khopa
d6b94345d9 Merge branch 'develop' into faction_refactor 2020-10-22 13:40:14 +02:00
Dan Albert
fd969020af Add escort tasks for the AI. 2020-10-22 01:29:19 -07:00
Dan Albert
69f15824ca Fix breakage in package list UI. 2020-10-22 00:45:10 -07:00
Dan Albert
58fd651a0b Confirm exit to avoid losing progress.
Fixes https://github.com/Khopa/dcs_liberation/issues/218
2020-10-21 18:35:14 -07:00
Khopa
b744238fb8 Factions are properly loaded, now need to refactor whole code. 2020-10-22 01:32:33 +02:00
David Pierron
1bd26005f2 Merge remote-tracking branch 'upstream/develop' into new-plugin-system 2020-10-20 22:10:19 +02:00
David Pierron
b1840ce2ca Merge 'upstream/develop' into new-plugin-system 2020-10-20 22:10:08 +02:00
Dan Albert
5023e0d30f Fix disabled delete button in package UI.
The selection changed handler isn't called for the initial selection.
2020-10-19 21:34:17 -07:00
Dan Albert
916d1eec96 Limit flight size to available aircraft. 2020-10-19 20:46:18 -07:00
Dan Albert
c2d615315e Add client slot selection to new flight window. 2020-10-19 20:29:55 -07:00
Dan Albert
aa96ce7134 Fix cancel of new package. 2020-10-19 01:21:49 -07:00
David Pierron
ed92e9afb9 changed the system to make use of JSON files 2020-10-18 18:23:31 +02:00
Dan Albert
8617f48fc2 Sort air unit purchases properly, and by name.
Previously we were sorting by task first and price second. Much easier
to find things if they're sorted by name (although longer term we
should make the sort option selectable).
2020-10-17 16:46:54 -07:00
Dan Albert
3d41eb1ab4 Clean up CAP types.
Stop using "CAP". Use BARCAP or TARCAP instead.

TARCAP no longer allowed anywhere but front lines, since that's all we
have mission planning for right now. Later will add TARCAP and BARCAP
for all objective types with different timing profiles.

Part two of the fix for
https://github.com/Khopa/dcs_liberation/issues/210.
2020-10-17 14:32:09 -07:00
Dan Albert
002f55dc04 Update the map from the main window.
This guarantees that we update the map *after* updating the model that
the map uses to draw flight plans. Without this, after creating a new
game we'd redraw the previous game's flight plans because the model
hadn't been updated by the time the map was.

Fixes https://github.com/Khopa/dcs_liberation/issues/212
2020-10-17 13:33:28 -07:00
Dan Albert
7aa17e5ad6 Fix package/flight selection signals.
Qt helpfully converts None to 0 for us, so use -1 instead of None.
2020-10-16 14:12:27 -07:00
Dan Albert
9db41270f3 Add red ATO cheat option, show red flight plans. 2020-10-16 13:43:01 -07:00
Dan Albert
69bf3999aa Fix new package double flight delete.
This button was connected twice.
2020-10-16 03:08:48 -07:00
Dan Albert
2fa3b26119 Improve speed estimations.
Reasonable ground speed depends a lot on altitude, so plumb that
information through to the speed estimator.

Also adds calculations for ground speed based on desired mach. I don't
know if DCS is using the same formulas, but we should at least be
pretty close.
2020-10-16 02:11:50 -07:00
Dan Albert
9efecf9514 Fix inventory handling for new packages. 2020-10-15 21:33:04 -07:00
Dan Albert
f7fec834e6 Add a button to automatically set the package TOT. 2020-10-15 20:23:57 -07:00