mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
29 lines
577 B
Plaintext
29 lines
577 B
Plaintext
/*
|
|
* Author: voiper
|
|
* Check a unit for any flashlights that can be used on map.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit to check <OBJECT>
|
|
*
|
|
* Return value:
|
|
* Flashlight classnames (empty for none) <ARRAY>
|
|
*
|
|
* Example:
|
|
* [unit] call ace_map_fnc_getUnitFlashlights;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
|
|
_flashlights = [];
|
|
|
|
{
|
|
if ((isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour")) && !(_x in _flashlights)) then {
|
|
_flashlights pushBack _x;
|
|
};
|
|
} forEach (items _unit);
|
|
|
|
_flashlights |