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

report backpacks with CBA_fnc_getItemConfig #1223

Merged
merged 2 commits into from
Sep 9, 2019
Merged

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Sep 7, 2019

When merged this pull request will:

  • title

Before:

isNull ("B_AssaultPack_blk" call CBA_fnc_getItemConfig) // true

After:

isNull ("B_AssaultPack_blk" call CBA_fnc_getItemConfig) // false
"B_AssaultPack_blk" call CBA_fnc_getItemConfig // bin\config.bin/CfgVehicles/B_AssaultPack_blk

@commy2 commy2 added the Bug Fix label Sep 7, 2019
@commy2 commy2 added this to the 3.13 milestone Sep 7, 2019

if (isClass _config) exitWith {
_result = _config;
};
} forEach ["CfgWeapons", "CfgMagazines", "CfgGlasses"];

private _config = configFile >> "CfgVehicles" >> _item;
Copy link
Member

Choose a reason for hiding this comment

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

Only do this entire new section if result is null still?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose?

It wouldn't change the return value though.

Copy link
Member

Choose a reason for hiding this comment

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

It would be mildly faster for non-backpack cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and slower for backpack classes.

Copy link
Member

@jonpas jonpas Sep 9, 2019

Choose a reason for hiding this comment

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

One would think that's least used, especially when going through many items.

@commy2 commy2 modified the milestones: 3.13, 3.12.2 Sep 9, 2019
@commy2 commy2 merged commit 522cd1e into master Sep 9, 2019
@commy2 commy2 deleted the getItemConfig-backpacks branch September 9, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants