Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_NotificationOnKillfeedChanged.c
Go to the documentation of this file.
1 
11 {
12  override string GetText(SCR_NotificationData data)
13  {
14  int playerID, killfeedType, isreceive;
15  string killfeedChangedTo = "UNKNOWN";
16  data.GetParams(playerID, killfeedType, isreceive);
17 
18  BaseGameMode gameMode = GetGame().GetGameMode();
19  if (!gameMode)
20  return super.GetText(data);
21 
22  SCR_NotificationSenderComponent notificationSender = SCR_NotificationSenderComponent.Cast(gameMode.FindComponent(SCR_NotificationSenderComponent));
23  if (!notificationSender)
24  return super.GetText(data);
25 
26  //~ Get the correct killfeed name it was changed to, to display in the notification.
27  if (isreceive == false)
28  {
29  array<ref SCR_NotificationKillfeedTypeName> killFeedTypeNames = new array<ref SCR_NotificationKillfeedTypeName>;
30  notificationSender.GetKillFeedTypeNames(killFeedTypeNames);
31 
32  foreach (SCR_NotificationKillfeedTypeName killfeed: killFeedTypeNames)
33  {
34  if (killfeed.GetKillfeedType() == killfeedType)
35  {
36  killfeedChangedTo = killfeed.GetName();
37  break;
38  }
39  }
40  }
41  //~ Get the correct killfeed receive name it was changed to, to display in the notification.
42  else
43  {
44  array<ref SCR_NotificationKillfeedreceiveTypeName> killFeedReceiveTypeNames = new array<ref SCR_NotificationKillfeedreceiveTypeName>;
45  notificationSender.GetKillFeedReceiveTypeNames(killFeedReceiveTypeNames);
46 
47  foreach (SCR_NotificationKillfeedreceiveTypeName killfeed: killFeedReceiveTypeNames)
48  {
49  if (killfeed.GetKillfeedReceiveType() == killfeedType)
50  {
51  killfeedChangedTo = killfeed.GetName();
52  break;
53  }
54  }
55  }
56 
57  string playerName;
58  data.GetNotificationTextEntries(playerName);
59  if (!GetPlayerName(playerID, playerName))
60  return string.Empty;
61 
62  data.SetNotificationTextEntries(playerName, killfeedChangedTo);
63  return super.GetText(data);
64  }
65 };
66 
67 
68 
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
SCR_NotificationOnKillfeedChanged
Definition: SCR_NotificationOnKillfeedChanged.c:10
ENotification
ENotification
Definition: ENotification.c:4
SCR_NotificationKillfeedreceiveTypeName
Class to get Killfeed receive type name.
Definition: SCR_NotificationSenderComponent.c:685
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
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