init ef_verify: Don't monkey-patch capability VTOL, require it
A plane with capability missile must have capability VTOL. When it's missing, global_init() silently adds it. Drop that. Check for it in ef_verify_config() instead. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
c0c58222bc
commit
a4a25df2f4
2 changed files with 21 additions and 15 deletions
|
@ -340,6 +340,26 @@ verify_ship_chr(void)
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
verify_plane_chr(void)
|
||||
{
|
||||
int retval = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; plchr[i].pl_name; i++) {
|
||||
if (!plchr[i].pl_name[0])
|
||||
continue;
|
||||
if ((plchr[i].pl_flags & (P_M | P_V)) == P_M) {
|
||||
verify_fail(EF_PLANE_CHR, i, NULL, 0,
|
||||
"flag %s requires flag %s",
|
||||
symbol_by_value(P_M, plane_chr_flags),
|
||||
symbol_by_value(P_V, plane_chr_flags));
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
verify_products(void)
|
||||
{
|
||||
|
@ -377,6 +397,7 @@ ef_verify_config(void)
|
|||
|
||||
/* Special checks */
|
||||
retval |= verify_ship_chr();
|
||||
retval |= verify_plane_chr();
|
||||
retval |= verify_products();
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue