diff --git a/cScripts/functions/init/fn_init_logistics.sqf b/cScripts/functions/init/fn_init_logistics.sqf index e6014167c..79f12e7f6 100644 --- a/cScripts/functions/init/fn_init_logistics.sqf +++ b/cScripts/functions/init/fn_init_logistics.sqf @@ -1342,7 +1342,7 @@ private _dataArray = [ ["ACE_1Rnd_82mm_Mo_HE_LaserGuided", 0], ["ACE_1Rnd_82mm_Mo_Smoke", 0] ]], - + // Roles ["arsenal_role_officer", [ ["ACE_microDAGR", 0], ["ACE_HuntIR_monitor", 0], @@ -1527,7 +1527,216 @@ private _dataArray = [ ["USP_TACTICAL_PACK_MCB_CCT7", 0], ["USP_TACTICAL_PACK_MCB_CCT8", 0], ["UK3CB_US_B_B_RIF_OCP_Radio", 0] + ]], + // Weapons + ["arsenal_weap_underbarrel", [ + "rhs_weap_m4a1_m320", + "rhs_weap_mk18_m320", + "rhs_weap_M320", + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_mstock", + "rhs_weap_m4a1", + "rhs_weap_m4a1_mstock", + "rhs_weap_m4a1_d", + "rhs_weap_m4a1_d_mstock", + "rhs_weap_m4a1_wd", + "rhs_weap_m4a1_wd_mstock", + + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_blockII_KAC_wd", + + "rhs_weap_mk18", + "rhs_weap_mk18_bk", + "rhs_weap_mk18_KAC_bk", + "rhs_weap_mk18_d", + "rhs_weap_mk18_KAC_d", + "rhs_weap_mk18_KAC", + "rhs_weap_mk18_wd", + "rhs_weap_mk18_KAC_wd", + + //Attachments + "rhsusf_acc_sf3p556", + "rhsusf_acc_eotech", + "rhsusf_acc_g33_t1", + "rhsusf_acc_g33_xps3", + "rhsusf_acc_g33_xps3_tan", + "rhsusf_acc_elcan", + "rhsusf_acc_acog", + "rhsusf_acc_acog2", + "rhsusf_acc_acog3", + "rhsusf_acc_eotech_552", + "rhsusf_acc_eotech_552_d", + "rhsusf_acc_eotech_552_wd", + "rhsusf_acc_compm4", + "rhsusf_acc_su230", + "rhsusf_acc_su230_c", + "rhsusf_acc_su230_mrds", + "rhsusf_acc_su230_mrds_c", + "rhsusf_acc_t1_high", + "rhsusf_acc_acog_rmr", + "rhsusf_acc_acog_d", + "rhsusf_acc_acog_wd", + "rhsusf_acc_grip2", + "rhsusf_acc_grip2_tan", + "rhsusf_acc_grip2_wd", + "rhsusf_acc_grip1", + "rhsusf_acc_kac_grip", + "rhsusf_acc_rvg_blk", + "rhsusf_acc_rvg_de", + "rhsusf_acc_tdstubby_blk", + "rhsusf_acc_tdstubby_tan", + "rhsusf_acc_grip3", + "rhsusf_acc_grip3_tan", + "rhsusf_acc_eotech_xps3" + ]], + ["arsenal_weap_m4", [ + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_mstock", + "rhs_weap_m4a1", + "rhs_weap_m4a1_mstock", + "rhs_weap_m4a1_d", + "rhs_weap_m4a1_d_mstock", + "rhs_weap_m4a1_wd", + "rhs_weap_m4a1_wd_mstock", + + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_blockII_KAC_wd", + + "rhs_weap_mk18", + "rhs_weap_mk18_bk", + "rhs_weap_mk18_KAC_bk", + "rhs_weap_mk18_d", + "rhs_weap_mk18_KAC_d", + "rhs_weap_mk18_KAC", + "rhs_weap_mk18_wd", + "rhs_weap_mk18_KAC_wd", + + //Attachments + "rhsusf_acc_sf3p556", + "rhsusf_acc_eotech", + "rhsusf_acc_g33_t1", + "rhsusf_acc_g33_xps3", + "rhsusf_acc_g33_xps3_tan", + "rhsusf_acc_elcan", + "rhsusf_acc_acog", + "rhsusf_acc_acog2", + "rhsusf_acc_acog3", + "rhsusf_acc_eotech_552", + "rhsusf_acc_eotech_552_d", + "rhsusf_acc_eotech_552_wd", + "rhsusf_acc_compm4", + "rhsusf_acc_su230", + "rhsusf_acc_su230_c", + "rhsusf_acc_su230_mrds", + "rhsusf_acc_su230_mrds_c", + "rhsusf_acc_t1_high", + "rhsusf_acc_acog_rmr", + "rhsusf_acc_acog_d", + "rhsusf_acc_acog_wd", + "rhsusf_acc_grip2", + "rhsusf_acc_grip2_tan", + "rhsusf_acc_grip2_wd", + "rhsusf_acc_grip1", + "rhsusf_acc_kac_grip", + "rhsusf_acc_rvg_blk", + "rhsusf_acc_rvg_de", + "rhsusf_acc_tdstubby_blk", + "rhsusf_acc_tdstubby_tan", + "rhsusf_acc_grip3", + "rhsusf_acc_grip3_tan", + "rhsusf_acc_eotech_xps3" + ]], + ["arsenal_weap_sr25", [ + "rhs_weap_sr25_ec", + "rhs_weap_sr25_ec_d", + "rhs_weap_sr25_ec_wd", + + //Magazines + "rhsusf_20Rnd_762x51_SR25_m118_special_Mag", + + //Attachments + "rhsusf_acc_harris_bipod", + "rhsusf_acc_m8541_d", + "rhsusf_acc_m8541_mrds", + "rhsusf_acc_elcan_ard", + "rhsusf_acc_su230a", + "rhsusf_acc_su230a_c", + "rhsusf_acc_su230a_mrds", + "rhsusf_acc_su230a_mrds_c", + "rhsusf_acc_m8541_wd", + "rhsusf_acc_acog_mdo" + ]], + ["arsenal_weap_m240", [ + "rhs_weap_m240B", + "rhs_weap_m240G", + + // Attachments + "rhsusf_acc_eotech", + "rhsusf_acc_g33_t1", + "rhsusf_acc_g33_xps3", + "rhsusf_acc_g33_xps3_tan", + "rhsusf_acc_eotech_552", + "rhsusf_acc_eotech_552_d", + "rhsusf_acc_eotech_552_wd", + "rhsusf_acc_compm4", + "rhsusf_acc_t1_high", + "rhsusf_acc_elcan_ard", + "rhsusf_acc_anpeq16a", + "rhsusf_acc_su230a", + "rhsusf_acc_su230a_c", + "rhsusf_acc_su230a_mrds", + "rhsusf_acc_su230a_mrds_c", + "rhsusf_acc_acog_mdo" + ]], + ["arsenal_weap_m249", [ + "rhs_weap_m249_pip", + "rhs_weap_m249_light_L", + "rhs_weap_m249_pip_L_para", + "rhs_weap_m249_pip_L", + "rhs_weap_m249_pip_ris", + "rhs_weap_m249_light_S", + "rhs_weap_m249_pip_S_para", + "rhs_weap_m249_pip_S", + + // Attachements + "rhsusf_acc_eotech", + "rhsusf_acc_g33_t1", + "rhsusf_acc_g33_xps3", + "rhsusf_acc_g33_xps3_tan", + "rhsusf_acc_elcan", + "rhsusf_acc_acog", + "rhsusf_acc_acog2", + "rhsusf_acc_acog3", + "rhsusf_acc_eotech_552", + "rhsusf_acc_eotech_552_d", + "rhsusf_acc_eotech_552_wd", + "rhsusf_acc_compm4", + "rhsusf_acc_su230", + "rhsusf_acc_su230_c", + "rhsusf_acc_su230_mrds", + "rhsusf_acc_su230_mrds_c", + "rhsusf_acc_t1_high", + "rhsusf_acc_acog_rmr", + "rhsusf_acc_acog_d", + "rhsusf_acc_acog_wd", + "rhsusf_acc_kac_grip_saw_bipod", + "rhsusf_acc_grip4", + "rhsusf_acc_grip4_bipod", + "rhsusf_acc_saw_lw_bipod" ]] + ]; private _return = createHashMapFromArray _dataArray; diff --git a/cScripts/functions/systems/fn_getArsenalWhitelist.sqf b/cScripts/functions/systems/fn_getArsenalWhitelist.sqf index 9b8795fb4..1fee920e4 100644 --- a/cScripts/functions/systems/fn_getArsenalWhitelist.sqf +++ b/cScripts/functions/systems/fn_getArsenalWhitelist.sqf @@ -58,221 +58,18 @@ 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 { case (_primaryWeapon isKindof ['rhs_weap_mk18_m320', configFile >> 'CfgWeapons'] - || _primaryWeapon isKindof ['rhs_weap_m16a4_carryhandle_M203', configFile >> 'CfgWeapons']): {[ - - "rhs_weap_m4a1_m320", - "rhs_weap_mk18_m320", - "rhs_weap_M320", - "rhs_weap_m4a1_carryhandle", - "rhs_weap_m4a1_carryhandle_mstock", - "rhs_weap_m4a1", - "rhs_weap_m4a1_mstock", - "rhs_weap_m4a1_d", - "rhs_weap_m4a1_d_mstock", - "rhs_weap_m4a1_wd", - "rhs_weap_m4a1_wd_mstock", - - "rhs_weap_m4a1_blockII", - "rhs_weap_m4a1_blockII_KAC", - "rhs_weap_m4a1_blockII_bk", - "rhs_weap_m4a1_blockII_KAC_bk", - "rhs_weap_m4a1_blockII_d", - "rhs_weap_m4a1_blockII_KAC_d", - "rhs_weap_m4a1_blockII_wd", - "rhs_weap_m4a1_blockII_KAC_wd", - - "rhs_weap_mk18", - "rhs_weap_mk18_bk", - "rhs_weap_mk18_KAC_bk", - "rhs_weap_mk18_d", - "rhs_weap_mk18_KAC_d", - "rhs_weap_mk18_KAC", - "rhs_weap_mk18_wd", - "rhs_weap_mk18_KAC_wd", - - //Attachments - "rhsusf_acc_sf3p556", - "rhsusf_acc_eotech", - "rhsusf_acc_g33_t1", - "rhsusf_acc_g33_xps3", - "rhsusf_acc_g33_xps3_tan", - "rhsusf_acc_elcan", - "rhsusf_acc_acog", - "rhsusf_acc_acog2", - "rhsusf_acc_acog3", - "rhsusf_acc_eotech_552", - "rhsusf_acc_eotech_552_d", - "rhsusf_acc_eotech_552_wd", - "rhsusf_acc_compm4", - "rhsusf_acc_su230", - "rhsusf_acc_su230_c", - "rhsusf_acc_su230_mrds", - "rhsusf_acc_su230_mrds_c", - "rhsusf_acc_t1_high", - "rhsusf_acc_acog_rmr", - "rhsusf_acc_acog_d", - "rhsusf_acc_acog_wd", - "rhsusf_acc_grip2", - "rhsusf_acc_grip2_tan", - "rhsusf_acc_grip2_wd", - "rhsusf_acc_grip1", - "rhsusf_acc_kac_grip", - "rhsusf_acc_rvg_blk", - "rhsusf_acc_rvg_de", - "rhsusf_acc_tdstubby_blk", - "rhsusf_acc_tdstubby_tan", - "rhsusf_acc_grip3", - "rhsusf_acc_grip3_tan", - "rhsusf_acc_eotech_xps3" - ]}; + || _primaryWeapon isKindof ['rhs_weap_m16a4_carryhandle_M203', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS(arsenal_weap_underbarrel);}; case (_primaryWeapon isKindof ['rhs_weap_m4a1', configFile >> 'CfgWeapons'] - || _primaryWeapon isKindof ['rhs_weap_m16a4', configFile >> 'CfgWeapons']): {[ - "rhs_weap_m4a1_carryhandle", - "rhs_weap_m4a1_carryhandle_mstock", - "rhs_weap_m4a1", - "rhs_weap_m4a1_mstock", - "rhs_weap_m4a1_d", - "rhs_weap_m4a1_d_mstock", - "rhs_weap_m4a1_wd", - "rhs_weap_m4a1_wd_mstock", + || _primaryWeapon isKindof ['rhs_weap_m16a4', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS(arsenal_weap_m4);}; - "rhs_weap_m4a1_blockII", - "rhs_weap_m4a1_blockII_KAC", - "rhs_weap_m4a1_blockII_bk", - "rhs_weap_m4a1_blockII_KAC_bk", - "rhs_weap_m4a1_blockII_d", - "rhs_weap_m4a1_blockII_KAC_d", - "rhs_weap_m4a1_blockII_wd", - "rhs_weap_m4a1_blockII_KAC_wd", - - "rhs_weap_mk18", - "rhs_weap_mk18_bk", - "rhs_weap_mk18_KAC_bk", - "rhs_weap_mk18_d", - "rhs_weap_mk18_KAC_d", - "rhs_weap_mk18_KAC", - "rhs_weap_mk18_wd", - "rhs_weap_mk18_KAC_wd", + case (_primaryWeapon isKindof ['rhs_weap_sr25_ec', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS(arsenal_weap_sr25);}; - //Attachments - "rhsusf_acc_sf3p556", - "rhsusf_acc_eotech", - "rhsusf_acc_g33_t1", - "rhsusf_acc_g33_xps3", - "rhsusf_acc_g33_xps3_tan", - "rhsusf_acc_elcan", - "rhsusf_acc_acog", - "rhsusf_acc_acog2", - "rhsusf_acc_acog3", - "rhsusf_acc_eotech_552", - "rhsusf_acc_eotech_552_d", - "rhsusf_acc_eotech_552_wd", - "rhsusf_acc_compm4", - "rhsusf_acc_su230", - "rhsusf_acc_su230_c", - "rhsusf_acc_su230_mrds", - "rhsusf_acc_su230_mrds_c", - "rhsusf_acc_t1_high", - "rhsusf_acc_acog_rmr", - "rhsusf_acc_acog_d", - "rhsusf_acc_acog_wd", - "rhsusf_acc_grip2", - "rhsusf_acc_grip2_tan", - "rhsusf_acc_grip2_wd", - "rhsusf_acc_grip1", - "rhsusf_acc_kac_grip", - "rhsusf_acc_rvg_blk", - "rhsusf_acc_rvg_de", - "rhsusf_acc_tdstubby_blk", - "rhsusf_acc_tdstubby_tan", - "rhsusf_acc_grip3", - "rhsusf_acc_grip3_tan", - "rhsusf_acc_eotech_xps3" - ]}; - - case (_primaryWeapon isKindof ['rhs_weap_sr25_ec', configFile >> 'CfgWeapons']): {[ - "rhs_weap_sr25_ec", - "rhs_weap_sr25_ec_d", - "rhs_weap_sr25_ec_wd", - - //Magazines - "rhsusf_20Rnd_762x51_SR25_m118_special_Mag", - - //Attachments - "rhsusf_acc_harris_bipod", - "rhsusf_acc_m8541_d", - "rhsusf_acc_m8541_mrds", - "rhsusf_acc_elcan_ard", - "rhsusf_acc_su230a", - "rhsusf_acc_su230a_c", - "rhsusf_acc_su230a_mrds", - "rhsusf_acc_su230a_mrds_c", - "rhsusf_acc_m8541_wd", - "rhsusf_acc_acog_mdo" - ]}; - - case (primaryWeapon player isKindof ['rhs_weap_m240_base', configFile >> 'CfgWeapons']): {[ - "rhs_weap_m240B", - "rhs_weap_m240G", - - // Attachments - "rhsusf_acc_eotech", - "rhsusf_acc_g33_t1", - "rhsusf_acc_g33_xps3", - "rhsusf_acc_g33_xps3_tan", - "rhsusf_acc_eotech_552", - "rhsusf_acc_eotech_552_d", - "rhsusf_acc_eotech_552_wd", - "rhsusf_acc_compm4", - "rhsusf_acc_t1_high", - "rhsusf_acc_elcan_ard", - "rhsusf_acc_anpeq16a", - "rhsusf_acc_su230a", - "rhsusf_acc_su230a_c", - "rhsusf_acc_su230a_mrds", - "rhsusf_acc_su230a_mrds_c", - "rhsusf_acc_acog_mdo" - ]}; + case (primaryWeapon player isKindof ['rhs_weap_m240_base', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS(arsenal_weap_m240);}; case (primaryWeapon player 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']): {[ - "rhs_weap_m249_pip", - "rhs_weap_m249_light_L", - "rhs_weap_m249_pip_L_para", - "rhs_weap_m249_pip_L", - "rhs_weap_m249_pip_ris", - "rhs_weap_m249_light_S", - "rhs_weap_m249_pip_S_para", - "rhs_weap_m249_pip_S", - - // Attachements - "rhsusf_acc_eotech", - "rhsusf_acc_g33_t1", - "rhsusf_acc_g33_xps3", - "rhsusf_acc_g33_xps3_tan", - "rhsusf_acc_elcan", - "rhsusf_acc_acog", - "rhsusf_acc_acog2", - "rhsusf_acc_acog3", - "rhsusf_acc_eotech_552", - "rhsusf_acc_eotech_552_d", - "rhsusf_acc_eotech_552_wd", - "rhsusf_acc_compm4", - "rhsusf_acc_su230", - "rhsusf_acc_su230_c", - "rhsusf_acc_su230_mrds", - "rhsusf_acc_su230_mrds_c", - "rhsusf_acc_t1_high", - "rhsusf_acc_acog_rmr", - "rhsusf_acc_acog_d", - "rhsusf_acc_acog_wd", - "rhsusf_acc_kac_grip_saw_bipod", - "rhsusf_acc_grip4", - "rhsusf_acc_grip4_bipod", - "rhsusf_acc_saw_lw_bipod" - ]}; + || _primaryWeapon isKindof ['rhs_weap_m249_pip_S', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS(arsenal_weap_m249);}; default {[]}; };