returns number of containers in object chain; does not recurse into containers; skips bags of tricks when they're known */
| 3846 | /* returns number of containers in object chain; does not recurse into |
| 3847 | containers; skips bags of tricks when they're known */ |
| 3848 | staticfn int |
| 3849 | count_target_containers( |
| 3850 | struct obj *olist, /* list of objects (invent) */ |
| 3851 | struct obj *excludo) /* particular object to exclude if found in list */ |
| 3852 | { |
| 3853 | int ret = 0; |
| 3854 | |
| 3855 | while (olist) { |
| 3856 | if (olist != excludo && Is_container(olist) |
| 3857 | /* include bag of tricks when not known to be such */ |
| 3858 | && (box->otyp != BAG_OF_TRICKS || !box->dknown |
| 3859 | || !objects[box->otyp].oc_name_known)) |
| 3860 | ret++; |
| 3861 | olist = olist->nobj; |
| 3862 | } |
| 3863 | return ret; |
| 3864 | } |
| 3865 | #endif |
| 3866 | |
| 3867 | /* ask user for a carried container into which they want box to be emptied; |
no outgoing calls
no test coverage detected