mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fixed aircraft carrier cold start
This commit is contained in:
parent
9581a8f1f4
commit
20fef86b84
@ -143,10 +143,13 @@ class AircraftConflictGenerator:
|
|||||||
group.points[0].alt_type = "RADIO"
|
group.points[0].alt_type = "RADIO"
|
||||||
return group
|
return group
|
||||||
|
|
||||||
def _generate_at_group(self, name: str, side: Country, unit_type: FlyingType, count: int, client_count: int, at: typing.Union[ShipGroup, StaticGroup]) -> FlyingGroup:
|
def _generate_at_group(self, name: str, side: Country, unit_type: FlyingType, count: int, client_count: int, at: typing.Union[ShipGroup, StaticGroup], start_type=None) -> FlyingGroup:
|
||||||
assert count > 0
|
assert count > 0
|
||||||
assert unit is not None
|
assert unit is not None
|
||||||
|
|
||||||
|
if start_type is None:
|
||||||
|
start_type = self._start_type()
|
||||||
|
|
||||||
logging.info("airgen: {} for {} at unit {}".format(unit_type, side.id, at))
|
logging.info("airgen: {} for {} at unit {}".format(unit_type, side.id, at))
|
||||||
return self.m.flight_group_from_unit(
|
return self.m.flight_group_from_unit(
|
||||||
country=side,
|
country=side,
|
||||||
@ -154,7 +157,7 @@ class AircraftConflictGenerator:
|
|||||||
aircraft_type=unit_type,
|
aircraft_type=unit_type,
|
||||||
pad_group=at,
|
pad_group=at,
|
||||||
maintask=None,
|
maintask=None,
|
||||||
start_type=self._start_type(),
|
start_type=start_type,
|
||||||
group_size=count)
|
group_size=count)
|
||||||
|
|
||||||
def _generate_group(self, name: str, side: Country, unit_type: FlyingType, count: int, client_count: int, at: db.StartingPosition):
|
def _generate_group(self, name: str, side: Country, unit_type: FlyingType, count: int, client_count: int, at: db.StartingPosition):
|
||||||
@ -310,7 +313,8 @@ class AircraftConflictGenerator:
|
|||||||
unit_type=flight.unit_type,
|
unit_type=flight.unit_type,
|
||||||
count=flight.count,
|
count=flight.count,
|
||||||
client_count=0,
|
client_count=0,
|
||||||
at=self.m.find_group(group_name),)
|
at=self.m.find_group(group_name),
|
||||||
|
start_type=st)
|
||||||
else:
|
else:
|
||||||
group = self._generate_at_airport(
|
group = self._generate_at_airport(
|
||||||
name=namegen.next_unit_name(country, cp.id, flight.unit_type),
|
name=namegen.next_unit_name(country, cp.id, flight.unit_type),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user