# HG changeset patch # User Wuzzy # Date 1557789002 -7200 # Node ID 4accf3e18dbc8794724694c402e47c612a0104f1 # Parent 0ec0ed2d90451a86876baedcff768d9f2179134a Add withDLC for getLocalizedDefaultVoice diff -r 0ec0ed2d9045 -r 4accf3e18dbc QTfrontend/util/namegen.cpp --- a/QTfrontend/util/namegen.cpp Tue May 14 01:03:23 2019 +0200 +++ b/QTfrontend/util/namegen.cpp Tue May 14 01:10:02 2019 +0200 @@ -228,9 +228,9 @@ team.setHedgehog(HedgehogNumber, hh); } -void HWNamegen::teamLocalizedDefaultVoice(HWTeam & team) +void HWNamegen::teamLocalizedDefaultVoice(HWTeam & team, bool withDLC) { - team.setVoicepack(getLocalizedDefaultVoice()); + team.setVoicepack(getLocalizedDefaultVoice(withDLC)); } QStringList HWNamegen::dictContents(const QString filename) @@ -494,13 +494,13 @@ return Voices[rand()%(Voices.size())]; } -QString HWNamegen::getLocalizedDefaultVoice() +QString HWNamegen::getLocalizedDefaultVoice(bool withDLC) { QStringList entries = DataManager::instance().entryList( "Sounds/voices", QDir::Dirs | QDir::NoDotAndDotDot, QStringList("*"), - false); + withDLC); QString loc = QLocale().name(); if(entries.contains("Default_" + loc)) diff -r 0ec0ed2d9045 -r 4accf3e18dbc QTfrontend/util/namegen.h --- a/QTfrontend/util/namegen.h Tue May 14 01:03:23 2019 +0200 +++ b/QTfrontend/util/namegen.h Tue May 14 01:10:02 2019 +0200 @@ -38,7 +38,7 @@ static void teamRandomHogNames(HWTeam & team); static void teamRandomHogName(HWTeam & team, const int HedgehogNumber); static void teamRandomEverything(HWTeam & team); - static void teamLocalizedDefaultVoice(HWTeam & team); + static void teamLocalizedDefaultVoice(HWTeam & team, bool withDLC = true); private: HWNamegen(); @@ -49,7 +49,7 @@ static QString getRandomFort(bool withDLC = true); static QString getRandomFlag(bool withDLC = true); static QString getRandomVoice(bool withDLC = true); - static QString getLocalizedDefaultVoice(); + static QString getLocalizedDefaultVoice(bool withDLC = true); static QList TypesTeamnames; static QList TypesHatnames;