1[
EntityEditorProps(
category:
"GameScripted/Tasks", description:
"This is a task manager related component that allows you to display the available tasks.", color:
"0 0 255 255")]
28 [
Attribute(
"{EE9497AB43F556F9}UI/layouts/Tasks/CurrentTask.layout")]
31 [
Attribute(
"5",
UIWidgets.EditBox,
"Defines duration of current task display (in seconds)")]
34 [
Attribute(
"{10C0A9A305E8B3A4}UI/Imagesets/Tasks/Task_Icons.imageset")]
40 [
Attribute(
"1",
desc:
"Defines whether number of people assigned to task should be displayed on map task marker")]
46 [
Attribute(
"{C9D32771B2166F77}Configs/Task/TasksTabConfig_Base.conf",
UIWidgets.ResourceNamePicker,
params:
"conf class=SCR_TasksTabConfig")]
119 if (
System.IsConsoleApp())
150 if (playerID <= 0 || !faction)
164 if (!currentTaskComp)
231 float screenX, screenY;
232 m_MapEntity.WorldToScreen(taskPos[0], taskPos[2], screenX, screenY);
241 PlayerController localPlayerController =
GetGame().GetPlayerController();
242 if (!localPlayerController)
245 SCR_TaskSystemNetworkComponent networkComponent = SCR_TaskSystemNetworkComponent.Cast(localPlayerController.FindComponent(SCR_TaskSystemNetworkComponent));
246 if (!networkComponent)
249 int playerID = localPlayerController.GetPlayerId();
265 networkComponent.UnassignTask(
m_AssignedTask, executor, playerID);
275 networkComponent.AssignTask(
task, executor,
true, playerID);
340 if (!characterController)
357 if (!playerController)
361 if (playerId != localPlayerID)
366 SCR_PlayerControllerGroupComponent groupComponent = SCR_PlayerControllerGroupComponent.Cast(playerController.FindComponent(SCR_PlayerControllerGroupComponent));
375 if (!playerController)
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void SCR_FactionManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
void SCR_Task(IEntitySource src, IEntity parent)
ScriptInvokerBase< TaskSelected > SCR_TaskSelectedInvoker
ScriptInvokerBase< TaskBackgroundUpdated > SCR_TaskBackgroundUpdatedInvoker
func TaskBackgroundUpdated
ScriptInvokerBase< TaskColorsUpdated > SCR_TaskColorsUpdatedInvoker
ScriptInvokerBase< TaskAssigned > SCR_TaskAssignedInvoker
ScriptInvokerBase< TaskHovered > SCR_TaskHoveredInvoker
ScriptInvokerBase< SCR_BaseGameMode_PlayerId > GetOnPlayerConnected()
ScriptInvokerBase< SCR_BaseGameMode_PlayerId > GetOnPlayerRegistered()
ref OnLifeStateChangedInvoker m_OnLifeStateChanged
void UpdateTask(SCR_Task task)
void SetGadgetMode(IEntity gadget, EGadgetMode targetMode, bool doFocus=false)
IEntity GetGadgetByType(EGadgetType type)
static SCR_GadgetManagerComponent GetGadgetManager(IEntity entity)
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapClose()
Get on map close invoker.
SCR_MapUIBaseComponent GetMapUIComponent(typename componentType)
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapOpen()
Get on map open invoker.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
void SetJournalVisibility(bool visibility)
void ToggleTaskList(bool visibility)
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
ref OnControlledEntityChangedPlayerControllerInvoker m_OnControlledEntityChanged
static IEntity GetLocalControlledEntity()
const string CONTENT_TASK_LIST_MAP
override void EOnFrame(IEntity owner, float timeSlice)
SCR_Task GetAssigedTask()
SCR_MapJournalUI m_JournalComponent
void OnClientControlledEntityChanged(IEntity from, IEntity to)
ref ScriptInvokerBool m_OnTaskHUDVisible
float m_fCurrentTaskShowTime
void SetSelectedTask(SCR_Task task)
void OnMapOpen(MapConfiguration config)
SCR_TaskListEntryDescriptionUIComponent GetTaskDescriptionComponent()
SCR_MapEntity m_MapEntity
SCR_TaskBackgroundUpdatedInvoker GetOnTaskBackgroundUpdated()
ref SCR_TaskSelectedInvoker m_OnTaskSelected
const string ACTION_CLOSE_TASK_LIST
void TaskHUDVisibilityChanged(bool newVisibility)
Invokes whenever task list on HUD is shown.
void SetHoveredTask(SCR_Task task)
ref SCR_TaskBackgroundUpdatedInvoker m_OnTaskBackgroundUpdate
override void EOnInit(IEntity owner)
SCR_TaskListUIComponent GetTaskListComponent()
void ToggleCurrentTask()
Displays a hint with currently selected task.
bool SetTaskDescriptionVisiblity(bool newVisibility)
ref SCR_TasksTabConfig m_TaskTabConfig
void SetTaskListVisibility(bool newVisibility)
void UpdateTaskColors(Color backgroundColor, Color iconColor, Color outlineColor)
void OnClientPlayerRegistered(int playerId)
array< ref SCR_TaskUIColorPresetList > GetTaskUIColorPresetList()
SCR_TaskListUIComponent m_TaskListComponent
void SetJournalVisibility(bool newVisibility)
void PanMapToTask(string taskID=string.Empty, SCR_Task task=null)
SCR_TaskAssignedInvoker GetOnTaskAssigned()
static SCR_TaskManagerUIComponent GetInstance()
SCR_Task GetSelectedTask()
bool m_bCurrentTaskVisible
void ~SCR_TaskManagerUIComponent()
ref SCR_TaskHoveredInvoker m_OnTaskHovered
SCR_TaskSelectedInvoker GetOnTaskSelected()
array< SCR_ETaskTabType > GetTaskTabs()
void OnGroupChanged(int groupID)
SCR_TaskSystem m_TaskSystem
SCR_TaskColorsUpdatedInvoker GetOnTaskColorsUpdated()
ref SCR_TaskAssignedInvoker m_OnTaskAssigned
void ShowTaskOnMap()
Requests panning map to task. If map is not opened - opens it.
static SCR_TaskManagerUIComponent s_Instance
void UpdateTaskBackground(ResourceName imageset, string name)
void RegisterTaskList(SCR_TaskListUIComponent component)
void OnMapClose(MapConfiguration config)
void SCR_TaskManagerUIComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
ResourceName GetDefaultImageset()
SCR_ETaskTabType GetDefaultTaskTab()
SCR_TaskHoveredInvoker GetOnTaskHovered()
ref array< ref SCR_TaskUIColorPresetList > m_aTaskUIColorPresetList
void LifeStateChanged(ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
bool GetDisplayAssigneesOnMap()
bool m_bDisplayOfAssigneesOnMap
ResourceName m_sTaskTabConfig
void CloseTaskList()
Closes task list.
bool m_bShowCurrentTaskOnRespawn
void OnControlledEntityChanged(IEntity from, IEntity to)
ref SCR_TaskColorsUpdatedInvoker m_OnTaskColorsUpdate
ResourceName m_sTaskHintLayout
ScriptInvokerBool GetOnTaskHUDVisible()
ResourceName m_sDefaultImageset
void AssignTask(SCR_Task task=null)
override void OnPlayerConnected(int playerId)
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
proto external PlayerController GetPlayerController()