Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ResourceConsumerContainerQueue.c
Go to the documentation of this file.
1 [BaseContainerProps(configRoot: true)]
2 class SCR_ResourceConsumerContainerQueue : SCR_ResourceContainerQueue<SCR_ResourceConsumer>
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 color2 = Color.FromInt(m_Interactor.GetDebugColor().PackToInt());
15 
16  color1.Scale(2.0);
17  color1.SetA(1.0);
18  color2.Scale(0.2);
19  color2.SetA(1.0);
20 
21  foreach (int idx, SCR_ResourceContainer container: m_aRegisteredContainers)
22  {
23  if (!container)
24  continue;
25 
26  string infoText = string.Format(" CON Pos: %1 Distance: %2 m ", idx, vector.Distance(m_Interactor.GetOwnerOrigin(), container.GetOwnerOrigin()));
27  origin = container.GetOwnerOrigin();
28  consumerIdx = container.GetLinkedInteractorIndex(m_Interactor);
29 
30  if (container.IsResourceGainEnabled())
31  consumerIdx++;
32 
33  if (container.IsResourceDecayEnabled())
34  consumerIdx++;
35 
36  heightDiff = container.debugControlOffset * consumerIdx + container.debugControlOffset * 3;
37 
38  Shape.CreateArrow(origin + Vector(0.0, heightDiff, 0.0), origin, 0.0, 0xFFFFFFFF, ShapeFlags.ONCE | ShapeFlags.NOZBUFFER);
39  Shape.CreateArrow(m_Interactor.GetOwnerOrigin(), (origin + Vector(0.0, heightDiff, 0.0)), 0.1, color1.PackToInt(), ShapeFlags.ONCE | ShapeFlags.NOZBUFFER |ShapeFlags.DEPTH_DITHER);
40  DebugTextWorldSpace.Create(m_Interactor.GetOwner().GetWorld(), infoText, DebugTextFlags.CENTER | DebugTextFlags.FACE_CAMERA | DebugTextFlags.ONCE, origin[0], origin[1] + heightDiff, origin[2], 10, 0xFFFFFFFF, color2.PackToInt(), consumerIdx + 1);
41 
42  if (!container.GetComponent().IsDebugVisualizationEnabled())
43  container.DebugDraw(false);
44  }
45  }
46 }
SCR_ResourceConsumerContainerQueue
Definition: SCR_ResourceConsumerContainerQueue.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