Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HealEntitiesContextAction.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
5 override bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
6 {
7 if (selectedEntity.GetEntityType() == EEditableEntityType.VEHICLE || selectedEntity.GetEntityType() == EEditableEntityType.CHARACTER)
8 {
9 return true;
10 }
11 return false;
12 }
13
14 override bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
15 {
16 SCR_DamageManagerComponent damageComponent = SCR_DamageManagerComponent.Cast(selectedEntity.GetOwner().FindComponent(SCR_DamageManagerComponent));
17 if (!damageComponent)
18 return false;
19
20 if (damageComponent.GetState() == EDamageState.DESTROYED)
21 return false;
22
23 return damageComponent.CanBeHealed();
24 }
25
26 override void Perform(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
27 {
28 SCR_DamageManagerComponent damageComponent = SCR_DamageManagerComponent.Cast(selectedEntity.GetOwner().FindComponent(SCR_DamageManagerComponent));
29 if (!damageComponent)
30 return;
31
32 damageComponent.FullHeal();
33 }
34};
SCR_EAIThreatSectorFlags flags
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
EEditableEntityType GetEntityType(IEntity owner=null)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
EDamageState