Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationPlayerTargetEditableEntity.c
Go to the documentation of this file.
1
9{
10 [Attribute("0", desc: "If true will get target Character name (first, alias and surname) if the entity is a NPC otherwise will get the entity type name eg: Rifleman")]
12
14 {
15 int playerID, targetID;
16 data.GetParams(playerID, targetID);
17
18 string playerName, entityName;
19 data.GetNotificationTextEntries(playerName, entityName);
20 if (!GetPlayerName(playerID, playerName) || !GetEditableEntityName(targetID, entityName, m_bGetTargetCharacterName))
21 return string.Empty;
22
23 data.SetNotificationTextEntries(playerName, entityName);
24 return super.GetText(data);
25 }
26
28 {
29 if (!CanSetPosition(data))
30 return;
31
32 int playerID, targetID;
33 data.GetParams(playerID, targetID);
35 }
36
38 {
39 int playerID, entityID;
40 data.GetParams(playerID, entityID);
41 data.SetFactionRelatedColor(GetFactionRelatedColorEntity(entityID, 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 = GetFactionRelatedColorEntity(entityID, splitNotificationUIInfo.GetRightTextColor());
52
53 //Check if left color should be the same as right color
54 if (splitNotificationUIInfo.ShouldReplaceLeftColorWithRightColorIfAlly() && AreEntitiesFriendly(playerID, true, entityID, false))
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(GetFactionRelatedColorEntity(entityID, coloredTextUiInfo.GetNotificationTextColor()));
64 }
65
66 }
67};
ENotification
ENotificationColor
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ENotificationColor GetFactionRelatedColorEntity(int notificationEntityID, ENotificationColor colorType)
void SetPositionDataEditableEntity(int enditableEntityID, SCR_NotificationData data)
bool GetPlayerName(int playerID, out string playerName)
bool AreEntitiesFriendly(int entity1ID, bool entity1IsPlayer, int entity2ID, bool entity2IsPlayer)
bool GetEditableEntityName(int entityRplID, out string entityName, bool useCharacterName=false)
bool CanSetPosition(SCR_NotificationData data)
ENotificationColor GetFactionRelatedColorPlayer(int notificationPlayerID, ENotificationColor colorType)
SCR_FieldOfViewSettings Attribute