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_EditablePreviewComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Editor (Editables)"
, description:
""
, icon:
"WBData/ComponentEditorProps/componentEditor.png"
)]
2
class
SCR_EditablePreviewComponentClass
:
SCR_EditableEntityComponentClass
3
{
4
}
5
7
9
class
SCR_EditablePreviewComponent :
SCR_EditableEntityComponent
10
{
11
protected
SCR_EditableEntityComponent
m_SourceEntity
;
12
protected
EEditableEntityType
m_EntityTypeInternal
;
13
protected
ref
SCR_UIInfo
m_UIInfoInternal
;
14
15
//------------------------------------------------------------------------------------------------
18
void
InitFromEntity
(
SCR_EditableEntityComponent
from)
19
{
20
if
(!from || !from.
IsRegistered
())
21
return
;
22
23
m_SourceEntity
= from;
24
m_EntityTypeInternal
= from.
GetEntityType
();
25
m_vIconPos = from.
m_vIconPos
;
26
m_iIconBoneIndex = from.
m_iIconBoneIndex
;
27
RestoreParentEntity
();
28
}
29
30
//------------------------------------------------------------------------------------------------
33
void
InitFromSource
(
IEntityComponentSource
from)
34
{
35
if
(!from)
36
return
;
37
38
m_UIInfoInternal
=
SCR_EditableEntityComponentClass
.
GetInfo
(from);
39
from.Get(
"m_EntityType"
,
m_EntityTypeInternal
);
40
from.Get(
"m_vIconPos"
, m_vIconPos);
41
42
string
iconBoneName;
43
from.Get(
"m_sIconBoneName"
, iconBoneName);
44
if
(
m_Owner
.GetAnimation())
45
m_iIconBoneIndex =
m_Owner
.GetAnimation().GetBoneIndex(iconBoneName);
46
else
47
m_iIconBoneIndex = -1;
48
49
RestoreParentEntity
();
50
}
51
52
//------------------------------------------------------------------------------------------------
53
override
bool
GetPos
(out
vector
pos)
54
{
55
if
(
m_Owner
&& (
m_Owner
.GetFlags() &
EntityFlags
.VISIBLE))
56
return
super.GetPos(pos);
57
else
58
return
false
;
59
}
60
61
//------------------------------------------------------------------------------------------------
62
override
void
UpdateGameHierarchy
(
IEntity
parent,
IEntity
child,
bool
toAdd)
63
{
64
//--- Game hierarchy is managed by SCR_BasePreviewEntity
65
}
66
67
//------------------------------------------------------------------------------------------------
68
override
EEditableEntityType
GetEntityType
(
IEntity
owner = null)
69
{
70
return
m_EntityTypeInternal
;
71
}
72
73
//------------------------------------------------------------------------------------------------
74
override
SCR_UIInfo
GetInfo
(
IEntity
owner = null)
75
{
76
if
(
m_UIInfoInternal
)
77
return
m_UIInfoInternal
;
78
79
SCR_UIInfo
info;
80
if
(
m_SourceEntity
)
81
info =
m_SourceEntity
.GetInfo(owner);
82
else
83
info = super.
GetInfo
(owner);
84
85
return
info;
86
}
87
}
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
m_Owner
IEntity m_Owner
Definition
SCR_CampaignServiceCompositionComponent.c:18
InitFromSource
void InitFromSource(IEntityComponentSource from)
Definition
SCR_EditablePreviewComponent.c:33
InitFromEntity
void InitFromEntity(SCR_EditableEntityComponent from)
Definition
SCR_EditablePreviewComponent.c:18
m_EntityTypeInternal
EEditableEntityType m_EntityTypeInternal
Definition
SCR_EditablePreviewComponent.c:12
m_UIInfoInternal
ref SCR_UIInfo m_UIInfoInternal
Definition
SCR_EditablePreviewComponent.c:13
GetInfo
override SCR_UIInfo GetInfo()
Definition
SCR_EditorRespawnBriefingComponent.c:15
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntity
Definition
IEntity.c:13
SCR_EditableEntityComponentClass
Definition
SCR_EditableEntityComponentClass.c:3
SCR_EditableEntityComponentClass::GetInfo
SCR_UIInfo GetInfo()
Definition
SCR_EditableEntityComponentClass.c:111
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::IsRegistered
bool IsRegistered()
Definition
SCR_EditableEntityComponent.c:1318
SCR_EditableEntityComponent::m_vIconPos
vector m_vIconPos
Definition
SCR_EditableEntityComponent.c:19
SCR_EditableEntityComponent::m_iIconBoneIndex
int m_iIconBoneIndex
Definition
SCR_EditableEntityComponent.c:45
SCR_EditableEntityComponent::GetPos
bool GetPos(out vector pos)
Definition
SCR_EditableEntityComponent.c:261
SCR_EditableEntityComponent::GetEntityType
EEditableEntityType GetEntityType(IEntity owner=null)
Definition
SCR_EditableEntityComponent.c:127
SCR_EditableEntityComponent::UpdateGameHierarchy
void UpdateGameHierarchy(IEntity parent, IEntity child, bool toAdd)
Definition
SCR_EditableEntityComponent.c:1554
SCR_EditableEntityComponent::RestoreParentEntity
void RestoreParentEntity()
Definition
SCR_EditableEntityComponent.c:1119
SCR_EditablePreviewComponentClass
Definition
SCR_EditablePreviewComponent.c:3
SCR_UIInfo
Definition
SCR_UIInfo.c:8
SCR_UIInfo::GetInfo
static SCR_UIInfo GetInfo(BaseContainer source, string varName)
Definition
SCR_UIInfo.c:133
vector
Definition
vector.c:13
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition
EEditableEntityType.c:6
m_SourceEntity
SCR_EditablePreviewComponentClass m_SourceEntity
Special configuration to show icon of SCR_BasePreviewEntity ghost preview.
EntityFlags
EntityFlags
Various entity flags.
Definition
EntityFlags.c:14
scripts
Game
Editor
Components
EditableEntity
SCR_EditablePreviewComponent.c
Generated by
1.17.0