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

Common - Optimize and expand CBA_fnc_addWeaponWithoutItems #1557

Merged
merged 5 commits into from
Sep 7, 2023

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Sep 16, 2022

When merged this pull request will:

  • Uses 2.02 & 2.10 commands (removeAllSecondaryWeaponItems and compatibleMagazines)
  • Adds a new argument, which allows the user to keep the linked attachments on the gun. Default behavior is to remove them, just as the function did before.

I can understand if the 2nd change is not wanted and considered to go against the rules.
Despite that, I think it has it's uses - being able to spawn in a weapon (with attachments or not) without it consuming a magazine from the inventory is really nice.

If it's not wanted, I'll just all related changes, but keep the updated commands (compatibleMagazines is about 4x faster than CBA_fnc_compatibleMagazines).

@commy2
Copy link
Contributor

commy2 commented Sep 16, 2022

See: #1558 (comment)

@johnb432
Copy link
Contributor Author

See: #1558 (comment)

Would this PR be accepted, if compatibleMagazines would be reverted back to CBA_fnc_compatibleMagazines?

@johnb432
Copy link
Contributor Author

I reverted the changing of CBA_fnc_compatibleMagazines for compatibleMagazines, as that seemed to be a point that couldn't be agreed upon.

@jonpas jonpas changed the title Common - Updated & expanded CBA_fnc_addWeaponWithoutItems Common - Optimize and expand CBA_fnc_addWeaponWithoutItems Sep 6, 2023
@jonpas jonpas added this to the 3.16.0 milestone Sep 6, 2023
@jonpas jonpas merged commit 154a243 into CBATeam:master Sep 7, 2023
4 checks passed
@johnb432 johnb432 deleted the addWeaponWithoutItems branch April 3, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants