Debriefing and info on AA site and buildings destroyed. KC130 replace S3B

This commit is contained in:
Khopa
2020-06-06 04:10:22 +02:00
parent aa4b07d024
commit fcd81850cb
28 changed files with 195 additions and 83 deletions

View File

@@ -150,6 +150,7 @@ PRICES = {
S_3B_Tanker: 13,
IL_78M: 13,
KC_135: 13,
KC130: 13,
A_50: 8,
E_3A: 8,
@@ -359,6 +360,7 @@ UNIT_BY_TASK = {
Refueling: [
IL_78M,
KC_135,
KC130,
S_3B_Tanker,
],
AWACS: [E_3A, A_50, ],

View File

@@ -127,17 +127,6 @@ class Event:
self.operation.current_mission.save(persistency.mission_path_for("liberation_nextturn.miz"))
self.environment_settings = self.operation.environment_settings
def generate_quick(self):
pass
# TODO : This is not needed anymore. The player can start mission in flight from the flight planner if he want it to be quick.
# TODO : remove this method
#self.operation.is_awacs_enabled = self.is_awacs_enabled
#self.operation.environment_settings = self.environment_settings
#
#self.operation.prepare(self.game.theater.terrain, is_quick=True)
#self.operation.generate()
#self.operation.current_mission.save(persistency.mission_path_for("liberation_nextturn_quick.miz"))
def commit(self, debriefing: Debriefing):
logging.info("Commiting mission results")
@@ -190,16 +179,30 @@ class Event:
logging.info("cp {} killing ground object {}".format(cp, ground_object.string_identifier))
cp.ground_objects[i].is_dead = True
info = Information("Building destroyed",
ground_object.dcs_identifier + " has been destroyed at location " + ground_object.obj_name,
self.game.turn)
self.game.informations.append(info)
# -- AA Site groups
destroyed_units = 0
info = Information("Units destroyed at " + ground_object.obj_name,
"",
self.game.turn)
for i, ground_object in enumerate(cp.ground_objects):
if ground_object.dcs_identifier in ["AA", "CARRIER", "LHA"]:
for g in ground_object.groups:
for u in g.units:
if u.name == destroyed_ground_unit_name:
g.units.remove(u)
destroyed_units = destroyed_units + 1
info.text = u.type
ucount = sum([len(g.units) for g in ground_object.groups])
if ucount == 0:
ground_object.is_dead = True
if destroyed_units > 0:
self.game.informations.append(info)
# ------------------------------
# Captured bases

View File

@@ -24,7 +24,7 @@ BLUEFOR_MODERN = {
AJS37,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -11,7 +11,7 @@ France_1995 = {
Mirage_2000_5,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ France_2005 = {
FA_18C_hornet, # Standing as Rafale M
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ Germany_1990 = {
F_4E,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -15,7 +15,7 @@ India_2010 = {
Su_30,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ Israel_2000 = {
F_4E,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -11,7 +11,7 @@ Netherlands_1990 = {
F_5E_3,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ Spain_1990 = {
C_101CC,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -11,7 +11,7 @@ Turkey_2005 = {
F_4E,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ UAE_2005 = {
F_16C_50,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ UnitedKingdom_1990 = {
F_4E,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -11,7 +11,7 @@ USA_1955 = {
P_51D,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -11,7 +11,7 @@ USA_1960 = {
P_51D,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,7 +12,7 @@ USA_1965 = {
F_4E,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -17,7 +17,7 @@ USA_1990 = {
B_1B,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -12,12 +12,11 @@ USA_2005 = {
FA_18C_hornet,
F_16C_50,
JF_17,
A_10C,
AV8BNA,
KC_135,
S_3B_Tanker,
KC130,
C_130,
E_3A,

View File

@@ -145,11 +145,8 @@ class Game:
def initiate_event(self, event: Event):
assert event in self.events
logging.info("Generating {} (regular)".format(event))
event.generate()
logging.info("Generating {} (quick)".format(event))
event.generate_quick()
def finish_event(self, event: Event, debriefing: Debriefing):
logging.info("Finishing event {}".format(event))