Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionChangeAllTaskState.c
Go to the documentation of this file.
3{
4 [Attribute(defvalue: "", desc: "Layer Tasks To Ignore")]
5 ref array<string> m_aLayerTasksToIgnore;
6
7 [Attribute(desc: "Ignored Task States", uiwidget: UIWidgets.Flags, enumType: SCR_ETaskState)]
8 SCR_ETaskState m_eIgnoredTaskStates;
9
10 [Attribute(defvalue: "0", desc: "New Task State", uiwidget: UIWidgets.ComboBox, enumType: SCR_ETaskState)]
11 SCR_ETaskState m_eNewTaskState;
12
13 //------------------------------------------------------------------------------------------------
14 override void OnActivate(IEntity object)
15 {
16 if (!CanActivate())
17 return;
18
19 SCR_TaskSystem tSystem = SCR_TaskSystem.GetInstance();
20 if (!tSystem)
21 return;
22
23 array <SCR_Task> tasks = {};
24 tSystem.GetTasks(tasks);
25
27 SCR_ScenarioFrameworkLayerTask sfLayerTask;
28 foreach (SCR_Task task : tasks)
29 {
30 if (!task)
31 continue;
32
33 if (SCR_Enum.HasFlag(m_eIgnoredTaskStates, task.GetTaskState()))
34 continue;
35
36 sfTask = SCR_ScenarioFrameworkTask.Cast(task);
37 if (!sfTask)
38 {
39 task.SetTaskState(m_eNewTaskState);
40 continue;
41 }
42
43 sfLayerTask = sfTask.GetLayerTask();
44 if (!sfLayerTask)
45 continue;
46
47 if (m_aLayerTasksToIgnore.Contains(sfLayerTask.GetName()))
48 continue;
49
50 sfLayerTask.ProcessLayerTaskState(m_eNewTaskState, true);
51 }
52 }
53}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
SCR_ETaskState
Definition SCR_Task.c:3
SCR_ScenarioFrameworkLayerTask GetLayerTask()
SCR_FieldOfViewSettings Attribute