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

Method GetVector

library/LuaTools.cpp:120–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void DFHack::Lua::GetVector(lua_State *state, std::vector<std::string> &pvec, int idx)
121{
122 luaL_checktype(state, idx, LUA_TTABLE);
123 lua_pushnil(state); // first key
124 while (lua_next(state, idx) != 0)
125 {
126 pvec.push_back(lua_tostring(state, -1));
127 lua_pop(state, 1); // remove value, leave key
128 }
129}
130
131static bool trigger_inhibit_l = false;
132static bool trigger_inhibit_r = false;

Callers

nothing calls this directly

Calls 3

luaL_checktypeFunction · 0.85
lua_pushnilFunction · 0.85
lua_nextFunction · 0.85

Tested by

no test coverage detected