mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Allow factions to specify their cargo ship type.
https://github.com/dcs-liberation/dcs_liberation/issues/3039
This commit is contained in:
@@ -4,7 +4,6 @@ import itertools
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from dcs import Mission
|
||||
from dcs.ships import HandyWind
|
||||
from dcs.unitgroup import ShipGroup
|
||||
|
||||
from game.transfers import CargoShip
|
||||
@@ -30,15 +29,16 @@ class CargoShipGenerator:
|
||||
self.generate_cargo_ship(ship)
|
||||
|
||||
def generate_cargo_ship(self, ship: CargoShip) -> ShipGroup:
|
||||
coalition = self.game.coalition_for(ship.player_owned)
|
||||
waypoints = ship.route
|
||||
|
||||
country = self.game.coalition_for(ship.player_owned).faction.country
|
||||
country = coalition.faction.country
|
||||
country = self.mission.country(country.name)
|
||||
|
||||
group = self.mission.ship_group(
|
||||
country,
|
||||
ship.name,
|
||||
HandyWind,
|
||||
coalition.faction.cargo_ship.dcs_unit_type,
|
||||
position=waypoints[0],
|
||||
group_size=1,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user