| 443 | } |
| 444 | |
| 445 | static int dfhack_matinfo_find(lua_State *state) |
| 446 | { |
| 447 | MaterialInfo info; |
| 448 | int argc = lua_gettop(state); |
| 449 | |
| 450 | if (argc == 1) |
| 451 | info.find(luaL_checkstring(state, 1)); |
| 452 | else |
| 453 | { |
| 454 | vector<string> tokens; |
| 455 | |
| 456 | for (int i = 1; i <= argc; i++) |
| 457 | tokens.push_back(luaL_checkstring(state, i)); |
| 458 | |
| 459 | info.find(tokens); |
| 460 | } |
| 461 | |
| 462 | Lua::Push(state, info); |
| 463 | return 1; |
| 464 | } |
| 465 | |
| 466 | static bool decode_matinfo(lua_State *state, MaterialInfo *info, bool numpair = false) |
| 467 | { |
nothing calls this directly
no test coverage detected