mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
commit
0b1cb0d770
@ -287,6 +287,7 @@ UNIT_BY_COUNTRY = {
|
||||
],
|
||||
|
||||
"USA": [
|
||||
F_5E_3,
|
||||
F_15C,
|
||||
FA_18C_hornet,
|
||||
AJS37,
|
||||
|
||||
@ -127,10 +127,10 @@ class AircraftConflictGenerator:
|
||||
alt = WARM_START_HELI_ALT + random.randint(50, 200)
|
||||
speed = WARM_START_HELI_AIRSPEED
|
||||
else:
|
||||
alt = WARM_START_ALTITUDE + random.randint(50, 200)
|
||||
alt = WARM_START_ALTITUDE + random.randint(50, 800)
|
||||
speed = WARM_START_AIRSPEED
|
||||
|
||||
pos = Point(at.x + random.randint(100, 200), at.y + random.randint(100, 200))
|
||||
pos = Point(at.x + random.randint(100, 1000), at.y + random.randint(100, 1000))
|
||||
|
||||
logging.info("airgen: {} for {} at {} at {}".format(unit_type, side.id, alt, speed))
|
||||
return self.m.flight_group(
|
||||
|
||||
@ -33,7 +33,7 @@ class AirSupportConflictGenerator:
|
||||
plane_type=tanker_unit,
|
||||
position=tanker_position,
|
||||
altitude=TANKER_ALT,
|
||||
frequency=140,
|
||||
frequency=240,
|
||||
start_type=StartType.Warm,
|
||||
tacanchannel="99X",
|
||||
)
|
||||
@ -49,6 +49,6 @@ class AirSupportConflictGenerator:
|
||||
altitude=AWACS_ALT,
|
||||
airport=None,
|
||||
position=self.conflict.position.random_point_within(AWACS_DISTANCE, AWACS_DISTANCE),
|
||||
frequency=180,
|
||||
frequency=244,
|
||||
start_type=StartType.Warm,
|
||||
)
|
||||
|
||||
@ -149,10 +149,10 @@ class TriggersGenerator:
|
||||
description = ""
|
||||
description += "FREQUENCIES:"
|
||||
description += "\nFlight: 251 MHz AM"
|
||||
description += "\nTanker: 10X/140 MHz"
|
||||
description += "\nTanker: 10X/240 MHz"
|
||||
|
||||
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:
|
||||
description += "\nCarrier: 20X/ICLS CHAN1"
|
||||
|
||||
Binary file not shown.
@ -4,11 +4,11 @@ from dcs.mission import Mission
|
||||
from dcs.terrain import PersianGulf
|
||||
|
||||
m = Mission()
|
||||
m.load_file("tools/cau_terrain.miz")
|
||||
m.load_file("./gulf_terrain.miz")
|
||||
|
||||
landmap = []
|
||||
for plane_group in m.country("USA").plane_group:
|
||||
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)
|
||||
|
||||
Binary file not shown.
@ -21,7 +21,7 @@ class OverviewCanvas:
|
||||
self.canvas = Canvas(frame, width=self.image.width(), height=self.image.height())
|
||||
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_img = self.game.theater.reference_points[point_a]
|
||||
|
||||
@ -44,7 +44,6 @@ class OverviewCanvas:
|
||||
X = point_b_img[1] + X_offset * X_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
|
||||
|
||||
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):
|
||||
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)
|
||||
|
||||
for cp in self.game.theater.controlpoints:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user