Author: cazfi
Date: Thu Mar 19 20:01:13 2015
New Revision: 28582

URL: http://svn.gna.org/viewcvs/freeciv?rev=28582&view=rev
Log:
Sanity check that if ruleset has EFT_INSPIRE_PARTISANS, it also has units of 
the role "Partisan"

See patch #5892

Modified:
    branches/S2_5/server/rssanity.c

Modified: branches/S2_5/server/rssanity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/rssanity.c?rev=28582&r1=28581&r2=28582&view=diff
==============================================================================
--- branches/S2_5/server/rssanity.c     (original)
+++ branches/S2_5/server/rssanity.c     Thu Mar 19 20:01:13 2015
@@ -217,6 +217,13 @@
     }
   }
 
+  if (num_role_units(L_PARTISAN) == 0
+      && effect_cumulative_max(EFT_INSPIRE_PARTISANS, NULL) > 0) {
+    ruleset_error(LOG_ERROR,
+                  "Inspire_Partisans effect present, but no units with 
partisan role.");
+    return FALSE;
+  }
+
   return TRUE;
 }
 


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

Reply via email to