Compare commits

..

1 Commits

Author SHA1 Message Date
Dan Albert
00ca7d0b4d Merge pull request #1208 from dcs-liberation/develop-3.x
Release 3.0.0.
2021-06-10 23:58:41 -07:00
26 changed files with 33 additions and 494 deletions

View File

@@ -1,13 +1,3 @@
# 3.1.0
## Features/Improvements
## Fixes
* **[Campaign AI]** Fix procurement for factions that lack some unit types.
* **[Mission Generation]** Fixed problem with mission load when control point name contained an apostrophe.
* **[UI]** Made non-interactive map elements less obstructive.
# 3.0.0
Saves from 2.5 are not compatible with 3.0.

View File

@@ -593,7 +593,8 @@ class Operation:
zone = data["zone"]
laserCode = data["laserCode"]
dcsUnit = data["dcsUnit"]
lua += f" {{dcsGroupName='{dcsGroupName}', callsign='{callsign}', zone={repr(zone)}, laserCode='{laserCode}', dcsUnit='{dcsUnit}' }}, \n"
lua += f" {{dcsGroupName='{dcsGroupName}', callsign='{callsign}', zone='{zone}', laserCode='{laserCode}', dcsUnit='{dcsUnit}' }}, \n"
# lua += f" {{name='{dcsGroupName}', description='JTAC {callsign} ', information='Laser:{laserCode}', jtac={laserCode} }}, \n"
lua += "}"
# Process the Target Points

View File

@@ -59,18 +59,6 @@ class ProcurementAi:
def calculate_ground_unit_budget_share(self) -> float:
armor_investment = 0
aircraft_investment = 0
# faction has no ground units
if (
len(self.faction.artillery_units) == 0
and len(self.faction.frontline_units) == 0
):
return 0
# faction has no planes
if len(self.faction.aircrafts) == 0:
return 1
for cp in self.owned_points:
cp_ground_units = cp.allocated_ground_units(self.game.transfers)
armor_investment += cp_ground_units.total_value
@@ -152,11 +140,6 @@ class ProcurementAi:
self.faction.artillery_units
)
of_class = set(unit_class.unit_list) & faction_units
# faction has no access to needed unit type, take a random unit
if not of_class:
of_class = faction_units
affordable_units = [u for u in of_class if db.PRICES[u] <= budget]
if not affordable_units:
return None

View File

@@ -76,7 +76,7 @@ class Pilot:
@dataclass
class Squadron:
name: str
nickname: Optional[str]
nickname: str
country: str
role: str
aircraft: Type[FlyingType]
@@ -99,8 +99,6 @@ class Squadron:
self.auto_assignable_mission_types = set(self.mission_types)
def __str__(self) -> str:
if self.nickname is None:
return self.name
return f'{self.name} "{self.nickname}"'
def claim_available_pilot(self) -> Optional[Pilot]:
@@ -217,7 +215,7 @@ class Squadron:
return Squadron(
name=data["name"],
nickname=data.get("nickname"),
nickname=data["nickname"],
country=data["country"],
role=data["role"],
aircraft=unit_type,

View File

@@ -597,8 +597,7 @@ class EwrGroundObject(TheaterGroundObject):
@property
def group_name(self) -> str:
# Prefix the group names with the side color so Skynet can find them.
# Use Group Id and uppercase EWR
return f"{self.faction_color}|EWR|{self.group_id}"
return f"{self.faction_color}|{super().group_name}"
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
from gen.flights.flight import FlightType

View File

@@ -2,7 +2,7 @@ from pathlib import Path
def _build_version_string() -> str:
components = ["3.1.0"]
components = ["3.0"]
build_number_path = Path("resources/buildnumber")
if build_number_path.exists():
with build_number_path.open("r") as build_number_file:

View File

@@ -42,14 +42,14 @@ class SquadronDelegate(TwoColumnRowDelegate):
def text_for(self, index: QModelIndex, row: int, column: int) -> str:
if (row, column) == (0, 0):
return self.squadron(index).name
return self.air_wing_model.data(index, Qt.DisplayRole)
elif (row, column) == (0, 1):
squadron = self.air_wing_model.data(index, AirWingModel.SquadronRole)
return db.unit_get_expanded_info(
squadron.country, squadron.aircraft, "name"
)
elif (row, column) == (1, 0):
return self.squadron(index).nickname or ""
return self.squadron(index).nickname
elif (row, column) == (1, 1):
squadron = self.squadron(index)
alive = squadron.number_of_living_pilots

View File

@@ -1,11 +0,0 @@
{
"name": "Syria - Full Map",
"theater": "Syria",
"authors": "Plob",
"recommended_player_faction": "Bluefor Modern",
"recommended_enemy_faction": "Syria 2011",
"description": "<p>Syria Full map, designed for groups of 4-12 players.</p>",
"miz": "syria_full_map.miz",
"performance": 3,
"version": "6.0"
}

View File

@@ -0,0 +1,8 @@
{
"name": "Syria - Full Map",
"theater": "Syria",
"authors": "Hawkmoon",
"description": "<p>Full map of Syria</p><p><strong>Note :&nbsp;</strong></p><p>For a better early game experience, it is suggested to give the AI an high amount of starting money.</p>",
"miz": "syria_full_map_remastered.miz",
"performance": 3
}

Binary file not shown.

View File

@@ -139,20 +139,6 @@
"hertz": 117700000,
"channel": null
},
{
"name": "MUT",
"callsign": "MUT",
"beacon_type": 4,
"hertz": 112300000,
"channel": null
},
{
"name": "DHEKELIA",
"callsign": "DKA",
"beacon_type": 10,
"hertz": 343000,
"channel": null
},
{
"name": "",
"callsign": "IADA",
@@ -171,7 +157,7 @@
"name": "ADANA",
"callsign": "ADN",
"beacon_type": 11,
"hertz": 395000,
"hertz": 395000000,
"channel": null
},
{
@@ -181,41 +167,6 @@
"hertz": 112700000,
"channel": null
},
{
"name": "",
"callsign": "IAK",
"beacon_type": 14,
"hertz": 109700000,
"channel": null
},
{
"name": "",
"callsign": "IAK",
"beacon_type": 15,
"hertz": 109700000,
"channel": null
},
{
"name": "Akrotiri",
"callsign": "AKR",
"beacon_type": 6,
"hertz": 116000000,
"channel": 107
},
{
"name": "Akrotiri",
"callsign": "AKR",
"beacon_type": 3,
"hertz": 116000000,
"channel": 107
},
{
"name": "AKROTIRI",
"callsign": "AK",
"beacon_type": 10,
"hertz": 365000,
"channel": null
},
{
"name": "KALDE",
"callsign": "KAD",
@@ -269,7 +220,7 @@
"name": "BEIRUT",
"callsign": "BOD",
"beacon_type": 11,
"hertz": 351000,
"hertz": 351000000,
"channel": null
},
{
@@ -304,14 +255,14 @@
"name": "DAMASCUS",
"callsign": "DAL",
"beacon_type": 11,
"hertz": 342000,
"hertz": 342000000,
"channel": null
},
{
"name": "ABYAD",
"callsign": "ABD",
"beacon_type": 10,
"hertz": 264,
"hertz": 264000,
"channel": null
},
{
@@ -321,69 +272,6 @@
"hertz": 111100000,
"channel": null
},
{
"name": "ERCAN",
"callsign": "ECN",
"beacon_type": 4,
"hertz": 117000000,
"channel": null
},
{
"name": "",
"callsign": "IGNP",
"beacon_type": 14,
"hertz": 109100000,
"channel": null
},
{
"name": "",
"callsign": "IGNP",
"beacon_type": 15,
"hertz": 109100000,
"channel": null
},
{
"name": "",
"callsign": "IGZP",
"beacon_type": 14,
"hertz": 108500000,
"channel": null
},
{
"name": "",
"callsign": "IGZP",
"beacon_type": 15,
"hertz": 108500000,
"channel": null
},
{
"name": "ALANYA/GAZIPASA",
"callsign": "GZP",
"beacon_type": 4,
"hertz": 114200000,
"channel": null
},
{
"name": "GAZIPASA/ALANYA",
"callsign": "GZP",
"beacon_type": 10,
"hertz": 316000,
"channel": null
},
{
"name": "FAMAGUSTA_GECITKALE",
"callsign": "GKE",
"beacon_type": 4,
"hertz": 114300000,
"channel": null
},
{
"name": "GECITKALE",
"callsign": "GKE",
"beacon_type": 10,
"hertz": 435000,
"channel": null
},
{
"name": "HATAY",
"callsign": "HTY",
@@ -429,8 +317,8 @@
{
"name": "INCIRLIC",
"callsign": "DAN",
"beacon_type": 5,
"hertz": null,
"beacon_type": 6,
"hertz": 108400000,
"channel": 21
},
{
@@ -461,34 +349,6 @@
"hertz": 111700000,
"channel": null
},
{
"name": "",
"callsign": "ILC",
"beacon_type": 14,
"hertz": 110300000,
"channel": null
},
{
"name": "Larnaca",
"callsign": "LCA",
"beacon_type": 4,
"hertz": 112800000,
"channel": null
},
{
"name": "",
"callsign": "ILC",
"beacon_type": 15,
"hertz": 110300000,
"channel": null
},
{
"name": "Larnaca",
"callsign": "LCA",
"beacon_type": 9,
"hertz": 432000,
"channel": null
},
{
"name": "",
"callsign": "IBA",
@@ -513,8 +373,8 @@
{
"name": "LATAKIA",
"callsign": "LTK",
"beacon_type": 9,
"hertz": 414000,
"beacon_type": 11,
"hertz": 414000000,
"channel": null
},
{
@@ -531,41 +391,6 @@
"hertz": 337000,
"channel": null
},
{
"name": "Pafos",
"callsign": "PHA",
"beacon_type": 10,
"hertz": 328000,
"channel": null
},
{
"name": "",
"callsign": "IPA",
"beacon_type": 15,
"hertz": 108900000,
"channel": null
},
{
"name": "",
"callsign": "IPA",
"beacon_type": 14,
"hertz": 108900000,
"channel": null
},
{
"name": "Pafos",
"callsign": "IPA",
"beacon_type": 3,
"hertz": 108900000,
"channel": null
},
{
"name": "Pafos",
"callsign": "PHA",
"beacon_type": 4,
"hertz": 117900000,
"channel": null
},
{
"name": "RAMATDAVID",
"callsign": "RMD",
@@ -573,27 +398,6 @@
"hertz": 368000,
"channel": null
},
{
"name": "RAMATDAVID",
"callsign": "RMD",
"beacon_type": 6,
"hertz": 113700000,
"channel": 84
},
{
"name": "",
"callsign": "RMD",
"beacon_type": 14,
"hertz": 111100000,
"channel": null
},
{
"name": "",
"callsign": "RMD",
"beacon_type": 15,
"hertz": 111100000,
"channel": null
},
{
"name": "Cheka",
"callsign": "CAK",

View File

@@ -5,16 +5,12 @@
"description": "<p>Hellenic army in the mid/late 2000s.</p>",
"locales": ["el_GR"],
"aircrafts": [
"AH_64A",
"C_130",
"F_16C_50",
"F_4E",
"M_2000C",
"Mirage_2000_5",
"UH_1H"
],
"awacs": [
"E_3A"
"UH_1H",
"AH_64A"
],
"tankers": [
"KC130"
@@ -42,13 +38,13 @@
],
"air_defenses": [
"HawkGenerator",
"PatriotGenerator",
"SA8Generator",
"SA10Generator",
"SA15Generator",
"ZU23Generator"
],
"ewrs": [
"HawkEwrGenerator",
"FlatFaceGenerator"
],
"navy_generators": [

View File

@@ -5,20 +5,17 @@
"description": "<p>Turkish army in the mid/late 2000s.</p>",
"locales": ["tr_TR"],
"aircrafts": [
"AH_1W",
"C_130",
"CH_47D",
"F_16C_50",
"F_4E",
"OH_58D",
"UH_1H",
"UH_60A"
"AH_1W"
],
"awacs": [
"E_3A"
],
"tankers": [
"KC_135"
"KC_135",
"KC130"
],
"frontline_units": [
"MBT_Leopard_2A4_Trs",
@@ -26,12 +23,9 @@
"MBT_M60A3_Patton",
"Scout_Cobra",
"APC_BTR_80",
"APC_M113",
"SAM_Avenger__Stinger"
],
"artillery_units": [
"MLRS_M270_227mm",
"SPH_M109_Paladin_155mm",
"SPH_T155_Firtina_155mm"
],
"logistics_units": [

View File

@@ -1,21 +0,0 @@
---
name: 191. Filo
nickname: Kobra
country: Turkey
role: Strike Fighter
aircraft: F-16C_50
livery: THK_191_Filo
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 335 Squadron
nickname: Tiger
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_335_Tiger
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 336 Squadron
nickname: Olympus
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_336_Olympus
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 337 Squadron
nickname: Ghost
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_337_Ghost
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 340 Squadron
nickname: Fox
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_340_Fox
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 341 Squadron
nickname: Arrow
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_341_Arrow
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 343 Squadron
nickname: Star
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_343_Star
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 346 Squadron
nickname: Jason
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_346_Jason
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 347 Squadron
nickname: Perseus
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_347_Perseus
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -1,21 +0,0 @@
---
name: 330 Squadron
nickname: Thunder
country: Greece
role: Multirole Fighter
aircraft: F-16C_50
livery: HAF_ 330_Thunder
mission_types:
- BAI
- BARCAP
- CAS
- DEAD
- Escort
- Intercept
- OCA/Aircraft
- OCA/Runway
- SEAD
- SEAD Escort
- Strike
- Fighter sweep
- TARCAP

View File

@@ -428,7 +428,6 @@ class ControlPoint {
return L.polyline([this.cp.position, destination], {
color: Colors.Green,
weight: 1,
interactive: false,
});
}
@@ -520,7 +519,6 @@ class TheaterGroundObject {
color: detectionColor,
fill: false,
weight: 1,
interactive: false,
}).addTo(detectionLayer);
});
@@ -530,7 +528,6 @@ class TheaterGroundObject {
color: threatColor,
fill: false,
weight: 2,
interactive: false,
}).addTo(threatLayer);
});
}
@@ -740,15 +737,12 @@ class Flight {
const color = this.flight.blue ? Colors.Blue : Colors.Red;
const layer = this.flightPlanLayer();
if (this.flight.selected) {
this.path = L.polyline(path, {
color: Colors.Highlight,
interactive: false,
})
this.path = L.polyline(path, { color: Colors.Highlight })
.addTo(selectedFlightPlansLayer)
.addTo(layer)
.addTo(allFlightPlansLayer);
} else {
this.path = L.polyline(path, { color: color, interactive: false })
this.path = L.polyline(path, { color: color })
.addTo(layer)
.addTo(allFlightPlansLayer);
}
@@ -766,7 +760,6 @@ class Flight {
this.commitBoundary = L.polyline(this.flight.commitBoundary, {
color: Colors.Highlight,
weight: 1,
interactive: false,
})
.addTo(selectedFlightPlansLayer)
.addTo(this.flightPlanLayer())
@@ -826,7 +819,6 @@ function _drawThreatZones(zones, layer, player) {
fill: true,
fillOpacity: 0.4,
noClip: true,
interactive: false,
}).addTo(layer);
}
}
@@ -882,7 +874,6 @@ function drawNavmesh(zones, layer) {
color: "#000000",
weight: 1,
fill: false,
interactive: false,
}).addTo(layer);
}
}
@@ -905,7 +896,6 @@ function drawMapZones() {
color: "#344455",
fillColor: "#344455",
fillOpacity: 1,
interactive: false,
}).addTo(seaZones);
}
@@ -914,7 +904,6 @@ function drawMapZones() {
color: "#969696",
fillColor: "#4b4b4b",
fillOpacity: 1,
interactive: false,
}).addTo(inclusionZones);
}
@@ -923,7 +912,6 @@ function drawMapZones() {
color: "#969696",
fillColor: "#303030",
fillOpacity: 1,
interactive: false,
}).addTo(exclusionZones);
}
}
@@ -935,8 +923,7 @@ function drawUnculledZones() {
L.circle(zone.position, {
radius: zone.radius,
color: "#b4ff8c",
fill: false,
interactive: false,
stroke: false,
}).addTo(unculledZones);
}
}