mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add return value to public setElementVisibility function
This commit is contained in:
parent
23e2617db8
commit
e90ef30904
@ -25,6 +25,8 @@ params [
|
||||
["_show", false, [true, ""]]
|
||||
];
|
||||
|
||||
private _return = false;
|
||||
|
||||
if (_set) then {
|
||||
if ([_idd, _elements] in GVAR(elementsSet)) exitWith { TRACE_3("Element already set",_idd,_elements,GVAR(elementsSet)); };
|
||||
|
||||
@ -33,6 +35,7 @@ if (_set) then {
|
||||
|
||||
if (_success) then {
|
||||
GVAR(elementsSet) pushBack [_idd, _elements];
|
||||
_return = true;
|
||||
};
|
||||
} else {
|
||||
if ([_idd, _elements] in GVAR(elementsSet)) then {
|
||||
@ -41,7 +44,9 @@ if (_set) then {
|
||||
|
||||
private _index = GVAR(elementsSet) find [_idd, _elements];
|
||||
GVAR(elementsSet) deleteAt _index;
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("Visibility set",GVAR(elementsSet));
|
||||
TRACE_2("Visibility set",_return,GVAR(elementsSet));
|
||||
_return
|
||||
|
Loading…
Reference in New Issue
Block a user