Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_NotificationSupportStationHitZoneGroup.c
Go to the documentation of this file.
1 
7 {
8  [Attribute(desc: "Config to get the correct hitzone group names from. It will always send over one group so it could be that a group contains multiple hitzone groups in the final notification")]
9  protected ref SCR_HitZoneGroupNameHolder m_HitZoneGroupNameHolder;
10 
11  [Attribute(desc: "Config to get the correct damage intensity string")]
12  protected ref SCR_DamageIntensityHolder m_DamageIntensityHolder;
13 
14  [Attribute("0", desc: "If true will get Character name (first, alias and surname) if the entity is a NPC otherwise will get the entity type name eg: Rifleman")]
15  protected bool m_bGetCharacterName;
16 
17  //------------------------------------------------------------------------------------------------
18  override string GetText(SCR_NotificationData data)
19  {
20  if (!m_HitZoneGroupNameHolder)
21  {
22  Print("'SCR_NotificationSupportStationHitZoneGroup' notification: '" + typename.EnumToString(ENotification, m_NotificationKey) + "' is missing the HitzoneGroupDataHolder!", LogLevel.ERROR);
23  return string.Empty;
24  }
25 
26  if (!m_DamageIntensityHolder)
27  {
28  Print("'SCR_NotificationSupportStationHitZoneGroup' notification: '" + typename.EnumToString(ENotification, m_NotificationKey) + "' is missing the DamageIntensityHolder!", LogLevel.ERROR);
29  return string.Empty;
30  }
31 
32  int entityID, hitZoneGroup, health;
33  data.GetParams(entityID, hitZoneGroup, health);
34 
35  //~ Get Entity name
36  string entityName;
37  data.GetNotificationTextEntries(entityName);
38  if (!GetEditableEntityName(entityID, entityName, m_bGetCharacterName))
39  return string.Empty;
40 
41  //~ Get group name(s)
42  string hitZoneGroupString = m_HitZoneGroupNameHolder.GetHitZoneGroupName(hitZoneGroup);
43 
44  float healthScaled = health * 0.001;
45  SCR_UIName intensityUIInfo = m_DamageIntensityHolder.GetValidIntensityUIInfo(healthScaled);
46  if (!intensityUIInfo)
47  return string.Empty;
48 
49  string hitZoneDamageIntensity = intensityUIInfo.GetName();
50 
51  data.SetNotificationTextEntries(entityName, hitZoneGroupString, hitZoneDamageIntensity);
52  return super.GetText(data);
53  }
54 }
SCR_NotificationDisplayData
Definition: SCR_NotificationDisplayData.c:7
SCR_UIName
Definition: SCR_UIName.c:5
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
ENotification
ENotification
Definition: ENotification.c:4
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_HitZoneGroupNameHolder
Holds the name data to show which parts of the vehicle or character the player is healing.
Definition: SCR_HitZoneGroupNameHolder.c:3
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
SCR_NotificationSupportStationHitZoneGroup
Definition: SCR_NotificationSupportStationHitZoneGroup.c:6
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