Now possible to create/delete flights.

This commit is contained in:
Khopa
2020-05-25 14:54:02 +02:00
parent 7a3ee6b1a9
commit 3f2aafcd28
6 changed files with 173 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ class FlightPlanner:
cas_flights = []
strike_flights = []
sead_flights = []
custom_flights = []
flights = []
potential_sead_targets = []
@@ -75,6 +76,20 @@ class FlightPlanner:
# TODO : commision STRIKE / ANTISHIP
def remove_flight(self, index):
try:
flight = self.flights[index]
if flight in self.interceptor_flights: self.interceptor_flights.remove(flight)
if flight in self.cap_flights: self.cap_flights.remove(flight)
if flight in self.cas_flights: self.cas_flights.remove(flight)
if flight in self.strike_flights: self.strike_flights.remove(flight)
if flight in self.sead_flights: self.sead_flights.remove(flight)
if flight in self.custom_flights: self.custom_flights.remove(flight)
self.flights.remove(flight)
except IndexError:
return
def commision_interceptors(self):
"""
Pick some aircraft to assign them to interception roles