Loading...
Searching...
No Matches
SCR_CallsignCompanyData Interface Reference

For each company, holds availible platoons, which in turn holds availible squads. More...

Public Member Functions

void Init (SCR_FactionCallsignInfo factionCallsignInfo)
 Init Company data, creating all the platoons within which in turn create the availible squads within.
 
void GetRandomCallsign (out int platoon, out int squad)
 Gets platoon and squad index randomly from availible callsigns.
 
void GetFirstAvailibleCallsign (out int firstAvailiblePlatoon, out int firstAvailibleSquad)
 Goes through all availible platoons and squads and gets the first availible.
 
bool GetFirstAvailableSquadCallsign (out int firstAvailablePlatoon, out int firstAvailableSquad)
 Finds a platoon with the most available squad callsigns and gets the first available callsign in the platoon.
 
void AddCallsign (int platoonIndex, int squadIndex)
 Adds callsign back to availible callsign pool.
 
bool RemoveCallsign (int plattonIndex, int squadIndex)
 Removes callsign from availible callsign pool.
 

Protected Attributes

ref map< int, ref SCR_CallsignPlatoonDatam_mPlatoonCallsigns = new map<int, ref SCR_CallsignPlatoonData>
 

Detailed Description

For each company, holds availible platoons, which in turn holds availible squads.

Member Function Documentation

◆ AddCallsign()

void SCR_CallsignCompanyData.AddCallsign ( int platoonIndex,
int squadIndex )

Adds callsign back to availible callsign pool.

Parameters
platoonindex
squadindex

◆ GetFirstAvailableSquadCallsign()

bool SCR_CallsignCompanyData.GetFirstAvailableSquadCallsign ( out int firstAvailablePlatoon,
out int firstAvailableSquad )

Finds a platoon with the most available squad callsigns and gets the first available callsign in the platoon.

Meaning if platoon 1 has 2 (out of 4) squads taken and platoon 2 has only one (out of 4) taken, it will pick the first available squad of the second platoon.

Parameters
[out]platoonindex
[out]squadindex
Returns
bool true if successfully found an available callsign

◆ GetFirstAvailibleCallsign()

void SCR_CallsignCompanyData.GetFirstAvailibleCallsign ( out int firstAvailiblePlatoon,
out int firstAvailibleSquad )

Goes through all availible platoons and squads and gets the first availible.

Meaning if platoon 1 is taken it will get 2 next not 3.

Parameters
[out]platoonindex
[out]squadindex
Returns
bool true if succesfully found a callsign

◆ GetRandomCallsign()

void SCR_CallsignCompanyData.GetRandomCallsign ( out int platoon,
out int squad )

Gets platoon and squad index randomly from availible callsigns.

Parameters
[out]platoonindex
[out]squadindex
Returns
bool true if succesfully found a callsign

◆ Init()

void SCR_CallsignCompanyData.Init ( SCR_FactionCallsignInfo factionCallsignInfo)

Init Company data, creating all the platoons within which in turn create the availible squads within.

Parameters
factionCallsignInfospecific callsign info for faction

◆ RemoveCallsign()

bool SCR_CallsignCompanyData.RemoveCallsign ( int plattonIndex,
int squadIndex )

Removes callsign from availible callsign pool.

Parameters
platoonindex
squadindex

Member Data Documentation

◆ m_mPlatoonCallsigns

ref map<int, ref SCR_CallsignPlatoonData> SCR_CallsignCompanyData.m_mPlatoonCallsigns = new map<int, ref SCR_CallsignPlatoonData>
protected

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