Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_SlotServiceComponent Interface Reference

Service with basic slot handling functionalities. More...

Inheritance diagram for SCR_SlotServiceComponent:
[legend]

Public Member Functions

void RegisterSlot (SCR_EntitySpawnerSlotComponent slot)
 Register slot to be used for service.
 
- Public Member Functions inherited from SCR_ServicePointComponent
Faction GetFaction ()
 
ResourceName GetDelegatePrefab ()
 
ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponentGetOnBaseRegistered ()
 
ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponentGetOnBaseUnregistered ()
 
ScriptInvoker GetOnServiceStateChanged ()
 
SCR_EServicePointType GetType ()
 
EEditableEntityLabel GetLabel ()
 
SCR_EServicePointStatus GetServiceState ()
 
void SetServiceState (SCR_EServicePointStatus state)
 Set the current operational state of the service.
 
void ServiceStateChanged ()
 Called from RplProp event.
 
void SetDelegate (notnull SCR_ServicePointDelegateComponent delegate)
 
override void OnBaseRegistered (notnull SCR_MilitaryBaseComponent base)
 
override void OnBaseUnregistered (notnull SCR_MilitaryBaseComponent base)
 
void RegisterService ()
 
void SetServiceOnline ()
 Switch service to online status.
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 
- Public Member Functions inherited from SCR_MilitaryBaseLogicComponent
void RegisterBase (notnull SCR_MilitaryBaseComponent base)
 
void OnBaseRegistered (notnull SCR_MilitaryBaseComponent base)
 
void UnregisterBase (notnull SCR_MilitaryBaseComponent base)
 
void OnBaseUnregistered (notnull SCR_MilitaryBaseComponent base)
 
int GetBases (out array< SCR_MilitaryBaseComponent > bases)
 
void OnBaseFactionChanged (Faction faction)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
void ~SCR_MilitaryBaseLogicComponent ()
 

Protected Member Functions

bool CanBeSlotRegistered (notnull SCR_EntitySpawnerSlotComponent slot)
 Prevents registration of slots that are too far from service, or are already child of another slot service.
 
bool SlotSearchCallback (IEntity ent)
 Callback function for Query used in RegisterNearbySlots Should callback return true, QueryEntitiesBySphere will continue with query.
 
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)
 
- Protected Member Functions inherited from SCR_ServicePointComponent
void OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
 

Protected Attributes

SCR_SpawnerSlotManager m_SlotManager
 
ref array< SCR_EntitySpawnerSlotComponentm_aChildSlots = {}
 
ref array< SCR_EntitySpawnerSlotComponentm_aNearSlots = {}
 
- Protected Attributes inherited from SCR_ServicePointComponent
SCR_EServicePointType m_eType
 
EEditableEntityLabel m_eBuildingLabel
 
ResourceName m_sDelegatePrefab
 
SCR_EServicePointStatus m_eServiceState = SCR_EServicePointStatus.OFFLINE
 
SCR_FactionAffiliationComponent m_FactionControl
 
ref ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponentm_OnBaseRegistered
 
ref ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponentm_OnBaseUnregistered
 
ref ScriptInvoker m_OnServiceStateChanged
 
SCR_ServicePointDelegateComponent m_Delegate
 
- Protected Attributes inherited from SCR_MilitaryBaseLogicComponent
ref array< SCR_MilitaryBaseComponentm_aBases = {}
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_ServicePointComponent
static void SpawnAsOffline (bool val)
 The service will not be registered on init. For an example for Free Roam building - the registration will happen once the service is fully build.
 
- Static Protected Attributes inherited from SCR_ServicePointComponent
static bool s_bSpawnAsOffline
 

Detailed Description

Service with basic slot handling functionalities.

Member Function Documentation

◆ CanBeSlotRegistered()

bool SCR_SlotServiceComponent.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

◆ EOnInit()

override void SCR_SlotServiceComponent.EOnInit ( IEntity  owner)
protected

◆ OnSlotRemoved()

void SCR_SlotServiceComponent.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.

◆ OnSlotUpdate()

void SCR_SlotServiceComponent.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.

◆ RegisterChildSlots()

void SCR_SlotServiceComponent.RegisterChildSlots ( )
protected

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

◆ RegisterNearbySlots()

void SCR_SlotServiceComponent.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.

◆ RegisterSlot()

void SCR_SlotServiceComponent.RegisterSlot ( SCR_EntitySpawnerSlotComponent  slot)

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

◆ SlotSearchCallback()

bool SCR_SlotServiceComponent.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.

Member Data Documentation

◆ m_aChildSlots

ref array<SCR_EntitySpawnerSlotComponent> SCR_SlotServiceComponent.m_aChildSlots = {}
protected

◆ m_aNearSlots

ref array<SCR_EntitySpawnerSlotComponent> SCR_SlotServiceComponent.m_aNearSlots = {}
protected

◆ m_SlotManager

SCR_SpawnerSlotManager SCR_SlotServiceComponent.m_SlotManager
protected

The documentation for this interface was generated from the following file: