mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
utilize hotstart option for all imports
This commit is contained in:
parent
2ab00504dc
commit
826e7d52ad
@ -30,10 +30,10 @@ class ImportObjects:
|
||||
def getHelicopters(self):
|
||||
return self.helicopters
|
||||
|
||||
def copyAll(self, mission, dest_country_name, dest_name, dest_point=None, dest_heading=0):
|
||||
def copyAll(self, mission, dest_country_name, dest_name, dest_point=None, dest_heading=0, start_type=None):
|
||||
return self.copyStatics(mission, dest_country_name, dest_name, dest_point, dest_heading), \
|
||||
self.copyVehicles(mission, dest_country_name, dest_name, dest_point, dest_heading), \
|
||||
self.copyHelicopters(mission, dest_country_name, dest_name, dest_point, dest_heading)
|
||||
self.copyHelicopters(mission, dest_country_name, dest_name, dest_point, dest_heading, start_type)
|
||||
|
||||
def anchorByGroupName(self, group_name):
|
||||
group = self.source_mission.find_group(group_name)
|
||||
|
||||
@ -259,7 +259,7 @@ class RotorOpsMission:
|
||||
config_name="zone_farp_file",
|
||||
copy_helicopters=helicopters,
|
||||
helicopters_name="ZONE " + zone_name,
|
||||
heli_start_type=None,
|
||||
heli_start_type=start_type,
|
||||
copy_vehicles=True,
|
||||
vehicles_name=zone_name + " FARP Static",
|
||||
copy_statics=False,
|
||||
@ -302,7 +302,7 @@ class RotorOpsMission:
|
||||
config_name="logistics_farp_file",
|
||||
copy_helicopters=helicopters,
|
||||
helicopters_name="ZONE " + zone_name + " LOGISTICS",
|
||||
heli_start_type=None,
|
||||
heli_start_type=start_type,
|
||||
copy_vehicles=True,
|
||||
vehicles_name=zone_name + " Logistics FARP",
|
||||
copy_statics=True,
|
||||
@ -318,7 +318,7 @@ class RotorOpsMission:
|
||||
config_name="defensive_farp_file",
|
||||
copy_helicopters=helicopters,
|
||||
helicopters_name="ZONE " + zone_name + " EMPTY",
|
||||
heli_start_type=None,
|
||||
heli_start_type=start_type,
|
||||
copy_vehicles=True,
|
||||
vehicles_name=zone_name + " Defensive FARP",
|
||||
copy_statics=True,
|
||||
@ -405,6 +405,10 @@ class RotorOpsMission:
|
||||
logger.info("Cloud preset = " + cloud_preset.ui_name + ", ground windspeed = " + str(
|
||||
self.m.weather.wind_at_ground.speed))
|
||||
|
||||
if self.m.weather.wind_at_ground.speed == 0:
|
||||
self.m.weather.wind_at_ground.speed = 2
|
||||
self.m.weather.wind_at_ground.direction = 0
|
||||
|
||||
if options["time"] != "Default Time":
|
||||
self.m.random_daytime(options["time"].lower())
|
||||
print("Time set to " + options["time"])
|
||||
@ -1272,6 +1276,10 @@ class RotorOpsMission:
|
||||
filename = filename[0:i]
|
||||
print(filename)
|
||||
|
||||
start_type = None
|
||||
if data["player_hotstart"]:
|
||||
start_type = dcs.mission.StartType.Warm
|
||||
|
||||
for imp in imports:
|
||||
if imp.filename == (filename + ".miz"):
|
||||
i = ImportObjects(imp.path)
|
||||
@ -1279,7 +1287,8 @@ class RotorOpsMission:
|
||||
new_statics, new_vehicles, new_helicopters = i.copyAll(self.m, country_name,
|
||||
group.units[0].name,
|
||||
group.units[0].position,
|
||||
group.units[0].heading)
|
||||
group.units[0].heading,
|
||||
start_type=start_type)
|
||||
|
||||
break
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user