(buy, mark, display_mark): Move argument evaluation from
display_mark() to callers. buy() no longer accepts "all". It used to display all lots, but didn't let you buy any. Similar nonsense happened for "" if buy() prompted for it. (display_mark): Fix size of cheapest_items[]. (player_coms): Document mark accepting "all".
This commit is contained in:
parent
b0627a97cb
commit
60bbb6b0c0
5 changed files with 34 additions and 34 deletions
|
@ -82,7 +82,10 @@ buy(void)
|
|||
return RET_FAIL;
|
||||
}
|
||||
natp = getnatp(player->cnum);
|
||||
display_mark(player->argp[1]);
|
||||
ip = whatitem(player->argp[1], "Commodity you want to buy: ");
|
||||
if (!ip)
|
||||
return RET_SYN;
|
||||
display_mark(ip->i_mnem);
|
||||
pr("\n");
|
||||
p = getstarg(player->argp[2], "Which lot are you bidding on: ", buf);
|
||||
if (p == 0)
|
||||
|
@ -96,8 +99,7 @@ buy(void)
|
|||
pr("Invalid lot number.\n");
|
||||
return RET_OK;
|
||||
}
|
||||
if (player->argp[1] && *(player->argp[1]) &&
|
||||
comm.com_type != player->argp[1][0]) {
|
||||
if (comm.com_type != ip->i_mnem) {
|
||||
pr("That lot is not of the type you specified.\n");
|
||||
return RET_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue