| 27 | std::vector<std::unique_ptr<LuaScript>> scripts; |
| 28 | |
| 29 | static std::string read_script_file(fs::path script_path) noexcept { |
| 30 | std::ifstream file(script_path, std::ios::binary); |
| 31 | if(file.is_open()) { |
| 32 | std::stringstream file_content; |
| 33 | file_content << file.rdbuf(); |
| 34 | file.close(); |
| 35 | return file_content.str(); |
| 36 | } |
| 37 | return std::string(); |
| 38 | } |
| 39 | |
| 40 | static void load_lua_script(const char *script_name, const char *lua_script_data, size_t lua_script_data_size, bool sandbox, bool global) noexcept { |
| 41 | // Create a new state for this script |
no outgoing calls
no test coverage detected