Overhaul show sect b

Print sector type mnemonic and name, like show sect s and c.  Print
"can't" instead of negative number for sectors players can't designate
(this was not an issue before the previous commit).  Show build cost
per 100%, like show ship, land, plane and nuke.  Size the columns more
sensibly.
This commit is contained in:
Markus Armbruster 2009-02-21 16:36:39 +01:00
parent be6d7ca913
commit 48ff09664b
2 changed files with 27 additions and 17 deletions

View file

@ -237,10 +237,11 @@ The \*Qshow\*U command can be used to show special things about sector
types. To check out build costs, you do:
.EX show sect build
.NF
sector type cost to des cost for 1% eff lcms for 1% hcms for 1%
- 0 0 0 0
f 0 5 0 1
other 0 1 0 0
desig build 100% eff
sector type $ lcm hcm $
- wilderness 0 0 0 0
f fortress 0 0 100 500
any other 0 0 0 100
Infrastructure building - adding 1 point of efficiency costs:
type lcms hcms mobility $$$$
@ -249,14 +250,16 @@ rail network 1 1 1 1
defense factor 1 1 1 1
.FI
.s1
Cost to des is the cost to designate the sector type. This is charged when you
give the designate command.
.s1
Cost for 1% efficiency is the $$ cost per point of efficiency built.
Lcms/hcms for 1% are similar.
.s1
Sectors that cost nothing to designate and just $1 per point of
efficiency are not shown.
.in \w'build hcm\0\0'u
.L "desig $"
Cost charged by the designate command.
.L "build lcm"
The lcm required to build the sector.
.L "build hcm"
The hcm required to build the sector.
.L "build $"
What it costs to build the sector.
.in
.s1
The show command also shows infrastructure build costs.
Infrastructure is additional facilities you can build up in your

View file

@ -460,7 +460,8 @@ show_sect_build(int foo)
{
int i, first;
pr("sector type cost to des cost for 1%% eff lcms for 1%% hcms for 1%%\n");
pr(" desig build 100%% eff\n"
"sector type $ lcm hcm $\n");
for (i = 0; dchr[i].d_name; i++) {
if (dchr[i].d_mnem == 0)
continue;
@ -469,11 +470,17 @@ show_sect_build(int foo)
if (dchr[i].d_cost <= 0 && dchr[i].d_build == 1
&& dchr[i].d_lcms == 0 && dchr[i].d_hcms == 0)
continue; /* the usual, skip */
pr("%-14c %-14d %-17d %-14d %d\n",
dchr[i].d_mnem, dchr[i].d_cost, dchr[i].d_build,
dchr[i].d_lcms, dchr[i].d_hcms);
pr("%c %-21.21s", dchr[i].d_mnem, dchr[i].d_name);
if (dchr[i].d_cost < 0)
pr(" can't");
else
pr(" %5d", dchr[i].d_cost);
pr(" %5d %5d %5d\n",
100 * dchr[i].d_lcms,
100 * dchr[i].d_hcms,
100 * dchr[i].d_build);
}
pr("other 0 1 0 0\n");
pr("any other 0 0 0 100\n");
first = 1;
for (i = 0; intrchr[i].in_name; i++) {