Skip to content

Commit

Permalink
Merge pull request #184 from Theseus-Aegis/fixCompatibleCategory
Browse files Browse the repository at this point in the history
Fix isCompatible not checking magazines
  • Loading branch information
jonpas committed Jun 4, 2016
2 parents ec0da56 + 49c41bb commit 6fcc9fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/armory/functions/fnc_dialogControl_populateList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ params ["_armoryData"];

private _selSubCategory = lbText [DROPDOWN, (lbSelection CTRL(DROPDOWN)) select 0]; // SubCategory

TRACE_2("Populating list",_armoryData,_selSubCategory);
//TRACE_2("Populating list",_armoryData,_selSubCategory);

// Clear List
lnbClear NLIST;
Expand Down
2 changes: 1 addition & 1 deletion addons/armory/functions/fnc_extractSubCategories.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ _dataSubCategories sort true;

_subCategories append _dataSubCategories;

TRACE_1("SubCategories",_subCategories);
//TRACE_1("SubCategories",_subCategories);
_subCategories
3 changes: 3 additions & 0 deletions addons/armory/functions/fnc_isCompatible.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ _itemClass = toLower _itemClass;

{
private _compatibleItems = ([_x] call CBA_fnc_compatibleItems) apply {toLower _x};
_compatibleItems append ((getArray (configFile >> "CfgWeapons" >> _x >> "magazines")) apply {toLower _x});

TRACE_2("Compatible Items",_x,_compatibleItems);

if (_itemClass in _compatibleItems) exitWith {
true
Expand Down

0 comments on commit 6fcc9fe

Please sign in to comment.