Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ResourceGeneratorContainerQueue.c
Go to the documentation of this file.
1 [BaseContainerProps(configRoot: true)]
2 class SCR_ResourceGeneratorContainerQueue : SCR_ResourceContainerQueue<SCR_ResourceGenerator>
3 {
4  //------------------------------------------------------------------------------------------------
5  override void DebugDraw()
6  {
7  if (!m_Interactor)
8  return;
9 
10  int consumerIdx;
11  float heightDiff;
12  vector origin;
13  Color color1 = Color.FromInt(m_Interactor.GetDebugColor().PackToInt());
14  Color color = Color.FromInt(m_Interactor.GetDebugColor().PackToInt());
15  Color color2 = Color.FromInt(m_Interactor.GetDebugColor().PackToInt());
16 
17  color.Scale(0.2);
18  color.SetA(1.0);
19  color2.Lerp(Color.FromInt(Color.WHITE), 0.5);
20  color2.SetA(1.0);
21 
22  foreach (int idx, SCR_ResourceContainer container: m_aRegisteredContainers)
23  {
24  if (!container)
25  continue;
26 
27  string infoText = string.Format(" GEN Pos: %1 Distance: %2 m ", idx, vector.Distance(m_Interactor.GetOwnerOrigin(), container.GetOwnerOrigin()));
28  origin = container.GetOwnerOrigin();
29  consumerIdx = container.GetLinkedInteractorIndex(m_Interactor);
30 
31  if (container.IsResourceGainEnabled())
32  consumerIdx++;
33 
34  if (container.IsResourceDecayEnabled())
35  consumerIdx++;
36 
37  heightDiff = container.debugControlOffset * consumerIdx + container.debugControlOffset * 3;
38 
39  Shape.CreateArrow(origin + Vector(0.0, heightDiff, 0.0), origin, 0.0, 0xFFFFFFFF, ShapeFlags.ONCE | ShapeFlags.NOZBUFFER);
40 
41  Shape.CreateArrow(m_Interactor.GetOwnerOrigin(), (origin + Vector(0.0, heightDiff, 0.0)), 0.1, color1.PackToInt(), ShapeFlags.ONCE | ShapeFlags.NOZBUFFER |ShapeFlags.DEPTH_DITHER);
42 
43  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);
44 
45  if (!container.GetComponent().IsDebugVisualizationEnabled())
46  container.DebugDraw(false);
47  }
48  }
49 }
SCR_ResourceGeneratorContainerQueue
Definition: SCR_ResourceGeneratorContainerQueue.c:2
SCR_ResourceContainer
Definition: SCR_ResourceContainer.c:34
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468