mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
planes db updates: fixed loadouts & tasks
This commit is contained in:
BIN
resources/tools/cau_terrain.miz
Normal file
BIN
resources/tools/cau_terrain.miz
Normal file
Binary file not shown.
14
resources/tools/generate_landmap.py
Normal file
14
resources/tools/generate_landmap.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pickle
|
||||
|
||||
from dcs.mission import Mission
|
||||
from dcs.terrain import PersianGulf
|
||||
|
||||
m = Mission()
|
||||
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("gulflandmap.p", "wb") as f:
|
||||
pickle.dump(landmap, f)
|
||||
30
resources/tools/generate_loadout_check.py
Normal file
30
resources/tools/generate_loadout_check.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import dcs
|
||||
|
||||
from gen.aircraft import AircraftConflictGenerator
|
||||
from game import db
|
||||
mis = dcs.Mission(dcs.terrain.PersianGulf())
|
||||
pos = dcs.terrain.PersianGulf().khasab().position
|
||||
airgen = AircraftConflictGenerator(mis, None)
|
||||
|
||||
for t, uts in db.UNIT_BY_TASK.items():
|
||||
if t != dcs.task.CAP and t != dcs.task.CAS:
|
||||
continue
|
||||
|
||||
pos.y = dcs.terrain.PersianGulf().khasab().position.x
|
||||
for t in t == dcs.task.CAP and [dcs.task.CAP, dcs.task.Escort] or [t]:
|
||||
pos.x += 10000
|
||||
for ut in uts:
|
||||
pos.y += 5000
|
||||
ctr = mis.country([k for k, v in db.UNIT_BY_COUNTRY.items() if ut in v][0])
|
||||
|
||||
g = mis.flight_group_inflight(
|
||||
country=ctr,
|
||||
name="{} - {}".format(t.name, ut),
|
||||
aircraft_type=ut,
|
||||
position=pos,
|
||||
altitude=10000
|
||||
)
|
||||
g.task = t.name
|
||||
airgen._setup_group(g, t)
|
||||
|
||||
mis.save("loadout_test.miz")
|
||||
BIN
resources/tools/gulf_terrain.miz
Normal file
BIN
resources/tools/gulf_terrain.miz
Normal file
Binary file not shown.
Reference in New Issue
Block a user