ef_verify: Require ship glim != 0 with capability dchrg

Because the fire command doesn't work with zero glim (commit a109de9).

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2015-02-21 18:12:07 +01:00
parent 0e24049ce4
commit c3a26dc899

View file

@ -28,7 +28,7 @@
*
* Known contributors to this file:
* Ron Koenderink, 2005
* Markus Armbruster, 2006-2014
* Markus Armbruster, 2006-2015
*/
#include <config.h>
@ -314,6 +314,25 @@ verify_nukes(int may_put)
return retval;
}
static int
verify_ship_chr(void)
{
int retval = 0;
int i;
for (i = 0; mchr[i].m_name; i++) {
if (!mchr[i].m_name[0])
continue;
if ((mchr[i].m_flags & M_DCH) && !mchr[i].m_glim) {
verify_fail(EF_SHIP_CHR, i, NULL, 0,
"flag %s requires non-zero glim",
symbol_by_value(M_DCH, ship_chr_flags));
retval = -1;
}
}
return retval;
}
static int
verify_products(void)
{
@ -350,6 +369,7 @@ ef_verify_config(void)
}
/* Special checks */
retval |= verify_ship_chr();
retval |= verify_products();
return retval;
}