Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FactionCommanderPlayerComponent.c File Reference

Go to the source code of this file.

Classes

class  SCR_FactionCommanderPlayerComponentClass
 Handles interactions for the faction Commander role. Should be attached to player controller. More...

Functions

SCR_FactionCommanderMenuEntry GetConfigForEntry (notnull SCR_SelectionMenuEntry entry)
void SetReplaceCommanderCooldownTimestamp (WorldTimestamp timeStamp)
WorldTimestamp GetReplaceCommanderCooldownTimestamp ()
void OnCommanderRightsGained ()
void OnCommanderRightsLost ()
void SetNextVolunteeringTimestamp (WorldTimestamp timestamp)
WorldTimestamp GetNextVolunteeringTimestamp ()
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).
bool ShouldCategoryBeHidden (SCR_FactionCommanderMenuEntry configEntry, array< ref SCR_FactionCommanderMenuEntry > childEntries)
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 CreateRequestedTask (string taskPrefab, vector position, int requesterGroupId, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null)
void RpcAsk_CreateRequestedTask (string taskPrefab, vector destination, int requesterGroupId, int assigneeId, int playerId)
void CreateTask (ResourceName taskPrefab, vector position, SCR_AIGroup group, int playerId)
void RpcAsk_CreateTask (string taskPrefab, int assigneeId, int playerId, vector destination, int factionIndex)
void AssignGroupToTask (int groupId, string taskId)
void RpcAsk_AssignGroupToTask (int groupId, string taskId)
void CancelTask (string taskId)
void RpcAsk_CancelTask (string taskId)
void FinishTask (string taskId)
void RpcAsk_FinishTask (string taskId)
void OnEntryHovered (SCR_SelectionMenuEntry entry, int id)
void OnTaskHovered (SCR_Task task)
bool IsTaskValid (SCR_Task task)
void OnOwnershipChanged (bool changing, bool becameOwner)
void ProcessEvents (bool activate)
override void EOnInit (IEntity owner)
override void OnPostInit (IEntity owner)
 Editable Mine.

Variables

SCR_FactionCommanderPlayerComponentClass 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_FactionCommanderMenuEntry > m_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

Function Documentation

◆ AddCreateObjectiveOrder()

void AddCreateObjectiveOrder ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

Definition at line 210 of file SCR_FactionCommanderPlayerComponent.c.

◆ AddRequestOrder()

void AddRequestOrder ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

Definition at line 176 of file SCR_FactionCommanderPlayerComponent.c.

◆ AssignGroupToTask()

void AssignGroupToTask ( int groupId,
string taskId )
protected

Definition at line 889 of file SCR_FactionCommanderPlayerComponent.c.

◆ CancelTask()

void CancelTask ( string taskId)
protected

Cancel task

Parameters
[in]taskId

Definition at line 924 of file SCR_FactionCommanderPlayerComponent.c.

◆ ClearRadialMenu()

void ClearRadialMenu ( )
protected

Definition at line 710 of file SCR_FactionCommanderPlayerComponent.c.

◆ CreateConfigCategory()

void 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).

Definition at line 615 of file SCR_FactionCommanderPlayerComponent.c.

◆ CreateConfigEntries()

void CreateConfigEntries ( )
protected

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

Definition at line 477 of file SCR_FactionCommanderPlayerComponent.c.

◆ CreateConfigEntry()

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

Creates a radial menu entry from config data SCR_FactionCommanderMenuEntry.

Definition at line 555 of file SCR_FactionCommanderPlayerComponent.c.

◆ CreateRequestedTask()

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

Create requested task

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

Definition at line 764 of file SCR_FactionCommanderPlayerComponent.c.

◆ CreateTask()

void CreateTask ( ResourceName taskPrefab,
vector position,
SCR_AIGroup group,
int playerId )
protected

Create task

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

Definition at line 838 of file SCR_FactionCommanderPlayerComponent.c.

◆ FillMenuWithGroups()

void FillMenuWithGroups ( SCR_SelectionMenuCategoryEntry category,
notnull SCR_FactionCommanderBaseMenuHandler handler )
protected

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

Definition at line 244 of file SCR_FactionCommanderPlayerComponent.c.

◆ FinishTask()

void FinishTask ( string taskId)
protected

Finish task

Parameters
[in]taskId

Definition at line 972 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetAssignedGroup()

SCR_AIGroup GetAssignedGroup ( SCR_SelectionMenuEntry entry)
protected

Returns a group associated with given entry.

Definition at line 170 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetConfigForEntry()

SCR_FactionCommanderMenuEntry GetConfigForEntry ( notnull SCR_SelectionMenuEntry entry)
protected

Definition at line 89 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetCreateObjectiveOrderEntryDisplayName()

string GetCreateObjectiveOrderEntryDisplayName ( )
protected

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

Definition at line 368 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetCreateObjectiveOrderEntryIconData()

void 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.

Definition at line 385 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetDefaultCreateObjectiveOrderIcon()

string GetDefaultCreateObjectiveOrderIcon ( )
protected

Definition at line 391 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetDefaultGroupOrderIcon()

string GetDefaultGroupOrderIcon ( )
protected

Definition at line 311 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetDefaultRequestOrderIcon()

string GetDefaultRequestOrderIcon ( )
protected

Definition at line 351 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetEntryByName()

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

Definition at line 163 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetGroupEntryDisplayName()

string GetGroupEntryDisplayName ( SCR_AIGroup group)
protected

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

Definition at line 297 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetGroupEntryIconData()

void 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.

Definition at line 305 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetNextVolunteeringTimestamp()

WorldTimestamp GetNextVolunteeringTimestamp ( )
protected

Definition at line 156 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetReplaceCommanderCooldownTimestamp()

WorldTimestamp GetReplaceCommanderCooldownTimestamp ( )
protected

Definition at line 115 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetRequestOrderEntryDisplayName()

string GetRequestOrderEntryDisplayName ( )
protected

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

Definition at line 328 of file SCR_FactionCommanderPlayerComponent.c.

◆ GetRequestOrderEntryIconData()

void 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.

Definition at line 345 of file SCR_FactionCommanderPlayerComponent.c.

◆ IsTaskValid()

bool IsTaskValid ( SCR_Task task)
protected

Definition at line 1032 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnCommanderRightsGained()

void OnCommanderRightsGained ( )
protected

◆ OnCommanderRightsLost()

void OnCommanderRightsLost ( )
protected

◆ OnCommandPerformed()

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

Called when a radial menu action is triggered.

Definition at line 738 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnContextualMenuInit()

void OnContextualMenuInit ( )
protected

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

Definition at line 460 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnEntryHovered()

void OnEntryHovered ( SCR_SelectionMenuEntry entry,
int id )
protected

Definition at line 1009 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnMapClose()

void OnMapClose ( MapConfiguration config)
protected

Definition at line 430 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnMapOpen()

void OnMapOpen ( MapConfiguration config)
protected

Definition at line 407 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnRadialMenuBeforeOpen()

void OnRadialMenuBeforeOpen ( )
protected

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

Definition at line 686 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnRadialMenuClose()

void OnRadialMenuClose ( )
protected

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

Definition at line 703 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnRadialMenuOpen()

void OnRadialMenuOpen ( )
protected

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

Definition at line 694 of file SCR_FactionCommanderPlayerComponent.c.

◆ OnTaskHovered()

void OnTaskHovered ( SCR_Task task)
protected

Definition at line 1015 of file SCR_FactionCommanderPlayerComponent.c.

◆ ProcessEvents()

void ProcessEvents ( bool activate)
protected

Definition at line 1061 of file SCR_FactionCommanderPlayerComponent.c.

◆ RpcAsk_AssignGroupToTask()

void RpcAsk_AssignGroupToTask ( int groupId,
string taskId )
protected

Definition at line 896 of file SCR_FactionCommanderPlayerComponent.c.

◆ RpcAsk_CancelTask()

void RpcAsk_CancelTask ( string taskId)
protected

Definition at line 931 of file SCR_FactionCommanderPlayerComponent.c.

◆ RpcAsk_CreateRequestedTask()

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

Definition at line 779 of file SCR_FactionCommanderPlayerComponent.c.

◆ RpcAsk_CreateTask()

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

Definition at line 850 of file SCR_FactionCommanderPlayerComponent.c.

◆ RpcAsk_FinishTask()

void RpcAsk_FinishTask ( string taskId)
protected

Definition at line 979 of file SCR_FactionCommanderPlayerComponent.c.

◆ SetNextVolunteeringTimestamp()

void SetNextVolunteeringTimestamp ( WorldTimestamp timestamp)
protected

Definition at line 149 of file SCR_FactionCommanderPlayerComponent.c.

◆ SetReplaceCommanderCooldownTimestamp()

void SetReplaceCommanderCooldownTimestamp ( WorldTimestamp timeStamp)
protected

Definition at line 109 of file SCR_FactionCommanderPlayerComponent.c.

◆ ShouldCategoryBeHidden()

bool ShouldCategoryBeHidden ( SCR_FactionCommanderMenuEntry configEntry,
array< ref SCR_FactionCommanderMenuEntry > childEntries )
protected

Definition at line 529 of file SCR_FactionCommanderPlayerComponent.c.

Variable Documentation

◆ m_bMenuVisible

◆ m_bShouldClearHoveredTask

bool m_bShouldClearHoveredTask
protected

Definition at line 78 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_CurrentHoveredEntity

IEntity m_CurrentHoveredEntity
protected

Definition at line 66 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_CurrentHoveredTask

SCR_Task m_CurrentHoveredTask
protected

Definition at line 65 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_fNextVolunteeringAvailableAt

WorldTimestamp m_fNextVolunteeringAvailableAt
protected

Definition at line 75 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_GroupTaskManager

SCR_GroupTaskManagerComponent m_GroupTaskManager
protected

Definition at line 81 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_HoveredEntity

IEntity m_HoveredEntity
protected

Definition at line 63 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_HoveredTask

SCR_Task m_HoveredTask
protected

Definition at line 64 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_MapContextualMenu

SCR_MapRadialUI m_MapContextualMenu
protected

Definition at line 55 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_MapCursorModule

SCR_MapCursorModule m_MapCursorModule
protected

Definition at line 77 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_MapEntity

SCR_MapEntity m_MapEntity
protected

Definition at line 61 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_mEntryGroups

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

Definition at line 70 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_mEntryHandlers

◆ m_mEntryNames

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

Definition at line 68 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_mEntryParents

◆ m_mTaskRootMenuEntries

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

Definition at line 72 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_PlayerController

SCR_PlayerController m_PlayerController
protected

Definition at line 59 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_RadialMenu

SCR_RadialMenu m_RadialMenu
protected

Definition at line 57 of file SCR_FactionCommanderPlayerComponent.c.

◆ m_ReplaceCommanderCooldown

WorldTimestamp m_ReplaceCommanderCooldown
protected

Definition at line 80 of file SCR_FactionCommanderPlayerComponent.c.