Sectors need space for items, deliveries and distribution thresholds.

To save space, the ancients invented `variables': a collection of
key-value pairs, missing means zero value, space for `enough' keys.
This complicates the code, as assigning to a `variable' can fail for
lack of space.  Over time, `enough' increased, and for quite some time
now `variables' have been *wasting* space.  This changeset replaces
them, except in struct mchrstr, struct lchrstr and struct pchrstr,
where they are read-only, and will be replaced later.  It is only a
first step; further cleanup is required.  To simplify and minimize
this necessarily huge changeset, the new item[] arrays have an unused
slot 0, and the old variable types V_CIVIL, ... are still defined, but
must have the same values as the item types I_CIVIL, ...
This commit is contained in:
Markus Armbruster 2004-03-03 16:54:22 +00:00
parent ba86513b01
commit eccc5cb7d7
86 changed files with 853 additions and 1226 deletions

View file

@ -49,7 +49,6 @@ hidd(void)
struct sctstr sect;
int nsect;
struct nstr_sect nstr;
int cond[I_MAX + 1];
if (!snxtsct(&nstr, player->argp[1]))
return RET_SYN;
@ -68,14 +67,13 @@ hidd(void)
}
if (player->god)
pr("%3d ", sect.sct_own);
getvec(VT_COND, cond, (s_char *)&sect, EF_SECTOR);
prxy("%4d,%-4d", nstr.x, nstr.y, player->cnum);
pr(" %c %3d%% %3d %3d %3d %3d %3d %3d %3d",
dchr[sect.sct_type].d_mnem, sect.sct_effic,
sect.sct_oldown, sect.sct_loyal,
get_che_cnum(cond[C_CHE]),
get_che_value(cond[C_CHE]),
cond[C_PSTAGE], cond[C_PTIME], cond[C_MINE]);
get_che_cnum(sect.sct_che),
get_che_value(sect.sct_che),
sect.sct_pstage, sect.sct_ptime, sect.sct_mines);
pr("\n");
}
if (nsect == 0) {