Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SCR_BaseTaskManager Interface Reference
Inheritance diagram for SCR_BaseTaskManager:
[legend]

Public Member Functions

void OnPlayerDisconnected (int id)
 An event called when a player disconnects Server only.
 
void OnTaskDeleted (SCR_BaseTask task)
 An event called when a task is deleted.
 
void OnTaskCreated (SCR_BaseTask task)
 An event called when a new task is created.
 
void RefreshTaskList (SCR_BaseTask task=null)
 Refresh task list.
 
void OnTaskFinished (SCR_BaseTask task)
 An event called when a task is finished.
 
void OnTaskUpdate (SCR_BaseTask task, SCR_ETaskEventMask mask)
 An event called whenever any task has been changed, updated, created.
 
string GetReassignText ()
 
void AddAssigneeAbandoned (SCR_BaseTaskExecutor assignee)
 
bool IsProxy ()
 Checks if this entity is locally owned Public because it's also used by tasks as they don't have any RplComponents themselves.
 
void UnregisterSupportEntity (SCR_BaseTaskSupportEntity supportEntity)
 
void RegisterSupportEntity (SCR_BaseTaskSupportEntity supportEntity)
 
SCR_BaseTask GetTask (int taskID)
 Returns the found task if it exists.
 
void RegisterTask (SCR_BaseTask task)
 Registers Tasks and based on their State it inserts them to proper list.
 
SCR_BaseTask GetFinishedTask (int taskID)
 Returns the found finished task if it exists.
 
bool HasRequestedTask (int playerID)
 
bool Initialized ()
 
void DeleteTask (SCR_BaseTask task)
 
SCR_BaseTaskSupportEntity FindSupportEntity (TypeName type)
 
array< SCR_BaseTaskSupportEntityGetSupportedTasks ()
 
notnull SCR_BaseTaskExecutor LocalCreateTaskExecutor (int playerID)
 
SCR_RequestedTask FindRequestedTask (SCR_BaseTaskExecutor requester)
 
int GetFilteredTasks (notnull out array< SCR_BaseTask > tasks, Faction filterFaction=null)
 Outs an array of tasks filtered by faction.
 
int GetFilteredFinishedTasks (notnull out array< SCR_BaseTask > tasks, Faction filterFaction=null)
 Outs an array of tasks filtered by faction.
 
bool GetAssigneeAbandoned (SCR_BaseTaskExecutor assignee)
 
void AbandonTask (int taskID, notnull SCR_BaseTaskExecutor assignee)
 
void RequestAssignment (int taskID, notnull SCR_BaseTaskExecutor assignee)
 Used for assigning the task with given task ID to the assignee in parameter.
 
void OnPlayerRegistered (int registeredPlayerID)
 
void CreateTaskExecutors ()
 Creates a task executor for each connected player.
 
float GetTimestamp ()
 Returns the current timestamp.
 
int GetTasks (notnull out array< SCR_BaseTask > tasks)
 Outs an array of all of the tasks.
 
int GetFinishedTasks (notnull out array< SCR_BaseTask > tasks)
 Outs an array of all of the finished tasks.
 
SCR_BaseTask LocalSpawnTask (ResourceName resourceName)
 Called from SpawnTask and RPC_SpawnTask methods Don't call directly!
 
SCR_BaseTask SpawnTask (ResourceName resourceName)
 Call this on the server only.
 
void UpdateTasks ()
 
void SaveTasksForRpl (ScriptBitWriter writer, array< SCR_BaseTask > taskArray)
 
override bool RplSave (ScriptBitWriter writer)
 
void LoadTasksForRpl (ScriptBitReader reader, int count)
 
override bool RplLoad (ScriptBitReader reader)
 
void SCR_BaseTaskManager (IEntitySource src, IEntity parent)
 
void ~SCR_BaseTaskManager ()
 

Public Attributes

string m_sLocalRequestTitle
 
string m_sReassignPopup
 
string m_sAssignPopupGM
 
ref map< SCR_BaseTask, SCR_ETaskEventMask > m_mTaskEventMaskMap = new map<SCR_BaseTask, SCR_ETaskEventMask>()
 

Static Public Attributes

static const float DEFAULT_ABANDON_WAITING_TIME = 15
 
static ref ScriptInvoker s_OnTaskUpdate = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskFinished = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskFailed = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskRemoved = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskCancelled = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskAssigned = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskUnassigned = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskFactionAssigned = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskCreated = new ScriptInvoker()
 
static ref ScriptInvoker s_OnTaskDeleted = new ScriptInvoker()
 
static ref ScriptInvoker s_OnPeriodicalCheck2Second = new ScriptInvoker()
 
static ref ScriptInvoker s_OnPeriodicalCheck5Second = new ScriptInvoker()
 
static ref ScriptInvoker s_OnPeriodicalCheck60Second = new ScriptInvoker()
 

Protected Member Functions

void PeriodicalCheck2Second ()
 
void PeriodicalCheck5Second ()
 
void PeriodicalCheck60Second ()
 
SCR_EvacuateTask CreateNewEvacuationTask (int requesterID)
 
void CheckAssigneeTimeout ()
 Checks every task for assignee timeout.
 
void RPC_SpawnTask (ResourceName resourceName, int taskID)
 Called by SpawnTask() Don't call directly!
 
override void EOnInit (IEntity owner)
 
override void EOnFrame (IEntity owner, float timeSlice)
 

Protected Attributes

ref array< SCR_BaseTaskSupportEntitym_aSupportedTaskTypes = {}
 
float m_fTimestamp = 0
 
float m_fTimestampTimer = 0
 
ref array< SCR_BaseTaskm_aTaskList = new array<SCR_BaseTask>()
 
ref array< SCR_BaseTaskm_aFinishedTaskList = {}
 
ref array< ref SCR_TaskAssignmentDatam_aCachedTaskAssignments = new array<ref SCR_TaskAssignmentData>()
 
float m_fAssigneeCacheTimer
 
float m_fAssigneeCacheCheckTimestamp
 
ref map< SCR_BaseTaskExecutor, float > m_mAssigneesAbandoned = new map<SCR_BaseTaskExecutor, float>()
 
bool m_bInitialized = false
 
RplComponent m_RplComponent
 
ref array< SCR_BaseTaskm_aTasksToDelete = {}
 

Constructor & Destructor Documentation

◆ SCR_BaseTaskManager()

void SCR_BaseTaskManager.SCR_BaseTaskManager ( IEntitySource  src,
IEntity  parent 
)

◆ ~SCR_BaseTaskManager()

void SCR_BaseTaskManager.~SCR_BaseTaskManager ( )

Member Function Documentation

◆ AbandonTask()

void SCR_BaseTaskManager.AbandonTask ( int  taskID,
notnull SCR_BaseTaskExecutor  assignee 
)

◆ AddAssigneeAbandoned()

void SCR_BaseTaskManager.AddAssigneeAbandoned ( SCR_BaseTaskExecutor  assignee)

◆ CheckAssigneeTimeout()

void SCR_BaseTaskManager.CheckAssigneeTimeout ( )
protected

Checks every task for assignee timeout.

◆ CreateNewEvacuationTask()

SCR_EvacuateTask SCR_BaseTaskManager.CreateNewEvacuationTask ( int  requesterID)
protected

◆ CreateTaskExecutors()

void SCR_BaseTaskManager.CreateTaskExecutors ( )

Creates a task executor for each connected player.

◆ DeleteTask()

void SCR_BaseTaskManager.DeleteTask ( SCR_BaseTask  task)

◆ EOnFrame()

override void SCR_BaseTaskManager.EOnFrame ( IEntity  owner,
float  timeSlice 
)
protected

◆ EOnInit()

override void SCR_BaseTaskManager.EOnInit ( IEntity  owner)
protected

◆ FindRequestedTask()

SCR_RequestedTask SCR_BaseTaskManager.FindRequestedTask ( SCR_BaseTaskExecutor  requester)

◆ FindSupportEntity()

SCR_BaseTaskSupportEntity SCR_BaseTaskManager.FindSupportEntity ( TypeName  type)

◆ GetAssigneeAbandoned()

bool SCR_BaseTaskManager.GetAssigneeAbandoned ( SCR_BaseTaskExecutor  assignee)

◆ GetFilteredFinishedTasks()

int SCR_BaseTaskManager.GetFilteredFinishedTasks ( notnull out array< SCR_BaseTask tasks,
Faction  filterFaction = null 
)

Outs an array of tasks filtered by faction.

filterFaction param is the allowed faction!

◆ GetFilteredTasks()

int SCR_BaseTaskManager.GetFilteredTasks ( notnull out array< SCR_BaseTask tasks,
Faction  filterFaction = null 
)

Outs an array of tasks filtered by faction.

filterFaction param is the allowed faction!

◆ GetFinishedTask()

SCR_BaseTask SCR_BaseTaskManager.GetFinishedTask ( int  taskID)

Returns the found finished task if it exists.

◆ GetFinishedTasks()

int SCR_BaseTaskManager.GetFinishedTasks ( notnull out array< SCR_BaseTask tasks)

Outs an array of all of the finished tasks.

◆ GetReassignText()

string SCR_BaseTaskManager.GetReassignText ( )

◆ GetSupportedTasks()

array< SCR_BaseTaskSupportEntity > SCR_BaseTaskManager.GetSupportedTasks ( )

◆ GetTask()

SCR_BaseTask SCR_BaseTaskManager.GetTask ( int  taskID)

Returns the found task if it exists.

◆ GetTasks()

int SCR_BaseTaskManager.GetTasks ( notnull out array< SCR_BaseTask tasks)

Outs an array of all of the tasks.

◆ GetTimestamp()

float SCR_BaseTaskManager.GetTimestamp ( )

Returns the current timestamp.

◆ HasRequestedTask()

bool SCR_BaseTaskManager.HasRequestedTask ( int  playerID)

◆ Initialized()

bool SCR_BaseTaskManager.Initialized ( )

◆ IsProxy()

bool SCR_BaseTaskManager.IsProxy ( )

Checks if this entity is locally owned Public because it's also used by tasks as they don't have any RplComponents themselves.

◆ LoadTasksForRpl()

void SCR_BaseTaskManager.LoadTasksForRpl ( ScriptBitReader  reader,
int  count 
)

◆ LocalCreateTaskExecutor()

notnull SCR_BaseTaskExecutor SCR_BaseTaskManager.LocalCreateTaskExecutor ( int  playerID)

◆ LocalSpawnTask()

SCR_BaseTask SCR_BaseTaskManager.LocalSpawnTask ( ResourceName  resourceName)

Called from SpawnTask and RPC_SpawnTask methods Don't call directly!

◆ OnPlayerDisconnected()

void SCR_BaseTaskManager.OnPlayerDisconnected ( int  id)

An event called when a player disconnects Server only.

◆ OnPlayerRegistered()

void SCR_BaseTaskManager.OnPlayerRegistered ( int  registeredPlayerID)

◆ OnTaskCreated()

void SCR_BaseTaskManager.OnTaskCreated ( SCR_BaseTask  task)

An event called when a new task is created.

◆ OnTaskDeleted()

void SCR_BaseTaskManager.OnTaskDeleted ( SCR_BaseTask  task)

An event called when a task is deleted.

◆ OnTaskFinished()

void SCR_BaseTaskManager.OnTaskFinished ( SCR_BaseTask  task)

An event called when a task is finished.

◆ OnTaskUpdate()

void SCR_BaseTaskManager.OnTaskUpdate ( SCR_BaseTask  task,
SCR_ETaskEventMask  mask 
)

An event called whenever any task has been changed, updated, created.

◆ PeriodicalCheck2Second()

void SCR_BaseTaskManager.PeriodicalCheck2Second ( )
protected

◆ PeriodicalCheck5Second()

void SCR_BaseTaskManager.PeriodicalCheck5Second ( )
protected

◆ PeriodicalCheck60Second()

void SCR_BaseTaskManager.PeriodicalCheck60Second ( )
protected

◆ RefreshTaskList()

void SCR_BaseTaskManager.RefreshTaskList ( SCR_BaseTask  task = null)

Refresh task list.

◆ RegisterSupportEntity()

void SCR_BaseTaskManager.RegisterSupportEntity ( SCR_BaseTaskSupportEntity  supportEntity)

◆ RegisterTask()

void SCR_BaseTaskManager.RegisterTask ( SCR_BaseTask  task)

Registers Tasks and based on their State it inserts them to proper list.

◆ RequestAssignment()

void SCR_BaseTaskManager.RequestAssignment ( int  taskID,
notnull SCR_BaseTaskExecutor  assignee 
)

Used for assigning the task with given task ID to the assignee in parameter.

◆ RPC_SpawnTask()

void SCR_BaseTaskManager.RPC_SpawnTask ( ResourceName  resourceName,
int  taskID 
)
protected

Called by SpawnTask() Don't call directly!

◆ RplLoad()

override bool SCR_BaseTaskManager.RplLoad ( ScriptBitReader  reader)

◆ RplSave()

override bool SCR_BaseTaskManager.RplSave ( ScriptBitWriter  writer)

◆ SaveTasksForRpl()

void SCR_BaseTaskManager.SaveTasksForRpl ( ScriptBitWriter  writer,
array< SCR_BaseTask taskArray 
)

◆ SpawnTask()

SCR_BaseTask SCR_BaseTaskManager.SpawnTask ( ResourceName  resourceName)

Call this on the server only.

◆ UnregisterSupportEntity()

void SCR_BaseTaskManager.UnregisterSupportEntity ( SCR_BaseTaskSupportEntity  supportEntity)

◆ UpdateTasks()

void SCR_BaseTaskManager.UpdateTasks ( )

Member Data Documentation

◆ DEFAULT_ABANDON_WAITING_TIME

const float SCR_BaseTaskManager.DEFAULT_ABANDON_WAITING_TIME = 15
static

◆ m_aCachedTaskAssignments

ref array<ref SCR_TaskAssignmentData> SCR_BaseTaskManager.m_aCachedTaskAssignments = new array<ref SCR_TaskAssignmentData>()
protected

◆ m_aFinishedTaskList

ref array<SCR_BaseTask> SCR_BaseTaskManager.m_aFinishedTaskList = {}
protected

◆ m_aSupportedTaskTypes

ref array<SCR_BaseTaskSupportEntity> SCR_BaseTaskManager.m_aSupportedTaskTypes = {}
protected

◆ m_aTaskList

ref array<SCR_BaseTask> SCR_BaseTaskManager.m_aTaskList = new array<SCR_BaseTask>()
protected

◆ m_aTasksToDelete

ref array<SCR_BaseTask> SCR_BaseTaskManager.m_aTasksToDelete = {}
protected

◆ m_bInitialized

bool SCR_BaseTaskManager.m_bInitialized = false
protected

◆ m_fAssigneeCacheCheckTimestamp

float SCR_BaseTaskManager.m_fAssigneeCacheCheckTimestamp
protected

◆ m_fAssigneeCacheTimer

float SCR_BaseTaskManager.m_fAssigneeCacheTimer
protected

◆ m_fTimestamp

float SCR_BaseTaskManager.m_fTimestamp = 0
protected

◆ m_fTimestampTimer

float SCR_BaseTaskManager.m_fTimestampTimer = 0
protected

◆ m_mAssigneesAbandoned

ref map<SCR_BaseTaskExecutor, float> SCR_BaseTaskManager.m_mAssigneesAbandoned = new map<SCR_BaseTaskExecutor, float>()
protected

◆ m_mTaskEventMaskMap

ref map<SCR_BaseTask, SCR_ETaskEventMask> SCR_BaseTaskManager.m_mTaskEventMaskMap = new map<SCR_BaseTask, SCR_ETaskEventMask>()

◆ m_RplComponent

RplComponent SCR_BaseTaskManager.m_RplComponent
protected

◆ m_sAssignPopupGM

string SCR_BaseTaskManager.m_sAssignPopupGM

◆ m_sLocalRequestTitle

string SCR_BaseTaskManager.m_sLocalRequestTitle

◆ m_sReassignPopup

string SCR_BaseTaskManager.m_sReassignPopup

◆ s_OnPeriodicalCheck2Second

ref ScriptInvoker SCR_BaseTaskManager.s_OnPeriodicalCheck2Second = new ScriptInvoker()
static

◆ s_OnPeriodicalCheck5Second

ref ScriptInvoker SCR_BaseTaskManager.s_OnPeriodicalCheck5Second = new ScriptInvoker()
static

◆ s_OnPeriodicalCheck60Second

ref ScriptInvoker SCR_BaseTaskManager.s_OnPeriodicalCheck60Second = new ScriptInvoker()
static

◆ s_OnTaskAssigned

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskAssigned = new ScriptInvoker()
static

◆ s_OnTaskCancelled

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskCancelled = new ScriptInvoker()
static

◆ s_OnTaskCreated

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskCreated = new ScriptInvoker()
static

◆ s_OnTaskDeleted

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskDeleted = new ScriptInvoker()
static

◆ s_OnTaskFactionAssigned

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskFactionAssigned = new ScriptInvoker()
static

◆ s_OnTaskFailed

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskFailed = new ScriptInvoker()
static

◆ s_OnTaskFinished

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskFinished = new ScriptInvoker()
static

◆ s_OnTaskRemoved

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskRemoved = new ScriptInvoker()
static

◆ s_OnTaskUnassigned

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskUnassigned = new ScriptInvoker()
static

◆ s_OnTaskUpdate

ref ScriptInvoker SCR_BaseTaskManager.s_OnTaskUpdate = new ScriptInvoker()
static

The documentation for this interface was generated from the following file: