diff --git a/doc/lua.adoc b/doc/lua.adoc index 58669e9ec..3b457b670 100644 --- a/doc/lua.adoc +++ b/doc/lua.adoc @@ -201,6 +201,7 @@ Returns a table with the following elements: | ttyp_name | text | name of trap type | tseen | boolean | trap seen by you? | madeby_u | boolean | trap made by you? +| once | boolean | trap is deleted once triggered | tnote | integer | note of a squeaky board trap | launchx, launchy, launch2x, launch2y | integer | coordinates of a boulder for a rolling boulder trap | conjoined | integer | encoded directions for a [spiked] pit. diff --git a/src/nhlua.c b/src/nhlua.c index b3dfd32ad..6bc523e7e 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -432,6 +432,7 @@ nhl_gettrap(lua_State *L) get_trapname_bytype(ttmp->ttyp)); nhl_add_table_entry_bool(L, "tseen", ttmp->tseen); nhl_add_table_entry_bool(L, "madeby_u", ttmp->madeby_u); + nhl_add_table_entry_bool(L, "once", ttmp->once); switch (ttmp->ttyp) { case SQKY_BOARD: nhl_add_table_entry_int(L, "tnote", ttmp->tnote);