mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Exit refresh early if no display is found (#9754)
Co-authored-by: Mike-MF <TyroneMF@hotmail.com>
This commit is contained in:
parent
4bb9d6c42c
commit
6c60b67494
@ -22,7 +22,8 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
params ["_object"];
|
params ["_object"];
|
||||||
|
|
||||||
// If the arsenal is already open, refresh arsenal display
|
// If the arsenal is already open, refresh arsenal display
|
||||||
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object}) then {
|
// Deliberate == check, fail on objNull
|
||||||
|
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object}) then {
|
||||||
[true, true] call FUNC(refresh);
|
[true, true] call FUNC(refresh);
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -25,6 +25,11 @@ if (canSuspend) exitWith {
|
|||||||
[{_this call FUNC(refresh)}, _this] call CBA_fnc_directCall;
|
[{_this call FUNC(refresh)}, _this] call CBA_fnc_directCall;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _display = findDisplay IDD_ace_arsenal;
|
||||||
|
|
||||||
|
// Exit quietly if no display found
|
||||||
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
if (_updateItems) then {
|
if (_updateItems) then {
|
||||||
// Update current item list
|
// Update current item list
|
||||||
call FUNC(updateCurrentItemsList);
|
call FUNC(updateCurrentItemsList);
|
||||||
@ -65,6 +70,4 @@ if (!_animate) then {
|
|||||||
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
|
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _display = findDisplay IDD_ace_arsenal;
|
|
||||||
|
|
||||||
[_display, _display displayCtrl GVAR(currentLeftPanel), _animate] call FUNC(fillLeftPanel);
|
[_display, _display displayCtrl GVAR(currentLeftPanel), _animate] call FUNC(fillLeftPanel);
|
||||||
|
@ -42,8 +42,14 @@ if (_global && {isMultiplayer} && {!isNil "_id"}) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// If the arsenal is already open and not ignoring content (see FUNC(openBox)), close arsenal display
|
// If the arsenal is already open and not ignoring content (see FUNC(openBox)), close arsenal display
|
||||||
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
// Deliberate == check, fail on objNull
|
||||||
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
|
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
||||||
// Delay a frame in case this is running on display open
|
// Delay a frame in case this is running on display open/close
|
||||||
[{(findDisplay IDD_ace_arsenal) closeDisplay 0}] call CBA_fnc_execNextFrame;
|
[{
|
||||||
|
private _display = findDisplay IDD_ace_arsenal;
|
||||||
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
|
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
|
||||||
|
_display closeDisplay 0;
|
||||||
|
}] call CBA_fnc_execNextFrame;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user