mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
move ui folder, cleanup
This commit is contained in:
parent
069eb7860a
commit
38ed800389
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -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;
|
||||
};
|
||||
}];
|
@ -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 <RscTitles.hpp>
|
@ -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" \
|
||||
]
|
@ -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")};
|
@ -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["<t size='1.4'><img image='%1'></t> <t size='1.7' shadow='true'>%2</t><br/>", 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["<t size='1.5' shadow='true'>%1</t> <t size='1.3'><img image='%2'></t><br/>", [_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;
|
@ -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
|
@ -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;
|
||||
};
|
@ -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;
|
@ -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"
|
||||
];
|
@ -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.";
|
@ -1,72 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-17 -->
|
||||
<Project name="AGM">
|
||||
<Package name="NameTags">
|
||||
<Key ID="STR_AGM_NameTags_ShowNames">
|
||||
<English>Show Names</English>
|
||||
<German>Namen anzeigen</German>
|
||||
<Spanish>Mostrar nombres</Spanish>
|
||||
<French>Afficher noms</French>
|
||||
<Czech>Zobrazit jména</Czech>
|
||||
<Polish>Pokaż nazwy</Polish>
|
||||
<Hungarian>Nevek mutatása</Hungarian>
|
||||
<Russian>Показать имена</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_NameTags_ShowPlayerNames">
|
||||
<English>Show player names</English>
|
||||
<German>Spielernamen anzeigen</German>
|
||||
<Spanish>Mostrar nombres de jugadores</Spanish>
|
||||
<Polish>Pokaż nazwy graczy</Polish>
|
||||
<French>Afficher nom des joueurs</French>
|
||||
<Hungarian>Játékosnevek mutatása</Hungarian>
|
||||
<Czech>Zobrazit jména hráčů</Czech>
|
||||
<Portuguese>Mostrar nomes de jogadores</Portuguese>
|
||||
<Italian>Mostra i nomi dei giocatori</Italian>
|
||||
<Russian>Показать имена игроков</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_NameTags_ShowPlayerNamesOnlyOnCursor">
|
||||
<English>Show player name only on cursor (requires player names)</English>
|
||||
<Polish>Pokaż nazwę gracza tylko pod kursorem</Polish>
|
||||
<Spanish>Mostrar nombres solo en el cursor (requiere Mostrar nombres de jugadores)</Spanish>
|
||||
<German>Zeige Spielernamen nur an, wenn die Maus auf sie gerrichtet ist (benötigt Spielernamen)</German>
|
||||
<French>Noms uniquement sous le curseur (si noms affichés)</French>
|
||||
<Czech>Zobrazit jméno hráče jenom na kurzor (vyžaduje jména hráčů)</Czech>
|
||||
<Italian>Mostra i nomi solo se puntati (richiede i nomi dei giocatori abilitati)</Italian>
|
||||
<Portuguese>Mostrar nome de jogador somente no cursor (requer nome de jogadores)</Portuguese>
|
||||
<Hungarian>Játékosok nevének mutatása (névcímke szükséges)</Hungarian>
|
||||
<Russian>Показать имена игроков только под курсором (требует имен игроков)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_NameTags_ShowPlayerNamesOnlyOnKeyPress">
|
||||
<English>Show player name only on keypress (requires player names)</English>
|
||||
<German>Spielernamen nur auf Tastendruck anzeigen (benötigt Spielernamen)</German>
|
||||
<Spanish>Mostrar nombres solo al pulsar (requiere Mostrar nombres de jugadores)</Spanish>
|
||||
<French>Noms uniquement sur pression de la touche (si noms affichés)</French>
|
||||
<Czech>Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů)</Czech>
|
||||
<Polish>Pokaż nazwę gracza tylko po przytrzymaniu klawisza</Polish>
|
||||
<Hungarian>Játékosnevek mutatása gombnyomásra(névcíme szükséges)</Hungarian>
|
||||
<Russian>Показать имена игроков только по нажатию клавиши (требует имен игроков)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_NameTags_ShowPlayerRanks">
|
||||
<English>Show player ranks (requires player names)</English>
|
||||
<German>Spielerränge anzeigen (benötig Spielernamen)</German>
|
||||
<Polish>Pokaż rangi graczy (wymaga nazw graczy)</Polish>
|
||||
<Spanish>Mostrar rango de los jugadores (requiere Mostrar nombres de jugadores)</Spanish>
|
||||
<French>Grade des joueurs (si noms affichés)</French>
|
||||
<Czech>Zobrazit hodnosti hráčů (vyžaduje jména hráčů)</Czech>
|
||||
<Italian>Mostra i gradi (richiede i nomi dei giocatori abilitati)</Italian>
|
||||
<Portuguese>Mostrar patente de jogadores (requer nome de jogadores)</Portuguese>
|
||||
<Hungarian>Játékosok rendfokozatának mutatása (névcímke szükséges)</Hungarian>
|
||||
<Russian>Показать звания игроков (требует имен игроков)</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
<Package name="CrewInfo">
|
||||
<Key ID="STR_AGM_CrewInfo_ShowVehicleCrewInfo">
|
||||
<English>Show vehicle crew info</English>
|
||||
<German>Zeige Fahrzeugbesatzung</German>
|
||||
<Spanish>Mostrar tripulantes</Spanish>
|
||||
<Polish>Pokaż informacje o załodze pojazdu</Polish>
|
||||
<Czech>Zobrazit info o posádce vozidla</Czech>
|
||||
<Russian>Показать экипаж</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user