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

Component allowing user to request spawning entities using asset catalogs Requires ActionManager with enough SCR_CatalogSpawnerUserAction attached to it (they cannot be generated through script) and SCR_EntitySlotComponents in hiearchy or vicinity of owner. More...

Inheritance diagram for SCR_CatalogEntitySpawnerComponent:
[legend]

Public Member Functions

bool IsProxy ()
 
bool IsSuppliesConsumptionEnabled ()
 
float GetPostGracePeriodRefundMultiplier ()
 
bool IsInGracePeriod (IEntity entity)
 
bool IsInGracePeriod (RplId entityId)
 
bool CanRefund (RplId entityId, RplId userId)
 
bool CanRefund (notnull IEntity entity, notnull IEntity user)
 
void UnregisterGracePeriod (notnull IEntity entity)
 
void UnregisterGracePeriod (RplId entityId)
 
void RegisterGracePeriod (notnull IEntity entity, notnull IEntity user, float startingTime=FLT_INF)
 
void RegisterGracePeriod (RplId entityId, RplId userId, float startingTime=FLT_INF)
 
bool RankCheck (notnull SCR_EntityCatalogEntry entityEntry, notnull IEntity user)
 Check if user is elibigle for requesting specified entity.
 
SCR_EntityCatalogEntry GetEntryAtIndex (int index)
 Obtain Faction entity from AssetList on specific index.
 
void AssignResourceComponent (notnull SCR_ResourceComponent component)
 Assign resource component to handle resources of spawner.
 
void AssignSupplyComponent (notnull SCR_CampaignSuppliesComponent supplyComp)
 Assign supply component to handle supplies of spawner.
 
void ClearKnownSlots ()
 Manually clears known slots, thus forcing Spawner to do otherwise ignored checks.
 
void AddKnownOccupiedSlot (notnull SCR_EntitySpawnerSlotComponent slot)
 Set slot as occupied.
 
SCR_EntitySpawnerSlotComponent GetFreeSlot (notnull SCR_EntityCatalogSpawnerData spawnerData)
 Returns free slot suitable for requested Entity.
 
void InitiateSpawn (notnull SCR_EntityCatalogEntry entityEntry, int userId, SCR_EntitySpawnerSlotComponent slot)
 Initiate spawn.
 
SCR_EEntityRequestStatus GetRequestState (notnull SCR_EntityCatalogEntry entityEntry, IEntity user=null)
 Returns SCR_EEntityRequestStatus for request of selected entity with optional parameter of user requesting it.
 
bool CanRequestAI (notnull IEntity user, int aiCount=1)
 
Faction GetRequesterFaction (notnull IEntity user)
 
ScriptInvoker GetOnEntitySpawned ()
 Gets script invoker on entity spawns.
 
ScriptInvoker GetOnSpawnerSuppliesChanged ()
 Gets script invoker on supplies changes.
 
SCR_PlayerController GetPlayerControllerFromEntity (notnull IEntity userEntity)
 
SCR_SpawnerRequestComponent GetRequestComponentFromPlayerEntity (notnull IEntity playerEntity)
 
void CreatePreviewEntity (notnull SCR_EntityCatalogEntry spawnData, notnull SCR_EntitySpawnerSlotComponent slot, SCR_EEntityRequestStatus reqStatus=SCR_EEntityRequestStatus.CAN_SPAWN)
 Used to create local "preview" model on specified slot.
 
void DeletePreviewEntity ()
 Delete existing Preview entity at spawner.
 
SCR_PrefabPreviewEntity GetPreviewEntity ()
 
SCR_ResourceComponent GetSpawnerResourceComponent ()
 Get the resource component that is assigned to the spawner.
 
SCR_CampaignSuppliesComponent GetSpawnerSupplyComponent ()
 Get supply component assigned to spawner.
 
float GetSpawnerResourceValue ()
 Get resources left for spawner.
 
float GetSpawnerSupplies ()
 Get supplies left for spawner.
 
void AddSpawnerSupplies (float supplies)
 Add or reduce (by entering negative value) supplies available to spawner.
 
void SpawnAIGroupMember (ResourceName resName, notnull IEntity user, IEntity slotEntity, SCR_EntityLabelPointComponent rallyPoint=null)
 
override void EOnFrame (IEntity owner, float timeSlice)
 
void ~SCR_CatalogEntitySpawnerComponent ()
 
- Public Member Functions inherited from SCR_SlotServiceComponent
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 ()
 

Static Public Attributes

static const ref array< SCR_CatalogEntitySpawnerComponentINSTANCES = {}
 static variable used to store all the instances created of this component.
 
static const int SLOT_CHECK_INTERVAL = 60
 

Protected Member Functions

void SetCurrentFactionCatalog ()
 Set Asset Catalog from currently owning faction. If null, asset list will be cleared.
 
void AddAssetsFromCatalog (notnull SCR_EntityCatalog entityCatalog, bool overwriteOld=false)
 Add Assets from entityCatalog.
 
void AssignUserActions ()
 Fills SCR_CatalogSpawnerUserAction actions on ActionManager.
 
void UpdateOccupiedSlots (out array< SCR_EntitySpawnerSlotComponent > occupiedSlots)
 Update currently known occupied slots.
 
SCR_EntitySpawnerSlotComponent GetLastKnownSuitableSlot (notnull SCR_EntityCatalogSpawnerData spawnerData)
 Returns last known suitable free slot. Used to reduce amount of redundant slot checks and save performance.
 
SCR_EntitySpawnerSlotComponent GetFreeSlotFromArray (notnull array< SCR_EntitySpawnerSlotComponent > slots, notnull SCR_EntityCatalogSpawnerData spawnerData, notnull array< SCR_EntitySpawnerSlotComponent > occupiedSlots)
 Used in GetFreeSlot to obtain free slot from inserted array.
 
void OnGroupWaypointFinished (notnull AIWaypoint wp)
 Called when AI finishes initial WP (making it move away from spawning position, before joining player squad)
 
void AddAISoldierToPlayerGroup (notnull SCR_ChimeraCharacter ai, notnull IEntity user)
 
void SendNotification (int msgId, notnull IEntity user, int assetId=-1, int catalogType=-1)
 
void PerformSpawn (notnull SCR_EntityCatalogEntry entityEntry, IEntity user=null, SCR_EntitySpawnerSlotComponent preferredSlot=null)
 Spawn the actual entity.
 
IEntity SpawnEntity (ResourceName entityResourceName, notnull IEntity slotOwner)
 
void LockSpawnedVehicle (notnull IEntity owningUser)
 
bool CooldownCheck (notnull IEntity user)
 
override void OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
 
void OnAIGroupSpawned (notnull SCR_AIGroup group, notnull IEntity user, notnull IEntity slotEntity, SCR_EntityLabelPointComponent rallyPoint=null)
 Called from PerformSpawn, if spawned entity is AIGroup.
 
void OnAIAgentRemoved (SCR_AIGroup group, AIAgent ai)
 
void OnChimeraCharacterSpawned (notnull SCR_ChimeraCharacter ai, notnull IEntity user, SCR_EntityLabelPointComponent rallyPoint=null)
 Called from PerformSpawn, if spawned entity is ChimeraCharacter.
 
SCR_AIWaypoint CreateRallyPointWaypoint (notnull SCR_EntityLabelPointComponent rallyPoint)
 Returns waypoint created as rally point for spawned unit.
 
bool SupplyComponentSearchCallback (IEntity ent)
 Callback for Search query in EOnInit. Search will be stopped, if Base with Supply component is found.
 
override void EOnInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
- Protected Member Functions inherited from SCR_SlotServiceComponent
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)
 
void OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
 

Protected Attributes

ref array< EEntityCatalogType > m_aCatalogTypes
 
ref array< EEditableEntityLabel > m_aAllowedLabels
 
ref array< EEditableEntityLabel > m_aIgnoredLabels
 
ref array< RplId > m_aGracePeriodEntries = {}
 
ref array< RplId > m_aGracePeriodRequesters = {}
 
ref array< float > m_aGracePeriodStartingTimes = {}
 
float m_fLastUpdateElapsedTime
 
bool m_bNeedAllLabels
 
bool m_bSuppliesConsumptionEnabled
 
int m_iCustomSupplies
 
bool m_bEnableGracePeriod
 
float m_fGracePeriodTime
 
float m_fGracePeriodAreaRange
 
float m_fPostGracePeriodRefundMultiplier
 
ActionsManagerComponent m_ActionManager
 
IEntity m_SpawnedEntity
 
SCR_PrefabPreviewEntity m_PreviewEntity
 
SCR_ResourceComponent m_ResourceComponent
 
SCR_CampaignSuppliesComponent m_SupplyComponent RplComponent m_RplComponent
 
ref ScriptInvoker m_OnEntitySpawned
 
ref ScriptInvoker m_OnSpawnerSuppliesChanged
 
ref array< SCR_EntityCatalogEntrym_aAssetList = {}
 
ref array< ref Tuple2< SCR_AIGroup, SCR_AIGroup > > m_aGroupsToAssign = {}
 
ref map< AIWaypoint, SCR_AIGroupm_mGroupWaypoints
 
ref map< SCR_EntitySpawnerSlotComponent, WorldTimestamp > m_mKnownFreeSlots
 
ref map< SCR_EntitySpawnerSlotComponent, WorldTimestamp > m_mKnownOccupiedSlots
 
- Protected Attributes inherited from SCR_SlotServiceComponent
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 = {}
 

Static Protected Attributes

const float UPDATE_PERIOD = 10.0 / 60.0
 
- Static Protected Attributes inherited from SCR_ServicePointComponent
static bool s_bSpawnAsOffline
 

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.
 

Detailed Description

Component allowing user to request spawning entities using asset catalogs Requires ActionManager with enough SCR_CatalogSpawnerUserAction attached to it (they cannot be generated through script) and SCR_EntitySlotComponents in hiearchy or vicinity of owner.

Constructor & Destructor Documentation

◆ ~SCR_CatalogEntitySpawnerComponent()

void SCR_CatalogEntitySpawnerComponent.~SCR_CatalogEntitySpawnerComponent ( )

Member Function Documentation

◆ AddAISoldierToPlayerGroup()

void SCR_CatalogEntitySpawnerComponent.AddAISoldierToPlayerGroup ( notnull SCR_ChimeraCharacter  ai,
notnull IEntity  user 
)
protected

◆ AddAssetsFromCatalog()

void SCR_CatalogEntitySpawnerComponent.AddAssetsFromCatalog ( notnull SCR_EntityCatalog  entityCatalog,
bool  overwriteOld = false 
)
protected

Add Assets from entityCatalog.

Parameters
[in]entityCatalogEntity catalog which should be added
[in]overwriteOldIF true, old entities are overwriten by new ones, thus removing their availability

◆ AddKnownOccupiedSlot()

void SCR_CatalogEntitySpawnerComponent.AddKnownOccupiedSlot ( notnull SCR_EntitySpawnerSlotComponent  slot)

Set slot as occupied.

Parameters
[in]slot

◆ AddSpawnerSupplies()

void SCR_CatalogEntitySpawnerComponent.AddSpawnerSupplies ( float  supplies)

Add or reduce (by entering negative value) supplies available to spawner.

Parameters
[in]suppliesamount of supplies to be added/reduced

◆ AssignResourceComponent()

void SCR_CatalogEntitySpawnerComponent.AssignResourceComponent ( notnull SCR_ResourceComponent  component)

Assign resource component to handle resources of spawner.

◆ AssignSupplyComponent()

void SCR_CatalogEntitySpawnerComponent.AssignSupplyComponent ( notnull SCR_CampaignSuppliesComponent  supplyComp)

Assign supply component to handle supplies of spawner.

Currently uses Campaign specific supplies (temporarily)

Parameters
supplyComp

◆ AssignUserActions()

void SCR_CatalogEntitySpawnerComponent.AssignUserActions ( )
protected

Fills SCR_CatalogSpawnerUserAction actions on ActionManager.

The method should always be called when the Asset list is changed.

◆ CanRefund() [1/2]

bool SCR_CatalogEntitySpawnerComponent.CanRefund ( notnull IEntity  entity,
notnull IEntity  user 
)
Parameters
[in]entity
[in]user
Returns

◆ CanRefund() [2/2]

bool SCR_CatalogEntitySpawnerComponent.CanRefund ( RplId  entityId,
RplId  userId 
)
Parameters
[in]entityId
[in]userId
Returns

◆ CanRequestAI()

bool SCR_CatalogEntitySpawnerComponent.CanRequestAI ( notnull IEntity  user,
int  aiCount = 1 
)
Parameters
[in]userEntity of user requesting AI
[in]aiCountAmount of AI's to be added
Returns
true if player can request another AI into group, false otherwise

◆ ClearKnownSlots()

void SCR_CatalogEntitySpawnerComponent.ClearKnownSlots ( )

Manually clears known slots, thus forcing Spawner to do otherwise ignored checks.

◆ CooldownCheck()

bool SCR_CatalogEntitySpawnerComponent.CooldownCheck ( notnull IEntity  user)
protected
Parameters
[in]user
Returns
false if player spawned too recently

◆ CreatePreviewEntity()

void SCR_CatalogEntitySpawnerComponent.CreatePreviewEntity ( notnull SCR_EntityCatalogEntry  spawnData,
notnull SCR_EntitySpawnerSlotComponent  slot,
SCR_EEntityRequestStatus  reqStatus = SCR_EEntityRequestStatus::CAN_SPAWN 
)

Used to create local "preview" model on specified slot.

Used to visualise what entity is player requesting and position where it will appear

Parameters
[in]spawnDataSCR_EntityCatalogEntry containing information about entity (prefab data is required)
[in]slotSlot on which preview should appear
[in]reqStatus

◆ CreateRallyPointWaypoint()

SCR_AIWaypoint SCR_CatalogEntitySpawnerComponent.CreateRallyPointWaypoint ( notnull SCR_EntityLabelPointComponent  rallyPoint)
protected

Returns waypoint created as rally point for spawned unit.

◆ DeletePreviewEntity()

void SCR_CatalogEntitySpawnerComponent.DeletePreviewEntity ( )

Delete existing Preview entity at spawner.

◆ EOnFrame()

override void SCR_CatalogEntitySpawnerComponent.EOnFrame ( IEntity  owner,
float  timeSlice 
)

◆ EOnInit()

override void SCR_CatalogEntitySpawnerComponent.EOnInit ( IEntity  owner)
protected

◆ GetEntryAtIndex()

SCR_EntityCatalogEntry SCR_CatalogEntitySpawnerComponent.GetEntryAtIndex ( int  index)

Obtain Faction entity from AssetList on specific index.

◆ GetFreeSlot()

SCR_EntitySpawnerSlotComponent SCR_CatalogEntitySpawnerComponent.GetFreeSlot ( notnull SCR_EntityCatalogSpawnerData  spawnerData)

Returns free slot suitable for requested Entity.

Parameters
[in]spawnerDataSCR_EntityCatalogSpawnerData found on Catalog Entry

◆ GetFreeSlotFromArray()

SCR_EntitySpawnerSlotComponent SCR_CatalogEntitySpawnerComponent.GetFreeSlotFromArray ( notnull array< SCR_EntitySpawnerSlotComponent slots,
notnull SCR_EntityCatalogSpawnerData  spawnerData,
notnull array< SCR_EntitySpawnerSlotComponent occupiedSlots 
)
protected

Used in GetFreeSlot to obtain free slot from inserted array.

Parameters
[in]slotsArray containing slots that will be checked
[in]spawnerDataData containing parameters needed for free slot (slotType, for example)
[in]occupiedSlots

◆ GetLastKnownSuitableSlot()

SCR_EntitySpawnerSlotComponent SCR_CatalogEntitySpawnerComponent.GetLastKnownSuitableSlot ( notnull SCR_EntityCatalogSpawnerData  spawnerData)
protected

Returns last known suitable free slot. Used to reduce amount of redundant slot checks and save performance.

◆ GetOnEntitySpawned()

ScriptInvoker SCR_CatalogEntitySpawnerComponent.GetOnEntitySpawned ( )

Gets script invoker on entity spawns.

Invoker will send over spawned IEntity

Returns
ScriptInvoker Event when entity is spawned

◆ GetOnSpawnerSuppliesChanged()

ScriptInvoker SCR_CatalogEntitySpawnerComponent.GetOnSpawnerSuppliesChanged ( )

Gets script invoker on supplies changes.

Invoker will send over previous supply amount and changed one

Returns
ScriptInvoker Event when entity is spawned

◆ GetPlayerControllerFromEntity()

SCR_PlayerController SCR_CatalogEntitySpawnerComponent.GetPlayerControllerFromEntity ( notnull IEntity  userEntity)
Parameters
[in]userEntity
Returns

◆ GetPostGracePeriodRefundMultiplier()

float SCR_CatalogEntitySpawnerComponent.GetPostGracePeriodRefundMultiplier ( )
Returns

◆ GetPreviewEntity()

SCR_PrefabPreviewEntity SCR_CatalogEntitySpawnerComponent.GetPreviewEntity ( )
Returns
existing preview entity

◆ GetRequestComponentFromPlayerEntity()

SCR_SpawnerRequestComponent SCR_CatalogEntitySpawnerComponent.GetRequestComponentFromPlayerEntity ( notnull IEntity  playerEntity)
Parameters
[in]playerEntity
Returns

◆ GetRequesterFaction()

Faction SCR_CatalogEntitySpawnerComponent.GetRequesterFaction ( notnull IEntity  user)
Parameters
[in]user
Returns

◆ GetRequestState()

SCR_EEntityRequestStatus SCR_CatalogEntitySpawnerComponent.GetRequestState ( notnull SCR_EntityCatalogEntry  entityEntry,
IEntity  user = null 
)

Returns SCR_EEntityRequestStatus for request of selected entity with optional parameter of user requesting it.

Parameters
[in]entityEntryentityEntry in catalog to be spawned
[in]userUser requesting spawn

◆ GetSpawnerResourceComponent()

SCR_ResourceComponent SCR_CatalogEntitySpawnerComponent.GetSpawnerResourceComponent ( )

Get the resource component that is assigned to the spawner.

Returns
SCR_ResourceComponent resource component.

◆ GetSpawnerResourceValue()

float SCR_CatalogEntitySpawnerComponent.GetSpawnerResourceValue ( )

Get resources left for spawner.

Returns
float spawn supplies

◆ GetSpawnerSupplies()

float SCR_CatalogEntitySpawnerComponent.GetSpawnerSupplies ( )

Get supplies left for spawner.

Returns
spawn supplies

◆ GetSpawnerSupplyComponent()

SCR_CampaignSuppliesComponent SCR_CatalogEntitySpawnerComponent.GetSpawnerSupplyComponent ( )

Get supply component assigned to spawner.

Returns
SCR_CampaignSuppliesComponent spawn supplies

◆ InitiateSpawn()

void SCR_CatalogEntitySpawnerComponent.InitiateSpawn ( notnull SCR_EntityCatalogEntry  entityEntry,
int  userId,
SCR_EntitySpawnerSlotComponent  slot 
)

Initiate spawn.

Called through RPC from SCR_SpawnerRequestComponent on CharacterComponent

Parameters
[in]entityEntryentity entry to be spawned
[in]userIdId of user requesting spawn
[in]slotSlot on which user requests spawn. As last check for empty position is done by PerformSpawn itselt, this might be ignored, should slot be already occupied.

◆ IsInGracePeriod() [1/2]

bool SCR_CatalogEntitySpawnerComponent.IsInGracePeriod ( IEntity  entity)
Parameters
[in]entity
Returns

◆ IsInGracePeriod() [2/2]

bool SCR_CatalogEntitySpawnerComponent.IsInGracePeriod ( RplId  entityId)
Parameters
[in]entityId
Returns

◆ IsProxy()

bool SCR_CatalogEntitySpawnerComponent.IsProxy ( )
Returns

◆ IsSuppliesConsumptionEnabled()

bool SCR_CatalogEntitySpawnerComponent.IsSuppliesConsumptionEnabled ( )
Returns

◆ LockSpawnedVehicle()

void SCR_CatalogEntitySpawnerComponent.LockSpawnedVehicle ( notnull IEntity  owningUser)
protected

◆ OnAIAgentRemoved()

void SCR_CatalogEntitySpawnerComponent.OnAIAgentRemoved ( SCR_AIGroup  group,
AIAgent  ai 
)
protected

◆ OnAIGroupSpawned()

void SCR_CatalogEntitySpawnerComponent.OnAIGroupSpawned ( notnull SCR_AIGroup  group,
notnull IEntity  user,
notnull IEntity  slotEntity,
SCR_EntityLabelPointComponent  rallyPoint = null 
)
protected

Called from PerformSpawn, if spawned entity is AIGroup.

◆ OnChimeraCharacterSpawned()

void SCR_CatalogEntitySpawnerComponent.OnChimeraCharacterSpawned ( notnull SCR_ChimeraCharacter  ai,
notnull IEntity  user,
SCR_EntityLabelPointComponent  rallyPoint = null 
)
protected

Called from PerformSpawn, if spawned entity is ChimeraCharacter.

◆ OnDelete()

override void SCR_CatalogEntitySpawnerComponent.OnDelete ( IEntity  owner)
protected

◆ OnFactionChanged()

override void SCR_CatalogEntitySpawnerComponent.OnFactionChanged ( FactionAffiliationComponent  owner,
Faction  previousFaction,
Faction  faction 
)
protected

◆ OnGroupWaypointFinished()

void SCR_CatalogEntitySpawnerComponent.OnGroupWaypointFinished ( notnull AIWaypoint  wp)
protected

Called when AI finishes initial WP (making it move away from spawning position, before joining player squad)

Parameters
[in]wp

◆ OnPostInit()

override void SCR_CatalogEntitySpawnerComponent.OnPostInit ( IEntity  owner)
protected

◆ PerformSpawn()

void SCR_CatalogEntitySpawnerComponent.PerformSpawn ( notnull SCR_EntityCatalogEntry  entityEntry,
IEntity  user = null,
SCR_EntitySpawnerSlotComponent  preferredSlot = null 
)
protected

Spawn the actual entity.

Parameters
[in]entityEntry
[in]user
[in]preferredSlotoptional slot to be used for spawning

◆ RankCheck()

bool SCR_CatalogEntitySpawnerComponent.RankCheck ( notnull SCR_EntityCatalogEntry  entityEntry,
notnull IEntity  user 
)

Check if user is elibigle for requesting specified entity.

Parameters
[in]entityEntryentity entry of item to be checked
[in]usercontrolled entity of requester

◆ RegisterGracePeriod() [1/2]

void SCR_CatalogEntitySpawnerComponent.RegisterGracePeriod ( notnull IEntity  entity,
notnull IEntity  user,
float  startingTime = FLT_INF 
)
Parameters
[in]entity
[in]user
[in]startingTime

◆ RegisterGracePeriod() [2/2]

void SCR_CatalogEntitySpawnerComponent.RegisterGracePeriod ( RplId  entityId,
RplId  userId,
float  startingTime = FLT_INF 
)
Parameters
[in]entityId
[in]userId
[in]startingTime

◆ SendNotification()

void SCR_CatalogEntitySpawnerComponent.SendNotification ( int  msgId,
notnull IEntity  user,
int  assetId = -1,
int  catalogType = -1 
)
protected

◆ SetCurrentFactionCatalog()

void SCR_CatalogEntitySpawnerComponent.SetCurrentFactionCatalog ( )
protected

Set Asset Catalog from currently owning faction. If null, asset list will be cleared.

◆ SpawnAIGroupMember()

void SCR_CatalogEntitySpawnerComponent.SpawnAIGroupMember ( ResourceName  resName,
notnull IEntity  user,
IEntity  slotEntity,
SCR_EntityLabelPointComponent  rallyPoint = null 
)
Parameters
[in]resName
[in]user
[in]slotEntity
[in]rallyPoint

◆ SpawnEntity()

IEntity SCR_CatalogEntitySpawnerComponent.SpawnEntity ( ResourceName  entityResourceName,
notnull IEntity  slotOwner 
)
protected

◆ SupplyComponentSearchCallback()

bool SCR_CatalogEntitySpawnerComponent.SupplyComponentSearchCallback ( IEntity  ent)
protected

Callback for Search query in EOnInit. Search will be stopped, if Base with Supply component is found.

◆ UnregisterGracePeriod() [1/2]

void SCR_CatalogEntitySpawnerComponent.UnregisterGracePeriod ( notnull IEntity  entity)
Parameters
[in]entity

◆ UnregisterGracePeriod() [2/2]

void SCR_CatalogEntitySpawnerComponent.UnregisterGracePeriod ( RplId  entityId)
Parameters
[in]entityId

◆ UpdateOccupiedSlots()

void SCR_CatalogEntitySpawnerComponent.UpdateOccupiedSlots ( out array< SCR_EntitySpawnerSlotComponent occupiedSlots)
protected

Update currently known occupied slots.

If certain amount of time passed since last slot check, it will be removed from known slots and checked again next time it is needed.

Member Data Documentation

◆ INSTANCES

const ref array<SCR_CatalogEntitySpawnerComponent> SCR_CatalogEntitySpawnerComponent.INSTANCES = {}
static

static variable used to store all the instances created of this component.

◆ m_aAllowedLabels

ref array<EEditableEntityLabel> SCR_CatalogEntitySpawnerComponent.m_aAllowedLabels
protected

◆ m_aAssetList

ref array<SCR_EntityCatalogEntry> SCR_CatalogEntitySpawnerComponent.m_aAssetList = {}
protected

◆ m_aCatalogTypes

ref array<EEntityCatalogType> SCR_CatalogEntitySpawnerComponent.m_aCatalogTypes
protected

◆ m_ActionManager

ActionsManagerComponent SCR_CatalogEntitySpawnerComponent.m_ActionManager
protected

◆ m_aGracePeriodEntries

ref array<RplId> SCR_CatalogEntitySpawnerComponent.m_aGracePeriodEntries = {}
protected

◆ m_aGracePeriodRequesters

ref array<RplId> SCR_CatalogEntitySpawnerComponent.m_aGracePeriodRequesters = {}
protected

◆ m_aGracePeriodStartingTimes

ref array<float> SCR_CatalogEntitySpawnerComponent.m_aGracePeriodStartingTimes = {}
protected

◆ m_aGroupsToAssign

ref array<ref Tuple2<SCR_AIGroup, SCR_AIGroup> > SCR_CatalogEntitySpawnerComponent.m_aGroupsToAssign = {}
protected

◆ m_aIgnoredLabels

ref array<EEditableEntityLabel> SCR_CatalogEntitySpawnerComponent.m_aIgnoredLabels
protected

◆ m_bEnableGracePeriod

bool SCR_CatalogEntitySpawnerComponent.m_bEnableGracePeriod
protected

◆ m_bNeedAllLabels

bool SCR_CatalogEntitySpawnerComponent.m_bNeedAllLabels
protected

◆ m_bSuppliesConsumptionEnabled

bool SCR_CatalogEntitySpawnerComponent.m_bSuppliesConsumptionEnabled
protected

◆ m_fGracePeriodAreaRange

float SCR_CatalogEntitySpawnerComponent.m_fGracePeriodAreaRange
protected

◆ m_fGracePeriodTime

float SCR_CatalogEntitySpawnerComponent.m_fGracePeriodTime
protected

◆ m_fLastUpdateElapsedTime

float SCR_CatalogEntitySpawnerComponent.m_fLastUpdateElapsedTime
protected

◆ m_fPostGracePeriodRefundMultiplier

float SCR_CatalogEntitySpawnerComponent.m_fPostGracePeriodRefundMultiplier
protected

◆ m_iCustomSupplies

int SCR_CatalogEntitySpawnerComponent.m_iCustomSupplies
protected

◆ m_mGroupWaypoints

ref map<AIWaypoint, SCR_AIGroup> SCR_CatalogEntitySpawnerComponent.m_mGroupWaypoints
protected

◆ m_mKnownFreeSlots

ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> SCR_CatalogEntitySpawnerComponent.m_mKnownFreeSlots
protected

◆ m_mKnownOccupiedSlots

ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> SCR_CatalogEntitySpawnerComponent.m_mKnownOccupiedSlots
protected

◆ m_OnEntitySpawned

ref ScriptInvoker SCR_CatalogEntitySpawnerComponent.m_OnEntitySpawned
protected

◆ m_OnSpawnerSuppliesChanged

ref ScriptInvoker SCR_CatalogEntitySpawnerComponent.m_OnSpawnerSuppliesChanged
protected

◆ m_PreviewEntity

SCR_PrefabPreviewEntity SCR_CatalogEntitySpawnerComponent.m_PreviewEntity
protected

◆ m_ResourceComponent

SCR_ResourceComponent SCR_CatalogEntitySpawnerComponent.m_ResourceComponent
protected

◆ m_RplComponent

SCR_CampaignSuppliesComponent m_SupplyComponent RplComponent SCR_CatalogEntitySpawnerComponent.m_RplComponent
protected

◆ m_SpawnedEntity

IEntity SCR_CatalogEntitySpawnerComponent.m_SpawnedEntity
protected

◆ SLOT_CHECK_INTERVAL

const int SCR_CatalogEntitySpawnerComponent.SLOT_CHECK_INTERVAL = 60
static

◆ UPDATE_PERIOD

const float SCR_CatalogEntitySpawnerComponent.UPDATE_PERIOD = 10.0 / 60.0
staticprotected

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