Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_BaseTaskExecutor.c
Go to the documentation of this file.
1
//[EntityEditorProps(category: "GameScripted/Tasks", description: "This this entity to receive and complete tasks.", color: "0 0 255 255")]
2
//class SCR_BaseTaskExecutorClass: GenericEntityClass
3
//{
4
//};
5
//
7
//class SCR_BaseTaskExecutor : GenericEntity
8
//{
9
//
10
// static const int INVALID_PLAYER_ID = -1;
11
// protected static ref map<SCR_BaseTaskExecutor, int> s_mTaskExecutors = new map<SCR_BaseTaskExecutor, int>();
12
// protected static SCR_BaseTaskExecutor s_LocalTaskExecutor = null;
13
//
14
// //**************************//
15
// //PROTECTED MEMBER VARIALBES//
16
// //**************************//
17
//
18
// protected SCR_BaseTask m_CurrentTask;
19
//
20
// //*********************//
21
// //PUBLIC STATIC METHODS//
22
// //*********************//
23
//
24
// //------------------------------------------------------------------------------------------------
25
// static map<SCR_BaseTaskExecutor, int> GetTaskExecutorsMap()
26
// {
27
// return s_mTaskExecutors;
28
// }
29
//
30
// //------------------------------------------------------------------------------------------------
31
// static int GetTaskExecutorID(SCR_BaseTaskExecutor taskExecutor)
32
// {
33
// if (!taskExecutor)
34
// return INVALID_PLAYER_ID;
35
//
36
// return s_mTaskExecutors.Get(taskExecutor);
37
// }
38
//
39
// //------------------------------------------------------------------------------------------------
40
// static int GetLocalExecutorID()
41
// {
42
// return GetTaskExecutorID(GetLocalExecutor());
43
// }
44
//
45
// //------------------------------------------------------------------------------------------------
46
// //! Returns the local task executor
47
// static SCR_BaseTaskExecutor GetLocalExecutor()
48
// {
49
// if (s_LocalTaskExecutor)
50
// return s_LocalTaskExecutor;
51
//
52
// PlayerController playerController = GetGame().GetPlayerController();
53
// if (!playerController)
54
// return null;
55
//
56
// int playerID = playerController.GetPlayerId();
57
//
58
// SCR_BaseTaskExecutor taskExecutor = s_mTaskExecutors.GetKeyByValue(playerID);
59
//
60
// // Local task executor not found, create new one
61
// if (!taskExecutor)
62
// taskExecutor = GetTaskManager().LocalCreateTaskExecutor(GetGame().GetPlayerController().GetPlayerId());
63
//
64
// return taskExecutor;
65
// }
66
//
67
// //------------------------------------------------------------------------------------------------
68
// static SCR_BaseTaskExecutor FindTaskExecutorByID(int playerID)
69
// {
70
// return s_mTaskExecutors.GetKeyByValue(playerID);
71
// }
72
//
73
// //------------------------------------------------------------------------------------------------
74
// //! Returns the task executor with given ID
75
// static notnull SCR_BaseTaskExecutor GetTaskExecutorByID(int playerID)
76
// {
77
// SCR_BaseTaskExecutor taskExecutor = s_mTaskExecutors.GetKeyByValue(playerID);
78
//
79
// if (!taskExecutor)
80
// {
81
// taskExecutor = GetTaskManager().LocalCreateTaskExecutor(playerID);
82
// }
83
//
84
// return taskExecutor;
85
// }
86
//
87
// //*********************//
88
// //PUBLIC MEMBER METHODS//
89
// //*********************//
90
//
91
// int GetExecutorID()
92
// {
93
// return GetTaskExecutorID(this);
94
// }
95
//
96
// //------------------------------------------------------------------------------------------------
97
// IEntity GetControlledEntity()
98
// {
99
// return SCR_PossessingManagerComponent.GetPlayerMainEntity(s_mTaskExecutors.Get(this));
100
// }
101
//
102
// //------------------------------------------------------------------------------------------------
103
// //! Returns currently assigned task.
104
// SCR_BaseTask GetAssignedTask()
105
// {
106
// return m_CurrentTask;
107
// }
108
//
109
// //------------------------------------------------------------------------------------------------
110
// //! Returns player name of this task executor
111
// string GetPlayerName()
112
// {
113
// return SCR_PlayerNamesFilterCache.GetInstance().GetPlayerDisplayName(GetTaskExecutorID(this));
114
//
115
// }
116
//
117
// //------------------------------------------------------------------------------------------------
118
// //! Sets this task executor the given player ID
119
// void SetPlayerID(int playerID)
120
// {
121
// if (!s_mTaskExecutors || playerID == INVALID_PLAYER_ID)
122
// return;
123
//
124
// s_mTaskExecutors.Set(this, playerID);
125
// }
126
//
127
// //------------------------------------------------------------------------------------------------
128
// //! Assigns new task.
129
// void AssignNewTask(SCR_BaseTask task)
130
// {
131
// if (task == m_CurrentTask)
132
// return;
133
//
134
// OnNewTaskAssigned(m_CurrentTask, task);
135
// m_CurrentTask = task;
136
// }
137
//
138
// //***************************//
139
// //PUBLIC EVENT MEMBER METHODS//
140
// //***************************//
141
//
142
// //------------------------------------------------------------------------------------------------
143
// //! An event called when the assigned task has been removed.
144
// void OnAssignedTaskRemoved()
145
// {
146
// m_CurrentTask = null;
147
// }
148
//
149
// //------------------------------------------------------------------------------------------------
150
// //! An event called when the assigned task has failed.
151
// void OnAssignedTaskFailed()
152
// {
153
// m_CurrentTask = null;
154
// }
155
//
156
// //------------------------------------------------------------------------------------------------
157
// //! An event called when the assigned task has been finished.
158
// void OnAssignedTaskFinished()
159
// {
160
// m_CurrentTask = null;
161
// }
162
//
163
// //******************************//
164
// //PROTECTED MEMBER EVENT METHODS//
165
// //******************************//
166
//
167
// //------------------------------------------------------------------------------------------------
168
// //! An event called when a new task has been assigned to this task executor.
169
// protected void OnNewTaskAssigned(SCR_BaseTask oldTask, SCR_BaseTask newTask)
170
// {
171
//
172
// }
173
//
174
// //************************//
175
// //CONSTRUCTOR & DESTRUCTOR//
176
// //************************//
177
//
178
// //------------------------------------------------------------------------------------------------
179
// void SCR_BaseTaskExecutor(IEntitySource src, IEntity parent)
180
// {
181
// if (s_mTaskExecutors)
182
// s_mTaskExecutors.Insert(this, INVALID_PLAYER_ID);
183
// }
184
//
185
// //------------------------------------------------------------------------------------------------
186
// void ~SCR_BaseTaskExecutor()
187
// {
188
// if (s_mTaskExecutors)
189
// s_mTaskExecutors.Remove(this);
190
// }
191
//
192
//};
193
//
scripts
Game
Tasks
SCR_BaseTaskExecutor.c
Generated by
1.17.0