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
This commit is contained in:
Dan Albert
2021-10-22 11:45:06 -07:00
parent c8f30b3289
commit 5db1b94ac4
38 changed files with 910 additions and 145 deletions

View File

@@ -43,11 +43,11 @@ from .closestairfields import ObjectiveDistanceCache
from game.ato.flighttype import FlightType
from game.ato.flightwaypointtype import FlightWaypointType
from game.ato.flightwaypoint import FlightWaypoint
from game.ato.flight import Flight
from .traveltime import GroundSpeed, TravelTime
from .waypointbuilder import StrikeTarget, WaypointBuilder
if TYPE_CHECKING:
from game.ato.flight import Flight
from game.ato.package import Package
from game.coalition import Coalition
from game.threatzones import ThreatZones

View File

@@ -6,19 +6,17 @@ from datetime import timedelta
from typing import TYPE_CHECKING
from dcs.mapping import Point
from dcs.unittype import FlyingType
from game.utils import (
Distance,
SPEED_OF_SOUND_AT_SEA_LEVEL,
Speed,
kph,
mach,
meters,
)
from game.ato.flight import Flight
if TYPE_CHECKING:
from game.ato.flight import Flight
from game.ato.package import Package

View File

@@ -18,10 +18,6 @@ from dcs.mapping import Point
from dcs.unit import Unit
from dcs.unitgroup import VehicleGroup, ShipGroup
if TYPE_CHECKING:
from game.coalition import Coalition
from game.transfers import MultiGroupTransport
from game.theater import (
ControlPoint,
MissionTarget,
@@ -31,7 +27,11 @@ from game.theater import (
from game.utils import Distance, meters, nautical_miles
from game.ato.flightwaypointtype import FlightWaypointType
from game.ato.flightwaypoint import FlightWaypoint
from game.ato.flight import Flight
if TYPE_CHECKING:
from game.ato.flight import Flight
from game.coalition import Coalition
from game.transfers import MultiGroupTransport
@dataclass(frozen=True)