From 38ed8003890f64df9a2d0eda7110ab4a57119a08 Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 13 Jan 2015 12:30:20 +0100 Subject: [PATCH] move ui folder, cleanup --- TO_MERGE/agm/NameTags/RscTitles.hpp | 41 ----- TO_MERGE/agm/NameTags/clientInit.sqf | 60 -------- TO_MERGE/agm/NameTags/config.cpp | 143 ------------------ .../NameTags/functions/CrewInfo/common.sqf | 24 --- .../functions/CrewInfo/fn_canShow.sqf | 26 ---- .../NameTags/functions/CrewInfo/fn_doShow.sqf | 92 ----------- .../functions/CrewInfo/fn_getVehicleData.sqf | 123 --------------- .../functions/CrewInfo/fn_onMouseZChanged.sqf | 16 -- .../functions/CrewInfo/fn_setText.sqf | 23 --- .../NameTags/functions/fn_drawNameTagIcon.sqf | 61 -------- .../NameTags/functions/fn_moduleNameTags.sqf | 27 ---- TO_MERGE/agm/NameTags/stringtable.xml | 72 --------- .../nametags}/UI/IconNameTags_ca.paa | Bin .../nametags}/UI/icon_position_ffv.paa | Bin 14 files changed, 708 deletions(-) delete mode 100644 TO_MERGE/agm/NameTags/RscTitles.hpp delete mode 100644 TO_MERGE/agm/NameTags/clientInit.sqf delete mode 100644 TO_MERGE/agm/NameTags/config.cpp delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/common.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/fn_canShow.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/fn_doShow.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/fn_getVehicleData.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/fn_onMouseZChanged.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/CrewInfo/fn_setText.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/fn_drawNameTagIcon.sqf delete mode 100644 TO_MERGE/agm/NameTags/functions/fn_moduleNameTags.sqf delete mode 100644 TO_MERGE/agm/NameTags/stringtable.xml rename {TO_MERGE/agm/NameTags => addons/nametags}/UI/IconNameTags_ca.paa (100%) rename {TO_MERGE/agm/NameTags => addons/nametags}/UI/icon_position_ffv.paa (100%) diff --git a/TO_MERGE/agm/NameTags/RscTitles.hpp b/TO_MERGE/agm/NameTags/RscTitles.hpp deleted file mode 100644 index 32ea8d5c3d..0000000000 --- a/TO_MERGE/agm/NameTags/RscTitles.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#define AGM_CrewInfo_TextIDC 11123 - -#define CT_STRUCTURED_TEXT 13 -#define ST_LEFT 0 - -class RscTitles { - titles[]={"AGM_CrewInfo_dialog"}; - class AGM_CrewInfo_dialog { - idd = -1; - movingEnable = 1; - duration = 1; - fadein = 0; - fadeout = 999999; - name = "AGM_CrewInfo_dialog"; - controlsBackground[] = {"AGM_CrewInfo_text"}; - onLoad = "uiNamespace setVariable ['AGM_CrewInfo_dialog', _this select 0]"; - onUnload = "uiNamespace setVariable ['AGM_CrewInfo_dialog', objNull]"; - - class AGM_CrewInfo_text { - idc = AGM_CrewInfo_TextIDC; - type = CT_STRUCTURED_TEXT; - style = ST_LEFT; - x = SafeZonex + SafezoneW - 0.31; - y = SafeZoneY + SafeZoneH*0.4; - w = 0.3; - h = 0.6; - size = 0.018; - colorBackground[] = { 0, 0, 0, 0 }; - colortext[] = { - "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", - "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" - }; - text=""; - class Attributes { - align = right; - }; - }; - }; -}; diff --git a/TO_MERGE/agm/NameTags/clientInit.sqf b/TO_MERGE/agm/NameTags/clientInit.sqf deleted file mode 100644 index aa325bbd7e..0000000000 --- a/TO_MERGE/agm/NameTags/clientInit.sqf +++ /dev/null @@ -1,60 +0,0 @@ -// by commy2 and CAA-Picard - -if (!hasInterface) exitWith {}; - -AGM_NameTags_ShowNamesTime = -10; - -addMissionEventHandler ["Draw3D", { - if !(profileNamespace getVariable ["AGM_showPlayerNames", true]) exitWith {}; - - _player = AGM_player; - if (profileNamespace getVariable ["AGM_showPlayerNamesOnlyOnCursor", true]) then { - _target = cursorTarget; - _target = if (_target in allUnitsUAV) then {objNull} else {effectiveCommander _target}; - - if (!isNull _target && {side group _target == playerSide} && {_target != _player} && {isPlayer _target || {AGM_NameTags_ShowNamesForAI}} && {!(_target getVariable ["AGM_hideName", false])}) then { - _distance = _player distance _target; - _alpha = ((1 - 0.2 * (_distance - AGM_NameTags_PlayerNamesViewDistance)) min 1) * AGM_NameTags_PlayerNamesMaxAlpha; - if (profileNamespace getVariable ["AGM_showPlayerNamesOnlyOnKeyPress", false]) then { - _alpha = _alpha min (1 - (time - AGM_NameTags_ShowNamesTime - 1)); - }; - [_player, _target, _alpha, _distance * 0.026] call AGM_NameTags_fnc_drawNameTagIcon; - }; - } else { - _pos = positionCameraToWorld [0, 0, 0]; - _targets = _pos nearObjects ["Man", AGM_NameTags_PlayerNamesViewDistance + 5]; - - if (!surfaceIsWater _pos) then { - _pos = ATLtoASL _pos; - }; - _pos2 = positionCameraToWorld [0, 0, 1]; - if (!surfaceIsWater _pos2) then { - _pos2 = ATLtoASL _pos2; - }; - _vecy = _pos2 vectorDiff _pos; - - { - _target = if (_x in allUnitsUAV) then {objNull} else {effectiveCommander _x}; - - if (!isNull _target && {side group _target == playerSide} && {_target != _player} && {isPlayer _target || {AGM_NameTags_ShowNamesForAI}} && {!(_target getVariable ["AGM_hideName", false])}) then { - _relPos = (visiblePositionASL _target) vectorDiff _pos; - _distance = vectorMagnitude _relPos; - _projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy)); - - _alpha = ((1 - 0.2 * (_distance - AGM_NameTags_PlayerNamesViewDistance)) min (1 - 0.15 * (_projDist * 5 - _distance - 3)) min 1) * AGM_NameTags_PlayerNamesMaxAlpha; - - if (profileNamespace getVariable ["AGM_showPlayerNamesOnlyOnKeyPress", false]) then { - _alpha = _alpha min (1 - (time - AGM_NameTags_ShowNamesTime - 1)); - }; - - // Check if there is line of sight - if (_alpha > 0) then { - if (lineIntersects [_pos, (visiblePositionASL _target) vectorAdd [0,0,1], vehicle _player, _target]) then { - _alpha = 0; - }; - }; - [_player, _target, _alpha, _distance * 0.026] call AGM_NameTags_fnc_drawNameTagIcon; - }; - } forEach _targets; - }; -}]; diff --git a/TO_MERGE/agm/NameTags/config.cpp b/TO_MERGE/agm/NameTags/config.cpp deleted file mode 100644 index aa0be72b5e..0000000000 --- a/TO_MERGE/agm/NameTags/config.cpp +++ /dev/null @@ -1,143 +0,0 @@ -class CfgPatches { - class AGM_NameTags { - units[] = {}; - weapons[] = {}; - requiredVersion = 0.60; - requiredAddons[] = {AGM_Core, AGM_Interaction}; - version = "0.95"; - versionStr = "0.95"; - versionAr[] = {0,95,0}; - author[] = {"commy2", "CAA-Picard"}; - authorUrl = "https://github.com/commy2/"; - }; -}; - -class CfgFunctions { - class AGM_NameTags { - class AGM_NameTags { - file = "\AGM_NameTags\functions"; - class drawNameTagIcon; - class moduleNameTags; - }; - }; - class AGM_CrewInfo { - class AGM_CrewInfo { - file = "AGM_NameTags\functions\CrewInfo"; - class canShow; - class doShow; - class getVehicleData; - class onMouseZChanged; - class setText; - }; - }; -}; - -class Extended_PostInit_EventHandlers { - class AGM_NameTags { - clientInit = "call compile preprocessFileLineNumbers '\AGM_NameTags\clientInit.sqf'"; - }; -}; - -class AGM_Core_Default_Keys { - class showNames { - displayName = "$STR_AGM_NameTags_ShowNames"; - condition = "true"; - statement = "AGM_NameTags_ShowNamesTime = time; if (call AGM_CrewInfo_fnc_canShow) then {call AGM_CrewInfo_fnc_doShow;};"; - key = 29; - shift = 0; - control = 0; - alt = 0; - allowHolding = 1; - }; -}; - -class AGM_Core_Options { - class showPlayerNames { - displayName = "$STR_AGM_NameTags_ShowPlayerNames"; - default = 1; - }; - class showPlayerNamesOnlyOnCursor { - displayName = "$STR_AGM_NameTags_ShowPlayerNamesOnlyOnCursor"; - default = 1; - }; - class showPlayerNamesOnlyOnKeyPress { - displayName = "$STR_AGM_NameTags_ShowPlayerNamesOnlyOnKeyPress"; - default = 0; - }; - class showPlayerRanks { - displayName = "$STR_AGM_NameTags_ShowPlayerRanks"; - default = 1; - }; - class showVehicleCrewInfo { - displayName = "$STR_AGM_CrewInfo_ShowVehicleCrewInfo"; - default = 1; - }; -}; - -class AGM_Parameters_Numeric { - AGM_NameTags_PlayerNamesViewDistance = 5; - AGM_NameTags_PlayerNamesMaxAlpha = 0.8; - AGM_NameTags_CrewInfoVisibility = 0; -}; -class AGM_Parameters_Boolean { - AGM_NameTags_ShowNamesForAI = 0; -}; - -class CfgVehicles { - class Module_F; - class AGM_ModuleNameTags: Module_F { - author = "$STR_AGM_Core_AGMTeam"; - category = "AGM"; - displayName = "Name Tags"; - function = "AGM_NameTags_fnc_moduleNameTags"; - scope = 2; - isGlobal = 1; - icon = "\AGM_NameTags\UI\IconNameTags_ca.paa"; - class Arguments { - class PlayerNamesViewDistance { - displayName = "Player Names View Dist."; - description = "Distance in meters at which player names are shown. Default: 5"; - typeName = "NUMBER"; - defaultValue = 5; - }; - class ShowNamesForAI { - displayName = "Show name tags for AI?"; - description = "Show the name and rank tags for friendly AI units? Default: No"; - typeName = "BOOL"; - class values { - class Yes { - name = "Yes"; - value = 1; - }; - class No { - default = 1; - name = "No"; - value = 0; - }; - }; - }; - class Visibility { - displayName = "Visibility of crew info"; - description = "Forces visibility of vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force"; - typeName = "INT"; - class values { - class DoNotForce { - default = 1; - name = "Do Not Force"; - value = 0; - }; - class ForceShow { - name = "Force Show"; - value = 1; - }; - class ForceHide { - name = "Force Hide"; - value = -1; - }; - }; - }; - }; - }; -}; - -#include diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/common.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/common.sqf deleted file mode 100644 index aa80cdfa8d..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/common.sqf +++ /dev/null @@ -1,24 +0,0 @@ -/* - Author: aeroson - - Description: - Images, index in images and order of roles. - Defined number also implies order, lower number shows more on top of the list. -*/ - -#define PILOT 0 -#define DRIVER 1 -#define COPILOT PILOT -#define COMMANDER 2 -#define GUNNER 3 -#define FFV 4 -#define CARGO 5 - -#define ROLE_IMAGES [ \ - "a3\ui_f\data\IGUI\Cfg\Actions\getinpilot_ca.paa", \ - "a3\ui_f\data\IGUI\Cfg\Actions\getindriver_ca.paa", \ - "a3\ui_f\data\IGUI\Cfg\Actions\getincommander_ca.paa", \ - "a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa", \ - "AGM_NameTags\UI\icon_position_ffv.paa", \ - "a3\ui_f\data\IGUI\Cfg\Actions\getincargo_ca.paa" \ -] diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_canShow.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_canShow.sqf deleted file mode 100644 index 8e3dadedec..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_canShow.sqf +++ /dev/null @@ -1,26 +0,0 @@ -/* - Author: aeroson - - Description: - Might be called several times a second - - Parameters: - None - - Returns: - true if CrewInfo can be shown, false otherwise -*/ - -private["_player"]; - - -_player = AGM_player; - -// AGM_NameTags_ShowVehicleCrewInfo: -1 force NO, 0 doesnt care, 1 force YES - -vehicle _player != _player && -{ - (AGM_NameTags_CrewInfoVisibility == 1) || - (AGM_NameTags_CrewInfoVisibility != -1 && profileNamespace getVariable ["AGM_showVehicleCrewInfo", false]) -} && -{!(vehicle _player isKindOf "ParachuteBase")}; diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_doShow.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_doShow.sqf deleted file mode 100644 index 869cdb6fb7..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_doShow.sqf +++ /dev/null @@ -1,92 +0,0 @@ -/* - Author: aeroson - - Description: - Shows the actual text and sets text the crew info - - Parameters: - None - - Returns: - Nothing -*/ - -#include "common.sqf" - -private["_roleImages", "_player", "_vehicle", "_type", "_config", "_text", "_data", "_isAir", "_turretUnits", "_turretRoles", "_index", "_roleType", "_unit", "_toShow"]; - - -_player = AGM_player; -_vehicle = vehicle _player; -_type = typeOf _vehicle; -_config = configFile >> "CfgVehicles" >> _type; -_text = format[" %2
", getText(_config>>"picture"), getText (_config >> "DisplayName")]; - - - -_data = [_type] call AGM_CrewInfo_fnc_getVehicleData; - -_isAir = _data select 0; -_data = _data select 1; - -_turretUnits = [_data, { _vehicle turretUnit (_x select 0) } ] call AGM_Core_fnc_map; -_turretRoles = [_data, { _x select 1 } ] call AGM_Core_fnc_map; - - -_roleType = CARGO; -_toShow = []; -{ - switch (_x) do { - case commander _vehicle: { - _roleType = COMMANDER; - }; - case gunner _vehicle: { - _roleType = GUNNER; - }; - case driver _vehicle: { - _roleType = if(_isAir) then { PILOT } else { DRIVER }; - }; - default { - _index = _turretUnits find _x; - if(_index !=-1 ) then { - _roleType = _turretRoles select _index; - } else { - _roleType = CARGO; - }; - }; - }; - _toShow pushBack [_x, _roleType]; -} forEach crew _vehicle; - - -_toShow = [ - _toShow, - [], - { - _x select 1 - }, - "ASCEND", - { - _unit = _x select 0; - alive _unit - } -] call BIS_fnc_sortBy; - - -_roleImages = ROLE_IMAGES; -{ - _unit = _x select 0; - _roleType = _x select 1; - _text = _text + format["%1
", [_unit] call AGM_Core_fnc_getName, _roleImages select _roleType]; -} forEach _toShow; - - -("AGM_CrewInfo_CrewInfo" call BIS_fnc_rscLayer) cutRsc ["AGM_CrewInfo_dialog", "PLAIN", 1, false]; - -terminate (missionNamespace getVariable ["AGM_CrewInfo_hideCrewInfoHandle", scriptNull]); -AGM_CrewInfo_hideCrewInfoHandle = 0 spawn { - sleep 2; - ("AGM_CrewInfo_CrewInfo" call BIS_fnc_rscLayer) cutFadeOut 2; -}; - -[_text] call AGM_CrewInfo_fnc_setText; diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_getVehicleData.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_getVehicleData.sqf deleted file mode 100644 index d58c0ec458..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_getVehicleData.sqf +++ /dev/null @@ -1,123 +0,0 @@ -/* - Author: aeroson - - Description: - Gathers and caches data needed by AGM_CrewInfo_fnc_doShow - What really does make difference for the engine is simulation of CfgAmmo - Priority of roles is: driver/pilot, gunner, copilot, commander, ffv, cargo - - Parameters: - None - - Returns: - [ - Is vehicle inherited from Air ? - Array categorizing each vehicle's turret - ] -*/ - -#include "common.sqf" - - - -private ["_type", "_varName", "_data"]; - -_type = _this select 0; - -_varName = format ["AGM_CrewInfo_Cache_%1", _type]; -_data = + (uiNamespace getVariable _varName); - -if (!isNil "_data") exitWith { - _data -}; - -_data = []; - - - -private ["_isAir", "_config", "_fnc_addTurret", "_fnc_addTurretUnit"]; - -_isAir = _type isKindOf "Air"; - -_fnc_addTurretUnit = { - - private ["_config", "_path", "_role", "_simulationEmpty", "_simulationLaserDesignate", "_simulationOther", "_magazine", "_ammo", "_simulation"]; - - _config = _this select 0; - _path = _this select 1; - _role = CARGO; - - _simulationEmpty = 0; - _simulationLaserDesignate = 0; - _simulationOther = 0; - { - { - _magazine = configFile >> "CfgMagazines" >> _x; - _ammo = configfile >> "CfgAmmo" >> getText (_magazine >> "ammo"); - _simulation = getText (_ammo >> "simulation"); - - if(_simulation=="") then { - _simulationEmpty = _simulationEmpty + 1; - } else { - if(_simulation=="laserDesignate") then { - _simulationLaserDesignate = _simulationLaserDesignate + 1; - } else { - _simulationOther = _simulationOther + 1; - }; - }; - - } forEach getArray (configfile >> "CfgWeapons" >> _x >> "magazines"); - } forEach getArray (_config >> "weapons"); - - if(_simulationOther>0) then { - _role = GUNNER; - }; - if (_role == CARGO && {getNumber (_config >> "isCopilot") == 1}) then { - _role = COPILOT; - }; - if (_role == CARGO && {_simulationLaserDesignate>0 || getNumber (_config >> "primaryObserver") == 1}) then { - _role = COMMANDER; - }; - if (_role == CARGO && {getNumber (_config >> "isPersonTurret") == 1}) then { - _role = FFV; - }; - - _data pushBack [_path, _role]; - -}; - - -_fnc_addTurret = { - - private ["_config", "_path", "_count", "_offset", "_index", "_turretPath", "_turretConfig"]; - - _config = _this select 0; - _path = _this select 1; - - _config = _config >> "Turrets"; - _count = count _config; - - _offset = 0; - - for "_index" from 0 to (_count - 1) do { - _turretPath = _path + [_index - _offset]; - _turretConfig = _config select _index; - if (isClass _turretConfig) then { - [_turretConfig, _turretPath] call _fnc_addTurretUnit; - [_turretConfig, _turretPath] call _fnc_addTurret; - } else { - _offset = _offset + 1; - }; - - }; - -}; - - -_config = configFile >> "CfgVehicles" >> _type; -[_config, []] call _fnc_addTurret; - -_data = [_isAir, _data]; -uiNamespace setVariable [_varName, _data]; - -_data diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_onMouseZChanged.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_onMouseZChanged.sqf deleted file mode 100644 index 92cb5255c3..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_onMouseZChanged.sqf +++ /dev/null @@ -1,16 +0,0 @@ -/* - Author: aeroson - - Description: - Callback for mouse wheel change - - Parameters: - None - - Returns: - Nothing -*/ - -if(call AGM_CrewInfo_fnc_canShow) then { - call AGM_CrewInfo_fnc_doShow; -}; diff --git a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_setText.sqf b/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_setText.sqf deleted file mode 100644 index 7c31b910c8..0000000000 --- a/TO_MERGE/agm/NameTags/functions/CrewInfo/fn_setText.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - Author: aeroson - - Description: - Sets the text on the dialog - - Parameters: - None - - Returns: - Nothing -*/ - -#define AGM_CrewInfo_TextIDC 11123 - -private["_text", "_ctrl"]; - -disableSerialization; - -_text = _this select 0; -_ctrl = (uiNamespace getVariable "AGM_CrewInfo_dialog") displayCtrl AGM_CrewInfo_TextIDC; -_ctrl ctrlSetStructuredText parseText _text; -_ctrl ctrlCommit 0; diff --git a/TO_MERGE/agm/NameTags/functions/fn_drawNameTagIcon.sqf b/TO_MERGE/agm/NameTags/functions/fn_drawNameTagIcon.sqf deleted file mode 100644 index fd9f66f635..0000000000 --- a/TO_MERGE/agm/NameTags/functions/fn_drawNameTagIcon.sqf +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Author: commy2, CAA-Picard - * - * Draw the nametag and rank icon. - * - * Argument: - * 0: Unit (Array) - * 1: alpha (Number) - * 2: Height offset (Number) - * - * Return value: - * None. - */ - -#define TEXTURES_RANKS [ \ - "", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \ -] - -private ["_player", "_target", "_alpha", "_heightOffset", "_height", "_position", "_color", "_name", "_rank", "_size"]; - -_player = _this select 0; -_target = _this select 1; -_alpha = _this select 2; -_heightOffset = _this select 3; - -_height = [2, 1.5, 1, 1.5, 1] select (["STAND", "CROUCH", "PRONE", "UNDEFINED", ""] find stance _target); - -_position = visiblePositionASL _target; -// Convert position to ASLW (expected by drawIcon3D) and add height offsets -_position set [2, ((_target modelToWorld [0,0,0]) select 2) + _height + _heightOffset]; - -_color = if !(group _target == group _player) then { - [0.77, 0.51, 0.08, _alpha] -} else { - [[1, 1, 1, _alpha], [1, 0, 0, _alpha], [0, 1, 0, _alpha], [0, 0, 1, _alpha], [1, 1, 0, _alpha]] select (["MAIN", "RED", "GREEN", "BLUE", "YELLOW"] find (if (_target == _player) then {0} else {assignedTeam _target})) max 0 -}; - -_name = [_target, true] call AGM_Core_fnc_getName; - -_rank = TEXTURES_RANKS select ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find rank _target) + 1); -_size = [0, 1] select (profileNamespace getVariable ["AGM_showPlayerRanks", true]); - -drawIcon3D [ - _rank, - _color, - _position, - _size, - _size, - 0, - _name, - 2, - 0.033, - "PuristaMedium" -]; diff --git a/TO_MERGE/agm/NameTags/functions/fn_moduleNameTags.sqf b/TO_MERGE/agm/NameTags/functions/fn_moduleNameTags.sqf deleted file mode 100644 index 33b3941dc6..0000000000 --- a/TO_MERGE/agm/NameTags/functions/fn_moduleNameTags.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Author: CAA-Picard - * - * Initializes the name tags module. - * - * Arguments: - * Whatever the module provides. - * - * Return Value: - * None - */ - -if !(isServer) exitWith {}; - -_logic = _this select 0; -_units = _this select 1; -_activated = _this select 2; - -if !(_activated) exitWith {}; - -AGM_NameTags_Module = true; - -[_logic, "AGM_NameTags_PlayerNamesViewDistance", "PlayerNamesViewDistance" ] call AGM_Core_fnc_readNumericParameterFromModule; -[_logic, "AGM_NameTags_ShowNamesForAI", "ShowNamesForAI" ] call AGM_Core_fnc_readBooleanParameterFromModule; -[_logic, "AGM_NameTags_CrewInfoVisibility", "Visibility" ] call AGM_Core_fnc_readNumericParameterFromModule; - -diag_log text "[AGM]: NameTags Module Initialized."; diff --git a/TO_MERGE/agm/NameTags/stringtable.xml b/TO_MERGE/agm/NameTags/stringtable.xml deleted file mode 100644 index a558b8986f..0000000000 --- a/TO_MERGE/agm/NameTags/stringtable.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Show Names - Namen anzeigen - Mostrar nombres - Afficher noms - Zobrazit jména - Pokaż nazwy - Nevek mutatása - Показать имена - - - Show player names - Spielernamen anzeigen - Mostrar nombres de jugadores - Pokaż nazwy graczy - Afficher nom des joueurs - Játékosnevek mutatása - Zobrazit jména hráčů - Mostrar nomes de jogadores - Mostra i nomi dei giocatori - Показать имена игроков - - - Show player name only on cursor (requires player names) - Pokaż nazwę gracza tylko pod kursorem - Mostrar nombres solo en el cursor (requiere Mostrar nombres de jugadores) - Zeige Spielernamen nur an, wenn die Maus auf sie gerrichtet ist (benötigt Spielernamen) - Noms uniquement sous le curseur (si noms affichés) - Zobrazit jméno hráče jenom na kurzor (vyžaduje jména hráčů) - Mostra i nomi solo se puntati (richiede i nomi dei giocatori abilitati) - Mostrar nome de jogador somente no cursor (requer nome de jogadores) - Játékosok nevének mutatása (névcímke szükséges) - Показать имена игроков только под курсором (требует имен игроков) - - - Show player name only on keypress (requires player names) - Spielernamen nur auf Tastendruck anzeigen (benötigt Spielernamen) - Mostrar nombres solo al pulsar (requiere Mostrar nombres de jugadores) - Noms uniquement sur pression de la touche (si noms affichés) - Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů) - Pokaż nazwę gracza tylko po przytrzymaniu klawisza - Játékosnevek mutatása gombnyomásra(névcíme szükséges) - Показать имена игроков только по нажатию клавиши (требует имен игроков) - - - Show player ranks (requires player names) - Spielerränge anzeigen (benötig Spielernamen) - Pokaż rangi graczy (wymaga nazw graczy) - Mostrar rango de los jugadores (requiere Mostrar nombres de jugadores) - Grade des joueurs (si noms affichés) - Zobrazit hodnosti hráčů (vyžaduje jména hráčů) - Mostra i gradi (richiede i nomi dei giocatori abilitati) - Mostrar patente de jogadores (requer nome de jogadores) - Játékosok rendfokozatának mutatása (névcímke szükséges) - Показать звания игроков (требует имен игроков) - - - - - Show vehicle crew info - Zeige Fahrzeugbesatzung - Mostrar tripulantes - Pokaż informacje o załodze pojazdu - Zobrazit info o posádce vozidla - Показать экипаж - - - \ No newline at end of file diff --git a/TO_MERGE/agm/NameTags/UI/IconNameTags_ca.paa b/addons/nametags/UI/IconNameTags_ca.paa similarity index 100% rename from TO_MERGE/agm/NameTags/UI/IconNameTags_ca.paa rename to addons/nametags/UI/IconNameTags_ca.paa diff --git a/TO_MERGE/agm/NameTags/UI/icon_position_ffv.paa b/addons/nametags/UI/icon_position_ffv.paa similarity index 100% rename from TO_MERGE/agm/NameTags/UI/icon_position_ffv.paa rename to addons/nametags/UI/icon_position_ffv.paa