From 6123f09e9fd8c7d68832a6d33325456316aa6ec9 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Wed, 4 Sep 2019 03:09:07 -0400 Subject: Fixed boolean saving in lua table saving --- src/components/Script.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/Script.hpp b/src/components/Script.hpp index 82381e9..3f96be5 100644 --- a/src/components/Script.hpp +++ b/src/components/Script.hpp @@ -76,11 +76,14 @@ public: key.as(), std::string("return " + value.as()) )); - else if (value.get_type() == sol::type::boolean) + else if (value.get_type() == sol::type::boolean) { table_components.push_back(std::make_tuple( key.as(), - std::string("return " + value.as()) + std::string("return " + + std::string(value.as() ? "true" : "false") + ) )); + } //else if (value.get_type() == sol::type::function) { // sol::state lua; // lua.open_libraries(sol::lib::base, sol::lib::string); -- cgit v1.2.3