| 156 | } |
| 157 | |
| 158 | static df::coord CheckCoordXYZ(lua_State *state, int base, bool vararg = false) |
| 159 | { |
| 160 | df::coord p; |
| 161 | if (vararg && lua_gettop(state) <= base) |
| 162 | Lua::CheckDFAssign(state, &p, base); |
| 163 | else |
| 164 | { |
| 165 | p = df::coord( |
| 166 | luaL_checkint(state, base), |
| 167 | luaL_checkint(state, base+1), |
| 168 | luaL_checkint(state, base+2) |
| 169 | ); |
| 170 | } |
| 171 | return p; |
| 172 | } |
| 173 | |
| 174 | template<class T> |
| 175 | static bool get_int_field(lua_State *L, T *pf, int idx, const char *name, int defval) |
no test coverage detected