8 [
Attribute(defvalue:
"10", uiwidget: UIWidgets.Slider,
desc:
"Radius in which to disable slots.",
"0 1000 1")]
9 protected float m_fRadius;
11 private ref array<SCR_SiteSlotEntity> m_aQueriedSlots;
14 private bool m_bVisualize;
18 private bool QueryEntities(IEntity e)
23 m_aQueriedSlots.Insert(slot);
29 private void GetSlots(
float radius)
31 BaseWorld world = GetWorld();
32 world.QueryEntitiesBySphere(
GetOrigin(), radius, QueryEntities);
36 override void EOnInit(IEntity owner)
48 comp.SetVisible(
false);
52 m_aQueriedSlots.Clear();
53 m_aQueriedSlots =
null;
65 SetEventMask(EntityEvent.INIT);
75 private void _CaptureDoors()
81 override bool _WB_OnKeyChanged(BaseContainer src,
string key, BaseContainerList ownerContainers, IEntity parent)
84 return super._WB_OnKeyChanged(src, key, ownerContainers, parent);
87 override void _WB_SetExtraVisualiser(EntityVisualizerType
type, IEntitySource src)
92 case EntityVisualizerType.EVT_NONE:
95 case EntityVisualizerType.EVT_NORMAL:
101 super._WB_SetExtraVisualiser(
type, src);
104 override void _WB_AfterWorldUpdate(
float timeSlice)
109 auto radiusShape = Shape.CreateSphere(COLOR_YELLOW, ShapeFlags.WIREFRAME | ShapeFlags.ONCE, origin,
m_fRadius);
113 auto arrowShape = Shape.CreateArrow(origin, slot.GetOrigin(), 0.1, COLOR_GREEN, ShapeFlags.ONCE);
117 super._WB_AfterWorldUpdate(timeSlice);