From 57b411b8a4e128069958ce4451aeb266cc3a61b9 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:40:15 +0100 Subject: [PATCH 01/22] conform isnil checking: arsenal --- addons/arsenal/XEH_postInit.sqf | 4 ++-- addons/arsenal/functions/fnc_fillLeftPanel.sqf | 2 +- addons/arsenal/functions/fnc_fillRightPanel.sqf | 2 +- addons/arsenal/functions/fnc_handleStats.sqf | 2 +- addons/arsenal/functions/fnc_message.sqf | 2 +- addons/arsenal/functions/fnc_onSelChangedLeft.sqf | 4 ++-- addons/arsenal/functions/fnc_removeBox.sqf | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf index dcc5c7c7b5c..664f175bae0 100644 --- a/addons/arsenal/XEH_postInit.sqf +++ b/addons/arsenal/XEH_postInit.sqf @@ -24,7 +24,7 @@ GVAR(lastSearchTextLoadouts) = ""; [QGVAR(loadoutUnshared), { params ["_contentPanelCtrl" , "_playerName", "_loadoutName"]; - if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { private _dataToCheck = _playerName + _loadoutName; @@ -52,7 +52,7 @@ GVAR(lastSearchTextLoadouts) = ""; params ["_contentPanelCtrl" ,"_loadoutArgs"]; _loadoutArgs params ["_playerName", "_loadoutName", "_loadoutData"]; - if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { private _curSelData =_contentPanelCtrl lnbData [(lnbCurSelRow _contentPanelCtrl), 1]; ([_loadoutData] call FUNC(verifyLoadout)) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount"]; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 5009f46e3ad..a662b91eb18 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -18,7 +18,7 @@ params ["_display", "_control"]; private _ctrlIDC = ctrlIDC _control; -if !(isNil QGVAR(currentLeftPanel)) then { +if (!isNil QGVAR(currentLeftPanel)) then { private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1); _previousCtrlBackground ctrlSetFade 1; _previousCtrlBackground ctrlCommit FADE_DELAY; diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index 626afecc3da..e683c82d011 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -19,7 +19,7 @@ params ["_display", "_control"]; private _ctrlIDC = ctrlIDC _control; // Fade old control background -if !(isNil QGVAR(currentRightPanel)) then { +if (!isNil QGVAR(currentRightPanel)) then { private _previousCtrlBackground = _display displayCtrl (GVAR(currentRightPanel) - 1); _previousCtrlBackground ctrlSetFade 1; _previousCtrlBackground ctrlCommit FADE_DELAY; diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index 0c57f6c7211..26597716ea8 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -46,7 +46,7 @@ private _hideUnusedFnc = { } forEach _numbers; }; -if !(isNil "_itemCfg") then { +if (!isNil "_itemCfg") then { private _handleStatsFnc = { params ["_statsIndex", "_leftPanel"]; diff --git a/addons/arsenal/functions/fnc_message.sqf b/addons/arsenal/functions/fnc_message.sqf index 8fbd48748f9..f3e6abb3e6c 100644 --- a/addons/arsenal/functions/fnc_message.sqf +++ b/addons/arsenal/functions/fnc_message.sqf @@ -19,7 +19,7 @@ params ["_display", "_message"]; private _messageBoxCtrl = _display displayCtrl IDC_message; private _handle = _messageBoxCtrl getVariable QGVAR(messageBoxHandle); -if !(isNil "_handle") then { +if (!isNil "_handle") then { terminate _handle; }; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 2322853e1a0..a314a34965a 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -23,10 +23,10 @@ private _display = ctrlParent _control; private _item = [_control lnbData [_curSel, 0], _control lbData _curSel] select !(ctrlType _control == 102); private _weaponDefaultRightPanel = _display displayCtrl IDC_buttonOptic; -private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]}); +private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]}); private _containerDefaultRightPanel = _display displayCtrl IDC_buttonMisc; -private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]}); +private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]}); private _fnc_clearPreviousWepMags = { private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines"); diff --git a/addons/arsenal/functions/fnc_removeBox.sqf b/addons/arsenal/functions/fnc_removeBox.sqf index ed4ec7de4d5..7620529ef3e 100644 --- a/addons/arsenal/functions/fnc_removeBox.sqf +++ b/addons/arsenal/functions/fnc_removeBox.sqf @@ -23,7 +23,7 @@ if (isNull _object || {isNil QGVAR(EHIDArray)}) exitWith {}; if (_global && {isMultiplayer}) then { private _ID = (GVAR(EHIDArray) select {_x select 1 == _object}) select 0; - if !(isNil "_ID") then { + if (!isNil "_ID") then { [_ID select 0] call CBA_fnc_removeGlobalEventJIP; GVAR(EHIDArray) deleteAt (GVAR(EHIDArray) find _ID); publicVariable QGVAR(EHIDArray); From 2688cdd95f421d60aeabd80d82e203eb4dac708b Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:41:18 +0100 Subject: [PATCH 02/22] conform isnil checking: cargo --- addons/cargo/functions/fnc_removeCargoItem.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cargo/functions/fnc_removeCargoItem.sqf b/addons/cargo/functions/fnc_removeCargoItem.sqf index ede9c68c941..ee6de29cabd 100644 --- a/addons/cargo/functions/fnc_removeCargoItem.sqf +++ b/addons/cargo/functions/fnc_removeCargoItem.sqf @@ -53,7 +53,7 @@ private _continue = if (_item isEqualType objNull) then { }; } forEach _loaded; - FILTER(_loaded,_x != nil); + FILTER(_loaded,!isNil "_x"); true }; From 80352519e193fa0b7344135b2adecd7244f1a469 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:42:08 +0100 Subject: [PATCH 03/22] conform isnil checking: common --- addons/common/functions/fnc_cbaSettings.sqf | 4 ++-- addons/common/functions/fnc_parseList.sqf | 2 +- addons/common/functions/fnc_readSettingFromModule.sqf | 2 +- addons/common/functions/fnc_readSettingsFromParamsArray.sqf | 2 +- addons/common/functions/fnc_receiveRequest.sqf | 2 +- addons/common/functions/fnc_resetAllDefaults.sqf | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf index 273c72323ee..65a07c6e764 100644 --- a/addons/common/functions/fnc_cbaSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -73,7 +73,7 @@ GVAR(settingsMovedToSQF) = []; #ifdef DEBUG_MODE_FULL INFO_1("checking settingsMovedToSQF [%1]",count GVAR(settingsMovedToSQF)); { - if (isNil _x) then { WARNING_1("setting [%1] NOT moved to sqf",_x); }; + if (isNil "_x") then { WARNING_1("setting [%1] NOT moved to sqf",_x); }; } forEach GVAR(settingsMovedToSQF); #endif }] call CBA_fnc_addEventHandler; @@ -107,7 +107,7 @@ for "_index" from 0 to (_countOptions - 1) do { if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then { WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName); } else { - if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { + if ((isNil "_settingName") && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { // New setting, that was first defined in missionConfigFile INFO_1("Creating new CBA setting for ace_setting from mission config [%1]",_settingName); [_optionEntry] call FUNC(cbaSettings_loadFromConfig); diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index d3e2871f447..b6a3d079a78 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -43,7 +43,7 @@ if (_checkNil) then { private _nilCheckedList = []; { - if !(isNil _x) then { + if (!isNil "_x") then { _nilCheckedList pushBack (missionNamespace getVariable _x); }; false diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index d61671d604c..9ddc293105c 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -22,7 +22,7 @@ params ["_logic", "_settingName", "_moduleVariable"]; // Check if the variable is already defined -if (isNil _settingName) exitWith { +if (isNil "_settingName") exitWith { ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName); }; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index e205fb15bfa..7f0463a04dc 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -31,7 +31,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); TRACE_3("ace_setting",_title,_settingName,_settingValue); // Check if the variable is already defined - if (isNil _settingName) exitWith { + if (isNil "_settingName") exitWith { ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); }; diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index e2f25ed7348..3a3d0f6ec52 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -33,7 +33,7 @@ if (isLocalized _requestMessage) then { hint format ["%1", _requestMessage]; // @todo ? -if !(isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then { +if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then { terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT); }; diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index dc638e49478..be2b5a6cc8a 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -23,7 +23,7 @@ _unit setVariable ["ACE_isUnconscious", nil, true]; if (isPlayer _unit) then { [true] call FUNC(setVolume); - if !(isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then { + if (!isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then { // clear all disable user input { [_x, false] call FUNC(setDisableUserInputStatus); From c33112333e38bfe10c04fd2555816f9601d752e9 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:42:25 +0100 Subject: [PATCH 04/22] conform isnil checking: fastroping --- addons/fastroping/functions/fnc_onRopeBreak.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fastroping/functions/fnc_onRopeBreak.sqf b/addons/fastroping/functions/fnc_onRopeBreak.sqf index 023e53f762b..9c089f5c91c 100644 --- a/addons/fastroping/functions/fnc_onRopeBreak.sqf +++ b/addons/fastroping/functions/fnc_onRopeBreak.sqf @@ -42,7 +42,7 @@ private _unit = { if (_x isKindOf "CAManBase") exitWith {_x}; } forEach (attachedObjects (_brokenRope select 3)); -if !(isNil "_unit") then { +if (!isNil "_unit") then { if (_part == "top") then { detach _unit; } else { From b8329e8937f620095973bde7b0c38d548fc33e9e Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:42:34 +0100 Subject: [PATCH 05/22] conform isnil checking: gunbag --- addons/gunbag/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index 8f313ba4727..c3a98792f68 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -35,7 +35,7 @@ PREP_RECOMPILE_END; [QEGVAR(arsenal,displayClosed), { - if !(isNil QGVAR(arsenalCache)) then { + if (!isNil QGVAR(arsenalCache)) then { (backpackContainer EGVAR(arsenal,center)) setVariable [QGVAR(gunbagWeapon),GVAR(arsenalCache), true]; }; From 1def9cbcb75598dd6dd837e782c933b66d669a16 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:43:08 +0100 Subject: [PATCH 06/22] conform isnil checking: interact_menu --- addons/interact_menu/functions/fnc_compileMenu.sqf | 4 ++-- addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf | 4 ++-- addons/interact_menu/functions/fnc_compileMenuZeus.sqf | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 7c30196c2bc..7f36247e225 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -24,7 +24,7 @@ if (_target isEqualType objNull) then { private _namespace = GVAR(ActNamespace); // Exit if the action menu is already compiled for this class -if !(isNil {_namespace getVariable _objectType}) exitWith {}; +if (!isNil {_namespace getVariable _objectType}) exitWith {}; if (_objectType isKindOf "VirtualMan_F") exitWith { // these have config: isPlayableLogic = 1 TRACE_1("skipping playable logic",_objectType); @@ -41,7 +41,7 @@ private _recurseFnc = { { private _entryCfg = _x; - if(isClass _entryCfg) then { + if (isClass _entryCfg) then { private _displayName = getText (_entryCfg >> "displayName"); private _distance = _parentDistance; if (isNumber (_entryCfg >> "distance")) then {_distance = getNumber (_entryCfg >> "distance");}; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 8a79fe99e14..879ca7b1384 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -24,7 +24,7 @@ if (_target isEqualType objNull) then { private _namespace = GVAR(ActSelfNamespace); // Exit if the action menu is already compiled for this class -if !(isNil {_namespace getVariable _objectType}) exitWith {}; +if (!isNil {_namespace getVariable _objectType}) exitWith {}; private _recurseFnc = { @@ -34,7 +34,7 @@ private _recurseFnc = { { private _entryCfg = _x; - if(isClass _entryCfg) then { + if (isClass _entryCfg) then { private _displayName = getText (_entryCfg >> "displayName"); private _icon = if (isArray (_entryCfg >> "icon")) then { diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index af28bf22846..c1f4dc08587 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -16,7 +16,7 @@ */ // Exit if the action menu is already compiled for zeus -if !(isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {}; +if (!isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {}; private _recurseFnc = { params ["_actionsCfg"]; @@ -24,7 +24,7 @@ private _recurseFnc = { { private _entryCfg = _x; - if(isClass _entryCfg) then { + if (isClass _entryCfg) then { private _displayName = getText (_entryCfg >> "displayName"); private _icon = if (isArray (_entryCfg >> "icon")) then { From 7fe5401f6a3c8b51228800cc59a074bc8f958135 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:43:20 +0100 Subject: [PATCH 07/22] conform isnil checking: laser --- addons/laser/functions/fnc_shootRay.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index ecd16fc0d4b..1fff8d57181 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -46,7 +46,7 @@ if (!(_intersects isEqualTo [])) then { TRACE_3("", _resultPos, _distance, _intersects); #ifdef DRAW_LASER_INFO -if !(isNil "_resultPos") then { +if (!isNil "_resultPos") then { private _text = [_distance, 4, 0] call CBA_fnc_formatNumber; drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLtoAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"]; drawLine3D [ASLtoAGL _posASL, ASLtoAGL _resultPos, [0,1,0,1]]; From dbd6f39794ad71ceb752ecb198d46883c827abd3 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:43:40 +0100 Subject: [PATCH 08/22] conform isnil checking: medical_feedback --- addons/medical_feedback/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index 2f18bc15833..66080c984cf 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -117,7 +117,7 @@ GVAR(bloodTickCounter) = 0; #ifdef DISABLE_VANILLA_DAMAGE_EFFECTS TRACE_1("disabling vanilla bleeding feedback effects",_this); [{ - {isNil _x} count [ + {isNil "_x"} count [ "BIS_fnc_feedback_damageCC", "BIS_fnc_feedback_damageRadialBlur", "BIS_fnc_feedback_damageBlur" From 0439cd87389bf808fd8235b795661ab040ccc677 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:43:54 +0100 Subject: [PATCH 09/22] conform isnil checking: medical_treatment --- addons/medical_treatment/functions/fnc_onMedicationUsage.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index 1f9ef981dde..bc96aa979cc 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -53,7 +53,7 @@ if !(_overdosedMedications isEqualTo []) then { TRACE_1("CriticalVitals Event",_target); // make unconscious [QEGVAR(medical,CriticalVitals), _target] call CBA_fnc_localEvent; }; - if (isNil _onOverDose) then { + if (isNil "_onOverDose") then { _onOverDose = compile _onOverDose; } else { _onOverDose = missionNamespace getVariable _onOverDose; From b5a09088244a923a566385ffff1dc64786bb3f37 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:44:07 +0100 Subject: [PATCH 10/22] conform isnil checking: modules --- addons/modules/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index c6892046fe5..062b005589b 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -20,7 +20,7 @@ private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getNumber (_config >> "isGlobal") > 1; private _isSingular = getNumber (_config >> "isSingular") > 0; private _function = getText (_config >> "function"); - if (isNil _function) then { + if (isNil "_function") then { _function = compile _function; } else { _function = missionNamespace getVariable _function; From 84649c8c8d1b3bfefc21efcd745558a0a6f55ec2 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:44:42 +0100 Subject: [PATCH 11/22] conform isnil checking: overpressure --- addons/overpressure/functions/fnc_firedEHBB.sqf | 2 +- addons/overpressure/functions/fnc_firedEHOP.sqf | 2 +- addons/overpressure/functions/fnc_overpressureDamage.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 2d1d0f783cf..add64684721 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil _varName) then { +private _var = if (isNil "_varName") then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index 5871fae9b87..95485f890dd 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil _varName) then { +private _var = if (isNil "_varName") then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index 119c19ebb25..b2f01c0ddf8 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -25,7 +25,7 @@ params ["_firer", "_posASL", "_direction", "_weapon", "_magazine", "_ammo"]; // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil _varName) then { +private _var = if (isNil "_varName") then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; From 22c44629f7a317a66e0e042e6e45a87b6b6cb4fe Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:44:53 +0100 Subject: [PATCH 12/22] conform isnil checking: rearm --- addons/rearm/functions/fnc_readSupplyCounter.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rearm/functions/fnc_readSupplyCounter.sqf b/addons/rearm/functions/fnc_readSupplyCounter.sqf index 11abdc3ae83..238e618dd2d 100644 --- a/addons/rearm/functions/fnc_readSupplyCounter.sqf +++ b/addons/rearm/functions/fnc_readSupplyCounter.sqf @@ -51,7 +51,7 @@ if (GVAR(supply) == 1) then { private _numChars = count (localize LSTRING(Hint_RemainingAmmo)); private _text = ""; private _magazines = _truck getVariable QGVAR(magazineSupply); - if !(isNil "_magazines") then { + if (!isNil "_magazines") then { { _x params ["_magazineClass", "_rounds"]; private _line = format ["%1: %2", _magazineClass call FUNC(getMagazineName), _rounds]; From 1872b06235247d08f29f10b7b75ccae5ec7efea8 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:46:05 +0100 Subject: [PATCH 13/22] conform isnil checking: repair --- addons/repair/functions/fnc_canRepair.sqf | 4 ++-- addons/repair/functions/fnc_repair.sqf | 8 ++++---- addons/repair/functions/fnc_repair_failure.sqf | 2 +- addons/repair/functions/fnc_repair_success.sqf | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 8172e1d188f..495e3dd8748 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -48,7 +48,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa private _return = true; if (getText (_config >> "condition") != "") then { private _condition = getText (_config >> "condition"); - if (isNil _condition) then { + if (isNil "_condition") then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -77,7 +77,7 @@ if (!("All" in _repairLocations)) then { if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if !(isNil _x) exitWith { + if (!isNil "_x") exitWith { private _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 10aea66823c..c75cf03a0b9 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -54,7 +54,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa private _return = true; if (getText (_config >> "condition") != "") then { private _condition = getText (_config >> "condition"); - if (isNil _condition) then { + if (isNil "_condition") then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -82,7 +82,7 @@ if (!("All" in _repairLocations)) then { if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if !(isNil _x) exitWith { + if (!isNil "_x") exitWith { private _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { @@ -139,7 +139,7 @@ if (_callbackProgress == "") then { (alive _target) && {(abs speed _target) < 1} // make sure vehicle doesn't drive off }; } else { - if (isNil _callbackProgress) then { + if (isNil "_callbackProgress") then { _callbackProgress = compile _callbackProgress; } else { _callbackProgress = missionNamespace getVariable _callbackProgress; @@ -192,7 +192,7 @@ if (_repairTime < 0) then { } else { if (isText (_config >> "repairingTime")) exitWith { private _repairTimeConfig = getText (_config >> "repairingTime"); - if (isNil _repairTimeConfig) then { + if (isNil "_repairTimeConfig") then { _repairTimeConfig = compile _repairTimeConfig; } else { _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index 83cce85e0dc..b1996800bc3 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -56,7 +56,7 @@ if (_weaponSelect != "") then { private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackFailure"); -if (isNil _callback) then { +if (isNil "_callback") then { _callback = compile _callback; } else { _callback = missionNamespace getVariable _callback; diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index a86be84244d..62b0f5585ab 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -51,7 +51,7 @@ if (_weaponSelect != "") then { private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackSuccess"); -if (isNil _callback) then { +if (isNil "_callback") then { _callback = compile _callback; } else { _callback = missionNamespace getVariable _callback; From 6a8c9f0ea826d5f86b29f2ceaaf9130919a6f7e3 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:46:14 +0100 Subject: [PATCH 14/22] conform isnil checking: respawn --- addons/respawn/functions/fnc_initRallypoint.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 0286813cef7..8711600f58b 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -21,7 +21,7 @@ params ["_rallypoint", "_respawnMarker", "_side"]; private _name = typeOf _rallypoint; -if (isNil _name) then { +if (isNil "_name") then { missionNamespace setVariable [_name, _rallypoint]; _rallypoint setVariable [QGVAR(side), _side]; From a24c3d52ad9ad507a01244e8566ae5f49fdd7d45 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:46:39 +0100 Subject: [PATCH 15/22] conform isnil checking: scopes --- addons/scopes/XEH_postInit.sqf | 2 +- addons/scopes/functions/fnc_showZeroing.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index a7720c62f54..23530f868b1 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -34,7 +34,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; _layer cutText ["", "PLAIN", 0]; - if !(isNil QGVAR(fadePFH)) then { + if (!isNil QGVAR(fadePFH)) then { [GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler; GVAR(fadePFH) = nil; }; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index ada869b5fdf..679ebdb08a6 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -67,7 +67,7 @@ if (GVAR(simplifiedZeroing)) then { // Set the time when to hide the knobs GVAR(timeToHide) = diag_tickTime + 3.0; -if !(isNil QGVAR(fadePFH)) exitWith {}; +if (!isNil QGVAR(fadePFH)) exitWith {}; // Launch a PFH to wait and fade out the knobs GVAR(fadePFH) = [{ From 275b5edd95ee44d2be8d933273b66d1a8032343a Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:47:18 +0100 Subject: [PATCH 16/22] conform isnil checking: spectator --- .../functions/fnc_getCameraAttributes.sqf | 2 +- .../functions/fnc_setCameraAttributes.sqf | 22 +++++++++---------- addons/spectator/functions/fnc_ui.sqf | 2 +- .../functions/fnc_ui_handleMapDraw.sqf | 2 +- .../functions/fnc_updateCameraModes.sqf | 2 +- .../functions/fnc_updateVisionModes.sqf | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/spectator/functions/fnc_getCameraAttributes.sqf b/addons/spectator/functions/fnc_getCameraAttributes.sqf index d9e53082edf..9998d374313 100644 --- a/addons/spectator/functions/fnc_getCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_getCameraAttributes.sqf @@ -15,7 +15,7 @@ * Public: Yes */ -if !(isNil QGVAR(camera)) then { +if (!isNil QGVAR(camera)) then { [GVAR(camMode), GVAR(camFocus), GVAR(camVision), getPosATL GVAR(camera), getDirVisual GVAR(camera)] } else { // These values could be pre-set by function diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index 2ee5140d80f..91db9c70c7d 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -42,13 +42,13 @@ params [ ]; // Apply if camera exists -if !(isNil QGVAR(camera)) then { +if (!isNil QGVAR(camera)) then { // These functions are smart and handle unavailable inputs - if !(isNil "_focus") then { + if (!isNil "_focus") then { [_focus] call FUNC(setFocus); }; - if !(isNil "_mode") then { + if (!isNil "_mode") then { // If mode not free and no focus, find focus if ((_mode != MODE_FREE) && {isNull GVAR(camFocus)}) then { [true] call FUNC(setFocus); @@ -57,19 +57,19 @@ if !(isNil QGVAR(camera)) then { [_mode] call FUNC(cam_setCameraMode); }; - if !(isNil "_vision") then { + if (!isNil "_vision") then { [_vision] call FUNC(cam_setVisionMode); }; - if !(isNil "_position") then { + if (!isNil "_position") then { GVAR(camera) setPosATL _position; }; - if !(isNil "_direction") then { + if (!isNil "_direction") then { GVAR(camera) setDir _direction; }; } else { - if !(isNil "_focus") then { + if (!isNil "_focus") then { // If there are no entities this becomes nil, handled on camera startup if (_focus isEqualType true) then { _focus = ([] call FUNC(getTargetEntities)) select 0; @@ -78,20 +78,20 @@ if !(isNil QGVAR(camera)) then { GVAR(camFocus) = _focus; }; - if !(isNil "_mode") then { + if (!isNil "_mode") then { GVAR(camMode) = _mode; }; - if !(isNil "_vision") then { + if (!isNil "_vision") then { GVAR(camVision) = _vision; }; // GVARs exits purely for pre-setting of these attributes - if !(isNil "_position") then { + if (!isNil "_position") then { GVAR(camPos) = ATLtoASL _position; }; - if !(isNil "_direction") then { + if (!isNil "_direction") then { GVAR(camDir) = _direction; }; }; diff --git a/addons/spectator/functions/fnc_ui.sqf b/addons/spectator/functions/fnc_ui.sqf index b254f9cff82..f97dea3eb82 100644 --- a/addons/spectator/functions/fnc_ui.sqf +++ b/addons/spectator/functions/fnc_ui.sqf @@ -33,7 +33,7 @@ while {dialog} do { BIS_fnc_feedback_allowPP = !_init; // Removes death blur if present -if !(isNil "BIS_DeathBlur") then { +if (!isNil "BIS_DeathBlur") then { BIS_DeathBlur ppEffectAdjust [0]; BIS_DeathBlur ppEffectCommit 0; }; diff --git a/addons/spectator/functions/fnc_ui_handleMapDraw.sqf b/addons/spectator/functions/fnc_ui_handleMapDraw.sqf index 0602c7b4d2d..676774df2df 100644 --- a/addons/spectator/functions/fnc_ui_handleMapDraw.sqf +++ b/addons/spectator/functions/fnc_ui_handleMapDraw.sqf @@ -76,7 +76,7 @@ GVAR(uiMapHighlighted) = _nearestEntity; CTRL_MAP_FOOTER ctrlSetText _text; // Draw camera icon -if !(isNil QGVAR(camera)) then { +if (!isNil QGVAR(camera)) then { private _cameraPos = getPosASLVisual GVAR(camera); private _cameraDir = getDirVisual GVAR(camera); _map drawIcon [ICON_CAMERA, [0.5, 1, 0.5, 1], _cameraPos, 32, 48, _cameraDir, "", 1, 0.05, "TahomaB", "right"]; diff --git a/addons/spectator/functions/fnc_updateCameraModes.sqf b/addons/spectator/functions/fnc_updateCameraModes.sqf index f6408c786d1..c3adf327daa 100644 --- a/addons/spectator/functions/fnc_updateCameraModes.sqf +++ b/addons/spectator/functions/fnc_updateCameraModes.sqf @@ -45,7 +45,7 @@ if (_newModes isEqualTo []) then { }; // Update camera in case of change -if !(isNil QGVAR(camera)) then { +if (!isNil QGVAR(camera)) then { // If mode was free and no longer available, find a focus if (!(MODE_FREE in _newModes) && {GVAR(camMode) == MODE_FREE} && {isNull GVAR(camFocus)}) then { [true] call FUNC(setFocus); diff --git a/addons/spectator/functions/fnc_updateVisionModes.sqf b/addons/spectator/functions/fnc_updateVisionModes.sqf index eb0e07f256d..ba19bca86b2 100644 --- a/addons/spectator/functions/fnc_updateVisionModes.sqf +++ b/addons/spectator/functions/fnc_updateVisionModes.sqf @@ -53,7 +53,7 @@ if (_newModes isEqualTo []) then { }; // Update camera in case of change -if !(isNil QGVAR(camera)) then { +if (!isNil QGVAR(camera)) then { [GVAR(camVision)] call FUNC(cam_setVisionMode); }; From 69480998ae297643338027f72e16c6bf4bab90ff Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:47:28 +0100 Subject: [PATCH 17/22] conform isnil checking: tagging --- addons/tagging/functions/fnc_createTag.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index 5f2a60cf86a..ed7214d8739 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -46,7 +46,7 @@ if (_object getVariable [QGVAR(testVar), false]) then { // If the object already has tags attached, just add the new one to the list private _attachedTags = _object getVariable QGVAR(attachedTags); - if !(isNil "_attachedTags ") exitWith { + if (!isNil "_attachedTags ") exitWith { _attachedTags pushBack _tag; }; From 56ef0c6d65b448bff9a056c87d0839fda12593f2 Mon Sep 17 00:00:00 2001 From: Whigital Date: Tue, 11 Feb 2020 23:47:36 +0100 Subject: [PATCH 18/22] conform isnil checking: zeus --- addons/zeus/functions/fnc_moduleSuicideBomber.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf index c659ca7a9ab..47ada09c00a 100644 --- a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -77,7 +77,7 @@ if (_autoSeek) then { private _nearestObjects = nearestObjects [_unit, [], _range] select {side _x == _activationSide && {_x != _unit} && {alive _x}}; #ifdef DEBUG_MODE_FULL - if !(isNil "_lastMove") then { + if (!isNil "_lastMove") then { drawLine3D [_unit modelToWorldVisual [0, 0, 1], _lastMove, [1, 0, 0, 1]]; }; for "_i" from 0 to 35 do { From 8c2f53ac148814a78cf7a7c436d9f8bacca9c1cc Mon Sep 17 00:00:00 2001 From: Whigital Date: Wed, 12 Feb 2020 22:07:19 +0100 Subject: [PATCH 19/22] Revert quotation on string args --- addons/common/functions/fnc_cbaSettings.sqf | 4 ++-- addons/common/functions/fnc_parseList.sqf | 2 +- addons/common/functions/fnc_readSettingFromModule.sqf | 2 +- .../common/functions/fnc_readSettingsFromParamsArray.sqf | 2 +- addons/medical_feedback/XEH_postInit.sqf | 2 +- .../medical_treatment/functions/fnc_onMedicationUsage.sqf | 2 +- addons/modules/XEH_postInit.sqf | 2 +- addons/overpressure/functions/fnc_firedEHBB.sqf | 2 +- addons/overpressure/functions/fnc_firedEHOP.sqf | 2 +- addons/overpressure/functions/fnc_overpressureDamage.sqf | 2 +- addons/repair/functions/fnc_canRepair.sqf | 4 ++-- addons/repair/functions/fnc_repair.sqf | 8 ++++---- addons/repair/functions/fnc_repair_failure.sqf | 2 +- addons/repair/functions/fnc_repair_success.sqf | 2 +- addons/respawn/functions/fnc_initRallypoint.sqf | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf index 65a07c6e764..273c72323ee 100644 --- a/addons/common/functions/fnc_cbaSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -73,7 +73,7 @@ GVAR(settingsMovedToSQF) = []; #ifdef DEBUG_MODE_FULL INFO_1("checking settingsMovedToSQF [%1]",count GVAR(settingsMovedToSQF)); { - if (isNil "_x") then { WARNING_1("setting [%1] NOT moved to sqf",_x); }; + if (isNil _x) then { WARNING_1("setting [%1] NOT moved to sqf",_x); }; } forEach GVAR(settingsMovedToSQF); #endif }] call CBA_fnc_addEventHandler; @@ -107,7 +107,7 @@ for "_index" from 0 to (_countOptions - 1) do { if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then { WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName); } else { - if ((isNil "_settingName") && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { + if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { // New setting, that was first defined in missionConfigFile INFO_1("Creating new CBA setting for ace_setting from mission config [%1]",_settingName); [_optionEntry] call FUNC(cbaSettings_loadFromConfig); diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index b6a3d079a78..7f5bb592948 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -43,7 +43,7 @@ if (_checkNil) then { private _nilCheckedList = []; { - if (!isNil "_x") then { + if (!isNil _x) then { _nilCheckedList pushBack (missionNamespace getVariable _x); }; false diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index 9ddc293105c..d61671d604c 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -22,7 +22,7 @@ params ["_logic", "_settingName", "_moduleVariable"]; // Check if the variable is already defined -if (isNil "_settingName") exitWith { +if (isNil _settingName) exitWith { ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName); }; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 7f0463a04dc..e205fb15bfa 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -31,7 +31,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); TRACE_3("ace_setting",_title,_settingName,_settingValue); // Check if the variable is already defined - if (isNil "_settingName") exitWith { + if (isNil _settingName) exitWith { ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); }; diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index 66080c984cf..2f18bc15833 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -117,7 +117,7 @@ GVAR(bloodTickCounter) = 0; #ifdef DISABLE_VANILLA_DAMAGE_EFFECTS TRACE_1("disabling vanilla bleeding feedback effects",_this); [{ - {isNil "_x"} count [ + {isNil _x} count [ "BIS_fnc_feedback_damageCC", "BIS_fnc_feedback_damageRadialBlur", "BIS_fnc_feedback_damageBlur" diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index bc96aa979cc..1f9ef981dde 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -53,7 +53,7 @@ if !(_overdosedMedications isEqualTo []) then { TRACE_1("CriticalVitals Event",_target); // make unconscious [QEGVAR(medical,CriticalVitals), _target] call CBA_fnc_localEvent; }; - if (isNil "_onOverDose") then { + if (isNil _onOverDose) then { _onOverDose = compile _onOverDose; } else { _onOverDose = missionNamespace getVariable _onOverDose; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 062b005589b..c6892046fe5 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -20,7 +20,7 @@ private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getNumber (_config >> "isGlobal") > 1; private _isSingular = getNumber (_config >> "isSingular") > 0; private _function = getText (_config >> "function"); - if (isNil "_function") then { + if (isNil _function) then { _function = compile _function; } else { _function = missionNamespace getVariable _function; diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index add64684721..2d1d0f783cf 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil "_varName") then { +private _var = if (isNil _varName) then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index 95485f890dd..5871fae9b87 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil "_varName") then { +private _var = if (isNil _varName) then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index b2f01c0ddf8..119c19ebb25 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -25,7 +25,7 @@ params ["_firer", "_posASL", "_direction", "_weapon", "_magazine", "_ammo"]; // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil "_varName") then { +private _var = if (isNil _varName) then { [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { missionNameSpace getVariable _varName; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 495e3dd8748..2b9ac713643 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -48,7 +48,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa private _return = true; if (getText (_config >> "condition") != "") then { private _condition = getText (_config >> "condition"); - if (isNil "_condition") then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -77,7 +77,7 @@ if (!("All" in _repairLocations)) then { if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if (!isNil "_x") exitWith { + if (!isNil _x) exitWith { private _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index c75cf03a0b9..1c0707f7eda 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -54,7 +54,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa private _return = true; if (getText (_config >> "condition") != "") then { private _condition = getText (_config >> "condition"); - if (isNil "_condition") then { + if (isNil _condition) then { _condition = compile _condition; } else { _condition = missionNamespace getVariable _condition; @@ -82,7 +82,7 @@ if (!("All" in _repairLocations)) then { if (_x == "field") exitWith {_return = true;}; if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;}; if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;}; - if (!isNil "_x") exitWith { + if (!isNil _x) exitWith { private _val = missionNamespace getVariable _x; if (_val isEqualType 0) then { _return = switch (_val) do { @@ -139,7 +139,7 @@ if (_callbackProgress == "") then { (alive _target) && {(abs speed _target) < 1} // make sure vehicle doesn't drive off }; } else { - if (isNil "_callbackProgress") then { + if (isNil _callbackProgress) then { _callbackProgress = compile _callbackProgress; } else { _callbackProgress = missionNamespace getVariable _callbackProgress; @@ -192,7 +192,7 @@ if (_repairTime < 0) then { } else { if (isText (_config >> "repairingTime")) exitWith { private _repairTimeConfig = getText (_config >> "repairingTime"); - if (isNil "_repairTimeConfig") then { + if (isNil _repairTimeConfig) then { _repairTimeConfig = compile _repairTimeConfig; } else { _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index b1996800bc3..83cce85e0dc 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -56,7 +56,7 @@ if (_weaponSelect != "") then { private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackFailure"); -if (isNil "_callback") then { +if (isNil _callback) then { _callback = compile _callback; } else { _callback = missionNamespace getVariable _callback; diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index 62b0f5585ab..a86be84244d 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -51,7 +51,7 @@ if (_weaponSelect != "") then { private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); private _callback = getText (_config >> "callbackSuccess"); -if (isNil "_callback") then { +if (isNil _callback) then { _callback = compile _callback; } else { _callback = missionNamespace getVariable _callback; diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 8711600f58b..0286813cef7 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -21,7 +21,7 @@ params ["_rallypoint", "_respawnMarker", "_side"]; private _name = typeOf _rallypoint; -if (isNil "_name") then { +if (isNil _name) then { missionNamespace setVariable [_name, _rallypoint]; _rallypoint setVariable [QGVAR(side), _side]; From ab7bb110914b0d9e0e194bc6d2748ac0e774c4d3 Mon Sep 17 00:00:00 2001 From: Whigital Date: Wed, 12 Feb 2020 22:07:57 +0100 Subject: [PATCH 20/22] Remove excessive brackets --- addons/arsenal/XEH_postInit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf index 664f175bae0..5623439cda6 100644 --- a/addons/arsenal/XEH_postInit.sqf +++ b/addons/arsenal/XEH_postInit.sqf @@ -24,7 +24,7 @@ GVAR(lastSearchTextLoadouts) = ""; [QGVAR(loadoutUnshared), { params ["_contentPanelCtrl" , "_playerName", "_loadoutName"]; - if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { private _dataToCheck = _playerName + _loadoutName; @@ -52,7 +52,7 @@ GVAR(lastSearchTextLoadouts) = ""; params ["_contentPanelCtrl" ,"_loadoutArgs"]; _loadoutArgs params ["_playerName", "_loadoutName", "_loadoutData"]; - if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { private _curSelData =_contentPanelCtrl lnbData [(lnbCurSelRow _contentPanelCtrl), 1]; ([_loadoutData] call FUNC(verifyLoadout)) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount"]; From 6244975316f95f9c7a0738432c0dcaf9092f22dd Mon Sep 17 00:00:00 2001 From: Whigital Date: Thu, 13 Feb 2020 10:33:31 +0100 Subject: [PATCH 21/22] Remove extraneous whitespaces Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> --- addons/tagging/functions/fnc_createTag.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index ed7214d8739..032fdc69cc2 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -46,7 +46,7 @@ if (_object getVariable [QGVAR(testVar), false]) then { // If the object already has tags attached, just add the new one to the list private _attachedTags = _object getVariable QGVAR(attachedTags); - if (!isNil "_attachedTags ") exitWith { + if (!isNil "_attachedTags") exitWith { _attachedTags pushBack _tag; }; From 78d79f27613320db34700d0064c01d72ff94c4f5 Mon Sep 17 00:00:00 2001 From: Whigital Date: Thu, 13 Feb 2020 17:16:35 +0100 Subject: [PATCH 22/22] More excessive brackets --- addons/arsenal/functions/fnc_onSelChangedLeft.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index a314a34965a..f2bdc482947 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -23,10 +23,10 @@ private _display = ctrlParent _control; private _item = [_control lnbData [_curSel, 0], _control lbData _curSel] select !(ctrlType _control == 102); private _weaponDefaultRightPanel = _display displayCtrl IDC_buttonOptic; -private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]}); +private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]}); private _containerDefaultRightPanel = _display displayCtrl IDC_buttonMisc; -private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]}); +private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]}); private _fnc_clearPreviousWepMags = { private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines");