Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CallsignManagerComponent Class Reference
Inheritance diagram for SCR_CallsignManagerComponent:

Protected Member Functions

bool GetEntityCallsignIndexes (IEntity entity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex)
bool GetEntityCallsignIndexes (SCR_EditableEntityComponent editableEntity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex)
bool GetEntityCallsignNames (IEntity entity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format)
bool GetEntityCallsignNames (SCR_EditableEntityComponent editableEntity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format)
void AssignCallGroupCallsign (notnull SCR_AIGroup group, Faction faction, SCR_CallsignGroupComponent masterCallsignComponent, out int companyIndex, out int platoonIndex, out int squadIndex)
void AssignFirstAvailableGroupCallsign (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex)
void AssignCompanySpecificGroupCallsign (Faction faction, out int specificCompanyIndex, out int platoonIndex, out int squadIndex)
void AssignGroupRoleSpecificGroupCallsign (Faction faction, notnull SCR_AIGroup group, out int companyIndex, out int platoonIndex, out int squadIndex)
void AssignRandomGroupCallsigns (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex)
void MakeGroupCallsignAvailible (Faction faction, int companyIndex, int platoonIndex, int squadIndex)
void RemoveAvailableGroupCallsign (Faction faction, int companyIndex, int platoonIndex, int squadIndex)
void AssignRandomDuplicateCallsign (Faction faction, out int company, out int platoon, out int squad)
 If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns.
void OnPlayerSpawn (int playerId, IEntity playerEntity)
 Assign callsign for players when they are spawned (Server Only).
void SetPlayerCallsign (int playerId, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign characterRole=ERoleCallsign.NONE)
void OnPlayerLeftGame (int playerId)
bool GetPlayerCallsign (int playerId, out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE)
ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChangedGetOnPlayerCallsignChanged ()
 Returns ScriptInvoker on player callsign changed.
void FillAvailableCallsigns ()
override void EOnInit (IEntity owner)
override void OnPostInit (IEntity owner)
void ~SCR_CallsignManagerComponent ()

Protected Attributes

ref map< Faction, ref SCR_FactionCallsignDatam_mAvailableCallsigns = new map<Faction, ref SCR_FactionCallsignData>
 All available callsigns are stored here.
ref array< ref array< int > > m_aDuplicateCallsigns = {}
 Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates.
ref map< int, ref SCR_PlayerCallsignDatam_mPlayerCallsignData = new map<int, ref SCR_PlayerCallsignData>
 Holds all the callsigns that are assigned to players.
ref ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChangedm_OnPlayerCallsignChanged = new ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged>()
SCR_GroupsManagerComponent m_GroupManager

Detailed Description

Definition at line 12 of file SCR_CallsignManagerComponent.c.

Constructor & Destructor Documentation

◆ ~SCR_CallsignManagerComponent()

void SCR_CallsignManagerComponent::~SCR_CallsignManagerComponent ( )
inlineprotected

Definition at line 465 of file SCR_CallsignManagerComponent.c.

Member Function Documentation

◆ AssignCallGroupCallsign()

void SCR_CallsignManagerComponent::AssignCallGroupCallsign ( notnull SCR_AIGroup group,
Faction faction,
SCR_CallsignGroupComponent masterCallsignComponent,
out int companyIndex,
out int platoonIndex,
out int squadIndex )
inlineprotected

Uses the faction to get available company, platoon and squad index and makes these unavailable so they are not picked until available again

Parameters
[in]groupto assign callsign
[in]factionfaction to assign callsigns
[out]companyIndexto assign
[out]platoonIndexto assign
[out]squadIndexto assign

Definition at line 103 of file SCR_CallsignManagerComponent.c.

◆ AssignCompanySpecificGroupCallsign()

void SCR_CallsignManagerComponent::AssignCompanySpecificGroupCallsign ( Faction faction,
out int specificCompanyIndex,
out int platoonIndex,
out int squadIndex )
inlineprotected

Definition at line 161 of file SCR_CallsignManagerComponent.c.

◆ AssignFirstAvailableGroupCallsign()

void SCR_CallsignManagerComponent::AssignFirstAvailableGroupCallsign ( Faction faction,
out int companyIndex,
out int platoonIndex,
out int squadIndex )
inlineprotected

Definition at line 142 of file SCR_CallsignManagerComponent.c.

◆ AssignGroupRoleSpecificGroupCallsign()

void SCR_CallsignManagerComponent::AssignGroupRoleSpecificGroupCallsign ( Faction faction,
notnull SCR_AIGroup group,
out int companyIndex,
out int platoonIndex,
out int squadIndex )
inlineprotected

Definition at line 179 of file SCR_CallsignManagerComponent.c.

◆ AssignRandomDuplicateCallsign()

void SCR_CallsignManagerComponent::AssignRandomDuplicateCallsign ( Faction faction,
out int company,
out int platoon,
out int squad )
inlineprotected

If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns.

Definition at line 269 of file SCR_CallsignManagerComponent.c.

◆ AssignRandomGroupCallsigns()

void SCR_CallsignManagerComponent::AssignRandomGroupCallsigns ( Faction faction,
out int companyIndex,
out int platoonIndex,
out int squadIndex )
inlineprotected
Parameters
[in]faction
[out]companyIndex
[out]platoonIndex
[out]squadIndex

Definition at line 208 of file SCR_CallsignManagerComponent.c.

◆ EOnInit()

override void SCR_CallsignManagerComponent::EOnInit ( IEntity owner)
inlineprotected

Definition at line 435 of file SCR_CallsignManagerComponent.c.

◆ FillAvailableCallsigns()

void SCR_CallsignManagerComponent::FillAvailableCallsigns ( )
inlineprotected

Definition at line 390 of file SCR_CallsignManagerComponent.c.

◆ GetEntityCallsignIndexes() [1/2]

bool SCR_CallsignManagerComponent::GetEntityCallsignIndexes ( IEntity entity,
out int companyCallsignIndex,
out int platoonCallsignIndex,
out int squadCallsignIndex,
out int characterCallsignIndex )
inlineprotected

Get the callsign indexes assigned to entity

Parameters
[in]entityIEntity to get callsign off
[out]companyindex
[out]platoonindex
[out]squadindex
[out]characterindex, either role or character index, will return -1 if not a character
Returns
bool returns false if indexes are not assigned

Definition at line 40 of file SCR_CallsignManagerComponent.c.

◆ GetEntityCallsignIndexes() [2/2]

bool SCR_CallsignManagerComponent::GetEntityCallsignIndexes ( SCR_EditableEntityComponent editableEntity,
out int companyCallsignIndex,
out int platoonCallsignIndex,
out int squadCallsignIndex,
out int characterCallsignIndex )
inlineprotected

Get the callsign indexes assigned to entity

Parameters
[in]editableEntitySCR_EditableEntityComponent to get callsign off
[out]companyindex
[out]platoonindex
[out]squadindex
[out]characterindex, either role or character index, will return -1 if not a character
Returns
bool returns false if indexes are not assigned

Definition at line 56 of file SCR_CallsignManagerComponent.c.

◆ GetEntityCallsignNames() [1/2]

bool SCR_CallsignManagerComponent::GetEntityCallsignNames ( IEntity entity,
out string companyCallsignName,
out string platoonCallsignName,
out string squadCallsignName,
out string characterCallsignName,
out string format )
inlineprotected

Get the callsign names assigned to entity

Parameters
[in]entityIEntity to get callsign off
[out]companyname
[out]platoonname
[out]squadname
[out]charactername (Optinal if callsign assigned to a character)
[out]format
Returns
bool returns true if names are succesfully found

Definition at line 71 of file SCR_CallsignManagerComponent.c.

◆ GetEntityCallsignNames() [2/2]

bool SCR_CallsignManagerComponent::GetEntityCallsignNames ( SCR_EditableEntityComponent editableEntity,
out string companyCallsignName,
out string platoonCallsignName,
out string squadCallsignName,
out string characterCallsignName,
out string format )
inlineprotected

Get the callsign names assigned to editableEntity

Parameters
[in]editableEntitySCR_EditableEntityComponent to get callsign off
[out]companyname
[out]platoonname
[out]squadname
[out]charactername (Optinal if callsign assigned to a character)
[out]format
Returns
bool returns true if names are succesfully found

Definition at line 91 of file SCR_CallsignManagerComponent.c.

◆ GetOnPlayerCallsignChanged()

ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > SCR_CallsignManagerComponent::GetOnPlayerCallsignChanged ( )
inlineprotected

Returns ScriptInvoker on player callsign changed.

Definition at line 384 of file SCR_CallsignManagerComponent.c.

◆ GetPlayerCallsign()

bool SCR_CallsignManagerComponent::GetPlayerCallsign ( int playerId,
out int companyIndex,
out int platoonIndex,
out int squadIndex,
out int characterNumber = -1,
out ERoleCallsign characterRole = ERoleCallsign.NONE )
inlineprotected
Parameters
[in]playerId
[out]companyIndex
[out]platoonIndex
[out]squadIndex
[out]characterNumber
[out]characterRole
Returns
success or failure in obtaining data

Definition at line 373 of file SCR_CallsignManagerComponent.c.

◆ MakeGroupCallsignAvailible()

void SCR_CallsignManagerComponent::MakeGroupCallsignAvailible ( Faction faction,
int companyIndex,
int platoonIndex,
int squadIndex )
inlineprotected

Makes the given callsign indexes available again for the faction. Called when the entity with the callsign is destroyed or switches factions

Parameters
[in]factionfaction of callsigns
[in]companyIndexto make available
[in]platoonIndexto make available
[in]squadIndexto make available

Definition at line 233 of file SCR_CallsignManagerComponent.c.

◆ OnPlayerLeftGame()

void SCR_CallsignManagerComponent::OnPlayerLeftGame ( int playerId)
inlineprotected

Definition at line 359 of file SCR_CallsignManagerComponent.c.

◆ OnPlayerSpawn()

void SCR_CallsignManagerComponent::OnPlayerSpawn ( int playerId,
IEntity playerEntity )
inlineprotected

Assign callsign for players when they are spawned (Server Only).

Definition at line 292 of file SCR_CallsignManagerComponent.c.

◆ OnPostInit()

override void SCR_CallsignManagerComponent::OnPostInit ( IEntity owner)
inlineprotected

Definition at line 453 of file SCR_CallsignManagerComponent.c.

◆ RemoveAvailableGroupCallsign()

void SCR_CallsignManagerComponent::RemoveAvailableGroupCallsign ( Faction faction,
int companyIndex,
int platoonIndex,
int squadIndex )
inlineprotected

Definition at line 260 of file SCR_CallsignManagerComponent.c.

◆ SetPlayerCallsign()

void SCR_CallsignManagerComponent::SetPlayerCallsign ( int playerId,
int companyIndex,
int platoonIndex,
int squadIndex,
int characterNumber,
ERoleCallsign characterRole = ERoleCallsign.NONE )
inlineprotected
Parameters
[in]playerId
[in]companyIndex
[in]platoonIndex
[in]squadIndex
[in]characterNumber
[in]characterRole

Definition at line 336 of file SCR_CallsignManagerComponent.c.

Member Data Documentation

◆ m_aDuplicateCallsigns

ref array<ref array<int> > SCR_CallsignManagerComponent::m_aDuplicateCallsigns = {}
protected

Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates.

Definition at line 18 of file SCR_CallsignManagerComponent.c.

◆ m_GroupManager

SCR_GroupsManagerComponent SCR_CallsignManagerComponent::m_GroupManager
protected

Definition at line 27 of file SCR_CallsignManagerComponent.c.

◆ m_mAvailableCallsigns

ref map<Faction, ref SCR_FactionCallsignData> SCR_CallsignManagerComponent::m_mAvailableCallsigns = new map<Faction, ref SCR_FactionCallsignData>
protected

All available callsigns are stored here.

Definition at line 15 of file SCR_CallsignManagerComponent.c.

◆ m_mPlayerCallsignData

ref map<int, ref SCR_PlayerCallsignData> SCR_CallsignManagerComponent::m_mPlayerCallsignData = new map<int, ref SCR_PlayerCallsignData>
protected

Holds all the callsigns that are assigned to players.

Definition at line 21 of file SCR_CallsignManagerComponent.c.

◆ m_OnPlayerCallsignChanged

ref ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged> SCR_CallsignManagerComponent::m_OnPlayerCallsignChanged = new ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged>()
protected

Definition at line 24 of file SCR_CallsignManagerComponent.c.


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