Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EntityCatalog.c
Go to the documentation of this file.
1 /*
2 //~ USE CASE EXAMPLE
3 protected void Example()
4 {
5 //-------- Get from manager --------\\
6
7 //~ The SCR_EntityCatalogManagerComponent on the GameMode can get general catalogs as well as faction catalogs
8 // It also allows to get Entry from Prefab with extensive functions
9
10 SCR_EntityCatalogManagerComponent entityCatalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
11 if (!entityCatalogManager)
12 return;
13
14 SCR_EntityCatalog entityCatalog = entityCatalogManager.GetEntityCatalogOfType(EEntityCatalogType.VEHICLE);
15 if (!entityCatalog)
16 return;
17
18 //~ Can also get it from faction (Though getting it directly from faction is slighty cheaper)
19 SCR_EntityCatalog entityCatalog = entityCatalogManager.GetFactionEntityCatalogOfType(EEntityCatalogType.VEHICLE, "US");
20 if (!entityCatalog)
21 return;
22
23 //~ There area also many direct search functions if you have the prefab. (Note that it can be quite performance intensive so use when needed)
24 //~ See below for more info about SCR_EntityCatalogEntry
25 //~ Faction can be given if you first want to check a specific faction as it is more likly it is in there (To save an more extensive search)
26 SCR_EntityCatalogEntry entry = entityCatalogManager.GetEntryWithPrefabFromAnyCatalog(EEntityCatalogType.VEHICLE, ResourceName prefabToFind, SCR_Faction);
27
28 //-------
29
30 //-------- Get directly from faction --------\\
31
32 //~ You can get the catalog from faction
33 FactionManager factionManager = GetGame().GetFactionManager();
34 if (!factionManager)
35 return;
36
37 SCR_Faction faction = SCR_Faction.Cast(factionManager.GetFactionByKey("US"));
38 if (!faction)
39 return;
40
41 SCR_EntityCatalog entityCatalog = faction.GetFactionEntityCatalogOfType(EEntityCatalogType.VEHICLE);
42 if (!entityCatalog)
43 return;
44
45 //-------
46
47 //-------- Get list of entity data --------\\
48
49 //~ You can simply get all entries regardless if they have any specific data class
50 array<SCR_EntityCatalogEntry> entityList = {};
51 int count = entityCatalog.GetEntityList(entityList);
52 Print(count);
53
54 //-------
55
56 //-------- Filtering Entries list - Specific Labels --------\\
57 The system is compatible with Editable Entities and it is possible to get the name of the entity as well as lables
58 (For non-editable entities you can set the same variables using the SCR_EntityCatalogEntryNonEditable class)
59
60
61 //~ Get a list of all entries within catalog that have the given Label
62 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
63 int count = entityCatalog.GetEntityListWithLabel(EEditableEntityLabel.FACTION_US, filteredSpawnerEntityList);
64 Print(count);
65
66 //~ Get a list of all entries within catalog that do not have the given Label
67 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
68 int count = entityCatalog.GetEntityListExcludingLabel(EEditableEntityLabel.FACTION_USSR, filteredSpawnerEntityList);
69 Print(count);
70
71 //~You can also do a full filter. This will get you all the enties that have all/any of the include labels and none of the exclude labels.
72 array<EEditableEntityLabel> includedLabels = {}; //~ Note: Inclusive can be null if exclusive is filled
73 includedLabels.Insert(EEditableEntityLabel.FACTION_US);
74
75 array<EEditableEntityLabel> excludedLabels = {}; //~ Note: exclusive can be null if Inclusive is filled
76 excludedLabels.Insert(EEditableEntityLabel.FACTION_USSR);
77
78 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
79 int count = entityCatalog.GetFullFilteredEntityListWithLabels(filteredSpawnerEntityList, includedLabels, excludedLabels);
80 Print(count);
81
82 //-------
83
84 //-------- Filtering Entries list - Specific Data types --------\\
85 The system is also able to filter entries on specific data type in the data array (Data needs to be inherented from SCR_BaseEntityCatalogData)
86
87 //~ Get a list of all entries within catalog that have the given data class (In this cause it is the SCR_EntityCatalogSpawnerData class)
88 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
89 int count = entityCatalog.GetEntityListWithData(SCR_EntityCatalogSpawnerData, filteredSpawnerEntityList);
90 Print(count);
91
92 //~ You can get a list that excludes a specific data class
93 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
94 int count = entityCatalog.GetEntityListExcludingLabel(SCR_EntityCatalogSpawnerData, filteredSpawnerEntityList);
95 Print(count);
96
97 //~You can also do a full filter. This will get you all the enties that have all/any of the include data type and none of the exclude Data type.
98 array<typename> includedDataClasses = {}; //~ Note: Inclusive can be null if exclusive is filled
99 includedDataClasses.Insert(SCR_EntityCatalogSpawnerData);
100
101 array<typename> excludedDataClasses = {}; //~ Note: exclusive can be null if Inclusive is filled
102 excludedDataClasses.Insert(SCR_EntityCatalogLoadoutData);
103
104 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
105 int count = entityCatalog.GetFullFilteredEntityListWithData(filteredSpawnerEntityList, includedDataClasses, excludedDataClasses);
106 Print(count);
107
108
109 //-------
110
111 //-------- Filtering Entries list - Labels and data --------\\
112 Lastly you can do an ultimate filter with both labels and data.
113
114 array<EEditableEntityLabel> includedLabels = {}; //~ Note: Inclusive can be null if exclusive is filled
115 includedLabels.Insert(EEditableEntityLabel.FACTION_US);
116
117 array<EEditableEntityLabel> excludedLabels = {}; //~ Note: exclusive can be null if Inclusive is filled
118 excludedLabels.Insert(EEditableEntityLabel.FACTION_USSR);
119
120 array<typename> includedDataClasses = {}; //~ Note: Inclusive can be null if exclusive is filled
121 includedDataClasses.Insert(SCR_EntityCatalogSpawnerData);
122
123 array<typename> excludedDataClasses = {}; //~ Note: exclusive can be null if Inclusive is filled
124 excludedDataClasses.Insert(SCR_EntityCatalogLoadoutData);
125
126 array<SCR_EntityCatalogEntry> filteredSpawnerEntityList = {};
127 int count = entityCatalog.GetFullFilteredEntityList(filteredSpawnerEntityList, includedLabels, excludedLabels, includedDataClasses, excludedDataClasses);
128 Print(count);
129
130 //-------
131
132
133 //-------- Entry Entity Functions --------\\
134 In the example we simply get the index from the list above. With it we can quicly obtain the information we want
135
136 //~ Getting the Catalog Index from filtered entity
137 int catalogIndex = filteredSpawnerEntityList[someIndex].GetCatalogIndex();
138
139 //~ You now got the entry directly from the catalog
140 SCR_EntityCatalogEntry catalogEntry = entityCatalog.GetCatalogEntry(catalogIndex);
141
142 //~ This allows you to Get the prefab
143 ResourceName prefab = catalogEntry.GetPrefab();
144 Print(prefab);
145
146 //~ Get Data
147 SCR_EntityCatalogSpawnerData entitySpawnerData = SCR_EntityCatalogSpawnerData.Cast(catalogEntry.GetEntityDataOfType(SCR_EntityCatalogSpawnerData)); //~ Cast to Desired Type
148 Print(entitySpawnerData);
149
150 //~ Get Entity UI Info
151 SCR_UIInfo uiInfo = catalogEntry.GetEntityUiInfo();
152 Print(uiInfo);
153
154 //~ Get Entity Name
155 LocalizedString name = catalogEntry.GetEntityName();
156 Print(name);
157
158 //~ Get Entity Labels
159 array<EEditableEntityLabel> labels = {};
160 int count = catalogEntry.GetEditableEntityLabels(labels);
161
162 //~ Do various label functions
163 catalogEntry.HasEditableEntityLabel();
164 catalogEntry.HasAnyEditableEntityLabels();
165 catalogEntry.HasAllEditableEntityLabels();
166
167 //~ Do various Data functions
168 catalogEntry.GetEntityDataOfType();
169 catalogEntry.HasEntityDataOfType();
170 catalogEntry.HasAllEntityDataOfTypes();
171 catalogEntry.HasAnyEntityDataOfTypes();
172
173 //-------
174 */
175
176
180[BaseContainerProps(configRoot: true), SCR_BaseContainerCustomEntityCatalogCatalog(EEntityCatalogType, "m_eEntityCatalogType", "m_aEntityEntryList", "m_aMultiLists")]
182{
183 [Attribute("0", desc: "Type of the Catalog", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EEntityCatalogType))]
185
186 [Attribute(desc: "List of all entities of the given type (Note that this list can still be used if using the 'SCR_EntityCatalogMultiList' Class. All entries in the multi lists will be merged into this one on init including the entries already in it)")]
187 protected ref array<ref SCR_EntityCatalogEntry> m_aEntityEntryList;
188
189 //~ A map of all prefabs with the linked index for quicker getting the prefab data
191
192 //======================================== TYPE ========================================\\
193
201
202 //======================================== ENTITY ENTRY GETTER ========================================\\
203 //--------------------------------- Get Entity List ---------------------------------\\
204
207 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
208 \param[out] entityList Array of enabled entity list
209 \return List size
210 */
211 int GetEntityList(notnull out array<SCR_EntityCatalogEntry> entityList)
212 {
213 //~ Clear Given list
214 entityList.Clear();
215
216 //~ Copy list
217 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
218 {
219 entityList.Insert(entityEntry);
220 }
221
222 return entityList.Count();
223 }
224
232 {
233 int index;
234
235 //~ Entry not found
236 if (!m_mPrefabIndexes.Find(prefabToFind, index))
237 return null;
238
239 //~ Somehow an invalid index
240 if (!m_aEntityEntryList.IsIndexValid(index))
241 return null;
242
243 //~ Return entry
245 }
246
247
248 //======================================== DIRECT ENTRY GETTERS WITH INDEX ========================================\\
249 //--------------------------------- Get Catalog Entry from Index ---------------------------------\\
250
257 {
258 //~ Invalid index
259 if (!m_aEntityEntryList.IsIndexValid(index))
260 {
261 Print(string.Format("'SCR_EntityCatalog' Function: 'GetCatalogEntry()'. index: '%1' is invalid for catalog type '%2'.", index, typename.EnumToString(EEntityCatalogType, m_eEntityCatalogType)), LogLevel.ERROR);
262 return null;
263 }
264
265 //~ Return Entry
267 }
268
269 //======================================== ENTITY ENTRY GETTER WITH LABELS ========================================\\
270 //--------------------------------- Get Entity List with Label ---------------------------------\\
271
279 int GetEntityListWithLabel(EEditableEntityLabel label, notnull out array<SCR_EntityCatalogEntry> filteredEntityList)
280 {
281 //~ Clear Given list
282 filteredEntityList.Clear();
283
284 //~ Copy list
286 {
287 //~ Does not have label
288 if (!entityEntry.HasEditableEntityLabel(label))
289 continue;
290
291 //~ Add to list
292 filteredEntityList.Insert(entityEntry);
293 }
294
295 return filteredEntityList.Count();
296 }
297
298 //--------------------------------- Get Entity List WITHOUT Fata type ---------------------------------\\
299
307 int GetEntityListExcludingLabel(EEditableEntityLabel excludinglabel, notnull out array<SCR_EntityCatalogEntry> filteredEntityList)
308 {
309 //~ Clear Given list
310 filteredEntityList.Clear();
311
312 //~ Copy list
314 {
315 //~ HAS the label so do not add it to the list
316 if (entityEntry.HasEditableEntityLabel(excludinglabel))
317 continue;
318
319 //~ Add to list
320 filteredEntityList.Insert(entityEntry);
321 }
322
323 return filteredEntityList.Count();
324 }
325
326 //--------------------------------- Get Full Filtered Entity List with Labels ---------------------------------\\
327
337 int GetFullFilteredEntityListWithLabels(notnull out array<SCR_EntityCatalogEntry> filteredEntityList, array<EEditableEntityLabel> includedLabels = null, array<EEditableEntityLabel> excludedLabels = null, bool needsAllIncluded = true)
338 {
339 //~ Clear Given list
340 filteredEntityList.Clear();
341
342 //~ Copy list
343 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
344 {
345 //~ If entity has any of the given exclude continue to next
346 if (excludedLabels != null && !excludedLabels.IsEmpty() && entityEntry.HasAnyEditableEntityLabels(excludedLabels))
347 continue;
348
349 //~ Check included labels
350 if (includedLabels != null && !includedLabels.IsEmpty())
351 {
352 //~ Needs all included
353 if (needsAllIncluded)
354 {
355 if (!entityEntry.HasAllEditableEntityLabels(includedLabels))
356 continue;
357 }
358 //~ Needs any included
359 else
360 {
361 if (!entityEntry.HasAnyEditableEntityLabels(includedLabels))
362 continue;
363 }
364 }
365
366 //~ Add to list
367 filteredEntityList.Insert(entityEntry);
368 }
369
370 return filteredEntityList.Count();
371 }
372
373 //======================================== ENTITY ENTRY GETTER WITH DATA TYPES ========================================\\
374 //--------------------------------- Get Entity List with Data type ---------------------------------\\
375
384 int GetEntityListWithData(typename dataClass, notnull out array<SCR_EntityCatalogEntry> filteredEntityList, out array<SCR_BaseEntityCatalogData> dataList = null)
385 {
386 //~ Clear Given list
387 filteredEntityList.Clear();
388
389 //~ If returning datalist also clear
390 if (dataList)
391 dataList.Clear();
392
394
395 //~ Copy list
396 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
397 {
398 data = entityEntry.GetEntityDataOfType(dataClass);
399
400 if (!data)
401 continue;
402
403 if (dataList)
404 dataList.Insert(data);
405
406 //~ Add to list
407 filteredEntityList.Insert(entityEntry);
408 }
409
410 return filteredEntityList.Count();
411 }
412
413 //--------------------------------- Get Entity List WITHOUT Data type ---------------------------------\\
414
422 int GetEntityListExcludingData(typename excludingDataClass, notnull out array<SCR_EntityCatalogEntry> filteredEntityList)
423 {
424 //~ Clear Given list
425 filteredEntityList.Clear();
426
427 //~ Copy list
428 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
429 {
430 //~ HAS the data type so do not add it to the list
431 if (entityEntry.HasEntityDataOfType(excludingDataClass))
432 continue;
433
434 //~ Add to list
435 filteredEntityList.Insert(entityEntry);
436 }
437
438 return filteredEntityList.Count();
439 }
440
441 //--------------------------------- Get Full Filtered Entity List with Data Type ---------------------------------\\
442
452 int GetFullFilteredEntityListWithData(notnull out array<SCR_EntityCatalogEntry> filteredEntityList, array<typename> includedDataClasses = null, array<typename> excludedDataClasses = null, bool needsAllIncluded = true)
453 {
454 //~ Clear Given list
455 filteredEntityList.Clear();
456
457 //~ Copy list
458 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
459 {
460 //~ If entity has any of the given exclude continue to next
461 if (excludedDataClasses != null && !excludedDataClasses.IsEmpty() && entityEntry.HasAnyEntityDataOfTypes(excludedDataClasses))
462 continue;
463
464 //~ Check included labels
465 if (includedDataClasses != null && !includedDataClasses.IsEmpty())
466 {
467 //~ Needs all included
468 if (needsAllIncluded)
469 {
470 if (!entityEntry.HasAllEntityDataOfTypes(includedDataClasses))
471 continue;
472 }
473 //~ Needs any included
474 else
475 {
476 if (!entityEntry.HasAnyEntityDataOfTypes(includedDataClasses))
477 continue;
478 }
479 }
480
481 //~ Add to list
482 filteredEntityList.Insert(entityEntry);
483 }
484
485 return filteredEntityList.Count();
486 }
487
488 //======================================== Get full filtered list ========================================\\
489 //--------------------------------- Get Full Filtered Entity List ---------------------------------\\
490
503 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)
504 {
505 //~ Clear Given list
506 filteredEntityList.Clear();
507
508 //~ Copy list
509 foreach (SCR_EntityCatalogEntry entityEntry: m_aEntityEntryList)
510 {
511 //~ If entity has any of the given exclude labels continue to next
512 if (excludedLabels != null && !excludedLabels.IsEmpty() && entityEntry.HasAnyEditableEntityLabels(excludedLabels))
513 continue;
514
515 //~ If entity has any of the given exclude classes continue to next
516 if (excludedDataClasses != null && !excludedDataClasses.IsEmpty() && entityEntry.HasAnyEntityDataOfTypes(excludedDataClasses))
517 continue;
518
519 //~ Check included labels
520 if (includedLabels != null && !includedLabels.IsEmpty())
521 {
522 //~ Needs all included
523 if (needsAllIncludedLabels)
524 {
525 if (!entityEntry.HasAllEditableEntityLabels(includedLabels))
526 continue;
527 }
528 //~ Needs any indluded
529 else
530 {
531 if (!entityEntry.HasAnyEditableEntityLabels(includedLabels))
532 continue;
533 }
534 }
535
536 //~ If entity has none of the given include continue to next
537 if (includedDataClasses != null && !includedDataClasses.IsEmpty())
538 {
539 if (needsAllIncludedClasses)
540 {
541 if (!entityEntry.HasAllEntityDataOfTypes(includedDataClasses))
542 continue;
543 }
544 else
545 {
546 if (!entityEntry.HasAnyEntityDataOfTypes(includedDataClasses))
547 continue;
548 }
549 }
550
551 //~ Add to list
552 filteredEntityList.Insert(entityEntry);
553 }
554
555 return filteredEntityList.Count();
556 }
557
558 //======================================== MERGE CATALOGS ========================================\\
559
564 void MergeCatalogs(notnull SCR_EntityCatalog catalogToMerge)
565 {
566 array<SCR_EntityCatalogEntry> entityList = {};
567 catalogToMerge.GetEntityList(entityList);
568
569 //~ Add the entry
570 foreach(SCR_EntityCatalogEntry entry : entityList)
571 {
572 m_aEntityEntryList.Insert(entry);
573 }
574
575 //~ Merge multi lists
576 SCR_EntityCatalogMultiList multiListClass = SCR_EntityCatalogMultiList.Cast(catalogToMerge);
577 if (multiListClass)
578 {
579 array <SCR_EntityCatalogMultiListEntry> multiLists = {};
580 multiListClass.GetMultiList(multiLists);
581
582 foreach (SCR_EntityCatalogMultiListEntry multiList : multiLists)
583 {
584 foreach (SCR_EntityCatalogEntry entry : multiList.m_aEntities)
585 {
586 m_aEntityEntryList.Insert(entry);
587 }
588 }
589 }
590
591 catalogToMerge.ClearCatalogOnMerge();
592 }
593
594 //---- REFACTOR NOTE START: Has a call later as it needs to initialize all other lists need to be initialized before the post init should be called ----
595 //======================================== INIT ========================================\\
596 void InitCatalog()
597 {
598 //~ Init data for entries
599 for (int i = m_aEntityEntryList.Count() - 1; i >= 0; i--)
600 {
601 //~ Remove disabled entries on init
603 {
604 m_aEntityEntryList.RemoveOrdered(i);
605 continue;
606 }
607
608 //~ Call init
609 m_aEntityEntryList[i].InitEntry(this, i);
610 }
611
612 foreach (int idx, SCR_EntityCatalogEntry entry : m_aEntityEntryList)
613 {
614 m_mPrefabIndexes.Insert(entry.GetPrefab(), idx);
615 }
616
617 //~ Call post init one frame later for all entries to allow all Catalogs to be initialized before the post init is called on entries
618 GetGame().GetCallqueue().CallLater(PostInitCatalog);
619 }
620
621 //------------------------------------------------------------------------------------------------
622 protected void PostInitCatalog()
623 {
624 //~ Post Init data for entries
625 foreach (SCR_EntityCatalogEntry entry : m_aEntityEntryList)
626 {
627 entry.PostInitEntry(this);
628 }
629 }
630 //---- REFACTOR NOTE END ----
631
632 //------------------------------------------------------------------------------------------------
635 {
636 m_aEntityEntryList.Clear();
637 }
638};
639
640
642{
643 private typename m_EnumType;
644 private string m_PropertyName;
645 protected string m_sEntityListName;
646 protected string m_sEntityMultiListName;
647
648 //------------------------------------------------------------------------------------------------
649 void SCR_BaseContainerCustomEntityCatalogCatalog(typename enumType, string propertyName, string entityListName, string multiListName)
650 {
651 m_EnumType = enumType;
652 m_PropertyName = propertyName;
653 m_sEntityListName = entityListName;
654 m_sEntityMultiListName = multiListName;
655 }
656
657 //------------------------------------------------------------------------------------------------
658 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
659 {
660 bool hasError = false;
661
662 int enumValue;
663 if (!source.Get(m_PropertyName, enumValue))
664 {
665 return false;
666 }
667
668 int totalCount = 0;
669 int enabledCount = 0;
670
671 //~ Get entry count
672 array<ref SCR_EntityCatalogEntry> entityList;
673 if (!source.Get(m_sEntityListName, entityList))
674 return false;
675
676 foreach (SCR_EntityCatalogEntry entry: entityList)
677 {
678 if (entry.IsEnabled())
679 {
680 enabledCount++;
681
682 //~ Is Empty show error warning in title
683 if (entry.GetPrefab().IsEmpty())
684 hasError = true;
685 }
686
687 totalCount++;
688 }
689
690 array<ref SCR_EntityCatalogMultiListEntry> multiLists;
691 if (source.Get(m_sEntityMultiListName, multiLists))
692 {
693 foreach (SCR_EntityCatalogMultiListEntry multiList: multiLists)
694 {
695 foreach (SCR_EntityCatalogEntry entry : multiList.m_aEntities)
696 {
697 if (entry.IsEnabled())
698 {
699 enabledCount++;
700
701 //~ Is Empty show error warning in title
702 if (entry.GetPrefab().IsEmpty())
703 hasError = true;
704 }
705
706 totalCount++;
707 }
708 }
709 }
710
711 string format;
712 //~ Does not have disabled entries
713 if (enabledCount == totalCount)
714 format = "%1 (%2)";
715 //~ Has disabled entries
716 else
717 format = "%1 (%3 of %2)";
718
719 //~ Has empty prefabs
720 if (hasError)
721 format += " !!";
722
723 title = string.Format(format, typename.EnumToString(m_EnumType, enumValue), totalCount, enabledCount);
724 return true;
725 }
726};
EEditableEntityLabel
EEntityCatalogType
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Get all prefabs that have the spawner data
override void ClearCatalogOnMerge()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override bool _WB_GetCustomTitle(BaseContainer source, out string title)
void SCR_BaseContainerCustomEntityCatalogCatalog(typename enumType, string propertyName, string entityListName, string multiListName)
If is Enabled return If enabled or disabled *bool IsEnabled()
Get Prefab data return Prefab data *ResourceName GetPrefab()
ref map< ResourceName, int > m_mPrefabIndexes
SCR_EntityCatalogEntry GetEntryWithPrefab(ResourceName prefabToFind)
Get Catalog Entry of index Can ignores disabled entries param Index of entry within list return Catalog Entry Null if entry is disabled *SCR_EntityCatalogEntry GetCatalogEntry(int index)
Get Data type return Returns Catalog type of holder *EEntityCatalogType GetCatalogType()
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 \param[out] entityList Array of enabled entity list \return List size */int GetEntityList(notnull out array< SCR_EntityCatalogEntry > entityList)
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 if false any needs to be true return List size *int GetFullFilteredEntityListWithLabels(notnull out array< SCR_EntityCatalogEntry > filteredEntityList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, bool needsAllIncluded=true)
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 notnull out array< SCR_EntityCatalogEntry > filteredEntityList
EEntityCatalogType m_eEntityCatalogType
ref array< ref SCR_EntityCatalogEntry > m_aEntityEntryList
int GetMultiList(notnull out array< SCR_EntityCatalogMultiListEntry > multiLists)
Definition Types.c:486
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
int IsEnabled()
Returns true if the light is enabled.