Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SetEnableDamageEditorAttribute.c
Go to the documentation of this file.
3{
4 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5 {
6 //Disabled for now
7 return null;
8
10 if (!editableEntity)
11 return null;
12
13 if (!IsValidEntityType(editableEntity.GetEntityType()))
14 return null;
15
16 IEntity owner = editableEntity.GetOwner();
17 if (!owner)
18 return null;
19
21 if (!damageComponent)
22 return null;
23
24
25 if (damageComponent.GetState() == EDamageState.DESTROYED)
26 return null;
27
28 return SCR_BaseEditorAttributeVar.CreateBool(damageComponent.IsDamageHandlingEnabled());
29 }
30
31 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
32 {
33 if (!var)
34 return;
36
37 IEntity owner = editableEntity.GetOwner();
38 if (!owner)
39 return;
40
42 if (!damageComponent)
43 return;
44
45 if (damageComponent.GetState() == EDamageState.DESTROYED)
46 return;
47
48 damageComponent.EnableDamageHandling(var.GetBool());
49 }
50
51 override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
52 {
53 }
54};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
proto external Managed FindComponent(typename typeName)
static SCR_BaseEditorAttributeVar CreateBool(bool value)
EEditableEntityType GetEntityType(IEntity owner=null)
EDamageState