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

Jam - fix p90 magazineWell and add test script #1091

Merged
merged 1 commit into from
Mar 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion addons/jam/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class CfgWeapons {
};

class SMG_03_TR_BASE: Rifle_Base_F {
magazineWell[] = {"CBA_57x28_FNP90"};
magazineWell[] = {"CBA_57x28_P90"};
};

class SMG_05_base_F: Rifle_Short_Base_F {
Expand Down
21 changes: 21 additions & 0 deletions addons/jam/test.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
// ----------------------------------------------------------------------------
// execVM "x\cba\addons\jam\test.sqf"

LOG("=== Testing Jam ===");

private _wellsChecked = [];
{
private _wpnCfg = _x;
private _xWellArray = getArray (_wpnCfg >> "magazineWell");
{
if ((_wellsChecked pushBackUnique _x) > -1) then {
if (isNull (configFile >> "CfgMagazineWells" >> _x)) then {
diag_log text format ["ERROR: Well [%1] not valid, used in [%2]", _x,configName _wpnCfg];
};
};
} forEach _xWellArray;
} forEach (configProperties [configFile >> "CfgWeapons", "(isClass _x) && {2 == getNumber (_x >> 'scope')}"]);

nil;