fixed land map for gulf; ability to get logs from settings; minor trigger updates

This commit is contained in:
Vasyl Horbachenko
2018-10-11 04:12:02 +03:00
parent 7a8dfeb819
commit 5bbf3fc49f
7 changed files with 83 additions and 47 deletions

View File

@@ -0,0 +1,36 @@
import typing
from dcs.mission import *
from dcs.terrain import *
from theater.persiangulf import *
from theater.controlpoint import *
def find_ground_location(near, theater, max, min) -> typing.Optional[Point]:
for _ in range(500):
p = near.random_point_within(max, min)
if theater.is_on_land(p):
return p
return None
mission = Mission(PersianGulf())
theater = PersianGulfTheater()
for cp in theater.enemy_points():
for _ in range(0, random.randrange(3, 6)):
p = find_ground_location(cp.position, theater, 120000, 5000)
if not p:
print("Didn't find ground location for {}".format(cp))
continue
mission.flight_group_inflight(
mission.country("USA"),
"",
A_10C,
p,
10000
)
mission.save("resources/tools/a.miz")