mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Always plan & plan more BARCAP for carriers
This commit is contained in:
parent
f1dc431d2f
commit
75c29dd907
@ -15,6 +15,7 @@ from game.theater import (
|
|||||||
MissionTarget,
|
MissionTarget,
|
||||||
OffMapSpawn,
|
OffMapSpawn,
|
||||||
ParkingType,
|
ParkingType,
|
||||||
|
NavalControlPoint,
|
||||||
)
|
)
|
||||||
from game.theater.theatergroundobject import (
|
from game.theater.theatergroundobject import (
|
||||||
BuildingGroundObject,
|
BuildingGroundObject,
|
||||||
@ -147,6 +148,9 @@ class ObjectiveFinder:
|
|||||||
if isinstance(cp, OffMapSpawn):
|
if isinstance(cp, OffMapSpawn):
|
||||||
# Off-map spawn locations don't need protection.
|
# Off-map spawn locations don't need protection.
|
||||||
continue
|
continue
|
||||||
|
if isinstance(cp, NavalControlPoint):
|
||||||
|
yield cp # always consider CVN/LHA as vulnerable
|
||||||
|
continue
|
||||||
airfields_in_proximity = self.closest_airfields_to(cp)
|
airfields_in_proximity = self.closest_airfields_to(cp)
|
||||||
airbase_threat_range = self.game.settings.airbase_threat_range
|
airbase_threat_range = self.game.settings.airbase_threat_range
|
||||||
if (
|
if (
|
||||||
|
|||||||
@ -180,13 +180,16 @@ class TheaterState(WorldState["TheaterState"]):
|
|||||||
}
|
}
|
||||||
|
|
||||||
vulnerable_control_points = [
|
vulnerable_control_points = [
|
||||||
cp for cp, bp in battle_postitions.items() if not bp.blocking_capture
|
cp
|
||||||
|
for cp, bp in battle_postitions.items()
|
||||||
|
if not bp.blocking_capture or cp.is_fleet
|
||||||
]
|
]
|
||||||
|
|
||||||
return TheaterState(
|
return TheaterState(
|
||||||
context=context,
|
context=context,
|
||||||
barcaps_needed={
|
barcaps_needed={
|
||||||
cp: barcap_rounds for cp in finder.vulnerable_control_points()
|
cp: 2 * barcap_rounds if cp.is_fleet else barcap_rounds
|
||||||
|
for cp in finder.vulnerable_control_points()
|
||||||
},
|
},
|
||||||
active_front_lines=list(finder.front_lines()),
|
active_front_lines=list(finder.front_lines()),
|
||||||
front_line_stances={f: None for f in finder.front_lines()},
|
front_line_stances={f: None for f in finder.front_lines()},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user