mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
working briefinggen refactor
This commit is contained in:
parent
6878b57fba
commit
f81a3d03c0
@ -300,12 +300,12 @@ class Operation:
|
||||
airsupportgen.air_support)
|
||||
|
||||
kneeboard_generator = KneeboardGenerator(self.current_mission)
|
||||
for dynamic_runway in groundobjectgen.runways.values():
|
||||
self.briefinggen.add_dynamic_runway(dynamic_runway)
|
||||
# for dynamic_runway in groundobjectgen.runways.values():
|
||||
# self.briefinggen.add_dynamic_runway(dynamic_runway)
|
||||
|
||||
for tanker in airsupportgen.air_support.tankers:
|
||||
self.briefinggen.add_tanker(tanker)
|
||||
kneeboard_generator.add_tanker(tanker)
|
||||
# self.briefinggen.add_tanker(tanker)
|
||||
# kneeboard_generator.add_tanker(tanker)
|
||||
luaData["Tankers"][tanker.callsign] = {
|
||||
"dcsGroupName": tanker.dcsGroupName,
|
||||
"callsign": tanker.callsign,
|
||||
@ -316,8 +316,8 @@ class Operation:
|
||||
|
||||
if self.is_awacs_enabled:
|
||||
for awacs in airsupportgen.air_support.awacs:
|
||||
self.briefinggen.add_awacs(awacs)
|
||||
kneeboard_generator.add_awacs(awacs)
|
||||
# self.briefinggen.add_awacs(awacs)
|
||||
# kneeboard_generator.add_awacs(awacs)
|
||||
luaData["AWACs"][awacs.callsign] = {
|
||||
"dcsGroupName": awacs.dcsGroupName,
|
||||
"callsign": awacs.callsign,
|
||||
@ -325,8 +325,8 @@ class Operation:
|
||||
}
|
||||
|
||||
for jtac in jtacs:
|
||||
self.briefinggen.add_jtac(jtac)
|
||||
kneeboard_generator.add_jtac(jtac)
|
||||
# self.briefinggen.add_jtac(jtac)
|
||||
# kneeboard_generator.add_jtac(jtac)
|
||||
luaData["JTACs"][jtac.callsign] = {
|
||||
"dcsGroupName": jtac.dcsGroupName,
|
||||
"callsign": jtac.callsign,
|
||||
@ -336,8 +336,8 @@ class Operation:
|
||||
}
|
||||
|
||||
for flight in airgen.flights:
|
||||
self.briefinggen.add_flight(flight)
|
||||
kneeboard_generator.add_flight(flight)
|
||||
# self.briefinggen.add_flight(flight)
|
||||
# kneeboard_generator.add_flight(flight)
|
||||
if flight.friendly and flight.flight_type in [FlightType.ANTISHIP, FlightType.DEAD, FlightType.SEAD, FlightType.STRIKE]:
|
||||
flightType = flight.flight_type.name
|
||||
flightTarget = flight.package.target
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
'''
|
||||
Briefing generation logic
|
||||
'''
|
||||
import os
|
||||
import random
|
||||
import logging
|
||||
@ -58,7 +61,7 @@ class FrontLineInfo:
|
||||
"critical, and we will lose ground inevitably.")
|
||||
elif self.enemy_zero:
|
||||
return ("The enemy forces have been crushed, we will be able to make significant progress"
|
||||
f" toward {enemy_base.name}.")
|
||||
f" toward {self.enemy_base.name}.")
|
||||
return None
|
||||
|
||||
@property
|
||||
@ -73,14 +76,14 @@ class FrontLineInfo:
|
||||
elif self.stance == CombatStance.ELIMINATION:
|
||||
return (
|
||||
"On this location, our ground forces will focus on the destruction of enemy"
|
||||
f"assets, before attempting to make progress toward {enemy_base.name}. "
|
||||
f"assets, before attempting to make progress toward {self.enemy_base.name}. "
|
||||
"The enemy is already outnumbered, and this maneuver might draw a final "
|
||||
"blow to their forces."
|
||||
)
|
||||
elif self.stance == CombatStance.BREAKTHROUGH:
|
||||
return (
|
||||
"On this location, our ground forces will focus on progression toward "
|
||||
f"{enemy_base.name}."
|
||||
f"{self.enemy_base.name}."
|
||||
)
|
||||
elif self.stance in [CombatStance.DEFENSIVE, CombatStance.AMBUSH]:
|
||||
return (
|
||||
@ -109,7 +112,7 @@ class FrontLineInfo:
|
||||
elif self.stance == CombatStance.BREAKTHROUGH:
|
||||
return (
|
||||
"On this location, our ground forces have been ordered to rush toward "
|
||||
f"{enemy_base.name}. Wish them luck... We are also expecting a counter attack."
|
||||
f"{self.enemy_base.name}. Wish them luck... We are also expecting a counter attack."
|
||||
)
|
||||
elif self.stance in [CombatStance.DEFENSIVE, CombatStance.AMBUSH]:
|
||||
return (
|
||||
@ -131,6 +134,8 @@ class FrontLineInfo:
|
||||
situation += self._advantage_description
|
||||
else:
|
||||
situation += self._disadvantage_description
|
||||
return situation
|
||||
|
||||
class MissionInfoGenerator:
|
||||
"""Base type for generators of mission information for the player.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user