Only select from default graves and forts for new themes
authorWuzzy <almikes@aol.com>
Fri, 21 Apr 2017 17:54:28 +0200
changeset 12296 62975c0a89c6
parent 12295 ac57d564efce
child 12297 071a05275798
Only select from default graves and forts for new themes
QTfrontend/hwform.cpp
QTfrontend/ui/page/pageeditteam.cpp
--- a/QTfrontend/hwform.cpp	Fri Apr 21 17:42:09 2017 +0200
+++ b/QTfrontend/hwform.cpp	Fri Apr 21 17:54:28 2017 +0200
@@ -473,9 +473,11 @@
         }
 
         HWTeam defaultTeam(teamName);
-        // Randomize fort and grave for greater variety by default
-        HWNamegen::teamRandomGrave(defaultTeam);
-        HWNamegen::teamRandomFort(defaultTeam);
+        // Randomize fort and grave for greater variety by default.
+        // But we exclude DLC graves and forts to not have desyncing teams by default
+        // TODO: Remove DLC filtering when it isn't neccessary anymore
+        HWNamegen::teamRandomGrave(defaultTeam, false);
+        HWNamegen::teamRandomFort(defaultTeam, false);
         defaultTeam.saveToFile();
         teamslist.push_back(teamName);
 
@@ -484,8 +486,8 @@
         {
             teamName = tr("Team %1").arg(i);
             HWTeam numberTeam(teamName);
-            HWNamegen::teamRandomGrave(numberTeam);
-            HWNamegen::teamRandomFort(numberTeam);
+            HWNamegen::teamRandomGrave(numberTeam, false);
+            HWNamegen::teamRandomFort(numberTeam, false);
             numberTeam.saveToFile();
             teamslist.push_back(teamName);
         }
--- a/QTfrontend/ui/page/pageeditteam.cpp	Fri Apr 21 17:42:09 2017 +0200
+++ b/QTfrontend/ui/page/pageeditteam.cpp	Fri Apr 21 17:54:28 2017 +0200
@@ -439,9 +439,11 @@
     // Mostly create a default team, with 2 important exceptions:
     HWTeam newTeam(name);
     // Randomize grave to make it less likely that default teams have equal graves (important for resurrector)
-    HWNamegen::teamRandomGrave(newTeam);
+    HWNamegen::teamRandomGrave(newTeam, false);
     // Randomize fort for greater variety in fort mode with default teams
-    HWNamegen::teamRandomFort(newTeam);
+    HWNamegen::teamRandomFort(newTeam, false);
+    // DLC forts and graves intentionally filtered out to prevent desyncs and missing grave error
+    // TODO: Remove DLC filter as soon it is not needed anymore
     loadTeam(newTeam);
 }