the #takeoffall command -- remove multiple worn items */
| 3019 | |
| 3020 | /* the #takeoffall command -- remove multiple worn items */ |
| 3021 | int |
| 3022 | doddoremarm(void) |
| 3023 | { |
| 3024 | int result = 0; |
| 3025 | |
| 3026 | if (svc.context.takeoff.what || svc.context.takeoff.mask) { |
| 3027 | You("continue %s.", svc.context.takeoff.disrobing); |
| 3028 | set_occupation(take_off, svc.context.takeoff.disrobing, 0); |
| 3029 | return ECMD_OK; |
| 3030 | } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf |
| 3031 | && !uleft && !uright && !wearing_armor()) { |
| 3032 | You("are not wearing anything."); |
| 3033 | return ECMD_OK; |
| 3034 | } |
| 3035 | |
| 3036 | add_valid_menu_class(0); /* reset */ |
| 3037 | if (flags.menu_style != MENU_TRADITIONAL |
| 3038 | || (result = ggetobj("take off", select_off, 0, FALSE, |
| 3039 | (unsigned *) 0)) < -1) |
| 3040 | (void) menu_remarm(result); |
| 3041 | |
| 3042 | if (svc.context.takeoff.mask) { |
| 3043 | (void) strncpy(svc.context.takeoff.disrobing, |
| 3044 | (((svc.context.takeoff.mask & ~W_WEAPONS) != 0) |
| 3045 | /* default activity for armor and/or accessories, |
| 3046 | possibly combined with weapons */ |
| 3047 | ? "disrobing" |
| 3048 | /* specific activity when handling weapons only */ |
| 3049 | : "disarming"), CONTEXTVERBSZ); |
| 3050 | (void) take_off(); |
| 3051 | } |
| 3052 | /* The time to perform the command is already completely accounted for |
| 3053 | * in take_off(); if we return 1, that would add an extra turn to each |
| 3054 | * disrobe. |
| 3055 | */ |
| 3056 | return ECMD_OK; |
| 3057 | } |
| 3058 | |
| 3059 | /* #altunwield - just unwield alternate weapon, item-action '-' when picking |
| 3060 | uswapwep from context-sensitive inventory */ |
nothing calls this directly
no test coverage detected