6 protected ref array<int> m_mSquadCallsigns =
new array<int>;
15 array<ref SCR_CallsignInfo> squadArray =
new array<ref SCR_CallsignInfo>;
16 factionCallsignInfo.GetSquadArray(squadArray);
17 int count = squadArray.Count();
19 for(
int i = 0; i < count; i++)
21 m_mSquadCallsigns.Insert(i);
32 return m_mSquadCallsigns[Math.RandomInt(0, m_mSquadCallsigns.Count())];
39 int GetFirstAvailibleSquad()
41 int firstAvailible =
int.MAX;
43 foreach (
int squad: m_mSquadCallsigns)
45 if (squad < firstAvailible)
46 firstAvailible = squad;
49 return firstAvailible;
57 void AddSquad(
int squadIndex)
59 if (!m_mSquadCallsigns.Contains(squadIndex))
60 m_mSquadCallsigns.Insert(squadIndex);
68 bool RemoveSquad(
int squadIndex)
70 int count = m_mSquadCallsigns.Count();
72 for(
int i = 0; i < count; i++)
74 if (m_mSquadCallsigns[i] == squadIndex)
76 m_mSquadCallsigns.Remove(i);
81 return m_mSquadCallsigns.IsEmpty();