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,11 +406,20 @@ class CoalitionMissionPlanner:
|
|||||||
self.game.aircraft_inventory,
|
self.game.aircraft_inventory,
|
||||||
self.is_player
|
self.is_player
|
||||||
)
|
)
|
||||||
|
|
||||||
|
missing_types: Set[FlightType] = set()
|
||||||
for proposed_flight in mission.flights:
|
for proposed_flight in mission.flights:
|
||||||
if not builder.plan_flight(proposed_flight):
|
if not builder.plan_flight(proposed_flight):
|
||||||
|
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()
|
builder.release_planned_aircraft()
|
||||||
self.message("Insufficient aircraft",
|
self.message(
|
||||||
f"Not enough aircraft in range for {mission}")
|
"Insufficient aircraft",
|
||||||
|
f"Not enough aircraft in range for {mission.location.name} "
|
||||||
|
f"capable of: {missing_types_str}")
|
||||||
return
|
return
|
||||||
|
|
||||||
package = builder.build()
|
package = builder.build()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user