86 Commits

Author SHA1 Message Date
Dan Albert
219b52fc12
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-20 16:07:01 +01:00
Dan Albert
9a73a10a09
Remove refueling from sweep flights.
The timing for these doesn't work. Sweep RTBs at the same time the
package reaches its TOT. The tanker won't be on station until 1m30s
before the package reaches the refueling point.
2022-11-20 16:07:01 +01:00
Dan Albert
6ff3a34c14
Fix layout for TARCAP, Escort, and strike-like.
If there's a refuel point, nav from that, not from the patrol end/split.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1749.
2022-11-20 16:07:01 +01:00
Dan Albert
0499ded1b3
Clarify AirAssault flight plan method name.
`engagement_distance` is used elsewhere to mean commit distance, so this
looked like a bug when I stumbled across it. Rename it to be more
explicit.
2022-11-20 16:07:00 +01:00
RndName
b49562f4bc
Airlift & AirAssault updates from Liberation
Cleanup and reword refuel waypoints

- rename Stopover back to CargoStop
- precise some waypoint naming

Cleanup and refine airlift and airassault waypoints

- Drop Off and Pickup now correctly worded
- Helo waypoints now represent LandingZones for pickup and dropoff

Forbid planes from air assault.

Make air assault drop-off non-optional.

There is always a drop-off location for troops.

Add docs explaining what the assault area is.

Add error handling for cargo drop waypoints.

Document some airlift waypoint behavior.

Remove unnecessary refuel waypoint in airlifts.

Remove CTLD logic from Airlift flightplan for AI

Add Ingress Point to AirAssault FlightPlan

Add simulation halt at AirAssault ingress

Remove AirAssault completly from AutoPlanner

Remove unneeded LandRefuel from Airlift

Clarify cargo waypoints for AirLift and AirAssault
2022-11-20 16:06:59 +01:00
Nosajthedevil
5f15ddc52c
Add OV-10A Bronco Mod 2022-11-20 16:06:59 +01:00
Raffson
004a99e080
Cleanup 2022-11-13 22:38:24 +01:00
Raffson
2aee878a40
Adjust ai flight planner for (sead) escort 2022-11-13 22:38:24 +01:00
Raffson
7e51061582
Formatting 2022-11-13 22:38:23 +01:00
Raffson
e71ff17a23
Fix mypy errors 2022-11-13 22:38:23 +01:00
Raffson
2270300177
Adjust flightplans for escorts 2022-11-13 22:38:23 +01:00
Raffson
395969a371
Initial attempt at fixing escorts 2022-11-13 22:38:20 +01:00
Raffson
2d770ae05e
Support for MB-339A 2022-11-07 18:46:16 +01:00
Raffson
6606f0f58b
Also look for Liberation payloads 2022-10-29 21:08:22 +02:00
MetalStormGhost
b64a0f17eb
F-16I mod v2.2 support (by IDF Mods Project) (#9) 2022-10-29 17:12:50 +02:00
Raffson
93328d4443
(Mod)Support for VSN A-6A Intruder v2.7.5.01
Co-Authored-By: HellAngelic <108198242+HellAngelic@users.noreply.github.com>
2022-10-27 20:36:38 +02:00
Raffson
24e9936f28
Add F-16A to CAS/ANTI-SHIP/DEAD in ai_flight_planner_db.py 2022-10-25 19:59:21 +02:00
Raffson
a736bf9b09
"Optimize Imports" in game & qt-ui
Adjustments made by PyCharm
2022-10-24 18:54:41 +02:00
MetalStormGhost
515d28313d
Support F-84G Thunderjet mod v2.5.7.01 (#8)
* Implemented support for the VSN F-84G Thunderjet version 2.5.7.01
2022-10-23 19:00:11 +02:00
Raffson
7bbb07c927
Finish F-104C mod support v2.7.11.222.01 (#6)
Finished the F-104C mod support of version 2.7.11.222.01, which was included during a new export after the livery-scanner was introduced. Includes VSN_F104C banner by GLOBAL HAWK. Banner includes the official VSN logo by J.P. Ferré. Used with permission.

Co-Authored-By: MetalStormGhost <89945461+MetalStormGhost@users.noreply.github.com>
2022-10-18 21:12:31 +02:00
Dan Albert
9e5f1d08d2
Add a comment explaining a wtf in alt estimation. 2022-10-16 12:51:19 +02:00
MetalStormGhost
04a5497f3b
F-4B Phantom II mod support (#4) 2022-10-15 23:07:06 +02:00
MetalStormGhost
139e42dbed
Support for the F-105 Thunderchief mod
v2.7.12.23x
2022-10-15 12:57:43 +02:00
MetalStormGhost
8c905f95e3 Implemented support for the F-100 Super Sabre mod versions v2.7.18.01 & 2.7.18.30765 and patches 30.09.22 & 09.10.22. 2022-10-15 10:55:26 +02:00
Raffson
c4f20b67fe
Support for C-47 2022-10-09 22:17:46 +02:00
Dan Albert
920c9b15ff
Revert "Add support for the AI-only F-14A."
AI behavior with the Heatblur F-14 has been fixed, so not needed any
more.

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

This reverts commit 7387c2ed8f1662686b9df63ad9e6dc4808eee8b0.
2022-10-02 19:56:49 +02:00
Dan Albert
aeed7fd42a
Clean up one frontline bounds user. 2022-09-25 14:53:29 +02:00
Dan Albert
a9f6e3a0c3
Rename frontline vector to bounds, add a class.
This isn't actually the data that callers usually want. Most of the
callers just want the bounds. The heading and length are trivially
computed from that. Add a class to contain the result so it's easier to
refactor.
2022-09-17 14:42:19 +02:00
MetalStormGhost
e1bf0ed47a
Added a new setting: "Maximum frontline length (km)"
It replaces the FRONTLINE_LENGTH constant, which was used previously. The default setting for the frontline length has been set to match the FRONTLINE_LENGTH value (80 km), but I feel the default should be a bit shorter. Discussion on the topic would be welcome.
2022-09-03 22:14:56 +02:00
Dan Albert
96a5a8e2ef
Move FlightPlan ownership from Flight to IBuilder.
The next step in splitting up the layout and scheduling phases. This
facilitates splitting flights into two classes where one has a full
flight plan, but one used in the earlier phases of planning has only a
layout. Layout-only flights won't need TOTs, which will make them much
easier to work with once we've migrated TOTs from timedeltas to
datetimes.

Layout-only flights of course aren't actually usable, but it lets us
avoid dealing with the current sim time until we're certain the Flight
will even survive planning.

I'm not actually sure if we'll be able to split the two phases any more,
but this ends up being a nice cleanup anyway.
2022-09-03 19:13:23 +02:00
Dan Albert
71f9c6c28c
Un-dataclass Package.
This hasn't been very dataclass-like for a long time.
2022-09-03 19:13:22 +02:00
Dan Albert
4eadce7563
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-03 19:13:22 +02:00
Dan Albert
1ea6260054
Remove unused property from Flight. 2022-09-03 19:13:22 +02:00
Dan Albert
07632e2705
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-03 19:13:21 +02:00
Raffson
48938fc529
Dan's massive refactor
Squashing 8 commits by DanAlbert:

- Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.

- Clean some cruft out of FlightPlanBuilder.
- Clean up silly some exception handling.
- Move FlightPlan instantiation into the builder.
I'm working on moving the builder to be owned by the Flight, which will simplify callers that need to create (or recreate) flight plans for a flight.

- Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.

- 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.

- Remove superfluous constructors.
- Remove unused Package field.
2022-08-24 19:25:30 +02:00
Raffson
647032ca48
Skip & Log incompatible loadouts
Solution exists in using the 'get' method
of the "Weapons dictionary", and
subsequentially guarding against
None. Aside from that I created
a method to validate a payload,
which uses this None value to
determine validity.
2022-08-14 14:45:26 +02:00
Raffson
8dab64f4c3
Support for Su-30 mod 2022-08-14 14:45:25 +02:00
Raffson
0913b506f4
Support for F-15D 'Baz' mod 2022-08-14 14:44:50 +02: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
RndName
aa77cfe4b9 Add AirAssault and Airlift mission types with CTLD support
- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
2022-06-09 22:45:29 +02:00
Dan Albert
22c3d4ebc5 Add a CLI tool for viewing default loadouts. 2022-05-29 15:23:21 -07:00
RndName
2836a89f91 Update DEAD task priority list
Set SEAD capable planes with higher priority instead of adding them at the end
2022-04-25 19:24:48 +02:00
RndName
c437fa329c
Improve SEAD ingress tasking and target waypoint
* Fix suicide SEAD flights (diving to the SAM)

additional fix for #2152. This sets the Target Waypoint ALT to the Ingress ALT for non player flights. Player flights will have the target waypoint set to 0 AGL so that they can slave weapons or TGP to it.

* Add GroupAttack to SEAD so that they suppress more
2022-04-20 00:19:03 +02:00
RndName
23ba3215d4 Add SEAD Escort to tasks_by_priority 2022-04-02 10:16:11 +02:00
Dan Albert
6c1e1e1e95 Remove save compat.
There was a necessary break in the previous commit. Clean up any
existing save compat to go with it.
2022-03-20 16:00:29 -07:00
Dan Albert
ad37dcce44 Fix broken iteration when clearing ATO.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2046.
2022-03-20 13:40:57 -07:00
RndName
01f872c960 Add support for the flyable Apache. 2022-03-18 00:00:02 -07:00
Dan Albert
769fe12159 Split flight plan layout into a separate class.
During package planning we don't care about the details of the flight
plan, just the layout (to check if the layout is threatened and we need
escorts). Splitting these will allow us to reduce the amount of work
that must be done in each loop of the planning phase, potentially
caching attempted flight plans between loops.
2022-03-11 16:00:48 -08:00
Dan Albert
fa8c0d9660 Clean up flight plan code.
Split the oversized file into one per plan type. This also moves the
layout responsibility out of the oversized FlightPlanBuilder and into
each flight plan type file.
2022-03-09 02:15:07 -08:00
Dan Albert
4993353184 RTB canceled in-progress flights.
The UI won't stop you from aborting a flight that is already home, but
that should also result in it re-completing again on the next tick.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2022-03-08 01:04:19 -08:00