ACE3/addons/goggles/functions/fnc_isDivingGoggles.sqf
2015-09-29 17:57:09 +02:00

25 lines
517 B
Plaintext

/*
* Author: commy2
* Determines whether passed goggles is diving goggles or a variant of them.
*
* Arguments:
* 0: Glasses classname <STRING>
*
* Return Value:
* Check if these goggles are diving goggles <BOOL>
*
* Example:
* [goggles ace_player] call ace_goggles_fnc_isDivingGoggles;
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_glasses"];
local _config = configFile >> "CfgGlasses" >> _glasses;
if (!isClass _config) exitWith {false};
getNumber (_config >> "mode") == 1 // return