mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
cleanup internal functions
This commit is contained in:
parent
39a3c1201f
commit
6c568e6706
8 changed files with 47 additions and 60 deletions
|
|
@ -47,9 +47,7 @@ void scripting::on_frontend_init(
|
|||
|
||||
load_script("hud_classes.lua");
|
||||
|
||||
if (lua::getglobal(L, "__vc_on_hud_open")) {
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
}
|
||||
lua::call_internal(L, "on_hud_open");
|
||||
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(
|
||||
|
|
@ -65,9 +63,7 @@ void scripting::on_frontend_init(
|
|||
void scripting::on_frontend_render() {
|
||||
auto L = lua::get_main_state();
|
||||
|
||||
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, "on_render", true)) {
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
}
|
||||
lua::call_internal(L, "on_render");
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(L, pack.id + ":.hudrender", [](lua::State* L) {
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue