mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fedad7f8f7
* Add ace_chemlights. Make chemlight intensity and dropoff more realistic. Add orange, white, IR chemlights. Add chemlight shields. Make chemlight impact sounds more realistic. * Moved impact sound changes to a different branch. * Used QPATHTOF. Fixed scopes. Used initServer. Reduced lifetime duration. Checked privates. * Stringtable: 5 minute. * Blue lifetime. Removed ref to deprecated function * Use proper magazine macro. Add new chemlights to Misc box.
32 lines
740 B
Plaintext
32 lines
740 B
Plaintext
/*
|
|
* Author: voiper
|
|
* Check a unit for whether they're carrying a chemlight shield and a chemlight.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit to check <OBJECT>
|
|
*
|
|
* Return value:
|
|
* List of carried chemlight classnames <ARRAY>
|
|
*
|
|
* Example:
|
|
* [ACE_player] call ace_chemlights_fnc_getShieldComponents;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
private _components = [];
|
|
private _items = itemsWithMagazines _unit;
|
|
|
|
if !("ACE_Chemlight_Shield" in _items) exitWith {_components};
|
|
|
|
{
|
|
if ((_x isKindOf ["Chemlight_green", configFile >> "CfgMagazines"]) && {getText (configFile >> "CfgMagazines" >> _x >> "ACE_Chemlight_Shield") != ""}) then {
|
|
_components pushBackUnique _x;
|
|
};
|
|
} forEach _items;
|
|
|
|
_components
|