Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_FactionCommanderPlayerComponent Interface Reference
Inheritance diagram for SCR_FactionCommanderPlayerComponent:
SCR_CampaignFactionCommanderPlayerComponent

Public Member Functions

SCR_FactionCommanderMenuEntry GetConfigForEntry (notnull SCR_SelectionMenuEntry entry)
 
void SetReplaceCommanderCooldownTimestamp (WorldTimestamp timeStamp)
 
WorldTimestamp GetReplaceCommanderCooldownTimestamp ()
 
void OnCommanderRightsGained ()
 
void OnCommanderRightsLost ()
 
void SetNextVolunteeringTimestamp (WorldTimestamp timestamp)
 
WorldTimestamp GetNextVolunteeringTimestamp ()
 
void CreateRequestedTask (string taskPrefab, vector position, int requesterGroupId, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null)
 Create requested task.
 
void CreateTask (ResourceName taskPrefab, vector position, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null)
 Create task.
 
void AssignGroupToTask (int groupId, string taskId, int requesterID)
 
void CancelTask (int playerId, string taskId)
 
void FinishTask (int playerId, string taskId)
 Finish task.
 
void OnOwnershipChanged (bool changing, bool becameOwner)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Static Public Member Functions

static int GenerateTaskID ()
 
static bool IsLocalPlayerCommander ()
 

Static Public Attributes

static const string TASK_ID = "%1_Task_%2"
 
static const string REQUESTED_TASK_ID = "%1_RequestedTask_%2"
 

Protected Member Functions

SCR_SelectionMenuEntry GetEntryByName (string name)
 
SCR_AIGroup GetAssignedGroup (SCR_SelectionMenuEntry entry)
 Returns a group associated with given entry.
 
void AddRequestOrder (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 
void AddCreateObjectiveOrder (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 
void FillMenuWithGroups (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 Adds all groups of Commander's faction under a given category as menu entries.
 
string GetGroupEntryDisplayName (SCR_AIGroup group)
 Returns the display name to be shown in radial menu for the given group.
 
void GetGroupEntryIconData (SCR_AIGroup group, out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the given group and category.
 
string GetDefaultGroupOrderIcon ()
 
string GetRequestOrderEntryDisplayName ()
 Returns the display name to be shown in radial menu for the Request order category.
 
void GetRequestOrderEntryIconData (out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the Faction order category.
 
string GetDefaultRequestOrderIcon ()
 
string GetCreateObjectiveOrderEntryDisplayName ()
 Returns the display name to be shown in radial menu for the create objective order.
 
void GetCreateObjectiveOrderEntryIconData (out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the create objective order.
 
string GetDefaultCreateObjectiveOrderIcon ()
 
void OnMapOpen (MapConfiguration config)
 
void OnMapClose (MapConfiguration config)
 
void OnContextualMenuInit ()
 Called when opening the radial menu for the first time after opening the map.
 
void CreateConfigEntries ()
 Adds entries as defined in the hierarchy config (stored in SCR_Faction)
 
void CreateConfigEntry (notnull SCR_FactionCommanderMenuEntry configEntry, SCR_SelectionMenuCategoryEntry parentCategory, SCR_FactionCommanderMenuEntry rootConfigEntry)
 Creates a radial menu entry from config data SCR_FactionCommanderMenuEntry.
 
void CreateConfigCategory (notnull SCR_FactionCommanderMenuEntry configEntry, SCR_SelectionMenuCategoryEntry parentCategory, notnull array< ref SCR_FactionCommanderMenuEntry > childEntries, SCR_FactionCommanderMenuEntry rootConfigEntry)
 Creates a radial menu category from config data (SCR_FactionCommanderMenuEntry)
 
void OnRadialMenuBeforeOpen ()
 Called each time the radial menu is before open in the map.
 
void OnRadialMenuOpen ()
 Called each time the radial menu is open in the map.
 
void OnRadialMenuClose ()
 Called each time the radial menu is closed in the map.
 
void ClearRadialMenu ()
 
void OnCommandPerformed (SCR_SelectionMenuEntry element, float[] worldPos)
 Called when a radial menu action is triggered.
 
void RpcAsk_CreateRequestedTask (string taskPrefab, vector destination, int requesterGroupId, int assigneeId, int playerId)
 
void RpcAsk_CreateTask (string taskPrefab, int assigneeId, int playerId, vector destination, int factionIndex, int data)
 
void RpcAsk_AssignGroupToTask (int groupId, string taskId, int requesterID)
 
void RpcAsk_CancelTask (int playerId, string taskId)
 
void RpcAsk_FinishTask (int playerId, string taskId)
 
void OnEntryHovered (SCR_SelectionMenuEntry entry, int id)
 
void OnTaskHovered (SCR_Task task)
 
bool IsTaskValid (SCR_Task task)
 
void ProcessEvents (bool activate)
 

Protected Attributes

bool m_bMenuVisible
 
SCR_MapRadialUI m_MapContextualMenu
 
SCR_RadialMenu m_RadialMenu
 
SCR_PlayerController m_PlayerController
 
SCR_MapEntity m_MapEntity
 
IEntity m_HoveredEntity
 
SCR_Task m_HoveredTask
 
SCR_Task m_CurrentHoveredTask
 
IEntity m_CurrentHoveredEntity
 
ref map< string, SCR_SelectionMenuEntrym_mEntryNames = new map<string, SCR_SelectionMenuEntry>()
 
ref map< SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntrym_mEntryParents = new map<SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntry>()
 
ref map< SCR_SelectionMenuEntry, SCR_AIGroupm_mEntryGroups = new map<SCR_SelectionMenuEntry, SCR_AIGroup>()
 
ref map< SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandlerm_mEntryHandlers = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandler>()
 
ref map< SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntrym_mTaskRootMenuEntries = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntry>()
 
WorldTimestamp m_fNextVolunteeringAvailableAt
 
SCR_MapCursorModule m_MapCursorModule
 
bool m_bShouldClearHoveredTask
 
WorldTimestamp m_ReplaceCommanderCooldown
 
SCR_GroupTaskManagerComponent m_GroupTaskManager
 

Static Protected Attributes

static int s_iLastGeneratedTaskId
 

Member Function Documentation

◆ AddCreateObjectiveOrder()

void SCR_FactionCommanderPlayerComponent.AddCreateObjectiveOrder ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

◆ AddRequestOrder()

void SCR_FactionCommanderPlayerComponent.AddRequestOrder ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

◆ AssignGroupToTask()

void SCR_FactionCommanderPlayerComponent.AssignGroupToTask ( int groupId,
string taskId,
int requesterID )

◆ CancelTask()

void SCR_FactionCommanderPlayerComponent.CancelTask ( int playerId,
string taskId )

◆ ClearRadialMenu()

void SCR_FactionCommanderPlayerComponent.ClearRadialMenu ( )
protected

◆ CreateConfigCategory()

void SCR_FactionCommanderPlayerComponent.CreateConfigCategory ( notnull SCR_FactionCommanderMenuEntry configEntry,
SCR_SelectionMenuCategoryEntry parentCategory,
notnull array< ref SCR_FactionCommanderMenuEntry > childEntries,
SCR_FactionCommanderMenuEntry rootConfigEntry )
protected

Creates a radial menu category from config data (SCR_FactionCommanderMenuEntry)

◆ CreateConfigEntries()

void SCR_FactionCommanderPlayerComponent.CreateConfigEntries ( )
protected

Adds entries as defined in the hierarchy config (stored in SCR_Faction)

◆ CreateConfigEntry()

void SCR_FactionCommanderPlayerComponent.CreateConfigEntry ( notnull SCR_FactionCommanderMenuEntry configEntry,
SCR_SelectionMenuCategoryEntry parentCategory,
SCR_FactionCommanderMenuEntry rootConfigEntry )
protected

Creates a radial menu entry from config data SCR_FactionCommanderMenuEntry.

◆ CreateRequestedTask()

void SCR_FactionCommanderPlayerComponent.CreateRequestedTask ( string taskPrefab,
vector position,
int requesterGroupId,
SCR_AIGroup group,
int playerId,
SCR_FactionCommanderBaseMenuHandler handler = null )

Create requested task.

Parameters
[in]taskPrefab
[in]position
[in]requesterGroupId
[in]group
[in]playerId
[in]handler

◆ CreateTask()

void SCR_FactionCommanderPlayerComponent.CreateTask ( ResourceName taskPrefab,
vector position,
SCR_AIGroup group,
int playerId,
SCR_FactionCommanderBaseMenuHandler handler = null )

Create task.

Parameters
[in]taskPrefab
[in]position
[in]group
[in]playerId
[in]handler

◆ EOnInit()

override void SCR_FactionCommanderPlayerComponent.EOnInit ( IEntity owner)

◆ FillMenuWithGroups()

void SCR_FactionCommanderPlayerComponent.FillMenuWithGroups ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

Adds all groups of Commander's faction under a given category as menu entries.

◆ FinishTask()

void SCR_FactionCommanderPlayerComponent.FinishTask ( int playerId,
string taskId )

Finish task.

Parameters
[in]playerId
[in]taskId

◆ GenerateTaskID()

static int SCR_FactionCommanderPlayerComponent.GenerateTaskID ( )
static

◆ GetAssignedGroup()

SCR_AIGroup SCR_FactionCommanderPlayerComponent.GetAssignedGroup ( SCR_SelectionMenuEntry entry)
protected

Returns a group associated with given entry.

◆ GetConfigForEntry()

SCR_FactionCommanderMenuEntry SCR_FactionCommanderPlayerComponent.GetConfigForEntry ( notnull SCR_SelectionMenuEntry entry)

◆ GetCreateObjectiveOrderEntryDisplayName()

string SCR_FactionCommanderPlayerComponent.GetCreateObjectiveOrderEntryDisplayName ( )
protected

Returns the display name to be shown in radial menu for the create objective order.

◆ GetCreateObjectiveOrderEntryIconData()

void SCR_FactionCommanderPlayerComponent.GetCreateObjectiveOrderEntryIconData ( out ResourceName imagesetName,
out string iconName )
protected

Returns the imageset and icon name to be shown in radial menu for the create objective order.

◆ GetDefaultCreateObjectiveOrderIcon()

string SCR_FactionCommanderPlayerComponent.GetDefaultCreateObjectiveOrderIcon ( )
protected

◆ GetDefaultGroupOrderIcon()

string SCR_FactionCommanderPlayerComponent.GetDefaultGroupOrderIcon ( )
protected

◆ GetDefaultRequestOrderIcon()

string SCR_FactionCommanderPlayerComponent.GetDefaultRequestOrderIcon ( )
protected

◆ GetEntryByName()

SCR_SelectionMenuEntry SCR_FactionCommanderPlayerComponent.GetEntryByName ( string name)
protected
Parameters
nameEntry name as defined in the config (SCR_FactionCommanderMenuHierarchy)

◆ GetGroupEntryDisplayName()

string SCR_FactionCommanderPlayerComponent.GetGroupEntryDisplayName ( SCR_AIGroup group)
protected

Returns the display name to be shown in radial menu for the given group.

◆ GetGroupEntryIconData()

void SCR_FactionCommanderPlayerComponent.GetGroupEntryIconData ( SCR_AIGroup group,
out ResourceName imagesetName,
out string iconName )
protected

Returns the imageset and icon name to be shown in radial menu for the given group and category.

◆ GetNextVolunteeringTimestamp()

WorldTimestamp SCR_FactionCommanderPlayerComponent.GetNextVolunteeringTimestamp ( )

◆ GetReplaceCommanderCooldownTimestamp()

WorldTimestamp SCR_FactionCommanderPlayerComponent.GetReplaceCommanderCooldownTimestamp ( )

◆ GetRequestOrderEntryDisplayName()

string SCR_FactionCommanderPlayerComponent.GetRequestOrderEntryDisplayName ( )
protected

Returns the display name to be shown in radial menu for the Request order category.

◆ GetRequestOrderEntryIconData()

void SCR_FactionCommanderPlayerComponent.GetRequestOrderEntryIconData ( out ResourceName imagesetName,
out string iconName )
protected

Returns the imageset and icon name to be shown in radial menu for the Faction order category.

◆ IsLocalPlayerCommander()

static bool SCR_FactionCommanderPlayerComponent.IsLocalPlayerCommander ( )
static

◆ IsTaskValid()

bool SCR_FactionCommanderPlayerComponent.IsTaskValid ( SCR_Task task)
protected

◆ OnCommanderRightsGained()

void SCR_FactionCommanderPlayerComponent.OnCommanderRightsGained ( )

◆ OnCommanderRightsLost()

void SCR_FactionCommanderPlayerComponent.OnCommanderRightsLost ( )

◆ OnCommandPerformed()

void SCR_FactionCommanderPlayerComponent.OnCommandPerformed ( SCR_SelectionMenuEntry element,
float[] worldPos )
protected

Called when a radial menu action is triggered.

◆ OnContextualMenuInit()

void SCR_FactionCommanderPlayerComponent.OnContextualMenuInit ( )
protected

Called when opening the radial menu for the first time after opening the map.

◆ OnEntryHovered()

void SCR_FactionCommanderPlayerComponent.OnEntryHovered ( SCR_SelectionMenuEntry entry,
int id )
protected

◆ OnMapClose()

void SCR_FactionCommanderPlayerComponent.OnMapClose ( MapConfiguration config)
protected

◆ OnMapOpen()

void SCR_FactionCommanderPlayerComponent.OnMapOpen ( MapConfiguration config)
protected

◆ OnOwnershipChanged()

void SCR_FactionCommanderPlayerComponent.OnOwnershipChanged ( bool changing,
bool becameOwner )

◆ OnPostInit()

override void SCR_FactionCommanderPlayerComponent.OnPostInit ( IEntity owner)

◆ OnRadialMenuBeforeOpen()

void SCR_FactionCommanderPlayerComponent.OnRadialMenuBeforeOpen ( )
protected

Called each time the radial menu is before open in the map.

Implemented in SCR_CampaignFactionCommanderPlayerComponent.

◆ OnRadialMenuClose()

void SCR_FactionCommanderPlayerComponent.OnRadialMenuClose ( )
protected

Called each time the radial menu is closed in the map.

◆ OnRadialMenuOpen()

void SCR_FactionCommanderPlayerComponent.OnRadialMenuOpen ( )
protected

Called each time the radial menu is open in the map.

◆ OnTaskHovered()

void SCR_FactionCommanderPlayerComponent.OnTaskHovered ( SCR_Task task)
protected

◆ ProcessEvents()

void SCR_FactionCommanderPlayerComponent.ProcessEvents ( bool activate)
protected

◆ RpcAsk_AssignGroupToTask()

void SCR_FactionCommanderPlayerComponent.RpcAsk_AssignGroupToTask ( int groupId,
string taskId,
int requesterID )
protected

◆ RpcAsk_CancelTask()

void SCR_FactionCommanderPlayerComponent.RpcAsk_CancelTask ( int playerId,
string taskId )
protected

◆ RpcAsk_CreateRequestedTask()

void SCR_FactionCommanderPlayerComponent.RpcAsk_CreateRequestedTask ( string taskPrefab,
vector destination,
int requesterGroupId,
int assigneeId,
int playerId )
protected

◆ RpcAsk_CreateTask()

void SCR_FactionCommanderPlayerComponent.RpcAsk_CreateTask ( string taskPrefab,
int assigneeId,
int playerId,
vector destination,
int factionIndex,
int data )
protected

◆ RpcAsk_FinishTask()

void SCR_FactionCommanderPlayerComponent.RpcAsk_FinishTask ( int playerId,
string taskId )
protected

◆ SetNextVolunteeringTimestamp()

void SCR_FactionCommanderPlayerComponent.SetNextVolunteeringTimestamp ( WorldTimestamp timestamp)

◆ SetReplaceCommanderCooldownTimestamp()

void SCR_FactionCommanderPlayerComponent.SetReplaceCommanderCooldownTimestamp ( WorldTimestamp timeStamp)

Member Data Documentation

◆ m_bMenuVisible

bool SCR_FactionCommanderPlayerComponent.m_bMenuVisible
protected

◆ m_bShouldClearHoveredTask

bool SCR_FactionCommanderPlayerComponent.m_bShouldClearHoveredTask
protected

◆ m_CurrentHoveredEntity

IEntity SCR_FactionCommanderPlayerComponent.m_CurrentHoveredEntity
protected

◆ m_CurrentHoveredTask

SCR_Task SCR_FactionCommanderPlayerComponent.m_CurrentHoveredTask
protected

◆ m_fNextVolunteeringAvailableAt

WorldTimestamp SCR_FactionCommanderPlayerComponent.m_fNextVolunteeringAvailableAt
protected

◆ m_GroupTaskManager

SCR_GroupTaskManagerComponent SCR_FactionCommanderPlayerComponent.m_GroupTaskManager
protected

◆ m_HoveredEntity

IEntity SCR_FactionCommanderPlayerComponent.m_HoveredEntity
protected

◆ m_HoveredTask

SCR_Task SCR_FactionCommanderPlayerComponent.m_HoveredTask
protected

◆ m_MapContextualMenu

SCR_MapRadialUI SCR_FactionCommanderPlayerComponent.m_MapContextualMenu
protected

◆ m_MapCursorModule

SCR_MapCursorModule SCR_FactionCommanderPlayerComponent.m_MapCursorModule
protected

◆ m_MapEntity

SCR_MapEntity SCR_FactionCommanderPlayerComponent.m_MapEntity
protected

◆ m_mEntryGroups

ref map<SCR_SelectionMenuEntry, SCR_AIGroup> SCR_FactionCommanderPlayerComponent.m_mEntryGroups = new map<SCR_SelectionMenuEntry, SCR_AIGroup>()
protected

◆ m_mEntryHandlers

ref map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandler> SCR_FactionCommanderPlayerComponent.m_mEntryHandlers = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandler>()
protected

◆ m_mEntryNames

ref map<string, SCR_SelectionMenuEntry> SCR_FactionCommanderPlayerComponent.m_mEntryNames = new map<string, SCR_SelectionMenuEntry>()
protected

◆ m_mEntryParents

ref map<SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntry> SCR_FactionCommanderPlayerComponent.m_mEntryParents = new map<SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntry>()
protected

◆ m_mTaskRootMenuEntries

ref map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntry> SCR_FactionCommanderPlayerComponent.m_mTaskRootMenuEntries = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntry>()
protected

◆ m_PlayerController

SCR_PlayerController SCR_FactionCommanderPlayerComponent.m_PlayerController
protected

◆ m_RadialMenu

SCR_RadialMenu SCR_FactionCommanderPlayerComponent.m_RadialMenu
protected

◆ m_ReplaceCommanderCooldown

WorldTimestamp SCR_FactionCommanderPlayerComponent.m_ReplaceCommanderCooldown
protected

◆ REQUESTED_TASK_ID

const string SCR_FactionCommanderPlayerComponent.REQUESTED_TASK_ID = "%1_RequestedTask_%2"
static

◆ s_iLastGeneratedTaskId

int SCR_FactionCommanderPlayerComponent.s_iLastGeneratedTaskId
staticprotected

◆ TASK_ID

const string SCR_FactionCommanderPlayerComponent.TASK_ID = "%1_Task_%2"
static

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