Author: cazfi
Date: Sun Feb 28 12:49:54 2016
New Revision: 32111

URL: http://svn.gna.org/viewcvs/freeciv?rev=32111&view=rev
Log:
Sanity check ruleset against using revolution-time government form as initial 
government
for any nation.

Reported by Frank <dunnoob>

See bug #24459

Modified:
    branches/S2_5/doc/README.rulesets
    branches/S2_5/server/rssanity.c

Modified: branches/S2_5/doc/README.rulesets
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/doc/README.rulesets?rev=32111&r1=32110&r2=32111&view=diff
==============================================================================
--- branches/S2_5/doc/README.rulesets   (original)
+++ branches/S2_5/doc/README.rulesets   Sun Feb 28 12:49:54 2016
@@ -107,6 +107,13 @@
       - "Barbarian"
       - "BarbarianTech"
 
+nations.ruleset
+
+  Restrictions:
+
+    - Government used during revolution can't be used as default_government
+      or init_government for any nation
+
 ----------------------------------------------------------------------
 Implementation details:
 -----------------------

Modified: branches/S2_5/server/rssanity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/rssanity.c?rev=32111&r1=32110&r2=32111&view=diff
==============================================================================
--- branches/S2_5/server/rssanity.c     (original)
+++ branches/S2_5/server/rssanity.c     Sun Feb 28 12:49:54 2016
@@ -596,6 +596,15 @@
                     "Barbarian nation %s has init_buildings set but will "
                     "never see them", nation_rule_name(pnation));
     }
+
+    if (pnation->init_government == game.government_during_revolution) {
+      ruleset_error(LOG_ERROR,
+                    "The government form %s reserved for revolution handling 
has been set as "
+                    "initial government for %s.",
+                    government_rule_name(game.government_during_revolution),
+                    nation_rule_name(pnation));
+      ok = FALSE;
+    }
   } nations_iterate_end;
 
   /* Check against unit upgrade loops */


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

Reply via email to