Clean up front line code.

The routes do not need be be recreated each time we create a
`FrontLine`. The front lines follow the convoy routes, which are static.
Add the convoy route data to the `ControlPoint` the way we do for
shipping lanes and have `FrontLine` load the data from there.
This commit is contained in:
Dan Albert
2021-05-08 16:46:02 -07:00
parent 67289bbba2
commit e721a234e1
7 changed files with 217 additions and 275 deletions

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import logging
import os
from pathlib import Path
from typing import Iterable, List, Optional, Set, TYPE_CHECKING
from typing import Iterable, List, Set, TYPE_CHECKING
from dcs import Mission
from dcs.action import DoScript, DoScriptFile
@@ -94,7 +94,7 @@ class Operation:
)
return Conflict(
cls.game.theater,
FrontLine(player_cp, enemy_cp, cls.game.theater),
FrontLine(player_cp, enemy_cp),
cls.game.player_name,
cls.game.enemy_name,
cls.game.player_country,