Skip to content

Commit

Permalink
Fixed pylons not loading (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
pool011 authored May 14, 2024
1 parent 2ffe066 commit 5ec935a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 43 deletions.
2 changes: 1 addition & 1 deletion cScripts/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ class cScripts {
class testing_loadoutArrays {};
class testing_equipmentUsed {};
};
};
};
90 changes: 51 additions & 39 deletions cScripts/cScripts_pylons.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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]
]]
]]
]]
];
5 changes: 2 additions & 3 deletions cScripts/functions/vehicle/fn_vehicle_addDefaultLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5ec935a

Please sign in to comment.