mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix nvg stat detection (#9254)
This commit is contained in:
parent
b54a5463ee
commit
aead9a8eb4
@ -54,13 +54,16 @@ private _secondaryNVGSupported = false;
|
||||
//But on some scopes (from one specific mod) even the primary mode has useModelOptics=false
|
||||
//So we have this workaround
|
||||
|
||||
if (
|
||||
count _opticsModes == 1 || //If we only have a single mode. And it's a secondary, then consider it primary.
|
||||
{{_x select 1} count _opticsModes == count _opticsModes} //If every mode supports it. Then then the primary also supports it
|
||||
) then {
|
||||
// If we only have a single mode and it's a secondary, then consider it primary.
|
||||
if (count _opticsModes == 1 && {!(_opticsModes select 0 select 0)}) then {
|
||||
_primaryNVGSupported = _secondaryNVGSupported;
|
||||
};
|
||||
|
||||
// If all modes support NVGs, then the primary also supports it
|
||||
if (!_primaryNVGSupported && {(_opticsModes select {_x select 1}) isEqualTo _opticsModes}) then {
|
||||
_primaryNVGSupported = true;
|
||||
};
|
||||
|
||||
if (_primaryNVGIntegrated) exitWith {LLSTRING(statVisionMode_IntPrim)};
|
||||
if (_primaryNVGSupported) exitWith {LLSTRING(statVisionMode_supPrim)};
|
||||
if (_secondaryNVGSupported) exitWith {LLSTRING(statVisionMode_supSec)};
|
||||
|
Loading…
Reference in New Issue
Block a user