mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
..
-uh-60L troop capacity set to 11 -bugfix: AI enemy planes/helicopters attacked invisible FARPS -generator now produces error log -syria scenario farp support units invulnerable -all russia/usa objects now swap sides for defense mode, including carriers and farps -forces templates can include air units with customization for loadout, livery, and skill -carrier and farp parking for enemy helicopters -parking now supports multiple airports per side -improved AI flight orbits (now onside and perpendicular to closest enemy airport) -enemy transport helicopters! -apcs spawn infantry now disables conflict zones as infinite pickup zones (adds a bit of realism) -bug fix: add zone triggers can be added in wrong order
This commit is contained in:
39
Generator/utils/extract units/main.py
Normal file
39
Generator/utils/extract units/main.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import dcs
|
||||
import os
|
||||
|
||||
|
||||
def main():
|
||||
filename = "source.miz"
|
||||
print("Attempting to extract units from " + filename + " relative to 'HELO_FARP' initial point.")
|
||||
|
||||
source_mission = dcs.mission.Mission()
|
||||
source_mission.load_file(filename)
|
||||
fo = open("units.txt", "w")
|
||||
|
||||
usa = source_mission.country("USA")
|
||||
initial_point = usa.find_static_group("HELO_FARP").position
|
||||
|
||||
def p(mystring):
|
||||
fo.write(mystring + '\n')
|
||||
print(mystring)
|
||||
|
||||
group_types = [usa.static_group, usa.vehicle_group, usa.helicopter_group, usa.plane_group, usa.ship_group]
|
||||
|
||||
for group_type in group_types:
|
||||
for group in group_type:
|
||||
for unit in group.units:
|
||||
print(str(unit.position.x))
|
||||
x_rel = initial_point.x - unit.position.x
|
||||
y_rel = initial_point.y - unit.position.y
|
||||
heading = unit.heading
|
||||
|
||||
p(unit.type)
|
||||
p("x: " + str(round(x_rel, 7)))
|
||||
p("y: " + str(round(y_rel, 7)))
|
||||
p("h: " + str(round(heading, 2)))
|
||||
p('\n')
|
||||
|
||||
fo.close()
|
||||
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user