Use FrontLine in ConflictTheater.conflicts.

This commit is contained in:
Dan Albert
2020-10-24 12:24:29 -07:00
parent 04d3ba4c47
commit dd2b61edf3
5 changed files with 27 additions and 19 deletions

View File

@@ -194,14 +194,10 @@ class BriefingGenerator(MissionInfoGenerator):
conflict_number = 0
for c in self.game.theater.conflicts():
for front_line in self.game.theater.conflicts(from_player=True):
conflict_number = conflict_number + 1
if c[0].captured:
player_base = c[0]
enemy_base = c[1]
else:
player_base = c[1]
enemy_base = c[0]
player_base = front_line.control_point_a
enemy_base = front_line.control_point_b
has_numerical_superiority = player_base.base.total_armor > enemy_base.base.total_armor
self.description += self.__random_frontline_sentence(player_base.name, enemy_base.name)

View File

@@ -98,7 +98,9 @@ class VisualGenerator:
self.game = game
def _generate_frontline_smokes(self):
for from_cp, to_cp in self.game.theater.conflicts():
for front_line in self.game.theater.conflicts():
from_cp = front_line.control_point_a
to_cp = front_line.control_point_b
if from_cp.is_global or to_cp.is_global:
continue