QTfrontend/hwform.cpp
changeset 12634 91e55ce06ffc
parent 12633 a791a08062d6
child 12635 5ba8361acabc
equal deleted inserted replaced
12633:a791a08062d6 12634:91e55ce06ffc
   460     if(teamslist.empty())
   460     if(teamslist.empty())
   461     {
   461     {
   462         QString currentNickName = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8();
   462         QString currentNickName = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8();
   463         QString teamName;
   463         QString teamName;
   464         int firstHumanTeam = 1;
   464         int firstHumanTeam = 1;
   465         int lastHumanTeam = 5;
   465         int lastHumanTeam = 4;
   466 
   466 
   467         // Default team
   467         // Default team
   468         if (currentNickName.isEmpty())
   468         if (currentNickName.isEmpty())
   469         {
   469         {
   470             teamName = tr("Team 1");
   470             teamName = tr("Team 1");
   485         defaultTeam.saveToFile();
   485         defaultTeam.saveToFile();
   486         teamslist.push_back(teamName);
   486         teamslist.push_back(teamName);
   487 
   487 
   488         // Add additional default teams
   488         // Add additional default teams
   489 
   489 
   490         // 4 human teams to allow local multiplayer instantly
   490         // More human teams to allow local multiplayer instantly
   491         for(int i=firstHumanTeam; i<=lastHumanTeam; i++)
   491         for(int i=firstHumanTeam; i<=lastHumanTeam; i++)
   492         {
   492         {
   493             //: Default team name
   493             //: Default team name
   494             teamName = tr("Team %1").arg(i);
   494             teamName = tr("Team %1").arg(i);
   495             HWTeam numberTeam(teamName);
   495             HWTeam numberTeam(teamName);
   496             HWNamegen::teamRandomGrave(numberTeam, false);
   496             HWNamegen::teamRandomGrave(numberTeam, false);
   497             HWNamegen::teamRandomFort(numberTeam, false);
   497             HWNamegen::teamRandomFort(numberTeam, false);
   498             numberTeam.saveToFile();
   498             numberTeam.saveToFile();
   499             teamslist.push_back(teamName);
   499             teamslist.push_back(teamName);
   500         }
   500         }
   501         // Add default CPU teams for each level
   501         // Add 2 default CPU teams
   502         for(int i=1; i<=5; i++)
   502         for(int i=2; i<=5; i=i+2)
   503         {
   503         {
   504             //: Default computer team name
   504             //: Default computer team name
   505             teamName = tr("Computer %1").arg(i);
   505             teamName = tr("Computer %1").arg(i);
   506             HWTeam numberTeam(teamName);
   506             HWTeam numberTeam(teamName);
   507             HWNamegen::teamRandomGrave(numberTeam, false);
   507             HWNamegen::teamRandomGrave(numberTeam, false);