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

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarWorldLuaBindings.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-24 23:37:55 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-24 23:37:55 +1000
commit8547c56ba4607e1c4efac483f97f01b8ba8c3a01 (patch)
treed156522eae042e07a1c430220e7d5ab1bfa2727f /source/game/scripting/StarWorldLuaBindings.cpp
parent4c636e911ce86bcd6d501fc2f6f3ce2c3dd9c71c (diff)
Proper LuaString <-> String handling
Null-terminator usage is opt-in
Diffstat (limited to 'source/game/scripting/StarWorldLuaBindings.cpp')
-rw-r--r--source/game/scripting/StarWorldLuaBindings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/scripting/StarWorldLuaBindings.cpp b/source/game/scripting/StarWorldLuaBindings.cpp
index 6d1648e..087f88c 100644
--- a/source/game/scripting/StarWorldLuaBindings.cpp
+++ b/source/game/scripting/StarWorldLuaBindings.cpp
@@ -1421,7 +1421,7 @@ namespace LuaBindings {
return {};
}
- Maybe<JsonArray> WorldEntityCallbacks::entityPortrait(World* world, EntityId entityId, String const& portraitMode) {
+ LuaNullTermWrapper<Maybe<JsonArray>> WorldEntityCallbacks::entityPortrait(World* world, EntityId entityId, String const& portraitMode) {
auto entity = world->entity(entityId);
if (auto portraitEntity = as<PortraitEntity>(entity)) {
@@ -1471,7 +1471,7 @@ namespace LuaBindings {
return Json();
}
- Maybe<String> WorldEntityCallbacks::entityUniqueId(World* world, EntityId entityId) {
+ LuaNullTermWrapper<Maybe<String>> WorldEntityCallbacks::entityUniqueId(World* world, EntityId entityId) {
if (auto entity = world->entity(entityId))
return entity->uniqueId();
return {};