4 protected float m_fMaxSlotDistance;
8 float GetMaxSlotDistance()
10 return m_fMaxSlotDistance;
15 class SCR_SlotServiceComponent : SCR_ServicePointComponent
19 protected ref array<SCR_EntitySpawnerSlotComponent>
m_aNearSlots = {};
40 IEntity slotOwner = slot.GetOwner();
41 IEntity parent = slotOwner.GetParent();
42 if (parent && parent.FindComponent(SCR_SlotServiceComponent) && parent !=
GetOwner())
49 float maxSlotDistance = prefabData.GetMaxSlotDistance();
50 return vector.DistanceSqXZ(slotOwner.GetOrigin(),
GetOwner().
GetOrigin()) < maxSlotDistance * maxSlotDistance;
58 SCR_EntitySpawnerSlotComponent slotComp = SCR_EntitySpawnerSlotComponent.Cast(ent.FindComponent(SCR_EntitySpawnerSlotComponent));
81 IEntity child =
GetOwner().GetChildren();
84 SCR_EntitySpawnerSlotComponent slot = SCR_EntitySpawnerSlotComponent.Cast(child.FindComponent(SCR_EntitySpawnerSlotComponent));
88 child = child.GetSibling();
115 protected override void EOnInit(IEntity owner)
117 super.EOnInit(owner);
122 Print(
"Slot manager is required for Slot service functionality", LogLevel.ERROR);