Improve launch diagnostic messages, switch off supply
msl_equip() used mission_pln_equip(), which is for automatic defenses, and therefore silent. Its users launch_as(), launch_missile() and launch_sat() printed failure diagnostics based on assumptions on what could go wrong. Switch to the appropriate function for commands, pln_equip(), and remove the guesswork. Implement mission 'i' there. When launching from a foreign base, its owner now gets informed. Unimportant at this time, as players can't easily deploy missiles in foreign bases. This change also switches off automatic supply for launch. Consistent with bomb.
This commit is contained in:
parent
cf960a573c
commit
528df9acba
4 changed files with 12 additions and 13 deletions
|
@ -54,7 +54,6 @@
|
|||
#include "ship.h"
|
||||
#include "xy.h"
|
||||
|
||||
static int pln_equip(struct plist *, struct ichrstr *, char);
|
||||
static int fit_plane_on_ship(struct plnstr *, struct shpstr *);
|
||||
|
||||
/*
|
||||
|
@ -613,7 +612,7 @@ pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
|
||||
{
|
||||
struct plchrstr *pcp;
|
||||
|
@ -684,7 +683,12 @@ pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
|
|||
break;
|
||||
case 'r': /* reconnaissance */
|
||||
case 'e': /* escort */
|
||||
load = 0;
|
||||
case 'i': /* missile interception */
|
||||
if (CANT_HAPPEN(!(pcp->pl_flags & P_M)
|
||||
|| !(pcp->pl_flags & (P_N | P_O))))
|
||||
break;
|
||||
if (load)
|
||||
itype = I_SHELL;
|
||||
break;
|
||||
default:
|
||||
CANT_REACH();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue