Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResourceGeneratorContainerQueue.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true)]
2class SCR_ResourceGeneratorContainerQueue : SCR_ResourceContainerQueue
3{
4 //------------------------------------------------------------------------------------------------
5 override void DebugDraw()
6 {
7 if (!m_Interactor)
8 return;
9
10 int consumerIdx;
11 float heightDiff;
12 vector origin;
13 int debugColour = m_Interactor.GetDebugColor().PackToInt();
14 Color color1 = Color.FromInt(debugColour);
15 Color color = Color.FromInt(debugColour);
16 Color color2 = Color.FromInt(debugColour);
17
18 color.Scale(0.2);
19 color.SetA(1.0);
20 color2.Lerp(Color.FromInt(Color.WHITE), 0.5);
21 color2.SetA(1.0);
22
23 foreach (int idx, SCR_ResourceContainer container : m_aRegisteredContainers)
24 {
25 if (!container)
26 continue;
27
28 string infoText = string.Format(" GEN Pos: %1 Distance: %2 m ", idx, vector.Distance(m_Interactor.GetOwnerOrigin(), container.GetOwnerOrigin()));
29 origin = container.GetOwnerOrigin();
30 consumerIdx = container.GetLinkedInteractorIndex(m_Interactor);
31
32 if (container.IsResourceGainEnabled())
33 consumerIdx++;
34
35 if (container.IsResourceDecayEnabled())
36 consumerIdx++;
37
38 heightDiff = container.debugControlOffset * (consumerIdx + 3);
39
40 vector offset = { 0.0, heightDiff, 0.0 };
41 Shape.CreateArrow(origin + offset, origin, 0.0, 0xFFFFFFFF, ShapeFlags.ONCE | ShapeFlags.NOZBUFFER);
42 Shape.CreateArrow(m_Interactor.GetOwnerOrigin(), origin + offset, 0.1, color1.PackToInt(), ShapeFlags.ONCE | ShapeFlags.NOZBUFFER |ShapeFlags.DEPTH_DITHER);
43
44 DebugTextWorldSpace.Create(m_Interactor.GetOwner().GetWorld(), infoText, DebugTextFlags.CENTER | DebugTextFlags.FACE_CAMERA | DebugTextFlags.ONCE, origin[0], origin[1] + heightDiff, origin[2], 10, color.PackToInt(), color2.PackToInt(), consumerIdx + 1);
45
46 if (!container.GetComponent().IsDebugVisualizationEnabled())
47 container.DebugDraw(false);
48 }
49 }
50}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void DebugDraw()
Definition Color.c:13
Instance of created debug visualizer.
Definition Shape.c:14
DebugTextFlags
ShapeFlags
Definition ShapeFlags.c:13