Change nuke storage and commands to match other units:

(nukstr): Hold one nuke instead of a stockpile: replace members nuk_n,
nuk_types by nuk_type, nuk_plane.  Add nuk_land for completeness, like
nuk_ship it's not yet used.
(nuke_ca): Update accordingly: replace selectors number and types by
type and plane.
(build_nuke): Update accordingly.
(ndump, nuke): Update accordingly.  Output is no longer sorted by
location, and nukes in same location no longer share id.  nuke's extra
columns for nuclear plants are repeated for every nuke.
(trade_desc): Update accordingly.
(cede, grab_sect, check_nuke_ok, detonate, trade_nameof): Talk about
nukes instead of nuclear stockpiles.
(arm, disarm): Rewrite, split off new disarm().  Don't remove nuke
from the nuke file on arm.  Allow usual plane syntax, not just plane
number.  Change second argument from nuke type to nuke number.  When
plane is already armed, ignore nuke argument and rearm (broken in
4.2.6).
(tran_nuke): Update for changed struct nukstr, make as similar as
possible to tran_plane.  Change syntax to match transport plane.
(player_coms): Update arm, disarm and transport accordingly.
(prnuke, nuk_on_plane): New.
(nuk_add, nuk_delete): Stockpile management, remove.
This commit is contained in:
Markus Armbruster 2006-05-06 07:20:21 +00:00
parent e86beb9626
commit 2e40a4bb90
16 changed files with 220 additions and 293 deletions

View file

@ -42,13 +42,12 @@ struct nukstr {
short ef_type;
natid nuk_own;
short nuk_uid;
coord nuk_x; /* current loc of device */
coord nuk_y;
coord nuk_x, nuk_y; /* current loc of device */
signed char nuk_type; /* index in plchr[] */
/* end of part matching struct genitem */
signed char nuk_n; /* number of nukes in list */
short nuk_ship; /* currently aboard ship (unused) */
short nuk_trade; /* index into trade file (unused) */
short nuk_types[N_MAXNUKE]; /* # of nukes in sector of given type */
short nuk_plane; /* currently aboard plane */
short nuk_land; /* currently aboard land (unused) */
time_t nuk_timestamp; /* Last time this nuke was touched */
};