init ef_verify: Don't monkey-patch capability miss, require it
A ship with non-zero nplanes must have capability plane or miss. When one doesn't, global_init() silently adds capability miss. Drop that. Check for it in ef_verify_config() instead. Fix up ship.config accordingly. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
c3a26dc899
commit
c0c58222bc
3 changed files with 15 additions and 23 deletions
|
@ -40,7 +40,6 @@
|
|||
#include "sect.h"
|
||||
#include "ship.h"
|
||||
|
||||
static void init_mchr(void);
|
||||
static void init_pchr(void);
|
||||
static void init_plchr(void);
|
||||
|
||||
|
@ -50,23 +49,9 @@ global_init(void)
|
|||
if (opt_RAILWAYS)
|
||||
intrchr[INT_RAIL].in_enable = 0;
|
||||
init_pchr();
|
||||
init_mchr();
|
||||
init_plchr();
|
||||
}
|
||||
|
||||
static void
|
||||
init_mchr(void)
|
||||
{
|
||||
struct mchrstr *mp;
|
||||
|
||||
for (mp = mchr; mp->m_name; mp++) {
|
||||
if (!mp->m_name[0])
|
||||
continue;
|
||||
if (mp->m_nplanes && !(mp->m_flags & M_MSL || mp->m_flags & M_FLY))
|
||||
mp->m_flags |= M_MSL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
init_plchr(void)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
# ship.config: Ship characteristics
|
||||
#
|
||||
# Known contributors to this file:
|
||||
# Markus Armbruster, 2006-2011
|
||||
# Markus Armbruster, 2006-2015
|
||||
#
|
||||
# Derived from ship.c; known contributors:
|
||||
# Dave Pare, 1986
|
||||
|
@ -159,14 +159,14 @@ type name civ mil she gun pet iro dus bar foo oil lcm hcm
|
|||
24 "af asw frigate" 0 60 60 4 0 0 0 0 120 0 0 0 0 0 (torp dchrg sonar sub-torp)
|
||||
25 "na nuc attack sub" 0 25 60 6 0 0 0 0 500 0 0 0 0 0 (torp sonar min sub sub-torp)
|
||||
26 "ad asw destroyer" 0 100 80 6 40 0 0 0 500 0 0 0 0 0 (torp dchrg sonar sub-torp)
|
||||
27 "nm nuc miss sub" 0 25 200 1 0 0 0 0 500 0 0 0 0 0 (sonar sub)
|
||||
28 "msb missile sub" 0 25 100 1 0 0 0 0 500 0 0 0 0 0 (sonar sub)
|
||||
29 "mb missile boat" 0 5 100 3 0 0 0 0 500 0 0 0 0 0 ()
|
||||
30 "mf missile frigate" 0 60 220 4 0 0 0 0 120 0 0 0 0 0 ()
|
||||
31 "mc missile cruiser" 0 120 500 6 160 0 0 0 200 0 0 0 0 0 (anti-missile)
|
||||
27 "nm nuc miss sub" 0 25 200 1 0 0 0 0 500 0 0 0 0 0 (miss sonar sub)
|
||||
28 "msb missile sub" 0 25 100 1 0 0 0 0 500 0 0 0 0 0 (miss sonar sub)
|
||||
29 "mb missile boat" 0 5 100 3 0 0 0 0 500 0 0 0 0 0 (miss)
|
||||
30 "mf missile frigate" 0 60 220 4 0 0 0 0 120 0 0 0 0 0 (miss)
|
||||
31 "mc missile cruiser" 0 120 500 6 160 0 0 0 200 0 0 0 0 0 (miss anti-missile)
|
||||
32 "aac aa cruiser" 0 100 100 15 0 0 0 0 200 0 0 0 0 0 (anti-missile)
|
||||
33 "agc aegis cruiser" 0 200 400 25 40 0 0 0 900 0 0 0 0 0 (anti-missile)
|
||||
34 "ncr nuc cruiser" 0 200 400 8 40 0 0 0 900 0 0 0 0 0 (anti-missile)
|
||||
33 "agc aegis cruiser" 0 200 400 25 40 0 0 0 900 0 0 0 0 0 (miss anti-missile)
|
||||
34 "ncr nuc cruiser" 0 200 400 8 40 0 0 0 900 0 0 0 0 0 (miss anti-missile)
|
||||
35 "nas nuc asw cruiser" 0 200 120 6 160 0 0 0 500 0 0 0 0 0 (torp dchrg sonar sub-torp)
|
||||
36 "nsp nuc supply ship" 50 50 600 50 999 0 0 0 999 0 1500 900 0 0 (supply)
|
||||
/config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue