Add pylon whitelist option (#6080)

* Adding pylon whitelist option

* Changing tabs to spaces :(

* Changing to use QGVAR

* Changing name in QGVAR to more clearly reflect function of variable

* Docs for the magazine whitelist function in pylons

* Changes to match style guide

* More docs

* More tabs

* Update pylons-framework.md

* Update pylons-framework.md
This commit is contained in:
Brunius 2018-01-29 08:38:48 +11:00 committed by PabstMirror
parent 3c04d61a0d
commit cc503e041b
2 changed files with 33 additions and 0 deletions

View File

@ -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");

View File

@ -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.