Skip to content

Commit

Permalink
added PR for ACE arsenal CBA optics support. PR KillahPotatoes#840
Browse files Browse the repository at this point in the history
  • Loading branch information
Crowdedlight committed Mar 4, 2024
1 parent 0ba542d commit 6acd0f0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Missionframework/scripts/client/misc/init_arsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,35 @@ if (KP_liberation_arsenalUsePreset) then {
KP_liberation_allowed_items append _disposableLaunchers;
};

{
// Handle CBA optics, https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics
if (missionNamespace getVariable ["CBA_optics", false]) then {
private _pipOptic = CBA_optics_PIPOptics getVariable _x;
if (!isNil "_pipOptic") then {
KP_liberation_allowed_items_extension pushBackUnique _pipOptic;
};

private _nonPipOptic = CBA_optics_NonPIPOptics getVariable _x;
if (!isNil "_nonPipOptic") then {
KP_liberation_allowed_items_extension pushBackUnique _nonPipOptic;
};
};

// Handle CBA (MRT) Accessories, https://github.com/CBATeam/CBA_A3/wiki/Accessory-Functions
private _itemCfg = configFile >> "CfgWeapons" >> _x;
if (!isNull _itemCfg) then {
private _nextItem = getText (_cfg >> "MRT_SwitchItemPrevClass");
if (_nextItem != "") then {
KP_liberation_allowed_items_extension pushBackUnique _nextItem;
};

private _prevItem = getText (_cfg >> "MRT_SwitchItemNextClass");
if (_prevItem != "") then {
KP_liberation_allowed_items_extension pushBackUnique _prevItem;
};
};
} forEach KP_liberation_allowed_items;

if ((count GRLIB_arsenal_magazines) == 0) then {
if ((count blacklisted_from_arsenal) == 0) then {
_magazines = _crawled select 1;
Expand Down

0 comments on commit 6acd0f0

Please sign in to comment.