Author: cazfi
Date: Tue Sep 13 18:58:36 2016
New Revision: 33794

URL: http://svn.gna.org/viewcvs/freeciv?rev=33794&view=rev
Log:
Do not save duplicate allowed_... lists to rulesets when nationlist used.

See bug #25052

Modified:
    branches/S2_6/tools/ruledit/rulesave.c

Modified: branches/S2_6/tools/ruledit/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/rulesave.c?rev=33794&r1=33793&r2=33794&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/rulesave.c      (original)
+++ branches/S2_6/tools/ruledit/rulesave.c      Tue Sep 13 18:58:36 2016
@@ -1438,20 +1438,22 @@
   save_traits(game.server.default_traits, NULL, sfile,
               "default_traits", "");
 
-  if (game.server.ruledit.allowed_govs != NULL) {
-    secfile_insert_str_vec(sfile, game.server.ruledit.allowed_govs,
-                           game.server.ruledit.ag_count,
-                           "compatibility.allowed_govs");
-  }
-  if (game.server.ruledit.allowed_terrains != NULL) {
-    secfile_insert_str_vec(sfile, game.server.ruledit.allowed_terrains,
-                           game.server.ruledit.at_count,
-                           "compatibility.allowed_terrains");
-  }
-  if (game.server.ruledit.allowed_styles != NULL) {
-    secfile_insert_str_vec(sfile, game.server.ruledit.allowed_styles,
-                           game.server.ruledit.as_count,
-                           "compatibility.allowed_styles");
+  if (data->nationlist == NULL) {
+    if (game.server.ruledit.allowed_govs != NULL) {
+      secfile_insert_str_vec(sfile, game.server.ruledit.allowed_govs,
+                             game.server.ruledit.ag_count,
+                             "compatibility.allowed_govs");
+    }
+    if (game.server.ruledit.allowed_terrains != NULL) {
+      secfile_insert_str_vec(sfile, game.server.ruledit.allowed_terrains,
+                             game.server.ruledit.at_count,
+                             "compatibility.allowed_terrains");
+    }
+    if (game.server.ruledit.allowed_styles != NULL) {
+      secfile_insert_str_vec(sfile, game.server.ruledit.allowed_styles,
+                             game.server.ruledit.as_count,
+                             "compatibility.allowed_styles");
+    }
   }
 
   if (game.default_government != NULL) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to