Channel map support.

This commit is contained in:
Khopa
2020-06-12 19:10:58 +02:00
parent c708abafc8
commit 601375d06f
16 changed files with 304 additions and 79 deletions

View File

@@ -20,18 +20,60 @@ class NormandyTheater(ConflictTheater):
def __init__(self):
super(NormandyTheater, self).__init__()
self.st_pierre = ControlPoint.from_airport(normandy.Saint_Pierre_du_Mont, LAND, SIZE_REGULAR, IMPORTANCE_MEDIUM)
self.maupertus = ControlPoint.from_airport(normandy.Maupertus, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.azeville = ControlPoint.from_airport(normandy.Azeville, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.needOarPoint = ControlPoint.from_airport(normandy.Needs_Oar_Point, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.chailey = ControlPoint.from_airport(normandy.Chailey, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.deuxjumeaux = ControlPoint.from_airport(normandy.Deux_Jumeaux, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.lignerolles = ControlPoint.from_airport(normandy.Lignerolles, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.carpiquet = ControlPoint.from_airport(normandy.Carpiquet, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.lessay = ControlPoint.from_airport(normandy.Lessay, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.meautis = ControlPoint.from_airport(normandy.Meautis, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.chippelle = ControlPoint.from_airport(normandy.Chippelle, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.maupertus = ControlPoint.from_airport(normandy.Maupertus, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.evreux = ControlPoint.from_airport(normandy.Evreux, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.add_controlpoint(self.st_pierre, connected_to=[self.chippelle])
self.add_controlpoint(self.maupertus, connected_to=[self.azeville])
self.add_controlpoint(self.azeville, connected_to=[self.meautis, self.maupertus])
self.add_controlpoint(self.lessay, connected_to=[self.meautis])
self.add_controlpoint(self.meautis, connected_to=[self.chippelle, self.lessay, self.azeville])
self.add_controlpoint(self.chippelle, connected_to=[self.st_pierre, self.meautis])
self.add_controlpoint(self.chailey, connected_to=[self.needOarPoint])
self.add_controlpoint(self.needOarPoint, connected_to=[self.chailey])
self.st_pierre.captured = True
self.add_controlpoint(self.deuxjumeaux, connected_to=[self.lignerolles])
self.add_controlpoint(self.lignerolles, connected_to=[self.deuxjumeaux, self.lessay, self.carpiquet])
self.add_controlpoint(self.lessay, connected_to=[self.lignerolles, self.maupertus])
self.add_controlpoint(self.carpiquet, connected_to=[self.lignerolles, self.evreux])
self.add_controlpoint(self.maupertus, connected_to=[self.lessay])
self.add_controlpoint(self.evreux, connected_to=[self.carpiquet])
self.deuxjumeaux.captured = True
self.chailey.captured = True
self.needOarPoint.captured = True
class NormandySmall(ConflictTheater):
terrain = dcs.terrain.Normandy()
overview_image = "normandy.gif"
reference_points = {(normandy.Needs_Oar_Point.position.x, normandy.Needs_Oar_Point.position.y): (-170, -1000),
(normandy.Evreux.position.x, normandy.Evreux.position.y): (2020, 500)}
landmap = load_landmap("resources\\normandylandmap.p")
daytime_map = {
"dawn": (6, 8),
"day": (10, 17),
"dusk": (17, 18),
"night": (0, 5),
}
def __init__(self):
super(NormandySmall, self).__init__()
self.needOarPoint = ControlPoint.from_airport(normandy.Needs_Oar_Point, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.deuxjumeaux = ControlPoint.from_airport(normandy.Deux_Jumeaux, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.lignerolles = ControlPoint.from_airport(normandy.Lignerolles, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.carpiquet = ControlPoint.from_airport(normandy.Carpiquet, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.evreux = ControlPoint.from_airport(normandy.Evreux, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.add_controlpoint(self.needOarPoint, connected_to=[self.needOarPoint])
self.add_controlpoint(self.deuxjumeaux, connected_to=[self.lignerolles])
self.add_controlpoint(self.lignerolles, connected_to=[self.deuxjumeaux, self.carpiquet])
self.add_controlpoint(self.carpiquet, connected_to=[self.lignerolles, self.evreux])
self.add_controlpoint(self.evreux, connected_to=[self.carpiquet])
self.deuxjumeaux.captured = True
self.needOarPoint.captured = True

52
theater/thechannel.py Normal file
View File

@@ -0,0 +1,52 @@
from dcs.terrain import thechannel
from .conflicttheater import *
from .landmap import *
class ChannelTheater(ConflictTheater):
terrain = dcs.terrain.TheChannel()
overview_image = "thechannel.gif"
reference_points = {(thechannel.Abbeville_Drucat.position.x, thechannel.Abbeville_Drucat.position.y): (2400, 4100),
(thechannel.Detling.position.x, thechannel.Detling.position.y): (1100, 2000)}
landmap = load_landmap("resources\\channellandmap.p")
daytime_map = {
"dawn": (6, 8),
"day": (10, 17),
"dusk": (17, 18),
"night": (0, 5),
}
def __init__(self):
super(ChannelTheater, self).__init__()
self.abeville = ControlPoint.from_airport(thechannel.Abbeville_Drucat, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.detling = ControlPoint.from_airport(thechannel.Detling, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.stomer = ControlPoint.from_airport(thechannel.Saint_Omer_Longuenesse, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.dunkirk = ControlPoint.from_airport(thechannel.Dunkirk_Mardyck, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.hawkinge = ControlPoint.from_airport(thechannel.Hawkinge, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.highhalden = ControlPoint.from_airport(thechannel.High_Halden, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.lympne = ControlPoint.from_airport(thechannel.Lympne, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.manston = ControlPoint.from_airport(thechannel.Manston, LAND, SIZE_SMALL, IMPORTANCE_LOW)
self.merville = ControlPoint.from_airport(thechannel.Merville_Calonne, LAND, SIZE_SMALL, IMPORTANCE_LOW)
# England
self.add_controlpoint(self.detling, connected_to=[self.highhalden])
self.add_controlpoint(self.hawkinge, connected_to=[self.lympne, self.manston])
self.add_controlpoint(self.highhalden, connected_to=[self.detling, self.lympne])
self.add_controlpoint(self.lympne, connected_to=[self.highhalden, self.hawkinge])
self.add_controlpoint(self.manston, connected_to=[self.hawkinge])
# France
self.add_controlpoint(self.dunkirk, connected_to=[self.stomer])
self.add_controlpoint(self.stomer, connected_to=[self.dunkirk, self.merville, self.abeville])
self.add_controlpoint(self.merville, connected_to=[self.stomer])
self.add_controlpoint(self.abeville, connected_to=[self.stomer])
self.detling.captured = True
self.hawkinge.captured = True
self.highhalden.captured = True
self.lympne.captured = True
self.manston.captured = True