aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_converter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/common/c_converter.h')
-rw-r--r--src/script/common/c_converter.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/script/common/c_converter.h b/src/script/common/c_converter.h
index 5fea3c21f..2af726d16 100644
--- a/src/script/common/c_converter.h
+++ b/src/script/common/c_converter.h
@@ -61,23 +61,10 @@ bool getintfield(lua_State *L, int table,
return got;
}
-template<class T>
-bool getv3intfield(lua_State *L, int index,
- const char *fieldname, T &result)
-{
- lua_getfield(L, index, fieldname);
- bool got = false;
- if (lua_istable(L, -1)) {
- got |= getintfield(L, -1, "x", result.X);
- got |= getintfield(L, -1, "y", result.Y);
- got |= getintfield(L, -1, "z", result.Z);
- }
- lua_pop(L, 1);
- return got;
-}
-
+// Retrieve an v3s16 where all components are optional (falls back to default)
v3s16 getv3s16field_default(lua_State *L, int table,
const char *fieldname, v3s16 default_);
+
bool getstringfield(lua_State *L, int table,
const char *fieldname, std::string &result);
size_t getstringlistfield(lua_State *L, int table,