Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FactionCommanderCommandConflictMenuHandler.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 override bool CanQuickEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
6 {
7 if (!super.CanQuickEntryBeShown(commanderFaction, playerId, position, hoveredEntity))
8 return false;
9
10 return IsTaskValid(hoveredEntity);
11 }
12
13 //------------------------------------------------------------------------------------------------
14 override bool CanEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
15 {
16 SCR_Task task = GetTask(hoveredEntity, commanderFaction, GetTaskPrefabClassTypename());
18 return false;
19
20 return true;
21 }
22
23 //------------------------------------------------------------------------------------------------
24 override bool CanEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, out string disabledText = "")
25 {
26 if (GetHoveredBase())
27 return false;
28
29 return true;
30 }
31
32 //------------------------------------------------------------------------------------------------
33 override bool CanGroupEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group, out string disabledText = "")
34 {
35 if (!super.CanGroupEntryBeSelected(commanderFaction, playerId, position, hoveredEntity, group))
36 return false;
37
38 return CanCampaignGroupEntryBeSelected(commanderFaction, hoveredEntity, group, GetTaskPrefabClassTypename());
39 }
40
41 //------------------------------------------------------------------------------------------------
42 override void OnCommandIssued(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
43 {
44 SCR_FactionCommanderPlayerComponent comp = GetLocalCommanderComponent();
45 if (!comp)
46 return;
47
48 if (!IsTaskValid(hoveredEntity))
49 {
50 comp.CreateTask(GetTaskPrefab(), position, group, playerId);
51 return;
52 }
53
54 SCR_Task task = SCR_Task.Cast(hoveredEntity);
55 if (group)
56 comp.AssignGroupToTask(group.GetGroupID(), task.GetTaskID());
57 }
58}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
vector position
SCR_ScenarioFrameworkTask GetTask()
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
int GetGroupID()
SCR_FactionCommanderPlayerComponent GetLocalCommanderComponent()
bool CanCampaignGroupEntryBeSelected(notnull Faction faction, IEntity hoveredEntity, notnull SCR_AIGroup group, typename taskClass)