mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
minor adjustment in strike objectives generation
This commit is contained in:
parent
6b96410ea4
commit
ff08888385
@ -3,7 +3,9 @@ import typing
|
||||
from dcs.mission import *
|
||||
from dcs.terrain import *
|
||||
|
||||
from theater.nevada import *
|
||||
from theater.persiangulf import *
|
||||
from theater.caucasus import *
|
||||
from theater.controlpoint import *
|
||||
|
||||
def find_ground_location(near, theater, max, min) -> typing.Optional[Point]:
|
||||
@ -15,8 +17,8 @@ def find_ground_location(near, theater, max, min) -> typing.Optional[Point]:
|
||||
return None
|
||||
|
||||
|
||||
mission = Mission(PersianGulf())
|
||||
theater = PersianGulfTheater()
|
||||
mission = Mission(Nevada())
|
||||
theater = NevadaTheater()
|
||||
|
||||
for cp in theater.enemy_points():
|
||||
for _ in range(0, random.randrange(3, 6)):
|
||||
@ -33,4 +35,4 @@ for cp in theater.enemy_points():
|
||||
10000
|
||||
)
|
||||
|
||||
mission.save("resources/tools/a.miz")
|
||||
mission.save("resources/tools/ground_objects_example.miz")
|
||||
|
||||
@ -57,7 +57,7 @@ def generate_groundobjects(theater: ConflictTheater):
|
||||
|
||||
if point:
|
||||
for angle in range(0, 360, 45):
|
||||
p = point.point_from_heading(angle, 1000)
|
||||
p = point.point_from_heading(angle, 2500)
|
||||
if on_ground and not theater.is_on_land(p):
|
||||
point = None
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user