8 protected ResourceName m_sEntityPrefab;
10 [
Attribute(
"1",
desc:
"Allows to disable the Entity data. It will be removed from the array on init if it is disabled and can never be obtained. Used for specific gamemodes and modding.")]
11 protected bool m_bEnabled;
13 [
Attribute(
desc:
"List of specific Data for the entity. Each element should be an unique class (Unless all but one are disabled). This list is static and should not be changed in runtime.")]
14 protected ref array<ref SCR_BaseEntityCatalogData> m_aEntityDataList;
17 protected int m_iCatalogIndex = -1;
20 protected ref
SCR_UIInfo m_EditableEntityUiInfo;
43 return m_iCatalogIndex;
51 ResourceName GetPrefab()
53 return m_sEntityPrefab;
63 return m_CatalogParent;
76 return m_EditableEntityUiInfo;
87 if (!GetEntityUiInfo())
90 return GetEntityUiInfo().GetName();
101 int GetEditableEntityLabels(notnull out array<EEditableEntityLabel> editableEntityLables)
103 editableEntityLables.Clear();
109 return editableUiInfo.GetEntityLabels(editableEntityLables);
125 return editableUiInfo.HasEntityLabel(editableEntityLabel);
135 bool HasAnyEditableEntityLabels(notnull array<EEditableEntityLabel> editableEntityLables)
143 if (editableUiInfo.HasEntityLabel(label))
157 bool HasAllEditableEntityLabels(notnull array<EEditableEntityLabel> editableEntityLables)
165 if (!editableUiInfo.HasEntityLabel(label))
185 if (entityData.IsEnabled() && entityData.Type() == dataType)
199 int GetEntityDataList(notnull out array<SCR_BaseEntityCatalogData> entityDataList)
202 entityDataList.Clear();
208 if (entityData.IsEnabled())
209 entityDataList.Insert(entityData);
212 return entityDataList.Count();
222 bool HasEntityDataOfType(
typename dataType)
227 if (entityData.IsEnabled() && entityData.Type() == dataType)
240 bool HasAllEntityDataOfTypes(array<typename> dataTypes)
243 foreach (
typename dataType: dataTypes)
245 if (!HasEntityDataOfType(dataType))
258 bool HasAnyEntityDataOfTypes(array<typename> dataTypes)
261 foreach (
typename dataType: dataTypes)
263 if (HasEntityDataOfType(dataType))
281 if (GetCatalogIndex() == -1)
282 m_iCatalogIndex = catalogIndex;
285 m_CatalogParent = catalog;
291 array<SCR_BaseEntityCatalogData> entityDataList = {};
292 GetEntityDataList(entityDataList);
302 protected void ClassSpecificInit()
305 if (m_EditableEntityUiInfo !=
null)
309 Resource entityPrefab = Resource.Load(GetPrefab());
320 if (!editableEntitySource)