Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CatalogEntitySpawnerComponent.c File Reference

Go to the source code of this file.

Data Structures

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)
 
protected void SetCurrentFactionCatalog ()
 Set Asset Catalog from currently owning faction. If null, asset list will be cleared. More...
 
protected void AddAssetsFromCatalog (notnull SCR_EntityCatalog entityCatalog, bool overwriteOld=false)
 
SCR_EntityCatalogEntry GetEntryAtIndex (int index)
 Obtain Faction entity from AssetList on specific index. More...
 
protected void AssignUserActions ()
 
void AssignResourceComponent (notnull SCR_ResourceComponent component)
 Assign resource component to handle resources of spawner. More...
 
void AssignSupplyComponent (notnull SCR_CampaignSuppliesComponent supplyComp)
 
void ClearKnownSlots ()
 Manually clears known slots, thus forcing Spawner to do otherwise ignored checks. More...
 
void AddKnownOccupiedSlot (notnull SCR_EntitySpawnerSlotComponent slot)
 
protected void UpdateOccupiedSlots (out array< SCR_EntitySpawnerSlotComponent > occupiedSlots)
 
protected SCR_EntitySpawnerSlotComponent GetLastKnownSuitableSlot (notnull SCR_EntityCatalogSpawnerData spawnerData)
 Returns last known suitable free slot. Used to reduce amount of redundant slot checks and save performance. More...
 
protected 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)
 
protected void OnGroupWaypointFinished (notnull AIWaypoint wp)
 
protected 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)
 
protected 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. More...
 
SCR_PrefabPreviewEntity GetPreviewEntity ()
 
protected void PerformSpawn (notnull SCR_EntityCatalogEntry entityEntry, IEntity user=null, SCR_EntitySpawnerSlotComponent preferredSlot=null)
 
protected IEntity SpawnEntity (ResourceName entityResourceName, notnull IEntity slotOwner)
 
protected void LockSpawnedVehicle (notnull IEntity owningUser)
 
SCR_ResourceComponent GetSpawnerResourceComponent ()
 
SCR_CampaignSuppliesComponent GetSpawnerSupplyComponent ()
 
float GetSpawnerResourceValue ()
 
float GetSpawnerSupplies ()
 
void AddSpawnerSupplies (float supplies)
 
protected bool CooldownCheck (notnull IEntity user)
 
protected override void OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
 Event which is triggered when the owning faction changes. More...
 
protected void OnAIGroupSpawned (notnull SCR_AIGroup group, notnull IEntity user, notnull IEntity slotEntity, SCR_EntityLabelPointComponent rallyPoint=null)
 Called from PerformSpawn, if spawned entity is AIGroup. More...
 
void SpawnAIGroupMember (ResourceName resName, notnull IEntity user, IEntity slotEntity, SCR_EntityLabelPointComponent rallyPoint=null)
 
protected void OnAIAgentRemoved (SCR_AIGroup group, AIAgent ai)
 
protected void OnChimeraCharacterSpawned (notnull SCR_ChimeraCharacter ai, notnull IEntity user, SCR_EntityLabelPointComponent rallyPoint=null)
 Called from PerformSpawn, if spawned entity is ChimeraCharacter. More...
 
protected SCR_AIWaypoint CreateRallyPointWaypoint (notnull SCR_EntityLabelPointComponent rallyPoint)
 Returns waypoint created as rally point for spawned unit. More...
 
protected bool SupplyComponentSearchCallback (IEntity ent)
 Callback for Search query in EOnInit. Search will be stopped, if Base with Supply component is found. More...
 
override void EOnFrame (IEntity owner, float timeSlice)
 
protected override void EOnInit (IEntity owner)
 
override protected void OnDelete (IEntity owner)
 
protected override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 
void ~SCR_CatalogEntitySpawnerComponent ()
 

Variables

SCR_CatalogEntitySpawnerComponentClass INSTANCES = {}
 static variable used to store all the instances created of this component. More...
 
const protected float UPDATE_PERIOD = 10.0 / 60.0
 
protected ref array< EEntityCatalogTypem_aCatalogTypes
 
protected ref array< EEditableEntityLabelm_aAllowedLabels
 
protected ref array< EEditableEntityLabelm_aIgnoredLabels
 
protected ref array< RplId > m_aGracePeriodEntries = {}
 
protected ref array< RplId > m_aGracePeriodRequesters = {}
 
protected ref array< float > m_aGracePeriodStartingTimes = {}
 
protected float m_fLastUpdateElapsedTime
 
protected bool m_bNeedAllLabels
 
protected bool m_bSuppliesConsumptionEnabled
 
protected int m_iCustomSupplies
 
protected bool m_bEnableGracePeriod
 
protected float m_fGracePeriodTime
 
protected float m_fGracePeriodAreaRange
 
protected float m_fPostGracePeriodRefundMultiplier
 
protected ActionsManagerComponent m_ActionManager
 
protected IEntity m_SpawnedEntity
 
protected SCR_PrefabPreviewEntity m_PreviewEntity
 
protected SCR_ResourceComponent m_ResourceComponent
 
protected SCR_CampaignSuppliesComponent m_SupplyComponent protected RplComponent m_RplComponent
 
protected ref ScriptInvoker m_OnEntitySpawned
 
protected ref ScriptInvoker m_OnSpawnerSuppliesChanged
 
protected ref array< SCR_EntityCatalogEntrym_aAssetList = {}
 
protected ref array< ref Tuple2< SCR_AIGroup, SCR_AIGroup > > m_aGroupsToAssign = {}
 
protected ref map< AIWaypoint, SCR_AIGroupm_mGroupWaypoints
 
protected ref map< SCR_EntitySpawnerSlotComponent, WorldTimestamp > m_mKnownFreeSlots
 
protected ref map< SCR_EntitySpawnerSlotComponent, WorldTimestamp > m_mKnownOccupiedSlots
 

Enumeration Type Documentation

◆ SCR_EEntityRequestStatus

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()

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

Definition at line 744 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AddAssetsFromCatalog()

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

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)

Set slot as occupied

Parameters
[in]slot

Definition at line 445 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AddSpawnerSupplies()

void AddSpawnerSupplies ( float  supplies)

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)

Assign resource component to handle resources of spawner.

Definition at line 418 of file SCR_CatalogEntitySpawnerComponent.c.

◆ AssignSupplyComponent()

void AssignSupplyComponent ( notnull SCR_CampaignSuppliesComponent  supplyComp)

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()

protected void AssignUserActions ( )

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 
)
Parameters
[in]entity
[in]user
Returns

Definition at line 194 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CanRefund() [2/2]

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

Definition at line 178 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CanRequestAI()

bool 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

Definition at line 651 of file SCR_CatalogEntitySpawnerComponent.c.

◆ ClearKnownSlots()

void ClearKnownSlots ( )

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

Definition at line 434 of file SCR_CatalogEntitySpawnerComponent.c.

◆ CooldownCheck()

protected bool CooldownCheck ( notnull IEntity  user)
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 
)

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()

protected SCR_AIWaypoint CreateRallyPointWaypoint ( notnull SCR_EntityLabelPointComponent  rallyPoint)

Returns waypoint created as rally point for spawned unit.

Definition at line 1290 of file SCR_CatalogEntitySpawnerComponent.c.

◆ DeletePreviewEntity()

void DeletePreviewEntity ( )

Delete existing Preview entity at spawner.

Definition at line 877 of file SCR_CatalogEntitySpawnerComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity  owner,
float  timeSlice 
)

Definition at line 1327 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetEntryAtIndex()

SCR_EntityCatalogEntry GetEntryAtIndex ( int  index)

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)

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()

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

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()

protected SCR_EntitySpawnerSlotComponent GetLastKnownSuitableSlot ( notnull SCR_EntityCatalogSpawnerData  spawnerData)

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 ( )

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 ( )

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)
Parameters
[in]userEntity
Returns

Definition at line 796 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetPostGracePeriodRefundMultiplier()

float GetPostGracePeriodRefundMultiplier ( )
Returns

Definition at line 145 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetPreviewEntity()

SCR_PrefabPreviewEntity GetPreviewEntity ( )
Returns
existing preview entity

Definition at line 885 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequestComponentFromPlayerEntity()

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

Definition at line 808 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequesterFaction()

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

Definition at line 760 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetRequestState()

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.

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 ( )

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 ( )

Get resources left for spawner

Returns
float spawn supplies

Definition at line 1062 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerSupplies()

float GetSpawnerSupplies ( )

Get supplies left for spawner

Returns
spawn supplies

Definition at line 1079 of file SCR_CatalogEntitySpawnerComponent.c.

◆ GetSpawnerSupplyComponent()

SCR_CampaignSuppliesComponent GetSpawnerSupplyComponent ( )

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 
)

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)
Parameters
[in]entity
Returns

Definition at line 153 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsInGracePeriod() [2/2]

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

Definition at line 166 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsProxy()

bool IsProxy ( )
Returns

Definition at line 131 of file SCR_CatalogEntitySpawnerComponent.c.

◆ IsSuppliesConsumptionEnabled()

bool IsSuppliesConsumptionEnabled ( )
Returns

Definition at line 138 of file SCR_CatalogEntitySpawnerComponent.c.

◆ LockSpawnedVehicle()

protected void LockSpawnedVehicle ( notnull IEntity  owningUser)

Definition at line 1025 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnAIAgentRemoved()

protected void OnAIAgentRemoved ( SCR_AIGroup  group,
AIAgent  ai 
)

Definition at line 1205 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnAIGroupSpawned()

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

Called from PerformSpawn, if spawned entity is AIGroup.

Definition at line 1166 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnChimeraCharacterSpawned()

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

Called from PerformSpawn, if spawned entity is ChimeraCharacter.

Definition at line 1228 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnFactionChanged()

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

Event which is triggered when the owning faction changes.

Definition at line 1159 of file SCR_CatalogEntitySpawnerComponent.c.

◆ OnGroupWaypointFinished()

protected void OnGroupWaypointFinished ( notnull AIWaypoint  wp)

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()

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

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 
)

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 
)
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 
)
Parameters
[in]entityId
[in]userId
[in]startingTime

Definition at line 284 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SendNotification()

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

Definition at line 819 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SetCurrentFactionCatalog()

protected void SetCurrentFactionCatalog ( )

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 
)
Parameters
[in]resName
[in]user
[in]slotEntity
[in]rallyPoint

Definition at line 1195 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SpawnEntity()

protected IEntity SpawnEntity ( ResourceName  entityResourceName,
notnull IEntity  slotOwner 
)

Definition at line 1008 of file SCR_CatalogEntitySpawnerComponent.c.

◆ SupplyComponentSearchCallback()

protected bool SupplyComponentSearchCallback ( IEntity  ent)

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)
Parameters
[in]entity

Definition at line 212 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UnregisterGracePeriod() [2/2]

void UnregisterGracePeriod ( RplId  entityId)
Parameters
[in]entityId

Definition at line 234 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UpdateOccupiedSlots()

protected void UpdateOccupiedSlots ( out array< SCR_EntitySpawnerSlotComponent >  occupiedSlots)

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 ( )

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

protected ref array<EEditableEntityLabel> m_aAllowedLabels

Definition at line 74 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aAssetList

protected ref array<SCR_EntityCatalogEntry> m_aAssetList = {}

Definition at line 121 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aCatalogTypes

protected ref array<EEntityCatalogType> m_aCatalogTypes

Definition at line 71 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_ActionManager

protected ActionsManagerComponent m_ActionManager

Definition at line 109 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodEntries

protected ref array<RplId> m_aGracePeriodEntries = {}

Definition at line 80 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodRequesters

protected ref array<RplId> m_aGracePeriodRequesters = {}

Definition at line 83 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGracePeriodStartingTimes

protected ref array<float> m_aGracePeriodStartingTimes = {}

Definition at line 85 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aGroupsToAssign

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

Definition at line 122 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_aIgnoredLabels

protected ref array<EEditableEntityLabel> m_aIgnoredLabels

Definition at line 77 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bEnableGracePeriod

protected bool m_bEnableGracePeriod

Definition at line 98 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bNeedAllLabels

protected bool m_bNeedAllLabels

Definition at line 89 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_bSuppliesConsumptionEnabled

protected bool m_bSuppliesConsumptionEnabled

Definition at line 92 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fGracePeriodAreaRange

protected float m_fGracePeriodAreaRange

Definition at line 104 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fGracePeriodTime

protected float m_fGracePeriodTime

Definition at line 101 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fLastUpdateElapsedTime

protected float m_fLastUpdateElapsedTime

Definition at line 86 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_fPostGracePeriodRefundMultiplier

protected float m_fPostGracePeriodRefundMultiplier

Definition at line 107 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_iCustomSupplies

protected int m_iCustomSupplies

Definition at line 95 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mGroupWaypoints

protected ref map<AIWaypoint, SCR_AIGroup> m_mGroupWaypoints

Definition at line 123 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mKnownFreeSlots

protected ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> m_mKnownFreeSlots

Definition at line 126 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_mKnownOccupiedSlots

protected ref map<SCR_EntitySpawnerSlotComponent, WorldTimestamp> m_mKnownOccupiedSlots

Definition at line 127 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_OnEntitySpawned

protected ref ScriptInvoker m_OnEntitySpawned

Definition at line 116 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_OnSpawnerSuppliesChanged

protected ref ScriptInvoker m_OnSpawnerSuppliesChanged

Definition at line 117 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_PreviewEntity

protected SCR_PrefabPreviewEntity m_PreviewEntity

Definition at line 111 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_ResourceComponent

protected SCR_ResourceComponent m_ResourceComponent

Definition at line 112 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_RplComponent

protected SCR_CampaignSuppliesComponent m_SupplyComponent protected RplComponent m_RplComponent

Definition at line 114 of file SCR_CatalogEntitySpawnerComponent.c.

◆ m_SpawnedEntity

protected IEntity m_SpawnedEntity

Definition at line 110 of file SCR_CatalogEntitySpawnerComponent.c.

◆ UPDATE_PERIOD

const protected float UPDATE_PERIOD = 10.0 / 60.0

Definition at line 68 of file SCR_CatalogEntitySpawnerComponent.c.