コード例 #1
0
 public bool CheckAllSetUp(Player p, bool ReturnErrors = false, bool TellPlayerOnSuccess = true)
 {
     if (lvl != null && GameStatus == 0)
     {
         TntWarsGame existing = Find(lvl);
         if (existing != null && existing != this)
         {
             if (ReturnErrors)
             {
                 Player.Message(p, "There is already a TNT Wars game on that map");
             }
             AllSetUp = false;
             return(false);
         }
         if (TellPlayerOnSuccess)
         {
             Player.Message(p, "TNT Wars setup is done!");
         }
         AllSetUp = true;
         return(true);
     }
     if (ReturnErrors)
     {
         SendPlayerCheckSetupErrors(p);
     }
     AllSetUp = false;
     return(false);
 }
コード例 #2
0
ファイル: TntWars.cs プロジェクト: Peteys93/MCGalaxy
        public static TntWarsGame GetTntWarsGame(Player p)
        {
            TntWarsGame it = TntWarsGame.Find(p.level);

            if (it != null)
            {
                return(it);
            }
            it = FindFromGameNumber(p.CurrentTntGameNumber);
            return(it);
        }