Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseDamageHealSupportStationAction.c
Go to the documentation of this file.
1
3{
4 [Attribute(desc: "Used to get the damage state such as Critical, minor ect")]
5 protected ref SCR_DamageIntensityHolder m_DamageIntensityHolder;
6
7 SCR_DamageManagerComponent m_DamageManagerComponent;
8
9 //~ A list of hitZones to heal
10 protected ref array<HitZone> m_aHitZonesToHeal = {};
11
12 //------------------------------------------------------------------------------------------------
13 protected override void DelayedInit(IEntity owner)
14 {
15 if (!owner)
16 return;
17
18 super.DelayedInit(owner);
19
20 m_DamageManagerComponent = SCR_DamageManagerComponent.GetDamageManager(owner);
21
22 //~ Set hitZones to Repair
25 }
26
27 //------------------------------------------------------------------------------------------------
33 int GetHitZonesToHeal(notnull out array<HitZone> hitZones)
34 {
35 hitZones.Copy(m_aHitZonesToHeal);
36 return hitZones.Count();
37 }
38
39 //------------------------------------------------------------------------------------------------
40 protected void SetHitZonesToHeal()
41 {
42 m_aHitZonesToHeal.Clear();
43
45 return;
46
47 m_DamageManagerComponent.GetAllHitZonesInHierarchy(m_aHitZonesToHeal);
48
49 if (m_aHitZonesToHeal.Count() > 1)
50 {
51 HitZone defaultHitZone = m_DamageManagerComponent.GetDefaultHitZone();
52
53 // Move default hitZone to the end
54 int defaultHitZoneIndex = m_aHitZonesToHeal.Find(defaultHitZone);
55 if (m_aHitZonesToHeal.IsIndexValid(defaultHitZoneIndex))
56 {
57 m_aHitZonesToHeal.RemoveOrdered(defaultHitZoneIndex);
58 m_aHitZonesToHeal.InsertAt(defaultHitZone, m_aHitZonesToHeal.Count() -1);
59 }
60 }
61 }
62
63 //------------------------------------------------------------------------------------------------
64 SCR_DamageManagerComponent GetActionDamageManager()
65 {
67 }
68
69 //------------------------------------------------------------------------------------------------
70 protected override string GetActionStringParam()
71 {
72 if (!m_DamageIntensityHolder || m_aHitZonesToHeal.IsEmpty() || (!m_bCanPerform && m_eCannotPerformReason != ESupportStationReasonInvalid.HEAL_MAX_HEALABLE_HEALTH_REACHED_FIELD && m_eCannotPerformReason != ESupportStationReasonInvalid.HEAL_MAX_HEALABLE_HEALTH_REACHED_EMERGENCY))
73 return string.Empty;
74
75 SCR_UIName uiInfo = m_DamageIntensityHolder.GetValidIntensityUIInfo(m_aHitZonesToHeal);
76 if (uiInfo)
77 return uiInfo.GetName();
78
79 return string.Empty;
80 }
81
82 //------------------------------------------------------------------------------------------------
85 {
86 // Hitzones to heal are cached but if the entity owning them
87 // gets deleted we'd get a VME inside GetValidIntensityType
88 // because all hitzones would be null.
91
92 int healthState = m_DamageIntensityHolder.GetValidIntensityType(m_aHitZonesToHeal);
93
94 if (healthState == SCR_EDamageIntensityType.NO_DAMAGE)
96
97 if (IsInProgress())
99
100 if (IsStabilizedReason())
102
103 if (healthState < SCR_EDamageIntensityType.HIGH)
105
107 }
108
109 //------------------------------------------------------------------------------------------------
111 {
112 return m_eCannotPerformReason == ESupportStationReasonInvalid.HEAL_MAX_HEALABLE_HEALTH_REACHED_FIELD;
113 }
114}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external bool IsInProgress()
Returns true while continuous or timed action is being used.
SCR_ENearbyInteractionContextColors GetHealthStatus()
return the Health code color for nearby interactions
int GetHitZonesToHeal(notnull out array< HitZone > hitZones)
ESupportStationReasonInvalid m_eCannotPerformReason
LocalizedString GetName()
Definition SCR_UIName.c:31
SCR_FieldOfViewSettings Attribute