Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the weapons specific arsenal to add launcher and handgun slots #1151

Merged
merged 7 commits into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions cScripts/functions/init/fn_init_logistics.sqf
Original file line number Diff line number Diff line change
@@ -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],
@@ -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],
@@ -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],
@@ -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]
]]
];

29 changes: 24 additions & 5 deletions cScripts/functions/systems/fn_getArsenalWhitelist.sqf
Original file line number Diff line number Diff line change
@@ -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