Fix selective UI in FFV slots, Properly fix config name check

This commit is contained in:
jonpas 2016-06-05 14:02:55 +02:00
parent b541b0b4f0
commit 021a123fc6
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ if (!hasInterface) exitWith {};
if (_name in ELEMENTS_BASIC) then { if (_name in ELEMENTS_BASIC) then {
[false] call FUNC(setElements); [false] call FUNC(setElements);
} else { } else {
if (isClass (configFile >> "ACE_UI" >> _name)) then { if (isClass (configFile >> "ACE_UI" >> _name select [7])) then {
[_name select [7], missionNamespace getVariable _name, true] call FUNC(setAdvancedElement); [_name select [7], missionNamespace getVariable _name, true] call FUNC(setAdvancedElement);
}; };
}; };

View File

@ -29,8 +29,8 @@ private _config = configFile >> "ACE_UI" >> _element;
// Exit if main vehicle type condition not fitting // Exit if main vehicle type condition not fitting
private _location = getNumber (_config >> "location"); // (0-both, 1-ground, 2-vehicle) private _location = getNumber (_config >> "location"); // (0-both, 1-ground, 2-vehicle)
private _currentLocation = ACE_player == vehicle ACE_player; private _canUseWeapon = ACE_player call CBA_fnc_canUseWeapon;
if ((_currentLocation && _location == 2) || (!_currentLocation && _location == 1)) exitWith {false}; if ((_canUseWeapon && _location == 2) || (!_canUseWeapon && _location == 1)) exitWith {false};
private _idd = getNumber (_config >> "idd"); private _idd = getNumber (_config >> "idd");
private _elements = getArray (_config >> "elements"); private _elements = getArray (_config >> "elements");