QTfrontend/util/namegen.cpp
changeset 12244 45c83c88ac4b
parent 11888 618d99523933
child 12245 5206f9a803d1
--- a/QTfrontend/util/namegen.cpp	Thu Apr 13 06:39:01 2017 +0200
+++ b/QTfrontend/util/namegen.cpp	Thu Apr 13 15:18:07 2017 +0200
@@ -33,8 +33,27 @@
 QList<QStringList> HWNamegen::TypesHatnames;
 bool HWNamegen::typesAvailable = false;
 
+void HWNamegen::teamRandomFlag(HWTeam & team)
+{
+    team.setFlag(getRandomFlag());
+}
 
-void HWNamegen::teamRandomNames(HWTeam & team, const bool changeteamname)
+void HWNamegen::teamRandomVoice(HWTeam & team)
+{
+    team.setVoicepack(getRandomVoice());
+}
+
+void HWNamegen::teamRandomGrave(HWTeam & team)
+{
+    team.setGrave(getRandomGrave());
+}
+
+void HWNamegen::teamRandomFort(HWTeam & team)
+{
+    team.setFort(getRandomFort());
+}
+
+void HWNamegen::teamRandomEverything(HWTeam & team, const bool changeteamname)
 {
     // load types if not already loaded
     if (!typesAvailable)
@@ -87,21 +106,21 @@
         }
 
         // give each hedgehog a random name
-        HWNamegen::teamRandomName(team,i,dict);
+        HWNamegen::teamRandomHogName(team,i,dict);
     }
 
 }
 
-void HWNamegen::teamRandomName(HWTeam & team, const int HedgehogNumber)
+void HWNamegen::teamRandomHogName(HWTeam & team, const int HedgehogNumber)
 {
     QStringList dicts = dictsForHat(team.hedgehog(HedgehogNumber).Hat);
 
     QStringList dict = dictContents(dicts[rand()%(dicts.size())]);
 
-    teamRandomName(team, HedgehogNumber, dict);
+    teamRandomHogName(team, HedgehogNumber, dict);
 }
 
-void HWNamegen::teamRandomName(HWTeam & team, const int HedgehogNumber, const QStringList & dict)
+void HWNamegen::teamRandomHogName(HWTeam & team, const int HedgehogNumber, const QStringList & dict)
 {
     QStringList namesDict = dict;