| 398 | } |
| 399 | |
| 400 | static int lua_dfhack_color(lua_State *S) |
| 401 | { |
| 402 | int cv = luaL_optint(S, 1, -1); |
| 403 | |
| 404 | if (cv < -1 || cv > COLOR_MAX) |
| 405 | luaL_argerror(S, 1, "invalid color value"); |
| 406 | |
| 407 | color_ostream *out = Lua::GetOutput(S); |
| 408 | if (out) { |
| 409 | lua_pushinteger(S, (int)out->color()); |
| 410 | out->color(color_ostream::color_value(cv)); |
| 411 | return 1; |
| 412 | } |
| 413 | return 0; |
| 414 | } |
| 415 | |
| 416 | static int lua_dfhack_is_interactive(lua_State *S) |
| 417 | { |
nothing calls this directly
no test coverage detected