Skip to content
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
merged 6 commits into from
Apr 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add binoc magazine
  • Loading branch information
dedmen authored Apr 14, 2018

Verified

This commit was signed with the committer’s verified signature.
MinnDevelopment Florian Spieß
commit a79f59ff310b3096d0e29131f071b6f6d87fd48c
1 change: 1 addition & 0 deletions addons/common/fnc_uniqueUnitItems.sqf
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@ if (_weaponItems) then {
primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit,
primaryWeaponMagazine _unit, secondaryWeaponMagazine _unit, handgunMagazine _unit
];
_allItems pushBack (_unit call CBA_fnc_binocularMagazine);
};
Copy link
Contributor

@commy2 commy2 Apr 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (_weaponItems) then {
    _allItems append [
        primaryWeapon _unit,
        secondaryWeapon _unit,
        handgunWeapon _unit
    ];
    _allItems append primaryWeaponItems _unit;
    _allItems append secondaryWeaponItems _unit;
    _allItems append handgunItems _unit;
    _allItems append primaryWeaponMagazine _unit;
    _allItems append secondaryWeaponMagazine _unit;
    _allItems append handgunMagazine _unit;
    _allItems pushBack (_unit call CBA_fnc_binocularMagazine);
};

Copy link
Contributor

@commy2 commy2 Apr 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that primaryWeaponMagazine-no S etc. report ARRAY, exactly like the XItems versions.


_allItems arrayIntersect _allItems //Remove duplicates