Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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
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};
ENotification
ENotificationColor
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 SetPositionDataEditablePlayer(int playerID, SCR_NotificationData data)
bool GetPlayerName(int playerID, out string playerName)
bool AreEntitiesFriendly(int entity1ID, bool entity1IsPlayer, int entity2ID, bool entity2IsPlayer)
bool CanSetPosition(SCR_NotificationData data)
ENotificationColor GetFactionRelatedColorPlayer(int notificationPlayerID, ENotificationColor colorType)