Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationPlayerAndFaction.c
Go to the documentation of this file.
1
9{
10 override string GetText(SCR_NotificationData data)
11 {
12 int playerID;
13 data.GetParams(playerID);
14
15 string playerName, factionName;
16 data.GetNotificationTextEntries(playerName, factionName);
17 if (!GetPlayerName(playerID, playerName))
18 return string.Empty;
19
20 if (factionName.IsEmpty())
21 {
23 return string.Empty;
24
25 SCR_FactionManager factionManager = SCR_FactionManager.Cast(GetGame().GetFactionManager());
26 if (!factionManager)
27 return string.Empty;
28
29 //Get factions using ID
30 Faction playerFaction = factionManager.GetPlayerFaction(playerID);
31 if (!playerFaction)
32 return string.Empty;
33
34 factionName = playerFaction.GetUIInfo().GetName();
35 }
36
37 data.SetNotificationTextEntries(playerName, factionName);
38 return super.GetText(data);
39 }
40
41 override void SetFactionRelatedColor(SCR_NotificationData data)
42 {
43 int playerID;
44 data.GetParams(playerID);
45 data.SetFactionRelatedColor(GetFactionRelatedColorPlayer(playerID, m_info.GetNotificationColor()));
46 }
47};
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")
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
bool GetPlayerName(int playerID, out string playerName)
ENotificationColor GetFactionRelatedColorPlayer(int notificationPlayerID, ENotificationColor colorType)
proto external PlayerController GetPlayerController()