mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
64538f2ad0
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
33 lines
714 B
Plaintext
33 lines
714 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Jonpas, LinkIsGrim
|
|
* Returns base optic for CBA scripted optics (PIP and 2D)
|
|
*
|
|
* Arguments:
|
|
* 0: Optic <STRING>
|
|
*
|
|
* Return Value:
|
|
* Base optic <STRING>
|
|
*
|
|
* Example:
|
|
* "CUP_optic_Elcan_SpecterDR_black_PIP" call ace_arsenal_fnc_baseOptic
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_optic", "", [""]]];
|
|
|
|
// PIP
|
|
private _baseClasses = configProperties [configFile >> "CBA_PIPItems", "getText _x == _optic"];
|
|
|
|
// Carry Handle
|
|
{
|
|
_baseClasses append (configProperties [_x, "getText _x == _optic"]);
|
|
} forEach configProperties [configFile >> "CBA_CarryHandleTypes"];
|
|
|
|
if (_baseClasses isNotEqualTo []) then {
|
|
_optic = configName (_baseClasses select 0);
|
|
};
|
|
|
|
_optic
|