1097 Commits

Author SHA1 Message Date
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
9c07fe5963 Remove source of error in package waypoint timing.
We were calculating the TOT based on travel time to the *flight's*
target, but the ingress point based on the travel time to the target
area. If the difference in travel time between the center of the
target area and the first target were different then we'd calculate
the start time incorrectly even for single flight packages.

Seems to fix https://github.com/Khopa/dcs_liberation/issues/295
2020-11-02 02:26:07 -08:00
Dan Albert
ed05f995b5 Refactor strike formation timing calculations. 2020-11-02 02:25:33 -08:00
Dan Albert
85491dca20 Fix front line CAP patrol end time. 2020-11-02 01:34:35 -08:00
Dan Albert
465399f803 Add radio configuration for the UH-1H and Ka-50. 2020-11-01 17:12:42 -08:00
Dan Albert
3550c8a8f6 Remove afterburner restrictions.
The AI often needs afterburner to recover from high AoA.

Fixes https://github.com/Khopa/dcs_liberation/issues/205
2020-11-01 15:12:05 -08:00
Dan Albert
739c0f8f52 Add radio data for MiG-15bis and MiG-19P.
Fixes https://github.com/Khopa/dcs_liberation/issues/233.
2020-11-01 14:50:23 -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
dde74af6b5 Fix client/player detection.
Client needs to be used if there are other player slots in *any*
flight, not just the same group.

Fixes https://github.com/Khopa/dcs_liberation/issues/297
2020-11-01 14:02:32 -08:00
Dan Albert
eff9c77c9a Fix departure time in the kneeboard.
We don't have the departure time set until after we create the initial
FlightData object. Populate the value after it is determined.

Fixes https://github.com/Khopa/dcs_liberation/issues/290
2020-11-01 13:31:56 -08:00
Dan Albert
5ba633c8a1 Round TOT/start time as needed.
The increased precision that we had everywhere except the UI and the
interface with DCS was causing issues with ASAP creating barely
negative start times. The main cause of this was that we'd compute the
earliest possible TOT, it would result in, for example, 23:10.002.
When we then set the QTimeEdit for the TOT, we have to round because
it does not support (nor do we really want to display) sub-second
values, which then caused the previously 0 start time to be -0.002.

Instead, since the sub-second values aren't really interesting anyway,
we now just round TOTs up and start times down. This should prevent
negative start times from occurring (except when they've been manually
planned as such), and also prevents start times of 00:00:01.

Also rounds the package waypoint times to avoid the same issues, but
it's not really important which direction we round these.

Fixes https://github.com/Khopa/dcs_liberation/issues/295
2020-11-01 13:31:10 -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
Dan Albert
9d747a9f9b Fix kneeboard ground speeds. 2020-10-31 20:28:07 -07:00
walterroach
31ca121498 Add github build number to title bar for preview
builds
2020-10-31 20:10:58 -07:00
walterroach
44b5f5acf1 added notify call back 2020-10-31 20:09:20 -07:00
walterroach
eb4878dfc4 remove useless props 2020-10-31 20:09:20 -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
Walter
6a6133e5cd template cleanup 2020-10-31 20:09:20 -07:00
Walter
65c85d7f0b init args change 2020-10-31 20:09:20 -07:00
Walter
d519dfa5da docstrings and cleanup 2020-10-31 20:09:20 -07:00
Walter
73ea83bbdd Move kneeboard and briefing gen to unified
interface
2020-10-31 20:09:20 -07:00
Walter
235a5ec538 cleanup 2020-10-31 20:09:20 -07:00
walterroach
f81a3d03c0 working briefinggen refactor 2020-10-31 20:09:20 -07:00
walterroach
6878b57fba refactor frontline brief generation 2020-10-31 20:09:20 -07:00
walterroach
0143e5641f var change 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
walterroach
0b2fbddbc5 refactor frontline situation briefing 2020-10-31 20:09:20 -07:00
Walter
28035bf02b linting and formatting 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
Walter
62139fc4eb Fix Nevada landmap not loading
logging on open try except block
2020-10-31 19:55:26 -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
d94c57afd6 Fix error displaying flight edit dialog.
If no airfield was selected (as sometimes happens, usually when there
are no aircraft available anywhere), report that no aircraft are
available.
2020-10-31 18:39:06 -07:00
Dan Albert
b6421646ff Name the set TOT ASAP button better. 2020-10-30 17:28:04 -07:00
Dan Albert
611b6fc272 Fix mypy. 2020-10-30 16:43:19 -07:00
Dan Albert
9cdbef9faf Revert "Run tests in GitHub actions."
Was pushed by accident.

This reverts commit f5047fc0cc326e5bb66743e9eec09c96ba392c22.
2020-10-30 16:14:38 -07:00
Dan Albert
b34de70fc7 Fix logging.
Same problem as last time: we were logging during initialization
before the log handlers could be initialized.
2020-10-30 16:13:34 -07:00
Dan Albert
f5047fc0cc Run tests in GitHub actions. 2020-10-30 15:09:20 -07:00
Dan Albert
258c34e61d Make test runnable from command line.
`pytest tests` works now. I can't explain why `pytest` alone does not,
but it could have something to do with us not being a real Python
package.

With just `pytest` I get:

    E   ModuleNotFoundError: No module named 'tests.test_factions'

But `python -c "import tests.test_factions"` works fine.
2020-10-30 15:05:44 -07:00
Dan Albert
f365487fd6 Remove user-specific config file. 2020-10-30 13:51:18 -07:00
Khopa
8f65b7ee7c Fixed and added many ground unit icons 2020-10-30 16:59:13 +01:00
Khopa
9397f1f39c Fixed issue with Russian 1955/65/75 factions 2020-10-30 16:16:46 +01:00
Walter
f03121af5a fixed wrong conditionals 2020-10-28 16:27:18 -07:00
Dan Albert
239b9f8234 Use python, not py.
py is a shortcut that launches the *latest* version of Python on the
machine. https://stackoverflow.com/a/50896577/632035

The build machines were updated to include python 3.9, so we were
doing everything with 3.9 instead of 3.8. pyproj doesn't have a binary
wheel for 3.9 on pypi yet, so we were falling back to building it from
source, which we aren't able to do, breaking the build.
2020-10-28 00:06:12 -07:00
Dan Albert
1620c602cf Fix mypy issue. 2020-10-27 18:12:13 -07:00
Walter
fa01303460 #257 CasIngressBuilder changes
* Calculate radius from frontline length global
* Determine CAS waypoint by waypoint type rather than name
* Change logging from error to exception
2020-10-27 09:48:36 -05:00
walterroach
1e5bd916d9 CasIngressBuilder proper inheritence 2020-10-26 23:33:56 -05:00
walterroach
62d89239fc merge 2020-10-26 23:20:05 -05:00