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_FactionCommanderConfirmMenuHandler.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_FactionCommanderConfirmMenuHandler
:
SCR_FactionCommanderBaseTaskMenuHandler
3
{
4
[
Attribute
(
desc
:
"If true, player voted as commander can confirm command"
)]
5
protected
bool
m_bCanBeConfirmedByCommander
;
6
7
//------------------------------------------------------------------------------------------------
8
override
bool
CanEntryBeShown
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity)
9
{
10
if
(!super.CanEntryBeShown(commanderFaction, playerId,
position
, hoveredEntity))
11
return
false
;
12
13
return
SCR_FactionCommanderPlayerComponent.IsLocalPlayerCommander();
14
}
15
16
//------------------------------------------------------------------------------------------------
17
override
bool
CanEntryBeSelected
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity, out
string
disabledText =
""
)
18
{
19
if
(!
IsTaskValid
(hoveredEntity))
20
return
false
;
21
22
// commander can confirm all tasks if it is allowed by config
23
if
(SCR_FactionCommanderPlayerComponent.IsLocalPlayerCommander() &&
m_bCanBeConfirmedByCommander
)
24
return
true
;
25
26
return
false
;
27
}
28
29
//------------------------------------------------------------------------------------------------
30
override
void
OnCommandIssued
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group)
31
{
32
SCR_Task
task
=
SCR_Task
.Cast(hoveredEntity);
33
if
(!
task
)
34
return
;
35
36
if
(!
IsTaskValid
(hoveredEntity))
37
return
;
38
39
SCR_FactionCommanderPlayerComponent factionCommanderPlayerComponent =
GetLocalCommanderComponent
();
40
if
(!factionCommanderPlayerComponent)
41
return
;
42
43
factionCommanderPlayerComponent.FinishTask(
task
.GetTaskID());
44
}
45
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_Task
void SCR_Task(IEntitySource src, IEntity parent)
Definition
SCR_Task.c:1938
task
from task
Definition
SCR_TaskNotificationConfigs.c:12
Faction
Definition
Faction.c:13
IEntity
Definition
IEntity.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_FactionCommanderBaseMenuHandler::GetLocalCommanderComponent
SCR_FactionCommanderPlayerComponent GetLocalCommanderComponent()
Definition
SCR_FactionCommanderBaseMenuHandler.c:19
SCR_FactionCommanderBaseTaskMenuHandler
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:3
SCR_FactionCommanderBaseTaskMenuHandler::IsTaskValid
bool IsTaskValid(IEntity hoveredEntity)
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:18
SCR_FactionCommanderConfirmMenuHandler
Definition
SCR_FactionCommanderConfirmMenuHandler.c:3
SCR_FactionCommanderConfirmMenuHandler::OnCommandIssued
override void OnCommandIssued(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
Definition
SCR_FactionCommanderConfirmMenuHandler.c:30
SCR_FactionCommanderConfirmMenuHandler::m_bCanBeConfirmedByCommander
bool m_bCanBeConfirmedByCommander
Definition
SCR_FactionCommanderConfirmMenuHandler.c:5
SCR_FactionCommanderConfirmMenuHandler::CanEntryBeShown
override bool CanEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
Definition
SCR_FactionCommanderConfirmMenuHandler.c:8
SCR_FactionCommanderConfirmMenuHandler::CanEntryBeSelected
override bool CanEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, out string disabledText="")
Definition
SCR_FactionCommanderConfirmMenuHandler.c:17
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
FactionCommander
MenuHandlers
SCR_FactionCommanderConfirmMenuHandler.c
Generated by
1.17.0