diff --git a/cScripts/CfgEquipmentTags.hpp b/cScripts/CfgEquipmentTags.hpp new file mode 100644 index 000000000..a456bd69e --- /dev/null +++ b/cScripts/CfgEquipmentTags.hpp @@ -0,0 +1,323 @@ +class CfgEquipmentTags { + Common[] = { + "equ_medical_common" + }; + + CommonBlufor[] = { + "equ_faceWear", + "equ_medical_common", + "equ_medical_level_0" + }; + + // Bluefor Company + CommonBluforCompanyAlpha[] = { + "coll_weapons_sidearms" + }; + CommonBluforCompanyBravo[] = { + "ace_banana" + }; + CommonBluforCompanyCharlie[] = { + "coll_weapons_primary_m4" + }; + + // Platoons + CommonBluforCompanyBravo2[] = { + "coll_weapons_primary_m4" + }; + + // + // Weapons + // + coll_weapons_primary_all[] = { + "coll_weapons_primary_m4_rifle", + "weap_hk416d10" + + }; + coll_weapons_primary_m4[] = { + "class_rhs_weap_m4a1", + "class_rhs_weap_m16a4" + }; + class_rhs_weap_m4a1[] = { + "rhs_weap_m4a1_carryhandle", + "rhs_weap_m4a1_carryhandle_mstock", + "rhs_weap_m4a1_blockII", + "rhs_weap_m4a1_blockII_bk", + "rhs_weap_m4a1_blockII_M203_bk", + "rhs_weap_m4a1_blockII_KAC_bk", + "rhs_weap_m4a1_blockII_d", + "rhs_weap_m4a1_blockII_M203_d", + "rhs_weap_m4a1_blockII_KAC_d", + "rhs_weap_m4a1_blockII_KAC", + "rhs_weap_m4a1_blockII_wd", + "rhs_weap_m4a1_blockII_KAC_wd", + "rhs_weap_m4a1", + "rhs_weap_m4a1_d", + "rhs_weap_m4a1_mstock", + "rhs_weap_m4a1_wd", + "rhs_weap_m4a1_wd_mstock", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag", + "class_rhs_weap_m16a4" + }; + class_rhs_weap_m16a4[] = { + "rhs_weap_m16a4", + "rhs_weap_m16a4_carryhandle", + "rhs_weap_m16a4_imod", + + "rhs_weap_m16a4_carryhandle_M203", + "rhs_weap_m16a4_imod_M203", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag", + "class_rhs_weap_m4a1" + }; + + // HK416 + weap_hk416d10[] = { + "rhs_weap_hk416d10", + "rhs_weap_hk416d10_LMT", + "rhs_weap_hk416d10_LMT_d", + "rhs_weap_hk416d10_LMT_wd", + "rhs_weap_hk416d145", + "rhs_weap_hk416d145_d", + "rhs_weap_hk416d145_d_2", + "rhs_weap_hk416d145_wd", + "rhs_weap_hk416d145_wd_2", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag" + }; + weap_hk416d10_m320[] = { + "rhs_weap_hk416d10_m320", + "rhs_weap_hk416d145_m320", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag" + }; + + coll_weapons_primary_m4_m203[] = { + "class_rhs_weap_m4a1_m203", + "class_rhs_weap_m16a4_carryhandle_M203" + }; + class_rhs_weap_m4a1_m203[] = { + "rhs_weap_m4a1_carryhandle_m203", + "rhs_weap_m4a1_carryhandle_m203S", + "rhs_weap_m4a1_blockII_M203", + "rhs_weap_m4a1_blockII_M203_wd", + "rhs_weap_m4a1_m203s_d", + "rhs_weap_m4a1_d_mstock", + "rhs_weap_m4a1_m203", + "rhs_weap_m4a1_m203s", + "rhs_weap_m4a1_m320", + "rhs_weap_m4a1_m203s_wd", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag" + }; + class_rhs_weap_m16a4_carryhandle_M203[] = { + "rhs_weap_m16a4_carryhandle_M203", + "rhs_weap_m16a4_imod_M203", + + "equ_magazines_basic_stanag", + "equ_magazines_basic_pmag" + }; + + class_rhs_weap_m249[] = { + "rhs_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", + + "equ_magazines_basic_box" + }; + class_rhs_weap_m249_pip[] = {"class_rhs_weap_m249"}; + class_rhs_weap_m249_pip_L[] = {"class_rhs_weap_m249"}; + class_rhs_weap_m249_pip_S[] = {"class_rhs_weap_m249"}; + + coll_weapons_sidearms[] = {"class_UK3CB_P320_BLK"}; + class_UK3CB_P320_BLK[] = { + "UK3CB_P320_BLK", + "acc_flashlight_pistol", + "UK3CB_P320_9x19_17Rnd" + }; + + // + // Launchers + // + class_rhs_weap_M136[] = { + "rhs_weap_M136", + "rhs_weap_M136_hedp", + "rhs_weap_M136_hp" + }; + class_launch_MRAWS_base_F[] = { + "launch_MRAWS_green_rail_F", + "launch_MRAWS_olive_rail_F", + "launch_MRAWS_sand_rail_F", + "launch_MRAWS_green_F", + "launch_MRAWS_olive_F", + "launch_MRAWS_sand_F", + + "MRAWS_HE_F", + "MRAWS_HEAT55_F", + "MRAWS_HEAT_F" + }; + + + // + // Magazines + // + equ_magazines_basic_box[] = { + "rhsusf_200Rnd_556x45_mixed_soft_pouch", + "rhsusf_200Rnd_556x45_mixed_soft_pouch_coyote", + "rhsusf_200Rnd_556x45_mixed_soft_pouch_ucp", + "rhsusf_200Rnd_556x45_soft_pouch", + "rhsusf_200Rnd_556x45_soft_pouch_coyote", + "rhsusf_200Rnd_556x45_soft_pouch_ucp", + "rhsusf_100Rnd_556x45_soft_pouch", + "rhsusf_100Rnd_556x45_soft_pouch_coyote", + "rhsusf_100Rnd_556x45_soft_pouch_ucp", + "rhsusf_100Rnd_556x45_mixed_soft_pouch", + "rhsusf_100Rnd_556x45_mixed_soft_pouch_coyote", + "rhsusf_100Rnd_556x45_mixed_soft_pouch_ucp" + }; + equ_magazines_basic_stanag[] = { + "rhs_mag_30Rnd_556x45_M855A1_Stanag", + "rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red", + "rhs_mag_30Rnd_556x45_M855A1_Stanag_Ranger", + "rhs_mag_30Rnd_556x45_M855A1_Stanag_Ranger_Tracer_Red", + "rhs_mag_30Rnd_556x45_M855A1_Stanag_Pull", + "rhs_mag_30Rnd_556x45_M855A1_Stanag_Pull_Tracer_Red", + + "rhs_mag_30Rnd_556x45_M855A1_EPM_Pull", + "rhs_mag_30Rnd_556x45_M855A1_EPM_Pull_Tracer_Red", + "rhs_mag_30Rnd_556x45_M855A1_EPM_Ranger", + "rhs_mag_30Rnd_556x45_M855A1_EPM_Ranger_Tracer_Red", + "rhs_mag_30Rnd_556x45_M855A1_EPM", + "rhs_mag_30Rnd_556x45_M855A1_EPM_Tracer_Red" + }; + equ_magazines_basic_pmag[] = { + "rhs_mag_30Rnd_556x45_M855A1_PMAG", + "rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red", + + "rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan", + "rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red" + }; + + equ_scopes_basic[] = {}; + + + // + // Grenades + // + coll_throwable[] = { + "equ_grenades", + "equ_smokes", + "equ_chemlights" + }; + equ_grenades[] = { + "HandGrenade", + "rhs_mag_m67", + + // IR + "B_IR_Grenade", + + // Stun + "rhs_mag_mk84", + "ACE_M84", + }; + equ_smokes[] = { + // RHS variants + "rhs_mag_m18_green", + "rhs_mag_m18_purple", + "rhs_mag_m18_red", + "rhs_mag_m18_yellow", + // Vanilla variants + "SmokeShell", + "SmokeShellRed", + "SmokeShellBlue", + "SmokeShellGreen", + "SmokeShellOrange", + "SmokeShellYellow", + "SmokeShellPurple", + }; + equ_chemlights[] = { + "ACE_Chemlight_HiWhite", + "ACE_Chemlight_HiBlue", + "ACE_Chemlight_HiGreen", + "ACE_Chemlight_HiYellow", + "ACE_Chemlight_HiRed", + "ACE_Chemlight_IR", + }; + + + // + // Communication + // + equ_radio_basic[] = {}; + equ_radio_advanced[] = {}; + + + // + // Medical + // + equ_medical_common[] = {"ACE_fieldDressing","ACE_elasticBandage","ACE_packingBandage","ACE_quikclot"}; + equ_medical_level_0[] = {"equ_medical_common"}; + equ_medical_level_1[] = {}; + equ_medical_level_2[] = {}; + equ_medical_level_3[] = {}; + + equ_faceWear[] = { + "G_AirPurifyingRespirator_01_F", + "G_Aviator", + "G_Balaclava_blk", + "G_Blindfold_01_black_F", + "G_Blindfold_01_white_F", + "G_Lowprofile", + "G_Shades_Black", + "G_Shades_Blue", + "G_Shades_Green", + "G_Shades_Red", + "G_Spectacles", + "G_Spectacles_Tinted", + "G_Sport_Blackred", + "G_Sport_BlackWhite", + "G_Sport_Blackyellow", + "G_Sport_Checkered", + "G_Sport_Greenblack", + "G_Sport_Red", + "G_Squares", + "G_Squares_Tinted", + "kat_mask_M04", + "kat_mask_M50", + "rhs_ess_black", + "rhs_googles_black", + "rhs_googles_clear", + "rhs_googles_orange", + "rhs_googles_yellow", + "rhsusf_oakley_goggles_blk", + "rhsusf_oakley_goggles_clr", + "rhsusf_oakley_goggles_ylw", + "rhsusf_shemagh_gogg_grn", + "rhsusf_shemagh_gogg_od", + "rhsusf_shemagh_gogg_tan", + "rhsusf_shemagh_gogg_white", + "rhsusf_shemagh_grn", + "rhsusf_shemagh_od", + "rhsusf_shemagh_tan", + "rhsusf_shemagh_white", + "rhsusf_shemagh2_gogg_grn", + "rhsusf_shemagh2_gogg_od", + "rhsusf_shemagh2_gogg_tan", + "rhsusf_shemagh2_gogg_white", + "rhsusf_shemagh2_grn", + "rhsusf_shemagh2_od", + "rhsusf_shemagh2_tan", + "rhsusf_shemagh2_white" + }; +}; diff --git a/cScripts/CfgFunctions.hpp b/cScripts/CfgFunctions.hpp index 601233a2b..ac78eb89c 100644 --- a/cScripts/CfgFunctions.hpp +++ b/cScripts/CfgFunctions.hpp @@ -43,6 +43,7 @@ class cScripts { class setCargo {}; class setCargoAttributes {}; class checkItemValidity {}; + class getFilteredItem {}; class createCargoCrate {}; class doStarterCrateSupplies {}; @@ -82,8 +83,6 @@ class cScripts { class setActiveRadio {}; class player_getOrganization {}; - class player_getCompany {}; - class player_getPlatoon {}; class player_setOrganization {}; // Other Functions @@ -94,6 +93,7 @@ class cScripts { class gate {}; class teleport {}; class addLoadoutAction {}; + class addArsenal {}; class addGetOutHelo {}; class addEscapeWreck {}; @@ -120,12 +120,6 @@ class cScripts { class setupLoadoutCategories {}; class addLoadoutSelection {}; - // Arsenal releated - class getArsenalWhitelist {}; - class addDefaultArsenalLoadout {}; - class addDefaultArsenalLoadouts {}; - class clearDefaultArsenalLoadouts {}; - class checkStagingZone {}; class deleteDroppedObjects {}; @@ -143,7 +137,6 @@ class cScripts { // Buttons and options class addReGear {}; class addHeal {}; - class addArsenal {}; class createActionCategory {}; @@ -233,7 +226,7 @@ class cScripts { class gear_applyFunctions {}; class gear_selectLoadout {}; class gear_getSideConfig {}; - + class gear_setupRadios {}; // Save and Load @@ -242,10 +235,23 @@ class cScripts { class gear_removeLoadout {}; class gear_hasSavedLoadout {}; + // equipmentTags + class gear_getTagItems {}; + class gear_getTags {}; + class gear_isTag {}; + // other - class gear_getLoadoutRole {}; + class gear_getLoadoutTags {}; class gear_getLoadoutName {}; }; + class arsenal { + file = "cScripts\functions\arsenal"; + class arsenal_createAction {}; + class arsenal_getWhitelist {}; + class arsenal_addDefaultLoadout {}; + class arsenal_addDefaultLoadouts {}; + class arsenal_clearDefaultLoadouts {}; + }; class diag { file = "cScripts\functions\diag"; class error {}; diff --git a/cScripts/Loadouts/CfgLoadouts_Alpha.hpp b/cScripts/Loadouts/CfgLoadouts_Alpha.hpp index 32c5bf626..90caa512a 100644 --- a/cScripts/Loadouts/CfgLoadouts_Alpha.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Alpha.hpp @@ -3,7 +3,7 @@ class Cav_B_A_Officer_F: Cav_B_Alpha_base_F { category[] += {"cScripts_Loadout_Cat_Alpha_Leadership"}; scope = 2; loadout = [["rhs_weap_m4a1_blockII_grip2_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR_3d",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",30],[],"rhsusf_acc_grip2"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_KP_OR_MC",[["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",14],["kat_chestSeal",2],["kat_guedel",1],["ACE_EarPlugs",1],["kat_Painkiller",2,10],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",1,30]]],["USP_CRYE_JPC_ASLTB",[["UK3CB_P320_9x19_17Rnd",2,17],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",8,30],["SmokeShell",4,1],["SmokeShellBlue",2,1],["HandGrenade",2,1]]],["USP_TACTICAL_PACK",[["USP_PVS15",1],["ACE_splint",2],["ACE_SpraypaintRed",1],["ACE_EntrenchingTool",1],["ACE_CableTie",2],["SmokeShellPurple",1,1],["SmokeShellRed",2,1],["SmokeShellBlue",2,1]]],"USP_OPSCORE_FASTMTC_CGTW","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "officer"; + equipmentTags[] = {"role_officer"}; }; class Cav_B_A_PltSgt_Local: Cav_B_Alpha_base_F { @@ -11,7 +11,7 @@ class Cav_B_A_PltSgt_Local: Cav_B_Alpha_base_F { category[] += {"cScripts_Loadout_Cat_Alpha_Leadership"}; scope = 2; loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR_3d",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",30],[],"rhsusf_acc_grip2"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_KP_OR_MC",[["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",14],["kat_chestSeal",2],["kat_guedel",1],["ACE_EarPlugs",1],["kat_Painkiller",2,10]]],["USP_CRYE_JPC_ASLTB",[["UK3CB_P320_9x19_17Rnd",2,17],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",9,30],["SmokeShell",4,1],["SmokeShellBlue",2,1],["HandGrenade",2,1]]],["USP_TACTICAL_PACK",[["USP_PVS15",1],["ACE_splint",2],["ACE_SpraypaintRed",1],["ACE_EntrenchingTool",1],["ACE_CableTie",2],["SmokeShellPurple",1,1],["SmokeShellRed",2,1],["SmokeShellBlue",2,1]]],"USP_OPSCORE_FASTMTC_CGTW","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "officer"; + equipmentTags[] = {"role_officer"}; }; class Cav_B_A_AirController_F: Cav_B_Alpha_base_F { @@ -19,7 +19,7 @@ class Cav_B_A_AirController_F: Cav_B_Alpha_base_F { category[] += {"cScripts_Loadout_Cat_Alpha_TACP"}; scope = 2; loadout = [["rhs_weap_m4a1_blockII_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["rhs_weap_M320","","","",["ACE_HuntIR_M203",1],[],""],["USP_G3C_RS2_MC",[["ACE_tourniquet",4],["ItemcTabHCam",1],["ACE_MapTools",1],["ACE_IR_Strobe_Item",2],["ACE_microDAGR",1],["ACE_splint",4],["ACE_Flashlight_XL50",1],["kat_Painkiller",2,10],["SmokeShellPurple",2,1],["Laserbatteries",1,1]]],["rhsusf_plateframe_grenadier",[["ACE_packingBandage",20],["ACE_IR_Strobe_Item",2],["ItemAndroid",1],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["rhs_mag_M664_red_cluster",2,1],["1Rnd_SmokeRed_Grenade_shell",2,1],["1Rnd_SmokeBlue_Grenade_shell",2,1],["ACE_HuntIR_M203",2,1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],["SmokeShellRed",2,1]]],["USP_TACTICAL_PACK",[["Rev_darter_item",1],["ACE_HuntIR_monitor",1],["ACE_EntrenchingTool",1],["ACE_UAVBattery",1],[["ACE_Vector","","","",[],[],""],1]]],"rhsusf_opscore_mc_cover_pelt_cam","rhsusf_oakley_goggles_clr",["Laserdesignator","","","",["Laserbatteries",1],[],""],["ItemMap","B_UavTerminal","","ItemCompass","ItemWatch","USP_PVS15"]]; - role = "officer"; + equipmentTags[] = {"role_officer"}; }; class Cav_B_A_DroneOperator_F: Cav_B_Alpha_base_F { @@ -28,14 +28,14 @@ class Cav_B_A_DroneOperator_F: Cav_B_Alpha_base_F { scope = 2; abilityEngineer = 1; loadout = [["rhs_weap_m4a1_blockII_grip_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_MC",[["ACE_tourniquet",4],["ACE_MapTools",1],["ACE_IR_Strobe_Item",2],["ACE_microDAGR",1],["ACE_splint",4],["ACE_Flashlight_XL50",1],["ACE_Banana",1],["ACE_EarPlugs",1],["kat_Painkiller",2,10],["SmokeShellPurple",2,1],["Laserbatteries",1,1]]],["rhsusf_plateframe_teamleader",[["ACE_packingBandage",20],["ACE_IR_Strobe_Item",2],["ItemAndroid",1],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",8,30],["ACE_HandFlare_Green",2,1],["SmokeShell",4,1],["UK3CB_P320_9x19_17Rnd",1,17],[["hgun_Pistol_Signal_F","","","",[],[],""],1]]],["USP_TACTICAL_PACK",[["H_Cap_tan",1],["ACE_CableTie",2],["ACE_EntrenchingTool",1],["ToolKit",1]]],"rhsusf_opscore_mc_cover_pelt_cam","rhsusf_oakley_goggles_clr",["ACE_Vector","","","",[],[],""],["ItemMap","B_UavTerminal","","ItemCompass","ItemWatch","NVGogglesB_blk_F"]]; - role = "officer"; + equipmentTags[] = {"role_officer"}; }; // class Cav_B_A_JFO_F: Cav_B_Alpha_base_F { // displayName = "Forward Air Controller"; // category[] += {"cScripts_Loadout_Cat_Alpha_Leadership"}; // scope = 2; -// loadout = [["rhs_weap_m4a1_blockII_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["rhs_weap_M320","","","",["ACE_HuntIR_M203",1],[],""],["USP_G3C_RS2_MC",[["ACE_tourniquet",4],["ItemcTabHCam",1],["ACE_MapTools",1],["ACE_IR_Strobe_Item",2],["ACE_microDAGR",1],["ACE_splint",4],["ACE_Flashlight_XL50",1],["kat_Painkiller",2,10],["SmokeShellPurple",2,1],["Laserbatteries",1,1]]],["rhsusf_plateframe_grenadier",[["ACE_packingBandage",20],["ACE_IR_Strobe_Item",2],["rhs_mag_M664_red_cluster",2,1],["1Rnd_SmokeRed_Grenade_shell",2,1],["1Rnd_SmokeBlue_Grenade_shell"],2,1],["ACE_HuntIR_M203",2,1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],["SmokeShellRed",2,1]]],["USP_TACTICAL_PACK"],[["Rev_darter_item",1],["ACE_HuntIR_monitor",1],["ACE_EntrenchingTool",1],["ACE_UAVBattery",1],["Laserbatteries",1,1],[["ACE_Vector","","","",[],[],""],1]]],"rhsusf_opscore_mc_cover_pelt_cam","rhsusf_shemagh2_gogg_grn",["Laserdesignator","","","",["Laserbatteries",1],[],""],["ItemMap","ItemcTab","","ItemCompass","ItemWatch","USP_PVS15"]]; -// role = "officer"; +// loadout = [["rhs_weap_m4a1_blockII_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["rhs_weap_M320","","","",["ACE_HuntIR_M203",1],[],""],["USP_G3C_RS2_MC",[["ACE_tourniquet",4],["ItemcTabHCam",1],["ACE_MapTools",1],["ACE_IR_Strobe_Item",2],["ACE_microDAGR",1],["ACE_splint",4],["ACE_Flashlight_XL50",1],["kat_Painkiller",2,10],["SmokeShellPurple",2,1],["Laserbatteries",1,1]]],["rhsusf_plateframe_grenadier",[["ACE_packingBandage",20],["ACE_IR_Strobe_Item",2],["rhs_mag_M664_red_cluster",2,1],["1Rnd_SmokeRed_Grenade_shell",2,1],["1Rnd_SmokeBlue_Grenade_shell"],2,1],["ACE_HuntIR_M203",2,1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],["SmokeShellRed",2,1]]],["USP_TACTICAL_PACK_CCT7"],[["Rev_darter_item",1],["ACE_HuntIR_monitor",1],["ACE_EntrenchingTool",1],["ACE_UAVBattery",1],["Laserbatteries",1,1],[["ACE_Vector","","","",[],[],""],1]]],"rhsusf_opscore_mc_cover_pelt_cam","rhsusf_shemagh2_gogg_grn",["Laserdesignator","","","",["Laserbatteries",1],[],""],["ItemMap","ItemcTab","","ItemCompass","ItemWatch","USP_PVS15"]]; +// equipmentTags[] = {"role_officer"}; // }; // Named diff --git a/cScripts/Loadouts/CfgLoadouts_Alpha_FixedWing.hpp b/cScripts/Loadouts/CfgLoadouts_Alpha_FixedWing.hpp index fdd2ec045..9a48dff97 100644 --- a/cScripts/Loadouts/CfgLoadouts_Alpha_FixedWing.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Alpha_FixedWing.hpp @@ -5,7 +5,7 @@ class Cav_B_A_Plane_Fighter_Pilot_F: Cav_B_Alpha_base_F { scope = 2; abilityEngineer = 1; loadout = [["rhs_weap_m4a1_blockII_grip_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["U_B_PilotCoveralls",[["ACE_microDAGR",1],["ACE_MapTools",1],["ACE_tourniquet",4],["ACE_splint",4],["ACE_packingBandage",20],["ACE_EarPlugs",2],["ACE_Banana",1],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["kat_Painkiller",2,10],["acex_intelitems_notepad",1,1]]],["UK3CB_V_Pilot_Vest_Black",[["ACE_CableTie",2],["ACE_IR_Strobe_Item",2],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["HandGrenade",1,1],["SmokeShell",4,1],["UK3CB_P320_9x19_17Rnd",2,17],["SmokeShellBlue",2,1],["SmokeShellRed",2,1],["ACE_HandFlare_Green",2,1],["SmokeShellPurple",2,1],["ACE_Chemlight_UltraHiOrange",1,1],[["hgun_Pistol_Signal_F","","","",["6Rnd_GreenSignal_F",6],[],""],1]]],["USP_TACTICAL_PACK_MCB",[["ToolKit",1],["USP_BASEBALL_CAP_ABU_BS",1],["NVGogglesB_blk_F",1],["ACE_EntrenchingTool",1]]],"H_PilotHelmetFighter_B","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "pilotfighter"; + equipmentTags[] = {"role_pilotfighter"}; }; class Cav_B_A_Plane_Transport_Pilot_F: Cav_B_Alpha_base_F { displayName = "$STR_Cav_Alpha_Characters_A_Plane_Transport_Pilot"; @@ -13,7 +13,7 @@ class Cav_B_A_Plane_Transport_Pilot_F: Cav_B_Alpha_base_F { scope = 2; abilityEngineer = 1; loadout = [["rhs_weap_m4a1_blockII_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["B_CWU_coverall_od_usaf",[["ACE_packingBandage",20],["ACE_EarPlugs",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_splint",4],["ACE_tourniquet",4],["ACE_Banana",1],["ACE_Chemlight_UltraHiOrange",1,1],["acex_intelitems_notepad",1,1]]],["UK3CB_V_Pilot_Vest_Black",[["ACE_CableTie",2],["ACE_IR_Strobe_Item",2],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["SmokeShell",4,1],["UK3CB_P320_9x19_17Rnd",2,17],["ACE_HandFlare_Green",2,1],["kat_Painkiller",2,10],["SmokeShellPurple",2,1],["SmokeShellBlue",2,1],["SmokeShellRed",2,1],["HandGrenade",1,1],[["hgun_Pistol_Signal_F","","","",["6Rnd_GreenSignal_F",6],[],""],1]]],["USP_TACTICAL_PACK_MCT",[["ToolKit",1],["NVGogglesB_blk_F",1],["ACE_EntrenchingTool",1],["rhsusf_m112_mag",1,1]]],"USP_BASEBALL_CAP_CT3_OD","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "pilottransport"; + equipmentTags[] = {"role_pilottransport"}; }; class Cav_B_A_Plane_Transport_coPilot_F: Cav_B_A_Plane_Transport_Pilot_F { displayName = "$STR_Cav_Alpha_Characters_A_Plane_Transport_coPilot"; diff --git a/cScripts/Loadouts/CfgLoadouts_Alpha_Rotary.hpp b/cScripts/Loadouts/CfgLoadouts_Alpha_Rotary.hpp index c656c6d48..605153e59 100644 --- a/cScripts/Loadouts/CfgLoadouts_Alpha_Rotary.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Alpha_Rotary.hpp @@ -7,7 +7,7 @@ class Cav_B_A_Helicopter_Tra_Pilot_F: Cav_B_A_PilotBase_F { category[] += {"cScripts_Loadout_Cat_Alpha_Rotary"}; scope = 2; loadout = [["rhs_weap_m4a1_blockII_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_MC",[["ACE_EarPlugs",1],["ACE_microDAGR",1],["ACE_MapTools",1],["ACE_splint",4],["ACE_tourniquet",4],["ACE_packingBandage",20],["ACE_Banana",1],["kat_Painkiller",2,10]]],["UK3CB_V_Pilot_Vest",[["ACE_IR_Strobe_Item",2],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["SmokeShellRed",2,1],["SmokeShell",4,1],["SmokeShellPurple",2,1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["UK3CB_P320_9x19_17Rnd",1,17],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],[["hgun_Pistol_Signal_F","","","",["6Rnd_GreenSignal_F",6],[],""],1]]],["USP_TACTICAL_PACK",[["ACE_EntrenchingTool",1],["H_Cap_tan",1],["ToolKit",1],["rhsusf_ihadss",1],["rhsusf_m112_mag",1,1]]],"rhsusf_hgu56p_visor","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter","NVGogglesB_blk_F"]]; - role = "rotarypilot"; + equipmentTags[] = {"role_rotarypilot"}; }; class Cav_B_A_Helicopter_Tra_coPilot_F: Cav_B_A_Helicopter_Tra_Pilot_F { displayName = "$STR_Cav_Alpha_Characters_A_Helicopter_Tra_coPilot"; @@ -19,15 +19,15 @@ class Cav_B_A_Helicopter_Tra_CrewChief_F: Cav_B_A_PilotBase_F { category[] += {"cScripts_Loadout_Cat_Alpha_Rotary"}; scope = 2; loadout = [["rhs_weap_m249_pip_L_para_vfg2","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ELCAN_ard",["rhsusf_200Rnd_556x45_box",200],[],"rhsusf_acc_grip4_bipod"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_MC",[["ACE_Banana",1],["ACE_EarPlugs",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_tourniquet",4],["ACE_splint",4],["ACE_packingBandage",20],["kat_Painkiller",2,10]]],["UK3CB_V_Pilot_Vest",[["ACE_IR_Strobe_Item",2],["SmokeShellRed",2,1],["SmokeShell",4,1],["UK3CB_P320_9x19_17Rnd",1,17],["SmokeShellPurple",2,1],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],["rhsusf_200Rnd_556x45_box",2,200],[["hgun_Pistol_Signal_F","","","",[],[],""],1]]],["USP_TACTICAL_PACK",[["H_Cap_tan",1],["ACE_CableTie",2],["ACE_EntrenchingTool",1],["ToolKit",1],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1]]],"rhsusf_hgu56p_visor_mask","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemcTab","","ItemCompass","ACE_Altimeter","NVGogglesB_blk_F"]]; - role = "rotarycrew"; + equipmentTags[] = {"role_rotarycrew"}; }; class Cav_B_A_Helicopter_Tra_DoorGunner_F: Cav_B_A_Helicopter_Tra_CrewChief_F { displayName = "$STR_Cav_Alpha_Characters_A_Helicopter_Tra_DoorGunner"; scope = 2; abilityMedic = 1; - role = "rotarycls"; loadout = [["rhs_weap_m4a1_blockII_grip_bk","ACE_muzzle_mzls_L","acc_pointer_IR","rhsusf_acc_ACOG_RMR",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],["UK3CB_P320_BLK","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS2_MC",[["ACE_Banana",1],["ACE_EarPlugs",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_tourniquet",4],["ACE_splint",4],["ACE_packingBandage",20],["kat_Painkiller",2,10]]],["UK3CB_V_Pilot_Vest",[["ACE_IR_Strobe_Item",2],["kat_chestSeal",2],["kat_guedel",1],["kat_ncdKit",1],["kat_Pulseoximeter",1],["ACE_elasticBandage",20],["ACE_quikclot",20],["ACE_splint",2],["ACE_tourniquet",2],["SmokeShellRed",2,1],["SmokeShell",4,1],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["UK3CB_P320_9x19_17Rnd",1,17],["SmokeShellPurple",2,1],["ACE_HandFlare_Green",2,1],["SmokeShellBlue",2,1],[["hgun_Pistol_Signal_F","","","",[],[],""],1]]],["USP_TACTICAL_PACK",[["H_Cap_tan",1],["ACE_CableTie",2],["ACE_EntrenchingTool",1],["ToolKit",1],["rhsusf_m112_mag",1,1]]],"rhsusf_hgu56p_visor_mask","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemcTab","","ItemCompass","ACE_Altimeter","NVGogglesB_blk_F"]]; + equipmentTags[] = {"role_rotarycls"}; }; class Cav_B_A_Helicopter_Att_Pilot_F: Cav_B_A_Helicopter_Tra_Pilot_F { diff --git a/cScripts/Loadouts/CfgLoadouts_Bravo_Atlas.hpp b/cScripts/Loadouts/CfgLoadouts_Bravo_Atlas.hpp index 53e692b0d..0dcbf35e6 100644 --- a/cScripts/Loadouts/CfgLoadouts_Bravo_Atlas.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Bravo_Atlas.hpp @@ -5,7 +5,8 @@ class Cav_B_Bravo_Atlas_base_F: Cav_B_Bravo_base_F { insignia = "cav_insignia_Specialized_Medic0"; abilityMedic = 2; - role = "doctor"; + equipmentTags[] = {"tag_doctor"}; + icon = "iconManMedic"; }; diff --git a/cScripts/Loadouts/CfgLoadouts_Bravo_Crew.hpp b/cScripts/Loadouts/CfgLoadouts_Bravo_Crew.hpp index 9a339e4f9..0957b8fc0 100644 --- a/cScripts/Loadouts/CfgLoadouts_Bravo_Crew.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Bravo_Crew.hpp @@ -1,6 +1,6 @@ class Cav_B_Bravo_TankCrew_Base_F: Cav_B_Bravo_base_F { scope = 0; - role = "crew"; + equipmentTags[] = {"role_crew"}; }; class Cav_B_B_Tank_Commander_F: Cav_B_Bravo_TankCrew_Base_F { displayName = "$STR_cav_Bravo_Characters_B_Tank_Commander"; diff --git a/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp b/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp index 72a88dee0..998306587 100644 --- a/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp @@ -1,7 +1,7 @@ class Cav_B_B_Scout_Base_F: Cav_B_Bravo_base_F { platoon = 2; scope = 0; - role = "weapons"; + equipmentTags[] = {"role_weapons"}; }; class Cav_B_B_Scout_Officer_F: Cav_B_B_Scout_Base_F { @@ -10,7 +10,7 @@ class Cav_B_B_Scout_Officer_F: Cav_B_B_Scout_Base_F { category[] += {"cScripts_Loadout_Cat_Bravo_Viking_Leadership"}; loadout = [["rhs_weap_mk18_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red",30],[],"rhsusf_acc_grip2"],[],["UK3CB_P320_DES","","acc_flashlight_pistol","",["UK3CB_P320_9x19_17Rnd",17],[],""],["USP_G3C_RS_KP_OR_MC",[["ACE_packingBandage",10],["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_microDAGR",1],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["kat_chestSeal",2],["kat_guedel",1],["ACE_splint",1]]],["USP_CRYE_CPC_LEAD_BELT_MC",[["ItemcTabHCam",1],["ACE_EarPlugs",1],["HandGrenade",2,1],["SmokeShell",4,1],["ACE_IR_Strobe_Item",4],["SmokeShellBlue",2,1],["UK3CB_P320_9x19_17Rnd",2,17],["ACE_HandFlare_Yellow",2,1],["rhs_mag_mk3a2",2,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red",3,30],["30Rnd_556x45_Stanag_red",4,30],["SmokeShellPurple",1,1],["SmokeShellYellow",2,1]]],["USP_TACTICAL_PACK",[["ACE_HuntIR_monitor",1],["ACE_splint",8],["ACE_tourniquet",8],["ACE_SpraypaintGreen",1],["ACE_artilleryTable",1],["ACE_CableTie",5],["ACE_EarPlugs",2],["kat_Painkiller",2,10],["B_IR_Grenade",2,1],["SmokeShellGreen",2,1],["SmokeShellYellow",2,1],["ACE_Chemlight_IR",2,1]]],"USP_OPS_FASTXP_TAN_MC_03","USP_DETCORD_SMG1_BLK2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemcTab","","ItemCompass","ItemWatch","USP_PVS31_LOW"]]; icon = "iconManOfficer"; - role = "officer"; + equipmentTags[] = {"role_officer"}; }; class Cav_B_B_Scout_PlatoonLeader_F: Cav_B_B_Scout_Officer_F { @@ -31,7 +31,7 @@ class Cav_B_B_Scout_PlatoonMedic_F: Cav_B_B_Scout_Officer_F { loadout = [["rhs_weap_m4a1_blockII","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG",30],[],""],[],[],["USP_G3C_RS_KP_OR_MC",[["ACE_tourniquet",10],["ACE_EarPlugs",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_Flashlight_XL50",1],["ACE_IR_Strobe_Item",2],["ACE_CableTie",2],["ACE_epinephrine",6],["kat_Painkiller",2,10],["kat_Carbonate",2,10],["ACE_Chemlight_IR",2,1],["kat_Penthrox",4,10]]],["USP_CRYE_CPC_MEDIC_BELT_MC",[["ACE_surgicalKit",1],["kat_IV_16",15],["kat_amiodarone",5],["kat_atropine",5],["ACE_adenosine",3],["kat_chestSeal",10],["kat_EACA",10],["kat_fentanyl",5],["kat_ketamine",5],["kat_larynx",10],["kat_lidocaine",10],["kat_nalbuphine",10],["kat_naloxone",5],["kat_nitroglycerin",10],["kat_norepinephrine",10],["kat_phenylephrine",10],["kat_stethoscope",1],["kat_Pulseoximeter",5],["kat_IO_FAST",5],["kat_aatKit",5],["ACE_splint",2],["kat_accuvac",1],["SmokeShell",4,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG",6,30],["SmokeShellBlue",2,1],["SmokeShellPurple",1,1],["kat_Penthrox",5,10]]],["USP_TACTICAL_PACK",[["ACE_plasmaIV",5],["ACE_plasmaIV_500",4],["ACE_salineIV",1],["ACE_elasticBandage",30],["ACE_packingBandage",10],["ACE_quikclot",30],["ACE_salineIV_250",2],["USP_PVS31",1],["ACE_splint",4]]],"USP_OPS_FASTXP_TAN_MC_03","USP_MFRAME_BLK2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; insignia = "cav_insignia_specialized_cls"; abilityMedic = 2; - role = "medic"; + equipmentTags[] = {"tag_medic"}; icon = "iconManMedic"; }; @@ -53,7 +53,7 @@ class Cav_B_B_Scout_SquadLeader_F: Cav_B_B_Scout_Base_F { scope = 2; category[] += {"cScripts_Loadout_Cat_Bravo_Viking_Leadership"}; loadout = [["rhs_weap_mk18_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_g33_xps3",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red",30],[],"rhsusf_acc_grip2"],[],[],["USP_G3C_RS_KP_OR_MC",[["ACE_packingBandage",10],["ACE_quikclot",10],["ACE_tourniquet",4],["kat_chestSeal",2],["kat_guedel",1],["ACE_microDAGR",1],["ACE_MapTools",1],["ACE_Chemlight_Shield",1],["ACE_Chemlight_White",1,1]]],["USP_CRYE_CPC_COMMS_BELT_MC",[["ACE_EarPlugs",1],["HandGrenade",2,1],["SmokeShell",4,1],["SmokeShellBlue",2,1],["SmokeShellYellow",2,1],["rhs_mag_mk3a2",2,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red",3,30],["30Rnd_556x45_Stanag_red",4,30],["SmokeShellPurple",1,1]]],["USP_TACTICAL_PACK",[["ACE_HuntIR_monitor",1],["ACE_splint",8],["ACE_tourniquet",8],["ACE_SpraypaintGreen",1],["ACE_artilleryTable",1],["ACE_CableTie",5],["ACE_EarPlugs",2],["kat_Painkiller",2,10],["B_IR_Grenade",2,1],["ACE_Chemlight_IR",2,1]]],"USP_OPS_FASTXP_TAN_MC_06","UK3CB_G_Ballistic_Black",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ItemWatch","USP_PVS31_HIGH"]]; - role = "squadleader"; + equipmentTags[] = {"role_squadleader"}; icon = "iconManLeader"; }; class Cav_B_B_Scout_WSL_F_Local: Cav_B_B_Scout_Base_F { @@ -69,7 +69,7 @@ class Cav_B_B_Scout_TeamLeader_F: Cav_B_B_Scout_Base_F { scope = 2; category[] += {"cScripts_Loadout_Cat_Bravo_Viking_Squad"}; loadout = [["rhs_weap_m4a1_blockII_grip2_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["30Rnd_556x45_Stanag_red",30],[],"rhsusf_acc_grip2"],[],[],["USP_G3C_RS_KP_OR_MC",[["ACE_packingBandage",10],["kat_chestSeal",2],["kat_guedel",1],["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_microDAGR",1],["ACE_MapTools",1],["ACE_Chemlight_Shield",1],["ACE_Chemlight_White",1,1]]],["USP_VEST_STRANDHOGG2_MC",[["HandGrenade",2,1],["SmokeShell",4,1],["SmokeShellBlue",2,1],["SmokeShellYellow",2,1],["SmokeShellPurple",1,1],["rhs_mag_mk3a2",2,1],["30Rnd_556x45_Stanag_red",6,30],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",4,30]]],["USP_PACK_BREACHER_MC",[["ACE_HuntIR_monitor",1],["ACE_EntrenchingTool",1],["ACE_SpraypaintGreen",1],["ACE_tourniquet",4],["ACE_CableTie",5],["ACE_splint",2],["kat_Painkiller",2,10],["ACE_Chemlight_IR",2,1]]],"USP_OPS_FASTXP_TAN_MC_05","UK3CB_G_Ballistic_Black_Shemagh_Green",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ItemWatch","USP_PVS31_HIGH"]]; - role = "fireteamleader"; + equipmentTags[] = {"role_fireteamleader"}; icon = "iconManLeader"; }; class Cav_B_B_Scout_AutomaticRifleman_F: Cav_B_B_Scout_Base_F { @@ -101,7 +101,7 @@ class Cav_B_B_Scout_RiflemanAT_F: Cav_B_B_Scout_Base_F { displayName = "MAAWS Specialist"; scope = 2; category[] += {"cScripts_Loadout_Cat_Bravo_Viking_Squad"}; - role = "weapons"; + equipmentTags[] = {"role_weapons"}; loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["30Rnd_556x45_Stanag_red",30],[],"rhsusf_acc_grip2"],["launch_MRAWS_green_F","","","",[],[],""],[],["USP_G3C_RS_KP_OR_MC",[["ACE_packingBandage",10],["kat_chestSeal",2],["kat_guedel",1],["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_microDAGR",1],["ACE_MapTools",1]]],["USP_CRYE_CPC_COMMS_BELT_MC",[["HandGrenade",2,1],["SmokeShell",4,1],["ACE_Chemlight_IR",2,1],["rhs_mag_mk3a2",4,1],["30Rnd_556x45_Stanag_red",9,30],["SmokeShellPurple",1,1],["ACE_CTS9",2,1],["kat_Painkiller",2,10]]],["rhsusf_falconii_mc",[["ACE_EntrenchingTool",1],["",2,0],["MRAWS_HEAT_F",1,1],["MRAWS_HE_F",2,1]]],"USP_OPS_FASTXP_TAN_MC_03","USP_MFRAME_SMC1_TAN2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ItemWatch","USP_PVS15"]]; }; class Cav_B_B_Scout_CombatLifeSaver_F: Cav_B_B_Scout_Base_F { @@ -111,7 +111,7 @@ class Cav_B_B_Scout_CombatLifeSaver_F: Cav_B_B_Scout_Base_F { loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG",30],[],"rhsusf_acc_grip2"],[],[],["USP_G3C_RS_KP_OR_MC",[["ACE_packingBandage",10],["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_microDAGR",1],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_splint",4]]],["USP_CRYE_JPC_ASLTB",[["kat_CarbonateItem",1],["ACE_epinephrine",3],["kat_phenylephrineAuto",3],["HandGrenade",4,1],["SmokeShell",4,1],["ACE_Chemlight_IR",2,1],["rhs_mag_mk3a2",4,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG",8,30]]],["USP_DELTA_BAG_MC",[["ACE_EntrenchingTool",1],["ACE_packingBandage",40],["ACE_quikclot",40],["ACE_tourniquet",12],["ACE_splint",8],["ACE_EarPlugs",2],["kat_chestSeal",10],["kat_guedel",10],["kat_ncdKit",5],["kat_pocketBVM",1],["kat_accuvac",1],["kat_Painkiller",3,10]]],"USP_OPS_FASTXP_TAN_MC_03","USP_MFRAME_BLK2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ItemWatch","USP_PVS15"]]; insignia = "cav_insignia_specialized_cls"; abilityMedic = 1; - role = "cls"; + equipmentTags[] = {"role_cls"}; icon = "iconManMedic"; }; diff --git a/cScripts/Loadouts/CfgLoadouts_Charlie_Squad.hpp b/cScripts/Loadouts/CfgLoadouts_Charlie_Squad.hpp index 86d1e1af0..bcf3bc290 100644 --- a/cScripts/Loadouts/CfgLoadouts_Charlie_Squad.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Charlie_Squad.hpp @@ -2,7 +2,7 @@ class Cav_B_C_Officer_F: Cav_B_Charlie_base_F { displayName = "$STR_Cav_Charlie_Characters_C_Officer"; category[] += {"cScripts_Loadout_Cat_Charlie_Leadership"}; scope = 0; - role = "officer"; + equipmentTags[] = {"role_officer"}; icon = "iconManOfficer"; }; class Cav_B_C_PlatoonLeader_F: Cav_B_C_Officer_F { @@ -26,7 +26,7 @@ class Cav_B_C_PlatoonMedic_F: Cav_B_C_Officer_F { loadout = [["rhs_weap_m4a1_blockII","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG",30],[],""],[],[],["USP_G3C_RS_KP_OR_MC",[["ACE_tourniquet",10],["ACE_EarPlugs",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_Flashlight_XL50",1],["ACE_IR_Strobe_Item",2],["ACE_CableTie",2],["ACE_epinephrine",6],["kat_PenthroxItem",4],["kat_Painkiller",2,10],["kat_Carbonate",2,10],["ACE_Chemlight_IR",2,1]]],["USP_CRYE_CPC_MEDIC_BELT_MC",[["ACE_surgicalKit",1],["kat_IV_16",15],["kat_amiodarone",5],["kat_atropine",5],["ACE_adenosine",3],["kat_chestSeal",10],["kat_EACA",10],["kat_fentanyl",5],["kat_ketamine",5],["kat_larynx",10],["kat_lidocaine",10],["kat_nalbuphine",10],["kat_naloxone",5],["kat_nitroglycerin",10],["kat_norepinephrine",10],["kat_phenylephrine",10],["kat_stethoscope",1],["kat_Pulseoximeter",5],["kat_IO_FAST",5],["kat_aatKit",5],["ACE_splint",2],["SmokeShell",4,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG",7,30],["SmokeShellBlue",2,1],["SmokeShellPurple",1,1],["kat_Penthrox",5,10]]],["USP_TACTICAL_PACK",[["ACE_plasmaIV",5],["ACE_plasmaIV_500",4],["ACE_salineIV",1],["ACE_elasticBandage",30],["ACE_packingBandage",10],["ACE_quikclot",10],["ACE_salineIV_250",2],["USP_PVS15",1],["kat_accuvac",1],["ACE_splint",6]]],"USP_OPSCORE_FASTMTC_CTW","USP_MFRAME_BLK2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; insignia = "cav_insignia_specialized_cls"; abilityMedic = 2; - role = "medic"; + equipmentTags[] = {"tag_medic"}; icon = "iconManMedic"; }; class Cav_B_C_Drone_Operator_F_Local: Cav_B_C_Officer_F { @@ -40,7 +40,7 @@ class Cav_B_C_SquadLeader_F: Cav_B_Charlie_base_F { scope = 2; category[] += {"cScripts_Loadout_Cat_Charlie_Leadership"}; loadout = [["rhs_weap_m4a1_m320","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15_bk","rhsusf_acc_ACOG_RMR_3d",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan",30],[],""],[],[],["USP_G3C_RS2_KP_OR_MC",[["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",14],["kat_chestSeal",2],["kat_guedel",1],["ACE_EarPlugs",1],["kat_Painkiller",2,10]]],["USP_CRYE_JPC_TLB",[["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",9,30],["SmokeShell",4,1],["HandGrenade",2,1],["SmokeShellPurple",1,1],["rhs_mag_m713_Red",3,1],["rhs_mag_m714_White",4,1],["SmokeShellBlue",2,1]]],["USP_REEBOW_3DAP_MC",[["ACE_HuntIR_monitor",1],["USP_PVS15",1],["ACE_splint",2],["ACE_SpraypaintRed",1],["ACE_EntrenchingTool",1],["ACE_CableTie",2]]],"USP_OPSCORE_FASTMTC_CMGTW","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "squadleader"; + equipmentTags[] = {"role_squadleader"}; icon = "iconManLeader"; }; class Cav_B_C_FireTeamLeader_F: Cav_B_Charlie_base_F { @@ -48,7 +48,7 @@ class Cav_B_C_FireTeamLeader_F: Cav_B_Charlie_base_F { scope = 2; category[] += {"cScripts_Loadout_Cat_Charlie_Squad"}; loadout = [["rhs_weap_m4a1_m320","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15_bk","rhsusf_acc_ACOG_RMR_3d",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan",30],[],""],[],[],["USP_G3C_RS2_KP_OR_MC",[["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",14],["kat_chestSeal",2],["kat_guedel",1],["ACE_EarPlugs",1],["kat_Painkiller",2,10]]],["USP_CRYE_JPC_TLB",[["ACE_IR_Strobe_Item",1],["SmokeShell",4,1],["HandGrenade",2,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",10,30],["ACE_HuntIR_M203",1,1],["rhs_mag_m713_Red",2,1],["rhs_mag_m714_White",2,1],["SmokeShellPurple",1,1]]],["USP_REEBOW_3DAP_MC",[["ACE_HuntIR_monitor",1],["ACE_splint",2],["ACE_EntrenchingTool",1],["ACE_SpraypaintRed",1],["ACE_CableTie",2],["USP_PVS15",1],["rhsusf_200Rnd_556x45_mixed_soft_pouch",2,200],["SmokeShellBlue",2,1]]],"USP_OPSCORE_FASTMTC_CGSW","",["ACE_Vector","","","",[],[],""],["ItemMap","ItemAndroid","","ItemCompass","ACE_Altimeter",""]]; - role = "fireteamleader"; + equipmentTags[] = {"role_fireteamleader"}; icon = "iconManLeader"; }; class Cav_B_C_AutomaticRifleman_F: Cav_B_Charlie_base_F { @@ -83,7 +83,7 @@ class Cav_B_C_CombatLifeSaver_F: Cav_B_Charlie_base_F { category[] += {"cScripts_Loadout_Cat_Charlie_Squad"}; loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan",30],[],""],[],[],["USP_G3C_CU_KP_OR_MC",[["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",14],["ACE_splint",2],["ACE_EarPlugs",1],["ACE_Chemlight_IR",2,1]]],["USP_CRYE_JPC_DMB",[["SmokeShell",4,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan",9,30],["HandGrenade",2,1],["SmokeShellBlue",1,1],["SmokeShellPurple",1,1]]],["USP_DELTA_BAG_MC",[["USP_PVS15",1],["ACE_packingBandage",40],["ACE_quikclot",40],["ACE_EntrenchingTool",1],["ACE_splint",8],["ACE_tourniquet",12],["kat_chestSeal",10],["ACE_epinephrine",3],["kat_guedel",10],["kat_ncdKit",5],["kat_pocketBVM",1],["kat_accuvac",1],["kat_phenylephrineAuto",3],["kat_CarbonateItem",1],["kat_Painkiller",7,10]]],"USP_OPSCORE_FASTMTC_GSW","USP_MFRAME_TAN",[],["ItemMap","","","ItemCompass","ACE_Altimeter",""]]; insignia = "cav_insignia_specialized_cls"; abilityMedic = 1; - role = "cls"; + equipmentTags[] = {"tag_cls"}; icon = "iconManMedic"; }; // Named diff --git a/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp b/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp index 7ca95f210..4f552441f 100644 --- a/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp @@ -1,6 +1,6 @@ class Cav_B_Charlie_Weapons_base_F: Cav_B_Charlie_base_F { category[] += {"cScripts_Loadout_Cat_Charlie_Weapons"}; - role = "weapons"; + equipmentTags[] = {"role_weapons"}; }; class Cav_B_C_Weapons_SquadLeader_F: Cav_B_C_SquadLeader_F { diff --git a/cScripts/Loadouts/CfgLoadouts_Common.hpp b/cScripts/Loadouts/CfgLoadouts_Common.hpp index 8a2af07eb..46b6e36a3 100644 --- a/cScripts/Loadouts/CfgLoadouts_Common.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Common.hpp @@ -16,7 +16,7 @@ class CommonBlufor { //preLoadout = ""; //postLoadout = ""; - //role = ""; + //equipmentTags[] = {}; //icon = ""; }; diff --git a/cScripts/Loadouts/CfgLoadouts_Special.hpp b/cScripts/Loadouts/CfgLoadouts_Special.hpp index ec786b473..61a0f614d 100644 --- a/cScripts/Loadouts/CfgLoadouts_Special.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Special.hpp @@ -3,7 +3,7 @@ class S3_Base: Cav_B_Seventh_Cavalry_Base_F { category[] = {}; scope = 2; loadout = [["rhs_weap_m4a1_blockII_grip_bk","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15side_bk","rhsusf_acc_ACOG_RMR_3d",["ACE_30Rnd_556x45_Stanag_M995_AP_mag",30],[],"rhsusf_acc_rvg_blk"],[],[],["USP_G3C_RS2_MC",[["ACE_tourniquet",4],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_splint",4],["ACE_Flashlight_XL50",1],["ACE_packingBandage",20],["kat_Painkiller",2,10],["SmokeShellPurple",2,1]]],["rhsusf_plateframe_grenadier",[["ACE_IR_Strobe_Item",2],["ACE_30Rnd_556x45_Stanag_M995_AP_mag",6,30],["SmokeShellBlue",2,1],["SmokeShellRed",2,1]]],["USP_TACTICAL_PACK",[["ACE_EntrenchingTool",1],["USP_PVS15",1],["Laserbatteries",1,1],[["ACE_Vector","","","",[],[],""],1]]],"rhsusf_opscore_mc_cover_pelt_cam","",["Laserdesignator","","","",["Laserbatteries",1],[],""],["ItemMap","ItemcTab","","ItemCompass","ACE_Altimeter",""]]; - role = "officer"; + equipmentTags[] = {"role_officer"}; company = ""; diff --git a/cScripts/Loadouts/CfgLoadouts_Training.hpp b/cScripts/Loadouts/CfgLoadouts_Training.hpp index c31323b68..faba303bb 100644 --- a/cScripts/Loadouts/CfgLoadouts_Training.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Training.hpp @@ -2,7 +2,7 @@ class Cav_B_Training_base_F: Cav_B_Seventh_Cavalry_Base_F { category[] = {"cScripts_Loadout_Cat_Training"}; scope = 0; - role = "training"; + equipmentTags[] = {"role_training"}; }; class Cav_B_Training_Cadre_F: Cav_B_Training_base_F { diff --git a/cScripts/cScripts_postInit.sqf b/cScripts/cScripts_postInit.sqf index e070e0b5e..752b6468b 100644 --- a/cScripts/cScripts_postInit.sqf +++ b/cScripts/cScripts_postInit.sqf @@ -10,11 +10,6 @@ INFO("postInit", "Initializing..."); // Change inventory content of supply crates on mission start. call EFUNC(init,vehicle); -// item replacement -if (EGVAR(Settings,allowReplaceItem)) then { - call EFUNC(init,aceItemReplace); -}; - // staging call EFUNC(init,staging); diff --git a/cScripts/cScripts_preInit.sqf b/cScripts/cScripts_preInit.sqf index 670fbf9e0..7981ee394 100644 --- a/cScripts/cScripts_preInit.sqf +++ b/cScripts/cScripts_preInit.sqf @@ -23,6 +23,7 @@ EGVAR(Staging,ZoneStatus) = false; EGVAR(Staging,showAllLoadouts) = false; GVAR(isPlayer) = hasInterface || {isPlayer player}; GVAR(OneLife) = !isNil{(getArray (missionconfigfile >> "respawnTemplates") select 0) == "ace_spectator"}; +EGVAR(DATABASE,DONE) = false; #include "initSettings.inc.sqf" @@ -38,14 +39,16 @@ INFO("preInit", "Initializing..."); // Logistical Database -EGVAR(DATABASE,DONE) = false; GVAR(DATABASE) = call EFUNC(init,logistics); -EGVAR(DATABASE,DONE) = true; EGVAR(PYLONS,DONE) = false; GVAR(PYLONS) = call EFUNC(init,pylons); EGVAR(PYLONS,DONE) = true; +if (EGVAR(Settings,allowReplaceItem)) then { + call EFUNC(init,aceItemReplace); +}; + if (EGVAR(Settings,allowCustomTagging)) then { call EFUNC(init,aceTagging); }; diff --git a/cScripts/functions/systems/fn_addDefaultArsenalLoadout.sqf b/cScripts/functions/arsenal/fn_arsenal_addDefaultLoadout.sqf similarity index 96% rename from cScripts/functions/systems/fn_addDefaultArsenalLoadout.sqf rename to cScripts/functions/arsenal/fn_arsenal_addDefaultLoadout.sqf index c19d66598..9254b65d3 100644 --- a/cScripts/functions/systems/fn_addDefaultArsenalLoadout.sqf +++ b/cScripts/functions/arsenal/fn_arsenal_addDefaultLoadout.sqf @@ -11,7 +11,7 @@ * True on success * * Example: - * call cScripts_fnc_addDefaultArsenalLoadout + * call cScripts_fnc_arsenal_addDefaultLoadout */ if (!EGVAR(patches,usesACEArsenal)) exitWith {}; diff --git a/cScripts/functions/systems/fn_addDefaultArsenalLoadouts.sqf b/cScripts/functions/arsenal/fn_arsenal_addDefaultLoadouts.sqf similarity index 97% rename from cScripts/functions/systems/fn_addDefaultArsenalLoadouts.sqf rename to cScripts/functions/arsenal/fn_arsenal_addDefaultLoadouts.sqf index 49a67f8bd..e4ab5ca90 100644 --- a/cScripts/functions/systems/fn_addDefaultArsenalLoadouts.sqf +++ b/cScripts/functions/arsenal/fn_arsenal_addDefaultLoadouts.sqf @@ -10,7 +10,7 @@ * True on success * * Example: - * call cScripts_fnc_addDefaultArsenalLoadouts + * call cScripts_fnc_arsenal_addDefaultLoadouts * * Public: No */ diff --git a/cScripts/functions/systems/fn_clearDefaultArsenalLoadouts.sqf b/cScripts/functions/arsenal/fn_arsenal_clearDefaultLoadouts.sqf similarity index 83% rename from cScripts/functions/systems/fn_clearDefaultArsenalLoadouts.sqf rename to cScripts/functions/arsenal/fn_arsenal_clearDefaultLoadouts.sqf index aa9c2a12c..aea8103f6 100644 --- a/cScripts/functions/systems/fn_clearDefaultArsenalLoadouts.sqf +++ b/cScripts/functions/arsenal/fn_arsenal_clearDefaultLoadouts.sqf @@ -4,7 +4,7 @@ * This function remove all ace arsenal default loadouts. * * Example: - * call cScripts_fnc_removeDefaultArsenalLoadouts + * call cScripts_fnc_arsenal_removeDefaultLoadouts * * Public: No */ diff --git a/cScripts/functions/systems/fn_addArsenal.sqf b/cScripts/functions/arsenal/fn_arsenal_createAction.sqf similarity index 91% rename from cScripts/functions/systems/fn_addArsenal.sqf rename to cScripts/functions/arsenal/fn_arsenal_createAction.sqf index 05b745906..1ee8f76ad 100644 --- a/cScripts/functions/systems/fn_addArsenal.sqf +++ b/cScripts/functions/arsenal/fn_arsenal_createAction.sqf @@ -8,7 +8,8 @@ * 0: aceCategory (Default: ["ACE_MainActions"]) * * Example: - * call cScripts_fnc_addArsenal + * call cScripts_fnc_arsenal_createAction + * ["ACE_MainActions"] call cScripts_fnc_arsenal_createAction */ params [ @@ -19,16 +20,16 @@ private _icon = "cScripts\Data\Icon\icon_arsenal_ca.paa"; private _arsenalStatement = { INFO_2("Staging Arsenal", "Creating staging arsenal for %1 [%2]", player, typeOf player); - call FUNC(clearDefaultArsenalLoadouts); + call EFUNC(arsenal,clearDefaultLoadouts); waitUntil { count ace_arsenal_defaultLoadoutsList == 0 }; - call FUNC(addDefaultArsenalLoadout); + call EFUNC(arsenal,addDefaultLoadout); waitUntil { count ace_arsenal_defaultLoadoutsList != 0 }; if (EGVAR(Settings,useFilteredArsenal)) then { private _items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []); if (_items isEqualTo []) then { SHOW_WARNING_2("Staging Arsenal", "Whitleist was empty for %1 [%2] attepting to recreate it", player, typeOf player); - private _whitelist = call cScripts_fnc_getArsenalWhitelist; + private _whitelist = call EFUNC(arsenal,getWhitelist); SETVAR(player,EGVAR(Player,ArsenalWhitelist), _whitelist); _items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []); }; diff --git a/cScripts/functions/arsenal/fn_arsenal_getWhitelist.sqf b/cScripts/functions/arsenal/fn_arsenal_getWhitelist.sqf new file mode 100644 index 000000000..9483cf280 --- /dev/null +++ b/cScripts/functions/arsenal/fn_arsenal_getWhitelist.sqf @@ -0,0 +1,131 @@ +#define DEBUG_MODE; +#include "..\script_component.hpp"; +/* + * Author: CPL.Brostrom.A + * This function return a list of items used for arsenal + * + * Arguments: + * None + * + * Return: + * ARRAY of items + * + * Example: + * call cScripts_fnc_arsenal_getWhitelist; + */ + +waitUntil {!isNull player && player == player}; + +private _classname = [player] call EFUNC(gear,getLoadoutName); +if !(isClass (missionConfigFile >> "CfgLoadouts" >> _classname)) exitWith { + SHOW_CHAT_WARNING_1("ArsenalWhitelist", "Loadout '%1' does not exist inside of mission config. No whitelist will be created.", _classname); + []; +}; + +EGVAR(gear,arsenalWhitelistAddedTags) = []; + +// Loadout Items +private _loadout = parseSimpleArray getText (missionConfigFile >> "CfgLoadouts" >> _classname >> "loadout"); +private _loadoutSpecificItems = str _loadout splitString "[]," joinString ","; +_loadoutSpecificItems = parseSimpleArray ("[" + _loadoutSpecificItems + "]"); +_loadoutSpecificItems = _loadoutSpecificItems arrayIntersect _loadoutSpecificItems select {_x isEqualType "" && {_x != ""}}; + +// Global items +private _anySideCommonItems = ["Common"] call EFUNC(gear,getTagItems); + +// Side items +private _side = [side group player] call EFUNC(gear,getSideConfig); +private _commonSideItems = switch (_side) do { + case "CommonBlufor": { ["CommonBlufor"] call EFUNC(gear,getTagItems); }; + case "CommonOpfor": { ["CommonOpfor"] call EFUNC(gear,getTagItems); }; + case "CommonIndependant": { ["CommonIndependant"] call EFUNC(gear,getTagItems); }; + case "CommonCivilian": { ["CommonCivilian"] call EFUNC(gear,getTagItems); }; + default { ["CommonDefault"] call EFUNC(gear,getTagItems); }; +}; + +// Side company items +private _company = ([3] call EFUNC(player,getOrganization)); +private _titleCompany = [_company] call CBA_fnc_capitalize; +private _companyItems = switch (_side) do { + case "CommonBlufor": { [format["CommonBluforCompany",_titleCompany]] call EFUNC(gear,getTagItems); }; + case "CommonOpfor": { [format["CommonOpforCompany",_titleCompany]] call EFUNC(gear,getTagItems); }; + case "CommonIndependant": { [format["CommonIndependantCompany",_titleCompany]] call EFUNC(gear,getTagItems); }; + case "CommonCivilian": { [format["CommonCivilianCompany",_titleCompany]] call EFUNC(gear,getTagItems); }; + default { [format["CommonDefaultCompany",_titleCompany]] call EFUNC(gear,getTagItems); }; +}; + +// Side company platoon items +private _companyPlatoon = ([2] call EFUNC(player,getOrganization)); +private _companyPlatoonItems = switch (_side) do { + case "CommonBlufor": { [format["CommonBluforCompany%1%2",_titleCompany,_companyPlatoon]] call EFUNC(gear,getTagItems); }; + case "CommonOpfor": { [format["CommonOpforCompany%1%2",_titleCompany,_companyPlatoon]] call EFUNC(gear,getTagItems); }; + case "CommonIndependant": { [format["CommonIndependantCompany%1%2",_titleCompany,_companyPlatoon]] call EFUNC(gear,getTagItems); }; + case "CommonCivilian": { [format["CommonCivilianCompany%1%2",_titleCompany,_companyPlatoon]] call EFUNC(gear,getTagItems); }; + default { ["CommonDefaultCompany"+_titleCompany+_companyPlatoon] call EFUNC(gear,getTagItems); }; +}; + +// Add loadout equipmnet tag items +private _tagItems = []; +private _equipmentTags = call EGVAR(gear,getLoadoutTags); +{ + private _items = [_x] call EGVAR(gear,getTagItems); + _tagItemsList append _items; +} forEach _equipmentTags; + +// All equipmentTags +private _allEquipmentTags = configProperties [missionConfigFile >> "CfgEquipmentTags"]; + +// Weapon System Items +private _weaponSystemItems = []; +{ + private _weaponTagName = configName _x; + private _classPrefix = [_weaponTagName, 0, 5] call BIS_fnc_trimString; + if (_classPrefix != "class_") then {continue}; + + private _classWeaponName = [_weaponTagName, 6] call BIS_fnc_trimString; + private _primaryWeapon = if (!isNil{_loadout#0#0}) then {_loadout#0#0} else {""}; + private _handgunWeapon = if (!isNil{_loadout#2#0}) then {_loadout#2#0} else {""}; + private _launcherWeapon = if (!isNil{_loadout#1#0}) then {_loadout#1#0} else {""}; + + if (_primaryWeapon isKindof [_classWeaponName, configFile >> 'CfgWeapons']) then { + LOG_1("DEBUG","Adding %1 weapon system",_weaponTagName); + _weaponSystemItems append ([_weaponTagName] call EFUNC(gear,getTagItems)); + continue + }; + if (_handgunWeapon isKindof [_classWeaponName, configFile >> 'CfgWeapons']) then { + _weaponSystemItems append ([_weaponTagName] call EFUNC(gear,getTagItems)); + continue + }; + if (_launcherWeapon isKindof [_classWeaponName, configFile >> 'CfgWeapons']) then { + _weaponSystemItems append ([_weaponTagName] call EFUNC(gear,getTagItems)); + continue + }; +} forEach _allEquipmentTags; +diag_log format ["cScripts DEBUG: Weapon System: %1", _weaponSystemItems]; + +private _whitelist = _loadoutSpecificItems + _anySideCommonItems + _commonSideItems + _companyItems + _companyPlatoonItems + _weaponSystemItems; + +// Clean the whitelist +private _finalWhitelist = []; +if (!isNil{EGVAR(DATABASE,DONE)}) then { + INFO_2("Arsenal", "Database ready filtering Whitelist for %1 [%2].",player,typeof player); + { + private _items = [_x] call FUNC(getFilteredItem); + _finalWhitelist append _items; + } forEach _whitelist; +} else { + WARNING_2("Arsenal", "Database not read skiping filtering of whitelist for %1 [%2].",player,typeof player); + _finalWhitelist = _whitelist; +}; +diag_log str _finalWhitelist; + +INFO_2("Arsenal", "Whitelist created for %1 [%2].",player,typeof player); + +diag_log format["_loadoutSpecificItems: %1",_loadoutSpecificItems isEqualType []]; +diag_log format["_commonSideItems: %1",_commonSideItems isEqualType []]; +diag_log format["_companyItems: %1",_companyItems isEqualType []]; +diag_log format["_companyPlatoonItems: %1",_companyPlatoonItems isEqualType []]; +diag_log format["_weaponSystemItems: %1",_weaponSystemItems isEqualType []]; +diag_log format["_whitelist: %1",_finalWhitelist isEqualType []]; + +_finalWhitelist diff --git a/cScripts/functions/gear/fn_gear_applyLoadout.sqf b/cScripts/functions/gear/fn_gear_applyLoadout.sqf index 5e230500d..a026479c6 100644 --- a/cScripts/functions/gear/fn_gear_applyLoadout.sqf +++ b/cScripts/functions/gear/fn_gear_applyLoadout.sqf @@ -38,9 +38,13 @@ if (_loadConfig) then { // Organizaiton if (hasInterface) then { - private _configPlatoon = getNumber (_config >> "platoon"); - private _configCompany = getText (_config >> "company"); - [_configPlatoon,_configCompany] call EFUNC(Player,setOrganization); + [ + getText (_config >> "team"), + getNumber (_config >> "squad"), + getNumber (_config >> "platoon"), + getText (_config >> "company"), + getText (_config >> "regiment") + ] call EFUNC(Player,setOrganization); }; }; diff --git a/cScripts/functions/gear/fn_gear_getLoadoutRole.sqf b/cScripts/functions/gear/fn_gear_getLoadoutRole.sqf deleted file mode 100644 index 71488a4c4..000000000 --- a/cScripts/functions/gear/fn_gear_getLoadoutRole.sqf +++ /dev/null @@ -1,25 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: CPL.Brostrom.A - * This function return your role - * - * Arguments: - * None - * - * Return Value: - * Role - * - * Example: - * call cScripts_fnc_gear_getLoadoutRole - * - */ - -private _return = "trooper"; - -private _loadout = GETVAR(player,EGVAR(Gear,loadoutClass),typeOf player); - -private _config = missionConfigFile >> "CfgLoadouts" >> _loadout; -private _role = getText (_config >> "role"); -if (_role != "") then {_return = _role}; - -_return \ No newline at end of file diff --git a/cScripts/functions/gear/fn_gear_getLoadoutTags.sqf b/cScripts/functions/gear/fn_gear_getLoadoutTags.sqf new file mode 100644 index 000000000..6bc8ab95b --- /dev/null +++ b/cScripts/functions/gear/fn_gear_getLoadoutTags.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: CPL.Brostrom.A + * This function return lodout tags + * + * Arguments: + * None + * + * Return Value: + * Tags + * + * Example: + * call cScripts_fnc_gear_getLoadoutTags + * + */ + +private _loadout = GETVAR(player,EGVAR(Gear,loadoutClass), typeOf player); + +private _config = missionConfigFile >> "CfgLoadouts" >> _loadout; +private _tags = getArray (_config >> "equipmentTags"); +if (_tags isEqualTo []) then {[]}; + +_tags diff --git a/cScripts/functions/gear/fn_gear_getTagItems.sqf b/cScripts/functions/gear/fn_gear_getTagItems.sqf new file mode 100644 index 000000000..cfa9a2933 --- /dev/null +++ b/cScripts/functions/gear/fn_gear_getTagItems.sqf @@ -0,0 +1,63 @@ +#define DEBUG_MODE +#include "..\script_component.hpp" +/* + * Author: CPL.Brostrom.A + * This function return given equipment tag items. + * + * Arguments: + * 0: Loadout + * + * Return Value: + * Tags + * + * Example: + * ["CommonDefault"] call cScripts_fnc_gear_getTagItems + * ["CommonBluforCompanyAlpha"] call cScripts_fnc_gear_getTagItems + * + */ + +params [["_tag","",[""]]]; + +if !(isClass (missionConfigFile >> "CfgEquipmentTags")) exitWith { + SHOW_ERROR("Gear","cfgEquipmentTag config does not exist"); + []; +}; +if (_tag isEqualTo "") exitWith {[]}; + +private _fn_getTagItemsList = { + params [["_tag","",[]]]; + private _equipmentTag = getArray (missionConfigFile >> "CfgEquipmentTags" >> _tag); + _equipmentTag; +}; + +private _tagItemList = [_tag] call _fn_getTagItemsList; +INFO_2("EquipmentTag","Handling List: '%1': %2",_tag,_tagItemList); + +private _usedTagList = []; +private _itemList = []; +{ + if (_forEachIndex > 900) then { + SHOW_SERVER_ERROR_2("EquipmentTag","Infinet loop detected for player %1 [%2]. Loop have stopped.",player,typeOf player); + break; + }; + if (_x in _usedTagList) then { + WARNING_1("EquipmentTag","Tag collection '%1' is item already handled skipping.",_x); + continue; + }; + + INFO_1("EquipmentTag","Adding item: %1",_x); + + if ([_x] call EFUNC(gear,isTag)) then { + INFO_1("EquipmentTag","Item: %1 is tag",_x); + _tagItemList append ([_x] call _fn_getTagItemsList); + _usedTagList append [_x]; + continue; + }; + if (_x in _itemList) exitWith { + WARNING_1("EquipmentTag","Item '%1' is item already in itemlist.",_x); + continue; + }; + _itemList append [_x]; +} forEach _tagItemList; + +_itemList; diff --git a/cScripts/functions/gear/fn_gear_getTags.sqf b/cScripts/functions/gear/fn_gear_getTags.sqf new file mode 100644 index 000000000..d5b0ed76e --- /dev/null +++ b/cScripts/functions/gear/fn_gear_getTags.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: CPL.Brostrom.A + * This function return your equipmetTags + * + * Arguments: + * 0: Loadout + * + * Return Value: + * Tags + * + * Example: + * [typeOf player] call cScripts_fnc_gear_getTags + * [vehicleVarName player] call cScripts_fnc_gear_getTags + * + */ + +params [["_loadout","",[""]]]; + +if !(isClass (missionConfigFile >> "CfgEquipmentTags")) exitWith { + SHOW_ERROR("Gear","cfgEquipmentTag config does not exist"); + [] +}; + +private _config = missionConfigFile >> "CfgLoadouts" >> _loadout; +private _tags = getArray (_config >> "equipmentTags"); + +_tags; \ No newline at end of file diff --git a/cScripts/functions/gear/fn_gear_isTag.sqf b/cScripts/functions/gear/fn_gear_isTag.sqf new file mode 100644 index 000000000..514638dc6 --- /dev/null +++ b/cScripts/functions/gear/fn_gear_isTag.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: CPL.Brostrom.A + * This function return true or false if the tag is a equipmentTag or not + * + * Arguments: + * 0: Tag + * + * Return Value: + * True/False + * + * Example: + * ["ace_banana"] call cScripts_fnc_gear_isTag + * + */ + +params [["_item","",[""]]]; + +private _cfgEquipmentTags = isArray (missionConfigFile >> "CfgEquipmentTags" >> _item); +if (_cfgEquipmentTags) exitWith {true}; + +false \ No newline at end of file diff --git a/cScripts/functions/gear/fn_gear_preInit.sqf b/cScripts/functions/gear/fn_gear_preInit.sqf index aa8ebdb66..b94023034 100644 --- a/cScripts/functions/gear/fn_gear_preInit.sqf +++ b/cScripts/functions/gear/fn_gear_preInit.sqf @@ -18,6 +18,7 @@ GVAR(Gear) = false; EGVAR(gear,groupIDsSynched) = false; EGVAR(gear,playerLoadoutGiven) = false; +EGVAR(gear,arsenalWhitelistAddedTags) = []; if (isClass (missionConfigFile >> "CfgLoadouts")) then { ["CAManBase", "InitPost", { diff --git a/cScripts/functions/init/fn_init_aceArsenal.sqf b/cScripts/functions/init/fn_init_aceArsenal.sqf index 58bd6bb0c..cc86bb1c5 100644 --- a/cScripts/functions/init/fn_init_aceArsenal.sqf +++ b/cScripts/functions/init/fn_init_aceArsenal.sqf @@ -11,7 +11,7 @@ if (!EGVAR(patches,usesACEArsenal)) exitWith {}; -call FUNC(addDefaultArsenalLoadouts); +call EFUNC(arsenal,addDefaultLoadouts); if (is3DEN) exitWith {}; @@ -29,7 +29,7 @@ GVAR(StagingArsenalOpen) = false; [_insigniaClass] call EFUNC(profile,saveInsignia); // Reset default loadouts - call FUNC(addDefaultArsenalLoadouts); + call EFUNC(arsenal,addDefaultLoadouts); }] call CBA_fnc_execNextFrame; }; }] call CBA_fnc_addEventHandler; @@ -39,7 +39,7 @@ GVAR(StagingArsenalOpen) = false; }] call CBA_fnc_addEventHandler; [QEGVAR(StagingArsenal,SaveWhitelist), { - private _items = call FUNC(getArsenalWhitelist); + private _items = call EFUNC(arsenal,getWhitelist); SETVAR(player,EGVAR(Player,ArsenalWhitelist),_items); }] call CBA_fnc_addEventHandler; diff --git a/cScripts/functions/init/fn_init_staging.sqf b/cScripts/functions/init/fn_init_staging.sqf index 8374dcc8b..87d777f9b 100644 --- a/cScripts/functions/init/fn_init_staging.sqf +++ b/cScripts/functions/init/fn_init_staging.sqf @@ -82,6 +82,6 @@ player addEventHandler ["InventoryClosed", { if !(GVAR(OneLife)) then {[player, _category] call FUNC(addHeal)}; [player, _category] call FUNC(addInsigniaSelectionList); [player, "ACE_SelfActions", false] call FUNC(setupLoadoutSelection); -[_category] call FUNC(addArsenal); +[_category] call EFUNC(arsenal,createAction); INFO_1("Staging", "Staging options for %1 have been setup.", name player) diff --git a/cScripts/functions/logistics/fn_addCargo.sqf b/cScripts/functions/logistics/fn_addCargo.sqf index 6bfac3c91..7071359ce 100644 --- a/cScripts/functions/logistics/fn_addCargo.sqf +++ b/cScripts/functions/logistics/fn_addCargo.sqf @@ -1,3 +1,4 @@ +#define DEBUG_MODE #include "..\script_component.hpp"; /* * Author: Whitsel.M @@ -25,6 +26,26 @@ params [ if ( count _inventory < 1 ) exitWith {}; +private _fn_addFilteredItemDelay = { + params ["_item", "_amount"]; + private _return = if (!isNil{EGVAR(DATABASE,DONE)}) then { + INFO_1("addCargo","Database is done adding item: '%1'",_item); + private _items = [_item] call FUNC(getFilteredItem); + {_vehicle addItemCargoGlobal [_x, _amount]} forEach _items; + } else { + WARNING_1("addCargo","Database not ready delaying addition of item: '%1'",_item); + if (_item call FUNC(checkItemValidity)) then { + [{!isNil{EGVAR(DATABASE,DONE) == true}}, { + params ["_vehicle", "_item", "_amount"]; + private _items = [_item] call FUNC(getFilteredItem); + {_vehicle addItemCargoGlobal [_x, _amount]} forEach _items; + }, [_vehicle, _item, _amount], 10,{ + params ["_vehicle", "_item"]; + }] call CBA_fnc_waitUntilAndExecute; + }; + }; +}; + { if !(_x isEqualTypeArray ["",0]) then { SHOW_WARNING_1("addCargo","Item not added because %1 does not contain the proper format. Must be [STRING, SCALAR].", _x); @@ -33,6 +54,6 @@ if ( count _inventory < 1 ) exitWith {}; _x params [["_item", "", [""]], ["_amount", 0, [0]]]; if (_item call FUNC(checkItemValidity)) then { - _vehicle addItemCargoGlobal [_item, _amount]; + [_item, _amount] call _fn_addFilteredItemDelay; }; } forEach _inventory; \ No newline at end of file diff --git a/cScripts/functions/logistics/fn_getFilteredItem.sqf b/cScripts/functions/logistics/fn_getFilteredItem.sqf new file mode 100644 index 000000000..8dbde26f8 --- /dev/null +++ b/cScripts/functions/logistics/fn_getFilteredItem.sqf @@ -0,0 +1,30 @@ +#define DEBUG_MODE +#include "..\script_component.hpp"; +/* + * Author: Whitsel.M + * This function checks if the item is in the item ace replace array and + * return the ace filterd item. Based on the inputed item. if item is array it return input item. + * + * + * Arguments: + * 0: Item + * + * Return Value: + * List of Items + * + * Example: + * ["ACE_EarPlugs"] call cScripts_fnc_getFilteredItem; + * + * Public: No + */ + +params[["_item", "", [""]]]; + +if (_item isEqualTo "") exitWith { + SHOW_WARNING("getFilteredItem","No item provided"); + ""; +}; + +private _return = ace_common_itemReplacements getVariable [_item, [_item]]; + +_return \ No newline at end of file diff --git a/cScripts/functions/mission/fn_addArsenal.sqf b/cScripts/functions/mission/fn_addArsenal.sqf new file mode 100644 index 000000000..6d1b57e61 --- /dev/null +++ b/cScripts/functions/mission/fn_addArsenal.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp"; +/* + * Author: CPL.Brostrom.A + * This function creates a "CavArsenal". + * This arsenal is created and destroyed on usage to maek sure the items inside are populated with correct items. + * (This is a wrapper function) + * + * Arguments: + * 0: aceCategory (Default: ["ACE_MainActions"]) + * + * Example: + * call cScripts_fnc_addArsenal + * ["ACE_MainActions"] call cScripts_fnc_addArsenal + */ + +params [ + ["_category", ["ACE_MainActions"], [["ACE_MainActions"]]] +]; + +[_category] call EFUNC(arsenal,createAction); \ No newline at end of file diff --git a/cScripts/functions/players/fn_player_getCompany.sqf b/cScripts/functions/players/fn_player_getCompany.sqf deleted file mode 100644 index b0c350ce7..000000000 --- a/cScripts/functions/players/fn_player_getCompany.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "..\script_component.hpp"; -/* - * Author: SGT.Brostrom.A - * This function return your company - * - * Arguments: - * None - * - * Return Value: - * CompanyName - * - * Example: - * call cScripts_fnc_player_getCompany; - * - * Public: No - */ - -private _company = GETVAR(player,EGVAR(Player,Company), ""); -_company = toLower _company; - -_company \ No newline at end of file diff --git a/cScripts/functions/players/fn_player_getOrganization.sqf b/cScripts/functions/players/fn_player_getOrganization.sqf index fffb97f57..87858eb73 100644 --- a/cScripts/functions/players/fn_player_getOrganization.sqf +++ b/cScripts/functions/players/fn_player_getOrganization.sqf @@ -1,29 +1,51 @@ #include "..\script_component.hpp"; /* - * Author: SGT.Brostrom.A + * Author: CPL.Turn.J, SGT.Brostrom.A * This function return your platoon and company * * Arguments: - * None + * 1: ShowSpecificOrganization + * 0=team, 1=squad, 2=platoon, 3=company, 4=regiment * * Return Value: - * Organization + * OrganizationArray or Organization * * Example: * call cScripts_fnc_player_getOrganization; + * [3] call cScripts_fnc_player_getOrganization; * * Public: No */ -private _loadout = [player] call EFUNC(gear,getLoadoutName); +params [["_showOnly", -1, [-1]]]; + +private _emptyOrgArray = ["",0,0,"",""]; +private _loadout = [player] call EFUNC(gear,getLoadoutName); private _config = missionConfigFile >> "CfgLoadouts" >> _loadout; -private _configPlatoon = getNumber (_config >> "platoon"); -private _platoon = GETVAR(player,EGVAR(Player,Platoon),_configPlatoon); -private _configCompany = getText (_config >> "company"); -private _company = GETVAR(player,EGVAR(Player,Company),_configCompany); -_company = toLower _company; +private _regiment = getText (_config >> "regiment"); +_regiment = GETVAR(player,EGVAR(Player,Regiment),_regiment); +_regiment = toLower _regiment; + +private _company = getText (_config >> "company"); +_company = GETVAR(player,EGVAR(Player,Company),_company); +_regiment = toLower _regiment; + +private _platoon = getNumber (_config >> "platoon"); +_platoon = GETVAR(player,EGVAR(Player,Platoon),_platoon); + +private _squad = getNumber (_config >> "squad"); +_squad = GETVAR(player,EGVAR(Player,Squad),_squad); + +private _team = getText (_config >> "team"); +_team = GETVAR(player,EGVAR(Player,Team),_team); +_team = toLower _team; + + +if (_showOnly isNotEqualTo -1) exitWith { + [_team, _squad, _platoon, _company, _regiment] select _showOnly; +}; -[_platoon, _company] \ No newline at end of file +[_team, _squad, _platoon, _company, _regiment] \ No newline at end of file diff --git a/cScripts/functions/players/fn_player_getPlatoon.sqf b/cScripts/functions/players/fn_player_getPlatoon.sqf deleted file mode 100644 index dc37dccf9..000000000 --- a/cScripts/functions/players/fn_player_getPlatoon.sqf +++ /dev/null @@ -1,20 +0,0 @@ -#include "..\script_component.hpp"; -/* - * Author: SGT.Brostrom.A - * This function return your platoon - * - * Arguments: - * None - * - * Return Value: - * Platoon Number - * - * Example: - * call cScripts_fnc_player_getPlatoon; - * - * Public: No - */ - -private _platoon = GETVAR(player,EGVAR(Player,Platoon), 0); - -_platoon \ No newline at end of file diff --git a/cScripts/functions/players/fn_player_setOrganization.sqf b/cScripts/functions/players/fn_player_setOrganization.sqf index dbce26ae9..861ace7cf 100644 --- a/cScripts/functions/players/fn_player_setOrganization.sqf +++ b/cScripts/functions/players/fn_player_setOrganization.sqf @@ -8,32 +8,31 @@ * 1: Company * * Return Value: - * Organization + * OrganizationArray * * Example: - * [2,"Charlie"] call cScripts_fnc_player_setOrganization; + * ["Alpha",1,2,"Alpha","7th Cavalry"] call cScripts_fnc_player_setOrganization; * * Public: No */ params [ + ["_team", "", [""]], + ["_squad", 0, [0]], ["_platoon", 0, [0]], - ["_company", "", [""]] + ["_company", "", [""]], + ["_regiment", "", [""]] ]; -// Set platoon number -if (_platoon < 0 || _platoon > 4) then { - SHOW_WARNING_1("Player","Platoon number '%1' is invalid. Must be between 0 and 4. Setting to default.",_platoon); - _platoon = 0; -}; - +private _team = toLower _team; +SETVAR(player,EGVAR(Player,Team),_team); +SETVAR(player,EGVAR(Player,Squad),_squad); SETVAR(player,EGVAR(Player,Platoon),_platoon); - -// Set company name -_company = toLower _company; +private _company = toLower _company; SETVAR(player,EGVAR(Player,Company),_company); +private _regiment = toLower _regiment; +SETVAR(player,EGVAR(Player,Regiment),_regiment); -private _unit = name player; -INFO_3("Player", "%1 have company set to '%2' and platoon set to '%3'",_unit,_company,_platoon); +INFO_7("Player","Player %1 [%2] organizationArray set to [%3, %4, %5, %6, %7].",player,typeOf player,_team,_squad,_platoon,_company,_regiment); -[_platoon, _company] \ No newline at end of file +[_team, _squad, _platoon, _company, _regiment] \ No newline at end of file diff --git a/cScripts/functions/systems/fn_allowLoadout.sqf b/cScripts/functions/systems/fn_allowLoadout.sqf index aa518c7d9..5fa087420 100644 --- a/cScripts/functions/systems/fn_allowLoadout.sqf +++ b/cScripts/functions/systems/fn_allowLoadout.sqf @@ -35,7 +35,7 @@ if (EGVAR(Staging,showAllLoadouts)) exitWith {true}; if (call EFUNC(player,isCurator)) exitWith {true}; // Check if does not have any company -private _playerCompany = call EFUNC(player,getCompany); +private _playerCompany = [3] call EFUNC(player,getOrganization); if (_playerCompany == "") exitWith {false}; if (_playerCompany == _company) exitWith {true}; diff --git a/cScripts/functions/systems/fn_getArsenalWhitelist.sqf b/cScripts/functions/systems/fn_getArsenalWhitelist.sqf deleted file mode 100644 index 1339eca5d..000000000 --- a/cScripts/functions/systems/fn_getArsenalWhitelist.sqf +++ /dev/null @@ -1,124 +0,0 @@ -#include "..\script_component.hpp"; -/* - * Author: CPL.Brostrom.A - * This function return a list of items used for arsenal - * - * Arguments: - * None - * - * Return: - * ARRAY of items - * - * Example: - * call cScripts_fnc_getArsenalWhitelist; - */ - -private _classname = [player] call EFUNC(gear,getLoadoutName); -if !(isClass (missionConfigFile >> "CfgLoadouts" >> _classname)) exitWith { - SHOW_CHAT_WARNING_1("ArsenalWhitelist", "Loadout '%1' does not exist inside of mission config. No whitelist will be created.", _classname); - []; -}; - -private _loadout = parseSimpleArray getText (missionConfigFile >> "CfgLoadouts" >> _classname >> "loadout"); -private _unitItems = str _loadout splitString "[]," joinString ","; -_unitItems = parseSimpleArray ("[" + _unitItems + "]"); -_unitItems = _unitItems arrayIntersect _unitItems select {_x isEqualType "" && {_x != ""}}; - - -private _commonGear = GET_CONTAINER_KEYS("arsenal_common"); - - -private _organization = call EFUNC(Player,getOrganization); -private _orgItems = switch (_organization#1) do { - case "alpha": { - GET_CONTAINER_KEYS("alpha_company"); - }; - case "bravo": { - // Bravo has two platoons that have different requirements - private _companyItems = GET_CONTAINER_KEYS("bravo_company"); - private _platoonItems = switch (_organization#0) do { - case 1: { - GET_CONTAINER_KEYS("bravo_company_atlas"); - }; - case 2: { - GET_CONTAINER_KEYS("bravo_company_viking"); - }; - default {[]}; - }; - _companyItems + _platoonItems; - }; - case "charlie": { - GET_CONTAINER_KEYS("charlie_company"); - }; - default {GET_CONTAINER_KEYS("arsenal_company_fallback");}; -}; - - -private _roleSpecific = switch ([player] call EFUNC(gear,getLoadoutRole)) do { - case "officer": {GET_CONTAINER_KEYS("arsenal_role_officer");}; - case "squadleader": {GET_CONTAINER_KEYS("arsenal_role_squadleader");}; - case "fireteamleader": {GET_CONTAINER_KEYS("arsenal_role_fireteamleader");}; - case "weapons": {GET_CONTAINER_KEYS("arsenal_role_weapons");}; - case "strykercrew": {GET_CONTAINER_KEYS("arsenal_role_strykercrew");}; - case "pilot"; - case "rotarypilot": {GET_CONTAINER_KEYS("arsenal_role_rotarypilot");}; - case "rotarycrew": {GET_CONTAINER_KEYS("arsenal_role_pilotcrew");}; - case "rotarycls": { - private _rotaryRole = GET_CONTAINER_KEYS("arsenal_role_pilotcrew"); - private _clsRole = GET_CONTAINER_KEYS("arsenal_role_cls"); - _rotaryRole + _clsRole; - }; - case "pilotfighter": {GET_CONTAINER_KEYS("arsenal_role_pilotfighter");}; - case "pilottransport": {GET_CONTAINER_KEYS("arsenal_role_pilottransport");}; - case "cls": {GET_CONTAINER_KEYS("arsenal_role_cls");}; - case "medic": {GET_CONTAINER_KEYS("arsenal_role_medic");}; - case "doctor": {GET_CONTAINER_KEYS("arsenal_role_doctor");}; - default {[]}; -}; - - -private _primaryWeapon = if (!isNil{_loadout#0#0}) then {_loadout#0#0} else {""}; -private _primarySpecific = switch (true) do { - case (_primaryWeapon isKindof ['rhs_weap_mk18_m320', configFile >> 'CfgWeapons'] - || _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 isKindof ['rhs_weap_m240_base', configFile >> 'CfgWeapons']): {GET_CONTAINER_KEYS("arsenal_weap_m240");}; - - 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 ['UK3CB_P320_BLK', configFile >> 'CfgWeapons'] - || _handgunWeapon isKindOf ['UK3CB_P320_DES', 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 + _orgItems + _roleSpecific + _primarySpecific + _handgunSpecific + _launcherSpecific; - -INFO_2("Arsenal", "Whitelist created for %1 [%2].",player,typeof player); - -_whitelist diff --git a/description.ext b/description.ext index 6de5b007c..870c5043b 100644 --- a/description.ext +++ b/description.ext @@ -71,5 +71,6 @@ class CfgFunctions { #include "cScripts\CfgFunctions.hpp" }; #include "cScripts\CfgLoadouts.hpp" +#include "cScripts\CfgEquipmentTags.hpp" /* OTHER */