MCPcopy Create free account
hub / github.com/DFHack/dfhack / dfhack_matinfo_find

Function dfhack_matinfo_find

library/LuaApi.cpp:445–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445static 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
466static bool decode_matinfo(lua_State *state, MaterialInfo *info, bool numpair = false)
467{

Callers

nothing calls this directly

Calls 3

lua_gettopFunction · 0.85
PushFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected