7 [
Attribute(
desc:
"An array of all multi lists which in turn hold lists of entries. Used for readablility for devs and each works the same as the m_aEntityEntryList. You are free to make, delete, rename and move lists as you want and names do not need to be unique. Note that this array will be null after Init as it will be merged into the m_aEntityEntryList")]
8 protected ref array <ref SCR_EntityCatalogMultiListEntry> m_aMultiLists;
14 foreach (SCR_EntityCatalogMultiListEntry multiList:
m_aMultiLists)
19 if (!entry.IsEnabled())
22 m_aEntityEntryList.Insert(entry);
36 class SCR_EntityCatalogMultiListEntry
38 [
Attribute(
"UNKNOWN",
desc:
"For devs only to understand which entries are in the list")]
41 [
Attribute(
desc:
"List of entries. This list will be merged into the m_aEntityEntryList on init. You can still add entries to the m_aEntityEntryList as those will NOT be cleared")]
42 ref array<ref SCR_EntityCatalogEntry> m_aEntities;
49 protected string m_sEntityListName;
51 void SCR_BaseContainerCustomEntityCatalogMultiListEntry(
string propertyName,
string entityListName)
54 m_sEntityListName = entityListName;
59 bool hasError =
false;
67 array<ref SCR_EntityCatalogEntry> entityList;
68 if (!source.Get(m_sEntityListName, entityList))
76 if (entity.IsEnabled())
81 if (entity.GetPrefab() ==
"")
88 if (enabledCount == entityList.Count())
92 format =
"%1 (%3 of %2)";
97 title =
string.Format(format, propertyName, entityList.Count(), enabledCount);