MCPcopy Index your code
hub / github.com/NetHack/NetHack / l_obj_container

Function l_obj_container

src/nhlobj.c:468–478  ·  view source on GitHub ↗

Get the container object is in */ local box = o:container(); */

Source from the content-addressed store, hash-verified

466/* Get the container object is in */
467/* local box = o:container(); */
468staticfn int
469l_obj_container(lua_State *L)
470{
471 struct _lua_obj *lo = l_obj_check(L, 1);
472
473 if (lo && lo->obj && lo->obj->where == OBJ_CONTAINED)
474 (void) l_obj_push(L, lo->obj->ocontainer);
475 else
476 (void) l_obj_push(L, NULL);
477 return 1;
478}
479
480/* Is the object a null? */
481/* local badobj = o:isnull(); */

Callers

nothing calls this directly

Calls 2

l_obj_checkFunction · 0.85
l_obj_pushFunction · 0.85

Tested by

no test coverage detected