… | |
… | |
419 | */ |
419 | */ |
420 | const char * |
420 | const char * |
421 | query_weight (const object *op) |
421 | query_weight (const object *op) |
422 | { |
422 | { |
423 | static char buf[10]; |
423 | static char buf[10]; |
424 | sint32 i = (op->nrof ? op->nrof : 1) * op->weight + op->carrying; |
424 | sint32 i = op->total_weight (); |
425 | |
425 | |
426 | if (op->weight < 0) |
426 | if (op->weight < 0) |
427 | return " "; |
427 | return " "; |
428 | |
428 | |
429 | if (i % 1000) |
429 | if (i % 1000) |
… | |
… | |
574 | break; |
574 | break; |
575 | |
575 | |
576 | case ALTAR: |
576 | case ALTAR: |
577 | case TRIGGER_ALTAR: |
577 | case TRIGGER_ALTAR: |
578 | case IDENTIFY_ALTAR: |
578 | case IDENTIFY_ALTAR: |
|
|
579 | case CONVERTER: |
579 | if (op->slaying == shstr_money) |
580 | if (op->slaying == shstr_money) |
580 | { |
581 | { |
581 | bool wrap = !!buf.size (); |
582 | bool wrap = !!buf.size (); |
582 | |
583 | |
583 | if (wrap) buf << " ["; |
584 | if (wrap) buf << " ["; |
… | |
… | |
589 | if (op->stats.food % coin->value == 0) |
590 | if (op->stats.food % coin->value == 0) |
590 | break; |
591 | break; |
591 | |
592 | |
592 | sint32 coins = op->stats.food / coin->value; |
593 | sint32 coins = op->stats.food / coin->value; |
593 | |
594 | |
594 | buf.printf ("drop %d %s", coins, coins == 1 ? &coin->name : &coin->name_pl); |
595 | buf.printf ("drop %d %s (or equivalent)", coins, coins == 1 ? &coin->name : &coin->name_pl); |
595 | |
596 | |
596 | if (wrap) buf << ']'; |
597 | if (wrap) buf << ']'; |
597 | } |
598 | } |
598 | break; |
599 | break; |
599 | |
600 | |
… | |
… | |
1193 | } |
1194 | } |
1194 | |
1195 | |
1195 | void |
1196 | void |
1196 | examine (object *op, object *tmp) |
1197 | examine (object *op, object *tmp) |
1197 | { |
1198 | { |
1198 | std::string s = tmp->describe (op); |
1199 | std::string info = tmp->describe (op); |
1199 | |
1200 | op->contr->infobox (MSG_CHANNEL ("examine"), info.c_str ()); |
1200 | new_draw_info (NDI_UNIQUE, 0, op, s.c_str ()); |
|
|
1201 | } |
1201 | } |
1202 | |
1202 | |
1203 | /* |
1203 | /* |
1204 | * inventory prints object's inventory. If inv==NULL then print player's |
1204 | * inventory prints object's inventory. If inv==NULL then print player's |
1205 | * inventory. |
1205 | * inventory. |