From 689f435aff9181accb186457e6e776446772c167 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 11 Mar 2004 08:53:27 +0000 Subject: [PATCH] (opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS. --- include/optlist.h | 1 - info/Server/Options.t | 1 - src/lib/global/options.c | 7 ------- src/lib/update/material.c | 21 ++------------------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/include/optlist.h b/include/optlist.h index d74894f57..edbdd3bc1 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -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; diff --git a/info/Server/Options.t b/info/Server/Options.t index 6cd0be384..fe713ec6c 100644 --- a/info/Server/Options.t +++ b/info/Server/Options.t @@ -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 diff --git a/src/lib/global/options.c b/src/lib/global/options.c index 8e8f06886..8a3a7a8df 100644 --- a/src/lib/global/options.c +++ b/src/lib/global/options.c @@ -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}, diff --git a/src/lib/update/material.c b/src/lib/update/material.c index 593e60aa4..9c57da2c1 100644 --- a/src/lib/update/material.c +++ b/src/lib/update/material.c @@ -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); } } } -- 2.43.0