Add basic intel window.

Currently only shows the enemy's economic information.

https://github.com/Khopa/dcs_liberation/issues/658
This commit is contained in:
Dan Albert
2020-12-25 03:19:20 -08:00
parent b53cac4c7a
commit 1d76ee4871
7 changed files with 198 additions and 78 deletions

View File

@@ -502,8 +502,13 @@ class ConflictTheater:
)
return new_point
def control_points_for(self, player: bool) -> Iterator[ControlPoint]:
for point in self.controlpoints:
if point.captured == player:
yield point
def player_points(self) -> List[ControlPoint]:
return [point for point in self.controlpoints if point.captured]
return list(self.control_points_for(player=True))
def conflicts(self, from_player=True) -> Iterator[FrontLine]:
for cp in [x for x in self.controlpoints if x.captured == from_player]:
@@ -511,7 +516,7 @@ class ConflictTheater:
yield FrontLine(cp, connected_point, self)
def enemy_points(self) -> List[ControlPoint]:
return [point for point in self.controlpoints if not point.captured]
return list(self.control_points_for(player=False))
def closest_control_point(self, point: Point) -> ControlPoint:
closest = self.controlpoints[0]