Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize isNotEqualTo #7929

Merged
merged 5 commits into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
Expand All @@ -73,7 +73,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
private _linearMuliplier = _typicalSpeed / _parentSpeed;
if (_inheritedBarrelConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
} else {
Expand All @@ -82,7 +82,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
};
if (_inheritedTempConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_drawArc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if !((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo []) then {
if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_addListBoxItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into
//get name of DLC
private _dlcName = "";
private _addons = configsourceaddonlist _configPath;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlcName = _mods select 0;
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_addSort.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ private _fnc_addToTabs = {

_finalArray = ["", _displayName, _statement, _condition];

if !(_leftTabs isEqualTo []) then {
if (_leftTabs isNotEqualTo []) then {
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
};

if !(_rightTabs isEqualTo []) then {
if (_rightTabs isNotEqualTo []) then {
[GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
};

Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ switch (GVAR(currentLoadoutsTab)) do {
};
};

if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
if (GVAR(shiftState) && {is3DEN} && {_loadoutName isNotEqualTo ""} && {_cursSelRow != -1} && {_loadoutIndex isNotEqualTo -1}) exitwith {
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
if (_defaultLoadoutsSearch isEqualto -1) then {
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_compileSorts.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi

_finalArray = ["", _displayName, _statement, _condition];

if !(_leftTabsList isEqualTo []) then {
if (_leftTabsList isNotEqualTo []) then {
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
};

if !(_rightTabsList isEqualTo []) then {
if (_rightTabsList isNotEqualTo []) then {
[_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
};
} foreach _configEntries;
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace)
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;

if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
if ((_currentData isNotEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
_ctrlPanel lbSetCurSel _lbIndex;
};
};
Expand Down
10 changes: 5 additions & 5 deletions addons/arsenal/functions/fnc_fillRightPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ switch (_ctrlIDC) do {
};
} forEach GVAR(customRightPanelButtons);
};

{
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
} forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)});

{
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)});
Expand All @@ -297,12 +297,12 @@ switch (_ctrlIDC) do {
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)});
};

default {
private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC;
if (_index != -1) then {
private _data = GVAR(customRightPanelButtons) param [_index];

if (!isNil "_data") then {
private _items = _data select 0;
{
Expand Down Expand Up @@ -366,7 +366,7 @@ private _sortRightCtrl = _display displayCtrl IDC_sortRightTab;
[_sortRightCtrl] call FUNC(sortPanel);

// Select current data if not in a container
if !(_itemsToCheck isEqualTo []) then {
if (_itemsToCheck isNotEqualTo []) then {
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;

Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_handleStats.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (!isNil "_itemCfg") then {

// Handle titles, bars and text
_statsList = _statsList select [0, 5];
if !(_statsList isEqualTo []) then {
if (_statsList isNotEqualTo []) then {
{
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
_bools params ["_showBar", "_showText"];
Expand Down
12 changes: 6 additions & 6 deletions addons/arsenal/functions/fnc_onArsenalOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ for "_index" from 0 to 10 do {
case 0: {
private _array = LIST_DEFAULTS select _index;

if !((_array select 0) isEqualTo "") then {
if ((_array select 0) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0);
};

if !((_array select 1) isEqualTo "") then {
if ((_array select 1) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1);
};

if !((_array select 2) isEqualTo "") then {
if ((_array select 2) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2);
};
};
Expand All @@ -96,7 +96,7 @@ for "_index" from 0 to 10 do {
} forEach _accsArray;

{
if !(_x isEqualTo []) then {
if (_x isNotEqualTo []) then {

if (_x select 0 != "") then {
(GVAR(virtualItems) select 2) pushBackUnique (_x select 0);
Expand All @@ -116,8 +116,8 @@ for "_index" from 0 to 10 do {

// The rest
default {
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
if !(_array isEqualTo []) then {
private _array = (LIST_DEFAULTS select _index) select {_x isNotEqualTo ""};
if (_array isNotEqualTo []) then {
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_onKeyDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GVAR(shiftState) = _shiftState;
private _return = true;
private _loadoutsDisplay = findDisplay IDD_loadouts_display;

if !(_loadoutsDisplay isEqualTo displayNull) then {
if (_loadoutsDisplay isNotEqualTo displayNull) then {
if !(GVAR(loadoutsSearchbarFocus)) then {
switch true do {
// Close button
Expand Down Expand Up @@ -171,7 +171,7 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
case (_keyPressed == DIK_RETURN): {
if (GVAR(leftSearchbarFocus)) then {
[_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar);
};
};
if (GVAR(rightSearchbarFocus)) then {
[_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar);
};
Expand Down
6 changes: 3 additions & 3 deletions addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};

Expand Down Expand Up @@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};

Expand Down Expand Up @@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};

Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_removeVirtualItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ if (_items isEqualType true) then {

private _itemCount = {
if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then {
!(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
(_x isNotEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
} else {
!(_x isEqualTo [])
(_x isNotEqualTo [])
};
} count _cargo;

Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_sortPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ _for do {
if (_right) then {
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]];
} else {
if !(_item isEqualTo "") then {
if (_item isNotEqualTo "") then {
_panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]];
};
};
Expand All @@ -159,7 +159,7 @@ if (_right) then {
if (_data == _selected) then {_panel lbSetCurSel _i};
};
private _name = getText (_cfgClass >> _data >> "displayName");
if !(_name isEqualTo "") then {
if (_name isNotEqualTo "") then {
_panel lbSetText [_i, _name];
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_sortStatement_mod.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ params ["_config"];

private _dlc = "";
private _addons = configSourceAddonList _config;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlc = _mods select 0;
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/artillerytables/dev/checkConfigs.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ private _fnc_showPropertyDefined = {
params ["_configBase", "_configProperty"];

private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true];
private _customExplicit = _customAll select {!([] isEqualTo configProperties [_x, 'configName _x == _configProperty', false])};
private _customExplicit = _customAll select {[] isNotEqualTo configProperties [_x, 'configName _x == _configProperty', false]};
diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll];
diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}];
diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}];
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_calculate_truing_drop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (_parseInput) then {
_subsonicDrop = _transonicDrop max _subsonicDrop;
};

if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then {
if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRange] isNotEqualTo GVAR(truingDropRangeData)}) then {
if (isNil QGVAR(targetSolutionInput)) then {
call FUNC(calculate_target_solution);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/attach/functions/fnc_attach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
};
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
private _lineInterection = !((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isEqualTo []);
private _lineInterection = ((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isNotEqualTo []);

//Don't allow placing in a bad position:
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
Expand Down
2 changes: 1 addition & 1 deletion addons/ballistics/ACE_Arsenal_Stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class EGVAR(arsenal,stats) {
displayName= CSTRING(statBallisticCoef);
showText= 1;
textStatement = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); private _ballisticCoef = getArray (_ammoCfg >> _stat select 1); _ballisticCoef sort false; format [ARR_4('%1 G%2 (%3)', _ballisticCoef select 0 ,getNumber (_ammoCfg >> _stat select 0), getText (_ammoCfg >> _stat select 2))]);
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); !(getArray (_ammoCfg >> _stat select 1) isEqualTo []));
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); (getArray (_ammoCfg >> _stat select 1) isNotEqualTo []));
tabs[] ={{}, {4}};
};
class ACE_bulletMass: statBase {
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_handleGetIn.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (local _unit) then {
_x params ["_xUnit", "", "", "_xTurretPath"];
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
} forEach (fullCrew (vehicle _unit));
if (!(_turretPath isEqualTo [])) then {
if (_turretPath isNotEqualTo []) then {
TRACE_1("Setting FFV Handcuffed Animation",_turretPath);
[_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation);
[_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation);
Expand Down
2 changes: 1 addition & 1 deletion addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ enableCamShake true;
//FUNC(showHud) needs to be refreshed if it was set during mission init
["ace_infoDisplayChanged", {
GVAR(showHudHash) params ["", "", "_masks"];
if !(_masks isEqualTo []) then {
if (_masks isNotEqualTo []) then {
[] call FUNC(showHud);
};
}] call CBA_fnc_addEventHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass

if (!isNil "_profileVar") then {
private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get;
if (_isClientSettable && {!(_currentValue isEqualTo _profileVar)}) then {
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
// CBA_settings_fnc_set will do type checking for the old profile var
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);
Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_checkFiles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private _oldCompats = [];
};
false
} count _addons;
if (!(_oldCompats isEqualTo [])) then {
if (_oldCompats isNotEqualTo []) then {
[{
// Lasts for ~10 seconds
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
Expand Down Expand Up @@ -138,7 +138,7 @@ if (isMultiplayer) then {
};

_addons = _addons - GVAR(ServerAddons);
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];

ERROR(_errorMsg);
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_claim.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true];

// lock target object
if (_lockTarget) then {
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
if (!isNull _unit) then {
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
if (_canBeDisassembled) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_claimSafeServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true];

// lock target object
if (_lockTarget) then {
private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
if (!isNull _unit) then {
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
if (_canBeDisassembled) then {
Expand Down
Loading