mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
Fix more compile issues with lua, add TriggerGlobalEvent
This commit is contained in:
parent
26231c6272
commit
dca573b15c
@ -56,6 +56,7 @@ add_executable(BeamMP-Server
|
|||||||
include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
find_package(Lua REQUIRED)
|
find_package(Lua REQUIRED)
|
||||||
|
include_directories(${LUA_INCLUDE_DIR})
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
target_link_libraries(BeamMP-Server sol2::sol2 ${LUA_LIBRARIES})
|
target_link_libraries(BeamMP-Server sol2::sol2 ${LUA_LIBRARIES})
|
||||||
|
@ -159,7 +159,10 @@ TLuaEngine::StateThreadData::StateThreadData(const std::string& Name, std::atomi
|
|||||||
[this](const std::string& EventName, const std::string& FunctionName) {
|
[this](const std::string& EventName, const std::string& FunctionName) {
|
||||||
RegisterEvent(EventName, FunctionName);
|
RegisterEvent(EventName, FunctionName);
|
||||||
});
|
});
|
||||||
Table.set_function("");
|
Table.set_function("TriggerGlobalEvent",
|
||||||
|
[&](const std::string& EventName) {
|
||||||
|
return mEngine->TriggerEvent(EventName);
|
||||||
|
});
|
||||||
Table.create_named("Settings",
|
Table.create_named("Settings",
|
||||||
"Debug", 0,
|
"Debug", 0,
|
||||||
"Private", 1,
|
"Private", 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user