Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditableSystemComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor (Editables)", description: "", icon: "WBData/ComponentEditorProps/componentEditor.png")]
3 {
4 }
5 
7 
9 class SCR_EditableSystemComponent : SCR_EditableEntityComponent
10 {
12  protected ref ScriptInvoker Event_OnUIRefresh = new ScriptInvoker();
13 
14  //------------------------------------------------------------------------------------------------
15  protected void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction)
16  {
17  Event_OnUIRefresh.Invoke();
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  override Faction GetFaction()
22  {
24  return m_FactionAffiliationComponent.GetAffiliatedFaction();
25 
26  return null;
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  override ScriptInvoker GetOnUIRefresh()
31  {
32  return Event_OnUIRefresh;
33  }
34 
35  //------------------------------------------------------------------------------------------------
36  override void OnPostInit(IEntity owner)
37  {
38  super.OnPostInit(owner);
41  m_FactionAffiliationComponent.GetOnFactionChanged().Insert(OnFactionChanged);
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  // destructor
49  void ~SCR_EditableSystemComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
50  {
52  m_FactionAffiliationComponent.GetOnFactionChanged().Insert(OnFactionChanged);
53  }
54 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
GetFaction
override Faction GetFaction()
Definition: SCR_EditableSystemComponent.c:21
m_FactionAffiliationComponent
SCR_EditableSystemComponentClass m_FactionAffiliationComponent
Editable entity which can contain location description.
Event_OnUIRefresh
protected ref ScriptInvoker Event_OnUIRefresh
Definition: SCR_EditableSystemComponent.c:12
GetOnUIRefresh
override ScriptInvoker GetOnUIRefresh()
Definition: SCR_EditableSystemComponent.c:30
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_EditableSystemComponent.c:36
OnFactionChanged
protected void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction)
Event which is triggered when the owning faction changes.
Definition: SCR_EditableSystemComponent.c:15
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
Faction
Definition: Faction.c:12
SCR_EditableSystemComponentClass
Definition: SCR_EditableSystemComponent.c:2
SCR_FactionAffiliationComponent
Definition: SCR_FactionAffiliationComponent.c:10
~SCR_EditableSystemComponent
void ~SCR_EditableSystemComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_EditableSystemComponent.c:49
SCR_EditableEntityComponentClass
Definition: SCR_EditableEntityComponentClass.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180