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); }
public static TntWarsGame GetTntWarsGame(Player p) { TntWarsGame it = TntWarsGame.Find(p.level); if (it != null) { return(it); } it = FindFromGameNumber(p.CurrentTntGameNumber); return(it); }