Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationRank.c
Go to the documentation of this file.
1
9{
10 //------------------------------------------------------------------------------------------------
11 override string GetText(SCR_NotificationData data)
12 {
13 SCR_ECharacterRank neededRank;
14 int playerID;
15 data.GetParams(playerID, neededRank);
16
17 data.SetNotificationTextEntries(GetPlayerRankName(playerID), GetRankName(playerID, neededRank));
18 return super.GetText(data);
19 }
20
21 //------------------------------------------------------------------------------------------------
22 override void SetPosition(SCR_NotificationData data)
23 {
24 if (!CanSetPosition(data))
25 return;
26
27 int playerID;
28 data.GetParams(playerID);
30 }
31
32 //------------------------------------------------------------------------------------------------
36
37 string GetPlayerRankName(int playerID)
38 {
39 PlayerManager playerManager = GetGame().GetPlayerManager();
40 if (!playerManager)
41 return string.Empty;
42
43 IEntity ent = playerManager.GetPlayerControlledEntity(playerID);
44 if (!ent)
45 return string.Empty;
46
48 if (!rankComponent)
49 return string.Empty;
50
51 return rankComponent.GetCharacterRankName(ent);
52 }
53
54 //------------------------------------------------------------------------------------------------
59
60 string GetRankName(int playerID, SCR_ECharacterRank rank)
61 {
62 PlayerManager playerManager = GetGame().GetPlayerManager();
63 if (!playerManager)
64 return string.Empty;
65
66 IEntity ent = playerManager.GetPlayerControlledEntity(playerID);
67 if (!ent)
68 return string.Empty;
69
71 if (!rankComponent)
72 return string.Empty;
73
74 return rankComponent.GetRankName(ent, rank);
75 }
76};
ENotification
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
string GetText()
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Get all prefabs that have the spawner data
proto external Managed FindComponent(typename typeName)
void SetPositionDataEditablePlayer(int playerID, SCR_NotificationData data)
bool CanSetPosition(SCR_NotificationData data)