Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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 };
EDamageState
EDamageState
Definition: EDamageState.c:12
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition: EEditableEntityType.c:5
SCR_HealEntitiesContextAction
Definition: SCR_HealEntitiesContextAction.c:3
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_SelectedEntitiesContextAction
Definition: SCR_SelectedEntitiesContextAction.c:10
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
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