| 9251 | } |
| 9252 | |
| 9253 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 9254 | |
| 9255 | int |
| 9256 | dotogglepickup(void) |
| 9257 | { |
| 9258 | char buf[BUFSZ], ocl[MAXOCLASSES + 1]; |
| 9259 | |
| 9260 | flags.pickup = !flags.pickup; |
| 9261 | if (flags.pickup) { |
| 9262 | oc_to_str(flags.pickup_types, ocl); |
| 9263 | Sprintf(buf, "ON, for %s objects%s", ocl[0] ? ocl : "all", |
| 9264 | (ga.apelist) |
| 9265 | ? ((count_apes() == 1) |
| 9266 | ? ", with one exception" |
| 9267 | : ", with some exceptions") |
| 9268 | : ""); |
| 9269 | } else { |
| 9270 | Strcpy(buf, "OFF"); |
| 9271 | } |
| 9272 | pline("Autopickup: %s.", buf); |
| 9273 | return ECMD_OK; |
| 9274 | } |
| 9275 | |
| 9276 | /* toggle any (settable in-game) boolean option by name */ |
| 9277 | int |
nothing calls this directly
no test coverage detected