the #seeweapon command */
| 4547 | |
| 4548 | /* the #seeweapon command */ |
| 4549 | int |
| 4550 | doprwep(void) |
| 4551 | { |
| 4552 | if (!uwep) { |
| 4553 | You("are %s.", empty_handed()); |
| 4554 | } else if (!iflags.menu_requested) { |
| 4555 | prinv((char *) 0, uwep, 0L); |
| 4556 | if (u.twoweap) |
| 4557 | prinv((char *) 0, uswapwep, 0L); |
| 4558 | } else { |
| 4559 | char lets[4]; /* 4: uwep, uswapwep, uquiver, terminator */ |
| 4560 | int ct = 0; |
| 4561 | |
| 4562 | /* obj_to_let() will assign letters to all of invent if necessary |
| 4563 | (for '!fixinv') so doesn't need to be repeated once called here */ |
| 4564 | lets[ct++] = obj_to_let(uwep); |
| 4565 | if (uswapwep) |
| 4566 | lets[ct++] = uswapwep->invlet; |
| 4567 | if (uquiver) |
| 4568 | lets[ct++] = uquiver->invlet; |
| 4569 | lets[ct] = '\0'; |
| 4570 | |
| 4571 | (void) dispinv_with_action(lets, TRUE, NULL); |
| 4572 | } |
| 4573 | return ECMD_OK; |
| 4574 | } |
| 4575 | |
| 4576 | /* caller is responsible for checking !wearing_armor() */ |
| 4577 | staticfn void |
nothing calls this directly
no test coverage detected