]> git.pond.sub.org Git - empserver/commit - src/lib/commands/arm.c
Fix recently changed command failures to use BTUs
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Aug 2008 15:44:26 +0000 (11:44 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Aug 2008 16:09:50 +0000 (12:09 -0400)
commita532c764284bb04257ee3878ecd061929e5ccba2
treeb7e506855ebbca67fe1f73e74462a7d70048a7c1
parentc7d21441541b6fab0e2f11eb73c0e7c805123b43
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.
14 files changed:
src/lib/commands/arm.c
src/lib/commands/bdes.c
src/lib/commands/deli.c
src/lib/commands/desi.c
src/lib/commands/lten.c
src/lib/commands/mfir.c
src/lib/commands/mine.c
src/lib/commands/mora.c
src/lib/commands/orde.c
src/lib/commands/rang.c
src/lib/commands/sail.c
src/lib/commands/set.c
src/lib/commands/tend.c
src/lib/commands/thre.c