Commit Graph

178 Commits

Author SHA1 Message Date
MetalStormGhost
6fd60d150e Raise NoParkingSlotError instead of RuntimeError when running out of ground spawns. 2024-02-25 12:39:43 +02:00
Raffson
4ff31ea86d Blast through errors 2024-02-25 12:39:41 +02:00
Raffson
9cb7617352 Optionally jettison empty fuel tanks for AI 2024-02-25 00:57:15 +01:00
Raffson
68a09ea81b Fix horrible bug 2024-02-23 23:43:27 +01:00
Raffson
e4b67ffb8a ROE optimisations 2024-02-19 19:18:21 +01:00
Raffson
b9230b6fb6 Improve travel-speeds for helicopters 2024-02-18 23:31:53 +01:00
Raffson
e5d199f20b Use ingress/arrival for helicopter join/split wpts 2024-02-18 15:56:05 +01:00
Raffson
08c007b7bf Callsign not used when flight starts mid-mission 2024-02-16 20:47:31 +01:00
Raffson
35f6cd8f17 Plan Anti-Ship against all ship-groups of TGO 2024-02-11 16:56:10 +01:00
Raffson
89aa0985bc Multi-task fallback during configuration 2024-02-11 14:54:56 +01:00
Raffson
8ae63796cf Increase buffer around landing-zone
This aims to specifically tackle the issue where AI helicopters tend to crash into the depot of the pickup-zone
Resolves #138
2024-01-21 22:36:00 +01:00
Raffson
0b060d3110 De-spawn AI flights on RTB if start-type was set to In-Flight
Resolve #73
2024-01-21 18:40:33 +01:00
Raffson
bc26eb3f5e Fix naval aircraft not always returning to carrier 2024-01-21 13:36:38 +01:00
Raffson
d6026681ee Formatting 2024-01-20 22:29:56 +01:00
Raffson
febc901518 Refactor 2024-01-20 17:25:40 +01:00
Raffson
f548b27ac5 More accurate switch-wpt index for escort split-trigger 2024-01-20 16:56:49 +01:00
Raffson
181f8583d5 Despawn aircraft returning to off-map CPs 2024-01-20 16:56:48 +01:00
Raffson
e6e557c18a Fix some edge-cases wrt SetUnlimitedFuel 2024-01-20 16:56:35 +01:00
tmz42
d07cb46741 Waypoint changes (F15E Strike Targets and Tomcat IP) (#236)
* Change indentation of register_special_waypoints (put out of loop)

* Added Strike Targets as F-15E Mission Target points (Set/Mission 1)

* Set up check for ASM : only if non-human flight lead. Add targets to the kneeboard.

* Generate multiple sets (i-e M2.1) for situations where the number of points is more than 8.

Added check condition to kneeboard (otherwise, may result in multiple writes).

* Change name of register_special_waypoints to register_special_strike_points

Add register_special_ingress_points method for special IPs and add to the appropriate classes

* Add changelog entry for Tomcat's IP wpt

* Avoid depending on client slots for special wpts injection

---------

Co-authored-by: tmz42 <thomas.monnzie@gmail.com>
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-01-20 15:54:37 +00:00
tmz42
79b1d949ce AI unlimited fuel initial implementation (#227)
* Unlimited fuel for AI flights. For player flights, included at startup, for AI flights with join/split, applied at join/split.

* Unlimited fuel for AI flights. For player flights, included at startup, for AI flights with join/split, applied at join/split.

* Corrected default value of ai_unlimited_fuel to False in configure_behavior

* ai_unlimited_fuel : set argument based on setting and simplify activation section

* AI Unlimited Fuel : enable at start, disable at racetrack start/join, enable at racetrack end/split

* Correct typing : bool to Optional[bool]

---------

Co-authored-by: tmz42 <thomas.monnzie@gmail.com>
2024-01-06 21:04:57 +01:00
Raffson
ade81f4548 Ability to set callsigns 2023-11-18 23:06:56 +01:00
Raffson
7d314f8ee4 Lock waypoint speed if ETA is 0 & avoid negative ETAs 2023-10-21 21:27:41 +02:00
Dan Albert
a2e98f485c Remove bingo estimates from FlightPlan.
This doesn't need to be a part of FlightPlan, and it's easier to test if
it isn't. Move it out and add the tests.

It's pretty misleading to allow this in the core of the flight plan code
anything. This is an extremely unreliable estimate for most aircraft so
it should be more clearly just for briefing purposes.
2023-10-07 23:08:25 +02:00
Dan Albert
59673e7911 Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:09:25 +02:00
Dan Albert
a2630fc75f Add a real CAS ingress point.
Putting the ingress point directly on one end of the FLOT means that AI
flights won't start searching and engaging targets until they reach that
point. If the front line has advanced toward the flight's departure
airfield, it might overfly targets on its way to the IP.

Instead, place an IP for CAS the same way we place any other IP. The AI
will fly to that and start searching from there.

This also:

* Removes the midpoint waypoint, since it didn't serve any real purpose
* Names the FLOT boundary waypoints for what they actually are

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2231.
2023-10-07 18:00:07 +02:00
Dan Albert
f5f11ff3ac Add display name property for unit types.
Unlike the variant ID, this can be changed without breaking save compat.
2023-10-07 17:24:17 +02:00
Dan Albert
1760532168 Rename UnitType.name what it is: the variant ID.
This property affects safe compat because the ID is what gets preserved
in the save, but it's unfortunately also used as the display name, which
means changing the display name breaks save compat. It also prevents us
from changing display names without breaking faction definitions.

This is the first step in fixing that. The next is adding a separate
display_name property that can be updated without breaking either of
those.
2023-10-07 17:08:33 +02:00
Dan Albert
6ef3bd5095 Stop gap fix for AI speed to nav points.
This isn't a great fix for the reason I mention in the comment, but it's
quick and actually is accurate since it looks like we don't actually
handle formation speeds correctly in most cases...

This is probably as "fixed" as this is going to get for now since most
of the flight planning code is in the process of being rewritten.

https://github.com/dcs-liberation/dcs_liberation/issues/3113
2023-10-07 14:43:19 +02:00
Dan Albert
014ae5faf5 Configure target points for F-15E S4+.
We don't need explicit configuration of initial points. The plane
automatically configures any steerpoint immediately before a target
point as an initial point.

Target offset points and aim points have not been implemented because I
can't find any information the describes their intent.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3088.
2023-10-07 14:34:30 +02:00
Dan Albert
51f578b9e3 Add UI for selecting weapon laser codes.
This makes it possible to have the right laser code set for hot start
aircraft that (typically) do not allow changing laser codes when the
engine is on.
2023-10-07 14:13:51 +02:00
Raffson
1ce8d9c2b7 Cleanup after cherry-pick 2023-10-07 14:08:53 +02:00
Dan Albert
177f357492 Pre-allocate laser codes for FLOTs and flights. 2023-10-07 14:06:12 +02:00
Dan Albert
723e191f10 Create a checked, releasable type for laser codes.
The release behavior isn't used yet, but I'm working on pre-allocating
laser codes for front lines and flights to make it easier for players to
pick the laser codes for their weapons.
2023-10-07 14:03:36 +02:00
MetalStormGhost
1ebc289fb7 Added support for ground power truck types in farp_truck_types_for_country(). Aircraft which require ground power to start, when ground power trucks have been disabled for performance reasons, will now be warm started automatically. 2023-10-06 07:58:06 +02:00
Raffson
d4eefd0b55 Streamlining 2023-10-01 21:56:30 +02:00
Dan Albert
279572ae09 Add tests for LaserCodeRegistry, clean up.
* Store a deque rather than an iterator so it can be pickled
* Remove mangling from staticmethod (and rename now that it's no longer
  a generator)
* Rename "get" to "alloc" to make the mutation clear
* Move to its own package (the changes I'm working on make this no
  longer mission generator specific)
* Remove useless exception class. It's never caught so the unique type
  isn't needed
2023-10-01 20:11:37 +02:00
Dan Albert
485229b92f Allow per pilot loadouts and properties.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3092.
2023-10-01 20:10:16 +02:00
zhexu14
a0fdfa11e2 Fix anti-runway task generation for LGBs. 2023-10-01 19:26:24 +02:00
Dan Albert
f89ac52bf3 Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
2023-10-01 19:26:20 +02:00
Raffson
167d048232 Fix bug in reserve freqs & tacan 2023-09-17 14:25:46 +02:00
Raffson
59871ac36c Only assign TACAN to compatible tankers 2023-09-17 14:25:46 +02:00
Raffson
09749bc088 Use squadron radio_preset freq as flight freq if present 2023-09-08 20:38:17 +02:00
Raffson
9b9905c5a3 Tweaking helicopter stuff 2023-08-19 21:10:26 +02:00
Raffson
789806637c Improve escort logic for helicopters
Babysteps #88
2023-08-15 21:50:20 +02:00
Raffson
7baba78bca Allow radio-presets to be defined in squadron files 2023-08-13 13:16:43 +02:00
MetalStormGhost
115bd8b22a Convert OPFOR untasked flights into Client slots
Added a new option in settings: Convert untasked OPFOR aircraft into client slots. This option will essentially convert the campaign into a sort of team vs. team engagement. There is still no way to plan the OPFOR missions, and there are no guarantees that there even will be any untasked aircraft available for players.

Split the Disable idle aircraft at airfields setting into Disable untasked BLUFOR aircraft at airfields and Disable untasked OPFOR aircraft at airfields.
2023-08-06 12:43:34 +02:00
MetalStormGhost
c51fa5c1df CAS engagement range
New option in Settings: CAS engagement range (nmi)
2023-08-02 19:22:15 +02:00
Raffson
0bc645edeb Have DEAD flights fire all their HARMs first 2023-07-23 00:06:35 +02:00
Raffson
9d63bcbf69 Improve STRIKE where possible
- Plan number of aircraft more accurately
- Fine-tuning ingress waypoint tasks
- Add lineup waypoint for STRIKE flights, 10NM in front of ingress on the same heading as the target
2023-07-16 18:22:29 +02:00
Raffson
009debd4e8 Follow-up on dependency updates 2023-07-15 17:55:55 +02:00