Move mission generation code into game.

Operation has been renamed MissionGenerator and is no longer a static
class.
This commit is contained in:
Dan Albert
2021-10-22 13:31:43 -07:00
parent b0787d9a3f
commit 74291271e3
43 changed files with 805 additions and 774 deletions

View File

@@ -114,7 +114,7 @@ def create_mission(terrain: Terrain) -> Path:
mission_path = persistency.mission_path_for(f"export_{terrain.name.lower()}.miz")
m.save(mission_path)
return Path(mission_path)
return mission_path
def load_coordinate_data(data: Dict[str, Any]) -> Dict[str, Coordinates]:

View File

@@ -32,8 +32,7 @@ from typing import Dict, Iterable, Union
import lupa
import game # Needed to resolve cyclic import, for some reason.
from gen.beacons import Beacon, BeaconType, BEACONS_RESOURCE_PATH
from game.missiongenerator.beacons import Beacon, BeaconType, BEACONS_RESOURCE_PATH
THIS_DIR = Path(__file__).parent.resolve()
SRC_DIR = THIS_DIR.parents[1]