update to ground objects parser; waypoints in briefings & general briefings update; minor fixes

This commit is contained in:
Vasyl Horbachenko
2018-09-13 05:09:57 +03:00
parent 03fc17fae6
commit edf9efddf9
18 changed files with 96 additions and 40 deletions

View File

@@ -1,3 +1,3 @@
from .controlpoint import *
from .conflicttheater import *
from .base import *
from .base import *

View File

@@ -44,7 +44,7 @@ class CaucasusTheater(ConflictTheater):
carrier_1 = ControlPoint.carrier("Carrier", mapping.Point(-305810.6875, 406399.1875))
def __init__(self):
def __init__(self, load_ground_objects=True):
super(CaucasusTheater, self).__init__()
self.add_controlpoint(self.soganlug, connected_to=[self.kutaisi, self.beslan])
@@ -73,8 +73,9 @@ class CaucasusTheater(ConflictTheater):
self.carrier_1.captured = True
self.soganlug.captured = True
with open("resources/cau_groundobjects.p", "rb") as f:
self.set_groundobject(pickle.load(f))
if load_ground_objects:
with open("resources/cau_groundobjects.p", "rb") as f:
self.set_groundobject(pickle.load(f))
def add_controlpoint(self, point: ControlPoint, connected_to: typing.Collection[ControlPoint] = []):
point.name = " ".join(re.split(r"[ -]", point.name)[:1])

View File

@@ -32,7 +32,7 @@ class NevadaTheater(ConflictTheater):
jean = ControlPoint.from_airport(nevada.Jean_Airport, LAND, SIZE_REGULAR, 1.2)
laughlin = ControlPoint.from_airport(nevada.Laughlin_Airport, LAND, SIZE_LARGE, IMPORTANCE_HIGH)
def __init__(self):
def __init__(self, load_ground_objects=True):
super(NevadaTheater, self).__init__()
self.add_controlpoint(self.mina, connected_to=[self.tonopah])

View File

@@ -45,7 +45,7 @@ class PersianGulfTheater(ConflictTheater):
west_carrier = ControlPoint.carrier("East carrier", Point(-100531.972946, 60939.275818))
def __init__(self):
def __init__(self, load_ground_objects=True):
super(PersianGulfTheater, self).__init__()
self.add_controlpoint(self.shiraz, connected_to=[self.lar, self.kerman])