summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_base.h')
-rw-r--r--src/script/lua_api/l_base.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/script/lua_api/l_base.h b/src/script/lua_api/l_base.h
index 20aa4cc09..d0160f03b 100644
--- a/src/script/lua_api/l_base.h
+++ b/src/script/lua_api/l_base.h
@@ -71,4 +71,15 @@ public:
int top);
static bool isNaN(lua_State *L, int idx);
+
+ /**
+ * Read a value using a template type T from Lua State L and index
+ *
+ * @tparam T type to read from Lua
+ * @param L Lua state
+ * @param index Lua Index to read
+ * @return read value from Lua
+ */
+ template<typename T>
+ static T readParam(lua_State *L, int index);
};