mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'on_block_removed' event
This commit is contained in:
parent
b3e5f2a1c0
commit
f721731ecc
12 changed files with 61 additions and 16 deletions
|
|
@ -341,6 +341,13 @@ void scripting::on_world_save() {
|
|||
}
|
||||
}
|
||||
|
||||
void scripting::process_before_quit() {
|
||||
auto L = lua::get_main_state();
|
||||
if (lua::getglobal(L, "__vc_process_before_quit")) {
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void scripting::on_world_quit() {
|
||||
auto L = lua::get_main_state();
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
|
|
@ -677,6 +684,8 @@ void scripting::load_content_script(
|
|||
register_event(env, "on_blocks_tick", prefix + ".blockstick");
|
||||
funcsset.onblockpresent =
|
||||
register_event(env, "on_block_present", prefix + ".blockpresent");
|
||||
funcsset.onblockremoved =
|
||||
register_event(env, "on_block_removed", prefix + ".blockremoved");
|
||||
}
|
||||
|
||||
void scripting::load_content_script(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue