diff --git a/addons/backpacks/XEH_postInit.sqf b/addons/backpacks/XEH_postInit.sqf index 375fcd5f89..639bf74919 100644 --- a/addons/backpacks/XEH_postInit.sqf +++ b/addons/backpacks/XEH_postInit.sqf @@ -1,3 +1,3 @@ #include "script_component.hpp" -["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler); +["backpackOpened", DFUNC(backpackOpened)] call EFUNC(common,addEventHandler); diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 3f5cf53994..9488bf6bd9 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -2,18 +2,18 @@ * Author: commy2 * * Someone opened your backpack. Execute locally. - * + * * Argument: * 0: Who accessed your inventory? (Object) * 1: Unit that wields the backpack (Object) * 2: The backpack object (Object) - * + * * Return value: * None. */ #include "script_component.hpp" - -PARAMS_3(_unit,_target,_backpack); +private ["_sounds", "_position"]; +params ["_target", "_backpack"]; // do cam shake if the target is the player if ([_target] call EFUNC(common,isPlayer)) then { @@ -21,7 +21,6 @@ if ([_target] call EFUNC(common,isPlayer)) then { }; // play a rustling sound -private ["_sounds", "_position"]; _sounds = [ /*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss", diff --git a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf b/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf index 562dc84da2..85f5966aa9 100644 --- a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf +++ b/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf @@ -2,21 +2,21 @@ * Author: commy2 * * Returns the unit that has the given backpack object equipped. - * + * * Argument: - * 0: A backpack object (Object) - * + * 0: Executing Unit (Object) + * 1: A backpack object (Object) + * * Return value: * Unit that has the backpack equipped. (Object) */ #include "script_component.hpp" +scopeName "main"; -private ["_backpack", "_unit"]; - -_backpack = _this select 0; - -_unit = objNull; +params ["_unit","_backpack"]; +_target = objNull; { - if (backpackContainer _x == _backpack) exitWith {_unit = _x}; -} forEach (allUnits + allDeadMen); -_unit + if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"}; +} count nearestObjects [_unit, ["Man"], 5]; +if (isNull _target) exitWith {ACE_Player}; +_target diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf index b1d55f9ce6..3419d2ed38 100644 --- a/addons/backpacks/functions/fnc_isBackpack.sqf +++ b/addons/backpacks/functions/fnc_isBackpack.sqf @@ -11,9 +11,8 @@ */ #include "script_component.hpp" -private ["_backpack", "_config"]; - -_backpack = _this select 0; +private ["_config"]; +params ["_backpack"]; if (typeName _backpack == "OBJECT") then { _backpack = typeOf _backpack; diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf index 63e4aa87a3..d79f8aed9b 100644 --- a/addons/backpacks/functions/fnc_onOpenInventory.sqf +++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf @@ -2,29 +2,27 @@ * Author: commy2 * * Handle the open inventory event. Display message on traget client. - * + * * Argument: * Input from "InventoryOpened" eventhandler - * + * * Return value: * false. Always open the inventory dialog. (Bool) */ #include "script_component.hpp" -private ["_unit", "_backpack"]; - -_unit = _this select 0; -_backpack = _this select 1; +private "_target"; +params ["","_backpack"]; // exit if the target is not a backpack if !([_backpack] call FUNC(isBackpack)) exitWith {}; // get the unit that wears the backpack object -private "_target"; -_target = [_backpack] call FUNC(getBackpackAssignedUnit); +_target = _this call FUNC(getBackpackAssignedUnit); +if (isNull _target) exitWith {false}; // raise event on target unit -["backpackOpened", _target, [_unit, _target, _backpack]] call EFUNC(common,targetEvent); +["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent); // return false to open inventory as usual false diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 187fe1a746..774ecf87e3 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -190,8 +190,8 @@ class CfgVehicles { defaultValue = 1; }; class requireSurrender { - displayName = CSTRING(ModuleSettings_allowSurrender_name); - description = CSTRING(ModuleSettings_allowSurrender_description); + displayName = CSTRING(ModuleSettings_requireSurrender_name); + description = CSTRING(ModuleSettings_requireSurrender_description); typeName = "NUMBER"; class values { class disable { diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 3f2677da76..0e028ac1ec 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -27,7 +27,7 @@ if (isNull _target) then { }; if (isNull _vehicle) then { - _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10]; + _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship"], 10]; if ((count _objects) > 0) then {_vehicle = _objects select 0;}; }; diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index 69b7276142..d7df42eb0a 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -29,7 +29,7 @@ if (isNull _target) then { if (isNull _target) exitWith {}; if (isNull _vehicle) then { - _objects = nearestObjects [_unit, ["Car_F", "Tank_F", "Helicopter_F", "Boat_F", "Plane_F"], 10]; + _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship"], 10]; if ((count _objects) > 0) then {_vehicle = _objects select 0;}; }; if (isNull _vehicle) exitWith {}; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index ee34f1308d..bf699ab83c 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -75,16 +75,6 @@ if (isServer) then { ["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler); }; -// hack to get PFH to work in briefing -[QGVAR(onBriefingPFH), "onEachFrame", { - if (ACE_time > 0) exitWith { - [QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler; - }; - - call cba_common_fnc_onFrame; -}] call BIS_fnc_addStackedEventHandler; -///// - QGVAR(remoteFnc) addPublicVariableEventHandler { (_this select 1) call FUNC(execRemoteFnc); }; diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index ac6d8fb270..5665ee632c 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -27,6 +27,8 @@ _whitelist = [_whitelist, {toLower _this}] call FUNC(map); ACE_Version_CheckAll = _checkAll; ACE_Version_Whitelist = _whitelist; +if (!_checkAll) exitWith {}; //ACE is checked by FUNC(checkFiles) + if (!isServer) then { [_mode, _checkAll, _whitelist] spawn { private ["_missingAddon", "_missingAddonServer", "_oldVersionClient", "_oldVersionServer", "_text", "_error", "_rscLayer", "_ctrlHint"]; diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 280a1e9907..0e92833e88 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -20,6 +20,7 @@ _parseConfigForDisplayNames = { if !(isClass _optionEntry) exitwith {false}; _x set [3, getText (_optionEntry >> "displayName")]; _x set [4, getText (_optionEntry >> "description")]; + _x set [8, getText (_optionEntry >> "category")]; private "_values"; _values = _x select 5; diff --git a/addons/disarming/XEH_postInit.sqf b/addons/disarming/XEH_postInit.sqf index 7315ef1785..ef17e6e96a 100644 --- a/addons/disarming/XEH_postInit.sqf +++ b/addons/disarming/XEH_postInit.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" -["DisarmDropItems", {_this call FUNC(eventTargetStart)}] call EFUNC(common,addEventHandler); -["DisarmDebugCallback", {_this call FUNC(eventCallerFinish)}] call EFUNC(common,addEventHandler); +["DisarmDropItems", FUNC(eventTargetStart)] call EFUNC(common,addEventHandler); +["DisarmDebugCallback", FUNC(eventCallerFinish)] call EFUNC(common,addEventHandler); diff --git a/addons/disarming/functions/fnc_canBeDisarmed.sqf b/addons/disarming/functions/fnc_canBeDisarmed.sqf index 25ec884919..9be20db7f4 100644 --- a/addons/disarming/functions/fnc_canBeDisarmed.sqf +++ b/addons/disarming/functions/fnc_canBeDisarmed.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Checks the conditions for being able to disarm a unit * * Arguments: @@ -15,17 +16,17 @@ */ #include "script_component.hpp" -PARAMS_1(_target); - private ["_animationStateCfgMoves", "_putDownAnim"]; +params ["_target"]; + //Check animationState for putDown anim //This ensures the unit doesn't have to actualy do any animation to drop something //This should always be true for the 3 possible status effects that allow disarming _animationStateCfgMoves = getText (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _target) >> "actions"); -if (_animationStateCfgMoves == "") exitWith {false}; +if (_animationStateCfgMoves == "") exitWith { false }; _putDownAnim = getText (configFile >> "CfgMovesBasic" >> "Actions" >> _animationStateCfgMoves >> "PutDown"); -if (_putDownAnim != "") exitWith {false}; +if (_putDownAnim != "") exitWith { false }; (alive _target) && diff --git a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf index ec9e975ec2..34f1a10d32 100644 --- a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf +++ b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Checks the conditions for being able to disarm a unit * * Arguments: @@ -16,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_2(_player,_target); +params ["_player", "_target"]; -([_target] call FUNC(canBeDisarmed)) && +([_target] call FUNC(canBeDisarmed)) && {([_player, _target, []] call EFUNC(common,canInteractWith))} diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 5422fd00a6..91eff1c99d 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Makes a unit drop items * * Arguments: @@ -22,13 +23,11 @@ private ["_fncSumArray", "_return", "_holder", "_dropPos", "_targetMagazinesStart", "_holderMagazinesStart", "_xClassname", "_xAmmo", "_targetMagazinesEnd", "_holderMagazinesEnd", "_holderItemsStart", "_targetItemsStart", "_addToCrateClassnames", "_addToCrateCount", "_index", "_holderItemsEnd", "_targetItemsEnd", "_holderIsEmpty"]; - -PARAMS_3(_caller,_target,_listOfItemsToRemove); -DEFAULT_PARAM(3,_doNotDropAmmo,false); //By default units drop all weapon mags when dropping a weapon +params ["_caller", "_target", "_listOfItemsToRemove", ["_doNotDropAmmo", false, [false]]]; //By default units drop all weapon mags when dropping a weapon _fncSumArray = { _return = 0; - {_return = _return + _x;} forEach (_this select 0); + {_return = _return + _x;} count (_this select 0); _return }; @@ -48,7 +47,7 @@ if (!_doNotDropAmmo) then { if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); }; //Create a new weapon holder diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf index d95be98d5f..bc48a26b70 100644 --- a/addons/disarming/functions/fnc_eventCallerFinish.sqf +++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Recieves a possible error code from FUNC(eventTargetFinish) * * Arguments: @@ -17,7 +18,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_errorMsg); +params ["_caller", "_target", "_errorMsg"]; if (_caller != ACE_player) exitWith {}; diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index d702a554a5..b9fb461356 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * After FUNC(disarmDropItems) has completed, passing a possible error code. * Passes that error back to orginal caller. * @@ -18,7 +19,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_errorMsg); +params ["_caller", "_target", "_errorMsg"]; if (_errorMsg != "") then { diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this]; diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index 316ec2b656..29c370f2b5 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Disarm Event Handler, Starting func, called on the target. * If target has to remove uniform/vest, this will add all uniform/vest items to the drop list. * @@ -18,7 +19,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_listOfObjectsToRemove); +params ["_caller", "_target", "_listOfObjectsToRemove"]; private "_itemsToAdd"; diff --git a/addons/disarming/functions/fnc_getAllGearContainer.sqf b/addons/disarming/functions/fnc_getAllGearContainer.sqf index c5b2c445ab..0394761197 100644 --- a/addons/disarming/functions/fnc_getAllGearContainer.sqf +++ b/addons/disarming/functions/fnc_getAllGearContainer.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Helper function to get all gear of a container * * Arguments: @@ -15,15 +16,16 @@ */ #include "script_component.hpp" -PARAMS_1(_target); +params ["_target"]; -private ["_allGear"]; - -_allGear = [[],[]]; +private ["_items", "_counts"]; +_items = []; +_counts = []; { - (_allGear select 0) append (_x select 0); - (_allGear select 1) append (_x select 1); + _x params ["_item", "_count"]; + _items append _item; + _counts append _count; } forEach [(getWeaponCargo _target), (getItemCargo _target), (getMagazineCargo _target), (getBackpackCargo _target)]; -_allGear +[_items,_counts] // Return diff --git a/addons/disarming/functions/fnc_getAllGearUnit.sqf b/addons/disarming/functions/fnc_getAllGearUnit.sqf index 99d4b2d7f2..bdd1ff0bf9 100644 --- a/addons/disarming/functions/fnc_getAllGearUnit.sqf +++ b/addons/disarming/functions/fnc_getAllGearUnit.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Helper function to get all gear of a unit. * * Arguments: @@ -15,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_1(_target); +params ["_target"]; private ["_allItems", "_classnamesCount", "_index", "_uniqueClassnames"]; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 88e0e81be8..c2a3a6396e 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Opens the disarm dialog (allowing a person to remove items) * * Arguments: @@ -15,21 +16,9 @@ * Public: No */ #include "script_component.hpp" - -#define TEXTURES_RANKS [ \ - "", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \ - ] - -PARAMS_2(_caller,_target); +params ["_caller", "_target"]; private "_display"; - +#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa" //Sanity Checks if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");}; if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");}; @@ -47,8 +36,8 @@ GVAR(disarmTarget) = _target; //Setup Drop Event (on right pannel) (_display displayCtrl 632) ctrlAddEventHandler ["LBDrop", { if (isNull GVAR(disarmTarget)) exitWith {}; - PARAMS_5(_ctrl,_xPos,_yPos,_idc,_itemInfo); - EXPLODE_3_PVT((_itemInfo select 0),_displayText,_value,_data); + params ["_ctrl", "_xPos", "_yPos", "_idc", "_itemInfo"]; + (_itemInfo select 0) params ["_displayText", "_value", "_data"]; if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");}; @@ -60,18 +49,18 @@ GVAR(disarmTarget) = _target; //Setup PFEH [{ - private ["_groundContainer", "_targetContainer", "_playerName", "_rankPicture", "_rankIndex", "_targetUniqueItems", "_holderUniqueItems", "_holder"]; + private ["_groundContainer", "_targetContainer", "_playerName", "_icon", "_rankPicture", "_targetUniqueItems", "_holderUniqueItems", "_holder"]; disableSerialization; - EXPLODE_2_PVT(_this,_args,_pfID); - EXPLODE_3_PVT(_args,_player,_target,_display); + params ["_args", "_idPFH"]; + _args params ["_player", "_target", "_display"]; if ((!([_player, _target] call FUNC(canPlayerDisarmUnit))) || {isNull _display} || {_player != ACE_player}) then { - [_pfID] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; GVAR(disarmTarget) = objNull; - if (!isNull _display) then {closeDialog 0;}; //close dialog if still open + if (!isNull _display) then { closeDialog 0; }; //close dialog if still open } else { _groundContainer = _display displayCtrl 632; @@ -80,8 +69,9 @@ GVAR(disarmTarget) = _target; _rankPicture = _display displayCtrl 1203; //Show rank and name (just like BIS's inventory) - _rankIndex = ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1); - _rankPicture ctrlSetText (TEXTURES_RANKS select _rankIndex); + _icon = format [DEFUALTPATH, toLower (rank _target)]; + if (_icon isEqualTo DEFUALTPATH) then {_icon = ""}; + _rankPicture ctrlSetText _icon; _playerName ctrlSetText ([GVAR(disarmTarget)] call EFUNC(common,getName)); //Clear both inventory lists: @@ -98,7 +88,7 @@ GVAR(disarmTarget) = _target; if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); //If a holder exists, show it's inventory if (!isNull _holder) then { diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index b36e53e820..f675012ee3 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Shows a list of inventory items in a listBox control. * * Arguments: @@ -17,11 +18,12 @@ #include "script_component.hpp" disableSerialization; -PARAMS_2(_listBoxCtrl,_itemsCountArray); - private ["_classname", "_count", "_displayName", "_picture"]; +params ["_listBoxCtrl", "_itemsCountArray"]; + { + private "_configPath"; _displayName = ""; _picture = ""; @@ -31,21 +33,25 @@ private ["_classname", "_count", "_displayName", "_picture"]; if ((_classname != DUMMY_ITEM) && {_classname != "ACE_FakePrimaryWeapon"}) then { //Don't show the dummy potato or fake weapon switch (true) do { - case (isClass (configFile >> "CfgWeapons" >> _classname)): { - _displayName = getText (configFile >> "CfgWeapons" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgWeapons" >> _classname >> "picture"); + case (isClass (configFile >> "CfgWeapons" >> _classname)): { + _configPath = (configFile >> "CfgWeapons"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgMagazines" >> _classname)): { - _displayName = getText (configFile >> "CfgMagazines" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgMagazines" >> _classname >> "picture"); + case (isClass (configFile >> "CfgMagazines" >> _classname)): { + _configPath = (configFile >> "CfgMagazines"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgVehicles" >> _classname)): { - _displayName = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgVehicles" >> _classname >> "picture"); + case (isClass (configFile >> "CfgVehicles" >> _classname)): { + _configPath = (configFile >> "CfgVehicles"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgGlasses" >> _classname)): { - _displayName = getText (configFile >> "CfgGlasses" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgGlasses" >> _classname >> "picture"); + case (isClass (configFile >> "CfgGlasses" >> _classname)): { + _configPath = (configFile >> "CfgGlasses"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; default { ERROR(format ["[%1] - bad classname", _classname]); diff --git a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf index e1753f390a..efe5aae72a 100644 --- a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf +++ b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Verifies magazines moved with exact ammo counts preserved. * Arrays will be in format from magazinesAmmo/magazinesAmmoCargo * e.g.: [["30Rnd_65x39_caseless_mag",15], ["30Rnd_65x39_caseless_mag",30]] diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp index e4e4abffd8..98fec255c2 100644 --- a/addons/disposable/CfgEventHandlers.hpp +++ b/addons/disposable/CfgEventHandlers.hpp @@ -22,7 +22,7 @@ class Extended_FiredBIS_EventHandlers { class Extended_InitPost_EventHandlers { class CAManBase { class ADDON { - init = QUOTE([ARR_2(_this select 0, secondaryWeapon (_this select 0))] call FUNC(takeLoadedATWeapon)); + init = QUOTE([_this select 0] call FUNC(takeLoadedATWeapon)); }; }; }; diff --git a/addons/disposable/CfgMagazines.hpp b/addons/disposable/CfgMagazines.hpp index 484fa36238..d26d5ecea2 100644 --- a/addons/disposable/CfgMagazines.hpp +++ b/addons/disposable/CfgMagazines.hpp @@ -1,6 +1,6 @@ class CfgMagazines { class NLAW_F; - class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine + class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine author = ECSTRING(common,ACETeam); scope = 1; scopeArsenal = 1; @@ -12,14 +12,4 @@ class CfgMagazines { class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy { count = 0; }; - class ACE_UsedTube_F: NLAW_F { - author = ECSTRING(common,ACETeam); - displayName = CSTRING(UsedTube); - descriptionShort = CSTRING(UsedTubeDescription); - displayNameShort = "-"; - count = 0; - weaponPoolAvailable = 0; - modelSpecial = ""; - mass = 0; - }; }; diff --git a/addons/disposable/XEH_postInit.sqf b/addons/disposable/XEH_postInit.sqf index 2f3b936692..800d749d06 100644 --- a/addons/disposable/XEH_postInit.sqf +++ b/addons/disposable/XEH_postInit.sqf @@ -3,9 +3,12 @@ if (!hasInterface) exitWith {}; -["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler); +["inventoryDisplayLoaded", { + [ACE_player, _this select 0] call FUNC(updateInventoryDisplay) +}] call EFUNC(common,addEventHandler); + ["playerInventoryChanged", { - params ["_unit", "_items"]; - [_unit, _items select 11] call FUNC(takeLoadedATWeapon); + params ["_unit"]; + [_unit] call FUNC(takeLoadedATWeapon); [_unit] call FUNC(updateInventoryDisplay); }] call EFUNC(common,addEventHandler); diff --git a/addons/disposable/XEH_postInitClient.sqf b/addons/disposable/XEH_postInitClient.sqf deleted file mode 100644 index c20dfa886b..0000000000 --- a/addons/disposable/XEH_postInitClient.sqf +++ /dev/null @@ -1,10 +0,0 @@ -// by commy2 - -// The Arma InventoryOpened EH fires actually before the inventory dialog is opened (findDisplay 602 => displayNull). - -#include "script_component.hpp" - -["inventoryDisplayLoaded",{ - [ACE_player] call FUNC(takeLoadedATWeapon); - [ACE_player, (_this select 0)] call FUNC(updateInventoryDisplay); -}] call EFUNC(common,addEventHandler); \ No newline at end of file diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index c3b506e0dc..ec56f42ff4 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -21,14 +21,14 @@ */ #include "script_component.hpp" -private ["_replacementTube", "_items"]; params ["_unit", "_weapon", "", "", "", "", "_projectile"]; +TRACE_3("params",_unit,_weapon,_projectile); -if (!local _unit) exitWith {}; +if ((!local _unit) || {_weapon != (secondaryWeapon _unit)}) exitWith {}; +private ["_replacementTube", "_items"]; _replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube"); if (_replacementTube == "") exitWith {}; //If no replacement defined just exit -if (_weapon != (secondaryWeapon _unit)) exitWith {}; //just to be sure //Save array of items attached to launcher diff --git a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf index d747b77cb1..b379584b68 100644 --- a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf +++ b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf @@ -15,17 +15,18 @@ */ #include "script_component.hpp" -private ["_unit", "_launcher", "_config"]; - params ["_unit"]; +TRACE_1("params",_unit); if (!local _unit) exitWith {}; +private ["_launcher", "_config"]; + _launcher = secondaryWeapon _unit; _config = configFile >> "CfgWeapons" >> _launcher; if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber (_config >> "ACE_isUsedLauncher") != 1} && {count secondaryWeaponMagazine _unit == 0}) then { - private ["_magazine", "_isLauncherSelected"]; + private ["_magazine", "_isLauncherSelected", "_didAdd"]; _magazine = getArray (_config >> "magazines") select 0; @@ -35,14 +36,22 @@ if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber if (backpack _unit == "") then { _unit addBackpack "Bag_Base"; - _unit addMagazine _magazine; + _didAdd = _magazine in (magazines _unit); _unit addWeapon _launcher; - + if (!_didAdd) then { + TRACE_1("Failed To Add Disposable Magazine Normally, doing backup method (no backpack)",_unit); + _unit addSecondaryWeaponItem _magazine; + }; removeBackpack _unit; } else { _unit addMagazine _magazine; + _didAdd = _magazine in (magazines _unit); _unit addWeapon _launcher; + if (!_didAdd) then { + TRACE_2("Failed To Add Disposable Magazine Normally, doing backup method",_unit,(backpack _unit)); + _unit addSecondaryWeaponItem _magazine; + }; }; if (_isLauncherSelected) then { diff --git a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf index 93b57308e8..7f50e45089 100644 --- a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf +++ b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf @@ -17,6 +17,7 @@ disableSerialization; params ["_player", ["_display",(findDisplay 602),[displayNull]]]; +TRACE_2("params",_player,_display); _player removeMagazines "ACE_PreloadedMissileDummy"; _player removeMagazines "ACE_FiredMissileDummy"; diff --git a/addons/disposable/script_component.hpp b/addons/disposable/script_component.hpp index af1f17bd86..12a05ea60d 100644 --- a/addons/disposable/script_component.hpp +++ b/addons/disposable/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT disposable #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_ATTACH #define DEBUG_MODE_FULL #endif diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf index 83e2916e4f..5a1e23a278 100644 --- a/addons/finger/functions/fnc_incomingFinger.sqf +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -16,10 +16,10 @@ */ #include "script_component.hpp" -PARAMS_2(_sourceUnit,_fingerPosPrecise); - private ["_data", "_fingerPos"]; +params ["_sourceUnit", "_fingerPosPrecise"]; + //add some random float to location if it's not our own finger: _fingerPos = if (_sourceUnit == ACE_player) then { _fingerPosPrecise diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 8462eb7170..1ce83d62dc 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -38,7 +38,7 @@ _sendFingerToPlayers = []; _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]); { _nearbyMen append (crew _x); -} forEach (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]); +} count (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]); { if ((((eyePos _x) vectorDistance _playerEyePos) < GVAR(maxRange)) && @@ -50,7 +50,8 @@ _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]); _sendFingerToPlayers pushBack _x; }; -} forEach _nearbyMen; + true +} count _nearbyMen; TRACE_1("sending finger to",_sendFingerToPlayers); diff --git a/addons/finger/functions/fnc_moduleSettings.sqf b/addons/finger/functions/fnc_moduleSettings.sqf index aa623ed58c..c5189f4562 100644 --- a/addons/finger/functions/fnc_moduleSettings.sqf +++ b/addons/finger/functions/fnc_moduleSettings.sqf @@ -13,8 +13,7 @@ #include "script_component.hpp" -PARAMS_1(_logic); - +params ["_logic"]; if !(isServer) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index a35550db76..d6297a4095 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -30,7 +30,7 @@ _iconSize = BASE_SIZE * _fovCorrection; { _data = HASH_GET(GVAR(fingersHash), _x); - EXPLODE_3_PVT(_data,_lastTime,_pos,_name); + _data params ["_lastTime", "_pos", "_name"]; _timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime; if (_timeLeftToShow <= 0) then { HASH_REM(GVAR(fingersHash), _x); @@ -43,7 +43,7 @@ _iconSize = BASE_SIZE * _fovCorrection; drawIcon3D [QUOTE(PATHTOF(UI\fp_icon.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"]; }; -} forEach (GVAR(fingersHash) select 0); +} count (GVAR(fingersHash) select 0); if ((count (GVAR(fingersHash) select 0)) == 0) then { [GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index b1559c6cfe..e78f1d52de 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" -["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call EFUNC(common,addEventHandler); +["flashbangExplosion", DFUNC(flashbangExplosionEH)] call EFUNC(common,addEventHandler); if !(hasInterface) exitWith {}; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index a98fbc2350..cd85c3fe36 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -6,7 +6,7 @@ * 0: The grenade * * Return Value: - * Nothing + * None * * Example: * [theGrenade] call ace_grenades_fnc_flashbangExplosionEH @@ -15,9 +15,8 @@ */ #include "script_component.hpp" -private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"]; - -PARAMS_1(_grenade); +private ["_affected", "_strength", "_posGrenade", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"]; +params ["_grenade"]; _affected = _grenade nearEntities ["CAManBase", 20]; @@ -34,7 +33,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; _x setSkill ((skill _x) / 50); [{ - PARAMS_1(_unit); + params ["_unit"]; //Make sure we don't enable AI for unconscious units if (!(_unit getVariable ["ace_isunconscious", false])) then { [_unit, false] call EFUNC(common,disableAI); @@ -48,13 +47,11 @@ _affected = _grenade nearEntities ["CAManBase", 20]; _eyePos = eyePos ACE_player; //PositionASL _posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground - _losCount = 0; //Check for line of sight (check 4 points in case grenade is stuck in an object or underground) - { - if (!lineIntersects [(_posGrenade vectorAdd _x), _eyePos, _grenade, ACE_player]) then { - _losCount = _losCount + 1; - }; - } forEach [[0,0,0], [0,0,0.2], [0.1, 0.1, 0.1], [-0.1, -0.1, 0.1]]; + _losCount = { + (!lineIntersects [(_posGrenade vectorAdd _x), _eyePos, _grenade, ACE_player]) + } count [[0,0,0], [0,0,0.2], [0.1, 0.1, 0.1], [-0.1, -0.1, 0.1]]; + TRACE_1("Line of sight count (out of 4)",_losCount); if (_losCount <= 1) then { _strength = _strength / 10; @@ -78,7 +75,6 @@ _affected = _grenade nearEntities ["CAManBase", 20]; TRACE_1("Final strength for player",_strength); - //Add ace_medical pain effect: if ((isClass (configFile >> "CfgPatches" >> "ACE_Medical")) && {_strength > 0.1}) then { [ACE_player, (_strength / 2)] call EFUNC(medical,adjustPainLevel); @@ -93,7 +89,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //Delete the light after 0.1 seconds [{ - PARAMS_1(_light); + params ["_light"]; deleteVehicle _light; }, [_light], 0.1] call EFUNC(common,waitAndExecute); @@ -105,7 +101,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //PARTIALRECOVERY - start decreasing effect over ACE_time [{ - PARAMS_1(_strength); + params ["_strength"]; GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength); }, [_strength], (7 * _strength), 0] call EFUNC(common,waitAndExecute); @@ -117,4 +113,5 @@ _affected = _grenade nearEntities ["CAManBase", 20]; }; }; }; -} forEach _affected; + true +} count _affected; diff --git a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf index 377793ca7b..f0e2406b53 100644 --- a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf +++ b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf @@ -6,7 +6,7 @@ * 0: projectile - Flashbang Grenade * * Return Value: - * Nothing + * None * * Example: * [theFlashbang] call ace_grenades_fnc_flashbangThrownFuze @@ -14,12 +14,11 @@ * Public: No */ #include "script_component.hpp" - -PARAMS_1(_projectile); +params ["_projectile"]; if (alive _projectile) then { playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400]; - + private "_affected"; _affected = _projectile nearEntities ["CAManBase", 50]; ["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent); diff --git a/addons/grenades/functions/fnc_nextMode.sqf b/addons/grenades/functions/fnc_nextMode.sqf index 913906b8f8..7789e12ac4 100644 --- a/addons/grenades/functions/fnc_nextMode.sqf +++ b/addons/grenades/functions/fnc_nextMode.sqf @@ -3,7 +3,7 @@ * Select the next throwing mode and display message. * * Arguments: - * Nothing + * None * * Return Value: * Handeled diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index c7bc09a261..03e67a152a 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -12,7 +12,7 @@ * 6: projectile - Object of the projectile that was shot * * Return Value: - * Nothing + * None * * Example: * [clientFiredBIS-XEH] call ace_grenades_fnc_throwGrenade @@ -21,11 +21,8 @@ */ #include "script_component.hpp" -private ["_unit", "_weapon", "_projectile", "_mode", "_fuzeTime"]; - -_unit = _this select 0; -_weapon = _this select 1; -_projectile = _this select 6; +private ["_mode", "_fuzeTime"]; +params ["_unit", "_weapon", "", "", "", "", "_projectile"]; if (_unit != ACE_player) exitWith {}; if (_weapon != "Throw") exitWith {}; diff --git a/addons/grenades/textures/ace_m84.rvmat b/addons/grenades/textures/ace_m84.rvmat index e668125e70..1bfb6ffc0f 100644 --- a/addons/grenades/textures/ace_m84.rvmat +++ b/addons/grenades/textures/ace_m84.rvmat @@ -8,85 +8,85 @@ PixelShaderID = "Super"; VertexShaderID = "Super"; class Stage1 { - texture = "z\ace\addons\grenades\textures\ace_m84_nohq.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "z\ace\addons\grenades\textures\ace_m84_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage2 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {0,9,0}; - up[] = {4.5,0,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {0,9,0}; + up[] = {4.5,0,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage3 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0,MC)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage5 { - texture = "z\ace\addons\grenades\textures\ace_m84_smdi.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "z\ace\addons\grenades\textures\ace_m84_smdi.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage6 { - texture = "#(ai,16,2,2)fresnel(10.4,8.3)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; + texture = "#(ai,16,2,2)fresnel(10.4,8.3)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; }; class Stage7 { - texture = "a3\data_f\env_land_co.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; \ No newline at end of file + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index b979d09a4f..7fa6453fe2 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -1,11 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_unit", "_firer", "_damage"]; - -_unit = _this select 0; -_firer = _this select 1; -_damage = _this select 2; +params ["_unit", "_firer", "_damage"]; // don't fall on collision damage if (_unit == _firer) exitWith {}; diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index 48f32ed13b..381405987c 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -3,14 +3,14 @@ class ACE_Settings { value = 0; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(AlwaysUseCursorSelfInteraction); }; class GVAR(cursorKeepCentered) { value = 0; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(cursorKeepCentered); description = CSTRING(cursorKeepCenteredDescription); }; @@ -18,49 +18,49 @@ class ACE_Settings { value = 0; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(AlwaysUseCursorInteraction); }; class GVAR(UseListMenu) { value = 0; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(UseListMenu); }; class GVAR(colorTextMax) { value[] = {1, 1, 1, 1}; typeName = "COLOR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorTextMax); }; class GVAR(colorTextMin) { value[] = {1, 1, 1, 0.25}; typeName = "COLOR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorTextMin); }; class GVAR(colorShadowMax) { value[] = {0, 0, 0, 1}; typeName = "COLOR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorShadowMax); }; class GVAR(colorShadowMin) { value[] = {0, 0, 0, 0.25}; typeName = "COLOR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorShadowMin); }; class GVAR(textSize) { value = 2; typeName = "SCALAR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(textSize); values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; }; @@ -68,7 +68,7 @@ class ACE_Settings { value = 2; typeName = "SCALAR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(shadowSetting); description = CSTRING(shadowSettingDescription); values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)}; @@ -77,14 +77,14 @@ class ACE_Settings { value = 1; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ActionOnKeyRelease); }; class GVAR(menuBackground) { value = 0; typeName = "SCALAR"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(background); values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)}; }; @@ -92,7 +92,7 @@ class ACE_Settings { value = 0; typeName = "BOOL"; isClientSettable = 1; - category = LSTRING(Category_InteractionMenu); + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(addBuildingActions); description = CSTRING(addBuildingActionsDescription); }; diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index c656ab9056..73b543250e 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -4,6 +4,7 @@ ADDON = false; PREP(addActionToClass); PREP(addActionToObject); +PREP(addMainAction); PREP(compileMenu); PREP(compileMenuSelfAction); PREP(compileMenuZeus); diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index ef4dc94d9e..4d300d35a2 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -19,7 +19,9 @@ */ #include "script_component.hpp" -params ["_objectType", "_typeNum", "_parentPath", "_action"]; +if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { + ERROR("Bad Params"); +}; // Ensure the config menu was compiled first if (_typeNum == 0) then { @@ -35,8 +37,15 @@ if((count _actionTrees) == 0) then { missionNamespace setVariable [_varName, _actionTrees]; }; +if (_parentPath isEqualTo ["ACE_MainActions"]) then { + [_objectType, _typeNum] call FUNC(addMainAction); +}; + _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); -if (isNil {_parentNode}) exitWith {}; +if (isNil {_parentNode}) exitWith { + ERROR("Failed to add action"); + diag_log text format ["action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum]; +}; // Add action node as children of the correct node of action tree (_parentNode select 1) pushBack [_action,[]]; diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index fd64c61dad..8cd2270d48 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -19,7 +19,9 @@ */ #include "script_component.hpp" -params ["_object", "_typeNum", "_parentPath", "_action"]; +if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { + ERROR("Bad Params"); +}; private ["_varName","_actionList"]; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; @@ -28,6 +30,10 @@ if((count _actionList) == 0) then { _object setVariable [_varName, _actionList]; }; +if (_parentPath isEqualTo ["ACE_MainActions"]) then { + [(typeOf _object), _typeNum] call FUNC(addMainAction); +}; + // Add action and parent path to the list of object actions _actionList pushBack [_action, +_parentPath]; diff --git a/addons/interact_menu/functions/fnc_addMainAction.sqf b/addons/interact_menu/functions/fnc_addMainAction.sqf new file mode 100644 index 0000000000..cf2a3f51d4 --- /dev/null +++ b/addons/interact_menu/functions/fnc_addMainAction.sqf @@ -0,0 +1,31 @@ +/* + * Author: Jonpas, PabstMirror + * Makes sure there is a ACE_MainActions on the object type + * + * Argument: + * 0: Object classname + * 1: Type of action, 0 for actions, 1 for self-actions + * + * Return value: + * None + * + * Example: + * ["Table", 0] call ace_interact_menu_fnc_addMainAction; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_objectType", "_typeNum"]; + +private["_actionTrees", "_mainAction", "_parentNode", "_varName"]; + +_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; +_actionTrees = missionNamespace getVariable [_varName, []]; +_parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode); + +if (isNil {_parentNode}) then { + TRACE_2("No Main Action on object", _objectType, _typeNum); + _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call FUNC(createAction); + [_objectType, _typeNum, [], _mainAction] call EFUNC(interact_menu,addActionToClass); +}; diff --git a/addons/interact_menu/functions/fnc_findActionNode.sqf b/addons/interact_menu/functions/fnc_findActionNode.sqf index 66738f6cf9..41ab658a62 100644 --- a/addons/interact_menu/functions/fnc_findActionNode.sqf +++ b/addons/interact_menu/functions/fnc_findActionNode.sqf @@ -8,7 +8,7 @@ * 1: Path * * Return value: - * Action node . + * Action node or if not found * * Example: * [_actionTree, ["ACE_TapShoulderRight","VulcanPinchAction"]] call ace_interact_menu_fnc_findActionNode; diff --git a/addons/laser/initKeybinds.sqf b/addons/laser/initKeybinds.sqf index 5e3d017103..25fdd2ddcc 100644 --- a/addons/laser/initKeybinds.sqf +++ b/addons/laser/initKeybinds.sqf @@ -1,9 +1,9 @@ ["ACE3 Equipment", QGVAR(LaserCodeUp), localize LSTRING(laserCodeUp), { - if( EGVAR(laser_selfdesignate,active) - || + if( EGVAR(laser_selfdesignate,active) + || { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. - || + || { [ACE_player] call FUNC(unitTurretCanLockLaser) } ) then { [] call FUNC(keyLaserCodeUp); @@ -14,14 +14,14 @@ ["ACE3 Equipment", QGVAR(LaserCodeDown), localize LSTRING(laserCodeDown), { - if( EGVAR(laser_selfdesignate,active) - || + if( EGVAR(laser_selfdesignate,active) + || { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. - || + || { [ACE_player] call FUNC(unitTurretCanLockLaser) } ) then { [] call FUNC(keyLaserCodeDown); }; }, {false}, -[18, [true, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+E) +[18, [false, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+E) diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 078c06b41d..16cfd2bc31 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -125,13 +125,6 @@ class RscDisplayDiary { }; }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; // BRIEFING SCREEN @@ -149,13 +142,6 @@ class RscDisplayGetReady: RscDisplayMainMap { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; class RscDisplayClientGetReady: RscDisplayGetReady { // get rid of the "center to player position" - button (as it works even on elite) @@ -164,13 +150,6 @@ class RscDisplayClientGetReady: RscDisplayGetReady { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; class RscDisplayServerGetReady: RscDisplayGetReady { // get rid of the "center to player position" - button (as it works even on elite) @@ -179,11 +158,4 @@ class RscDisplayServerGetReady: RscDisplayGetReady { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 23b7cf8a4f..910f152292 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -1,116 +1,116 @@ class ACE_Settings { class GVAR(level) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Basic", "Advanced"}; }; class GVAR(medicSetting) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Normal", "Advanced"}; }; class GVAR(enableFor) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); value = 0; typeName = "SCALAR"; values[] = {"Players only", "Players and AI"}; }; class GVAR(enableOverdosing) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(bleedingCoefficient) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(painCoefficient) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(enableAirway) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableFractures) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableAdvancedWounds) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableVehicleCrashes) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(enableScreams) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(playerDamageThreshold) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(AIDamageThreshold) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(enableUnconsciousnessAI) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "50/50", "Enabled"}; }; class GVAR(remoteControlledAI) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(preventInstaDeath) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(enableRevive) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"Disabled", "Players only", "Players and AI"}; }; class GVAR(maxReviveTime) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 120; }; class GVAR(amountOfReviveLives) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = -1; }; class GVAR(allowDeadBodyMovement) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(allowLitterCreation) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(litterSimulationDetail) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(litterSimulationDetail); description = CSTRING(litterSimulationDetail_Desc); typeName = "SCALAR"; @@ -122,48 +122,48 @@ class ACE_Settings { isClientSettable = 1; }; class GVAR(litterCleanUpDelay) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; }; class GVAR(medicSetting_PAK) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(medicSetting_SurgicalKit) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(consumeItem_PAK) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(consumeItem_SurgicalKit) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(useLocation_PAK) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 3; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; }; class GVAR(useLocation_SurgicalKit) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 2; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; }; class GVAR(useCondition_PAK) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName); description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description); typeName = "SCALAR"; @@ -171,7 +171,7 @@ class ACE_Settings { values[] = {"Anytime", "Stable"}; }; class GVAR(useCondition_SurgicalKit) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName); description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description); typeName = "SCALAR"; @@ -179,24 +179,24 @@ class ACE_Settings { values[] = {"Anytime", "Stable"}; }; class GVAR(keepLocalSettingsSynced) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(healHitPointAfterAdvBandage) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(healHitPointAfterAdvBandage); typeName = "BOOL"; value = 0; }; class GVAR(painIsOnlySuppressed) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(painIsOnlySuppressed); typeName = "BOOL"; value = 1; }; class GVAR(painEffectType) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(painEffectType); typeName = "SCALAR"; value = 0; @@ -204,18 +204,18 @@ class ACE_Settings { isClientSettable = 1; }; class GVAR(allowUnconsciousAnimationOnTreatment) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(moveUnitsFromGroupOnUnconscious) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(menuTypeStyle) { - category = LSTRING(Category_Medical); + category = CSTRING(Category_Medical); displayName = CSTRING(menuTypeDisplay); description = CSTRING(menuTypeDescription); typeName = "SCALAR"; diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml index 45da857c69..05f29d8b19 100644 --- a/addons/medical_menu/stringtable.xml +++ b/addons/medical_menu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -33,354 +33,349 @@ Configure the usage of the Medical Menu - EXAMINE & TREATMENT - ОСМОТР И ЛЕЧЕНИЕ EXAMINE & TREATMENT + ОСМОТР И ЛЕЧЕНИЕ EXAMINAR & TRATAMIENTO EXAMINER & TRAITEMENTS BADANIE & LECZENIE - STATUS - СОСТОЯНИЕ STATUS + СОСТОЯНИЕ ESTADO ÉTATS STATUS - OVERVIEW - ОБЩАЯ ИНФОРМАЦИЯ OVERVIEW + ОБЩАЯ ИНФОРМАЦИЯ DESCRIPCIÓN DESCRIPTION OPIS - ACTIVITY LOG - ПРОВЕДЕННЫЕ МАНИПУЛЯЦИИ ACTIVITY LOG + ПРОВЕДЕННЫЕ МАНИПУЛЯЦИИ REGISTRO DE ACTIVIDAD REGISTRE DES SOINS LOGI AKTYWNOŚCI - QUICK VIEW - БЫСТРЫЙ ОСМОТР QUICK VIEW + БЫСТРЫЙ ОСМОТР VISTA RÁPIDA VUE RAPIDE SZYBKI PODGLĄD - None + None Не ранен Ninguno Aucun Brak - Minor + Minor Несрочная помощь Menor Mineur Normalny - Delayed + Delayed Срочная помощь Diferido Urgent Opóźniony - Immediate + Immediate Неотложная помощь Inmediato Immédiat Natychmiastowy - Deceased + Deceased Морг Fallecido Décédé Nie żyje - View triage Card + View triage Card Смотреть первичную карточку Ver Triage Voir Carte de Triage Pokaż kartę segregacyjną - Examine Patient + Examine Patient Осмотреть пациента Examinar Paciente Examiner Patient Zbadaj pacjenta - Bandage / Fractures + Bandage / Fractures Раны / переломы Vendajes/Fracturas Bandages / Fractures Bandaże / Złamania - Medication + Medication Медикаменты Medicación Médications Leki - Airway Management + Airway Management Дыхательные пути Vías Aéreas Gestion Des Voie REspiratoire Drogi oddechowe - Advanced Treatments + Advanced Treatments Специальная медпомощь Tratamientos Avanzados Traitement Avancé Zaawansowane zabiegi - Drag/Carry + Drag/Carry Тащить/нести Arrastrar/Cargar Glisser/Porter Ciągnij/Nieś - Toggle (Self) + Toggle (Self) Лечить себя/другого раненого Activer (sois) Przełącz (na siebie) Alternar - Select triage status + Select triage status Сортировка Seleccionar estado de Triage Selectioner l'état de Triage Wybierz priorytet - Select Head + Select Head Выбрать голову Seleccionar Cabeza Selectioner Tête Wybierz głowę - Select Torso + Select Torso Выбрать торс Seleccionar Torso Selectioner Torse Wybierz tors - Select Left Arm + Select Left Arm Выбрать левую руку Seleccionar Brazo Izquierdo Selectioner Bras Gauche Wybierz lewą rękę - Select Right Arm + Select Right Arm Выбрать правую руку Seleccionar Brazo Derecho Selectioner Bras Droit Wybierz prawą rękę - Select Left Leg + Select Left Leg Выбрать левую ногу Seleccionar Pierna Izquierda Selectioner Jambe Gauche Wybierz lewą nogę - Select Right Leg + Select Right Leg Выбрать правую ногу Seleccionar Pierna Derecha Selectioner Jambe Droite Wybierz prawą nogę - Head + Head Голова Cabeza Tête Głowa - Torso + Torso Торс Torse Tors - Left Arm + Left Arm Левая рука Brazo Izquierdo Bras Gauche Lewa ręka - Right Arm + Right Arm Правая рука Brazo Derecho Bras Droit Prawa ręka - Left Leg + Left Leg Левая нога Pierna Izquierda Jambe Gauche Lewa noga - Right Leg + Right Leg Правая нога Pierna Derecha Jambe Droite Prawa noga - Body Part: %1 + Body Part: %1 Часть тела: %1 Parte del cuerpo: %1 Partie du corps: %1 Część ciała: %1 - Small + Small малого размера Pequeña Petite małym - Medium + Medium среднего размера Mediana moyenne średnim - Large + Large большого размера Grande Grande dużym - There are %2 %1 Open Wounds + There are %2 %1 Open Wounds %2 открытые раны %1 Hay %2 Heridas Abiertas %1 Il y a %2 %1 Blessure Ouverte Widzisz otwarte rany w ilości %2 o %1 rozmiarze - There is 1 %1 Open Wound + There is 1 %1 Open Wound Открытая рана %1 Hay 1 Herida Abierta %1 Il y a 1 blessure ouverte %1 Widzisz 1 otwartą ranę o %1 rozmiarze - There is a partial %1 Open wound + There is a partial %1 Open wound Частично открытая рана %1 Hay una herida parcial abierta %1 Il y a une Blessure Patiellement Ouverte %1 Widzisz częściowo otwartą ranę o %1 rozmiarze - There are %2 %1 Bandaged Wounds + There are %2 %1 Bandaged Wounds %2 перевязанные раны %1 Hay %2 Heridas %1 Vendadas Il y a %2 %1 Blessure Bandée Widzisz %2 zabandażowanych ran o %1 rozmiarze - There is 1 %1 Bandaged Wound + There is 1 %1 Bandaged Wound 1 перевязанная рана %1 Hay 1 Herida Vendada %1 Il y a 1 %1 Blessure Bandée Widzisz 1 zabandażowaną ranę o %1 rozmiarze - There is a partial %1 Bandaged wound + There is a partial %1 Bandaged wound Частично перевязанная рана %1 Hay una Herida parcial %1 Vendada Il y a %1 Blessure Partielment Bandée Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze - Normal breathing + Normal breathing Дыхание в норме Respiración normal Respiration Normale Normalny oddech - No breathing + No breathing Дыхания нет No respira Apnée Brak oddechu - Difficult breathing + Difficult breathing Дыхание затруднено Dificultad para respirar Difficultée Respiratoire Trudności z oddychaniem - Almost no breathing + Almost no breathing Дыхания почти нет Casi sin respirar Respiration Faible Prawie brak oddechu - Bleeding + Bleeding Кровотечение Sangrando Seignement Krwawienie zewnętrzne - in Pain + in Pain Испытывает боль Con Dolor A De La Douleur W bólu - Lost a lot of Blood + Lost a lot of Blood Большая кровопотеря Mucha Sangre perdida A Perdu Bcp de Sang Stracił dużo krwi - Tourniquet [CAT] + Tourniquet [CAT] Жгут Torniquete [CAT] Garot [CAT] Opaska uciskowa [CAT] - Nasopharyngeal Tube [NPA] + Nasopharyngeal Tube [NPA] Назотрахеальная трубка Torniquete [CAT] Canule Naseaupharyngée [NPA] @@ -388,4 +383,4 @@ - + diff --git a/addons/nametags/ACE_Settings.hpp b/addons/nametags/ACE_Settings.hpp index 2270c93f0a..354d5748bf 100644 --- a/addons/nametags/ACE_Settings.hpp +++ b/addons/nametags/ACE_Settings.hpp @@ -4,6 +4,7 @@ class ACE_Settings { typeName = "COLOR"; isClientSettable = 1; displayName = CSTRING(DefaultNametagColor); + category = CSTRING(Module_DisplayName); }; class GVAR(showPlayerNames) { value = 1; @@ -12,29 +13,34 @@ class ACE_Settings { displayName = CSTRING(ShowPlayerNames); description = CSTRING(ShowPlayerNames_Desc); values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)}; + category = CSTRING(Module_DisplayName); }; class GVAR(showPlayerRanks) { value = 1; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowPlayerRanks); + category = CSTRING(Module_DisplayName); }; class GVAR(showVehicleCrewInfo) { value = 1; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowVehicleCrewInfo); + category = CSTRING(Module_DisplayName); }; class GVAR(showNamesForAI) { value = 0; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowNamesForAI); + category = CSTRING(Module_DisplayName); }; class GVAR(showCursorTagForVehicles) { value = 0; typeName = "BOOL"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(showSoundWaves) { value = 1; @@ -43,16 +49,19 @@ class ACE_Settings { displayName = CSTRING(ShowSoundWaves); description = CSTRING(ShowSoundWaves_Desc); values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)}; + category = CSTRING(Module_DisplayName); }; class GVAR(playerNamesViewDistance) { value = 5; typeName = "SCALAR"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(playerNamesMaxAlpha) { value = 0.8; typeName = "SCALAR"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(tagSize) { value = 2; @@ -61,5 +70,6 @@ class ACE_Settings { displayName = CSTRING(TagSize_Name); description = CSTRING(TagSize_Description); values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; + category = CSTRING(Module_DisplayName); }; }; diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index efc634be6c..b828d70005 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -66,8 +66,8 @@ GVAR(showNamesTime) = -10; // Change settings accordingly when they are changed ["SettingChanged", { - PARAMS_1(_name); - if (_name == QGVAR(showPlayerNames)) then { + params ["_name"]; + if (_name == QGVAR(showPlayerNames)) then { call FUNC(updateSettings); }; }] call EFUNC(common,addEventHandler); diff --git a/addons/nametags/functions/fnc_canShow.sqf b/addons/nametags/functions/fnc_canShow.sqf index b53f50c93e..5bccc8f91d 100644 --- a/addons/nametags/functions/fnc_canShow.sqf +++ b/addons/nametags/functions/fnc_canShow.sqf @@ -10,16 +10,12 @@ * Can show Crew Info * * Example: - * call ace_nametags_fnc_doShow + * call ace_nametags_fnc_canShow * * Public: No */ #include "script_component.hpp" -private ["_player"]; - -_player = ACE_player; - -vehicle _player != _player && +((vehicle ACE_player) != ACE_player) && {GVAR(ShowCrewInfo)} && -{!(vehicle _player isKindOf "ParachuteBase")}; +{!(vehicle ACE_player isKindOf "ParachuteBase")}; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 021a4e2a0b..7c98be16ed 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -13,26 +13,26 @@ * None * * Example: - * [ACE_player, _target, _alpha, _distance * 0.026, _icon] call ace_nametags_fnc_drawNameTagIcon + * [ACE_player, bob, 0.5, height, ICON_NAME_SPEAK] call ace_nametags_fnc_drawNameTagIcon * * Public: No */ #include "script_component.hpp" -PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType); - -private ["_position", "_color", "_name", "_rank", "_size", "_icon", "_scale"]; +params ["_player", "_target", "_alpha", "_heightOffset", "_iconType"]; if (_iconType == ICON_NONE) exitWith {}; //Don't waste time if not visable +private ["_position", "_color", "_name", "_size", "_icon", "_scale"]; + //Set Icon: _icon = ""; _size = 0; -if ((_iconType == ICON_NAME_SPEAK) || (_iconType == ICON_SPEAK)) then { +if (_iconType in [ICON_NAME_SPEAK, ICON_SPEAK]) then { _icon = QUOTE(PATHTOF(UI\soundwave)) + str (floor (random 10)) + ".paa"; _size = 1; - _alpha = _alpha max 0.6;//Boost alpha when speaking + _alpha = (_alpha max 0.2) + 0.2;//Boost alpha when speaking } else { if (_iconType == ICON_NAME_RANK) then { _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa",(toLower(rank _target))]; @@ -50,7 +50,7 @@ _name = if (_iconType in [ICON_NAME, ICON_NAME_RANK, ICON_NAME_SPEAK]) then { }; //Set Color: -if !(group _target == group _player) then { +if ((group _target) != (group _player)) then { _color = +GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings) _color set [3, (_color select 3) * _alpha]; } else { @@ -58,7 +58,7 @@ if !(group _target == group _player) then { }; // Convert position to ASLW (expected by drawIcon3D) and add height offsets -_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .35)]); +_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .3)]); _scale = [0.333, 0.5, 0.666, 0.83333, 1] select GVAR(tagSize); diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index 6d83b0f573..b0e0b1ff34 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -22,7 +22,7 @@ private ["_type", "_varName", "_data", "_isAir", "_config", "_fnc_addTurret", "_fnc_addTurretUnit"]; -PARAMS_1(_type); +params ["_type"]; _varName = format ["ACE_CrewInfo_Cache_%1", _type]; _data = + (uiNamespace getVariable _varName); diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 897d223930..9299611d3b 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -19,7 +19,7 @@ if (isServer) then { //If someone disconnects while speaking, reset their variable addMissionEventHandler ["HandleDisconnect", { - PARAMS_1(_disconnectedPlayer); + params ["_disconnectedPlayer"]; if (_disconnectedPlayer getVariable [QGVAR(isSpeakingInGame), false]) then { _disconnectedPlayer setVariable [QGVAR(isSpeakingInGame), false, true]; }; @@ -30,7 +30,7 @@ if (!hasInterface) exitWith {}; ["playerChanged", { //When player changes, make sure to reset old unit's variable - PARAMS_2(_newUnit,_oldUnit); + params ["", "_oldUnit"]; if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then { _oldUnit setVariable [QGVAR(isSpeakingInGame), false, true]; }; @@ -40,14 +40,14 @@ if (!hasInterface) exitWith {}; if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { diag_log text format ["[ACE_nametags] - ACRE Detected"]; DFUNC(isSpeaking) = { - PARAMS_1(_unit); - (([_unit] call acre_api_fnc_isSpeaking) || ([ACE_player] call acre_api_fnc_isBroadcasting)) && {!(_unit getVariable ["ACE_isUnconscious", false])} + params ["_unit"]; + (([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { diag_log text format ["[ACE_nametags] - TFR Detected"]; DFUNC(isSpeaking) = { - PARAMS_1(_unit); + params ["_unit"]; (_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { @@ -64,7 +64,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { } , 0.1, []] call CBA_fnc_addPerFrameHandler; DFUNC(isSpeaking) = { - PARAMS_1(_unit); + params ["_unit"]; (_unit getVariable [QGVAR(isSpeakingInGame), false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; }; diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index 7a6d2fa3c8..1b209cb32a 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -1,6 +1,5 @@ /* * Author: esteldunedain - * * Initializes the name tags module. * * Arguments: @@ -14,7 +13,7 @@ if !(isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); +params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index 43996e17b2..bbf608b75a 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -17,8 +17,8 @@ private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target", "_targetEyePosASL", "_ambientBrightness", "_maxDistance"]; -//don't show nametags in spectator -if ((isNull ACE_player) || {!alive ACE_player}) exitWith {}; +//don't show nametags in spectator or if RscDisplayMPInterrupt is open +if ((isNull ACE_player) || {!alive ACE_player} || {!isNull (findDisplay 49)}) exitWith {}; _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0; _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance); @@ -63,6 +63,7 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then { {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} && {!(_target getVariable ["ACE_hideName", false])}) then { _distance = ACE_player distance _target; + if (_distance > (_maxDistance + 5)) exitWith {}; _alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax; _icon = ICON_NONE; if (GVAR(showSoundWaves) == 2) then { //icon will be drawn below, so only show name here @@ -116,5 +117,6 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho [ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon); }; - } forEach _targets; + nil + } count _targets; }; diff --git a/addons/nametags/functions/fnc_setText.sqf b/addons/nametags/functions/fnc_setText.sqf index 33112c31d0..842c765de1 100644 --- a/addons/nametags/functions/fnc_setText.sqf +++ b/addons/nametags/functions/fnc_setText.sqf @@ -17,7 +17,7 @@ #define TextIDC 11123 -PARAMS_1(_text); +params ["_text"]; private["_ctrl"]; diff --git a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf index 3b97892cdb..3129e32bef 100644 --- a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf @@ -16,7 +16,7 @@ #include "script_component.hpp" -private ["_settingsMenu"]; +private ["_settingsMenu", "_ctrlComboBox"]; disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; @@ -24,4 +24,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _ctrlComboBox = (_settingsMenu displayCtrl 14); GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; -[false] call FUNC(settingsMenuUpdateList); +[true] call FUNC(settingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf b/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf index 1543a2c8d5..b122d0da0e 100644 --- a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf @@ -18,24 +18,28 @@ private ["_settingIndex", "_rightDropDownIndex"]; -_settingIndex = lbCurSel 200; //Index of left list _rightDropDownIndex = lbCurSel 400; //Index of right drop down - if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;}; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; +if (_settingIndex == -1) exitWith {}; + switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_OPTIONS): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then { - _settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0; - [MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); + _settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0; + [MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); }; [false] call FUNC(settingsMenuUpdateList); - }; + }; case (MENU_TAB_SERVER_OPTIONS): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then { - _settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0; - [MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); + _settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0; + [MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); }; [false] call FUNC(serverSettingsMenuUpdateList); - }; + }; }; diff --git a/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf index f294e27a5e..d134cda993 100644 --- a/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf @@ -23,4 +23,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; _ctrlComboBox = (_settingsMenu displayCtrl 14); GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; -[false] call FUNC(serverSettingsMenuUpdateList); +[true] call FUNC(serverSettingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf b/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf index 11aadc76e4..fde370426f 100644 --- a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf @@ -18,9 +18,13 @@ private ["_settingIndex", "_inputText", "_setting", "_settingName", "_convertedValue"]; -_settingIndex = lbCurSel 200; //Index of left list _inputText = ctrlText 414; //Index of right drop down +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; + switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_SERVER_VALUES): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideValues)))) then { diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 621493967e..6c0cb56519 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -72,7 +72,6 @@ lbClear (_menu displayCtrl 14); if (_x == "") then { _x = localize (LSTRING(category_all)); }; - if (isLocalized _x) then {_x = localize _x}; (_menu displayCtrl 14) lbAdd _x; } forEach GVAR(categories); diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf index af3e2232f3..c71a26a6e7 100644 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf @@ -56,9 +56,8 @@ if (GVAR(serverConfigGeneration) == 0) then { lbClear (_menu displayCtrl 14); { if (_x == "") then { - _x = localize "STR_ACE_OptionsMenu_category_all"; + _x = localize LSTRING(category_all); }; - if (isLocalized _x) then {_x = localize _x}; (_menu displayCtrl 14) lbAdd _x; } forEach GVAR(categories); diff --git a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf b/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf index b69d8bd734..7df198cc5f 100644 --- a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf @@ -18,7 +18,11 @@ private ["_newColor", "_settingIndex"]; -_settingIndex = lbCurSel 200; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; +if (_settingIndex == -1) exitWith {}; switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_COLORS): { diff --git a/addons/optionsmenu/functions/fnc_resetSettings.sqf b/addons/optionsmenu/functions/fnc_resetSettings.sqf index 07fc43cdfc..8d6c3958c6 100644 --- a/addons/optionsmenu/functions/fnc_resetSettings.sqf +++ b/addons/optionsmenu/functions/fnc_resetSettings.sqf @@ -30,8 +30,8 @@ private ["_name", "_default", "_lastSelected"]; [MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting); } forEach GVAR(clientSideColors); -_lastSelected = lbCurSel 200; +_lastSelected = lnbCurSelRow 200; [GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged); if (_lastSelected != -1) then { - lbSetCurSel [200, _lastSelected]; + lnbSetCurSelRow [200, _lastSelected]; }; diff --git a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf b/addons/optionsmenu/functions/fnc_serverResetSettings.sqf index 434e622818..d9f6a4ad96 100644 --- a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf +++ b/addons/optionsmenu/functions/fnc_serverResetSettings.sqf @@ -36,7 +36,7 @@ private ["_name", "_default", "_lastSelected"]; [MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting); } forEach GVAR(serverSideVakyes); -_lastSelected = lbCurSel 200; +_lastSelected = lnbCurSelRow 200; [GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged); if (_lastSelected != -1) then { lbSetCurSel [200, _lastSelected]; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf index ac25d719e1..87532aaf86 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf @@ -16,11 +16,10 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType", "_filteredCollection", "_selectedCategory"]; +private ["_settingsMenu", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType"]; disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; -_ctrlList = _settingsMenu displayCtrl 200; _collection = switch (GVAR(optionMenu_openTab)) do { case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)}; @@ -29,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do { default {[]}; }; -_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); -_filteredCollection = []; -{ - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - _filteredCollection pushBack _x; - }; -} forEach _collection; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; -if (count _filteredCollection > 0) then { - _settingIndex = (lbCurSel _ctrlList); - if (_settingIndex > (count _filteredCollection)) then { - _settingIndex = count _filteredCollection - 1; - }; - - if (_settingIndex < 0) then { - _settingIndex = 0; - }; - _setting = _filteredCollection select _settingIndex; +if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { + _setting = _collection select _settingIndex; _entryName = _setting select 0; _localizedName = _setting select 3; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf index 4a6648878a..39a036828a 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf @@ -16,26 +16,26 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; +private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; DEFAULT_PARAM(0,_updateKeyView,true); disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; _ctrlList = _settingsMenu displayCtrl 200; -lbclear _ctrlList; +lnbClear _ctrlList; _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); - +_added = 0; switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_SERVER_OPTIONS): { { - if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = if ((_x select 3) != "") then { + (_x select 3); } else { - _ctrlList lbadd (_x select 0); + (_x select 0); }; _settingsValue = _x select 9; @@ -47,41 +47,45 @@ switch (GVAR(optionMenu_openTab)) do { (_x select 5) select _settingsValue; }; - _ctrlList lbadd (_settingsText); + _added = _ctrlList lnbAddRow [_settingName, _settingsText]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; }foreach GVAR(serverSideOptions); }; case (MENU_TAB_SERVER_COLORS): { { - if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { _color = +(_x select 9); { _color set [_forEachIndex, ((round (_x * 100))/100)]; } forEach _color; _settingsColor = str _color; - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); + _settingName = if ((_x select 3) != "") then { + (_x select 3); } else { - _ctrlList lbadd (_x select 0); + (_x select 0); }; - _ctrlList lbadd (_settingsColor); + + _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; _ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; }foreach GVAR(serverSideColors); }; case (MENU_TAB_SERVER_VALUES): { { - if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = if ((_x select 3) != "") then { + (_x select 3); } else { - _ctrlList lbadd (_x select 0); + (_x select 0); }; _settingsValue = _x select 9; - if (typeName _settingsValue != "STRINg") then { + if (typeName _settingsValue != "STRING") then { _settingsValue = format["%1", _settingsValue]; }; - _ctrlList lbadd (_settingsValue); + _added = _ctrlList lnbAddRow [_settingName, _settingsValue]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; }foreach GVAR(serverSideValues); }; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf index 442a1ceb50..64f45121e5 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf @@ -28,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do { default {[]}; }; -_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); -_filteredCollection = []; -{ - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - _filteredCollection pushBack _x; - }; -} forEach _collection; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; -if (count _filteredCollection > 0) then { - _settingIndex = (lbCurSel _ctrlList); - if (_settingIndex > (count _filteredCollection)) then { - _settingIndex = count _filteredCollection - 1; - }; - - if (_settingIndex < 0) then { - _settingIndex = 0; - }; - _setting = _filteredCollection select _settingIndex; +if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { + _setting = _collection select _settingIndex; _entryName = _setting select 0; _localizedName = _setting select 3; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf index 18075a1844..ccab920501 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf @@ -16,22 +16,22 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; +private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; DEFAULT_PARAM(0,_updateKeyView,true); disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _ctrlList = _settingsMenu displayCtrl 200; -lbclear _ctrlList; +lnbClear _ctrlList; _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_OPTIONS): { { - if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { - _ctrlList lbadd (_x select 3); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = (_x select 3); _settingsValue = _x select 9; // Created disable/enable options for bools @@ -40,21 +40,24 @@ switch (GVAR(optionMenu_openTab)) do { } else { (_x select 5) select _settingsValue; }; - _ctrlList lbadd (_settingsText); + _added = _ctrlList lnbAddRow [_settingName, _settingsText]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - }foreach GVAR(clientSideOptions); + } foreach GVAR(clientSideOptions); }; case (MENU_TAB_COLORS): { { - if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { _color = +(_x select 9); { _color set [_forEachIndex, ((round (_x * 100))/100)]; } forEach _color; _settingsColor = str _color; - _ctrlList lbadd (_x select 3); - _ctrlList lbadd (_settingsColor); + _settingName = (_x select 3); + + _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; _ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; }foreach GVAR(clientSideColors); }; diff --git a/addons/optionsmenu/functions/fnc_stringEscape.sqf b/addons/optionsmenu/functions/fnc_stringEscape.sqf index fe3930f68c..1493f76445 100644 --- a/addons/optionsmenu/functions/fnc_stringEscape.sqf +++ b/addons/optionsmenu/functions/fnc_stringEscape.sqf @@ -14,7 +14,7 @@ * Public: No */ -private ["_str", "_array", "_maxIndex"]; +private ["_str", "_array", "_maxIndex", "_isEven"]; _str = _this; _isEven = { diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp index 2c79bdab1d..cd65eb966d 100644 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ b/addons/optionsmenu/gui/settingsMenu.hpp @@ -256,7 +256,7 @@ class ACE_settingsMenu { idc = 1102; text = CSTRING(OpenExport); x = X_PART(18); - action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {createDialog 'ACE_serverSettingsMenu'; }); + action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {closeDialog 0; createDialog 'ACE_serverSettingsMenu';}); }; class action_debug: actionClose { idc = 1102; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index c3b45528da..665b954496 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -62,15 +62,6 @@ if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then { // Add interactions if automatic transitions are disabled, else setup automatic transitions if (_duration == 0) then { { - // Add MainAction if one does not already exist - _actionsObject = _x getVariable [QEGVAR(interact_menu,actions), []]; - _actionsClass = missionNamespace getVariable [format [QEGVAR(interact_menu,Act_%1), typeOf _x], []]; - if (count _actionsObject == 0 && {count _actionsClass == 0}) then { - _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call EFUNC(interact_menu,createAction); - [_x, 0, [], _mainAction] call EFUNC(interact_menu,addActionToObject); - TRACE_2("Adding ACE_MainActions",_actionsObject,_actionsClass); - }; - // Add Slides sub-action and populate with images _slidesAction = [QGVAR(Slides), localize LSTRING(Interaction), "", {}, {true}, {(_this select 2) call FUNC(addSlideActions)}, [_objects,_images,_names,_x,_currentSlideshow], [0,0,0], 2] call EFUNC(interact_menu,createAction); [_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject); diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Slideshow_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Slideshow_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Slideshow_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Slideshow_ca.png