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: * Commit9eda5f87
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 * Commitbe41e70f
likewise for: - designate second argument - morale second argument - set third argument - tend fourth argument * Commitd000bf92
likewise (with a bogus commit message) for bdes second argument. * Commit9f4ce71a
likewise for ltend third and fourth argument. * Commit9031b03b
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. * Commita7cf69af
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:
parent
c7d2144154
commit
a532c76428
14 changed files with 20 additions and 20 deletions
|
@ -53,7 +53,7 @@ range(void)
|
|||
continue;
|
||||
p = getstarg(player->argp[2], "New range? ", buf);
|
||||
if (!p)
|
||||
return RET_SYN;
|
||||
return RET_FAIL;
|
||||
if (!check_plane_ok(&plane))
|
||||
return RET_SYN;
|
||||
if ((i = atoi(p)) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue