mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Handle error when there is no AWACS for a faction.
This commit is contained in:
parent
a38f9c2183
commit
7f7288937d
@ -53,6 +53,7 @@ class AirSupportConflictGenerator:
|
|||||||
tanker_group.points[0].tasks.append(SetImmortalCommand(True))
|
tanker_group.points[0].tasks.append(SetImmortalCommand(True))
|
||||||
|
|
||||||
if is_awacs_enabled:
|
if is_awacs_enabled:
|
||||||
|
try:
|
||||||
awacs_unit = db.find_unittype(AWACS, self.conflict.attackers_side)[0]
|
awacs_unit = db.find_unittype(AWACS, self.conflict.attackers_side)[0]
|
||||||
awacs_flight = self.mission.awacs_flight(
|
awacs_flight = self.mission.awacs_flight(
|
||||||
country=self.mission.country(self.game.player_country),
|
country=self.mission.country(self.game.player_country),
|
||||||
@ -64,6 +65,8 @@ class AirSupportConflictGenerator:
|
|||||||
frequency=133,
|
frequency=133,
|
||||||
start_type=StartType.Warm,
|
start_type=StartType.Warm,
|
||||||
)
|
)
|
||||||
|
|
||||||
awacs_flight.points[0].tasks.append(SetInvisibleCommand(True))
|
awacs_flight.points[0].tasks.append(SetInvisibleCommand(True))
|
||||||
awacs_flight.points[0].tasks.append(SetImmortalCommand(True))
|
awacs_flight.points[0].tasks.append(SetImmortalCommand(True))
|
||||||
|
except:
|
||||||
|
print("No AWACS for faction")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user