71 Hedgehogs[i].Hat=strLst[i * 2 + 8]; |
73 Hedgehogs[i].Hat=strLst[i * 2 + 8]; |
72 // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat |
74 // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat |
73 // Checking net teams is probably pointless, but can't hurt. |
75 // Checking net teams is probably pointless, but can't hurt. |
74 if (Hedgehogs[i].Hat.length() == 0) Hedgehogs[i].Hat = "NoHat"; |
76 if (Hedgehogs[i].Hat.length() == 0) Hedgehogs[i].Hat = "NoHat"; |
75 } |
77 } |
|
78 Rounds = 0; |
|
79 Wins = 0; |
76 } |
80 } |
77 |
81 |
78 HWTeam::HWTeam() : |
82 HWTeam::HWTeam() : |
79 difficulty(0), |
83 difficulty(0), |
80 numHedgehogs(4), |
84 numHedgehogs(4), |
108 Grave = teamfile.value("Team/Grave", "Statue").toString(); |
114 Grave = teamfile.value("Team/Grave", "Statue").toString(); |
109 Fort = teamfile.value("Team/Fort", "Plane").toString(); |
115 Fort = teamfile.value("Team/Fort", "Plane").toString(); |
110 Voicepack = teamfile.value("Team/Voicepack", "Default").toString(); |
116 Voicepack = teamfile.value("Team/Voicepack", "Default").toString(); |
111 Flag = teamfile.value("Team/Flag", "hedgewars").toString(); |
117 Flag = teamfile.value("Team/Flag", "hedgewars").toString(); |
112 difficulty = teamfile.value("Team/Difficulty", 0).toInt(); |
118 difficulty = teamfile.value("Team/Difficulty", 0).toInt(); |
|
119 Rounds = teamfile.value("Team/Rounds", 0).toInt(); |
|
120 Wins = teamfile.value("Team/Wins", 0).toInt(); |
113 for(int i = 0; i < 8; i++) |
121 for(int i = 0; i < 8; i++) |
114 { |
122 { |
115 QString hh = QString("Hedgehog%1/").arg(i); |
123 QString hh = QString("Hedgehog%1/").arg(i); |
116 Hedgehogs[i].Name = teamfile.value(hh + "Name", QString("hedgehog %1").arg(i)).toString(); |
124 Hedgehogs[i].Name = teamfile.value(hh + "Name", QString("hedgehog %1").arg(i)).toString(); |
117 Hedgehogs[i].Hat = teamfile.value(hh + "Hat", "NoHat").toString(); |
125 Hedgehogs[i].Hat = teamfile.value(hh + "Hat", "NoHat").toString(); |
153 teamfile.setValue("Team/Grave", Grave); |
167 teamfile.setValue("Team/Grave", Grave); |
154 teamfile.setValue("Team/Fort", Fort); |
168 teamfile.setValue("Team/Fort", Fort); |
155 teamfile.setValue("Team/Voicepack", Voicepack); |
169 teamfile.setValue("Team/Voicepack", Voicepack); |
156 teamfile.setValue("Team/Flag", Flag); |
170 teamfile.setValue("Team/Flag", Flag); |
157 teamfile.setValue("Team/Difficulty", difficulty); |
171 teamfile.setValue("Team/Difficulty", difficulty); |
|
172 teamfile.setValue("Team/Rounds", Rounds); |
|
173 teamfile.setValue("Team/Wins", Wins); |
158 for(int i = 0; i < 8; i++) |
174 for(int i = 0; i < 8; i++) |
159 { |
175 { |
160 QString hh = QString("Hedgehog%1/").arg(i); |
176 QString hh = QString("Hedgehog%1/").arg(i); |
161 teamfile.setValue(hh + "Name", Hedgehogs[i].Name); |
177 teamfile.setValue(hh + "Name", Hedgehogs[i].Name); |
162 teamfile.setValue(hh + "Hat", Hedgehogs[i].Hat); |
178 teamfile.setValue(hh + "Hat", Hedgehogs[i].Hat); |