Make gear check case insensitive
This commit is contained in:
parent
21348ba082
commit
25d7f28bb8
|
@ -83,3 +83,6 @@ if (KP_liberation_arsenalUsePreset) then {
|
|||
[missionNamespace, true] call BIS_fnc_addVirtualItemCargo;
|
||||
[missionNamespace, true] call BIS_fnc_addVirtualBackpackCargo;
|
||||
};
|
||||
|
||||
// Lowercase all classnames
|
||||
KP_liberation_allowed_items = KP_liberation_allowed_items apply {toLower _x};
|
||||
|
|
|
@ -34,7 +34,14 @@ if (((backpack player) != "") && ((backpack player) != _backpack)) then {_player
|
|||
{if (_x != "") then {_playerItems pushBackUnique _x;}} forEach (secondaryWeaponItems player);
|
||||
{if (_x != "") then {_playerItems pushBackUnique _x;}} forEach (handgunItems player);
|
||||
|
||||
if (({(_x in KP_liberation_allowed_items) || ((_x find "ACRE") != -1) || ((_x find "tf_") != -1) || ((_x find "TFAR_") != -1)} count _playerItems) != count _playerItems) then {
|
||||
private _validItemsCount = {
|
||||
((toLower _x) in KP_liberation_allowed_items)
|
||||
|| ((_x find "ACRE") != -1)
|
||||
|| ((_x find "tf_") != -1)
|
||||
|| ((_x find "TFAR_") != -1)
|
||||
} count _playerItems);
|
||||
|
||||
if ((_validItemsCount != count _playerItems) then {
|
||||
private _text = format ["[KP LIBERATION] [BLACKLIST] Found %1 at Player %2", (_playerItems - KP_liberation_allowed_items), name player];
|
||||
_text remoteExec ["diag_log",2];
|
||||
private _badItems = "";
|
||||
|
|
Loading…
Reference in New Issue