]> git.pond.sub.org Git - empserver/commitdiff
(opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS.
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 11 Mar 2004 08:53:27 +0000 (08:53 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 11 Mar 2004 08:53:27 +0000 (08:53 +0000)
include/optlist.h
info/Server/Options.t
src/lib/global/options.c
src/lib/update/material.c

index d74894f5707514db026f29259dee253c443adea2..edbdd3bc18101de2bb17e22debc9ddba5362da4b 100644 (file)
@@ -55,7 +55,6 @@ extern int opt_FALLOUT;
 extern int opt_FUEL;
 extern int opt_GODNEWS;
 extern int opt_GO_RENEW;
-extern int opt_GRAB_THINGS;
 extern int opt_HIDDEN;
 extern int opt_INTERDICT_ATT;
 extern int opt_LANDSPIES;
index 6cd0be384a36685e6bef696a89e36b343fa39225..fe713ec6c6390eb4a9c1b1b4607de730968fe04b 100644 (file)
@@ -31,7 +31,6 @@ NEWPOWER:     New power formula.  See "info power".
 NO_PLAGUE:     Plague is disabled.
 NEW_STARVE:    UW's starve, then civs, then mil
 NEW_WORK:      Work is changed in proportion to the # of civs moved
-GRAB_THINGS:   Units will grab things they need to build
 NEUTRON:       Enables neutron bombs
 FALLOUT:       Sectors are damaged by radiation for a few updates after blast
 
index 8e8f06886f9b05ededcd0e0d6120851b95fcf62b..8a3a7a8df9f26ea2e8abe1bd1908c1bc529b77dd 100644 (file)
@@ -243,12 +243,6 @@ int opt_RES_POP = 1;
 int opt_RES_POP = 0;
 #endif
 
-#ifdef GRAB_THINGS
-int opt_GRAB_THINGS = 1;
-#else
-int opt_GRAB_THINGS = 0;
-#endif
-
 #ifdef SHOWPLANE
 int opt_SHOWPLANE = 1;
 #else
@@ -346,7 +340,6 @@ struct option_list Options[] = {
     {"FUEL", &opt_FUEL},
     {"GODNEWS", &opt_GODNEWS},
     {"GO_RENEW", &opt_GO_RENEW},
-    {"GRAB_THINGS", &opt_GRAB_THINGS},
     {"HIDDEN", &opt_HIDDEN},
     {"INTERDICT_ATT", &opt_INTERDICT_ATT},
     {"LANDSPIES", &opt_LANDSPIES},
index 593e60aa48051631dd059b81c6904a629313dc36..9c57da2c17410271585308331e342ee43da7ffd7 100644 (file)
@@ -50,9 +50,7 @@ void
 get_materials(struct sctstr *sp, int *bp, int *mvec, int check)
               /* only check if found=0, remove them=1 */
 {
-    struct sctstr *usp;
     int i;
-    int used_already;
     int still_left;
     int svec[I_MAX + 1];
 
@@ -61,35 +59,20 @@ get_materials(struct sctstr *sp, int *bp, int *mvec, int check)
        if (mvec[i] == 0)
            continue;
 
-       usp = sp;
        if (check) {
            still_left = gt_bg_nmbr(bp, sp, i);
            if ((still_left - mvec[i]) < 0)
                still_left = 0;
            else
                still_left -= mvec[i];
-
-           if (opt_GRAB_THINGS)
-               mvec[i] =
-                   supply_commod(usp->sct_own, usp->sct_x, usp->sct_y, i,
-                                 mvec[i]);
            pt_bg_nmbr(bp, sp, i, still_left);
            svec[i] = still_left;
            if (!player->simulation)
                putvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR);
 
        } else {
-
-           if (opt_GRAB_THINGS) {
-               used_already = svec[i] - gt_bg_nmbr(bp, sp, i);
-               mvec[i] =
-                   try_supply_commod(usp->sct_own, usp->sct_x, usp->sct_y,
-                                     i, (mvec[i] + used_already));
-               mvec[i] -= used_already;
-           } else {            /* ! GRAB_THINGS */
-               still_left = gt_bg_nmbr(bp, sp, i);
-               mvec[i] = MIN(mvec[i], still_left);
-           }
+           still_left = gt_bg_nmbr(bp, sp, i);
+           mvec[i] = MIN(mvec[i], still_left);
        }
     }
 }