]> git.pond.sub.org Git - empserver/commitdiff
designate: Drop support for designate costing money
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Jun 2016 17:08:19 +0000 (19:08 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:58 +0000 (19:59 +0200)
Chainsaw 3 added the designate cost along with extra build cost and
materials, and used both to make fortresses expensive.  Unlike build
cost and materials, the cost to designate didn't pass the test of
time: it was set to zero in Empire 2.  Get rid of it.

sect-chr selector cost and struct dchrstr member d_cost have to stay,
because they're still used to configure whether a sector may be
designated by players (see commit 8d792e1).

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
info/Sector-types.t
info/designate.t
src/lib/commands/desi.c
src/lib/global/sect.config
src/lib/subs/show.c
tests/version/journal.log

index 3d6ded2c49e61e2681101ef8e5d507e4709e3b78..158ba144a940f56777793937593134e2ffac0b18 100644 (file)
@@ -237,12 +237,12 @@ 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
-                        desig   build 100% eff  maint
-sector type                 $   lcm  hcm     $      $
-- wilderness                0     0    0     0      0
-c capital                   0     0    0   100     60
-f fortress                  0     0  100   500      0
-any other                   0     0    0   100      0
+                          build 100% eff  maint
+sector type               lcm  hcm     $      $
+- wilderness                0    0     0      0
+c capital                   0    0   100     60
+f fortress                  0  100   500      0
+any other                   0    0   100      0
 
 Infrastructure building - adding 1 point of efficiency costs:
        type          lcms    hcms    mobility    $$$$
@@ -252,8 +252,6 @@ defense factor          1       1           1       1
 .FI
 .s1
 .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"
index 2f23cb9445ffeadc5256fd438b32038679709e0d..1c4d14431df9212e897ca9a8a8a259b91942e307 100644 (file)
@@ -34,7 +34,7 @@ Note that you cannot re-designate bridge spans.
 .s1
 Normally, each point of efficiency added costs you $1. Some sectors
 may cost more, and some may also require the expenditure of lcms and/or
-hcms from the sector. In addition, some sectors may cost money merely
-to designate. (see the \*Qshow\*U command and \*Qinfo show\*U for details)
+hcms from the sector. See the \*Qshow\*U command and \*Qinfo
+Sector-types\*U for details.
 .s1
 .SA "Sector-types, Sectors"
index ca3a0815e717d5d1ff09dac1c901bd5f41563951..888a4a1662ef3f1c3f1329c18e01206ac4109937 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Steve McClure, 1998-2000
- *     Markus Armbruster, 2004-2009
+ *     Markus Armbruster, 2004-2016
  */
 
 #include <config.h>
@@ -109,15 +109,6 @@ desi(void)
        if (sect.sct_type == SCT_SANCT && !player->god)
            continue;
        n = sect.sct_type;
-       if ((sect.sct_newtype != des) && (sect.sct_type != des)
-           && dchr[des].d_cost > 0) {
-           if (natp->nat_money < player->dolcost + dchr[des].d_cost) {
-               pr("You can't afford a %s!\n", dchr[des].d_name);
-               rc = RET_FAIL;
-               break;
-           }
-           player->dolcost += dchr[des].d_cost;
-       }
        if (sect.sct_type != des && (sect.sct_effic < 5 || player->god)) {
            if (player->god)
                set_coastal(&sect, sect.sct_type, des);
index 2a5b087c3b9a43148f7008084772e5a099d670c7..571c308bc6596c8937ec62c2830c5789590526d8 100644 (file)
@@ -52,7 +52,8 @@
 # column cost, and only to something with the same terrain.  All
 # sectors with the same terrain and non-negative cost should have the
 # same population limit (column maxpop), or else players can abuse
-# redesignation to mass-murder people.
+# redesignation to mass-murder people.  Other than that, cost has no
+# purpose anymore.
 
 # A sector with urban packing (urba in column pkg) is a big city.
 # Column maxpop applies at 0% efficiency.  The limit at 100% is ten
index bab48c074763f9677fb935a635d59d28819564b6..ec73193e7791feef0165612181485218cdcd4382 100644 (file)
@@ -402,29 +402,25 @@ show_sect_build(int foo)
 {
     int i, first;
 
-    pr("                        desig   build 100%% eff  maint\n"
-       "sector type                 $   lcm  hcm     $      $\n");
+    pr("                          build 100%% eff  maint\n"
+       "sector type               lcm  hcm     $      $\n");
     for (i = 0; dchr[i].d_name; i++) {
        if (dchr[i].d_mnem == 0)
            continue;
        if (dchr[i].d_mob0 < 0)
            continue;
-       if (dchr[i].d_cost <= 0 && dchr[i].d_build == 1
+       if (dchr[i].d_build == 1
            && dchr[i].d_lcms == 0 && dchr[i].d_hcms == 0
            && dchr[i].d_maint == 0)
            continue;           /* the usual, skip */
-       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  %5d\n",
+       pr("%c %-21.21s %5d%5d %5d  %5d\n",
+          dchr[i].d_mnem, dchr[i].d_name,
           100 * dchr[i].d_lcms,
           100 * dchr[i].d_hcms,
           100 * dchr[i].d_build,
           dchr[i].d_maint * etu_per_update);
     }
-    pr("any other                   0     0    0   100      0\n");
+    pr("any other                   0    0   100      0\n");
 
     first = 1;
     for (i = 0; intrchr[i].in_name; i++) {
index 9387b72ac4d7278277e8d06edd23c337fd841209..d7db7302c3012204bb471d5cac2605a2a9bde014 100644 (file)
     Play#0 input show sect b
     Play#0 command show
     Play#0 output Play#0 1 Printing for tech level '1000'
-    Play#0 output Play#0 1                         desig   build 100% eff  maint
-    Play#0 output Play#0 1 sector type                 $   lcm  hcm     $      $
-    Play#0 output Play#0 1 - wilderness                0     0    0     0      0
-    Play#0 output Play#0 1 c capital                   0     0    0   100     60
-    Play#0 output Play#0 1 f fortress                  0     0  100   500      0
-    Play#0 output Play#0 1 any other                   0     0    0   100      0
+    Play#0 output Play#0 1                           build 100% eff  maint
+    Play#0 output Play#0 1 sector type               lcm  hcm     $      $
+    Play#0 output Play#0 1 - wilderness                0    0     0      0
+    Play#0 output Play#0 1 c capital                   0    0   100     60
+    Play#0 output Play#0 1 f fortress                  0  100   500      0
+    Play#0 output Play#0 1 any other                   0    0   100      0
     Play#0 output Play#0 1
     Play#0 output Play#0 1 Infrastructure building - adding 1 point of efficiency costs:
     Play#0 output Play#0 1        type          lcms    hcms    mobility    $$$$