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

JR - Ensure class names returned by compatibleItems are in config case #1335

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

mharis001
Copy link
Contributor

When merged this pull request will:

  • title, previously items were not guaranteed to match CfgWeapons config case

For example (before this change), optic_Aco was returned as optic_aco:

currentWeapon player; // "arifle_MX_F"
primaryWeaponItems player; // ["","acc_pointer_IR","optic_Aco",""]
primaryWeaponItems player arrayIntersect ([currentWeapon player] call CBA_fnc_compatibleItems); // ["acc_pointer_IR"]
"optic_aco" in ([currentWeapon player] call CBA_fnc_compatibleItems); // true
"optic_Aco" in ([currentWeapon player] call CBA_fnc_compatibleItems); // false

@commy2
Copy link
Contributor

commy2 commented May 14, 2020

bwc though

@mharis001
Copy link
Contributor Author

I don't think that is an issue because any case-insensitive tests remain unaffected but case-sensitive tests get fixed to work as expected (config case would be expected since all(?) commands use that).

@commy2
Copy link
Contributor

commy2 commented May 14, 2020

Some functions are all lower case, some are config case. It is a mess and not thought of when this was ported from ASDG to CBA.

@PabstMirror PabstMirror merged commit 578b409 into CBATeam:master Oct 9, 2020
@mharis001 mharis001 deleted the compatible-items-config-case branch October 9, 2020 18:40
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