conform isnil checking: arsenal

This commit is contained in:
Whigital 2020-02-11 23:40:15 +01:00
parent ab03def564
commit 57b411b8a4
7 changed files with 9 additions and 9 deletions

View File

@ -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"];

View File

@ -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;

View File

@ -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;

View File

@ -46,7 +46,7 @@ private _hideUnusedFnc = {
} forEach _numbers;
};
if !(isNil "_itemCfg") then {
if (!isNil "_itemCfg") then {
private _handleStatsFnc = {
params ["_statsIndex", "_leftPanel"];

View File

@ -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;
};

View File

@ -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");

View File

@ -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);