Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EntityCatalogManagerComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "Manager for holding non-faction enities and to getter functions for entities from factions")]
4 {
5 }
6 
7 class SCR_EntityCatalogManagerComponent : SCR_BaseGameModeComponent
8 {
9  [Attribute(desc: "List of non-faction related Entity catalogs. Each holds a list of entity Prefab and data of a given type. Catalogs of the same type are merged into one. Note this array is moved to a map on init and set to null")]
10  protected ref array<ref SCR_EntityCatalog> m_aEntityCatalogs;
11 
12  //~ Catalog map for quicker obtaining the catalog using EEntityCatalogType
13  protected ref map<EEntityCatalogType, ref SCR_EntityCatalog> m_mEntityCatalogs = new map<EEntityCatalogType, ref SCR_EntityCatalog>();
14 
15  //~ Faction manager ref
17 
18  //~ Instance
19  protected static SCR_EntityCatalogManagerComponent s_Instance;
20 
21  protected bool m_bInitDone;
22 
23  //------------------------------------------------------------------------------------------------
25  static SCR_EntityCatalogManagerComponent GetInstance()
26  {
27  return s_Instance;
28  }
29 
30  //======================================== GET CATALOG ========================================\\
31 
32  //------------------------------------------------------------------------------------------------
38  {
39  if (!m_bInitDone)
40  {
41  Debug.Error2("SCR_EntityCatalogManagerComponent", "Trying to obtain catalog of type: '" + typename.EnumToString(EEntityCatalogType, catalogType) + "' (Factionless) but catalog is not yet initialized! Call your function one frame later!");
42  return null;
43  }
44 
45  //~ Get catalog
46  SCR_EntityCatalog entityCatalog = m_mEntityCatalogs.Get(catalogType);
47 
48  if (entityCatalog)
49  return entityCatalog;
50 
51  //~ No data found
52  Print(string.Format("'SCR_EntityCatalogManagerComponent' trying to get entity list of type '%1' but there is no catalog with that type.", typename.EnumToString(EEntityCatalogType, catalogType)), LogLevel.WARNING);
53  return null;
54  }
55 
56  //------------------------------------------------------------------------------------------------
63  {
64  if (!m_FactionManager)
65  return null;
66 
67  SCR_Faction faction = SCR_Faction.Cast(m_FactionManager.GetFactionByKey(factionKey));
68  if (!faction)
69  {
70  Print(string.Format("'SCR_EntityCatalogManagerComponent', GetFactionEntityCatalogOfType could not get Catalog as faction '%1' is invalid or does not exist in current game", factionKey), LogLevel.ERROR);
71  return null;
72  }
73 
74  return GetFactionEntityCatalogOfType(catalogType, faction);
75  }
76 
77  //------------------------------------------------------------------------------------------------
84  {
85  return faction.GetFactionEntityCatalogOfType(catalogType);
86  }
87 
88  //======================================== GET ALL CATALOGS ========================================\\
89 
90  //------------------------------------------------------------------------------------------------
95  int GetAllEntityCatalogs(notnull out array<SCR_EntityCatalog> outEntityCatalogs)
96  {
97  outEntityCatalogs.Clear();
98  foreach (SCR_EntityCatalog entityCatalog : m_mEntityCatalogs)
99  {
100  outEntityCatalogs.Insert(entityCatalog);
101  }
102 
103  return outEntityCatalogs.Count();
104  }
105 
106  //------------------------------------------------------------------------------------------------
113  int GetAllFactionEntityCatalogs(notnull out array<SCR_EntityCatalog> outEntityCatalogs, FactionKey factionKey)
114  {
115  if (!m_FactionManager)
116  return 0;
117 
118  SCR_Faction faction = SCR_Faction.Cast(m_FactionManager.GetFactionByKey(factionKey));
119  if (!faction)
120  {
121  Print(string.Format("'SCR_EntityCatalogManagerComponent', GetAllFactionEntityCatalogs could not get Catalog as faction '%1' is invalid or does not exist in current game", factionKey), LogLevel.ERROR);
122  return 0;
123  }
124 
125  return GetAllFactionEntityCatalogs(outEntityCatalogs, faction);
126  }
127 
128  //------------------------------------------------------------------------------------------------
134  int GetAllFactionEntityCatalogs(notnull out array<SCR_EntityCatalog> outEntityCatalogs, notnull SCR_Faction faction)
135  {
136  return faction.GetAllFactionEntityCatalogs(outEntityCatalogs);
137  }
138 
139  //======================================== GET SPECIFIC ENTRY WITH PREFAB ========================================\\
140 
141  //------------------------------------------------------------------------------------------------
149  {
150  //~ No prefab given
151  if (SCR_StringHelper.IsEmptyOrWhiteSpace(prefabToFind))
152  return null;
153 
154  //~ Get catalog
155  SCR_EntityCatalog catalog = GetEntityCatalogOfType(catalogType);
156  if (!catalog)
157  return null;
158 
159  //~ Try and find prefab
160  return catalog.GetEntryWithPrefab(prefabToFind);
161  }
162 
163  //------------------------------------------------------------------------------------------------
171  SCR_EntityCatalogEntry GetEntryWithPrefabFromFactionCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction)
172  {
173  //~ No prefab given
174  if (SCR_StringHelper.IsEmptyOrWhiteSpace(prefabToFind))
175  return null;
176 
177  //~ Get catalog
178  SCR_EntityCatalog catalog = GetFactionEntityCatalogOfType(catalogType, faction);
179  if (!catalog)
180  return null;
181 
182  //~ Try and find prefab
183  return catalog.GetEntryWithPrefab(prefabToFind);
184  }
185 
186  //------------------------------------------------------------------------------------------------
195  SCR_EntityCatalogEntry GetEntryWithPrefabFromGeneralOrFactionCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction, bool prioritizeGeneralCatalog = false)
196  {
197  //~ No prefab given
198  if (SCR_StringHelper.IsEmptyOrWhiteSpace(prefabToFind))
199  return null;
200 
201  SCR_EntityCatalogEntry foundEntry;
202 
203  //~ Search in faction first
204  if (!prioritizeGeneralCatalog)
205  {
206  //~ Search in faction
207  foundEntry = GetEntryWithPrefabFromFactionCatalog(catalogType, prefabToFind, faction);
208  if (foundEntry)
209  return foundEntry;
210 
211  //~ Search in general
212  foundEntry = GetEntryWithPrefabFromCatalog(catalogType, prefabToFind);
213  if (foundEntry)
214  return foundEntry;
215  }
216  //~ Search in general catalog first
217  else
218  {
219  //~ Search in faction
220  foundEntry = GetEntryWithPrefabFromCatalog(catalogType, prefabToFind);
221  if (foundEntry)
222  return foundEntry;
223 
224  //~ Search in general
225  foundEntry = GetEntryWithPrefabFromFactionCatalog(catalogType, prefabToFind, faction);
226  if (foundEntry)
227  return foundEntry;
228  }
229 
230  //~ Was not found
231  return null;
232  }
233 
234  //------------------------------------------------------------------------------------------------
243  SCR_EntityCatalogEntry GetEntryWithPrefabFromAnyCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, SCR_Faction priorityFaction = null, bool prioritizeGeneralOfPriorityFaction = false)
244  {
245  SCR_EntityCatalogEntry foundEntry;
246 
247  if (!prioritizeGeneralOfPriorityFaction)
248  {
249  //~ Search in priority faction first
250  if (priorityFaction)
251  {
252  foundEntry = GetEntryWithPrefabFromFactionCatalog(catalogType, prefabToFind, priorityFaction);
253  if (foundEntry)
254  return foundEntry;
255  }
256 
257  //~ Search in general
258  foundEntry = GetEntryWithPrefabFromCatalog(catalogType, prefabToFind);
259  if (foundEntry)
260  return foundEntry;
261  }
262  else
263  {
264  //~ Search in general first
265  foundEntry = GetEntryWithPrefabFromCatalog(catalogType, prefabToFind);
266  if (foundEntry)
267  return foundEntry;
268 
269  //~ Search in priority faction
270  if (priorityFaction)
271  {
272  foundEntry = GetEntryWithPrefabFromFactionCatalog(catalogType, prefabToFind, priorityFaction);
273  if (foundEntry)
274  return foundEntry;
275  }
276  }
277 
278  if (!m_FactionManager)
279  return null;
280 
281  //~ Search all faction (ignoring priorityFaction) and try to find the prefab
282  array<Faction> factions = {};
283  m_FactionManager.GetFactionsList(factions);
284 
285  foreach (Faction faction : factions)
286  {
287  SCR_Faction scrFaction = SCR_Faction.Cast(faction);
288 
289  //~ SCR_Faction not found or already searched
290  if (!scrFaction || scrFaction == priorityFaction)
291  continue;
292 
293  //~ Try and find the prefab
294  foundEntry = GetEntryWithPrefabFromFactionCatalog(catalogType, prefabToFind, scrFaction);
295  if (foundEntry)
296  return foundEntry;
297  }
298 
299  return null;
300  }
301 
302  //======================================== SPAWNER ========================================\\
303  //--------------------------------- Get List of valid prefabs for spawner ---------------------------------\\
304 
315  int GetFilteredEditorPrefabsOfAllFactions(EEntityCatalogType catalogType, EEditorMode editorMode, notnull out array<ResourceName> filteredPrefabsList, array<EEditableEntityLabel> includedLabels = null, array<EEditableEntityLabel> excludedLabels = null, bool needsAllIncludedLabels = true, bool getFactionLessPrefabs = false)
316  {
317  filteredPrefabsList.Clear();
318 
319  array<Faction> factions = {};
320 
321  //~ Get sorted factions
322  SCR_DelegateFactionManagerComponent delegateFactionManager = SCR_DelegateFactionManagerComponent.GetInstance();
323  if (delegateFactionManager)
324  {
325  SCR_SortedArray<SCR_EditableFactionComponent> sortedDelegates = new SCR_SortedArray<SCR_EditableFactionComponent>();
326  int count = delegateFactionManager.GetSortedFactionDelegates(sortedDelegates);
327 
328  //~ Get sorted factions
329  for(int i = 0; i < count; ++i)
330  {
331  factions.Insert(sortedDelegates.Get(i).GetFaction());
332  }
333 
334  }
335  //~ No delegate found so get factions from faction manager
336  else if (m_FactionManager)
337  {
338  m_FactionManager.GetFactionsList(factions);
339  }
340  //~ Could not find faction nor faction manager
341  else
342  {
343  return 0;
344  }
345 
346  array<ResourceName> filteredPrefabsOfFaction = {};
347  SCR_Faction scrFaction;
348 
349  //~ Get filtered prefabs of each faction
350  foreach (Faction faction : factions)
351  {
352  scrFaction = SCR_Faction.Cast(faction);
353  if (!scrFaction)
354  continue;
355 
356  GetFilteredEditorPrefabs(catalogType, editorMode, scrFaction, filteredPrefabsOfFaction, includedLabels, excludedLabels, needsAllIncludedLabels);
357  filteredPrefabsList.InsertAll(filteredPrefabsOfFaction);
358  }
359 
360  //~ Get filtered prefabs of factionless entries
361  if (getFactionLessPrefabs)
362  {
363  GetFilteredEditorPrefabs(catalogType, editorMode, null, filteredPrefabsOfFaction, includedLabels, excludedLabels, needsAllIncludedLabels);
364  filteredPrefabsList.InsertAll(filteredPrefabsOfFaction);
365  }
366 
367  return filteredPrefabsList.Count();
368  }
369 
370  //--------------------------------- Get List of valid prefabs for spawner ---------------------------------\\
371 
382  int GetFilteredEditorPrefabs(EEntityCatalogType catalogType, EEditorMode editorMode, SCR_Faction faction, notnull out array<ResourceName> filteredPrefabsList, array<EEditableEntityLabel> includedLabels = null, array<EEditableEntityLabel> excludedLabels = null, bool needsAllIncludedLabels = true)
383  {
384  SCR_EntityCatalog catalog;
385  filteredPrefabsList.Clear();
386 
387  //~ Get the catalog from faction or factionless
388  if (faction)
389  catalog = GetFactionEntityCatalogOfType(catalogType, faction);
390  else
391  catalog = GetEntityCatalogOfType(catalogType);
392 
393  //~ No catalog found
394  if (!catalog)
395  return 0;
396 
397  array<SCR_EntityCatalogEntry> filteredEntityList = {};
398  array<typename> filterClassArray = {};
399  filterClassArray.Insert(SCR_EntityCatalogEditorData);
400 
401  catalog.GetFullFilteredEntityList(filteredEntityList, includedLabels, excludedLabels, filterClassArray, needsAllIncludedLabels: needsAllIncludedLabels);
402 
403  SCR_EntityCatalogEditorData editorData;
404 
405  //~ Get all valid prefabs for mode
406  foreach (SCR_EntityCatalogEntry entry : filteredEntityList)
407  {
408  editorData = SCR_EntityCatalogEditorData.Cast(entry.GetEntityDataOfType(SCR_EntityCatalogEditorData));
409 
410  //~ Ignore entries not valid in current editor mode
411  if (!editorData.IsValidInEditorMode(editorMode))
412  continue;
413 
414  //~ Add the prefab to the array
415  filteredPrefabsList.Insert(entry.GetPrefab());
416  }
417 
418  return filteredPrefabsList.Count();
419  }
420 
421  //======================================== ARSENAL ========================================\\
422 
423  //------------------------------------------------------------------------------------------------
431  bool GetArsenalItems(out array<SCR_ArsenalItem> arsenalItems, SCR_EArsenalItemType typeFilter = -1, SCR_EArsenalItemMode modeFilter = -1, EArsenalItemDisplayType requiresDisplayType = -1)
432  {
433  arsenalItems.Clear();
434 
436  if (!itemCatalog)
437  return false;
438 
439  return GetArsenalItems(arsenalItems, itemCatalog, typeFilter, modeFilter, requiresDisplayType);
440  }
441 
442  //------------------------------------------------------------------------------------------------
451  bool GetFactionArsenalItems(out array<SCR_ArsenalItem> arsenalItems, SCR_Faction faction, SCR_EArsenalItemType typeFilter = -1, SCR_EArsenalItemMode modeFilter = -1, EArsenalItemDisplayType requiresDisplayType = -1)
452  {
453  arsenalItems.Clear();
454 
456  if (!itemCatalog)
457  return false;
458 
459  return GetArsenalItems(arsenalItems, itemCatalog, typeFilter, modeFilter, requiresDisplayType);
460  }
461 
462  //------------------------------------------------------------------------------------------------
470  protected bool GetArsenalItems(out array<SCR_ArsenalItem> arsenalItems, notnull SCR_EntityCatalog itemCatalog, SCR_EArsenalItemType typeFilter = -1, SCR_EArsenalItemMode modeFilter = -1, EArsenalItemDisplayType requiresDisplayType = -1)
471  {
472  array<SCR_EntityCatalogEntry> arsenalEntries = {};
473  array<SCR_BaseEntityCatalogData> arsenalDataList = {};
474  itemCatalog.GetEntityListWithData(SCR_ArsenalItem, arsenalEntries, arsenalDataList);
475 
476  SCR_ArsenalItem arsenalItem;
477 
478  foreach (SCR_BaseEntityCatalogData arsenalData: arsenalDataList)
479  {
480  //~ Get Arsenal data
481  arsenalItem = SCR_ArsenalItem.Cast(arsenalData);
482 
483  //~ Does not have type so skip
484  if (typeFilter != -1 && !SCR_Enum.HasPartialFlag(arsenalItem.GetItemType(), typeFilter))
485  continue;
486 
487  //~ Does not have mode so skip
488  if (modeFilter != -1 && !SCR_Enum.HasPartialFlag(arsenalItem.GetItemMode(), modeFilter))
489  continue;
490 
491  //~ Get if has display data, ignore if it doesn't
492  if (requiresDisplayType != -1 && !arsenalItem.GetDisplayDataOfType(requiresDisplayType))
493  continue;
494 
495  arsenalItems.Insert(arsenalItem);
496  }
497 
498  return !arsenalItems.IsEmpty();
499  }
500 
501  //------------------------------------------------------------------------------------------------
509  int GetAllArsenalItems(out array<SCR_ArsenalItem> allArsenalItems, SCR_EArsenalItemType typeFilter = -1, SCR_EArsenalItemMode modeFilter = -1, EArsenalItemDisplayType requiresDisplayType = -1)
510  {
511  allArsenalItems.Clear();
512 
513  array<Faction> factions = {};
514  m_FactionManager.GetFactionsList(factions);
515  SCR_Faction scrFaction;
516  array<SCR_ArsenalItem> arsenalItems = {};
517 
518  foreach (Faction faction : factions)
519  {
520  scrFaction = SCR_Faction.Cast(faction);
521  if (!scrFaction)
522  continue;
523 
524  GetFactionArsenalItems(arsenalItems, scrFaction, typeFilter, modeFilter, requiresDisplayType);
525  allArsenalItems.InsertAll(arsenalItems);
526  }
527 
528  GetArsenalItems(arsenalItems, typeFilter, modeFilter, requiresDisplayType);
529  allArsenalItems.InsertAll(arsenalItems);
530 
531  return allArsenalItems.Count();
532  }
533 
534  //------------------------------------------------------------------------------------------------
541  array<SCR_ArsenalItem> GetFilteredArsenalItems(SCR_EArsenalItemType typeFilter, SCR_EArsenalItemMode modeFilter, SCR_Faction faction = null, EArsenalItemDisplayType requiresDisplayType = -1)
542  {
543  array<SCR_ArsenalItem> refFilteredItems = {};
544  array<SCR_ArsenalItem> filteredItems = {};
545 
546  if (faction)
547  GetFactionArsenalItems(refFilteredItems, faction, typeFilter, modeFilter, requiresDisplayType);
548  else
549  GetArsenalItems(refFilteredItems, typeFilter, modeFilter, requiresDisplayType);
550 
551  foreach (SCR_ArsenalItem item : refFilteredItems)
552  {
553  filteredItems.Insert(item);
554  }
555 
556  return filteredItems;
557  }
558 
559  //======================================== INIT ========================================\\
560 
561  //------------------------------------------------------------------------------------------------
565  static void InitCatalogs(notnull array<ref SCR_EntityCatalog> entityCatalogArray, notnull map<EEntityCatalogType, ref SCR_EntityCatalog> entityCatalogMap)
566  {
567  SCR_EntityCatalog foundCatalog;
568 
569  //~ Move catalogs to map for quicker processing
570  foreach (SCR_EntityCatalog entityCatalog : entityCatalogArray)
571  {
572  //~ Catalog not part of map so add it
573  if (!entityCatalogMap.Find(entityCatalog.GetCatalogType(), foundCatalog))
574  entityCatalogMap.Insert(entityCatalog.GetCatalogType(), entityCatalog);
575  //~ Catalog is part of map so merge them
576  else
577  foundCatalog.MergeCatalogs(entityCatalog);
578  }
579  }
580 
581  //------------------------------------------------------------------------------------------------
582  override void EOnInit(IEntity owner)
583  {
584  m_FactionManager = SCR_FactionManager.Cast(GetGame().GetFactionManager());
585  if (!m_FactionManager)
586  Debug.Error2("SCR_EntityCatalogManagerComponent", "Could not find SCR_FactionManager, this is required for many the Getter Functions!");
587 
588  //~ Init the catalog
589  InitCatalogs(m_aEntityCatalogs, m_mEntityCatalogs);
590 
591  m_bInitDone = true;
592 
593  //~ Clear array as no longer needed
594  m_aEntityCatalogs = null;
595  }
596 
597  //------------------------------------------------------------------------------------------------
598  override void OnPostInit(IEntity owner)
599  {
600  if (SCR_Global.IsEditMode())
601  return;
602 
603  if (s_Instance)
604  {
605  Print("More than one 'SCR_EntityCatalogManagerComponent' excist in the world! Make sure there is only 1!", LogLevel.ERROR);
606  return;
607  }
608 
609  //~ Set instance
610  s_Instance = this;
611 
612  SetEventMask(owner, EntityEvent.INIT);
613  }
614 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_Enum
Definition: SCR_Enum.c:1
SCR_BaseEntityCatalogData
Definition: SCR_BaseEntityCatalogData.c:5
GetAllFactionEntityCatalogs
int GetAllFactionEntityCatalogs(notnull out array< SCR_EntityCatalog > outEntityCatalogs, FactionKey factionKey)
Definition: SCR_EntityCatalogManagerComponent.c:113
SCR_EntityCatalogManagerComponentClass
Manager for non-faction specific entity catalogs as well as getters for faction specific catalogs.
Definition: SCR_EntityCatalogManagerComponent.c:3
GetInstance
SCR_TextsTaskManagerComponentClass ScriptComponentClass GetInstance()
Definition: SCR_TextsTaskManagerComponent.c:50
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GetEntryWithPrefabFromFactionCatalog
SCR_EntityCatalogEntry GetEntryWithPrefabFromFactionCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction)
Definition: SCR_EntityCatalogManagerComponent.c:171
SCR_EArsenalItemMode
SCR_EArsenalItemMode
Definition: SCR_EArsenalItemMode.c:1
EEntityCatalogType
EEntityCatalogType
Definition: EEntityCatalogType.c:4
SCR_StringHelper
Definition: SCR_StringHelper.c:1
GetFactionArsenalItems
bool GetFactionArsenalItems(out array< SCR_ArsenalItem > arsenalItems, SCR_Faction faction, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, EArsenalItemDisplayType requiresDisplayType=-1)
Definition: SCR_EntityCatalogManagerComponent.c:451
m_aEntityCatalogs
protected ref array< ref SCR_EntityCatalog > m_aEntityCatalogs
Definition: SCR_Faction.c:50
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_EArsenalItemType
SCR_EArsenalItemType
Definition: SCR_EArsenalItemType.c:2
s_Instance
SCR_SpawnerSlotManagerClass s_Instance
Class used for managing changes and removals of slots present in world.
m_FactionManager
protected SCR_FactionManager m_FactionManager
Definition: SCR_NotificationSenderComponent.c:28
GetEntryWithPrefabFromCatalog
SCR_EntityCatalogEntry GetEntryWithPrefabFromCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind)
Definition: SCR_EntityCatalogManagerComponent.c:148
SCR_EntityCatalogEditorData
Info for which editor modes the entity is added to.
Definition: SCR_EntityCatalogEditorData.c:3
GetFactionEntityCatalogOfType
SCR_EntityCatalog GetFactionEntityCatalogOfType(EEntityCatalogType catalogType, FactionKey factionKey)
Definition: SCR_EntityCatalogManagerComponent.c:62
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_EntityCatalogManagerComponent.c:598
GetAllArsenalItems
int GetAllArsenalItems(out array< SCR_ArsenalItem > allArsenalItems, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, EArsenalItemDisplayType requiresDisplayType=-1)
Definition: SCR_EntityCatalogManagerComponent.c:509
EOnInit
override void EOnInit(IEntity owner)
Definition: SCR_EntityCatalogManagerComponent.c:582
GetEntryWithPrefabFromAnyCatalog
SCR_EntityCatalogEntry GetEntryWithPrefabFromAnyCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, SCR_Faction priorityFaction=null, bool prioritizeGeneralOfPriorityFaction=false)
Definition: SCR_EntityCatalogManagerComponent.c:243
EEditorMode
EEditorMode
Editor mode that defines overall functionality.
Definition: EEditorMode.c:5
Faction
Definition: Faction.c:12
GetFilteredArsenalItems
array< SCR_ArsenalItem > GetFilteredArsenalItems(SCR_EArsenalItemType typeFilter, SCR_EArsenalItemMode modeFilter, SCR_Faction faction=null, EArsenalItemDisplayType requiresDisplayType=-1)
Definition: SCR_EntityCatalogManagerComponent.c:541
SCR_Global
Definition: Functions.c:6
SCR_EntityCatalog
Definition: SCR_EntityCatalog.c:181
GetEntryWithPrefabFromGeneralOrFactionCatalog
SCR_EntityCatalogEntry GetEntryWithPrefabFromGeneralOrFactionCatalog(EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction, bool prioritizeGeneralCatalog=false)
Definition: SCR_EntityCatalogManagerComponent.c:195
GetEntityCatalogOfType
SCR_EntityCatalog GetEntityCatalogOfType(EEntityCatalogType catalogType)
Definition: SCR_EntityCatalogManagerComponent.c:37
GetAllEntityCatalogs
int GetAllEntityCatalogs(notnull out array< SCR_EntityCatalog > outEntityCatalogs)
Definition: SCR_EntityCatalogManagerComponent.c:95
SCR_DelegateFactionManagerComponent
Definition: SCR_DelegateFactionManagerComponent.c:15
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
Attribute
SCR_EntityCatalogManagerComponentClass SCR_BaseGameModeComponentClass Attribute(desc:"List of non-faction related Entity catalogs. Each holds a list of entity Prefab and data of a given type. Catalogs of the same type are merged into one. Note this array is moved to a map on init and set to null")
Definition: SCR_EntityCatalogManagerComponent.c:9
m_mEntityCatalogs
protected ref map< EEntityCatalogType, ref SCR_EntityCatalog > m_mEntityCatalogs
Definition: SCR_Faction.c:65
GetFilteredEditorPrefabsOfAllFactions
Get all prefabs that have the spawner the given labels and are valid in the editor mode for all factions param catalogType Type to catalog to get prefabs from param editorMode Editor mode to get valid entries from param[out] filteredPrefabsList Filltered array of valid prefabs param includedLabels A list of labels the entity needs all any to have Can be null if any of the other arrays are filled param excludedLabels A list of labels the entity CANNOT have ANY of Can be null if any of the other arrays are filled param needsAllIncludedLabels If true included List all needs to be if false any needs to be true param getFactionLessPrefabs If true than it will also get the prefabs not assigned to any faction return Size of found prefabs *int GetFilteredEditorPrefabsOfAllFactions(EEntityCatalogType catalogType, EEditorMode editorMode, notnull out array< ResourceName > filteredPrefabsList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, bool needsAllIncludedLabels=true, bool getFactionLessPrefabs=false)
Definition: SCR_EntityCatalogManagerComponent.c:315
SCR_ArsenalItem
Definition: SCR_ArsenalItem.c:2
GetArsenalItems
bool GetArsenalItems(out array< SCR_ArsenalItem > arsenalItems, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, EArsenalItemDisplayType requiresDisplayType=-1)
Definition: SCR_EntityCatalogManagerComponent.c:431
SCR_BaseGameModeComponentClass
Definition: SCR_BaseGameModeComponent.c:2
SCR_Faction
Definition: SCR_Faction.c:6
SCR_EntityCatalogEntry
Definition: SCR_EntityCatalogEntry.c:5
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_BaseGameModeComponent
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_BaseGameModeComponent.c:199