mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
..
This commit is contained in:
116
Generator/RotorOpsGroups.py
Normal file
116
Generator/RotorOpsGroups.py
Normal file
@@ -0,0 +1,116 @@
|
||||
from dcs.countries import Russia, USA
|
||||
import dcs.unit as unit
|
||||
from dcs.mission import Mission
|
||||
import dcs.mapping as mapping
|
||||
import dcs.ships
|
||||
import dcs.vehicles
|
||||
import dcs.statics
|
||||
import dcs.unit
|
||||
import random
|
||||
|
||||
|
||||
class VehicleTemplate:
|
||||
|
||||
class USA:
|
||||
|
||||
@staticmethod
|
||||
def invisible_farp(mission, country, position, heading, name, late_activation):
|
||||
|
||||
farp = mission.farp(country, name, position, hidden=False, dead=False, farp_type=dcs.unit.InvisibleFARP)
|
||||
|
||||
vg = mission.vehicle_group_platoon(
|
||||
country,
|
||||
name,
|
||||
[
|
||||
dcs.vehicles.Unarmed.M_818,
|
||||
dcs.vehicles.AirDefence.Vulcan,
|
||||
dcs.vehicles.Unarmed.Ural_375
|
||||
],
|
||||
position.point_from_heading(45, 7),
|
||||
heading=random.randint(0, 359),
|
||||
formation=dcs.unitgroup.VehicleGroup.Formation.Star,
|
||||
|
||||
)
|
||||
vg.late_activation = late_activation
|
||||
return vg
|
||||
|
||||
|
||||
@staticmethod
|
||||
def logistics_site(mission, country, position, heading, prefix=""):
|
||||
|
||||
farp = mission.farp(country, "Logistics FARP", position, hidden=False, dead=False, farp_type=dcs.unit.InvisibleFARP)
|
||||
|
||||
sg = mission.static_group(
|
||||
country,
|
||||
prefix + " Logistics",
|
||||
dcs.statics.Fortification.TV_tower,
|
||||
position.point_from_heading(heading, 80),
|
||||
heading
|
||||
)
|
||||
|
||||
dist_from_center = 30
|
||||
|
||||
for i in range(1,4):
|
||||
|
||||
u = mission.static("logistic" + str(i), dcs.statics.Cargo.Iso_container_small)
|
||||
u.position = position.point_from_heading(heading + 90, dist_from_center + (i * 15))
|
||||
u.heading = 10
|
||||
sg.add_unit(u)
|
||||
|
||||
for i in range(5,8):
|
||||
|
||||
u = mission.static("logistic" + str(i), dcs.statics.Cargo.Iso_container_small)
|
||||
u.position = position.point_from_heading(heading + 270, dist_from_center + (i * 15))
|
||||
u.heading = 10
|
||||
sg.add_unit(u)
|
||||
|
||||
a_pos = position.point_from_heading(heading + 180, dist_from_center)
|
||||
|
||||
u = mission.static("Ammo Dump", dcs.statics.Fortification.FARP_Ammo_Dump_Coating)
|
||||
u.position = a_pos.point_from_heading(heading + 90, 1)
|
||||
u.heading = heading
|
||||
sg.add_unit(u)
|
||||
|
||||
u = mission.static("FARP Tent", dcs.statics.Fortification.FARP_Tent)
|
||||
u.position = a_pos.point_from_heading(heading + 90, dist_from_center + 20)
|
||||
u.heading = heading
|
||||
sg.add_unit(u)
|
||||
|
||||
u = mission.static("Fuel Depot", dcs.statics.Fortification.FARP_Fuel_Depot)
|
||||
u.position = a_pos.point_from_heading(heading + 90, dist_from_center + 40)
|
||||
u.heading = heading
|
||||
sg.add_unit(u)
|
||||
|
||||
return sg
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def sa6_site(mission, country, position, heading, prefix="", skill=unit.Skill.Average):
|
||||
vg = mission.vehicle_group(
|
||||
country,
|
||||
prefix + "SA6 site",
|
||||
dcs.vehicles.AirDefence.Kub_1S91_str,
|
||||
position,
|
||||
heading
|
||||
)
|
||||
|
||||
u = mission.vehicle("Launcher 1", dcs.vehicles.AirDefence.Kub_2P25_ln)
|
||||
u.position = position.point_from_heading(heading + 140, 30)
|
||||
u.heading = heading
|
||||
vg.add_unit(u)
|
||||
|
||||
u = mission.vehicle("Launcher 2", dcs.vehicles.AirDefence.Kub_2P25_ln)
|
||||
u.position = position.point_from_heading(heading + 210, 30)
|
||||
u.heading = heading
|
||||
vg.add_unit(u)
|
||||
|
||||
u = mission.vehicle("Rearm Truck", dcs.vehicles.Unarmed.Ural_375)
|
||||
u.position = position.point_from_heading(heading + 0, 40)
|
||||
u.heading = heading
|
||||
vg.add_unit(u)
|
||||
|
||||
for u in vg.units:
|
||||
u.skill = skill
|
||||
|
||||
return vg
|
||||
Reference in New Issue
Block a user