Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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")]
5
7
9class SCR_EditablePreviewComponent : SCR_EditableEntityComponent
10{
14
15 //------------------------------------------------------------------------------------------------
19 {
20 if (!from || !from.IsRegistered())
21 return;
22
23 m_SourceEntity = from;
25 m_vIconPos = from.m_vIconPos;
26 m_iIconBoneIndex = from.m_iIconBoneIndex;
28 }
29
30 //------------------------------------------------------------------------------------------------
34 {
35 if (!from)
36 return;
37
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
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 //------------------------------------------------------------------------------------------------
69 {
71 }
72
73 //------------------------------------------------------------------------------------------------
74 override SCR_UIInfo GetInfo(IEntity owner = null)
75 {
77 return m_UIInfoInternal;
78
79 SCR_UIInfo info;
81 info = m_SourceEntity.GetInfo(owner);
82 else
83 info = super.GetInfo(owner);
84
85 return info;
86 }
87}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
void InitFromSource(IEntityComponentSource from)
void InitFromEntity(SCR_EditableEntityComponent from)
EEditableEntityType m_EntityTypeInternal
ref SCR_UIInfo m_UIInfoInternal
override SCR_UIInfo GetInfo()
EEditableEntityType GetEntityType(IEntity owner=null)
void UpdateGameHierarchy(IEntity parent, IEntity child, bool toAdd)
static SCR_UIInfo GetInfo(BaseContainer source, string varName)
Definition SCR_UIInfo.c:133
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_EditablePreviewComponentClass m_SourceEntity
Special configuration to show icon of SCR_BasePreviewEntity ghost preview.
EntityFlags
Various entity flags.
Definition EntityFlags.c:14