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_FactionCommanderCancelMenuHandler.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_FactionCommanderCancelMenuHandler
:
SCR_FactionCommanderBaseTaskMenuHandler
3
{
4
//------------------------------------------------------------------------------------------------
5
override
bool
CanEntryBeSelected(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity, out
string
disabledText =
""
)
6
{
7
if
(!
IsTaskValid
(hoveredEntity))
8
return
false
;
9
10
// commander can confirm all tasks if it is allowed by config
11
if
(SCR_FactionCommanderPlayerComponent.IsLocalPlayerCommander())
12
return
true
;
13
14
return
false
;
15
}
16
17
//------------------------------------------------------------------------------------------------
18
override
void
OnCommandIssued(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group)
19
{
20
SCR_Task
task
=
SCR_Task
.Cast(hoveredEntity);
21
if
(!
task
)
22
return
;
23
24
if
(!
IsTaskValid
(hoveredEntity))
25
return
;
26
27
SCR_FactionCommanderPlayerComponent comp =
GetLocalCommanderComponent
();
28
if
(!comp)
29
return
;
30
31
comp.CancelTask(
task
.GetTaskID());
32
}
33
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
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_FactionCommanderCancelMenuHandler
Definition
SCR_FactionCommanderCancelMenuHandler.c:3
vector
Definition
vector.c:13
scripts
Game
FactionCommander
MenuHandlers
SCR_FactionCommanderCancelMenuHandler.c
Generated by
1.17.0