10 [
Attribute(
"ArmaReforger",
"When using EditableEntityCollector, plugin will be looking for valid prefabs only in this addon",
"")]
11 private string m_sAddon;
13 [
Attribute(
params:
"unregFolders",
desc:
"When using EditableEntityCollector, the list will be filled with all compatible prefabs at this directory.")]
14 private ResourceName m_sSourceDirectory;
16 [
Attribute(defvalue:
"1",
desc:
"When true, prefabs will appear in the content browser.\nWhen false, they will be hidden, but stil available for placing by other systems.")]
17 private bool m_bExposed;
20 private ref array<ResourceName> m_Prefabs;
26 ResourceName GetAddon()
34 ResourceName GetSourceDirectory()
36 return m_sSourceDirectory;
50 array<ResourceName> GetPrefabs(
bool onlyExposed =
false)
52 if (onlyExposed && !m_bExposed)
56 array<ResourceName> emptyPrefabs = {};
57 emptyPrefabs.Resize(m_Prefabs.Count());
66 void SetPrefabs(notnull array<ResourceName> prefabs)
68 if (!m_Prefabs) m_Prefabs =
new array<ResourceName>;
69 m_Prefabs.Copy(prefabs);
72 void AddPrefabs(notnull array<ResourceName> prefabs)
77 foreach (ResourceName prefab: prefabs)
79 m_Prefabs.Insert(prefab)
87 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
89 ResourceName sourceDirectory;
90 source.Get(
"m_sSourceDirectory", sourceDirectory);
91 title = sourceDirectory.GetPath();