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

Function unknwn_contnr_contents

src/mkobj.c:683–695  ·  view source on GitHub ↗

is 'obj' inside a container whose contents aren't known? if so, return the outermost container meeting that criterium */

Source from the content-addressed store, hash-verified

681/* is 'obj' inside a container whose contents aren't known?
682 if so, return the outermost container meeting that criterium */
683struct obj *
684unknwn_contnr_contents(struct obj *obj)
685{
686 struct obj *result = 0, *parent;
687
688 while (obj->where == OBJ_CONTAINED) {
689 parent = obj->ocontainer;
690 if (!parent->cknown)
691 result = parent;
692 obj = parent;
693 }
694 return result;
695}
696
697/*
698 * Create a dummy duplicate to put on shop bill. The duplicate exists

Callers 1

dounpaidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected