diff --git a/cScripts/functions/init/fn_init_staging.sqf b/cScripts/functions/init/fn_init_staging.sqf index aeca02234..7daf5d949 100644 --- a/cScripts/functions/init/fn_init_staging.sqf +++ b/cScripts/functions/init/fn_init_staging.sqf @@ -80,7 +80,7 @@ player addEventHandler ["InventoryClosed", { [player, _category] call FUNC(addReGear); if !(GVAR(OneLife)) then {[player, _category] call FUNC(addHeal)}; [player, _category] call FUNC(addInsigniaSelectionList); -[player, true, "ACE_SelfActions"] call FUNC(setupLoadoutSelection); +[player, "ACE_SelfActions", false] call FUNC(setupLoadoutSelection); [_category] call FUNC(addArsenal); INFO_1("Staging", "Staging options for %1 have been setup.", name player) diff --git a/cScripts/functions/mission/fn_addBaseCrate.sqf b/cScripts/functions/mission/fn_addBaseCrate.sqf index 71fad92a8..db39dd829 100644 --- a/cScripts/functions/mission/fn_addBaseCrate.sqf +++ b/cScripts/functions/mission/fn_addBaseCrate.sqf @@ -26,6 +26,6 @@ params [ if (_object isKindOf "Man") exitWith {false}; -[_object, _type, true, true, true, true, false, true] call FUNC(doStarterCrate); +[_object, _type, true, true, true, false, false, true] call FUNC(doStarterCrate); true \ No newline at end of file diff --git a/cScripts/functions/mission/fn_doStarterCrate.sqf b/cScripts/functions/mission/fn_doStarterCrate.sqf index e3eaca384..e5372d818 100644 --- a/cScripts/functions/mission/fn_doStarterCrate.sqf +++ b/cScripts/functions/mission/fn_doStarterCrate.sqf @@ -10,7 +10,7 @@ * 2: ReGear action (Default: true) * 3: Heal action (Default: true) * 4: Insignia Selection (Default: true) - * 5: Company variable (Default: true) + * 5: Show all Loadouts (Default: false) * 6: Arsenal (Default: false) * 7: Staging (Default: true) * @@ -20,8 +20,8 @@ * Example: * [this] call cScripts_fnc_doStarterCrate; * [this,"none",true] call cScripts_fnc_doStarterCrate; - * [this,"none",true,true,true,true,false] call cScripts_fnc_doStarterCrate; - * [this,"none",true,true,true,true,false,true] call cScripts_fnc_doStarterCrate; + * [this,"none",true,true,true,false,false] call cScripts_fnc_doStarterCrate; + * [this,"none",true,true,true,false,false,true] call cScripts_fnc_doStarterCrate; * */ @@ -31,7 +31,7 @@ params [ ["_reGearOption", true, [true]], ["_reHealOption", true, [true]], ["_InsigniaSelectOption", true, [true]], - ["_allowOnlyForCompany", true, [true]], + ["_allowAllLoadouts", false, [false]], ["_arsenal", false, [false]], // not used ["_hasStagingZone", true, [true]] ]; @@ -71,7 +71,7 @@ if (_reHealOption) then { }; // Call Quick Selection -[_object, _allowOnlyForCompany] call FUNC(setupLoadoutSelection); +[_object, "ACE_MainActions", _allowAllLoadouts] call FUNC(setupLoadoutSelection); // Call Insignia Selection if (_InsigniaSelectOption) then { diff --git a/cScripts/functions/modules/fn_zenModule_createStarterCrate.sqf b/cScripts/functions/modules/fn_zenModule_createStarterCrate.sqf index 6ef88af37..8daeb84ca 100644 --- a/cScripts/functions/modules/fn_zenModule_createStarterCrate.sqf +++ b/cScripts/functions/modules/fn_zenModule_createStarterCrate.sqf @@ -19,9 +19,7 @@ params ["_modulePos", "_objectPos"]; [ "7th Cavalry Starter Crate", [ - ["CHECKBOX", ["Regear action", "Allow you to regear on the crate."], true, false], ["CHECKBOX", ["Heal action", "Enables the crate to heal your wonds on regear as well as a separat action."], true, false], - ["CHECKBOX", ["Insignia Selection", "Allow the selection of our insignias"], true, false], ["LIST", ["Company, squad or group", "Select the company, group or squad the crate should populate loadouts with."], [ [ @@ -67,22 +65,18 @@ params ["_modulePos", "_objectPos"]; 1, 12 ], false], - ["CHECKBOX", ["Show all loadouts", "Allow all loadouts to be shown."], false, false], - ["CHECKBOX", ["Arsenal", "Enable the 7Cav Arsenal. It is limited to only cav equipment used."], false, false] + ["CHECKBOX", ["Allow all loadouts", "Show and allow all loadouts to be accessable."], false, false] ], { params ["_arg", "_pos"]; _arg params [ - "_reGearOption", "_reHealOption", - "_InsigniaSelectOption", "_quickSelectScale", - "_showAllLoadouts", - "_arsenal" + "_allowAllLoadouts" ]; _pos params ["_modulePos"]; private _crate = "B_supplyCrate_F" createVehicle _modulePos; - [_crate, _quickSelectScale, _reGearOption, _reHealOption, _InsigniaSelectOption, _showAllLoadouts, _arsenal] remoteExec [QFUNC(doStarterCrate), 0, true]; + [_crate, _quickSelectScale, true, _reHealOption, true, _allowAllLoadouts] remoteExec [QFUNC(doStarterCrate), 0, true]; // Add object to Zeus [{ diff --git a/cScripts/functions/systems/fn_addLoadoutSelection.sqf b/cScripts/functions/systems/fn_addLoadoutSelection.sqf index c0b176829..53a883f9a 100644 --- a/cScripts/functions/systems/fn_addLoadoutSelection.sqf +++ b/cScripts/functions/systems/fn_addLoadoutSelection.sqf @@ -27,15 +27,16 @@ params [ ["_icon", "", [""]], ["_category", ["ACE_MainActions", "cScripts_Loadout_Cat_Main"], [[]]], ["_company", "", [""]], - ["_showAllLoadouts", false] + ["_allowAllLoadouts", false] ]; private _condition = { params ["", "", "_params"]; - _params params ["", "_company", "_showAllLoadouts"]; - if (_showAllLoadouts) exitWith {true}; + _params params ["_className", "_company", "_allowAllLoadouts"]; + if (_allowAllLoadouts) exitWith {true}; + if ([player] call EFUNC(gear,getLoadoutName) == _className) exitWith {true}; if ([_company] call FUNC(allowLoadout)) exitWith {true}; - false; + false }; private _action = [format ["cScripts_Loadout_%1", _className], _lable, _icon, { @@ -43,7 +44,7 @@ private _action = [format ["cScripts_Loadout_%1", _className], _lable, _icon, { _params params ["_className"]; [player] call EFUNC(gear,removeLoadout); [player, _className] call EFUNC(gear,applyLoadout); -}, _condition, {}, [_className, _company, _showAllLoadouts]] call ace_interact_menu_fnc_createAction; +}, _condition, {}, [_className, _company, _allowAllLoadouts]] call ace_interact_menu_fnc_createAction; private _actionType = if (isPlayer _object) then {1} else {0}; [_object, _actionType, _category, _action] call ace_interact_menu_fnc_addActionToObject; diff --git a/cScripts/functions/systems/fn_allowLoadout.sqf b/cScripts/functions/systems/fn_allowLoadout.sqf index b75f3445f..b2f78c0e2 100644 --- a/cScripts/functions/systems/fn_allowLoadout.sqf +++ b/cScripts/functions/systems/fn_allowLoadout.sqf @@ -37,4 +37,4 @@ if (_playerCompany == "") exitWith {false}; if (_playerCompany == _company) exitWith {true}; -true \ No newline at end of file +false \ No newline at end of file diff --git a/cScripts/functions/systems/fn_setupLoadoutCategories.sqf b/cScripts/functions/systems/fn_setupLoadoutCategories.sqf index ba2d4b447..5e976019c 100644 --- a/cScripts/functions/systems/fn_setupLoadoutCategories.sqf +++ b/cScripts/functions/systems/fn_setupLoadoutCategories.sqf @@ -11,13 +11,13 @@ * Main category used for creation * * Example: - * [this, "ACE_MainActions"] call cScripts_fnc_setupLoadoutSelection; - * [this, "ACE_SelfActions"] call cScripts_fnc_setupLoadoutSelection; + * [this, "ACE_MainActions"] call cScripts_fnc_setupLoadoutCategories; + * [this, "ACE_SelfActions"] call cScripts_fnc_setupLoadoutCategories; * * Public: No */ -params[ + params[ ["_object", objNull, [objNull]], ["_aceCategory", "ACE_MainActions", ["ACE_MainActions"]] ]; diff --git a/cScripts/functions/systems/fn_setupLoadoutSelection.sqf b/cScripts/functions/systems/fn_setupLoadoutSelection.sqf index ac5c8f680..7b390933f 100644 --- a/cScripts/functions/systems/fn_setupLoadoutSelection.sqf +++ b/cScripts/functions/systems/fn_setupLoadoutSelection.sqf @@ -12,16 +12,16 @@ * Nothing * * Example: - * [this, "Charlie", true, "ACE_MainActions"] call cScripts_fnc_setupLoadoutSelection; - * [this, "Charlie", true, "ACE_SelfActions"] call cScripts_fnc_setupLoadoutSelection; + * [this, "Charlie", "ACE_MainActions", true] call cScripts_fnc_setupLoadoutSelection; + * [this, "Charlie", "ACE_SelfActions", true] call cScripts_fnc_setupLoadoutSelection; * * Public: No */ params[ ["_object", objNull, [objNull]], - ["_allowOnlyForCompany", true, [true]], - ["_aceCategory", "ACE_MainActions", ["ACE_MainActions"]] + ["_aceCategory", "ACE_MainActions", ["ACE_MainActions"]], + ["_allowAllLoadouts", true, [true]] ]; @@ -44,7 +44,7 @@ private _classnameList = configProperties [missionconfigfile >> "CfgLoadouts", " INFO_2("LoadoutSelector", "Setting up %1 loadout on %2.", _displayName, _object); _category = [_aceCategory, _mainCategory] + _category; - [_object, _displayName, _classname, _icon, _category, _company, _allowOnlyForCompany] call FUNC(addLoadoutSelection); + [_object, _displayName, _classname, _icon, _category, _company, _allowAllLoadouts] call FUNC(addLoadoutSelection); } forEach _classnameList; INFO_1("LoadoutSelector", "Done setting up quick selections on %1.", _object); \ No newline at end of file