mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
first pass briefing refactor briefing fixes briefing fixes Stop briefing generate being called twice Stop frontline advantage string being appended when there are no units. jinja template always return enum instance in Strategy Selector For some reason on DEFENSE, enum is appended to control point stance, but on all other the enum.value is added instead. I don't see any case where the value is used, but there are many cases that the enum instance is evaluated against. type issue junja's not a thing swap mapping with dict jinja template always return enum instance in Strategy Selector For some reason on DEFENSE, enum is appended to control point stance, but on all other the enum.value is added instead. I don't see any case where the value is used, but there are many cases that the enum instance is evaluated against. type issue Update build.yml junja's not a thing swap mapping with dict Restore build job
42 lines
1.9 KiB
Python
42 lines
1.9 KiB
Python
from dcs.terrain.terrain import Terrain
|
|
|
|
from gen.conflictgen import Conflict
|
|
from .operation import Operation
|
|
from .. import db
|
|
|
|
MAX_DISTANCE_BETWEEN_GROUPS = 12000
|
|
|
|
|
|
class FrontlineAttackOperation(Operation):
|
|
interceptors = None # type: db.AssignedUnitsDict
|
|
escort = None # type: db.AssignedUnitsDict
|
|
strikegroup = None # type: db.AssignedUnitsDict
|
|
|
|
attackers = None # type: db.ArmorDict
|
|
defenders = None # type: db.ArmorDict
|
|
|
|
def prepare(self, terrain: Terrain, is_quick: bool):
|
|
super(FrontlineAttackOperation, self).prepare(terrain, is_quick)
|
|
if self.defender_name == self.game.player_name:
|
|
self.attackers_starting_position = None
|
|
self.defenders_starting_position = None
|
|
|
|
conflict = Conflict.frontline_cas_conflict(
|
|
attacker_name=self.attacker_name,
|
|
defender_name=self.defender_name,
|
|
attacker=self.current_mission.country(self.attacker_country),
|
|
defender=self.current_mission.country(self.defender_country),
|
|
from_cp=self.from_cp,
|
|
to_cp=self.to_cp,
|
|
theater=self.game.theater
|
|
)
|
|
|
|
self.initialize(mission=self.current_mission,
|
|
conflict=conflict)
|
|
|
|
def generate(self):
|
|
## TODO: What are these for?
|
|
# self.briefinggen.title = "Frontline CAS"
|
|
# self.briefinggen.description = "Provide CAS for the ground forces attacking enemy lines. Operation will be considered successful if total number of enemy units will be lower than your own by a factor of 1.5 (i.e. with 12 units from both sides, enemy forces need to be reduced to at least 8), meaning that you (and, probably, your wingmans) should concentrate on destroying the enemy units. Target base strength will be lowered as a result. Be advised that your flight will not attack anything until you explicitly tell them so by comms menu."
|
|
super(FrontlineAttackOperation, self).generate()
|