]> git.pond.sub.org Git - empserver/commitdiff
Overhaul show sect b
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 21 Feb 2009 15:36:39 +0000 (16:36 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 19 Jul 2009 17:58:40 +0000 (13:58 -0400)
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.

info/Sector-types.t
src/lib/subs/show.c

index 372389ac4927248569afe1c64aabc45c5d01ed24..9e29b6edd3bda3214ab9d257d1b2b87578d96d4b 100644 (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
index 7c484f6c81df1b8e364e5a192deadca6d2f22cd2..fe65d8bf2aa6db5e037527f0ad24ffb22336a247 100644 (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++) {