1106 Commits

Author SHA1 Message Date
MetalStormGhost
88bc4fd852
F-104 mod support. 2021-12-22 13:01:51 -08:00
Dan Albert
515efd0598 Draw frozen combat on the map.
Very basic display. Draws the engagement footprint for air-to-air
combat, a line from the flight to the target for IP, and lines from SAMs
to their target for air defense.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:56:25 -08:00
Dan Albert
fb10a8d28e Add frozen combat modelling.
This doesn't do anything yet, but sets up the data model handling for
frozen combat. The next step is to show combat in the map view, since
that will be helpful when debugging the step after that one: resolving
frozen combat.

This would benefit from caching the Shapely data for SAM threat zones.
Right now it's generating them once per tick and the stuttering is
visible at max speed.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:28 -08:00
Dan Albert
ce4628b64f Separate combat as a distinct flight state.
Will be used later to simulate combat.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:27 -08:00
RndName
c643adf57b
Fix empty convoy when transfer is not completable
fixes #1553
2021-12-13 20:45:15 +01:00
RndName
2c21644a2c
Add Easy Communication Setting
allow to enforce the mission setting for easy communication
implements #1425
2021-12-12 01:20:17 +01:00
MetalStormGhost
d11d3b58f7
Add option to limit convoy travel distances.
CPU load seems to scale with route length, so add an option to limit
the length of the convoy route. The tradeoff is that the performance
sensitive route won't necessarily be a correct route.
2021-11-27 01:40:06 -08:00
RndName
676a25631b
Generate unit_id for helipads
fixes mission scripting error (1748)
2021-11-22 15:05:12 +01:00
Dan Albert
8c2e25339f More Python 3.10 compat. 2021-11-21 11:30:39 -08:00
Dan Albert
ef73f712ec More Python 3.10 compat. 2021-11-21 11:28:51 -08:00
Dan Albert
12f420f50e Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in
collections.abc.
2021-11-20 18:49:14 -08:00
Dan Albert
66c8b96c9a Update dependencies. 2021-11-20 18:45:27 -08:00
Dan Albert
1dfc625f79 Clarify display of start times. 2021-11-18 23:25:59 -08:00
Dan Albert
0c731e4856 Fix start time used for the kneeboard.
The times we're given are an offset from the turn start, not the mission
start.
2021-11-18 23:13:48 -08:00
Dan Albert
9c0f72921f Randomly offset mid-mission spawns.
This is what we do for the old in-air starts too. It's not perfect but
it's not a regression either.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1754
2021-11-18 17:07:24 -08:00
Dan Albert
45b7b4b2cb Fix incorrect radio range for AN/ARC-222.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1740
2021-11-14 13:34:32 -08:00
Khopa
59d178f99e Fixed mypy errors 2021-11-14 22:05:23 +01:00
Khopa
c59c87c3e8 Now displaying Liberation control points, paths, and frontlines in the mission editor / F10 map. (WIP) 2021-11-14 21:58:56 +01:00
SnappyComebacks
532ac261ff
Ability to plan tanker recovery for strike like flights (#1729)
* Initial refueling definitions.

* Adding refuel definitions.

* Initial functionality changes

* Regenerate package when adding refueling flight.

* Recursively change package waypoint.

* Fix mypy errors.

* Regenerate flight plans when tanker is added to package.

* Give tanker better starting position on package recovery.

* Add TOT calculation for refueling waypoint.

* Timing changes to Strike split point and Refueling start time.

* Add correct waypoint builder for refuel in tarcap and sweep.  Remove restrict afterburner on refuel point.

* Always generate a refuel point for a package.

* Less arbitrary altitude in Refuel track start time calculation.

* Refueling waypoint no longer optional.

* Fix mypy gen error.

* Better discrimination of which tanker flight plan to make.

* Remove refuel tot calculations.

* Remove package regeneration on tanker flight addition.
2021-11-12 21:37:34 -07:00
Dan Albert
d31f0e22e3 Show the status of each flight in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-07 11:27:50 -08:00
Dan Albert
e9634b7066 Prevent assigning fixed wing squadrons to FARPs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1671
2021-11-06 18:34:23 -07:00
Dan Albert
c60bba1166 Fix crash when planning ferry flights.
At some point this needed to be type-only to resolve a circular import,
but that's fixed now.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1698
2021-11-06 17:36:43 -07:00
Dan Albert
35900c2350 Fix fixed wing squadrons retreating to FARPs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1615
2021-11-06 16:53:55 -07:00
Dan Albert
e6fc817f49 Use uncontrolled for late shore starts.
These should be uncontrolled rather than late activation so that they
are present in the parking area as OCA targets. This bug was introduced
as a mistranslation when I was moving from strings to StartType.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1695
2021-11-06 16:40:09 -07:00
Dan Albert
7a18d160c8 Add missing NavalControlPoint case for BAI.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1702
2021-11-06 16:35:04 -07:00
Dan Albert
03430a4df5 Update the UI to show sim state.
https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
87bf3110c8 Add play/pause features to the sim.
There's no UI feedback for this yet other than the log messages.

https://github.com/dcs-liberation/dcs_liberation/issues/1704
2021-11-02 23:34:51 -07:00
Dan Albert
748d80ff3b Re-flip fast-forward option.
This was set to default on by mistake (turned on for debugging and
forgot to turn off before check in). The option itself may be going away
soon in favor of explicit buttons, but keep the experimental feature off
by default for now.
2021-11-02 23:22:35 -07:00
Dan Albert
85cbffb845 Update develop to 6.0. 2021-10-30 15:11:29 -07:00
Dan Albert
dac3533654 Tone down the out-of-parking message.
There's nothing the user can do about this and it's somewhat expected,
so downgrade to a warning so users don't think it's a bug.

If we ever get around to doing more cautious parking allocation this
should become a generation-halting error, but until then we expect it to
happen somewhat often.
2021-10-30 13:12:11 -07:00
Dan Albert
2699a38f7b Use stored alignment for the F-14A.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1689
2021-10-30 13:01:53 -07:00
Dan Albert
1a3b8d1dd6 Reduce fuel for fast-forwarded player flights.
This only has an effect for aircraft for which we have fuel consumption
data, but that's fine.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-30 11:37:06 -07:00
Dan Albert
b2cbf4b6f4 Halt sim on A2A contact.
https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-30 10:18:49 -07:00
Dan Albert
9839787b6d Interrupt fast-forward on air defense contact.
https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-26 23:06:58 -07:00
Dan Albert
cd0c0f1b01 Fix missing waypoint generation for most flights.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1693
2021-10-26 19:29:50 -07:00
Dan Albert
5db1b94ac4 Add option to fast forward to first contact.
This is the first step in a larger project to add play/pause buttons to
the Liberation UI so the mission can be generated at any point.
docs/design/turnless.md describes the plan.

This adds an option to fast forward the turn to first contact before
generating the mission. None of that is reflected in the UI (for now),
but the miz will be generated with many flights in the air.

For now "first contact" means as soon as any flight reaches its IP. I'll
follow up to add threat checking so that air-to-air combat also triggers
this, as will entering a SAM's threat zone.

This also includes an option to halt fast-forward whenever a player
flight reaches a certain mission-prep phase. This can be used to avoid
fast forwarding past the player's startup time, taxi time, or takeoff
time. By default this option is disabled so player aircraft may start in
the air (possibly even at their IP if they're the first mission to reach
IP).

Fuel states do not currently account for distance traveled during fast
forward. That will come later.

https://github.com/dcs-liberation/dcs_liberation/issues/1681
2021-10-24 17:40:45 -07:00
Dan Albert
c8f30b3289 Split aircraft spawning into its own class. 2021-10-23 20:51:39 -07:00
Dan Albert
88b4039e47 Clean up AircraftGenerator.
This class does far too many things and the file is huge. Split it up
into a few more classes.
2021-10-23 20:18:40 -07:00
Dan Albert
14769c0350 Fix type errors with Flight.start_type in the UI.
Also reorders the enum so that iteration shows the order we want in the
UI by default.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1672
2021-10-23 12:19:20 -07:00
Dan Albert
b728fcc2d6 Clean up mission result handling. 2021-10-22 14:36:51 -07:00
Dan Albert
74291271e3 Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static
class.
2021-10-22 13:48:43 -07:00
Dan Albert
b0787d9a3f Build a proper type for StartType. 2021-10-22 11:42:13 -07:00
Dan Albert
be69d17345 Move Flight and its related components out of gen. 2021-10-22 11:30:28 -07:00
Dan Albert
46bf952562 Add Forrestal support, use in US 1975.
https://github.com/dcs-liberation/dcs_liberation/issues/1657
2021-10-22 10:11:15 -07:00
Dan Albert
6dae5b98d5 Fix carrier option not taking effect this turn.
This really shouldn't need to happen but I don't feel like rewriting the
culling code right now. There's no reason for these to be persisted to
the Game at all, we should be generating these once they're needed.
2021-10-21 20:05:07 -07:00
Dan Albert
626740366b Port the mission generator settings to auto.
Done now. Not porting the cheat menu because it contains non-settings
elements as well.
2021-10-21 19:54:58 -07:00
Dan Albert
a618f00662 Port the campaign management page to auto.
Also fixes the oversight in the previous commit where float options were
not saved when changed.
2021-10-21 19:16:47 -07:00
Dan Albert
7bec4c62f7 Generate settings pages automatically.
This adds metadata to settings fields that can be used to automatically
generate the settings window. For now I have replaced the Difficulty
page. Will follow up to replace the others.
2021-10-21 18:30:56 -07:00
Dan Albert
d5eaa4d091 Add a preferred_start_date for campaigns.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1079
2021-10-17 17:37:23 -07:00
Dan Albert
b174e668f4 Fix day being off-by-one on turn zero.
Doesn't have any real effect since no mission can be generated for that
turn, but shows up wrong in the top bar.
2021-10-17 17:33:29 -07:00