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

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarLuaGameConverters.cpp
diff options
context:
space:
mode:
authorZithia Satazaki <qmanxt@gmail.com>2023-10-30 15:05:42 -0400
committerZithia Satazaki <qmanxt@gmail.com>2023-10-30 15:05:42 -0400
commit86f02eab9b12a766f5f3f7ee6c18c96422779b46 (patch)
treeadcc577c05387d80f48b9a89ba8ad0de3c1a5be7 /source/game/scripting/StarLuaGameConverters.cpp
parenta0272c21890bd3b5143adf1d3b9175c0f7a29742 (diff)
these need to be {} wrapped to compile for some reason
Diffstat (limited to 'source/game/scripting/StarLuaGameConverters.cpp')
-rw-r--r--source/game/scripting/StarLuaGameConverters.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/scripting/StarLuaGameConverters.cpp b/source/game/scripting/StarLuaGameConverters.cpp
index feb0261..c65eb83 100644
--- a/source/game/scripting/StarLuaGameConverters.cpp
+++ b/source/game/scripting/StarLuaGameConverters.cpp
@@ -21,16 +21,16 @@ Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const&
if (auto str = v.ptr<LuaString>()) {
auto string = str->toString();
if (string.equalsIgnoreCase("swap"))
- return SwapSlot();
+ return {SwapSlot()};
else if (string.equalsIgnoreCase("trash"))
- return TrashSlot();
+ return {TrashSlot()};
else if (auto equipment = EquipmentSlotNames.leftPtr(str->toString()))
- return *equipment;
+ return {*equipment};
else
return {};
}
else if (auto table = v.ptr<LuaTable>())
- return BagSlot(table->get<LuaString>(1).toString(), table->get<unsigned>(2));
+ return {BagSlot(table->get<LuaString>(1).toString(), table->get<unsigned>(2))};
else
return {};
}