From 4129e34256073319f18d73578b1b0d6406f058dc Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 8 Mar 2019 08:45:12 -0600 Subject: [PATCH] Jam - fix p90 jam and add test script --- addons/jam/CfgWeapons.hpp | 2 +- addons/jam/test.sqf | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 addons/jam/test.sqf diff --git a/addons/jam/CfgWeapons.hpp b/addons/jam/CfgWeapons.hpp index 5c992b835..bbcecc800 100644 --- a/addons/jam/CfgWeapons.hpp +++ b/addons/jam/CfgWeapons.hpp @@ -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 { diff --git a/addons/jam/test.sqf b/addons/jam/test.sqf new file mode 100644 index 000000000..925bd99d7 --- /dev/null +++ b/addons/jam/test.sqf @@ -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;