mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add AI convoy attack planning.
Like the comment says this rarely has any effect due to the ordering of flight planning and convoy creation. Could be separated, but opfor will still not be able to target any convoys that the player creates in the UI on that turn because they planning is done before the player can use the UI. Multi-turn transfers will be targetable, however.
This commit is contained in:
@@ -126,6 +126,11 @@ class ConvoyMap:
|
||||
def departing_from(self, origin: ControlPoint) -> Iterator[Convoy]:
|
||||
yield from self.convoys[origin].values()
|
||||
|
||||
def travelling_to(self, destination: ControlPoint) -> Iterator[Convoy]:
|
||||
for destination_dict in self.convoys.values():
|
||||
if destination in destination_dict:
|
||||
yield destination_dict[destination]
|
||||
|
||||
def disband_convoy(self, convoy: Convoy) -> None:
|
||||
del self.convoys[convoy.origin][convoy.destination]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user