(opt_GRAB_THINGS, Options, get_materials): Remove option GRAB_THINGS.

This commit is contained in:
Markus Armbruster 2004-03-11 08:53:27 +00:00
parent 9ad7afbf17
commit 689f435aff
4 changed files with 2 additions and 28 deletions

View file

@ -55,7 +55,6 @@ extern int opt_FALLOUT;
extern int opt_FUEL; extern int opt_FUEL;
extern int opt_GODNEWS; extern int opt_GODNEWS;
extern int opt_GO_RENEW; extern int opt_GO_RENEW;
extern int opt_GRAB_THINGS;
extern int opt_HIDDEN; extern int opt_HIDDEN;
extern int opt_INTERDICT_ATT; extern int opt_INTERDICT_ATT;
extern int opt_LANDSPIES; extern int opt_LANDSPIES;

View file

@ -31,7 +31,6 @@ NEWPOWER: New power formula. See "info power".
NO_PLAGUE: Plague is disabled. NO_PLAGUE: Plague is disabled.
NEW_STARVE: UW's starve, then civs, then mil NEW_STARVE: UW's starve, then civs, then mil
NEW_WORK: Work is changed in proportion to the # of civs moved 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 NEUTRON: Enables neutron bombs
FALLOUT: Sectors are damaged by radiation for a few updates after blast FALLOUT: Sectors are damaged by radiation for a few updates after blast

View file

@ -243,12 +243,6 @@ int opt_RES_POP = 1;
int opt_RES_POP = 0; int opt_RES_POP = 0;
#endif #endif
#ifdef GRAB_THINGS
int opt_GRAB_THINGS = 1;
#else
int opt_GRAB_THINGS = 0;
#endif
#ifdef SHOWPLANE #ifdef SHOWPLANE
int opt_SHOWPLANE = 1; int opt_SHOWPLANE = 1;
#else #else
@ -346,7 +340,6 @@ struct option_list Options[] = {
{"FUEL", &opt_FUEL}, {"FUEL", &opt_FUEL},
{"GODNEWS", &opt_GODNEWS}, {"GODNEWS", &opt_GODNEWS},
{"GO_RENEW", &opt_GO_RENEW}, {"GO_RENEW", &opt_GO_RENEW},
{"GRAB_THINGS", &opt_GRAB_THINGS},
{"HIDDEN", &opt_HIDDEN}, {"HIDDEN", &opt_HIDDEN},
{"INTERDICT_ATT", &opt_INTERDICT_ATT}, {"INTERDICT_ATT", &opt_INTERDICT_ATT},
{"LANDSPIES", &opt_LANDSPIES}, {"LANDSPIES", &opt_LANDSPIES},

View file

@ -50,9 +50,7 @@ void
get_materials(struct sctstr *sp, int *bp, int *mvec, int check) get_materials(struct sctstr *sp, int *bp, int *mvec, int check)
/* only check if found=0, remove them=1 */ /* only check if found=0, remove them=1 */
{ {
struct sctstr *usp;
int i; int i;
int used_already;
int still_left; int still_left;
int svec[I_MAX + 1]; int svec[I_MAX + 1];
@ -61,35 +59,20 @@ get_materials(struct sctstr *sp, int *bp, int *mvec, int check)
if (mvec[i] == 0) if (mvec[i] == 0)
continue; continue;
usp = sp;
if (check) { if (check) {
still_left = gt_bg_nmbr(bp, sp, i); still_left = gt_bg_nmbr(bp, sp, i);
if ((still_left - mvec[i]) < 0) if ((still_left - mvec[i]) < 0)
still_left = 0; still_left = 0;
else else
still_left -= mvec[i]; 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); pt_bg_nmbr(bp, sp, i, still_left);
svec[i] = still_left; svec[i] = still_left;
if (!player->simulation) if (!player->simulation)
putvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR); putvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR);
} else { } 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); still_left = gt_bg_nmbr(bp, sp, i);
mvec[i] = MIN(mvec[i], still_left); mvec[i] = MIN(mvec[i], still_left);
} }
} }
} }
}