4 [
Attribute(
desc:
"Visualised by red sphere.",
params:
"inf inf 0 purpose=coords space=entity")]
7 bool m_bOccupied =
false;
12 if (vector.Distance(thisPowerPole.CoordToParent(m_vSlotA), otherPowerPole.GetOrigin()) > vector.Distance(thisPowerPole.CoordToParent(m_vSlotB), otherPowerPole.GetOrigin()))
14 thisSlot = thisPowerPole.CoordToParent(m_vSlotB);
15 otherSlot = otherPowerPole.TryGetSlot(
index, thisSlot,
true);
19 thisSlot = thisPowerPole.CoordToParent(m_vSlotA);
20 otherSlot = otherPowerPole.TryGetSlot(
index, thisSlot,
true);
25 override void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
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);
35 class SCR_PowerPoleSlotBase : Managed
37 [
Attribute(
desc:
"Visualised by green sphere.",
params:
"inf inf 0 purpose=coords space=entity")]
46 void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
52 class SCR_PowerPoleSlotSingle : SCR_PowerPoleSlotBase
57 thisSlot = thisPowerPole.CoordToParent(m_vSlotA);
58 otherSlot = otherPowerPole.TryGetSlot(
index, thisSlot,
true);
62 override void DrawDebugShapes(inout array<ref Shape> debugShapes, IEntity parent)
64 Shape shape = Shape.CreateSphere(ARGB(128, 0, 255, 0), ShapeFlags.TRANSP, parent.CoordToParent(m_vSlotA), 0.04);
65 debugShapes.Insert(shape);