the #pickup command */
| 3873 | |
| 3874 | /* the #pickup command */ |
| 3875 | int |
| 3876 | dopickup(void) |
| 3877 | { |
| 3878 | int count, tmpcount, ret; |
| 3879 | |
| 3880 | count = (int) gc.command_count; |
| 3881 | gm.multi = 0; /* always reset */ |
| 3882 | |
| 3883 | if ((ret = pickup_checks()) >= 0) { |
| 3884 | return ret ? ECMD_TIME : ECMD_OK; |
| 3885 | } else if (ret == -2) { |
| 3886 | tmpcount = -count; |
| 3887 | return loot_mon(u.ustuck, &tmpcount, (boolean *) 0) ? ECMD_TIME |
| 3888 | : ECMD_OK; |
| 3889 | } /* else ret == -1 */ |
| 3890 | |
| 3891 | return pickup(-count) ? ECMD_TIME : ECMD_OK; |
| 3892 | } |
| 3893 | |
| 3894 | /* stop running if we see something interesting next to us */ |
| 3895 | /* turn around a corner if that is the only way we can proceed */ |
nothing calls this directly
no test coverage detected