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

Function name_ok

src/do_name.c:466–476  ·  view source on GitHub ↗

getobj callback for object to name (specific item) - anything but gold */

Source from the content-addressed store, hash-verified

464
465/* getobj callback for object to name (specific item) - anything but gold */
466int
467name_ok(struct obj *obj)
468{
469 if (!obj || obj->oclass == COIN_CLASS)
470 return GETOBJ_EXCLUDE;
471
472 if (!obj->dknown || obj->oartifact || obj->otyp == SPE_NOVEL)
473 return GETOBJ_DOWNPLAY;
474
475 return GETOBJ_SUGGEST;
476}
477
478/* getobj callback for object to call (name its type) */
479int

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected