diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index b0f9b6c271..47b6585c89 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -73,6 +73,12 @@ GVAR(comboBoxes) = []; private _mag = (getPylonMagazines _aircraft) select _forEachIndex; private _mags = _aircraft getCompatiblePylonMagazines (_forEachIndex + 1); + private _userWhitelist = _aircraft getVariable [QGVAR(magazineWhitelist), _mags]; + private _userBlacklist = _aircraft getVariable [QGVAR(magazineBlacklist), []]; + + _mags = _mags arrayIntersect _userWhitelist; + _mags = _mags - _userBlacklist; + private _index = 0; { _combo lbAdd getText (configFile >> "CfgMagazines" >> _x >> "displayName"); diff --git a/docs/wiki/framework/pylons-framework.md b/docs/wiki/framework/pylons-framework.md new file mode 100644 index 0000000000..7cea33d29f --- /dev/null +++ b/docs/wiki/framework/pylons-framework.md @@ -0,0 +1,27 @@ +--- +layout: wiki +title: Pylons Framework +description: Explains how to set-up pylons whitelist and blacklist +group: framework +order: 5 +parent: wiki +mod: ace +version: + major: 3 + minor: 13 + patch: 0 +--- + +### 1 Setting a whitelist + +To set a whitelist, set the `ace_pylons_magazineWhitelist` variable with an array containing possible magazines. + +For example, place an AH-9 Pawnee, with the following in init line: + +`this setVariable ["ace_pylons_magazineWhitelist", ["PylonRack_7Rnd_Rocket_04_HE_F","PylonRack_7Rnd_Rocket_04_AP_F"]];`. + +Blacklists are set in the same way. Set the `ace_pylons_magazineBlacklist` variable with an array containing banned magazines. + +`this setVariable ["ace_pylons_magazineBlacklist", ["PylonRack_7Rnd_Rocket_04_HE_F","PylonRack_7Rnd_Rocket_04_AP_F"]];`. + +This would set the only available loadouts to be Hydra 70s. This will not change what is loaded by default, or affect whether it can rearm.