Author: sveinung Date: Sun Jul 19 13:00:36 2015 New Revision: 29222 URL: http://svn.gna.org/viewcvs/freeciv?rev=29222&view=rev Log: Sanity check: a unit capable of bombardment has a bombard_rate
See patch #6128 Modified: trunk/server/rssanity.c Modified: trunk/server/rssanity.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/rssanity.c?rev=29222&r1=29221&r2=29222&view=diff ============================================================================== --- trunk/server/rssanity.c (original) +++ trunk/server/rssanity.c Sun Jul 19 13:00:36 2015 @@ -655,7 +655,8 @@ } } unit_type_iterate_end; - /* Some unit type flags depend on other flags to work properly. */ + /* Some unit type properties depend on other unit type properties to work + * properly. */ unit_type_iterate(putype) { /* "Spy" is a better "Diplomat". Until all the places that assume that * "Diplomat" is set if "Spy" is set is changed this limitation must be @@ -665,6 +666,16 @@ ruleset_error(LOG_ERROR, "The unit type '%s' has the 'Spy' unit type flag but " "not the 'Diplomat' unit type flag.", + utype_rule_name(putype)); + ok = FALSE; + } + + /* The ability to bombard requires a bombard_rate. */ + if (utype_has_flag(putype, UTYF_BOMBARDER) + && putype->bombard_rate <= 0) { + ruleset_error(LOG_ERROR, + "The unit type '%s' has the 'Bombarder' unit type flag" + " but no bombard_rate is set.", utype_rule_name(putype)); ok = FALSE; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits