Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FactionCommanderConfirmMenuHandler.c
Go to the documentation of this file.
3{
4 [Attribute(desc:"If true, player voted as commander can confirm command")]
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}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
vector position
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
SCR_FactionCommanderPlayerComponent GetLocalCommanderComponent()
override void OnCommandIssued(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
override bool CanEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
override bool CanEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, out string disabledText="")
SCR_FieldOfViewSettings Attribute