ACE3/addons/map/functions/fnc_getUnitFlashlights.sqf

30 lines
565 B
Plaintext
Raw Normal View History

2015-08-11 17:49:39 +00:00
/*
* Author: voiper
* Check a unit for any flashlights that can be used on map.
*
* Arguments:
* 0: Unit to check <OBJECT>
*
2016-06-18 09:50:41 +00:00
* Return Value:
2015-08-11 17:49:39 +00:00
* Flashlight classnames (empty for none) <ARRAY>
*
* Example:
* [unit] call ace_map_fnc_getUnitFlashlights;
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
2015-11-23 23:47:58 +00:00
private _flashlights = [];
2015-08-11 17:49:39 +00:00
{
if (isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour")) then {
_flashlights pushBackUnique _x;
2015-08-11 17:49:39 +00:00
};
} forEach (items _unit);
2015-10-14 17:56:54 +00:00
_flashlights