General - Utilize isNotEqualTo command (#8732)

* Utilize isNotEqualTo command

* fix pr validation
This commit is contained in:
Serg Vergun 2021-12-19 02:15:32 +03:00 committed by GitHub
parent 5332059738
commit af86109c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 26 additions and 26 deletions

View File

@ -37,11 +37,11 @@ GVAR(AssignedItemsShownItems) = [
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
GVAR(AssignedItemsShownItems) = [
!((_assignedItems select 0) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},
!((_assignedItems select 3) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"},
!((_assignedItems select 4) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"},
!((_assignedItems select 2) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"},
!((_assignedItems select 1) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"}
((_assignedItems select 0) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},
((_assignedItems select 3) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"},
((_assignedItems select 4) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"},
((_assignedItems select 2) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"},
((_assignedItems select 1) isNotEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"}
];
GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"];

View File

@ -15,7 +15,7 @@
params ["_vehicle", ["_effects", []]];
_effects = _effects + (_vehicle getVariable [QGVAR(effects), []]);
if !(_effects isEqualTo []) then {
if (_effects isNotEqualTo []) then {
{ deleteVehicle _x } count _effects;
};
}] call CBA_fnc_addEventHandler;

View File

@ -34,7 +34,7 @@ _vehicle setVariable [QGVAR(isCookingOff), true, true];
_intensity = _intensity min _maxIntensity;
private _config = _vehicle call CBA_fnc_getObjectConfig;
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])};
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {(_vehicle selectionPosition _x) isNotEqualTo [0,0,0]};
if (_positions isEqualTo []) then {
WARNING_1("no valid selection for cookoff found. %1",typeOf _vehicle);

View File

@ -31,7 +31,7 @@ private _effects = [_smokeBarrel];
{
private _position = [0, -2, 0];
if !(_x isEqualTo "#noselection") then {
if (_x isNotEqualTo "#noselection") then {
_position = _vehicle selectionPosition _x;
};

View File

@ -137,7 +137,7 @@ if (_isBurning) exitWith {};
};
// always keep flare visible to perceiving unit as long as it isnt the player
if !(_unit isEqualTo ace_player) then {
if (_unit isNotEqualTo ace_player) then {
private _relativeAttachPoint = [0, 0, 0.3];
if (_distanceToUnit > 1.5) then {
_relativeAttachPoint = (vectorNormalized (_unit worldToModelVisual (getPos ace_player))) vectorMultiply linearConversion [5, 30, _distanceToUnit, 0.5, 1.5];
@ -162,7 +162,7 @@ if (_isBurning) exitWith {};
[QGVAR(burn), [ace_player, _intensity * (7 / 8), _instigator]] call CBA_fnc_globalEvent;
};
} else {
if ((ace_player isKindOf "Man") && { !(_unit isEqualTo ace_player) }) then {
if ((ace_player isKindOf "Man") && {_unit isNotEqualTo ace_player}) then {
private _burnCounter = ace_player getVariable [QGVAR(burnCounter), 0];
if (_distanceToUnit < BURN_PROPOGATE_DISTANCE) then {
if (_burnCounter < BURN_PROPOGATE_COUNTER_MAX) then {
@ -279,7 +279,7 @@ if (_isBurning) exitWith {};
_lightFlare setLightFlareMaxDistance 100;
_lightFlare setLightFlareSize 0;
if !(_unit isEqualTo ace_player) then {
if (_unit isNotEqualTo ace_player) then {
private _relativeAttachPoint = (vectorNormalized (_unit worldToModelVisual (getPos ace_player))) vectorMultiply 1;
_relativeAttachPoint set [2, 0.5];
_lightFlare attachTo [_unit, _relativeAttachPoint];

View File

@ -18,7 +18,7 @@ params ["_unit", ["_throwWeapon", true]];
if (
_throwWeapon
&& {GVAR(dropWeapon) > 0}
&& {_unit in _unit && { !(currentWeapon _unit isEqualTo "") }}
&& {_unit in _unit && {(currentWeapon _unit) isNotEqualTo ""}}
&& {!isPlayer _unit || GVAR(dropWeapon >= 2)}
) then {
[_unit] call EFUNC(hitreactions,throwWeapon);

View File

@ -28,7 +28,7 @@ params ["_args", "_handle"];
_value params ["_source", "_radius", "_intensity"];
private _attachedObject = attachedTo _source;
private _sourcePos = getPosATL _source;
if !(_attachedObject isEqualTo objNull) then {
if (_attachedObject isNotEqualTo objNull) then {
_sourcePos = getPosATL _attachedObject;
};

View File

@ -65,11 +65,11 @@ private _numTransferredHC3 = 0;
// Transfer AI groups
{
// No transfer if empty group
private _transfer = !(units _x isEqualTo []) && {!(_x getVariable [QXGVAR(blacklist), false])};
private _transfer = ((units _x) isNotEqualTo []) && {!(_x getVariable [QXGVAR(blacklist), false])};
if (_transfer) then {
// No transfer if waypoints with synchronized triggers exist for the group
private _allWaypointsWithTriggers = (waypoints _x) select {!((synchronizedTriggers _x) isEqualTo [])};
if !(_allWaypointsWithTriggers isEqualTo []) exitWith {
private _allWaypointsWithTriggers = (waypoints _x) select {(synchronizedTriggers _x) isNotEqualTo []};
if (_allWaypointsWithTriggers isNotEqualTo []) exitWith {
_transfer = false;
};

View File

@ -27,7 +27,7 @@ ctrlPosition _controlsGroup params ["_posX", "_posY"];
private _ctrlContent = _controlsGroup controlsGroupCtrl IDC_CONTENT;
private _data = ctrlText _ctrlContent;
if !(_data isEqualTo GET_DATA(_index)) then {
if (_data isNotEqualTo GET_DATA(_index)) then {
SET_DATA(_index,_data);
};

View File

@ -26,7 +26,7 @@
_display displayAddEventHandler ["Unload", {
params ["_display", "_exitCode"];
if !(_exitCode isEqualTo 1) exitWith {};
if (_exitCode isNotEqualTo 1) exitWith {};
private _group = _display getVariable QGVAR(renamedGroup);
private _textCtrl = _display displayCtrl 451;

View File

@ -343,7 +343,7 @@
// init marker scale slider
_aceScaleSlider sliderSetRange [0.5, 2.0];
if !(GVAR(editingMarker) isEqualTo "") then {
if (GVAR(editingMarker) isNotEqualTo "") then {
//get the original scale
GVAR(currentMarkerScale) = (markerSize GVAR(editingMarker)) param [0, 1];
};

View File

@ -51,7 +51,7 @@ if (_closeNum isEqualTo 1) then {
// Add to list of user placed markers, and then filter for deleted
GVAR(userPlacedMarkers) pushBack _newestMarker;
GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {!((getMarkerPos _x) isEqualTo [0,0,0])};
GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {(getMarkerPos _x) isNotEqualTo [0,0,0]};
[QGVAR(setMarkerNetwork), [
_newestMarker, [

View File

@ -17,7 +17,7 @@
// Check for FRIES change
private _checkbox = CONTROL(ID_DIALOG) ID_CHECKBOX_FRIES;
if (ctrlShown _checkbox && {!((cbChecked _checkbox) isEqualTo (_checkbox getVariable QGVAR(originalState)))}) then {
if (ctrlShown _checkbox && {(cbChecked _checkbox) isNotEqualTo (_checkbox getVariable QGVAR(originalState))}) then {
if (cbChecked _checkbox) then {
[GVAR(currentAircraft)] call EFUNC(fastroping,equipFRIES);
} else {

View File

@ -24,7 +24,7 @@
params ["_identifier", "_displayName", "_requiredItem"];
// Add only if tag not already added (compare identifiers)
if !(GVAR(cachedTags) select {_x select 0 == _identifier} isEqualTo []) exitWith {
if ((GVAR(cachedTags) select {_x select 0 == _identifier}) isNotEqualTo []) exitWith {
INFO_2("Tag with selected identifier already exists: %1 (%2)",_identifier,_displayName)
};

View File

@ -146,7 +146,7 @@ private _chanceOfDetonation = 0;
private _explosiveAmmoCount = 0;
private _nonExplosiveAmmoCount = 0;
if !(count (_currentVehicleAmmo select 0) isEqualTo 0) then {
if (count (_currentVehicleAmmo select 0) isNotEqualTo 0) then {
private _magConfig = configFile >> "CfgMagazines";
private _ammoConfig = configFile >> "CfgAmmo";
private _countOfExplodableAmmo = 0;

View File

@ -22,7 +22,7 @@ params ["_newCameraView", "_cameraOn", ["_checkGunnerView", true]];
// Remote control hates switchCamera (control returns to player, camera is left on remotely controlled object/unit), make sure remote controlled units are not impacted
!(_newCameraView isEqualTo "GUNNER" && {_checkGunnerView}) &&
{!(_newCameraView isEqualTo "GROUP")} &&
{_newCameraView isNotEqualTo "GROUP"} &&
{!isNull ACE_player} &&
{player == ACE_player} &&
{alive ACE_player} &&

View File

@ -32,7 +32,7 @@ GVAR(preserveViewCameraViewEH) = ["cameraView", {
private _vehicle = vehicle _player;
private _vehicleClass = {if (_vehicle isKindOf _x) exitWith {_x}} forEach ["CAManBase", "LandVehicle", "Air", "Ship", "All"];
private _varName = QXGVAR(preserveView) + _vehicleClass;
if !(_cameraView isEqualTo (profileNamespace getVariable [_varName, ""])) then {
if (_cameraView isNotEqualTo (profileNamespace getVariable [_varName, ""])) then {
profileNamespace setVariable [_varName, _cameraView];
};
}] call CBA_fnc_addPlayerEventHandler;
@ -44,7 +44,7 @@ GVAR(preserveViewVehicleEH) = ["vehicle", {
private _vehicleClass = {if (_vehicle isKindOf _x) exitWith {_x}} forEach ["CAManBase", "LandVehicle", "Air", "Ship", "All"];
private _savedView = profileNamespace getVariable (QXGVAR(preserveView) + _vehicleClass);
if (!isNil "_savedView" && {!(_cameraView isEqualTo _savedView)}) then {
if (!isNil "_savedView" && {_cameraView isNotEqualTo _savedView}) then {
_vehicle switchCamera _savedView;
};
}, true] call CBA_fnc_addPlayerEventHandler;