Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TaskContextAction.c
Go to the documentation of this file.
3 {
4  [Attribute(defvalue: "0", uiwidget: UIWidgets.ComboBox, enums: { ParamEnum("Complete", "0", ""), ParamEnum("Fail", "1", "") }, desc: "State to which the task will be set.")]
5  protected int m_iTaskState;
6 
7  override bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
8  {
9  return selectedEntity && selectedEntity.GetEntityType() == EEditableEntityType.TASK && GetTaskManager();
10  }
11 
12  override bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
13  {
14  return true;
15  }
16 
17  override void Perform(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
18  {
19  if (!GetTaskManager())
20  return;
21 
22  SCR_BaseTaskSupportEntity supportEntity = GetTaskManager().FindSupportEntity(SCR_BaseTaskSupportEntity);
23  if (!supportEntity)
24  return;
25 
26  SCR_BaseTask task = SCR_BaseTask.Cast(selectedEntity.GetOwner());
27  if (!task)
28  return;
29 
30  switch (m_iTaskState)
31  {
32  //--- Complete
33  case 0:
34  {
35  supportEntity.FinishTask(task);
36  break;
37  }
38  //--- Fail
39  case 1:
40  {
41  supportEntity.FailTask(task);
42  break;
43  }
44  }
45  }
46 };
SCR_TaskContextAction
Definition: SCR_TaskContextAction.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_BaseTask
A base class for tasks.
Definition: SCR_BaseTask.c:8
Attribute
typedef Attribute
Post-process effect of scripted camera.
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition: EEditableEntityType.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_BaseTaskSupportEntity
Definition: SCR_BaseTaskSupportEntity.c:8
SCR_SelectedEntitiesContextAction
Definition: SCR_SelectedEntitiesContextAction.c:10
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468