equal
deleted
inserted
replaced
226 hh.Name = namesDict[rand()%(namesDict.size())]; |
226 hh.Name = namesDict[rand()%(namesDict.size())]; |
227 |
227 |
228 team.setHedgehog(HedgehogNumber, hh); |
228 team.setHedgehog(HedgehogNumber, hh); |
229 } |
229 } |
230 |
230 |
231 void HWNamegen::teamLocalizedDefaultVoice(HWTeam & team) |
231 void HWNamegen::teamLocalizedDefaultVoice(HWTeam & team, bool withDLC) |
232 { |
232 { |
233 team.setVoicepack(getLocalizedDefaultVoice()); |
233 team.setVoicepack(getLocalizedDefaultVoice(withDLC)); |
234 } |
234 } |
235 |
235 |
236 QStringList HWNamegen::dictContents(const QString filename) |
236 QStringList HWNamegen::dictContents(const QString filename) |
237 { |
237 { |
238 QStringList list; |
238 QStringList list; |
492 |
492 |
493 //pick a random voice |
493 //pick a random voice |
494 return Voices[rand()%(Voices.size())]; |
494 return Voices[rand()%(Voices.size())]; |
495 } |
495 } |
496 |
496 |
497 QString HWNamegen::getLocalizedDefaultVoice() |
497 QString HWNamegen::getLocalizedDefaultVoice(bool withDLC) |
498 { |
498 { |
499 QStringList entries = DataManager::instance().entryList( |
499 QStringList entries = DataManager::instance().entryList( |
500 "Sounds/voices", |
500 "Sounds/voices", |
501 QDir::Dirs | QDir::NoDotAndDotDot, |
501 QDir::Dirs | QDir::NoDotAndDotDot, |
502 QStringList("*"), |
502 QStringList("*"), |
503 false); |
503 withDLC); |
504 |
504 |
505 QString loc = QLocale().name(); |
505 QString loc = QLocale().name(); |
506 if(entries.contains("Default_" + loc)) |
506 if(entries.contains("Default_" + loc)) |
507 { |
507 { |
508 return QString("Default_" + loc); |
508 return QString("Default_" + loc); |