mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-05-21 05:40:35 +00:00
17e6da40f8
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.
19 lines
426 B
C++
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
|