mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Added code (to finish) for executing LUA triggers
This commit is contained in:
parent
223e7b673f
commit
7c1e29e6d0
3 changed files with 16 additions and 3 deletions
|
@ -427,6 +427,18 @@ void LuaVariables::SetVariable(std::string key, sol::object value)
|
|||
}
|
||||
}
|
||||
|
||||
void GameScript::ExecuteFunction(std::string name)
|
||||
{
|
||||
/*sol::protected_function func = (*m_lua)[name.c_str()];
|
||||
auto r = func();
|
||||
if (WarningsAsErrors && !r.valid())
|
||||
{
|
||||
sol::error err = r;
|
||||
std::cerr << "An error occurred: " << err.what() << "\n";
|
||||
throw std::runtime_error(err.what());
|
||||
}*/
|
||||
}
|
||||
|
||||
static void doCallback(sol::protected_function const & func) {
|
||||
auto r = func();
|
||||
if (WarningsAsErrors && !r.valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue