diff --git a/cScripts/CfgFunctions.hpp b/cScripts/CfgFunctions.hpp index 3f4ad3f2a..5a4f4a1a1 100644 --- a/cScripts/CfgFunctions.hpp +++ b/cScripts/CfgFunctions.hpp @@ -219,8 +219,4 @@ class cScripts { file = "cScripts\functions\testing"; class testing_loadoutArrays {}; }; - class depricated { - file = "cScripts\functions\depricated"; - class addAceCategory {}; // depricated => createActionCategory - }; }; diff --git a/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp b/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp index 79207a4b0..3486e096b 100644 --- a/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Bravo_Viking.hpp @@ -52,7 +52,7 @@ class Cav_B_B_Scout_WSL_F_Local : Cav_B_Bravo_base_F { scope = 2; category[] += {"cScripts_Loadout_Cat_Bravo_Viking_Leadership"}; loadout = [["rhs_weap_m4a1_blockII","","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG",30],[],"rhsusf_acc_grip2"],[],["rhs_weap_M320","","","",["rhs_mag_m713_Red",1],[],""],["USP_G3C_KP_OR_MC",[["ACE_quikclot",16],["ACE_EarPlugs",1],["ACE_splint",2],["ACE_tourniquet",4],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_Flashlight_XL50",1],["ACE_artilleryTable",1],["ACRE_PRC343",1]]],["USP_CRYE_CPC_WEAPON_BELT_MC",[["ACRE_PRC152",1],["ACE_Chemlight_IR",2,1],["SmokeShellGreen",1,1],["HandGrenade",2,1],["SmokeShell",4,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG",5,30],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tracer_Red",2,30],["rhs_mag_m713_Red",2,1],[["ACE_MX2A","","","",[],[],""],1]]],["UK3CB_BAF_B_Bergen_MTP_SL_L_A",[["ACE_EntrenchingTool",1],["ACE_HuntIR_monitor",1],["B_IR_Grenade",4,1],["SmokeShellBlue",4,1],["SmokeShellRed",4,1],["SmokeShellYellow",4,1],["ACE_Chemlight_HiYellow",2,1],["ACE_Chemlight_HiRed",2,1],["ACE_Chemlight_HiBlue",2,1],["rhs_mag_m714_White",5,1],["rhs_mag_M664_red_cluster",4,1]]],"USP_OPS_FASTXP_TAN_MC_08","USP_MFRAME_SMG1_BLK2",["ACE_Vector","","","",[],[],""],["ItemMap","ItemcTab","","ItemCompass","ItemWatch","USP_PVS31"]]; - icon = "iconManLeader" + icon = "iconManLeader"; }; class Cav_B_B_Scout_TeamLeader_F : Cav_B_B_Scout_Base_F { diff --git a/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp b/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp index 0f483e4f8..ea89c5df7 100644 --- a/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp +++ b/cScripts/Loadouts/CfgLoadouts_Charlie_Weapon.hpp @@ -29,7 +29,7 @@ class Cav_B_C_Weapons_M240B_AssistantMachinegunner_F_Local : Cav_B_Charlie_Weapo class Cav_B_C_Weapons_MAAWS_MAAWSGunner_F : Cav_B_Charlie_Weapons_base_F { displayName = "MAAWS Gunner"; scope = 2; - loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",30],[],""],["rhs_weap_maaws","","","rhs_optic_maaws",[],[],""],[],["USP_G3C_RS2_KP_OR_MC",[["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",10],["ACE_EarPlugs",1]]],["USP_CRYE_CPC_FAST_BELT_MC",[["SmokeShell",4,1],["ACE_Chemlight_IR",2,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",9,30],["HandGrenade",2,1],["SmokeShellGreen",1,1]]],["USP_45L_RUCKSACK_MC",[["ACE_splint",2],["USP_PVS15",1],["rhs_mag_maaws_HE",1,1],["rhs_mag_maaws_HEAT",1,1]]],"USP_OPSCORE_FASTMTC_CGW","USP_MFRAME_TAN",[],["ItemMap","","ItemRadioAcreFlagged","ItemCompass","ACE_Altimeter",""]],[["ace_earplugs",true]]; + loadout = [["rhs_weap_m4a1_blockII_KAC","rhsusf_acc_SF3P556","rhsusf_acc_anpeq15","rhsusf_acc_ACOG_RMR",["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",30],[],""],["rhs_weap_maaws","","","rhs_optic_maaws",[],[],""],[],["USP_G3C_RS2_KP_OR_MC",[["ACE_quikclot",10],["ACE_tourniquet",4],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_microDAGR",1],["ACE_packingBandage",10],["ACE_EarPlugs",1]]],["USP_CRYE_CPC_FAST_BELT_MC",[["SmokeShell",4,1],["ACE_Chemlight_IR",2,1],["rhs_mag_30Rnd_556x45_M855A1_PMAG_Tan_Tracer_Red",9,30],["HandGrenade",2,1],["SmokeShellGreen",1,1]]],["USP_45L_RUCKSACK_MC",[["ACE_splint",2],["USP_PVS15",1],["rhs_mag_maaws_HE",1,1],["rhs_mag_maaws_HEAT",1,1]]],"USP_OPSCORE_FASTMTC_CGW","USP_MFRAME_TAN",[],["ItemMap","","ItemRadioAcreFlagged","ItemCompass","ACE_Altimeter",""]]; icon = "iconManAT"; }; class Cav_B_C_Weapons_MAAWS_MAAWSAssistant_F : Cav_B_Charlie_Weapons_base_F { diff --git a/cScripts/functions/depricated/fn_addAceCategory.sqf b/cScripts/functions/depricated/fn_addAceCategory.sqf deleted file mode 100644 index 413141e48..000000000 --- a/cScripts/functions/depricated/fn_addAceCategory.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "..\script_component.hpp"; -/* - * Author: CPL.Brostrom.A - * This script auto generates the selections. - * - * Arguments: - * 0: Object - * 1: actionName - * 2: Lable - * 3: Path to icon - * 4: Categorys (Optional) - * 5: Condition (Optional) - * - * Example: - * [this,"MyCategory","Insignia","icon.paa",["ACE_MainActions"]] call cScripts_fnc_addAceCategory; - * [this,"MySecondCategory","Misc","data/icon.paa",["ACE_MainActions","MyCategory"]] call cScripts_fnc_addAceCategory; - */ - -params [ - ["_object", objNull, [objNull]], - ["_name", "", [""]], - ["_lable", "", [""]], - ["_icon", "", [""]], - ["_category", ["ACE_MainActions"], [[]]], - ["_condition", true] -]; - -[format["Function 'addAceCategory' on %1 is depricated (addAceCategory => createActionCategory)...", _object], true, "DEPRICATED"] call FUNC(warning); -[_object, _name, _lable, _icon, _category, {_condition}] call FUNC(createActionCategory); \ No newline at end of file diff --git a/cScripts/functions/documents/fn_Doc_Info.sqf b/cScripts/functions/documents/fn_Doc_Info.sqf index c5beb4145..4a5d55fa4 100644 --- a/cScripts/functions/documents/fn_Doc_Info.sqf +++ b/cScripts/functions/documents/fn_Doc_Info.sqf @@ -19,12 +19,15 @@ if (_group == "") then { _playerGroup = "in your squad" } else { _playerGroup = private _worldName = getText (configFile >> "CfgWorlds" >> worldName >> "description"); private _serverName = if (serverName != "") then {serverName} else {"localhost"}; -private _radioChannel = [_group, "ACRE_PRC343"] call FUNC(getRadioChannel); -_radioChannel = [_radioChannel] call FUNC(getChannelName); -if !(_radioChannel == "ERROR" ) then { - _radioChannel = formatText["Your squad radio is %1.

", _radioChannel]; -} else { - _radioChannel = ""; +private _radioChannel = ""; +if (EGVAR(patches,usesACRE) && EGVAR(Settings,enableACRE)) then { + _radioChannel = [_group, "ACRE_PRC343"] call FUNC(getRadioChannel); + _radioChannel = [_radioChannel] call FUNC(getChannelName); + if !(_radioChannel == "ERROR" ) then { + _radioChannel = formatText["Your squad radio is %1.

", _radioChannel]; + } else { + _radioChannel = ""; + }; }; private _abilityMedic = ""; diff --git a/cScripts/functions/gear/fn_gear_applyLoadout.sqf b/cScripts/functions/gear/fn_gear_applyLoadout.sqf index 57606c7b5..059594d74 100644 --- a/cScripts/functions/gear/fn_gear_applyLoadout.sqf +++ b/cScripts/functions/gear/fn_gear_applyLoadout.sqf @@ -52,7 +52,6 @@ if (_loadConfig) then { // Set loadout switch (true) do { case _loadArray: { - if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout }; [_unit, _loadout] call CBA_fnc_setLoadout; #ifdef DEBUG_MODE [format["Loadout array applied to %1", _unit], "Gear"] call FUNC(info); diff --git a/cScripts/functions/gear/fn_gear_saveLoadout.sqf b/cScripts/functions/gear/fn_gear_saveLoadout.sqf index 611a9f294..55aceedbb 100644 --- a/cScripts/functions/gear/fn_gear_saveLoadout.sqf +++ b/cScripts/functions/gear/fn_gear_saveLoadout.sqf @@ -16,8 +16,9 @@ params [["_unit", objNull, [objNull]]]; -private _loadout = [_unit] call CBA_fnc_getLoadout; -if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout }; +private _loadout = getUnitLoadout _unit; +if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout; }; +_loadout = [_unit] call CBA_fnc_getLoadout; _unit setVariable [QEGVAR(gear,Loadout), _loadout]; _unit setVariable [QEGVAR(gear,savedLoadout), true]; diff --git a/cScripts/functions/gear/fn_gear_setupRadios.sqf b/cScripts/functions/gear/fn_gear_setupRadios.sqf index d7f2b1bf4..1ecdf39dc 100644 --- a/cScripts/functions/gear/fn_gear_setupRadios.sqf +++ b/cScripts/functions/gear/fn_gear_setupRadios.sqf @@ -20,6 +20,8 @@ if !(EGVAR(Settings,enableACRE)) exitWith {["ACRE Radio init have been disabled. if (count allMissionObjects "acre_api_basicMissionSetup" > 0) exitWith {}; if (count allMissionObjects "acre_api_nameChannels" > 0) exitWith {}; +["Setting up ACRE preset...", "Gear Radio"] call FUNC(info); + // Handle Radio preset from cba settings private _lrChannels = parseSimpleArray EGVAR(Settings,setRadioChannelNames); if !(_lrChannels isEqualType []) exitWith {["Radio array have not been setup correctly.", "Gear Radio"] call FUNC(error);}; diff --git a/cScripts/functions/helpers/fn_exportLoadoutToArsenal.sqf b/cScripts/functions/helpers/fn_exportLoadoutToArsenal.sqf index 429f36bad..53d2a4310 100644 --- a/cScripts/functions/helpers/fn_exportLoadoutToArsenal.sqf +++ b/cScripts/functions/helpers/fn_exportLoadoutToArsenal.sqf @@ -28,7 +28,7 @@ private _loadoutList = "getText (_x >> 'displayName') != ''" configClasses (miss private _unitName = getText (missionConfigFile >> "CfgLoadouts" >> _loadout >> "displayName"); [player, _loadout] call Poppy_fnc_applyLoadout; - private _loadoutArray = [_unit] call CBA_fnc_getLoadout; + private _loadoutArray = getUnitLoadout player; private _br = toString[13,10]; _string = formatText["[""[7CAV] %1 - %2"", %3] call ace_arsenal_fnc_addDefaultLoadout; //%4%5", _unitCompany, _unitName, _loadoutArray, _loadout, _br]; diff --git a/cScripts/functions/testing/fn_testing_loadoutArrays.sqf b/cScripts/functions/testing/fn_testing_loadoutArrays.sqf index 352ea3d26..a7b6db8f9 100644 --- a/cScripts/functions/testing/fn_testing_loadoutArrays.sqf +++ b/cScripts/functions/testing/fn_testing_loadoutArrays.sqf @@ -13,30 +13,45 @@ * */ +diag_log text ""; +diag_log text "###############################################################################################################"; +diag_log text ""; +["STARTING UNIT TEST FOR LOADOUT ARRAYS", "INFO", true, false, "TESTING"] call FUNC(log); ["There should be no script errors when this function runs.", "INFO", true, false, "TESTING"] call FUNC(log); +diag_log text ""; +diag_log text "###############################################################################################################"; +diag_log text ""; + private _classnameList = configProperties [missionconfigfile >> "CfgLoadouts", "getNumber (_x >> 'scope') >= 2", true]; { private _class = configName _x; - [format["Testing loadout %1", _class], "TEST START", true, false, "TESTING"] call FUNC(log); + [format["Testing loadout %1", _class], "TEST START", false, false, "TESTING"] call FUNC(log); // Obtain loadout + ["Obtaining loadout array if there are a error in between here something is wrong...", "TEST", false, false, "TESTING"] call FUNC(log); ["... Loadout array parse ...", "TEST", false, false, "TESTING"] call FUNC(log); private _loadout = getText (missionConfigFile >> 'CfgLoadouts' >> _class >> "loadout"); _loadout = parseSimpleArray _loadout; ["... Loadout array parse ...", "TEST", false, false, "TESTING"] call FUNC(log); // Testing array size - ["Testing array size it should be 1", "TEST", true, false, "TESTING"] call FUNC(log); + ["Testing array size it should be 1", "TEST", false, false, "TESTING"] call FUNC(log); private _arraySize = count [_loadout]; if (_arraySize == 1) then { - [format["SUCCESS: Array size of loadout %1 size is %1", _classnameList, _arraySize], "SUCCESS", true, false, "TESTING"] call FUNC(log); + [format["SUCCESS: Array size of loadout %1 size is %2", _class, _arraySize], "SUCCESS", false, false, "TESTING"] call FUNC(log); } else { - [format["FAILED: Array size of loadout %1 size is %1", _classnameList, _arraySize], "FAILED", true, false, "TESTING"] call FUNC(log); + [format["FAILED: Array size of loadout %1 size is %2", _class, _arraySize], "FAILED", true, false, "TESTING"] call FUNC(log); }; - [format["Testing loadout %1", _class], "TEST END", true, false, "TESTING"] call FUNC(log); + [format["Testing loadout %1", _class], "TEST END", false, false, "TESTING"] call FUNC(log); + diag_log text ""; } forEach _classnameList; +["TEST COMPLETED", "INFO", true, false, "TESTING"] call FUNC(log); +diag_log text ""; +diag_log text "###############################################################################################################"; +diag_log text ""; + true \ No newline at end of file diff --git a/init.sqf b/init.sqf index deb18129b..9ce78ba44 100644 --- a/init.sqf +++ b/init.sqf @@ -17,7 +17,6 @@ if (!isMultiplayer) then {["Mission is running on singelplayer enviroment!", "", // ACRE radio init if (isMultiplayer) then { GVAR(Radio) = false; - ["Setting up ACRE preset...", "init"] call FUNC(info); call EFUNC(gear,setupRadios); GVAR(Radio) = true; } else {