Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_PrefabsCacheEditorComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Editor"
, description:
"Attribute for managing editable entities. Works only with SCR_EditorBaseEntity!"
, icon:
"WBData/ComponentEditorProps/componentEditor.png"
)]
2
class
SCR_PrefabsCacheEditorComponentClass
:
SCR_BaseEditorComponentClass
3
{
4
};
5
13
class
SCR_PrefabsCacheEditorComponent
:
SCR_BaseEditorComponent
14
{
15
private
ref
map<ResourceName, ref array<ResourceName>
> m_PrefabsCache =
new
map<ResourceName, ref array<ResourceName>
>;
16
17
bool
IsPrefabInherited(
ResourceName
prefab,
ResourceName
inheritedFrom)
18
{
19
if
(prefab ==
ResourceName
.Empty || inheritedFrom ==
ResourceName
.Empty)
return
false
;
20
21
array<ResourceName> inheritance =
new
array<ResourceName>;
22
if
(!m_PrefabsCache.Contains(inheritedFrom))
23
{
24
Resource
resource =
Resource
.Load(inheritedFrom);
25
if
(resource.IsValid())
26
{
27
IEntitySource
source =
SCR_BaseContainerTools
.FindEntitySource(resource);
28
while
(source)
29
{
30
inheritance.Insert(source.GetResourceName());
31
source = source.GetAncestor();
32
}
33
m_PrefabsCache.Insert(inheritedFrom, inheritance);
34
}
35
}
36
else
37
{
38
inheritance = m_PrefabsCache.Get(inheritedFrom);
39
}
40
41
return
inheritance.Find(prefab) != -1;
42
}
43
};
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntitySource
Definition
IEntitySource.c:13
Resource
Object holding reference to resource. In destructor release the resource.
Definition
Resource.c:25
ResourceName
Definition
ResourceName.c:13
SCR_BaseContainerTools
Definition
SCR_BaseContainerTools.c:4
SCR_BaseEditorComponentClass
Definition
SCR_BaseEditorComponent.c:3
SCR_BaseEditorComponent::SCR_BaseEditorComponent
void SCR_BaseEditorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_BaseEditorComponent.c:683
SCR_PrefabsCacheEditorComponentClass
Definition
SCR_PrefabsCacheEditorComponent.c:3
SCR_PrefabsCacheEditorComponent
Definition
SCR_PrefabsCacheEditorComponent.c:14
map
Definition
Types.c:486
scripts
Game
Editor
Components
Editor
SCR_PrefabsCacheEditorComponent.c
Generated by
1.17.0