(comstr, buy, check_market, display_mark, reset, sell): Change comstr
member com_type from mnemo character to item type. (whichitem): Unused, remove. (check_market): Use full item name instead of mnemo in telegrams. (display_mark): Separate arguments for item type and cheapest only. Cheapest only of specific item type is not implemented. (rese): Guard against bad com_type. Delete some code that had no effect.
This commit is contained in:
parent
988f9a8be7
commit
ca80c373bf
8 changed files with 35 additions and 59 deletions
|
@ -73,7 +73,6 @@ sell(void)
|
|||
int com;
|
||||
char *p;
|
||||
float price;
|
||||
char cc;
|
||||
time_t now;
|
||||
int ii = 0;
|
||||
coord x, y;
|
||||
|
@ -85,8 +84,7 @@ sell(void)
|
|||
}
|
||||
check_market();
|
||||
check_trade();
|
||||
if ((ip =
|
||||
whatitem(player->argp[1], "Commodity you want to sell: ")) == 0)
|
||||
if (!(ip = whatitem(player->argp[1], "Commodity you want to sell: ")))
|
||||
return RET_SYN;
|
||||
if (ip->i_sell == 0) {
|
||||
pr("You can't sell %s\n", ip->i_name);
|
||||
|
@ -165,7 +163,6 @@ sell(void)
|
|||
pr("Sold %d %s at %s (%d left)\n", com, ip->i_name,
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum), amt);
|
||||
sect.sct_item[ip->i_vtype] = amt;
|
||||
cc = ip->i_mnem;
|
||||
putsect(§);
|
||||
if (totalcom > 0) {
|
||||
for (ii = 0; getcomm(ii, &comm); ii++) {
|
||||
|
@ -175,7 +172,7 @@ sell(void)
|
|||
if (getcomm(ii, &comm) == 0)
|
||||
ef_extend(EF_COMM, 1);
|
||||
(void)time(&now);
|
||||
comm.com_type = ip->i_mnem;
|
||||
comm.com_type = ip->i_vtype;
|
||||
comm.com_owner = player->cnum;
|
||||
comm.com_price = price;
|
||||
comm.com_maxbidder = player->cnum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue