Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_SetEnableDamageEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_SetEnableDamageEditorAttribute
:
SCR_ValidTypeBaseValueListEditorAttribute
3
{
4
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5
{
6
//Disabled for now
7
return
null;
8
9
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
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
20
DamageManagerComponent
damageComponent =
DamageManagerComponent
.Cast(owner.
FindComponent
(
DamageManagerComponent
));
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
;
35
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
36
37
IEntity
owner = editableEntity.GetOwner();
38
if
(!owner)
39
return
;
40
41
DamageManagerComponent
damageComponent =
DamageManagerComponent
.Cast(owner.
FindComponent
(
DamageManagerComponent
));
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
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
DamageManagerComponent
Definition
DamageManagerComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateBool
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Definition
SCR_BaseEditorAttributeVar.c:119
SCR_BaseEditorAttributeVar::GetBool
bool GetBool()
Definition
SCR_BaseEditorAttributeVar.c:56
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::GetEntityType
EEditableEntityType GetEntityType(IEntity owner=null)
Definition
SCR_EditableEntityComponent.c:127
SCR_SetEnableDamageEditorAttribute
Definition
SCR_SetEnableDamageEditorAttribute.c:3
SCR_ValidTypeBaseValueListEditorAttribute
Definition
SCR_ValidTypeBaseValueListEditorAttribute.c:3
SCR_ValidTypeBaseValueListEditorAttribute::IsValidEntityType
bool IsValidEntityType(EEditableEntityType entityType)
Definition
SCR_ValidTypeBaseValueListEditorAttribute.c:10
EDamageState
EDamageState
Definition
EDamageState.c:13
scripts
Game
Editor
Containers
Attributes
SCR_SetEnableDamageEditorAttribute.c
Generated by
1.17.0