Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SlotService.c File Reference

Go to the source code of this file.

Classes

class  SCR_SlotServiceComponentClass

Functions

void RegisterSlot (SCR_EntitySpawnerSlotComponent slot)
bool CanBeSlotRegistered (notnull SCR_EntitySpawnerSlotComponent slot)
bool SlotSearchCallback (IEntity ent)
void RegisterNearbySlots ()
 Registers slots in near distance. Kept for sake of client checks. Skips slots that are in hiearchy of any entity with SCR_SlotService or classes inherited from it.
void RegisterChildSlots ()
 Registers slots initially created as children. There slots cannot be used by any other spawner and shouldn't change in runtime.
void OnSlotUpdate (SCR_EntitySpawnerSlotComponent slot, vector position)
 Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore.
void OnSlotRemoved (SCR_EntitySpawnerSlotComponent slot)
 Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore.
override void EOnInit (IEntity owner)

Variables

SCR_SlotServiceComponentClass m_SlotManager
 Service with basic slot handling functionalities.
ref array< SCR_EntitySpawnerSlotComponent > m_aChildSlots = {}
ref array< SCR_EntitySpawnerSlotComponent > m_aNearSlots = {}

Function Documentation

◆ CanBeSlotRegistered()

bool CanBeSlotRegistered ( notnull SCR_EntitySpawnerSlotComponent slot)
protected

Prevents registration of slots that are too far from service, or are already child of another slot service

Parameters
[in]slot
Returns

Definition at line 38 of file SCR_SlotService.c.

◆ OnSlotRemoved()

void OnSlotRemoved ( SCR_EntitySpawnerSlotComponent slot)
protected

Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore.

Definition at line 109 of file SCR_SlotService.c.

◆ OnSlotUpdate()

void OnSlotUpdate ( SCR_EntitySpawnerSlotComponent slot,
vector position )
protected

Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore.

Definition at line 94 of file SCR_SlotService.c.

◆ RegisterChildSlots()

void RegisterChildSlots ( )
protected

Registers slots initially created as children. There slots cannot be used by any other spawner and shouldn't change in runtime.

Definition at line 79 of file SCR_SlotService.c.

◆ RegisterNearbySlots()

void RegisterNearbySlots ( )
protected

Registers slots in near distance. Kept for sake of client checks. Skips slots that are in hiearchy of any entity with SCR_SlotService or classes inherited from it.

Definition at line 68 of file SCR_SlotService.c.

◆ RegisterSlot()

void RegisterSlot ( SCR_EntitySpawnerSlotComponent slot)
protected

Register slot to be used for service. Slots that do not meet conditions in CanBeSlotRegistered are ignored, so are already known slots.

Parameters
[in]slotSlot to be registered

Definition at line 25 of file SCR_SlotService.c.

◆ SlotSearchCallback()

bool SlotSearchCallback ( IEntity ent)
protected

Callback function for Query used in RegisterNearbySlots Should callback return true, QueryEntitiesBySphere will continue with query. If false, it will stop.

Definition at line 56 of file SCR_SlotService.c.

Variable Documentation

◆ m_aChildSlots

ref array<SCR_EntitySpawnerSlotComponent> m_aChildSlots = {}
protected

Definition at line 18 of file SCR_SlotService.c.

◆ m_aNearSlots

ref array<SCR_EntitySpawnerSlotComponent> m_aNearSlots = {}
protected

Definition at line 19 of file SCR_SlotService.c.

◆ m_SlotManager

Service with basic slot handling functionalities.