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_BaseRadialCommand.c
Go to the documentation of this file.
1
[
BaseContainerProps
(
""
,
"Entry of one command"
),
SCR_BaseGroupCommandTitleField
(
"m_sCommandName"
)]
2
class
SCR_BaseRadialCommand
3
{
4
[
Attribute
(
""
,
UIWidgets
.EditBox,
"Unique name of the command"
)]
5
protected
string
m_sCommandName
;
6
7
[
Attribute
(
""
,
UIWidgets
.EditBox,
"Display name of the command, in future will replace the one in commanding menu conf"
)]
8
protected
string
m_sCommandDisplayName
;
9
10
[
Attribute
(
"{2EFEA2AF1F38E7F0}UI/Textures/Icons/icons_wrapperUI-64.imageset"
,
UIWidgets
.ResourceNamePicker,
"Imageset source for display icon"
)]
11
protected
ResourceName
m_sImageset
;
12
13
[
Attribute
(
""
,
UIWidgets
.EditBox,
"Name of the icon associated to the command, taken from appropriate imageset set in the radial menu"
)]
14
protected
string
m_sIconName
;
15
16
[
Attribute
(SCR_ECharacterRank.INVALID.ToString(),
UIWidgets
.ComboBox,
desc
:
"Rank that is requried in order to use this command.\nINVALID == no requirement"
, enums: ParamEnumArray.FromEnum(SCR_ECharacterRank))]
17
protected
SCR_ECharacterRank
m_eRequiredRank
;
18
19
protected
LocalizedString
m_sCannotPerformReason
;
20
protected
LocalizedString
m_sCannotExecuteReason
;
21
22
protected
static
const
LocalizedString
CANNOT_PERFORM_RANK_TOO_LOW
=
"#AR-Commanding_CannotPefrorm_RankTooLow"
;
23
protected
static
const
LocalizedString
CANNOT_EXECUTE_SOLDIER_NA
=
"#AR-Commanding_CannotExecute_SoldierNotAvailable"
;
24
25
//------------------------------------------------------------------------------------------------
29
// Returns true if the command was executed succesfully, false otherwise.
30
bool
Execute
(
IEntity
cursorTarget,
IEntity
target,
vector
targetPosition,
int
playerID,
bool
isClient)
31
{
32
return
true
;
33
}
34
35
//------------------------------------------------------------------------------------------------
36
void
VisualizeCommand
(
vector
targetPosition);
37
38
//------------------------------------------------------------------------------------------------
39
void
VisualizeCommandPreview
(
vector
targetPosition);
40
41
//------------------------------------------------------------------------------------------------
43
string
GetIconName
()
44
{
45
return
m_sIconName
;
46
}
47
48
//------------------------------------------------------------------------------------------------
50
string
GetCommandDisplayName
()
51
{
52
return
m_sCommandDisplayName
;
53
}
54
55
//------------------------------------------------------------------------------------------------
57
ResourceName
GetIconImageset
()
58
{
59
return
m_sImageset
;
60
}
61
62
//------------------------------------------------------------------------------------------------
64
string
GetCommandName
()
65
{
66
return
m_sCommandName
;
67
}
68
69
//------------------------------------------------------------------------------------------------
71
bool
CanRoleShow
()
72
{
73
return
true
;
74
}
75
76
//------------------------------------------------------------------------------------------------
78
bool
CanBeShownInCurrentLifeState
()
79
{
80
return
true
;
81
}
82
83
//------------------------------------------------------------------------------------------------
85
bool
CanBeShown
()
86
{
87
return
true
;
88
}
89
90
//------------------------------------------------------------------------------------------------
92
bool
CanShowOnMap
()
93
{
94
return
true
;
95
}
96
97
//------------------------------------------------------------------------------------------------
102
bool
CanBePerformed
(notnull SCR_ChimeraCharacter user)
103
{
104
if
(
m_eRequiredRank
== SCR_ECharacterRank.INVALID)
105
return
true
;
106
107
if
(!SCR_XPHandlerComponent.IsXpSystemEnabled())
108
return
true
;
109
110
SCR_ECharacterRank currentRank =
SCR_CharacterRankComponent
.GetCharacterRank(user);
111
if
(currentRank <
m_eRequiredRank
)
112
{
113
SCR_Faction
userFaction =
SCR_Faction
.Cast(user.GetFaction());
114
if
(!userFaction)
115
return
false
;
116
117
SCR_RankContainer
userRanks = userFaction.
GetRanks
();
118
string
requiredRankName = userRanks.
GetRankName
(
m_eRequiredRank
);
119
120
if
(requiredRankName ==
string
.Empty)
// If we dont define this rank in this faction, we will attempt to get the next one that would qualify.
121
requiredRankName = userRanks.
GetRankName
(userRanks.
GetNextRank
(
m_eRequiredRank
));
122
123
string
currentRankName = userRanks.
GetRankName
(currentRank);
124
SetCannotPerformReason
(
WidgetManager
.Translate(
CANNOT_PERFORM_RANK_TOO_LOW
, requiredRankName, currentRankName));
125
return
false
;
126
}
127
128
return
true
;
129
}
130
131
//------------------------------------------------------------------------------------------------
136
bool
CanBeExecuted
(
IEntity
target)
137
{
138
return
true
;
139
}
140
141
//------------------------------------------------------------------------------------------------
142
protected
void
SetCannotExecuteReason
(
LocalizedString
newReason)
143
{
144
m_sCannotExecuteReason
= newReason;
145
}
146
147
//------------------------------------------------------------------------------------------------
148
protected
void
SetCannotPerformReason
(
LocalizedString
newReason)
149
{
150
m_sCannotPerformReason
= newReason;
151
}
152
153
//------------------------------------------------------------------------------------------------
154
LocalizedString
GetCannotExecuteReason
()
155
{
156
return
m_sCannotExecuteReason
;
157
}
158
159
//------------------------------------------------------------------------------------------------
160
LocalizedString
GetCannotPerformReason
()
161
{
162
return
m_sCannotPerformReason
;
163
}
164
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_CharacterRankComponent
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_CharacterRankComponent.c:306
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
LocalizedString
Definition
LocalizedString.c:22
ResourceName
Definition
ResourceName.c:13
SCR_BaseGroupCommandTitleField
Definition
SCR_PlayerCommandsConfig.c:155
SCR_BaseRadialCommand
Definition
SCR_BaseRadialCommand.c:3
SCR_BaseRadialCommand::m_sIconName
string m_sIconName
Definition
SCR_BaseRadialCommand.c:14
SCR_BaseRadialCommand::CanBeExecuted
bool CanBeExecuted(IEntity target)
Definition
SCR_BaseRadialCommand.c:136
SCR_BaseRadialCommand::SetCannotExecuteReason
void SetCannotExecuteReason(LocalizedString newReason)
Definition
SCR_BaseRadialCommand.c:142
SCR_BaseRadialCommand::Execute
bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition, int playerID, bool isClient)
Definition
SCR_BaseRadialCommand.c:30
SCR_BaseRadialCommand::GetIconName
string GetIconName()
Definition
SCR_BaseRadialCommand.c:43
SCR_BaseRadialCommand::GetCommandDisplayName
string GetCommandDisplayName()
Definition
SCR_BaseRadialCommand.c:50
SCR_BaseRadialCommand::m_sCommandName
string m_sCommandName
Definition
SCR_BaseRadialCommand.c:5
SCR_BaseRadialCommand::CanBeShownInCurrentLifeState
bool CanBeShownInCurrentLifeState()
Definition
SCR_BaseRadialCommand.c:78
SCR_BaseRadialCommand::GetCommandName
string GetCommandName()
Definition
SCR_BaseRadialCommand.c:64
SCR_BaseRadialCommand::m_sImageset
ResourceName m_sImageset
Definition
SCR_BaseRadialCommand.c:11
SCR_BaseRadialCommand::SetCannotPerformReason
void SetCannotPerformReason(LocalizedString newReason)
Definition
SCR_BaseRadialCommand.c:148
SCR_BaseRadialCommand::CanRoleShow
bool CanRoleShow()
Definition
SCR_BaseRadialCommand.c:71
SCR_BaseRadialCommand::VisualizeCommandPreview
void VisualizeCommandPreview(vector targetPosition)
SCR_BaseRadialCommand::GetCannotExecuteReason
LocalizedString GetCannotExecuteReason()
Definition
SCR_BaseRadialCommand.c:154
SCR_BaseRadialCommand::CANNOT_PERFORM_RANK_TOO_LOW
static const LocalizedString CANNOT_PERFORM_RANK_TOO_LOW
Definition
SCR_BaseRadialCommand.c:22
SCR_BaseRadialCommand::m_sCommandDisplayName
string m_sCommandDisplayName
Definition
SCR_BaseRadialCommand.c:8
SCR_BaseRadialCommand::CANNOT_EXECUTE_SOLDIER_NA
static const LocalizedString CANNOT_EXECUTE_SOLDIER_NA
Definition
SCR_BaseRadialCommand.c:23
SCR_BaseRadialCommand::GetCannotPerformReason
LocalizedString GetCannotPerformReason()
Definition
SCR_BaseRadialCommand.c:160
SCR_BaseRadialCommand::m_eRequiredRank
SCR_ECharacterRank m_eRequiredRank
Definition
SCR_BaseRadialCommand.c:17
SCR_BaseRadialCommand::m_sCannotPerformReason
LocalizedString m_sCannotPerformReason
Definition
SCR_BaseRadialCommand.c:19
SCR_BaseRadialCommand::m_sCannotExecuteReason
LocalizedString m_sCannotExecuteReason
Definition
SCR_BaseRadialCommand.c:20
SCR_BaseRadialCommand::CanBeShown
bool CanBeShown()
Definition
SCR_BaseRadialCommand.c:85
SCR_BaseRadialCommand::CanBePerformed
bool CanBePerformed(notnull SCR_ChimeraCharacter user)
Definition
SCR_BaseRadialCommand.c:102
SCR_BaseRadialCommand::CanShowOnMap
bool CanShowOnMap()
Definition
SCR_BaseRadialCommand.c:92
SCR_BaseRadialCommand::GetIconImageset
ResourceName GetIconImageset()
Definition
SCR_BaseRadialCommand.c:57
SCR_BaseRadialCommand::VisualizeCommand
void VisualizeCommand(vector targetPosition)
SCR_Faction
Definition
SCR_Faction.c:6
SCR_Faction::GetRanks
SCR_RankContainer GetRanks()
Definition
SCR_Faction.c:199
SCR_RankContainer
Definition
SCR_RankContainer.c:3
SCR_RankContainer::GetNextRank
SCR_ECharacterRank GetNextRank(SCR_ECharacterRank rankID)
Definition
SCR_RankContainer.c:77
SCR_RankContainer::GetRankName
string GetRankName(SCR_ECharacterRank rankID)
Definition
SCR_RankContainer.c:213
UIWidgets
Definition
attributes.c:40
WidgetManager
Definition
WidgetManager.c:16
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Commanding
Commands
SCR_BaseRadialCommand.c
Generated by
1.17.0