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_ScenarioFrameworkActionChangeTaskIcon.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionChangeTaskIcon
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Which task to work with - Use GetTask"
)]
5
ref
SCR_ScenarioFrameworkGetTask
m_Getter;
6
7
[
Attribute
(
params
:
"edds imageset"
, uiwidget:
UIWidgets
.ResourcePickerThumbnail,
desc
:
"Task icon set"
,
category
:
"Task"
)]
8
ResourceName
m_sTaskIconSet;
9
10
[
Attribute
(
desc
:
"Name of the specific icon from the icon set"
,
category
:
"Task"
)]
11
string
m_sTaskIconName;
12
13
//------------------------------------------------------------------------------------------------
14
override
void
OnActivate
(
IEntity
object
)
15
{
16
if
(!CanActivate())
17
return
;
18
19
if
(!m_Getter)
20
{
21
Print
(
string
.Format(
"ScenarioFramework Action: Getter not found for Action %1."
,
this
),
LogLevel
.ERROR);
22
return
;
23
}
24
25
SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_Getter.Get());
26
if
(!entityWrapper)
27
{
28
Print
(
string
.Format(
"ScenarioFramework Action: Issue with Getter detected for Action %1."
,
this
),
LogLevel
.ERROR);
29
return
;
30
}
31
32
SCR_ScenarioFrameworkTask
task
=
SCR_ScenarioFrameworkTask
.Cast(entityWrapper.GetValue());
33
if
(!
task
)
34
{
35
if
(
object
)
36
Print
(
string
.Format(
"ScenarioFramework Action: Task not found for Action %1 attached on %2."
,
this
,
object
.
GetName
()),
LogLevel
.ERROR);
37
else
38
Print
(
string
.Format(
"ScenarioFramework Action: Task not found for Action %1."
,
this
),
LogLevel
.ERROR);
39
40
return
;
41
}
42
43
SCR_ScenarioFrameworkLayerTask layerTask =
task
.GetLayerTask();
44
if
(!layerTask)
45
{
46
if
(
object
)
47
Print
(
string
.Format(
"ScenarioFramework Action: Layer Task not found for Action %1 attached on %2."
,
this
,
object
.
GetName
()),
LogLevel
.ERROR);
48
else
49
Print
(
string
.Format(
"ScenarioFramework Action: Layer Task not found for Action %1."
,
this
),
LogLevel
.ERROR);
50
51
return
;
52
}
53
54
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(m_sTaskIconSet))
55
{
56
if
(
object
)
57
Print
(
string
.Format(
"ScenarioFramework Action: Task Icon Set empty for Action %1 attached on %2."
,
this
,
object
.
GetName
()),
LogLevel
.ERROR);
58
else
59
Print
(
string
.Format(
"ScenarioFramework Action: Task Icon Set empty for Action %1."
,
this
),
LogLevel
.ERROR);
60
return
;
61
}
62
63
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(m_sTaskIconName))
64
{
65
if
(
object
)
66
Print
(
string
.Format(
"ScenarioFramework Action: Task Icon Name empty for Action %1 attached on %2."
,
this
,
object
.
GetName
()),
LogLevel
.ERROR);
67
else
68
Print
(
string
.Format(
"ScenarioFramework Action: Task Icon Name empty for Action %1."
,
this
),
LogLevel
.ERROR);
69
return
;
70
}
71
72
layerTask.m_sTaskIconSet = m_sTaskIconSet;
73
layerTask.m_sTaskIconName = m_sTaskIconName;
74
task
.SetTaskIconPath(m_sTaskIconSet);
75
task
.SetTaskIconSetName(m_sTaskIconName);
76
}
77
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
task
from task
Definition
SCR_TaskNotificationConfigs.c:12
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntity
Definition
IEntity.c:13
ResourceName
Definition
ResourceName.c:13
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionChangeTaskIcon
Definition
SCR_ScenarioFrameworkActionChangeTaskIcon.c:3
SCR_ScenarioFrameworkGetTask
Definition
SCR_ScenarioFrameworkGetTask.c:3
SCR_ScenarioFrameworkTask
Definition
SCR_ScenarioFrameworkTask.c:6
SCR_StringHelper
Definition
SCR_StringHelper.c:2
SCR_StringHelper::IsEmptyOrWhiteSpace
static bool IsEmptyOrWhiteSpace(string input)
Definition
SCR_StringHelper.c:594
UIWidgets
Definition
attributes.c:40
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionChangeTaskIcon.c
Generated by
1.17.0