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:
parent
0e24049ce4
commit
c3a26dc899
1 changed files with 21 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Ron Koenderink, 2005
|
* Ron Koenderink, 2005
|
||||||
* Markus Armbruster, 2006-2014
|
* Markus Armbruster, 2006-2015
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -314,6 +314,25 @@ verify_nukes(int may_put)
|
||||||
return retval;
|
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
|
static int
|
||||||
verify_products(void)
|
verify_products(void)
|
||||||
{
|
{
|
||||||
|
@ -350,6 +369,7 @@ ef_verify_config(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special checks */
|
/* Special checks */
|
||||||
|
retval |= verify_ship_chr();
|
||||||
retval |= verify_products();
|
retval |= verify_products();
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue