diff --git a/cScripts/CfgFunctions.hpp b/cScripts/CfgFunctions.hpp index fd563de22..601233a2b 100644 --- a/cScripts/CfgFunctions.hpp +++ b/cScripts/CfgFunctions.hpp @@ -258,4 +258,4 @@ class cScripts { class testing_loadoutArrays {}; class testing_equipmentUsed {}; }; -}; +}; \ No newline at end of file diff --git a/cScripts/cScripts_pylons.sqf b/cScripts/cScripts_pylons.sqf index abd758d6e..755fa2b65 100644 --- a/cScripts/cScripts_pylons.sqf +++ b/cScripts/cScripts_pylons.sqf @@ -106,19 +106,23 @@ ["cav_dragoon_base_F", [ ["antiarmor", [ - ["SmokeLauncherMag",[0],6], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ["displayName", "Anti-Armor"], + ["icon", ""], + ["loadout",[ + ["SmokeLauncherMag",[0],6], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ]] ]], // ["antiair", [ // ["SmokeLauncherMag",[0,0],6], @@ -135,34 +139,42 @@ // ["4Rnd_Titan_long_missiles",[0],4] // ]], ["default",[ - ["SmokeLauncherMag",[0],6], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ["displayName", "Anti-Personnel"], + ["icon", ""], + ["loadout",[ + ["SmokeLauncherMag",[0],6], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ]] ]], ["balanced",[ - ["SmokeLauncherMag",[0],6], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], - ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ["displayName", "Balanced"], + ["icon", ""], + ["loadout",[ + ["SmokeLauncherMag",[0],6], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_mag_300Rnd_762x51_Belt_Red",[0],300], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_HEI_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78], + ["cav_78Rnd_30mm_APFSDS_shells_Tracer_Red",[0],78] + ]] ]] ]] ]; \ No newline at end of file diff --git a/cScripts/functions/vehicle/fn_vehicle_addDefaultLoadout.sqf b/cScripts/functions/vehicle/fn_vehicle_addDefaultLoadout.sqf index 55a601891..e3f69656a 100644 --- a/cScripts/functions/vehicle/fn_vehicle_addDefaultLoadout.sqf +++ b/cScripts/functions/vehicle/fn_vehicle_addDefaultLoadout.sqf @@ -24,16 +24,15 @@ if (!(_vehicle call FUNC(isValidFaction))) exitWith {}; INFO_2("VehicleDefaultLoadout", "Applying vehicle loadout to %1 [%2].", _vehicle, typeOf _vehicle); // Default pylon applied -private _vehicleTypes = [true] call EFUNC(vehicle,getPylon); private _pylon = []; { if (_vehicle iskindOf _x) exitWith { - _pylon = [_x, "default"] call EFUNC(vehicle,getPylon); + _pylon = [_x, "default"] call EFUNC(vehicle,getPylonLoadout); INFO_3("VehicleDefaultLoadout", "Vehicle %1 [%2] applied have loadout %3.", _vehicle, typeOf _vehicle, _pylon); [_vehicle, "default", _pylon] call EFUNC(vehicle,applyLoadout); }; -} forEach _vehicleTypes; +} forEach (keys GVAR(PYLONS)); if (count _pylon == 0) then { WARNING_2("VehicleDefaultLoadout", "Vehicle %1 [%2] has no loadout setup.", _vehicle, typeOf _vehicle);