Let players stop/start units:

(genitem, lndstr, nukstr, plnstr, shpstr): New members off, lnd_off,
nuk_off, pln_off, shp_off.
(NSC_GENITEM): New selector off.
(land, nuke, plan, shi): Display efficiency prefixed by `=' when off.
(start, stop, player_coms): Rewrite, new syntax.  Print only objects
that actually change.
(start_hdr, stop_hdr, start_stop_hdr): Consolidate.
(item_u, start_stop, start_stop_sector, proff, start_stop_unit)
(start_stop_unit_hdr, unit_type_name): New.
(upd_land, upd_plane, planerepair, upd_ship): Obey and clear stoppage.
This commit is contained in:
Markus Armbruster 2006-05-29 21:11:14 +00:00
parent 520446ef39
commit eb1512d75f
22 changed files with 218 additions and 179 deletions

View file

@ -50,6 +50,7 @@ struct genitem {
signed char type;
signed char effic;
signed char mobil;
unsigned char off;
short tech;
char group;
coord opx, opy;

View file

@ -57,6 +57,7 @@ struct lndstr {
signed char lnd_type; /* index in lchr[] */
signed char lnd_effic; /* 0% to 100% */
signed char lnd_mobil; /* mobility units */
unsigned char lnd_off; /* repairs stopped? */
short lnd_tech; /* tech level ship was built at */
char lnd_army; /* group membership */
coord lnd_opx, lnd_opy; /* Op sector coords */

View file

@ -46,6 +46,7 @@ struct nukstr {
signed char nuk_type; /* index in plchr[] */
signed char nuk_effic; /* unused, always 100% */
signed char nuk_mobil; /* unused, always 0 */
unsigned char nuk_off; /* repairs stopped? (unused) */
short nuk_tech; /* nuke's tech level */
char nuk_stockpile; /* group membership, unused */
coord nuk_opx, nuk_opy; /* Op sector coords, unused */

View file

@ -42,10 +42,6 @@
#define N_MAXPLANE 40
#define PLANE_MINEFF 10
/*
* some routines assume that from pln_x to pln_wing remains
* exactly equivalent with shp_x to shp_fleet
*/
struct plnstr {
/* initial part must match struct genitem */
short ef_type;
@ -56,6 +52,7 @@ struct plnstr {
signed char pln_type; /* index in plchr[] */
signed char pln_effic; /* actually "training" */
signed char pln_mobil; /* plane mobility */
unsigned char pln_off; /* repairs stopped? */
short pln_tech; /* plane's tech level */
char pln_wing; /* like fleet */
coord pln_opx; /* Op sector coords */

View file

@ -69,6 +69,7 @@ struct shpstr {
signed char shp_type; /* index in mchr[] */
signed char shp_effic; /* 0% to 100% */
signed char shp_mobil; /* mobility units */
unsigned char shp_off; /* repairs stopped? */
short shp_tech; /* tech level ship was built at */
char shp_fleet; /* group membership */
coord shp_opx, shp_opy; /* Op sector coords */