Improve work()'s message when sector doesn't need construction

The cheesy test for repeated messages broke down when working on more
than one sector.  Reword the message so that repetition is fine, and
drop the test.
This commit is contained in:
Markus Armbruster 2008-08-03 16:36:44 -04:00
parent c20ac26ecc
commit ede42fb9ce

View file

@ -48,7 +48,6 @@ work(void)
struct lndstr land; struct lndstr land;
int work_amt, eff_amt, w; int work_amt, eff_amt, w;
char *p; char *p;
coord donex = 0, doney = 1;
char buf[1024]; char buf[1024];
if (!snxtitem(&ni, EF_LAND, player->argp[1], NULL)) if (!snxtitem(&ni, EF_LAND, player->argp[1], NULL))
@ -73,13 +72,8 @@ work(void)
} }
getsect(land.lnd_x, land.lnd_y, &sect); getsect(land.lnd_x, land.lnd_y, &sect);
if (sect.sct_effic >= 100 && sect.sct_type == sect.sct_newtype) { if (sect.sct_effic >= 100 && sect.sct_type == sect.sct_newtype) {
if (sect.sct_x != donex || sect.sct_y != doney) pr("Nothing to do for %s in %s\n",
pr("%s is %d%% efficient\n", prland(&land), xyas(sect.sct_x, sect.sct_y, player->cnum));
xyas(sect.sct_x, sect.sct_y, player->cnum),
sect.sct_effic);
/* not perfect, but it'll do -KHS */
donex = sect.sct_x;
doney = sect.sct_y;
continue; continue;
} }
eff_amt = MIN(land.lnd_mobil, work_amt); eff_amt = MIN(land.lnd_mobil, work_amt);