-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Common - Clean up
ace_common_fnc_hasItem
& `ace_common_fnc_hasMagaz…
…ine` functions (#10108) * Clean up hasItem & hasMagazine functions * Replace EFUNC * Update fnc_hasItem.sqf
- Loading branch information
Showing
2 changed files
with
10 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal | ||
* Check if unit has item. Note: case-sensitive. | ||
* Check if given unit has an item of given classname. Note: Case sensitive. | ||
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* 1: Item Classname <STRING> | ||
* 1: Item classname <STRING> | ||
* | ||
* Return Value: | ||
* Unit has Item <BOOL> | ||
* Unit has item <BOOL> | ||
* | ||
* Example: | ||
* [bob, "item"] call ace_common_fnc_hasItem | ||
* [player, "ACE_Banana"] call ace_common_fnc_hasItem | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [["_unit", objNull, [objNull]], ["_item", "", [""]]]; | ||
|
||
_item in (_unit call EFUNC(common,uniqueItems)) | ||
_item in (_unit call FUNC(uniqueItems)) // return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal | ||
* Check if given unit has a magazine of given classname | ||
* Check if given unit has a magazine of given classname. Note: Case sensitive. | ||
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* 1: Magazine Classname <STRING> | ||
* 1: Magazine classname <STRING> | ||
* | ||
* Return Value: | ||
* has Magazine <BOOL> | ||
* Unit has magazine <BOOL> | ||
* | ||
* Example: | ||
* [bob, "magazine"] call ace_common_fnc_hasMagazine | ||
* [player, "30Rnd_65x39_caseless_mag"] call ace_common_fnc_hasMagazine | ||
* | ||
* Public: yes | ||
* | ||
* Note: Case sensitive | ||
*/ | ||
|
||
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]]; | ||
|
||
_magazine in magazines _unit // return | ||
_magazine in ([_unit, 2] call FUNC(uniqueItems)) // return |