| 442 | local firstobj = obj.next(); |
| 443 | */ |
| 444 | staticfn int |
| 445 | l_obj_nextobj(lua_State *L) |
| 446 | { |
| 447 | int argc = lua_gettop(L); |
| 448 | |
| 449 | if (argc == 0) { |
| 450 | (void) l_obj_push(L, fobj); |
| 451 | } else { |
| 452 | struct _lua_obj *lo = l_obj_check(L, 1); |
| 453 | boolean use_nexthere = FALSE; |
| 454 | |
| 455 | if (argc == 2) |
| 456 | use_nexthere = lua_toboolean(L, 2); |
| 457 | |
| 458 | if (lo && lo->obj) |
| 459 | (void) l_obj_push(L, (use_nexthere && lo->obj->where == OBJ_FLOOR) |
| 460 | ? lo->obj->nexthere |
| 461 | : lo->obj->nobj); |
| 462 | } |
| 463 | return 1; |
| 464 | } |
| 465 | |
| 466 | /* Get the container object is in */ |
| 467 | /* local box = o:container(); */ |
nothing calls this directly
no test coverage detected