summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-rw-r--r--src/Bindings/LuaState.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index ccd7244fa..3a1379df1 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -1489,6 +1489,22 @@ bool cLuaState::GetStackValue(int a_StackPos, cUUID & a_Value)
+bool cLuaState::GetStackValue(int a_StackPos, std::string_view & a_Value)
+{
+ size_t Length = 0;
+ const char * const Value = lua_tolstring(m_LuaState, a_StackPos, &Length);
+ if (Value != nullptr)
+ {
+ a_Value = { Value, Length };
+ return true;
+ }
+ return false;
+}
+
+
+
+
+
template <typename T>
bool cLuaState::GetStackValue(int a_StackPos, Vector3<T> & a_ReturnedVal)
{