Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarLua.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 05:58:24 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 05:58:24 +1000
commitfb0ab850891ad345d75c32fd9c161ed1bf9a18ee (patch)
tree4b5c7eb91a6674b4102cd63f80d1f7b1e9293d8b /source/core/StarLua.hpp
parent8a2de03b0fa88fa378e1aeee683497745e6e3417 (diff)
Lua: player.* identity getters and setters
Diffstat (limited to 'source/core/StarLua.hpp')
-rw-r--r--source/core/StarLua.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/core/StarLua.hpp b/source/core/StarLua.hpp
index 9241ec4..2c108ef 100644
--- a/source/core/StarLua.hpp
+++ b/source/core/StarLua.hpp
@@ -9,6 +9,7 @@
#include "StarString.hpp"
#include "StarJson.hpp"
#include "StarRefPtr.hpp"
+#include "StarDirectives.hpp"
namespace Star {
@@ -826,6 +827,16 @@ struct LuaConverter<char[s]> {
};
template <>
+struct LuaConverter<Directives> {
+ static LuaValue from(LuaEngine& engine, Directives const& v) {
+ if (String const* ptr = v.stringPtr())
+ return engine.createString(*ptr);
+ else
+ return engine.createString("");
+ }
+};
+
+template <>
struct LuaConverter<LuaString> {
static LuaValue from(LuaEngine&, LuaString v) {
return LuaValue(move(v));