diff --git a/src/common.hpp b/src/common.hpp index a30e4ef3..070ab420 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -62,6 +62,9 @@ #include "services/notifications/notification_service.hpp" #include "services/translation_service/translation_service.hpp" +#define SOL_ALL_SAFETIES_ON 1 +#include "lua/sol.hpp" + // clang-format on namespace big diff --git a/src/lua/bindings/command.hpp b/src/lua/bindings/command.hpp index 3885716c..2cf5c7b4 100644 --- a/src/lua/bindings/command.hpp +++ b/src/lua/bindings/command.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::command { diff --git a/src/lua/bindings/entities.hpp b/src/lua/bindings/entities.hpp index 0b420400..287716a6 100644 --- a/src/lua/bindings/entities.hpp +++ b/src/lua/bindings/entities.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::entities { diff --git a/src/lua/bindings/event.hpp b/src/lua/bindings/event.hpp index 30cd79a7..1d591c3d 100644 --- a/src/lua/bindings/event.hpp +++ b/src/lua/bindings/event.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::event { diff --git a/src/lua/bindings/global_table.cpp b/src/lua/bindings/global_table.cpp index a96ea4ef..503ac29b 100644 --- a/src/lua/bindings/global_table.cpp +++ b/src/lua/bindings/global_table.cpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::global_table { diff --git a/src/lua/bindings/global_table.hpp b/src/lua/bindings/global_table.hpp index 3ea3bec6..c9d165fc 100644 --- a/src/lua/bindings/global_table.hpp +++ b/src/lua/bindings/global_table.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::global_table { diff --git a/src/lua/bindings/globals.hpp b/src/lua/bindings/globals.hpp index f64d90cf..4dbdfc43 100644 --- a/src/lua/bindings/globals.hpp +++ b/src/lua/bindings/globals.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::globals { diff --git a/src/lua/bindings/gui/button.hpp b/src/lua/bindings/gui/button.hpp index b6ec7580..fa555bad 100644 --- a/src/lua/bindings/gui/button.hpp +++ b/src/lua/bindings/gui/button.hpp @@ -1,6 +1,5 @@ #pragma once #include "base_text_element.hpp" -#include "lua/sol.hpp" namespace lua::gui { diff --git a/src/lua/bindings/gui/raw_imgui_callback.hpp b/src/lua/bindings/gui/raw_imgui_callback.hpp index e49842ec..944f5202 100644 --- a/src/lua/bindings/gui/raw_imgui_callback.hpp +++ b/src/lua/bindings/gui/raw_imgui_callback.hpp @@ -1,6 +1,5 @@ #pragma once #include "gui_element.hpp" -#include "lua/sol.hpp" namespace lua::gui { diff --git a/src/lua/bindings/gui/text.hpp b/src/lua/bindings/gui/text.hpp index 59407ab7..507e5682 100644 --- a/src/lua/bindings/gui/text.hpp +++ b/src/lua/bindings/gui/text.hpp @@ -1,6 +1,5 @@ #pragma once #include "base_text_element.hpp" -#include "lua/sol.hpp" namespace lua::gui { diff --git a/src/lua/bindings/imgui.hpp b/src/lua/bindings/imgui.hpp index 6f39ea5f..c0f8359b 100644 --- a/src/lua/bindings/imgui.hpp +++ b/src/lua/bindings/imgui.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::imgui { diff --git a/src/lua/bindings/locals.hpp b/src/lua/bindings/locals.hpp index 295181e2..1aa1dfc2 100644 --- a/src/lua/bindings/locals.hpp +++ b/src/lua/bindings/locals.hpp @@ -1,7 +1,6 @@ #pragma once #include "gta_util.hpp" #include "script_local.hpp" -#include "lua/sol.hpp" namespace lua::locals { diff --git a/src/lua/bindings/log.hpp b/src/lua/bindings/log.hpp index ebb9c946..8850237b 100644 --- a/src/lua/bindings/log.hpp +++ b/src/lua/bindings/log.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::log { diff --git a/src/lua/bindings/memory.hpp b/src/lua/bindings/memory.hpp index 8f86fadc..5acd4f6a 100644 --- a/src/lua/bindings/memory.hpp +++ b/src/lua/bindings/memory.hpp @@ -1,6 +1,5 @@ #pragma once #include "lua/lua_module.hpp" -#include "lua/sol.hpp" namespace lua::memory { diff --git a/src/lua/bindings/native.hpp b/src/lua/bindings/native.hpp index 628bd79a..73a7a095 100644 --- a/src/lua/bindings/native.hpp +++ b/src/lua/bindings/native.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" #include "lua/natives/lua_native_binding.hpp" namespace lua::native diff --git a/src/lua/bindings/network.hpp b/src/lua/bindings/network.hpp index 2c0e2fc9..5f45da2b 100644 --- a/src/lua/bindings/network.hpp +++ b/src/lua/bindings/network.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" // https://stackoverflow.com/a/40777268 /** diff --git a/src/lua/bindings/script.hpp b/src/lua/bindings/script.hpp index b316154e..87aa1ce1 100644 --- a/src/lua/bindings/script.hpp +++ b/src/lua/bindings/script.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::script { diff --git a/src/lua/bindings/stats.hpp b/src/lua/bindings/stats.hpp index a63ee093..199a4061 100644 --- a/src/lua/bindings/stats.hpp +++ b/src/lua/bindings/stats.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::stats { diff --git a/src/lua/bindings/vector.hpp b/src/lua/bindings/vector.hpp index 3fe34593..191e53aa 100644 --- a/src/lua/bindings/vector.hpp +++ b/src/lua/bindings/vector.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::vector { diff --git a/src/lua/bindings/vehicles.hpp b/src/lua/bindings/vehicles.hpp index 7e579de3..bee7941d 100644 --- a/src/lua/bindings/vehicles.hpp +++ b/src/lua/bindings/vehicles.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::vehicles { diff --git a/src/lua/bindings/weapons.hpp b/src/lua/bindings/weapons.hpp index 3db5a6db..4d6e3282 100644 --- a/src/lua/bindings/weapons.hpp +++ b/src/lua/bindings/weapons.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::weapons { diff --git a/src/lua/lua_module.hpp b/src/lua/lua_module.hpp index 85c605fb..84b4f2fa 100644 --- a/src/lua/lua_module.hpp +++ b/src/lua/lua_module.hpp @@ -3,7 +3,6 @@ #include "bindings/gui/gui_element.hpp" #include "core/data/menu_event.hpp" #include "lua_patch.hpp" -#include "sol.hpp" #include diff --git a/src/lua/natives/lua_native_binding.hpp b/src/lua/natives/lua_native_binding.hpp index 75ee5259..3d3fd0b0 100644 --- a/src/lua/natives/lua_native_binding.hpp +++ b/src/lua/natives/lua_native_binding.hpp @@ -1,5 +1,4 @@ #pragma once -#include "lua/sol.hpp" namespace lua::native { diff --git a/src/lua/natives/natives_gen.py b/src/lua/natives/natives_gen.py index 944d914a..18bfbd1a 100644 --- a/src/lua/natives/natives_gen.py +++ b/src/lua/natives/natives_gen.py @@ -238,7 +238,7 @@ def generate_native_binding_cpp_and_hpp_files(functions_per_namespaces): generated_function_name = "void init_native_binding(sol::state& L)" print_hpp("#pragma once") - print_hpp('#include "lua/sol.hpp"') + # print_hpp('#include "lua/sol.hpp"') print_hpp("") print_hpp("namespace lua::native") print_hpp("{")