MCPcopy Create free account
hub / github.com/NetHack/NetHack / stash_ok

Function stash_ok

src/pickup.c:2956–2969  ·  view source on GitHub ↗

getobj callback for object to be stashed into a container */

Source from the content-addressed store, hash-verified

2954
2955/* getobj callback for object to be stashed into a container */
2956staticfn int
2957stash_ok(struct obj *obj)
2958{
2959 if (!obj)
2960 return GETOBJ_EXCLUDE;
2961
2962 /* downplay the container being stashed into */
2963 if (!ck_bag(obj))
2964 return GETOBJ_EXCLUDE_SELECTABLE;
2965 /* Possible extension: downplay things too big to fit into containers (in
2966 * which case extract in_container()'s logic.) */
2967
2968 return GETOBJ_SUGGEST;
2969}
2970
2971int
2972use_container(

Callers

nothing calls this directly

Calls 1

ck_bagFunction · 0.85

Tested by

no test coverage detected