is 'obj' a tool that's in use? can't simply check obj->owornmask */
| 4695 | |
| 4696 | /* is 'obj' a tool that's in use? can't simply check obj->owornmask */ |
| 4697 | staticfn boolean |
| 4698 | tool_being_used(struct obj *obj) |
| 4699 | { |
| 4700 | /* |
| 4701 | * [Should this also include lit potions of oil? They're not tools |
| 4702 | * but they are "in use" without being noticeable via obj->owornmask.] |
| 4703 | */ |
| 4704 | if ((obj->owornmask & (W_TOOL | W_SADDLE)) != 0L) |
| 4705 | return TRUE; |
| 4706 | if (obj->oclass != TOOL_CLASS) |
| 4707 | return FALSE; |
| 4708 | /* [don't actually need to check uwep here; caller catches it] */ |
| 4709 | return (boolean) (obj == uwep || obj->lamplit |
| 4710 | || (obj->otyp == LEASH && obj->leashmon)); |
| 4711 | } |
| 4712 | |
| 4713 | /* the #seetools command */ |
| 4714 | int |