Files
Gleb Mazovetskiy 17e6da40f8 Lua: Improve function/property handling
1. Follows advice from
   https://sol2.readthedocs.io/en/latest/functions.html to use
   `set_function` when binding functions.
2. Adds autocomplete support for userdata methods.
3. Simplifies property bindings and improves string handling.
2025-07-20 17:46:35 +02:00

19 lines
426 B
C++

#include "lua/modules/hellfire.hpp"
#include <sol/sol.hpp>
#include "engine/assets.hpp"
#include "lua/metadoc.hpp"
namespace devilution {
sol::table LuaHellfireModule(sol::state_view &lua)
{
sol::table table = lua.create_table();
LuaSetDocFn(table, "loadData", "()", LoadHellfireArchives);
LuaSetDocFn(table, "enable", "()", []() { gbIsHellfire = true; });
return table;
}
} // namespace devilution