Inventory - Remove duplicate code (#9791)

Update XEH_preStart.sqf
This commit is contained in:
johnb432 2024-02-11 16:33:58 +01:00 committed by GitHub
parent e75ef3de06
commit cdc51643bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,10 +21,6 @@ uiNamespace setVariable [QGVAR(backpackKeyCache), compileFinal createHashMapFrom
if (_picture select [0, 1] == "\") then { if (_picture select [0, 1] == "\") then {
_picture = _picture select [1]; _picture = _picture select [1];
}; };
if (count _picture > 0 && !(_picture regexMatch ".*?\.paa")) then { // handle missing file extension
if (!fileExists (_picture + ".paa")) exitWith {};
_picture = _picture + ".paa";
};
// Handle missing file extension, as inventory returns path with extension // Handle missing file extension, as inventory returns path with extension
if (count _picture > 0 && !(_picture regexMatch ".*?\.paa")) then { if (count _picture > 0 && !(_picture regexMatch ".*?\.paa")) then {