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

Catalog that holds faction entity lists of a specific entity type. More...

Inheritance diagram for SCR_EntityCatalog:
[legend]

Public Member Functions

EEntityCatalogType GetCatalogType ()
 Get Data type.
 
int GetEntityList (notnull out array< SCR_EntityCatalogEntry > entityList)
 Get list of entities witin Catalog Ignores Disabled Entries Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
SCR_EntityCatalogEntry GetEntryWithPrefab (ResourceName prefabToFind)
 Return entry with specific prefab Ignores Disabled Entries.
 
SCR_EntityCatalogEntry GetCatalogEntry (int index)
 Get Catalog Entry of index.
 
int GetEntityListWithLabel (EEditableEntityLabel label, notnull out array< SCR_EntityCatalogEntry > filteredEntityList)
 Get list of entities witin Catalog which have a specific Label Ignores Disabled Entries and disabled Data types Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetEntityListExcludingLabel (EEditableEntityLabel excludinglabel, notnull out array< SCR_EntityCatalogEntry > filteredEntityList)
 Get list of entities witin Catalog EXCLUDING those with specific label Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetFullFilteredEntityListWithLabels (notnull out array< SCR_EntityCatalogEntry > filteredEntityList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, bool needsAllIncluded=true)
 Get list of entities that all contain all/any the included labels and NONE exclude labels Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetEntityListWithData (TypeName dataClass, notnull out array< SCR_EntityCatalogEntry > filteredEntityList, out array< SCR_BaseEntityCatalogData > dataList=null)
 Get list of entities witin Catalog which have a specific Data type (Needs to be inherent from SCR_BaseEntityCatalogData) Ignores Disabled Entries and disabled Data types Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetEntityListExcludingData (TypeName excludingDataClass, notnull out array< SCR_EntityCatalogEntry > filteredEntityList)
 Get list of entities witin Catalog EXCLUDING those with specific Data type (Needs to be inherent from SCR_BaseEntityCatalogData) Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetFullFilteredEntityListWithData (notnull out array< SCR_EntityCatalogEntry > filteredEntityList, array< TypeName > includedDataClasses=null, array< TypeName > excludedDataClasses=null, bool needsAllIncluded=true)
 Get list of entities that all contain all/any the included Data classes and NONE exclude data classes Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
int GetFullFilteredEntityList (notnull out array< SCR_EntityCatalogEntry > filteredEntityList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, array< TypeName > includedDataClasses=null, array< TypeName > excludedDataClasses=null, bool needsAllIncludedLabels=true, bool needsAllIncludedClasses=true)
 Get list of entities that all contain all/any the included labels and/or Data classes and NONE exclude labels and/or data classes Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.
 
void MergeCatalogs (notnull SCR_EntityCatalog catalogToMerge)
 Merge the given catalog into this catalog.
 
void InitCatalog ()
 
void ClearCatalogOnMerge ()
 Clear the catalog only executed on merge.
 

Protected Member Functions

void PostInitCatalog ()
 

Protected Attributes

EEntityCatalogType m_eEntityCatalogType
 
ref array< ref SCR_EntityCatalogEntrym_aEntityEntryList
 
ref map< ResourceName, int > m_mPrefabIndexes = new map<ResourceName, int>()
 

Detailed Description

Catalog that holds faction entity lists of a specific entity type.

Member Function Documentation

◆ ClearCatalogOnMerge()

void SCR_EntityCatalog.ClearCatalogOnMerge ( )

Clear the catalog only executed on merge.

Implemented in SCR_EntityCatalogMultiList.

◆ GetCatalogEntry()

SCR_EntityCatalogEntry SCR_EntityCatalog.GetCatalogEntry ( int  index)

Get Catalog Entry of index.

Can ignores disabled entries

Parameters
Indexof entry within list
Returns
Catalog Entry. Null if entry is disabled

◆ GetCatalogType()

EEntityCatalogType SCR_EntityCatalog.GetCatalogType ( )

Get Data type.

Returns
Returns Catalog type of holder

◆ GetEntityList()

int SCR_EntityCatalog.GetEntityList ( notnull out array< SCR_EntityCatalogEntry entityList)

Get list of entities witin Catalog Ignores Disabled Entries Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
[out]entityListArray of enabled entity list
Returns
List size

◆ GetEntityListExcludingData()

int SCR_EntityCatalog.GetEntityListExcludingData ( TypeName  excludingDataClass,
notnull out array< SCR_EntityCatalogEntry filteredEntityList 
)

Get list of entities witin Catalog EXCLUDING those with specific Data type (Needs to be inherent from SCR_BaseEntityCatalogData) Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
excludingDataClassclass of Data type you DON'T want the data from (Needs to be inherent from SCR_BaseEntityCatalogData)
[out]filteredEntityListArray of enabled entity list without the specific Data type
Returns
List size

◆ GetEntityListExcludingLabel()

int SCR_EntityCatalog.GetEntityListExcludingLabel ( EEditableEntityLabel  excludinglabel,
notnull out array< SCR_EntityCatalogEntry filteredEntityList 
)

Get list of entities witin Catalog EXCLUDING those with specific label Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
excludinglabelLabel you want the entry NOT have
[out]filteredEntityListArray of enabled entity list without the specific label
Returns
List size

◆ GetEntityListWithData()

int SCR_EntityCatalog.GetEntityListWithData ( TypeName  dataClass,
notnull out array< SCR_EntityCatalogEntry filteredEntityList,
out array< SCR_BaseEntityCatalogData dataList = null 
)

Get list of entities witin Catalog which have a specific Data type (Needs to be inherent from SCR_BaseEntityCatalogData) Ignores Disabled Entries and disabled Data types Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
dataClassclass of Data type you want the data to have in order to be added to the list (Needs to be inherent from SCR_BaseEntityCatalogData)
[out]filteredEntityListArray of enabled entity list with specific Data type
[out]dataListoptionally you can directly get the data list if array given
Returns
List size

◆ GetEntityListWithLabel()

int SCR_EntityCatalog.GetEntityListWithLabel ( EEditableEntityLabel  label,
notnull out array< SCR_EntityCatalogEntry filteredEntityList 
)

Get list of entities witin Catalog which have a specific Label Ignores Disabled Entries and disabled Data types Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
labelLabel you want the entry to have
[out]filteredEntityListArray of enabled entity list with the specific label
Returns
List size

◆ GetEntryWithPrefab()

SCR_EntityCatalogEntry SCR_EntityCatalog.GetEntryWithPrefab ( ResourceName  prefabToFind)

Return entry with specific prefab Ignores Disabled Entries.

Parameters
prefabToFindPrefab the entry has that you are looking for
Returns
Found Entry, can be null if not found

◆ GetFullFilteredEntityList()

int SCR_EntityCatalog.GetFullFilteredEntityList ( notnull out array< SCR_EntityCatalogEntry filteredEntityList,
array< EEditableEntityLabel >  includedLabels = null,
array< EEditableEntityLabel >  excludedLabels = null,
array< TypeName >  includedDataClasses = null,
array< TypeName >  excludedDataClasses = null,
bool  needsAllIncludedLabels = true,
bool  needsAllIncludedClasses = true 
)

Get list of entities that all contain all/any the included labels and/or Data classes and NONE exclude labels and/or data classes Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
[out]filteredEntityListFilltered array of enabled entity
includedLabelsA list of labels the entity needs all/any to have. Can be null if any of the other arrays are filled
excludedLabelsA list of labels the entity CANNOT have ANY of. Can be null if any of the other arrays are filled
includedDataClassesA list of classes the entity ALL needs to have. Can be null if any of the other arrays are filled (Needs to be inherent from SCR_BaseEntityCatalogData)
excludedDataClassesA list of classes the entity CANNOT have ANY of. Can be null if any of the other arrays are filled (Needs to be inherent from SCR_BaseEntityCatalogData)
needsAllIncludedLabelsIf true included List all needs to be true, if false any needs to be true
needsAllIncludedClassesIf true included List all needs to be true, if false any needs to be true
Returns
List size

◆ GetFullFilteredEntityListWithData()

int SCR_EntityCatalog.GetFullFilteredEntityListWithData ( notnull out array< SCR_EntityCatalogEntry filteredEntityList,
array< TypeName >  includedDataClasses = null,
array< TypeName >  excludedDataClasses = null,
bool  needsAllIncluded = true 
)

Get list of entities that all contain all/any the included Data classes and NONE exclude data classes Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
[out]filteredEntityListFilltered array of enabled entity
includedDataClassesA list of classes the entity needs all/any to have. Can be null if exclusive is filled (Needs to be inherent from SCR_BaseEntityCatalogData)
excludedDataClassesA list of classes the entity CANNOT have ANY of. Can be null if inclusive is filled (Needs to be inherent from SCR_BaseEntityCatalogData)
needsAllIncludedIf true included List all needs to be true, if false any needs to be true
Returns
List size

◆ GetFullFilteredEntityListWithLabels()

int SCR_EntityCatalog.GetFullFilteredEntityListWithLabels ( notnull out array< SCR_EntityCatalogEntry filteredEntityList,
array< EEditableEntityLabel >  includedLabels = null,
array< EEditableEntityLabel >  excludedLabels = null,
bool  needsAllIncluded = true 
)

Get list of entities that all contain all/any the included labels and NONE exclude labels Ignores Disabled Entries as well Sometimes it is quicker to get the index (entityList[i].GetCatalogIndex()) and use the GetCatalogEntry() directly as it saves looping through the list and you don't need to save a ref to the list you got.

Parameters
[out]filteredEntityListFilltered array of enabled entity
includedLabelsA list of labels the entity needs all/any to have. Can be null if exclusive is filled
excludedLabelsA list of labels the entity CANNOT have ANY of. Can be null if inclusive is filled
needsAllIncludedIf true included List all needs to be true, if false any needs to be true
Returns
List size

◆ InitCatalog()

void SCR_EntityCatalog.InitCatalog ( )

Implemented in SCR_EntityCatalogMultiList.

◆ MergeCatalogs()

void SCR_EntityCatalog.MergeCatalogs ( notnull SCR_EntityCatalog  catalogToMerge)

Merge the given catalog into this catalog.

Used on init to create one coherent list of each catalog type

Parameters
catalogToMergeGiven catalog to merge into this one

◆ PostInitCatalog()

void SCR_EntityCatalog.PostInitCatalog ( )
protected

Member Data Documentation

◆ m_aEntityEntryList

ref array<ref SCR_EntityCatalogEntry> SCR_EntityCatalog.m_aEntityEntryList
protected

◆ m_eEntityCatalogType

EEntityCatalogType SCR_EntityCatalog.m_eEntityCatalogType
protected

◆ m_mPrefabIndexes

ref map<ResourceName, int> SCR_EntityCatalog.m_mPrefabIndexes = new map<ResourceName, int>()
protected

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