mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Improve insufficient aircraft message.
Specify only the tasks which were unfulfilled so the player knows what to buy.
This commit is contained in:
parent
e0725ff139
commit
93db1254ec
@ -406,12 +406,21 @@ class CoalitionMissionPlanner:
|
||||
self.game.aircraft_inventory,
|
||||
self.is_player
|
||||
)
|
||||
|
||||
missing_types: Set[FlightType] = set()
|
||||
for proposed_flight in mission.flights:
|
||||
if not builder.plan_flight(proposed_flight):
|
||||
builder.release_planned_aircraft()
|
||||
self.message("Insufficient aircraft",
|
||||
f"Not enough aircraft in range for {mission}")
|
||||
return
|
||||
missing_types.add(proposed_flight.task)
|
||||
|
||||
if missing_types:
|
||||
missing_types_str = ", ".join(
|
||||
sorted([t.name for t in missing_types]))
|
||||
builder.release_planned_aircraft()
|
||||
self.message(
|
||||
"Insufficient aircraft",
|
||||
f"Not enough aircraft in range for {mission.location.name} "
|
||||
f"capable of: {missing_types_str}")
|
||||
return
|
||||
|
||||
package = builder.build()
|
||||
flight_plan_builder = FlightPlanBuilder(self.game, package,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user