Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ScenarioFrameworkLayerTaskDeliver.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/ScenarioFramework/Layer", description: "")]
3 {
4 }
5 
6 class SCR_ScenarioFrameworkLayerTaskDeliver : SCR_ScenarioFrameworkLayerTask
7 {
8  [Attribute(desc: "Name of the task in list of tasks after item is possessed.", category: "Task")]
9  protected string m_sTaskTitleUpdated;
10 
11  [Attribute(desc: "Description of the task after item is possessed", category: "Task")] //TODO: make config, memory
12  protected string m_sTaskDescriptionUpdated;
13 
14  [Attribute(defvalue: "30", desc: "Delay in seconds for Intel map marker when it is dropped on the ground", params: "0 6000 1", category: "Task")]
15  protected int m_iIntelMapMarkerUpdateDelay;
16 
17  protected IEntity m_DeliverPoint;
18 
19  //------------------------------------------------------------------------------------------------
20  override void SetEntity(IEntity entity)
21  {
22  m_Entity = entity;
23  }
24 
25  //------------------------------------------------------------------------------------------------
27  void SetDeliveryPointEntity(IEntity entity)
28  {
29  m_DeliverPoint = entity;
30  }
31 
32  //------------------------------------------------------------------------------------------------
35  {
36  return m_DeliverPoint;
37  }
38 
39  //------------------------------------------------------------------------------------------------
42  {
43  return m_iIntelMapMarkerUpdateDelay;
44  }
45 
46  //------------------------------------------------------------------------------------------------
48  override void RestoreToDefault(bool includeChildren = false, bool reinitAfterRestoration = false)
49  {
50  m_DeliverPoint = null;
51 
52  super.RestoreToDefault(includeChildren, reinitAfterRestoration);
53  }
54 
55  //------------------------------------------------------------------------------------------------
56  override void SetupTask()
57  {
58  super.SetupTask();
59 
60  if (!m_Task || !m_DeliverPoint)
61  return;
62 
63  SCR_TaskDeliver.Cast(m_Task).SetDeliveryTrigger(SCR_BaseTriggerEntity.Cast(m_DeliverPoint));
64  }
65 
66  //------------------------------------------------------------------------------------------------
69  {
70  if (!m_sTaskTitleUpdated.IsEmpty())
71  m_Task.SetTitle(m_sTaskTitleUpdated);
72  if (!m_sTaskDescriptionUpdated.IsEmpty())
73  m_Task.SetDescription(m_sTaskDescriptionUpdated);
74  }
75 
76  //------------------------------------------------------------------------------------------------
77  override bool SetSupportEntity()
78  {
80  {
81  Print("ScenarioFramework: Task Deliver support entity not found in the world, task won't be created!", LogLevel.ERROR);
82  return false;
83  }
85  return true;
86  }
87 
88  //------------------------------------------------------------------------------------------------
89  // constructor
93  void SCR_ScenarioFrameworkLayerTaskDeliver(IEntityComponentSource src, IEntity ent, IEntity parent)
94  {
95  m_eTypeOfTask = SCR_ESFTaskType.DELIVER;
96  }
97 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
UpdateTaskTitleAndDescription
void UpdateTaskTitleAndDescription()
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:68
m_Task
SCR_EditableTaskComponentClass m_Task
Editable SCR_BaseTask.
SCR_ScenarioFrameworkLayerTaskDeliver
void SCR_ScenarioFrameworkLayerTaskDeliver(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:93
SetDeliveryPointEntity
void SetDeliveryPointEntity(IEntity entity)
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:27
SCR_ScenarioFrameworkLayerTaskClass
Definition: SCR_ScenarioFrameworkLayerTask.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SetupTask
override void SetupTask()
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:56
m_Entity
enum EAITargetInfoCategory m_Entity
GetIntelMapMarkerUpdateDelay
int GetIntelMapMarkerUpdateDelay()
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:41
RestoreToDefault
override void RestoreToDefault(bool includeChildren=false, bool reinitAfterRestoration=false)
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:48
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
SCR_ScenarioFrameworkLayerTaskDeliverClass
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:2
SCR_TaskDeliver
Definition: SCR_ScenarioFrameworkTaskDeliver.c:27
GetDeliveryPointEntity
IEntity GetDeliveryPointEntity()
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:34
SetSupportEntity
override bool SetSupportEntity()
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:77
SetEntity
void SetEntity(IEntity entity)
Definition: SCR_ScenarioFrameworkLayerBase.c:92
Attribute
SCR_ScenarioFrameworkLayerTaskDeliverClass SCR_ScenarioFrameworkLayerTaskClass Attribute(desc:"Name of the task in list of tasks after item is possessed.", category:"Task")
Definition: SCR_ScenarioFrameworkLayerTaskDeliver.c:8
SCR_ScenarioFrameworkTaskDeliverSupportEntity
Definition: SCR_ScenarioFrameworkTaskDeliverSupportEntity.c:8
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180