Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BleedCharacterContextAction.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
4 {
5  override bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
6  {
7  return selectedEntity.GetEntityType() == EEditableEntityType.CHARACTER;
8  }
9 
10  override bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
11  {
12  SCR_CharacterDamageManagerComponent characterDamageManager = SCR_CharacterDamageManagerComponent.Cast(selectedEntity.GetOwner().FindComponent(SCR_CharacterDamageManagerComponent));
13  if (!characterDamageManager)
14  return false;
15 
16  if (characterDamageManager.GetState() == EDamageState.DESTROYED || characterDamageManager.IsDamagedOverTime(EDamageType.BLEEDING))
17  return false;
18 
19  return true;
20  }
21 
22  //------------------------------------------------------------------------------------------------
23  override void Perform(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
24  {
25  SCR_CharacterDamageManagerComponent characterDamageManager = SCR_CharacterDamageManagerComponent.Cast(selectedEntity.GetOwner().FindComponent(SCR_CharacterDamageManagerComponent));
26  if (!characterDamageManager)
27  return;
28 
29  characterDamageManager.AddParticularBleeding();
30  }
31 };
SCR_BleedCharacterContextAction
Definition: SCR_BleedCharacterContextAction.c:3
EDamageState
EDamageState
Definition: EDamageState.c:12
SCR_CharacterDamageManagerComponent
Definition: SCR_CharacterDamageManagerComponent.c:18
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition: EEditableEntityType.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_SelectedEntitiesContextAction
Definition: SCR_SelectedEntitiesContextAction.c:10
EDamageType
EDamageType
Definition: EDamageType.c:12
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