the #seearmor command */
| 4598 | |
| 4599 | /* the #seearmor command */ |
| 4600 | int |
| 4601 | doprarm(void) |
| 4602 | { |
| 4603 | /* |
| 4604 | * Note: players sometimes get here by pressing a function key which |
| 4605 | * transmits ''ESC [ <something>'' rather than by pressing '['; |
| 4606 | * there's nothing we can--or should-do about that here. |
| 4607 | */ |
| 4608 | |
| 4609 | if (!wearing_armor()) { |
| 4610 | noarmor(TRUE); |
| 4611 | } else { |
| 4612 | char lets[8]; /* 8: up to 7 pieces of armor plus terminator */ |
| 4613 | int ct = 0; |
| 4614 | |
| 4615 | /* obj_to_let() will assign letters to all of invent if necessary |
| 4616 | (for '!fixinv') so doesn't need to be repeated once called, but |
| 4617 | each armor slot doesn't know whether any that precede have made |
| 4618 | that call so just do it for each one; use SORTPACK_INUSE order */ |
| 4619 | if (uarm) |
| 4620 | lets[ct++] = obj_to_let(uarm); |
| 4621 | if (uarmc) |
| 4622 | lets[ct++] = obj_to_let(uarmc); |
| 4623 | if (uarms) |
| 4624 | lets[ct++] = obj_to_let(uarms); |
| 4625 | if (uarmh) |
| 4626 | lets[ct++] = obj_to_let(uarmh); |
| 4627 | if (uarmg) |
| 4628 | lets[ct++] = obj_to_let(uarmg); |
| 4629 | if (uarmf) |
| 4630 | lets[ct++] = obj_to_let(uarmf); |
| 4631 | if (uarmu) |
| 4632 | lets[ct++] = obj_to_let(uarmu); |
| 4633 | lets[ct] = 0; |
| 4634 | |
| 4635 | (void) dispinv_with_action(lets, TRUE, NULL); |
| 4636 | } |
| 4637 | return ECMD_OK; |
| 4638 | } |
| 4639 | |
| 4640 | /* the #seerings command */ |
| 4641 | int |
nothing calls this directly
no test coverage detected