diff --git a/cScripts/cScripts_pylons.sqf b/cScripts/cScripts_pylons.sqf index 644bbe3ec..95ddcfe11 100644 --- a/cScripts/cScripts_pylons.sqf +++ b/cScripts/cScripts_pylons.sqf @@ -35,7 +35,7 @@ ]] ]], [ "default", [ - ["displayName", "Default"], + ["displayName", "Mixed"], ["icon", ""], ["loadout", [ ["rhs_mag_smokegen",[-1],999], @@ -177,93 +177,6 @@ ]] ]] ]], - ["rhsusf_M1165A1_GMV_SAG2_M2_M240_base", [ - ["default",[ - ["displayName", "Default"], - ["icon", ""], - ["loadout",[ - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200] - ]] - ]] - ]], - ["rhsusf_M1165A1_GMV_SAG2_Mk19_M240_base", [ - ["default",[ - ["displayName", "Default"], - ["icon", ""], - ["loadout",[ - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[2],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200], - ["rhs_mag_762x51_M240_200",[3],200] - ]] - ]] - ]], ["B_AFV_Wheeled_01_up_cannon_F", [ ["default",[ ["displayName", "Heavy HEATFS-T"], @@ -432,4 +345,137 @@ ]] ]] ]] + + ["rhsusf_M1165A1_GMV_SAG2_M2_M240_base", [ + ["default",[ + ["displayName", "Default"], + ["icon", ""], + ["loadout",[ + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0],100], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200] + ]] + ]] + ]], + ["rhsusf_M1165A1_GMV_SAG2_Mk19_M240_base", [ + ["default",[ + ["displayName", "Default"], + ["icon", ""], + ["loadout",[ + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["RHS_48Rnd_40mm_MK19_M430A1",[0],48], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[2],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200], + ["rhs_mag_762x51_M240_200",[3],200] + ]] + ]] + ]], + + + // FixedWings + // > getPylonMagazines cursorObject + + // USAF_A10 + //["USAF_A10", [ + // ["groundsuperiority", [ + // ["displayName", "Ground Superiority"], + // ["icon", ""], + // ["loadout", [ + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_1Rnd_GBU12", + // "", + // "USAF_PylonRack_1Rnd_GBU12", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70", + // "USAF_PylonRack_21Rnd_HYDRA70" + // ]] + // ]] + //]] + + + // Helicopters + + // RHS_AH64D + //["RHS_AH64D", [ + // ["displayName", "Ground Superiority"], + // ["icon", ""], + // ["loadout", [ + // ["default", [ + // "", // Wing tips + // "rhs_mag_M151_19", + // "rhs_mag_AGM114L_4", + // "rhs_mag_AGM114K_4", + // "rhs_mag_M151_19", + // "", // Wing tips + // "rhsusf_M130_CMFlare_Chaff_Magazine_x2" + // ]] + // ]] + //]] ]; \ No newline at end of file diff --git a/cScripts/functions/vehicle/fn_vehicle_addCosmeticSelection.sqf b/cScripts/functions/vehicle/fn_vehicle_addCosmeticSelection.sqf index e51752d74..e8ad370f4 100644 --- a/cScripts/functions/vehicle/fn_vehicle_addCosmeticSelection.sqf +++ b/cScripts/functions/vehicle/fn_vehicle_addCosmeticSelection.sqf @@ -18,6 +18,8 @@ params [["_vehicle", objNull, [objNull]]]; private _textures = [ + + // Saber ["rhsusf_m1a1tank_base", "Saber-1 (120mm IV)", [ "\z\cav\addons\textures\data\vehicles\abrams\BarrelArt_120mmIV_ca.paa", { @@ -58,7 +60,7 @@ private _textures = [ _vehicle setVariable [QEGVAR(Vehicle,Callsign), 4, true]; } ]], - ["rhsusf_m1a1tank_base", "Saber-1", [ + ["rhsusf_m1a1tank_base", "Saber-1", [ "\rhsusf\addons\RHSUSF_Decals\Data\Labels\ArmyPlt_Abrams_D\1_ca.paa", { [_vehicle, [ @@ -98,6 +100,8 @@ private _textures = [ _vehicle setVariable [QEGVAR(Vehicle,Callsign), -4, true]; } ]], + + // Dragoon ["cav_dragoon_base_F", "Toggle Camo Net", [ "", { @@ -196,6 +200,52 @@ private _textures = [ ]] call EFUNC(vehicle,applyTextures); } ]] + + // USAF_A10 + ["USAF_A10", "Clean", [ + "", + { + _vehicle animateSource ["serial_nose",1, true]; + _vehicle animateSource ["serial_gear",0, true]; + [_vehicle, [ + [0, "\usaf_a10\skins\a10_01_worn_co.paa"], + + // Tail Number + [25, ""], //tail_art + [26, "\z\cav\addons\insignia\data\Alpha_1_D.paa"], + [27, "\usaf_main\characters\c_dg.paa"], + [28, "\usaf_main\characters\a_dg.paa"], + + [29,"\usaf_main\data\tail\fy\70_d.paa"], + + [30, "\usaf_main\characters\numbers\n_4_dg.paa"], + [21, "\usaf_main\characters\numbers\n_2_dg.paa"], + [22, "\usaf_main\characters\numbers\n_1_dg.paa"] + ]] call EFUNC(vehicle,applyTextures); + } + ]], + ["USAF_A10", "Shark", [ + "", + { + _vehicle animateSource ["serial_nose",0, true]; + _vehicle animateSource ["serial_gear",1, true]; + [_vehicle, [ + [0, "\usaf_a10\skins\a10_01_worn_shark_co.paa"], + + // Tail Number + [25, ""], //tail_art + [26, "\z\cav\addons\insignia\data\Alpha_1_D.paa"], + [27, "\usaf_main\characters\c_dg.paa"], + [28, "\usaf_main\characters\a_dg.paa"], + + [29,"\usaf_main\data\tail\fy\70_d.paa"], + + [30, "\usaf_main\characters\numbers\n_4_dg.paa"], + [21, "\usaf_main\characters\numbers\n_2_dg.paa"], + [22, "\usaf_main\characters\numbers\n_1_dg.paa"] + ]] call EFUNC(vehicle,applyTextures); + } + ]] ]; { diff --git a/cScripts/functions/vehicle/fn_vehicle_addCosmetics.sqf b/cScripts/functions/vehicle/fn_vehicle_addCosmetics.sqf index 7da385962..cd13f63b3 100644 --- a/cScripts/functions/vehicle/fn_vehicle_addCosmetics.sqf +++ b/cScripts/functions/vehicle/fn_vehicle_addCosmetics.sqf @@ -241,6 +241,26 @@ if (_vehicle iskindOf "NDS_M224_mortar_base") then { if (_vehicle iskindOf "RHS_C130J_Base") then { }; +if (_vehicle iskindOf "USAF_A10") then { + _vehicle animateSource ["serial_nose",1, true]; + _vehicle animateSource ["serial_gear",0, true]; + [_vehicle, [ + [0, "\usaf_a10\skins\a10_01_worn_co.paa"], + + // Tail Number + [25, ""], //tail_art + [26, "\z\cav\addons\insignia\data\Alpha_1_D.paa"], + [27, "\usaf_main\characters\c_dg.paa"], + [28, "\usaf_main\characters\a_dg.paa"], + + [29,"\usaf_main\data\tail\fy\70_d.paa"], + + [30, "\usaf_main\characters\numbers\n_4_dg.paa"], + [21, "\usaf_main\characters\numbers\n_2_dg.paa"], + [22, "\usaf_main\characters\numbers\n_1_dg.paa"] + ]] call EFUNC(vehicle,applyTextures); +}; + _vehicle setPlateNumber "1/7 Cav"; // Add eventHandlers to handle death and deletion. diff --git a/cScripts/functions/vehicle/fn_vehicle_applyLoadout.sqf b/cScripts/functions/vehicle/fn_vehicle_applyLoadout.sqf index 94156624c..0eba159b6 100644 --- a/cScripts/functions/vehicle/fn_vehicle_applyLoadout.sqf +++ b/cScripts/functions/vehicle/fn_vehicle_applyLoadout.sqf @@ -12,7 +12,13 @@ * nothing * * Example: - * [_vehicle, "default", []] call cScripts_fnc_vehicle_applyLoadout; + * ["vic", "default", []] call cScripts_fnc_vehicle_applyLoadout; + * ["vic", "default", [["SmokeLauncherMag",[0,0],6]]] call cScripts_fnc_vehicle_applyLoadout; + * ["vic", "default", [["60Rnd_30mm_APFSDS_shells_Tracer_Red",[0],60],["2000Rnd_762x51_Belt_T_Red",[0],2000]]] call cScripts_fnc_vehicle_applyLoadout; + * ["vic", "default", ["","rhs_mag_M151_19","rhs_mag_AGM114L_4","rhs_mag_AGM114K_4","rhs_mag_M151_19","","rhsusf_M130_CMFlare_Chaff_Magazine_x2"]] call cScripts_fnc_vehicle_applyLoadout; + * + * _var = ["rhsusf_m1a1tank_base", "default"] call cScripts_fnc_vehicle_getPylon; + * ["vic", "default", _var] call cScripts_fnc_vehicle_applyLoadout; * * Public: No */ @@ -33,29 +39,38 @@ INFO_3("VehiclePylonApply", "Applying pylon '%1' to %2 (%3)", _loadoutName, _veh // Rearm vehicle first _vehicle setVehicleAmmo 1; -// Clear magazine -{ - _x params ["_magazineClassname", "_turretPath"]; - INFO_4("VehiclePylonApply", "Removing magazine '%1' in turrent %2 to %3 (%4)", _magazineClassname, _turretPath, _vehicle, typeOf _vehicle); - _vehicle removeMagazinesTurret [_magazineClassname, _turretPath]; -} forEach magazinesAllTurrets _vehicle; +if (_vehicleLoadout#0 isEqualType []) then { + // Clear magazine + { + INFO_4("VehiclePylonApply", "Removing magazine '%1' in turrent %2 to %3 (%4)", _magazineClassname, _turretPath, _vehicle, typeOf _vehicle); + _x params ["_magazineClassname", "_turretPath"]; + _vehicle removeMagazinesTurret [_magazineClassname, _turretPath]; + } forEach magazinesAllTurrets _vehicle; -// Add magazine -{ - _x params [ - ["_magazineClassname", "", [""]], - ["_turretPath", [], [[]]], - ["_amount", -1, [0]] - ]; - if (_amount != 0) then { - INFO_5("VehiclePylonApply", "Adding magazine '%1' (%2) in turrent %23 to %4 (%5)", _magazineClassname, _amount, _turretPath, _vehicle, typeOf _vehicle); - _vehicle addMagazineTurret [ - _magazineClassname, - _turretPath, - if (_amount < 0) then {getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count")} else {_amount} + // Add magazine + { + _x params [ + ["_magazineClassname", "", [""]], + ["_turretPath", [], [[]]], + ["_amount", -1, [0]] ]; - }; -} forEach _vehicleLoadout; + if (_amount != 0) then { + INFO_5("VehiclePylonApply", "Adding magazine '%1' (%2) in turrent %23 to %4 (%5)", _magazineClassname, _amount, _turretPath, _vehicle, typeOf _vehicle); + _vehicle addMagazineTurret [ + _magazineClassname, + _turretPath, + if (_amount < 0) then {getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count")} else {_amount} + ]; + }; + } forEach _vehicleLoadout; +} else { + // Add magazine + { + private _pylonIndex = _forEachIndex + 1; + INFO_4("VehiclePylonApply", "Adding pylon index %1: '%2' to %3 (%4)", _pylonIndex, _x, _vehicle, typeOf _vehicle); + _vehicle setPylonLoadout [_pylonIndex, _x, true]; + } forEach _vehicleLoadout; +}; -INFO_3("VehiclePylonApply", "Vehicle %1 (%2) has been rearmed with '%3'", _vehicle, typeOf _vehicle, _loadoutName); -_vehicle setVariable [QEGVAR(Vehicle,Pylon), [_loadoutName, _vehicleLoadout], true]; +INFO_3("VehiclePylonApply", "Vehicle %1 (%2) have been rearmed with '%3'", _vehicle, typeOf _vehicle, _loadoutName); +_vehicle setVariable [QEGVAR(Vehicle,Pylon), [_loadoutName, _vehicleLoadout], true]; \ No newline at end of file