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

Go to the source code of this file.

Classes

class  SCR_CatalogEntitySpawnerComponentClass

Enumerations

enum  SCR_EEntityRequestStatus {
  NOT_ENOUGH_SUPPLIES = 1 , NOT_ENOUGH_SPACE = 2 , RANK_LOW = 3 , COOLDOWN = 4 ,
  REQUESTER_NOT_GROUPLEADER = 5 , GROUP_FULL = 6 , NOT_AVAILABLE = 7 , CAN_SPAWN = 8 ,
  CAN_SPAWN_TRIGGER = 9 , AI_LIMIT_REACHED = 10
}

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)
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)
SCR_EntityCatalogEntry GetEntryAtIndex (int index)
 Obtain Faction entity from AssetList on specific index.
void AssignUserActions ()
void AssignResourceComponent (notnull SCR_ResourceComponent component)
 Assign resource component to handle resources of spawner.
void AssignSupplyComponent (notnull SCR_CampaignSuppliesComponent supplyComp)
void ClearKnownSlots ()
 Manually clears known slots, thus forcing Spawner to do otherwise ignored checks.
void AddKnownOccupiedSlot (notnull SCR_EntitySpawnerSlotComponent slot)
void UpdateOccupiedSlots (out array< SCR_EntitySpawnerSlotComponent > occupiedSlots)
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)
SCR_EntitySpawnerSlotComponent GetFreeSlot (notnull SCR_EntityCatalogSpawnerData spawnerData)
void InitiateSpawn (notnull SCR_EntityCatalogEntry entityEntry, int userId, SCR_EntitySpawnerSlotComponent slot)
SCR_EEntityRequestStatus GetRequestState (notnull SCR_EntityCatalogEntry entityEntry, IEntity user=null)
bool CanRequestAI (notnull IEntity user, int aiCount=1)
void OnGroupWaypointFinished (notnull AIWaypoint wp)
void AddAISoldierToPlayerGroup (notnull SCR_ChimeraCharacter ai, notnull IEntity user)
Faction GetRequesterFaction (notnull IEntity user)
ScriptInvoker GetOnEntitySpawned ()
ScriptInvoker GetOnSpawnerSuppliesChanged ()
SCR_PlayerController GetPlayerControllerFromEntity (notnull IEntity userEntity)
SCR_SpawnerRequestComponent GetRequestComponentFromPlayerEntity (notnull IEntity playerEntity)
void SendNotification (int msgId, notnull IEntity user, int assetId=-1, int catalogType=-1)
void CreatePreviewEntity (notnull SCR_EntityCatalogEntry spawnData, notnull SCR_EntitySpawnerSlotComponent slot, SCR_EEntityRequestStatus reqStatus=SCR_EEntityRequestStatus.CAN_SPAWN)
void DeletePreviewEntity ()
 Delete existing Preview entity at spawner.
SCR_PrefabPreviewEntity GetPreviewEntity ()
void PerformSpawn (notnull SCR_EntityCatalogEntry entityEntry, IEntity user=null, SCR_EntitySpawnerSlotComponent preferredSlot=null)
IEntity SpawnEntity (ResourceName entityResourceName, notnull IEntity slotOwner)
void LockSpawnedVehicle (notnull IEntity owningUser)
SCR_ResourceComponent GetSpawnerResourceComponent ()
SCR_CampaignSuppliesComponent GetSpawnerSupplyComponent ()
float GetSpawnerResourceValue ()
float GetSpawnerSupplies ()
void AddSpawnerSupplies (float supplies)
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 SpawnAIGroupMember (ResourceName resName, notnull IEntity user, IEntity slotEntity, SCR_EntityLabelPointComponent rallyPoint=null)
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 EOnFrame (IEntity owner, float timeSlice)
override void EOnInit (IEntity owner)
void OnDelete (IEntity owner)
override void OnPostInit (IEntity owner)
 Editable Mine.
void ~SCR_CatalogEntitySpawnerComponent ()

Variables

SCR_CatalogEntitySpawnerComponentClass INSTANCES = {}
 static variable used to store all the instances created of this component.
const float UPDATE_PERIOD = 10.0 / 60.0
ref array< EEntityCatalogTypem_aCatalogTypes
ref array< EEditableEntityLabelm_aAllowedLabels
ref array< EEditableEntityLabelm_aIgnoredLabels
ref array< RplIdm_aGracePeriodEntries = {}
ref array< RplIdm_aGracePeriodRequesters = {}
ref array< floatm_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
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, WorldTimestampm_mKnownFreeSlots
ref map< SCR_EntitySpawnerSlotComponent, WorldTimestampm_mKnownOccupiedSlots

Enumeration Type Documentation

◆ SCR_EEntityRequestStatus

enum SCR_EEntityRequestStatus
protected
Enumerator
NOT_ENOUGH_SUPPLIES 
NOT_ENOUGH_SPACE 
RANK_LOW 
COOLDOWN 
REQUESTER_NOT_GROUPLEADER 
GROUP_FULL 
NOT_AVAILABLE 
CAN_SPAWN 
CAN_SPAWN_TRIGGER 
AI_LIMIT_REACHED 

Definition at line 1428 of file SCR_CatalogEntitySpawnerComponent.c.

Function Documentation

◆ AddAISoldierToPlayerGroup()

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

Definition at line 744 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AddAssetsFromCatalog()

void 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

Definition at line 360 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AddKnownOccupiedSlot()

void AddKnownOccupiedSlot ( notnull SCR_EntitySpawnerSlotComponent slot)
protected

Set slot as occupied

Parameters
[in]slot

Definition at line 445 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AddSpawnerSupplies()

void AddSpawnerSupplies ( float supplies)
protected

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

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

Definition at line 1090 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AssignResourceComponent()

void AssignResourceComponent ( notnull SCR_ResourceComponent component)
protected

Assign resource component to handle resources of spawner.

Definition at line 418 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AssignSupplyComponent()

void AssignSupplyComponent ( notnull SCR_CampaignSuppliesComponent supplyComp)
protected

Assign supply component to handle supplies of spawner. Currently uses Campaign specific supplies (temporarily)

Parameters
supplyComp

Definition at line 427 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AssignUserActions()

void AssignUserActions ( )
protected

Fills SCR_CatalogSpawnerUserAction actions on ActionManager. The method should always be called when the Asset list is changed.

Definition at line 387 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CanRefund() [1/2]

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

Definition at line 194 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CanRefund() [2/2]

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

Definition at line 178 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CanRequestAI()

bool CanRequestAI ( notnull IEntity user,
int aiCount = 1 )
protected
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

Definition at line 651 of file SCR_CatalogEntitySpawnerComponent.c.

◆ ClearKnownSlots()

void ClearKnownSlots ( )
protected

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

Definition at line 434 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CooldownCheck()

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

Definition at line 1133 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CreatePreviewEntity()

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

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

Definition at line 833 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CreateRallyPointWaypoint()

SCR_AIWaypoint CreateRallyPointWaypoint ( notnull SCR_EntityLabelPointComponent rallyPoint)
protected

Returns waypoint created as rally point for spawned unit.

Definition at line 1290 of file SCR_CatalogEntitySpawnerComponent.c.

◆ DeletePreviewEntity()

void DeletePreviewEntity ( )
protected

Delete existing Preview entity at spawner.

Definition at line 877 of file SCR_CatalogEntitySpawnerComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity owner,
float timeSlice )
protected

Definition at line 1327 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetEntryAtIndex()

SCR_EntityCatalogEntry GetEntryAtIndex ( int index)
protected

Obtain Faction entity from AssetList on specific index.

Definition at line 376 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetFreeSlot()

SCR_EntitySpawnerSlotComponent GetFreeSlot ( notnull SCR_EntityCatalogSpawnerData spawnerData)
protected

Returns free slot suitable for requested Entity

Parameters
[in]spawnerDataSCR_EntityCatalogSpawnerData found on Catalog Entry

Definition at line 528 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetFreeSlotFromArray()

SCR_EntitySpawnerSlotComponent 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

Definition at line 500 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetLastKnownSuitableSlot()

SCR_EntitySpawnerSlotComponent GetLastKnownSuitableSlot ( notnull SCR_EntityCatalogSpawnerData spawnerData)
protected

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

Definition at line 477 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetOnEntitySpawned()

ScriptInvoker GetOnEntitySpawned ( )
protected

Gets script invoker on entity spawns. Invoker will send over spawned IEntity

Returns
ScriptInvoker Event when entity is spawned

Definition at line 773 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetOnSpawnerSuppliesChanged()

ScriptInvoker GetOnSpawnerSuppliesChanged ( )
protected

Gets script invoker on supplies changes. Invoker will send over previous supply amount and changed one

Returns
ScriptInvoker Event when entity is spawned

Definition at line 785 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetPlayerControllerFromEntity()

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

Definition at line 796 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetPostGracePeriodRefundMultiplier()

float GetPostGracePeriodRefundMultiplier ( )
protected
Returns

Definition at line 145 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetPreviewEntity()

SCR_PrefabPreviewEntity GetPreviewEntity ( )
protected
Returns
existing preview entity

Definition at line 885 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequestComponentFromPlayerEntity()

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

Definition at line 808 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequesterFaction()

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

Definition at line 760 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequestState()

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

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

Definition at line 573 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerResourceComponent()

SCR_ResourceComponent GetSpawnerResourceComponent ( )
protected

Get the resource component that is assigned to the spawner.

Returns
SCR_ResourceComponent resource component.

Definition at line 1045 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerResourceValue()

float GetSpawnerResourceValue ( )
protected

Get resources left for spawner

Returns
float spawn supplies

Definition at line 1062 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerSupplies()

float GetSpawnerSupplies ( )
protected

Get supplies left for spawner

Returns
spawn supplies

Definition at line 1079 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerSupplyComponent()

SCR_CampaignSuppliesComponent GetSpawnerSupplyComponent ( )
protected

Get supply component assigned to spawner

Returns
SCR_CampaignSuppliesComponent spawn supplies

Definition at line 1054 of file SCR_CatalogEntitySpawnerComponent.c.

◆ InitiateSpawn()

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

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.

Definition at line 551 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsInGracePeriod() [1/2]

bool IsInGracePeriod ( IEntity entity)
protected
Parameters
[in]entity
Returns

Definition at line 153 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsInGracePeriod() [2/2]

bool IsInGracePeriod ( RplId entityId)
protected
Parameters
[in]entityId
Returns

Definition at line 166 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsSuppliesConsumptionEnabled()

bool IsSuppliesConsumptionEnabled ( )
protected
Returns

Definition at line 138 of file SCR_CatalogEntitySpawnerComponent.c.

◆ LockSpawnedVehicle()

void LockSpawnedVehicle ( notnull IEntity owningUser)
protected

Definition at line 1025 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnAIAgentRemoved()

void OnAIAgentRemoved ( SCR_AIGroup group,
AIAgent ai )
protected

Definition at line 1205 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnAIGroupSpawned()

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

Called from PerformSpawn, if spawned entity is AIGroup.

Definition at line 1166 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnChimeraCharacterSpawned()

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

Called from PerformSpawn, if spawned entity is ChimeraCharacter.

Definition at line 1228 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnDelete()

void OnDelete ( IEntity owner)
protected

Definition at line 1402 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnFactionChanged()

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

Definition at line 1159 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnGroupWaypointFinished()

void 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

Definition at line 685 of file SCR_CatalogEntitySpawnerComponent.c.

◆ PerformSpawn()

void 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

Definition at line 895 of file SCR_CatalogEntitySpawnerComponent.c.

◆ RankCheck()

bool RankCheck ( notnull SCR_EntityCatalogEntry entityEntry,
notnull IEntity user )
protected

Check if user is elibigle for requesting specified entity

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

Definition at line 302 of file SCR_CatalogEntitySpawnerComponent.c.

◆ RegisterGracePeriod() [1/2]

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

Definition at line 256 of file SCR_CatalogEntitySpawnerComponent.c.

◆ RegisterGracePeriod() [2/2]

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

Definition at line 284 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SendNotification()

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

Definition at line 819 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SetCurrentFactionCatalog()

void SetCurrentFactionCatalog ( )
protected

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

Definition at line 332 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SpawnAIGroupMember()

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

Definition at line 1195 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SpawnEntity()

IEntity SpawnEntity ( ResourceName entityResourceName,
notnull IEntity slotOwner )
protected

Definition at line 1008 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SupplyComponentSearchCallback()

bool SupplyComponentSearchCallback ( IEntity ent)
protected

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

Definition at line 1309 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UnregisterGracePeriod() [1/2]

void UnregisterGracePeriod ( notnull IEntity entity)
protected
Parameters
[in]entity

Definition at line 212 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UnregisterGracePeriod() [2/2]

void UnregisterGracePeriod ( RplId entityId)
protected
Parameters
[in]entityId

Definition at line 234 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UpdateOccupiedSlots()

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

Definition at line 457 of file SCR_CatalogEntitySpawnerComponent.c.

◆ ~SCR_CatalogEntitySpawnerComponent()

void ~SCR_CatalogEntitySpawnerComponent ( )
protected

Definition at line 1422 of file SCR_CatalogEntitySpawnerComponent.c.

Variable Documentation

◆ INSTANCES

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

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

◆ m_aAllowedLabels

ref array<EEditableEntityLabel> m_aAllowedLabels
protected

Definition at line 74 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aAssetList

ref array<SCR_EntityCatalogEntry> m_aAssetList = {}
protected

Definition at line 121 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aCatalogTypes

ref array<EEntityCatalogType> m_aCatalogTypes
protected

Definition at line 71 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_ActionManager

ActionsManagerComponent m_ActionManager
protected

Definition at line 109 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodEntries

ref array<RplId> m_aGracePeriodEntries = {}
protected

Definition at line 80 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodRequesters

ref array<RplId> m_aGracePeriodRequesters = {}
protected

Definition at line 83 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodStartingTimes

ref array<float> m_aGracePeriodStartingTimes = {}
protected

Definition at line 85 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGroupsToAssign

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

Definition at line 122 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aIgnoredLabels

ref array<EEditableEntityLabel> m_aIgnoredLabels
protected

Definition at line 77 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bEnableGracePeriod

bool m_bEnableGracePeriod
protected

Definition at line 98 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bNeedAllLabels

bool m_bNeedAllLabels
protected

Definition at line 89 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bSuppliesConsumptionEnabled

bool m_bSuppliesConsumptionEnabled
protected

Definition at line 92 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fGracePeriodAreaRange

float m_fGracePeriodAreaRange
protected

Definition at line 104 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fGracePeriodTime

float m_fGracePeriodTime
protected

Definition at line 101 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fLastUpdateElapsedTime

float m_fLastUpdateElapsedTime
protected

Definition at line 86 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fPostGracePeriodRefundMultiplier

float m_fPostGracePeriodRefundMultiplier
protected

Definition at line 107 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_iCustomSupplies

int m_iCustomSupplies
protected

Definition at line 95 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mGroupWaypoints

ref map<AIWaypoint, SCR_AIGroup> m_mGroupWaypoints
protected

Definition at line 123 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mKnownFreeSlots

ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> m_mKnownFreeSlots
protected

Definition at line 126 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mKnownOccupiedSlots

ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> m_mKnownOccupiedSlots
protected

Definition at line 127 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_OnEntitySpawned

ref ScriptInvoker m_OnEntitySpawned
protected

Definition at line 116 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_OnSpawnerSuppliesChanged

ref ScriptInvoker m_OnSpawnerSuppliesChanged
protected

Definition at line 117 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_PreviewEntity

SCR_PrefabPreviewEntity m_PreviewEntity
protected

Definition at line 111 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_ResourceComponent

SCR_ResourceComponent m_ResourceComponent
protected

Definition at line 112 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_RplComponent

RplComponent m_RplComponent
protected

Definition at line 114 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_SpawnedEntity

IEntity m_SpawnedEntity
protected

Definition at line 110 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UPDATE_PERIOD

const float UPDATE_PERIOD = 10.0 / 60.0
protected

Definition at line 68 of file SCR_CatalogEntitySpawnerComponent.c.