mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
few minor fixes; added F5
This commit is contained in:
parent
7458181e90
commit
6a02d2ffb6
@ -287,6 +287,7 @@ UNIT_BY_COUNTRY = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
"USA": [
|
"USA": [
|
||||||
|
F_5E_3,
|
||||||
F_15C,
|
F_15C,
|
||||||
FA_18C_hornet,
|
FA_18C_hornet,
|
||||||
AJS37,
|
AJS37,
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class AirSupportConflictGenerator:
|
|||||||
plane_type=tanker_unit,
|
plane_type=tanker_unit,
|
||||||
position=tanker_position,
|
position=tanker_position,
|
||||||
altitude=TANKER_ALT,
|
altitude=TANKER_ALT,
|
||||||
frequency=140,
|
frequency=240,
|
||||||
start_type=StartType.Warm,
|
start_type=StartType.Warm,
|
||||||
tacanchannel="99X",
|
tacanchannel="99X",
|
||||||
)
|
)
|
||||||
@ -49,6 +49,6 @@ class AirSupportConflictGenerator:
|
|||||||
altitude=AWACS_ALT,
|
altitude=AWACS_ALT,
|
||||||
airport=None,
|
airport=None,
|
||||||
position=self.conflict.position.random_point_within(AWACS_DISTANCE, AWACS_DISTANCE),
|
position=self.conflict.position.random_point_within(AWACS_DISTANCE, AWACS_DISTANCE),
|
||||||
frequency=180,
|
frequency=244,
|
||||||
start_type=StartType.Warm,
|
start_type=StartType.Warm,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -149,10 +149,10 @@ class TriggersGenerator:
|
|||||||
description = ""
|
description = ""
|
||||||
description += "FREQUENCIES:"
|
description += "FREQUENCIES:"
|
||||||
description += "\nFlight: 251 MHz AM"
|
description += "\nFlight: 251 MHz AM"
|
||||||
description += "\nTanker: 10X/140 MHz"
|
description += "\nTanker: 10X/240 MHz"
|
||||||
|
|
||||||
if awacs_enabled:
|
if awacs_enabled:
|
||||||
description += "\nAWACS: 180 MHz"
|
description += "\nAWACS: 244 MHz"
|
||||||
|
|
||||||
if self.conflict.from_cp.is_global or self.conflict.to_cp.is_global:
|
if self.conflict.from_cp.is_global or self.conflict.to_cp.is_global:
|
||||||
description += "\nCarrier: 20X/ICLS CHAN1"
|
description += "\nCarrier: 20X/ICLS CHAN1"
|
||||||
|
|||||||
Binary file not shown.
@ -4,11 +4,11 @@ from dcs.mission import Mission
|
|||||||
from dcs.terrain import PersianGulf
|
from dcs.terrain import PersianGulf
|
||||||
|
|
||||||
m = Mission()
|
m = Mission()
|
||||||
m.load_file("tools/cau_terrain.miz")
|
m.load_file("./gulf_terrain.miz")
|
||||||
|
|
||||||
landmap = []
|
landmap = []
|
||||||
for plane_group in m.country("USA").plane_group:
|
for plane_group in m.country("USA").plane_group:
|
||||||
landmap.append([(x.position.x, x.position.y) for x in plane_group.points])
|
landmap.append([(x.position.x, x.position.y) for x in plane_group.points])
|
||||||
|
|
||||||
with open("./caulandmap.p", "wb") as f:
|
with open("../gulflandmap.p", "wb") as f:
|
||||||
pickle.dump(landmap, f)
|
pickle.dump(landmap, f)
|
||||||
|
|||||||
Binary file not shown.
@ -21,7 +21,7 @@ class OverviewCanvas:
|
|||||||
self.canvas = Canvas(frame, width=self.image.width(), height=self.image.height())
|
self.canvas = Canvas(frame, width=self.image.width(), height=self.image.height())
|
||||||
self.canvas.grid(column=0, row=0, sticky=NSEW)
|
self.canvas.grid(column=0, row=0, sticky=NSEW)
|
||||||
|
|
||||||
def transform_point(self, p: Point) -> (int, int):
|
def transform_point(self, p: Point, treshold=30) -> (int, int):
|
||||||
point_a = list(self.game.theater.reference_points.keys())[0]
|
point_a = list(self.game.theater.reference_points.keys())[0]
|
||||||
point_a_img = self.game.theater.reference_points[point_a]
|
point_a_img = self.game.theater.reference_points[point_a]
|
||||||
|
|
||||||
@ -44,7 +44,6 @@ class OverviewCanvas:
|
|||||||
X = point_b_img[1] + X_offset * X_scale
|
X = point_b_img[1] + X_offset * X_scale
|
||||||
Y = point_a_img[0] - Y_offset * Y_scale
|
Y = point_a_img[0] - Y_offset * Y_scale
|
||||||
|
|
||||||
treshold = 30
|
|
||||||
return X > treshold and X or treshold, Y > treshold and Y or treshold
|
return X > treshold and X or treshold, Y > treshold and Y or treshold
|
||||||
|
|
||||||
def create_cp_title(self, coords, cp: ControlPoint):
|
def create_cp_title(self, coords, cp: ControlPoint):
|
||||||
@ -81,7 +80,9 @@ class OverviewCanvas:
|
|||||||
|
|
||||||
if cp.captured and not connected_cp.captured and Conflict.has_frontline_between(cp, connected_cp):
|
if cp.captured and not connected_cp.captured and Conflict.has_frontline_between(cp, connected_cp):
|
||||||
frontline_pos, heading, distance = Conflict.frontline_vector(cp, connected_cp, self.game.theater)
|
frontline_pos, heading, distance = Conflict.frontline_vector(cp, connected_cp, self.game.theater)
|
||||||
start_coords, end_coords = self.transform_point(frontline_pos), self.transform_point(frontline_pos.point_from_heading(heading, distance))
|
start_coords = self.transform_point(frontline_pos, treshold=10)
|
||||||
|
end_coords = self.transform_point(frontline_pos.point_from_heading(heading, distance), treshold=60)
|
||||||
|
|
||||||
self.canvas.create_line((*start_coords, *end_coords), width=2, fill=color)
|
self.canvas.create_line((*start_coords, *end_coords), width=2, fill=color)
|
||||||
|
|
||||||
for cp in self.game.theater.controlpoints:
|
for cp in self.game.theater.controlpoints:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user