diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Script.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
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>(), std::string("return " + value.as<std::string>()) )); - 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>(), - std::string("return " + value.as<std::string>()) + std::string("return " + + std::string(value.as<bool>() ? "true" : "false") + ) )); + } //else if (value.get_type() == sol::type::function) { // sol::state lua; // lua.open_libraries(sol::lib::base, sol::lib::string); |