2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-18 21:50:45 +00:00
|
|
|
fnc_isDivingGoggles.sqf
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Author: Garth de Wet (LH)
|
2015-01-18 21:50:45 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Description:
|
|
|
|
Determines whether current goggles worn by passed unit is diving goggles or a variant of them.
|
2015-01-18 21:50:45 +00:00
|
|
|
|
|
|
|
Parameters:
|
2015-01-11 16:42:31 +00:00
|
|
|
0: String - Glasses classname
|
2015-01-18 21:50:45 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Returns:
|
|
|
|
Boolean - whether diving goggles are worn
|
2015-01-18 21:50:45 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Example:
|
2015-01-18 21:50:45 +00:00
|
|
|
(goggles ace_player) call FUNC(isDivingGoggles);
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-18 21:50:45 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_result", "_glasses"];
|
|
|
|
_glasses = _this;
|
|
|
|
_result = _glasses == "G_Diving";
|
|
|
|
if (_result) exitWith {true};
|
|
|
|
_result = [configFile >> "CfgGlasses" >> _glasses, configFile >> "CfgGlasses" >> "G_Diving"] call CBA_fnc_inheritsFrom;
|
|
|
|
_result
|