mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add rules & add 'show-content-access' rule
This commit is contained in:
parent
a50cb109c8
commit
2e24d60404
7 changed files with 156 additions and 28 deletions
|
|
@ -21,8 +21,14 @@ void scripting::on_frontend_init(Hud* hud, WorldRenderer* renderer) {
|
|||
scripting::hud = hud;
|
||||
scripting::renderer = renderer;
|
||||
|
||||
lua::openlib(lua::get_main_state(), "hud", hudlib);
|
||||
lua::openlib(lua::get_main_state(), "particles", particleslib);
|
||||
auto L = lua::get_main_state();
|
||||
|
||||
lua::openlib(L, "hud", hudlib);
|
||||
lua::openlib(L, "particles", particleslib);
|
||||
|
||||
if (lua::getglobal(L, "__vc_create_hud_rules")) {
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
}
|
||||
|
||||
for (auto& pack : engine->getContentPacks()) {
|
||||
lua::emit_event(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue