mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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.
105 lines
2.7 KiB
Python
105 lines
2.7 KiB
Python
from typing import List
|
|
import uuid
|
|
|
|
from dcs.mapping import Point
|
|
|
|
from .missiontarget import MissionTarget
|
|
|
|
|
|
NAME_BY_CATEGORY = {
|
|
"power": "Power plant",
|
|
"ammo": "Ammo depot",
|
|
"fuel": "Fuel depot",
|
|
"aa": "AA Defense Site",
|
|
"ware": "Warehouse",
|
|
"farp": "FARP",
|
|
"fob": "FOB",
|
|
"factory": "Factory",
|
|
"comms": "Comms. tower",
|
|
"oil": "Oil platform",
|
|
"derrick": "Derrick",
|
|
"ww2bunker": "Bunker",
|
|
"village": "Village",
|
|
"allycamp": "Camp"
|
|
}
|
|
|
|
ABBREV_NAME = {
|
|
"power": "PLANT",
|
|
"ammo": "AMMO",
|
|
"fuel": "FUEL",
|
|
"aa": "AA",
|
|
"ware": "WARE",
|
|
"farp": "FARP",
|
|
"fob": "FOB",
|
|
"factory": "FACTORY",
|
|
"comms": "COMMST",
|
|
"oil": "OILP",
|
|
"derrick": "DERK",
|
|
"ww2bunker": "BUNK",
|
|
"village": "VLG",
|
|
"allycamp": "CMP",
|
|
}
|
|
|
|
CATEGORY_MAP = {
|
|
|
|
# Special cases
|
|
"CARRIER": ["CARRIER"],
|
|
"LHA": ["LHA"],
|
|
"aa": ["AA"],
|
|
|
|
# Buildings
|
|
"power": ["Workshop A", "Electric power box", "Garage small A", "Farm B", "Repair workshop", "Garage B"],
|
|
"ware": ["Warehouse", "Hangar A"],
|
|
"fuel": ["Tank", "Tank 2", "Tank 3", "Fuel tank"],
|
|
"ammo": [".Ammunition depot", "Hangar B"],
|
|
"farp": ["FARP Tent", "FARP Ammo Dump Coating", "FARP Fuel Depot", "FARP Command Post", "FARP CP Blindage"],
|
|
"fob": ["Bunker 2", "Bunker 1", "Garage small B", ".Command Center", "Barracks 2"],
|
|
"factory": ["Tech combine", "Tech hangar A"],
|
|
"comms": ["TV tower", "Comms tower M"],
|
|
"oil": ["Oil platform"],
|
|
"derrick": ["Oil derrick", "Pump station", "Subsidiary structure 2"],
|
|
"ww2bunker": ["Siegfried Line", "Fire Control Bunker", "SK_C_28_naval_gun", "Concertina Wire", "Czech hedgehogs 1"],
|
|
"village": ["Small house 1B", "Small House 1A", "Small warehouse 1"],
|
|
"allycamp": [],
|
|
}
|
|
|
|
|
|
class TheaterGroundObject(MissionTarget):
|
|
cp_id = 0
|
|
group_id = 0
|
|
object_id = 0
|
|
dcs_identifier = None # type: str
|
|
is_dead = False
|
|
airbase_group = False
|
|
heading = 0
|
|
position = None # type: Point
|
|
groups = []
|
|
obj_name = ""
|
|
sea_object = False
|
|
uuid = uuid.uuid1()
|
|
|
|
def __init__(self, category: str):
|
|
self.category = category
|
|
|
|
@property
|
|
def string_identifier(self):
|
|
return "{}|{}|{}|{}".format(self.category, self.cp_id, self.group_id, self.object_id)
|
|
|
|
@property
|
|
def group_identifier(self) -> str:
|
|
return "{}|{}".format(self.category, self.group_id)
|
|
|
|
@property
|
|
def name_abbrev(self) -> str:
|
|
return ABBREV_NAME[self.category]
|
|
|
|
def __str__(self):
|
|
return NAME_BY_CATEGORY[self.category]
|
|
|
|
def matches_string_identifier(self, id):
|
|
return self.string_identifier == id
|
|
|
|
@property
|
|
def name(self) -> str:
|
|
return self.obj_name
|