mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Nametags - Add Nation Ranks (#7094)
* Adds icon and postInit Adds German, British, Spanish, French ranks. Also adds postInit code that loops through all factions and checks if ranks have been set there in there for easy, permanent customistability. * Removed white space * commy2's postInit rewrite Changes faction config entry to array with macros and changes the postInit code to commy2's improved version. * Update addons/nametags/CfgFactionClasses.hpp Co-Authored-By: Dedmen Miller <dedmen@users.noreply.github.com> * Adjusted arrays to be multi line Also removed white space. * Update addons/nametags/XEH_postInit.sqf Co-Authored-By: commy2 <commy-2@gmx.de> * Update addons/nametags/CfgFactionClasses.hpp Co-Authored-By: commy2 <commy-2@gmx.de> * Add getVar setting, don't overwrite if already set
This commit is contained in:
parent
2f3d8db134
commit
6ca4b2075d
79
addons/nametags/CfgFactionClasses.hpp
Normal file
79
addons/nametags/CfgFactionClasses.hpp
Normal file
@ -0,0 +1,79 @@
|
||||
class CfgFactionClasses {
|
||||
class OPF_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_russia\private_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\major_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class OPF_G_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_spain\private_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\major_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class OPF_T_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_russia\private_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\major_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class OPF_V_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_russia\private_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\major_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class IND_C_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_russia\private_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\major_gs.paa),
|
||||
QPATHTOF(UI\icons_russia\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class IND_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_germany\private_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\major_gs.paa),
|
||||
QPATHTOF(UI\icons_germany\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
class IND_G_F {
|
||||
GVAR(rankIcons)[] = {
|
||||
QPATHTOF(UI\icons_spain\private_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\corporal_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\sergeant_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\lieutenant_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\captain_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\major_gs.paa),
|
||||
QPATHTOF(UI\icons_spain\colonel_gs.paa)
|
||||
};
|
||||
};
|
||||
};
|
BIN
addons/nametags/UI/icons_france/captain_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/captain_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/colonel_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/colonel_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/corporal_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/corporal_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/lieutenant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/lieutenant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/major_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/major_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/private_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/private_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_france/sergeant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_france/sergeant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/captain_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/captain_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/colonel_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/colonel_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/corporal_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/corporal_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/lieutenant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/lieutenant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/major_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/major_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/private_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/private_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_germany/sergeant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_germany/sergeant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/captain_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/captain_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/colonel_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/colonel_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/corporal_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/corporal_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/lieutenant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/lieutenant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/major_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/major_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/private_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/private_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_spain/sergeant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_spain/sergeant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/captain_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/captain_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/colonel_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/colonel_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/corporal_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/corporal_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/lieutenant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/lieutenant_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/major_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/major_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/private_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/private_gs.paa
Normal file
Binary file not shown.
BIN
addons/nametags/UI/icons_uk/sergeant_gs.paa
Normal file
BIN
addons/nametags/UI/icons_uk/sergeant_gs.paa
Normal file
Binary file not shown.
@ -45,3 +45,15 @@ GVAR(showNamesTime) = -10;
|
||||
|
||||
// civilians don't use military ranks
|
||||
["CIV_F", ["","","","","","",""]] call FUNC(setFactionRankIcons);
|
||||
|
||||
// Change ranks based on faction for all factions that have an entry in CfgFactionClasses
|
||||
if (missionNamespace getVariable [QGVAR(useFactionIcons), true]) then {
|
||||
{
|
||||
if (isArray (_x >> QGVAR(rankIcons))) then {
|
||||
private _faction = configName _x;
|
||||
if (!isNil {GVAR(factionRanks) getVariable _faction}) exitWith {}; // don't overwrite if already set
|
||||
private _icons = getArray (_x >> QGVAR(rankIcons));
|
||||
[_faction, _icons] call FUNC(setFactionRankIcons);
|
||||
};
|
||||
} forEach ("true" configClasses (configFile >> "CfgFactionClasses"));
|
||||
};
|
||||
|
@ -16,6 +16,7 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgFactionClasses.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include <RscTitles.hpp>
|
||||
|
@ -29,6 +29,7 @@ if (isNil QGVAR(factionRanks)) then {
|
||||
};
|
||||
|
||||
params [["_faction", "", [""]], ["_icons", [], [[]], [7]]];
|
||||
TRACE_2("setFactionRankIcons",_faction,_icons);
|
||||
|
||||
if !(_faction != "" && {_icons isEqualTypeAll ""}) exitWith {false};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user