Merge remote-tracking branch 'khopa/develop' into develop

This commit is contained in:
Khopa 2021-01-27 22:26:14 +01:00
commit 825b9935ee
10 changed files with 45 additions and 3 deletions

View File

@ -48,6 +48,9 @@ Saves from 2.3 are not compatible with 2.4.
* **[Units]** Pyotr Velikiy cruiser has been removed for now as it's nearly unkillable.
* **[Units]** Submarines have been removed for now as they aren't wholly functional.
* **[Units]** Fixed "FACTION ERROR : Unable to find OliverHazardPerryGroupGenerator in pydcs" error at startup.
* **[Flight Planner]** Fixed not being able to create custom waypoints for buildings.
* **[Flight Planner]** Strike missions will no longer be automatically planned against SAMs.
* **[Flight Planner]** Strike missions will no longer be automatically planned against FOB structures.
# 2.3.4

View File

@ -1385,7 +1385,7 @@ def unit_get_expanded_info(country_name: str, unit_type, request_type: str) -> s
faction_value = faction_exists.get(request_type)
if default_value is None:
if request_type == "text":
return "I hate to say it, but it looks like the unit you're searching for doesn't exist. Perhaps the archives are incomplete..."
return "WIP - This unit doesn't have any description text yet."
if request_type == "name":
return original_name
else:

View File

@ -26,6 +26,7 @@ from game.procurement import AircraftProcurementRequest
from game.theater import (
Airfield,
ControlPoint,
Fob,
FrontLine,
MissionTarget,
OffMapSpawn,
@ -33,6 +34,7 @@ from game.theater import (
TheaterGroundObject,
)
from game.theater.theatergroundobject import (
BuildingGroundObject,
EwrGroundObject,
NavalGroundObject,
VehicleGroupGroundObject,
@ -346,12 +348,35 @@ class ObjectiveFinder:
found_targets: Set[str] = set()
for enemy_cp in self.enemy_control_points():
for ground_object in enemy_cp.ground_objects:
# TODO: Reuse ground_object.mission_types.
# The mission types for ground objects are currently not
# accurate because we include things like strike and BAI for all
# targets since they have different planning behavior (waypoint
# generation is better for players with strike when the targets
# are stationary, AI behavior against weaker air defenses is
# better with BAI), so that's not a useful filter. Once we have
# better control over planning profiles and target dependent
# loadouts we can clean this up.
if isinstance(ground_object, VehicleGroupGroundObject):
# BAI target, not strike target.
continue
if isinstance(ground_object, NavalGroundObject):
# Anti-ship target, not strike target.
continue
if isinstance(ground_object, SamGroundObject):
# SAMs are targeted by DEAD. No need to double plan.
continue
is_building = isinstance(ground_object, BuildingGroundObject)
is_fob = isinstance(enemy_cp, Fob)
if is_building and is_fob and ground_object.airbase_group:
# This is the FOB structure itself. Can't be repaired or
# targeted by the player, so shouldn't be targetable by the
# AI.
continue
if ground_object.is_dead:
continue
if ground_object.name in found_targets:

View File

@ -71,7 +71,7 @@ class QPredefinedWaypointSelectionComboBox(QFilteredComboBox):
for cp in self.game.theater.controlpoints:
if (self.include_enemy and not cp.captured) or (self.include_friendly and cp.captured):
for ground_object in cp.ground_objects:
if not ground_object.is_dead and not isinstance(ground_object, BuildingGroundObject):
if not ground_object.is_dead and isinstance(ground_object, BuildingGroundObject):
wpt = FlightWaypoint(
FlightWaypointType.CUSTOM,
ground_object.position.x,

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View File

@ -813,6 +813,13 @@
"manufacturer": "Sukhoi",
"role": "Multirole Fighter",
"year-of-variant-introduction": "1996"
},
"China": {
"name": "Su-30MKK Flanker-G",
"country-of-origin": "USSR/Russia",
"manufacturer": "Sukhoi",
"role": "Multirole Fighter",
"year-of-variant-introduction": "2000"
}
}],
"Su-33": [{
@ -821,8 +828,15 @@
"text": "The Su-33 has been the backbone of Russian aircraft carrier aviation since the late 1990s and is an all-weather fighter capable of engaging both air and surface targets. Based on the powerful Su-27 \"Flanker\", the Su-33 is a navalized version suited for operations aboard the Admiral Kuznetsov aircraft carrier. Changes to the Su-33 include strengthened landing gear, folding wings, more powerful engines, and the very visible canards.\n\nThe Su-33 is equipped with a powerful pulse doppler radar and an Infrared Search and Track (IRST) for engaging aerial targets with a wide range of radar- and infrared-guided missiles and its internal cannon. For air-to-surface attack, the Su-33 can be armed with many types of unguided bombs, rockets, and cluster munitions.\n\nDespite its large size, the Su-33 is very capable in a dogfight when combined with its integral helmet-mounted sight and off-boresight missiles.",
"country-of-origin": "USSR/Russia",
"manufacturer": "Sukhoi",
"role": "Multirole Fighter",
"role": "Carrier-based Multirole Fighter",
"year-of-variant-introduction": "1998"
},
"China": {
"name": "J-15 Flanker X-2",
"country-of-origin": "China",
"manufacturer": "Shenyang",
"role": "Carrier-based Multirole Fighter",
"year-of-variant-introduction": "2013"
}
}],
"Su-34": [{