minor fixes; F-14B

This commit is contained in:
Vasyl Horbachenko
2019-03-27 08:47:29 +02:00
parent f7e2c8921c
commit c152b49b88
27 changed files with 179 additions and 28 deletions

View File

@@ -53,10 +53,18 @@ class ConflictTheater:
reference_points = None # type: typing.Dict
overview_image = None # type: str
landmap = None # type: landmap.Landmap
"""
land_poly = None # type: Polygon
"""
daytime_map = None # type: typing.Dict[str, typing.Tuple[int, int]]
def __init__(self):
self.controlpoints = []
"""
self.land_poly = geometry.Polygon(self.landmap[0][0])
for x in self.landmap[1]:
self.land_poly = self.land_poly.difference(geometry.Polygon(x))
"""
def add_controlpoint(self, point: ControlPoint, connected_to: typing.Collection[ControlPoint] = []):
for connected_point in connected_to:

View File

@@ -19,7 +19,6 @@ class NevadaTheater(ConflictTheater):
"night": (0, 5),
}
mina = ControlPoint.from_airport(nevada.Mina_Airport_3Q0, LAND, SIZE_SMALL, IMPORTANCE_LOW)
tonopah = ControlPoint.from_airport(nevada.Tonopah_Airport, LAND, SIZE_SMALL, IMPORTANCE_LOW)
tonopah_test_range = ControlPoint.from_airport(nevada.Tonopah_Test_Range_Airfield, LAND, SIZE_SMALL, IMPORTANCE_LOW)
lincoln_conty = ControlPoint.from_airport(nevada.Lincoln_County, LAND, SIZE_SMALL, 1.2)
@@ -37,8 +36,7 @@ class NevadaTheater(ConflictTheater):
def __init__(self):
super(NevadaTheater, self).__init__()
self.add_controlpoint(self.mina, connected_to=[self.tonopah])
self.add_controlpoint(self.tonopah, connected_to=[self.mina, self.tonopah_test_range, self.lincoln_conty])
self.add_controlpoint(self.tonopah, connected_to=[self.tonopah_test_range, self.lincoln_conty])
self.add_controlpoint(self.tonopah_test_range, connected_to=[self.tonopah, self.lincoln_conty, self.groom_lake, self.pahute_mesa])
self.add_controlpoint(self.lincoln_conty, connected_to=[self.tonopah_test_range, self.mesquite])
@@ -52,5 +50,5 @@ class NevadaTheater(ConflictTheater):
self.add_controlpoint(self.jean, connected_to=[self.laughlin, self.las_vegas])
self.add_controlpoint(self.laughlin, connected_to=[self.jean, self.las_vegas])
self.mina.captured = True
self.tonopah.captured = True