Skip to content

Commit

Permalink
Updated the weapons specific arsenal to add launcher and handgun slots (
Browse files Browse the repository at this point in the history
#1151)

Co-authored-by: Broström.A | Evul <[email protected]>
  • Loading branch information
pool011 and AndreasBrostrom authored Apr 1, 2024
1 parent 5f5ed0b commit 937b4a2
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 14 deletions.
35 changes: 26 additions & 9 deletions cScripts/functions/init/fn_init_logistics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ private _dataArray = [
["ACE_HuntIR_monitor", 0],
["ItemAndroid", 0],
["rhsusf_weap_glock17g4", 0],
["rhsusf_mag_17Rnd_9x19_FMJ",0],
["USP_VEST_STRANDHOGG2_MC", 0],
["USP_VEST_STRANDHOGG2_CBR", 0],
["ACE_Vector", 0],
Expand All @@ -1563,6 +1564,7 @@ private _dataArray = [
["ACE_microDAGR", 0],
["ACE_MX2A", 0],
["rhsusf_weap_glock17g4", 0],
["rhsusf_mag_17Rnd_9x19_FMJ",0],
["USP_VEST_STRANDHOGG2_MC", 0],
["USP_VEST_STRANDHOGG2_CBR", 0],
["ACE_HuntIR_monitor", 0],
Expand All @@ -1579,15 +1581,6 @@ private _dataArray = [
["UK3CB_US_B_B_RIF_OCP_Radio", 0]
]],
["arsenal_role_weapons", [
// Launchers
["rhs_weap_maaws", 0],
["launch_MRAWS_green_F", 0],
["launch_MRAWS_sand_F", 0],
["launch_MRAWS_olive_F", 0],
["rhs_weap_fgm148",0],
["rhs_weap_fim92",0],


// MAAWS ammo
["MRAWS_HEAT_F", 0],
["MRAWS_HE_F", 0],
Expand Down Expand Up @@ -2144,6 +2137,30 @@ private _dataArray = [
["rhsusf_acc_wmx", 0],
["rhsusf_acc_wmx_bk", 0],
["acc_flashlight", 0]
]],
["arsenal_weap_launchers", [
// Launchers
["launch_MRAWS_green_F", 0],
["launch_MRAWS_sand_F", 0],
["launch_MRAWS_olive_F", 0],
["rhs_weap_fgm148",0],
["rhs_weap_fim92",0],

// Launcher ammo
["MRAWS_HEAT_F", 0],
["MRAWS_HE_F", 0],
["MAA_MAAWS_ASM509", 0],
["MAA_MAAWS_HEDP502", 0],
["MAA_MAAWS_GMM_MT", 0],
["MAA_MAAWS_MT756", 0],
["rhs_fgm148_magazine_AT",0],
["rhs_fim92_mag",0]
]],
["arsenal_weap_sidearm",[
["rhsusf_weap_glock17g4",0],
["rhsusf_weap_m1911a1",0],
["rhsusf_mag_7x45acp_MHP",0],
["rhsusf_mag_17Rnd_9x19_FMJ",0]
]]
];

Expand Down
29 changes: 24 additions & 5 deletions cScripts/functions/systems/fn_getArsenalWhitelist.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,43 @@ private _roleSpecific = switch ([player] call EFUNC(gear,getLoadoutRole)) do {


private _primaryWeapon = if (!isNil{_loadout#0#0}) then {_loadout#0#0} else {""};
private _weaponSystemSpecific = switch (true) do {
private _primarySpecific = switch (true) do {
case (_primaryWeapon isKindof ['rhs_weap_mk18_m320', configFile >> 'CfgWeapons']
|| _primaryWeapon isKindof ['rhs_weap_m16a4_carryhandle_M203', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_ugl");};
|| _primaryWeapon isKindof ['rhs_weap_m16a4_carryhandle_M203', configFile >> 'CfgWeapons']
|| _primaryWeapon isKindof ['rhs_weap_m4a1_m320', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_ugl");};

case (_primaryWeapon isKindof ['rhs_weap_m4a1', configFile >> 'CfgWeapons']
|| _primaryWeapon isKindof ['rhs_weap_m16a4', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_m4");};

case (_primaryWeapon isKindof ['rhs_weap_sr25_ec', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_sr25");};

case (primaryWeapon player isKindof ['rhs_weap_m240_base', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_m240");};
case (_primaryWeapon isKindof ['rhs_weap_m240_base', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_m240");};

case (primaryWeapon player isKindof ['rhs_weap_m249_pip', configFile >> 'CfgWeapons']
case (_primaryWeapon isKindof ['rhs_weap_m249_pip', configFile >> 'CfgWeapons']
|| _primaryWeapon isKindof ['rhs_weap_m249_pip_L', configFile >> 'CfgWeapons']
|| _primaryWeapon isKindof ['rhs_weap_m249_pip_S', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_m249");};
default {[]};
};

private _handgunWeapon = if (!isNil{_loadout#2#0}) then {_loadout#2#0} else {""};
private _handgunSpecific = switch (true) do {
case (_handgunWeapon isKindOf ['rhs_weap_M320', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_ugl");};
case (_handgunWeapon isKindOf ['rhsusf_weap_glock17g4', configFile >> 'CfgWeapons']
|| _handgunWeapon isKindOf ['rhsusf_weap_m1911a1', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_sidearm");};
default {[]};
};

private _launcherWeapon = if (!isNil{_loadout#1#0}) then {_loadout#1#0} else {""};
private _launcherSpecific = switch (true) do {
case (_launcherWeapon isKindOf ['rhs_weap_fgm148', configFile >> 'CfgWeapons']
|| _launcherWeapon isKindof ['rhs_weap_fim92', configFile >> 'CfgWeapons']
|| _launcherWeapon isKindof ['rhs_weap_maaws', configFile >> 'CfgWeapons']
|| _launcherWeapon isKindof ['launch_MRAWS_green_F', configFile >> 'CfgWeapons']
|| _launcherWeapon isKindof ['launch_MRAWS_sand_F', configFile >> 'CfgWeapons']
|| _launcherWeapon isKindof ['launch_MRAWS_olive_F', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_launchers");};
default {[]};
};

private _whitelist = _commonGear + _unitItems + _companyItems + _roleSpecific + _weaponSystemSpecific;
private _whitelist = _commonGear + _unitItems + _companyItems + _roleSpecific + _medicGear + _primarySpecific + _handgunSpecific + _launcherSpecific;

_whitelist

0 comments on commit 937b4a2

Please sign in to comment.