Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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  {
22  if (!GetGame().GetPlayerController())
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 };
SCR_NotificationPlayer
Definition: SCR_NotificationPlayer.c:10
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
ENotification
ENotification
Definition: ENotification.c:4
SCR_NotificationPlayerAndFaction
Definition: SCR_NotificationPlayerAndFaction.c:8
Faction
Definition: Faction.c:12
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468