mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
OH-6 Cayuse mod v1.2 support (#346)
Resolves #313 * Initial commit of OH-6 Modpack v1.2 + Vietnam Asset Pack v1 support. * Added OH-6 Mod loadouts by @Starfire13 * Modified pydcs_extensions/oh6_vietnamassetpack/oh6_vietnamassetpack.py Added resources/units/ground_units/vap_m35_truck.yaml Added resources/units/ground_units/vap_mule.yaml Added resources/units/ground_units/vap_mutt.yaml Added resources/units/ground_units/vap_mutt_gun.yaml Added resources/units/ground_units/vap_type63_mlrs.yaml Added resources/units/ground_units/vap_vc_bicycle_ak.yaml Added resources/units/ground_units/vap_vc_zis.yaml * Modified changelog.md Modified resources/factions/USA 1970 Vietnam War.json Modified resources/factions/USA 1971 Vietnam War.json Modified resources/units/ground_units/vap_mule.yaml Added resources/units/aircraft/OH-6A.yaml * Added the OH-6 to factions and implemented the mod selection in the new game wizard. Added an icon an a banner. * Modified resources/units/aircraft/OH-6A.yaml * Added icons for the Vietnam Asset Pack ground units. Also added an icon for the PT-76 since it was missing. Added a Viet Cong 1970s faction. * Added resources/units/ships/vap_us_seafloat.yaml * Adjust tasking for OH-6A OH-6A is only capable of Transport & Reconnaissance, but we can ignore this if the lead slot is a client. AI however will most likely not support this, but we can add Transport & Air Assault instead... * Fix bug in configure task + client override fallback --------- Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
@@ -352,6 +352,45 @@ class Faction:
|
||||
self.remove_aircraft("A-4E-C")
|
||||
if not mod_settings.hercules:
|
||||
self.remove_aircraft("Hercules")
|
||||
if not mod_settings.oh_6:
|
||||
self.remove_aircraft("OH-6A")
|
||||
if not mod_settings.oh_6_vietnamassetpack:
|
||||
self.remove_vehicle("vap_mutt_gun")
|
||||
self.remove_vehicle("vap_type63_mlrs")
|
||||
self.remove_vehicle("vap_vc_bicycle_mortar")
|
||||
self.remove_vehicle("vap_zis_150_aa")
|
||||
self.remove_vehicle("vap_us_hooch_LP")
|
||||
self.remove_vehicle("vap_ammo_50cal_line")
|
||||
self.remove_vehicle("vap_ammo_50cal_pack")
|
||||
self.remove_vehicle("vap_barrels_line")
|
||||
self.remove_vehicle("vap_barrels")
|
||||
self.remove_vehicle("vap_ammo_box_pile")
|
||||
self.remove_vehicle("vap_ammo_box_wood_long")
|
||||
self.remove_vehicle("vap_ammo_box_wood_small")
|
||||
self.remove_vehicle("vap_barrel_red")
|
||||
self.remove_vehicle("vap_barrel_green")
|
||||
self.remove_vehicle("vap_mre_boxes")
|
||||
self.remove_vehicle("vap_mixed_cargo_1")
|
||||
self.remove_vehicle("vap_mixed_cargo_2")
|
||||
self.remove_vehicle("vap_watchtower")
|
||||
self.remove_vehicle("vap_house_high")
|
||||
self.remove_vehicle("vap_house_long")
|
||||
self.remove_vehicle("vap_house_small")
|
||||
self.remove_vehicle("vap_house_T")
|
||||
self.remove_vehicle("vap_house_tiny")
|
||||
self.remove_vehicle("vap_house1")
|
||||
self.remove_vehicle("vap_us_hooch_radio")
|
||||
self.remove_vehicle("vap_us_hooch_closed")
|
||||
self.remove_vehicle("vap_vc_bunker_single")
|
||||
self.remove_vehicle("vap_vc_mg_nest")
|
||||
self.remove_vehicle("vap_mule")
|
||||
self.remove_vehicle("vap_mutt")
|
||||
self.remove_vehicle("vap_m35_truck")
|
||||
self.remove_vehicle("vap_vc_zis")
|
||||
self.remove_vehicle("vap_vc_bicycle")
|
||||
self.remove_vehicle("vap_vc_zil")
|
||||
self.remove_vehicle("vap_vc_bicycle_ak")
|
||||
self.remove_ship("vap_us_seafloat")
|
||||
if not mod_settings.uh_60l:
|
||||
self.remove_aircraft("UH-60L")
|
||||
self.remove_aircraft("KC130J")
|
||||
|
||||
@@ -392,23 +392,35 @@ class AircraftBehavior:
|
||||
|
||||
if preferred_task in flight.unit_type.dcs_unit_type.tasks:
|
||||
group.task = preferred_task.name
|
||||
elif fallback_tasks:
|
||||
return
|
||||
if fallback_tasks:
|
||||
for task in fallback_tasks:
|
||||
if task in flight.unit_type.dcs_unit_type.tasks:
|
||||
group.task = task.name
|
||||
return
|
||||
elif flight.unit_type.dcs_unit_type.task_default and preferred_task == Nothing:
|
||||
if flight.unit_type.dcs_unit_type.task_default and preferred_task == Nothing:
|
||||
group.task = flight.unit_type.dcs_unit_type.task_default.name
|
||||
logging.warning(
|
||||
f"{ac_type} is not capable of 'Nothing', using default task '{group.task}'"
|
||||
)
|
||||
else:
|
||||
fallback_part = (
|
||||
f" nor any of the following fall-back tasks: {[task.name for task in fallback_tasks]}"
|
||||
if fallback_tasks
|
||||
else ""
|
||||
return
|
||||
if flight.roster.members and flight.roster.members[0].is_player:
|
||||
group.task = (
|
||||
flight.unit_type.dcs_unit_type.task_default.name
|
||||
if flight.unit_type.dcs_unit_type.task_default
|
||||
else group.task # even if this is incompatible, if it's a client we don't really care...
|
||||
)
|
||||
raise RuntimeError(
|
||||
f"{ac_type} is neither capable of {preferred_task.name}"
|
||||
f"{fallback_part}. Can't generate {flight.flight_type} flight."
|
||||
logging.warning(
|
||||
f"Client override: {ac_type} is not capable of '{preferred_task}', using default task '{group.task}'"
|
||||
)
|
||||
return
|
||||
|
||||
fallback_part = (
|
||||
f" nor any of the following fall-back tasks: {[task.name for task in fallback_tasks]}"
|
||||
if fallback_tasks
|
||||
else ""
|
||||
)
|
||||
raise RuntimeError(
|
||||
f"{ac_type} is neither capable of {preferred_task.name}"
|
||||
f"{fallback_part}. Can't generate {flight.flight_type} flight."
|
||||
)
|
||||
|
||||
@@ -84,6 +84,8 @@ class ModSettings:
|
||||
f106_deltadart: bool = False
|
||||
hercules: bool = False
|
||||
irondome: bool = False
|
||||
oh_6: bool = False
|
||||
oh_6_vietnamassetpack: bool = False
|
||||
uh_60l: bool = False
|
||||
jas39_gripen: bool = False
|
||||
sk_60: bool = False
|
||||
|
||||
Reference in New Issue
Block a user