|
2 | 2 | File: fn_initArsenal.sqf
|
3 | 3 | Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
4 | 4 | Date: 2020-05-11
|
5 |
| - Last Update: 2020-09-16 |
| 5 | + Last Update: 2020-09-26 |
6 | 6 | License: MIT License - http://www.opensource.org/licenses/MIT
|
7 | 7 |
|
8 | 8 | Description:
|
@@ -81,6 +81,35 @@ if (KPLIB_param_useArsenalPreset) then {
|
81 | 81 | KPLIB_arsenalAllowed append _disposableLaunchers;
|
82 | 82 | };
|
83 | 83 |
|
| 84 | + { |
| 85 | + // Handle CBA optics, https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics |
| 86 | + if (missionNamespace getVariable ["CBA_optics", false]) then { |
| 87 | + private _pipOptic = CBA_optics_PIPOptics getVariable _x; |
| 88 | + if (!isNil "_pipOptic") then { |
| 89 | + KPLIB_arsenalAllowedExtension pushBackUnique _pipOptic; |
| 90 | + }; |
| 91 | + |
| 92 | + private _nonPipOptic = CBA_optics_NonPIPOptics getVariable _x; |
| 93 | + if (!isNil "_nonPipOptic") then { |
| 94 | + KPLIB_arsenalAllowedExtension pushBackUnique _nonPipOptic; |
| 95 | + }; |
| 96 | + }; |
| 97 | + |
| 98 | + // Handle CBA (MRT) Accessories, https://github.com/CBATeam/CBA_A3/wiki/Accessory-Functions |
| 99 | + private _itemCfg = configFile >> "CfgWeapons" >> _x; |
| 100 | + if (!isNull _itemCfg) then { |
| 101 | + private _nextItem = getText (_cfg >> "MRT_SwitchItemPrevClass"); |
| 102 | + if (_nextItem != "") then { |
| 103 | + KPLIB_arsenalAllowedExtension pushBackUnique _nextItem; |
| 104 | + }; |
| 105 | + |
| 106 | + private _prevItem = getText (_cfg >> "MRT_SwitchItemNextClass"); |
| 107 | + if (_prevItem != "") then { |
| 108 | + KPLIB_arsenalAllowedExtension pushBackUnique _prevItem; |
| 109 | + }; |
| 110 | + }; |
| 111 | + } forEach KPLIB_arsenalAllowed; |
| 112 | + |
84 | 113 | KPLIB_arsenalAllowed append KPLIB_arsenalAllowedExtension;
|
85 | 114 | if (KPLIB_ace && KPLIB_param_arsenalType) then {[player, KPLIB_arsenalAllowed, false] call ace_arsenal_fnc_addVirtualItems;};
|
86 | 115 |
|
|
0 commit comments