Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GroupHelperUI.c
Go to the documentation of this file.
2{
3 protected const string CUSTOM_GROUP_NAME_FORMAT = "#AR-Player_Groups_CustomName_Format";
4
5 //------------------------------------------------------------------------------------------------
9 static string GetTranslatedGroupName(notnull SCR_AIGroup group)
10 {
11 string company, platoon, squad, character, format;
12 group.GetCallsigns(company, platoon, squad, character, format);
13 string originalName = WidgetManager.Translate(format, company, platoon, squad, character);
14
15 PlayerController playerController = GetGame().GetPlayerController();
16 if (!playerController)
17 return originalName;
18
19 string customName = group.GetCustomName();
20 if (customName.IsEmpty())
21 return originalName;
22
23 return WidgetManager.Translate(CUSTOM_GROUP_NAME_FORMAT, customName, originalName);
24 }
25
26 //------------------------------------------------------------------------------------------------
31 {
32 string groupRoleName = group.GetGroupRoleName();
33 if (groupRoleName.IsEmpty() || group.GetGroupRole() == SCR_EGroupRole.NONE)
34 return GetTranslatedGroupName(group);
35
36 return WidgetManager.Translate(CUSTOM_GROUP_NAME_FORMAT, GetTranslatedGroupName(group), groupRoleName);
37 }
38
39 //------------------------------------------------------------------------------------------------
42 static string GetRoleName(notnull SCR_AIGroup group)
43 {
44 string groupRoleName = group.GetGroupRoleName();
45 if (group.GetGroupRole() == SCR_EGroupRole.NONE)
46 return string.Empty;
47
48 return groupRoleName;
49 }
50}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_EGroupRole
Group roles.
static string GetTranslatedGroupName(notnull SCR_AIGroup group)
static string GetRoleName(notnull SCR_AIGroup group)
static string GetTranslatedGroupNameAndRoleName(notnull SCR_AIGroup group)
const string CUSTOM_GROUP_NAME_FORMAT