mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
3c04d61a0d
commit
cc503e041b
@ -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");
|
||||
|
27
docs/wiki/framework/pylons-framework.md
Normal file
27
docs/wiki/framework/pylons-framework.md
Normal 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.
|
Loading…
Reference in New Issue
Block a user