ACE3/addons/goggles/functions/fnc_isDivingGoggles.sqf
2015-02-02 11:04:53 +02:00

23 lines
607 B
Plaintext

/*
* Author: Garth 'L-H' de Wet
* Determines whether passed goggles is diving goggles or a variant of them.
*
* Arguments:
* 0: Glasses classname <STRING>
*
* Return Value:
* Whether diving goggles are worn <BOOL>
*
* Example:
* [(goggles ace_player)] call ace_goggles_fnc_isDivingGoggles;
*
* Public: Yes
*/
#include "script_component.hpp"
private ["_result", "_glasses"];
_glasses = _this select 0;
_result = _glasses == "G_Diving";
if (_result) exitWith {true};
_result = [configFile >> "CfgGlasses" >> _glasses, configFile >> "CfgGlasses" >> "G_Diving"] call CBA_fnc_inheritsFrom;
_result