First pass at cargo ships.

The simple form of this works, but without the multi-mode routing it'll
only get used when the final destination is a port with a link to a port
with a factory.

These also aren't targetable or simulated yet.

https://github.com/Khopa/dcs_liberation/issues/826
This commit is contained in:
Dan Albert
2021-04-25 11:17:41 -07:00
parent 42694d2004
commit ba8fafcc95
11 changed files with 262 additions and 99 deletions

View File

@@ -251,6 +251,7 @@ class NameGenerator:
infantry_number = 0
aircraft_number = 0
convoy_number = 0
cargo_ship_number = 0
ANIMALS = ANIMALS
existing_alphas: List[str] = []
@@ -260,6 +261,7 @@ class NameGenerator:
cls.number = 0
cls.infantry_number = 0
cls.convoy_number = 0
cls.cargo_ship_number = 0
cls.ANIMALS = ANIMALS
cls.existing_alphas = []
@@ -269,6 +271,7 @@ class NameGenerator:
cls.infantry_number = 0
cls.aircraft_number = 0
cls.convoy_number = 0
cls.cargo_ship_number = 0
@classmethod
def next_aircraft_name(cls, country: Country, parent_base_id: int, flight: Flight):
@@ -335,6 +338,11 @@ class NameGenerator:
cls.convoy_number += 1
return f"Convoy {cls.convoy_number:03}"
@classmethod
def next_cargo_ship_name(cls) -> str:
cls.cargo_ship_number += 1
return f"Cargo Ship {cls.cargo_ship_number:03}"
@classmethod
def random_objective_name(cls):
if len(cls.ANIMALS) == 0: