mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
25e212cfa3
* Show current team in interaction menu * Use nametags color for Team Management icon color * Use nametags color in Join team action icons colors * Update addons/interaction/functions/fnc_modifyTeamManagementAction.sqf Co-Authored-By: jonpas <jonpas33@gmail.com> * Apply suggestions from code review Co-authored-by: jonpas <jonpas33@gmail.com>
31 lines
983 B
Plaintext
31 lines
983 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: veteran29
|
|
* Modifies the ACE_TeamManagement or join team action with given group color and icon.
|
|
*
|
|
* Arguments:
|
|
* 0: Team color <STRING>
|
|
* 1: Icon to show on action <STRING>
|
|
* 2: Action Data to modifiy <ARRAY>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_teamColor", "_icon", "_actionData"];
|
|
|
|
private _color = switch (toUpper _teamColor) do {
|
|
case "RED": {missionNamespace getVariable [QEGVAR(nametags,nametagColorRed), [221, 0, 0]]};
|
|
case "GREEN": {missionNamespace getVariable [QEGVAR(nametags,nametagColorGreen), [0, 221, 0]]};
|
|
case "BLUE": {missionNamespace getVariable [QEGVAR(nametags,nametagColorBlue), [0, 0, 221]]};
|
|
case "YELLOW": {missionNamespace getVariable [QEGVAR(nametags,nametagColorYellow), [221, 221, 0]]};
|
|
default {missionNamespace getVariable [QEGVAR(nametags,nametagColorMain), [255, 255, 255]]};
|
|
};
|
|
|
|
_actionData set [2, [_icon, _color call BIS_fnc_colorRGBtoHTML]];
|
|
|
|
nil
|