-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CBA_fnc_uniqueUnitItems #902
Merged
+49
−0
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rename, Indent, CfgFunctions
- v3.18.2-RC2
- v3.18.2-RC1
- v3.18.1
- v3.18.1-RC1
- v3.18.0.241008
- v3.18.0-RC1
- v3.17.1.240424
- v3.17.0.240401
- v3.16.1.231025
- v3.16.0.231017
- v3.16.0.231011-RC2
- v3.16.0.230926-RC1
- v3.15.8.220912
- v3.15.7
- v3.15.6.211004
- v3.15.5.210713
- v3.15.4.210701
- v3.15.3.210310
- v3.15.1.201119
- v3.15.1.200418
- v3.15.0.200404
- v3.14.0.200207
- v3.13.0.191116
- v3.12.2.190909
- v3.12.1.190812
- v3.12.0.190708
- v3.11.2.190515
- v3.11.1.190503
- v3.11.0.190501
- v3.10.1.190316
- v3.10.0.190314
- v3.9.1.181229
- v3.9.0.181012
- v3.8.0.180801
- v3.7.1.180604
- v3.7.0.180430
commit b5c810622b403ab50ef4acc96f7b9edabd6226b2
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
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,5 +1,5 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_getUniquePlayerItems | ||
Function: CBA_fnc_unitItemsUnique | ||
Description: | ||
A function used to retrieve a unique list of items in the units inventory | ||
|
@@ -13,7 +13,7 @@ Parameters: | |
Example: | ||
(begin example) | ||
_allItems = [player, true, false] call CBA_fnc_getUniquePlayerItems | ||
_allItems = [player, true, false] call CBA_fnc_unitItemsUnique | ||
(end) | ||
Returns: | ||
|
@@ -23,7 +23,7 @@ Author: | |
Dedmen | ||
---------------------------------------------------------------------------- */ | ||
#include "script_component.hpp" | ||
SCRIPT(getUniquePlayerItems); | ||
SCRIPT(unitItemsUnique); | ||
|
||
params [["_unit", objNull, [objNull]], ["_weaponItems", true, [true]], ["_backpack", true, [true]], ["_vest", true, [true]], ["_uniform", true, [true]]]; | ||
|
||
|
@@ -36,7 +36,8 @@ if (_weaponItems) then { | |
_allItems append (primaryWeaponItems _unit); | ||
_allItems append (secondaryWeaponItems _unit); | ||
_allItems append (handgunItems _unit); | ||
_allItems append [ primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit, | ||
_allItems append [ | ||
primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit, | ||
primaryWeaponMagazine _unit, secondaryWeaponMagazine _unit, handgunMagazine _unit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only one indent right. |
||
]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same indent as |
||
}; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A function used to[R]etrieve[s] a unique list of items in the units inventory[.]