Replace forEach with Count

Use count where you do not need _forEachIndex variable, it's quicker
than forEach.
This commit is contained in:
icomrade
2014-05-27 15:37:57 -04:00
parent 91d246e64e
commit e54b9983dd
210 changed files with 890 additions and 890 deletions

View File

@@ -1,10 +1,10 @@
/*
Description:
Checks whether the player has the required items (magazines) or not
and displays a message if an item is missing.
Checks whether the player has the required items (magazines) || not
&& displays a message if an item is missing.
Parameter(s):
_this: <array> list of item names the player is required to have (can also be an sub-array with item name and quantity)
_this: <array> list of item names the player is required to have (can also be an sub-array with item name && quantity)
Returns:
Boolean (true if the player has all required items)
@@ -41,5 +41,5 @@ _hasItems = true;
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
cutText [format[(localize "STR_EPOCH_ACTIONS_12"), _missingQty, _textMissing], "PLAIN DOWN"];
};
} forEach _items;
} count _items;
_hasItems