local dungeon_name = dnum_name(u.dnum); */
| 1150 | |
| 1151 | /* local dungeon_name = dnum_name(u.dnum); */ |
| 1152 | staticfn int |
| 1153 | nhl_dnum_name(lua_State *L) |
| 1154 | { |
| 1155 | int argc = lua_gettop(L); |
| 1156 | |
| 1157 | if (argc == 1) { |
| 1158 | lua_Integer dnum = luaL_checkinteger(L, 1); |
| 1159 | |
| 1160 | if (dnum >= 0 && dnum < svn.n_dgns) |
| 1161 | lua_pushstring(L, svd.dungeons[dnum].dname); |
| 1162 | else |
| 1163 | lua_pushstring(L, ""); |
| 1164 | } else |
| 1165 | nhl_error(L, "Expected an integer parameter"); |
| 1166 | return 1; |
| 1167 | } |
| 1168 | |
| 1169 | /* return gender-neutral monster type name by integer value, |
| 1170 | or empty string if outside LOW_PM - HIGH_PM range */ |
nothing calls this directly
no test coverage detected