Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
CampaignBasesSystem.c
Go to the documentation of this file.
2{
3 override static void InitInfo(WorldSystemInfo outInfo)
4 {
5 outInfo
6 .SetAbstract(false)
7 .AddPoint(ESystemPoint.FixedFrame);
8 }
9
10 protected ref array<SCR_CampaignMilitaryBaseComponent> m_Components = {};
11
12 //------------------------------------------------------------------------------------------------
13 override protected void OnUpdatePoint(WorldUpdatePointArgs args)
14 {
15 float timeSlice = args.GetTimeSliceSeconds();
16
18 {
19 comp.Update(timeSlice);
20 }
21 }
22
23 //------------------------------------------------------------------------------------------------
24 override protected void OnDiag(float timeSlice)
25 {
26 DbgUI.Begin("CampaignBasesSystem");
27
28 DbgUI.Text("Items: " + m_Components.Count());
29
30 if (DbgUI.Button("Dump active components"))
31 {
33 {
34 Print(comp.GetOwner(), LogLevel.ERROR);
35 }
36 }
37
38 DbgUI.End();
39 }
40
41 //------------------------------------------------------------------------------------------------
44 {
45 //About to be deleted
46 if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
47 return;
48
49 if (m_Components.Find(component) != -1)
50 return;
51
52 m_Components.Insert(component);
53 }
54
55 //------------------------------------------------------------------------------------------------
57 {
58 int idx = m_Components.Find(component);
59 if (idx == -1)
60 return;
61
62 m_Components.Remove(idx);
63 }
64}
void OnDiag(float timeSlice)
void Unregister(SCR_CampaignMilitaryBaseComponent component)
ref array< SCR_CampaignMilitaryBaseComponent > m_Components
void OnUpdatePoint(WorldUpdatePointArgs args)
void Register(SCR_CampaignMilitaryBaseComponent component)
Definition DbgUI.c:66
Structure holding world system meta-information required by the engine.
Structure holding extra data of WorldSystem update point.
WorldSystemPoint ESystemPoint
Definition gameLib.c:7
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
EntityFlags
Various entity flags.
Definition EntityFlags.c:14