Fix recently changed command failures to use BTUs

Failing a command with code RET_SYN prints help and doesn't charge
BTUs.  Failing with code RET_FAIL doesn't print help and charges BTUs.

A couple of command failures were changed or added recently to fail
with RET_SYN, because they're due to invalid player input.  Some of
them, however, can happen after the command already did something, so
BTUs must be charged, or else players can deliberately fail the
command to save BTUs:

* Commit 9eda5f87 adds RET_SYN failures when getting player input
  fails for:

  - arm third argument
  - deliver fourth argument
  - fire third argument
  - lmine second argument
  - order d fourth argument
  - range second argument
  - sail second argument
  - tend third argument

* Commit be41e70f likewise for:

  - designate second argument
  - morale second argument
  - set third argument
  - tend fourth argument

* Commit d000bf92 likewise (with a bogus commit message) for bdes
  second argument.

* Commit 9f4ce71a likewise for ltend third and fourth argument.

* Commit 9031b03b changes failure code from RET_FAIL when getting
  player input fails for threshold third argument.  It adds RET_SYN
  failure when the argument is bad.  Some bad arguments already failed
  that way before.

* Commit a7cf69af changes it from RET_FAIL when designate second
  argument is bad.

Change them all to fail with RET_FAIL.

Many other places have the same bug, but those are left for another
day.
This commit is contained in:
Markus Armbruster 2008-08-09 11:44:26 -04:00
parent c7d2144154
commit a532c76428
14 changed files with 20 additions and 20 deletions

View file

@ -59,7 +59,7 @@ bdes(void)
xyas(nstr.x, nstr.y, player->cnum),
d ? d : ' ');
if ((p = getstarg(player->argp[2], prompt, buf)) == 0) {
rc = RET_SYN;
rc = RET_FAIL;
break;
}
if (!isprint(*p)) {