2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-09-18 23:12:03 +00:00
|
|
|
* Author: KoffeinFlummi, joko // Jonas
|
2015-01-11 16:42:31 +00:00
|
|
|
* Nothing to see here, move along.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* Whatever the module provides. (I dunno.)
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-09-18 19:46:21 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-18 23:12:03 +00:00
|
|
|
params ["", "_units", "_activated"];
|
2015-05-14 22:12:40 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
if !(_activated) exitWith {};
|
|
|
|
|
2015-09-18 23:12:03 +00:00
|
|
|
if (isNil QGVAR(LSD_Vehicles)) then {
|
|
|
|
GVAR(LSD_Vehicles) = [];
|
|
|
|
};
|
2015-09-18 19:46:21 +00:00
|
|
|
|
2015-09-18 23:12:03 +00:00
|
|
|
{
|
|
|
|
_hSCount = count (getArray (configFile >> "CfgVehicles" >> typeOf _x >> "hiddenSelections"));
|
|
|
|
if (_hSCount > 0) then {
|
|
|
|
GVAR(LSD_Vehicles) pushBack [_x, _hSCount];
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
2015-09-18 23:12:03 +00:00
|
|
|
nil
|
2015-01-11 16:42:31 +00:00
|
|
|
} count _units;
|
|
|
|
|
2015-09-19 16:47:00 +00:00
|
|
|
if (isNil QGVAR(LSD_Colors)) then {
|
|
|
|
GVAR(LSD_Colors) = [
|
|
|
|
"#(argb,8,8,3)color(1,0,0,1,co)",
|
|
|
|
"#(argb,8,8,3)color(1,0.5,0,1,co)",
|
|
|
|
"#(argb,8,8,3)color(1,1,0,1,co)",
|
|
|
|
"#(argb,8,8,3)color(0,1,0,1,co)",
|
|
|
|
"#(argb,8,8,3)color(0,0,1,1,co)",
|
|
|
|
"#(argb,8,8,3)color(0.2,0,0.5,1,co)",
|
|
|
|
"#(argb,8,8,3)color(0.5,0,1,1,co)"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2015-09-18 23:12:03 +00:00
|
|
|
if (isNil QGVAR(LSD_PFH)) then {
|
|
|
|
GVAR(LSD_PFH) = [{
|
2015-09-19 07:24:28 +00:00
|
|
|
(_this select 0) params ["_index"];
|
2015-09-18 23:12:03 +00:00
|
|
|
{
|
2015-09-19 00:44:02 +00:00
|
|
|
_x params ["_vehicle", "_hSCount"];
|
2015-09-18 23:12:03 +00:00
|
|
|
for "_i" from 0 to (_hSCount - 1) do {
|
2015-09-19 16:47:00 +00:00
|
|
|
_vehicle setObjectTexture [_i, GVAR(LSD_Colors) select _index];
|
2015-09-18 23:12:03 +00:00
|
|
|
};
|
|
|
|
nil
|
|
|
|
} count GVAR(LSD_Vehicles);
|
2015-09-19 07:24:28 +00:00
|
|
|
|
2015-09-19 16:47:00 +00:00
|
|
|
_index = ((_index + 1) % 7) mod count GVAR(LSD_Colors);
|
2015-09-19 07:24:28 +00:00
|
|
|
(_this select 0) set [0, _index];
|
|
|
|
|
|
|
|
}, 0.02, [0]] call CBA_fnc_addPerFrameHandler;
|
2015-09-18 23:12:03 +00:00
|
|
|
};
|
|
|
|
ACE_LOGINFO("WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEED.");
|