]> git.pond.sub.org Git - empserver/commitdiff
Improve work()'s message when sector doesn't need construction
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 3 Aug 2008 20:36:44 +0000 (16:36 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Aug 2008 12:40:04 +0000 (08:40 -0400)
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.

src/lib/commands/work.c

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