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_EditorPlacingHintCondition.c
Go to the documentation of this file.
1
[
BaseContainerProps
(), SCR_BaseContainerHintCondition()]
2
class
SCR_EditorPlacingHintCondition
:
SCR_BaseEditorHintCondition
3
{
4
[
Attribute
(
"-1"
, uiwidget:
UIWidgets
.ComboBox, enums:
SCR_Enum
.GetList(
EEditableEntityType
,
new
ParamEnum
(
"<None>"
,
"-1"
)))]
5
protected
EEditableEntityType
m_Type
;
6
7
//------------------------------------------------------------------------------------------------
8
protected
void
OnSelectedPrefabChange
(
ResourceName
prefab,
ResourceName
prefabPrev)
9
{
10
if
(prefab)
11
{
12
if
(
m_Type
== -1)
13
{
14
GetGame
().GetCallqueue().CallLater(
Activate
, 100);
//--- Wait for asset browser to close
15
}
16
else
17
{
18
Resource
resource =
Resource
.Load(prefab);
19
IEntitySource
entitySource =
SCR_BaseContainerTools
.FindEntitySource(resource);
20
IEntityComponentSource
editableEntitySource =
SCR_EditableEntityComponentClass
.
GetEditableEntitySource
(entitySource);
21
if
(
SCR_EditableEntityComponentClass
.
GetEntityType
(editableEntitySource) ==
m_Type
)
22
{
23
GetGame
().GetCallqueue().CallLater(
Activate
, 100);
//--- Wait for asset browser to close
24
}
25
}
26
}
27
else
28
{
29
Deactivate
();
30
}
31
}
32
33
//------------------------------------------------------------------------------------------------
34
override
protected
void
OnInitConditionEditor
(
SCR_EditorManagerEntity
editorManager)
35
{
36
SCR_PlacingEditorComponent
placingManager =
SCR_PlacingEditorComponent
.Cast(
SCR_PlacingEditorComponent
.GetInstance(
SCR_PlacingEditorComponent
));
37
if
(placingManager)
38
placingManager.
GetOnSelectedPrefabChange
().Insert(
OnSelectedPrefabChange
);
39
}
40
41
//------------------------------------------------------------------------------------------------
42
override
protected
void
OnExitConditionEditor
(
SCR_EditorManagerEntity
editorManager)
43
{
44
SCR_PlacingEditorComponent
placingManager =
SCR_PlacingEditorComponent
.Cast(
SCR_PlacingEditorComponent
.GetInstance(
SCR_PlacingEditorComponent
));
45
if
(placingManager)
46
placingManager.
GetOnSelectedPrefabChange
().Remove(
OnSelectedPrefabChange
);
47
}
48
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_EditorManagerEntity
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Definition
SCR_EditorManagerEntity.c:2211
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntitySource
Definition
IEntitySource.c:13
ParamEnum
Definition
attributes.c:5
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_BaseEditorHintCondition
Definition
SCR_BaseEditorHintCondition.c:3
SCR_BaseHintCondition::Activate
void Activate()
Definition
SCR_BaseHintCondition.c:11
SCR_BaseHintCondition::Deactivate
void Deactivate()
Definition
SCR_BaseHintCondition.c:29
SCR_EditableEntityComponentClass
Definition
SCR_EditableEntityComponentClass.c:3
SCR_EditableEntityComponentClass::GetEntityType
EEditableEntityType GetEntityType()
Definition
SCR_EditableEntityComponentClass.c:103
SCR_EditableEntityComponentClass::GetEditableEntitySource
static IEntityComponentSource GetEditableEntitySource(Resource entityResource)
Definition
SCR_EditableEntityComponentClass.c:143
SCR_EditorPlacingHintCondition
Definition
SCR_EditorPlacingHintCondition.c:3
SCR_EditorPlacingHintCondition::OnSelectedPrefabChange
void OnSelectedPrefabChange(ResourceName prefab, ResourceName prefabPrev)
Definition
SCR_EditorPlacingHintCondition.c:8
SCR_EditorPlacingHintCondition::OnInitConditionEditor
void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
Definition
SCR_EditorPlacingHintCondition.c:34
SCR_EditorPlacingHintCondition::m_Type
EEditableEntityType m_Type
Definition
SCR_EditorPlacingHintCondition.c:5
SCR_EditorPlacingHintCondition::OnExitConditionEditor
void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
Definition
SCR_EditorPlacingHintCondition.c:42
SCR_Enum
Definition
SCR_Enum.c:2
SCR_PlacingEditorComponent
Definition
SCR_PlacingEditorComponent.c:119
SCR_PlacingEditorComponent::GetOnSelectedPrefabChange
ScriptInvoker GetOnSelectedPrefabChange()
Definition
SCR_PlacingEditorComponent.c:1427
UIWidgets
Definition
attributes.c:40
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition
EEditableEntityType.c:6
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Components
Hints
HintConditions
SCR_EditorPlacingHintCondition.c
Generated by
1.17.0