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

Function GetDFObject

library/include/LuaTools.h:169–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 */
168 template<df_object T>
169 T *GetDFObject(lua_State *state, int val_index, bool exact_type = false) {
170 return (T*)GetDFObject(state, df::identity_traits<T>::get(), val_index, exact_type);
171 }
172
173 /**
174 * Check that the value is a wrapped DF object of the correct type, and if so return the pointer. Otherwise throw an argument type error.

Callers 1

doAssignDFObjectFunction · 0.85

Calls 1

getFunction · 0.70

Tested by

no test coverage detected