Exemple #1
0
 /// <summary>
 /// <para>Load a specific base.</para>
 /// <para>Base will not load if you choose number higher than available.</para>
 /// </summary>
 /// <param name="BaseToLoad"></param>
 public Base getBaseNumber(int BaseToLoad, string Requester)
 {
     BaseToLoad -= 1;
     if (BaseToLoad < m_Bases.Count && !m_BasesInUse.Contains(BaseToLoad))
     {
         m_BasesInUse.Add(BaseToLoad);
         psyGame.Send(msg.debugChan("[ BaseManager ] - [ " + Requester + " ] has checked out Base[ " + BaseToLoad + " ]. Total bases checked out:[ " + this.m_BasesInUse.Count + " ]"));
         return(m_Bases[BaseToLoad]);
     }
     return(null);
 }
Exemple #2
0
        private void player_TeamCountUpdate()
        {
            // Check for team count 0 here ---***

            if (this.m_Settings.Type != BDSettingType.OneVsOne &&
                this.m_CurrentPoint.AlphaCount() == 1 &&
                this.m_CurrentPoint.BravoCount() == 1)
            {
                this.m_Settings.LoadSettings(BDSettingType.OneVsOne);
                psyGame.Send(msg.debugChan("[ BaseDuel ] [ Game " + this.m_GameNum.ToString().PadLeft(2, '0') + " ]  Setting Changed to [ " + this.m_Settings.Type + " ]"));
            }
            else if (this.m_Settings.Type == BDSettingType.OneVsOne &&
                     this.m_CurrentPoint.AlphaCount() > 1 ||
                     this.m_CurrentPoint.BravoCount() > 1)
            {
                this.m_Settings.LoadSettings(this.m_DefaultSettingType);
                psyGame.Send(msg.debugChan("[ BaseDuel ] [ Game " + this.m_GameNum.ToString().PadLeft(2, '0') + " ]  Setting Changed to [ " + this.m_DefaultSettingType + " ]"));
            }
        }
Exemple #3
0
        private void BaseDuel_Unload(string PlayerName)
        {
            // Do all necessary stuff to unload module. Maybe record stuff, dunno
            int totalBases = m_Games.Count;

            // Make sure to release any bases that are being held by games
            while (m_Games.Count > 0)
            {
                m_BaseManager.ReleaseBase(m_Games[0].loadedBase(), "BaseDuel");
                m_Games.RemoveAt(0);
            }
            psyGame.Send(msg.debugChan("[ BaseDuel ] All basses released from BaseManager. Total Released:[ " + totalBases + " ]"));

            // Make game list null at end
            m_Games = null;
            psyGame.Send(msg.arena("[ BaseDuel ] Module Unloaded - " + PlayerName));
        }