mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 21:23:30 +00:00
linted extract group color function and parsed colors gvar
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#include "..\..\script_component.hpp"
|
||||
|
||||
params["_group"];
|
||||
|
||||
_group_name = _group getVariable "_atak_group_name";
|
||||
_group_name = _group getVariable QGVAR(group_name);
|
||||
|
||||
if (isNil "_group_name") then {
|
||||
_group_colors = missionNamespace getVariable "armatak_group_colors";
|
||||
_group_colors = missionNamespace getVariable QGVAR(group_colors);
|
||||
_group_name = selectRandom _group_colors;
|
||||
|
||||
if (count _group_colors > 0) then {
|
||||
@@ -14,11 +16,11 @@ if (isNil "_group_name") then {
|
||||
_group_colors deleteAt _randomIndex;
|
||||
|
||||
_group_name = _selectedColor;
|
||||
_group setVariable ["_atak_group_name", _group_name];
|
||||
missionNamespace setVariable ["armatak_group_colors", _group_colors]
|
||||
_group setVariable [QGVAR(group_name), _group_name];
|
||||
missionNamespace setVariable [QGVAR(group_colors), _group_colors]
|
||||
} else {
|
||||
_group_name = "Red";
|
||||
_group setVariable ["_atak_group_name", _group_name];
|
||||
_group setVariable [QGVAR(group_name), _group_name];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user