Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_PowerPoleSlot.c
Go to the documentation of this file.
2 class SCR_PowerPoleSlot : SCR_PowerPoleSlotBase
3 {
4  [Attribute(desc: "Visualised by red sphere.", params: "inf inf 0 purpose=coords space=entity")]
5  vector m_vSlotB;
6 
7  bool m_bOccupied = false;
8 
9  //------------------------------------------------------------------------------------------------
10  override void AttachTo(SCR_PowerPole thisPowerPole, SCR_PowerPole otherPowerPole, int index, out vector thisSlot, out vector otherSlot)
11  {
12  if (vector.Distance(thisPowerPole.CoordToParent(m_vSlotA), otherPowerPole.GetOrigin()) > vector.Distance(thisPowerPole.CoordToParent(m_vSlotB), otherPowerPole.GetOrigin()))
13  {
14  thisSlot = thisPowerPole.CoordToParent(m_vSlotB);
15  otherSlot = otherPowerPole.TryGetSlot(index, thisSlot, true);
16  }
17  else
18  {
19  thisSlot = thisPowerPole.CoordToParent(m_vSlotA);
20  otherSlot = otherPowerPole.TryGetSlot(index, thisSlot, true);
21  }
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  override void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
26  {
27  Shape shape = Shape.CreateSphere(ARGB(128, 0, 255, 0), ShapeFlags.TRANSP, parent.CoordToParent(m_vSlotA), 0.04);
28  debugShapes.Insert(shape);
29  shape = Shape.CreateSphere(ARGB(128, 255, 0, 0), ShapeFlags.TRANSP, parent.CoordToParent(m_vSlotB), 0.04);
30  debugShapes.Insert(shape);
31  }
32 }
33 
35 class SCR_PowerPoleSlotBase : Managed
36 {
37  [Attribute(desc: "Visualised by green sphere.", params: "inf inf 0 purpose=coords space=entity")]
38  vector m_vSlotA;
39 
40  //------------------------------------------------------------------------------------------------
41  void AttachTo(SCR_PowerPole thisPowerPole, SCR_PowerPole otherPowerPole, int index, out vector thisSlot, out vector otherSlot)
42  {
43  }
44 
45  //------------------------------------------------------------------------------------------------
46  void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
47  {
48  }
49 }
50 
52 class SCR_PowerPoleSlotSingle : SCR_PowerPoleSlotBase
53 {
54  //------------------------------------------------------------------------------------------------
55  override void AttachTo(SCR_PowerPole thisPowerPole, SCR_PowerPole otherPowerPole, int index, out vector thisSlot, out vector otherSlot)
56  {
57  thisSlot = thisPowerPole.CoordToParent(m_vSlotA);
58  otherSlot = otherPowerPole.TryGetSlot(index, thisSlot, true);
59  }
60 
61  //------------------------------------------------------------------------------------------------
62  override void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
63  {
64  Shape shape = Shape.CreateSphere(ARGB(128, 0, 255, 0), ShapeFlags.TRANSP, parent.CoordToParent(m_vSlotA), 0.04);
65  debugShapes.Insert(shape);
66  }
67 }
AttachTo
void AttachTo(IEntity target)
Definition: SCR_AttachManualCameraComponent.c:220
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_PowerPoleSlot
Definition: SCR_PowerPoleSlot.c:2
DrawDebugShapes
protected void DrawDebugShapes()
Definition: SCR_PowerPole.c:74
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_PowerPole
void SCR_PowerPole(IEntitySource src, IEntity parent)
Definition: SCR_PowerPole.c:87
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