Author: cazfi
Date: Fri Jun 24 22:37:02 2016
New Revision: 33017

URL: http://svn.gna.org/viewcvs/freeciv?rev=33017&view=rev
Log:
Sanity check goods requirements

See patch #7311

Modified:
    trunk/server/rssanity.c

Modified: trunk/server/rssanity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rssanity.c?rev=33017&r1=33016&r2=33017&view=diff
==============================================================================
--- trunk/server/rssanity.c     (original)
+++ trunk/server/rssanity.c     Fri Jun 24 22:37:02 2016
@@ -781,6 +781,16 @@
     }
   } disaster_type_iterate_end;
 
+  /* Goods */
+  goods_type_iterate(pgood) {
+    if (!sanity_check_req_vec(&pgood->reqs, TRUE, -1,
+                              goods_rule_name(pgood))) {
+      ruleset_error(LOG_ERROR,
+                    "Goods have conflicting or invalid requirements!");
+      ok = FALSE;
+    }
+  } goods_type_iterate_end;
+
   /* Buildings */
   improvement_iterate(pimprove) {
     if (!sanity_check_req_vec(&pimprove->reqs, TRUE, -1,


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

Reply via email to