Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_NotificationPlayerTargetPlayer.c
Go to the documentation of this file.
1 
11 {
12  override string GetText(SCR_NotificationData data)
13  {
14  int playerID, playerTargetID;
15  data.GetParams(playerID, playerTargetID);
16 
17  string playerName, playerTargetName;
18  data.GetNotificationTextEntries(playerName, playerTargetName);
19  if (!GetPlayerName(playerID, playerName) || !GetPlayerName(playerTargetID, playerTargetName))
20  return string.Empty;
21 
22  data.SetNotificationTextEntries(playerName, playerTargetName);
23  return super.GetText(data);
24  }
25 
26  override void SetPosition(SCR_NotificationData data)
27  {
28  if (!CanSetPosition(data))
29  return;
30 
31  int playerID, playerTargetID;
32  data.GetParams(playerID, playerTargetID);
33 
34  SetPositionDataEditablePlayer(playerTargetID, data);
35  }
36 
37  override void SetFactionRelatedColor(SCR_NotificationData data)
38  {
39  int playerID, playerTargetID;
40  data.GetParams(playerID, playerTargetID);
41  data.SetFactionRelatedColor(GetFactionRelatedColorPlayer(playerTargetID, m_info.GetNotificationColor()));
42 
43  //Split notification sets faction colors of left and right texts taking player ids, Text color var set the faction color of the target entity
44  SCR_SplitNotificationUIInfo splitNotificationUIInfo = SCR_SplitNotificationUIInfo.Cast(m_info);
46 
47  if (splitNotificationUIInfo)
48  {
49  ENotificationColor leftColor, rightColor;
50 
51  rightColor = GetFactionRelatedColorPlayer(playerTargetID, splitNotificationUIInfo.GetRightTextColor());
52 
53  //Check if left color should be the same as right color
54  if (splitNotificationUIInfo.ShouldReplaceLeftColorWithRightColorIfAlly() && AreEntitiesFriendly(playerID, true, playerTargetID, true))
55  leftColor = rightColor;
56  else
57  leftColor = GetFactionRelatedColorPlayer(playerID, splitNotificationUIInfo.GetLeftTextColor());
58 
59  data.SetSplitFactionRelatedColor(leftColor, rightColor);
60  }
61  else if (coloredTextUiInfo)
62  {
63  data.SetFactionRelatedTextColor(GetFactionRelatedColorPlayer(playerTargetID, coloredTextUiInfo.GetNotificationTextColor()));
64  }
65  }
66 };
SCR_NotificationDisplayData
Definition: SCR_NotificationDisplayData.c:7
SCR_SplitNotificationUIInfo
Definition: SCR_SplitNotificationUIInfo.c:2
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
SCR_ColoredTextNotificationUIInfo
Definition: SCR_ColoredTextNotificationUIInfo.c:2
SCR_NotificationPlayerTargetPlayer
Definition: SCR_NotificationPlayerTargetPlayer.c:10
ENotification
ENotification
Definition: ENotification.c:4
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
ENotificationColor
ENotificationColor
Definition: ENotificationColor.c:4
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