local stairs = stairways(); */
| 1366 | |
| 1367 | /* local stairs = stairways(); */ |
| 1368 | staticfn int |
| 1369 | nhl_stairways(lua_State *L) |
| 1370 | { |
| 1371 | stairway *tmp = gs.stairs; |
| 1372 | int i = 1; /* lua arrays should start at 1 */ |
| 1373 | |
| 1374 | lua_newtable(L); |
| 1375 | |
| 1376 | while (tmp) { |
| 1377 | lua_pushinteger(L, i); |
| 1378 | lua_newtable(L); |
| 1379 | |
| 1380 | nhl_add_table_entry_bool(L, "up", tmp->up); |
| 1381 | nhl_add_table_entry_bool(L, "ladder", tmp->isladder); |
| 1382 | nhl_add_table_entry_int(L, "x", tmp->sx); |
| 1383 | nhl_add_table_entry_int(L, "y", tmp->sy); |
| 1384 | nhl_add_table_entry_int(L, "dnum", tmp->tolev.dnum); |
| 1385 | nhl_add_table_entry_int(L, "dlevel", tmp->tolev.dlevel); |
| 1386 | |
| 1387 | lua_settable(L, -3); |
| 1388 | |
| 1389 | tmp = tmp->next; |
| 1390 | i++; |
| 1391 | } |
| 1392 | |
| 1393 | return 1; |
| 1394 | } |
| 1395 | |
| 1396 | /* |
| 1397 | test( { x = 123, y = 456 } ); |
nothing calls this directly
no test coverage detected