mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +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)
|
||||
|
||||
find_package(Lua REQUIRED)
|
||||
include_directories(${LUA_INCLUDE_DIR})
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
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) {
|
||||
RegisterEvent(EventName, FunctionName);
|
||||
});
|
||||
Table.set_function("");
|
||||
Table.set_function("TriggerGlobalEvent",
|
||||
[&](const std::string& EventName) {
|
||||
return mEngine->TriggerEvent(EventName);
|
||||
});
|
||||
Table.create_named("Settings",
|
||||
"Debug", 0,
|
||||
"Private", 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user