mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Replace mission planning UI.
Mission planning has been completely redone. Missions are now planned by right clicking the target area and choosing "New package". A package can include multiple flights for the same objective. Right now the automatic flight planner is only fragging single-flight packages in the same manner that it used to, but that can be improved now. The air tasking order (ATO) is now the left bar of the main UI. This shows every fragged package, and the flights in the selected package. The info bar that was previously on the left is now a smaller bar at the bottom of the screen. The old "Mission Planning" button is now just the "Take Off" button. The flight plan display no longer shows enemy flight plans. That could be re-added if needed, probably with a difficulty/cheat option. Aircraft inventories have been disassociated from the Planner class. Aircraft inventories are now stored globally in the Game object. Save games made prior to this update will not be compatible do to the changes in how aircraft inventories and planned flights are stored.
This commit is contained in:
@@ -46,7 +46,7 @@ COAST_DR_W = [135, 180, 225, 315]
|
||||
|
||||
class ConflictTheater:
|
||||
terrain = None # type: dcs.terrain.Terrain
|
||||
controlpoints = None # type: typing.Collection[ControlPoint]
|
||||
controlpoints = None # type: typing.List[ControlPoint]
|
||||
|
||||
reference_points = None # type: typing.Dict
|
||||
overview_image = None # type: str
|
||||
|
||||
@@ -3,11 +3,17 @@ import typing
|
||||
from enum import Enum
|
||||
|
||||
from dcs.mapping import *
|
||||
from dcs.terrain import Airport
|
||||
from dcs.ships import CVN_74_John_C__Stennis, LHA_1_Tarawa, CV_1143_5_Admiral_Kuznetsov, Type_071_Amphibious_Transport_Dock
|
||||
from dcs.ships import (
|
||||
CVN_74_John_C__Stennis,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
LHA_1_Tarawa,
|
||||
Type_071_Amphibious_Transport_Dock,
|
||||
)
|
||||
from dcs.terrain.terrain import Airport
|
||||
|
||||
from game import db
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from .missiontarget import MissionTarget
|
||||
from .theatergroundobject import TheaterGroundObject
|
||||
|
||||
|
||||
@@ -19,7 +25,7 @@ class ControlPointType(Enum):
|
||||
FOB = 5 # A FOB (ground units only)
|
||||
|
||||
|
||||
class ControlPoint:
|
||||
class ControlPoint(MissionTarget):
|
||||
|
||||
id = 0
|
||||
position = None # type: Point
|
||||
@@ -183,4 +189,3 @@ class ControlPoint:
|
||||
if g.obj_name == obj_name:
|
||||
found.append(g)
|
||||
return found
|
||||
|
||||
|
||||
18
theater/missiontarget.py
Normal file
18
theater/missiontarget.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from dcs.mapping import Point
|
||||
|
||||
|
||||
class MissionTarget(ABC):
|
||||
# TODO: These should just be required objects to the constructor
|
||||
# The TheatherGroundObject class is difficult to modify because it's
|
||||
# generated data that's pickled ahead of time.
|
||||
@property
|
||||
@abstractmethod
|
||||
def name(self) -> str:
|
||||
"""The name of the mission target."""
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def position(self) -> Point:
|
||||
"""The position of the mission target."""
|
||||
@@ -1,6 +1,11 @@
|
||||
from dcs.mapping import Point
|
||||
from typing import List
|
||||
import uuid
|
||||
|
||||
from dcs.mapping import Point
|
||||
|
||||
from .missiontarget import MissionTarget
|
||||
|
||||
|
||||
NAME_BY_CATEGORY = {
|
||||
"power": "Power plant",
|
||||
"ammo": "Ammo depot",
|
||||
@@ -59,7 +64,7 @@ CATEGORY_MAP = {
|
||||
}
|
||||
|
||||
|
||||
class TheaterGroundObject:
|
||||
class TheaterGroundObject(MissionTarget):
|
||||
cp_id = 0
|
||||
group_id = 0
|
||||
object_id = 0
|
||||
@@ -93,3 +98,7 @@ class TheaterGroundObject:
|
||||
|
||||
def matches_string_identifier(self, id):
|
||||
return self.string_identifier == id
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.obj_name
|
||||
|
||||
Reference in New Issue
Block a user